testdev/ite/src/com.nokia.testfw.stf.configeditor/src/com/nokia/testfw/stf/configeditor/editors/ConfigSourceEditor.java
changeset 1 96906a986c3b
equal deleted inserted replaced
0:f1112f777ce9 1:96906a986c3b
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 package com.nokia.testfw.stf.configeditor.editors;
       
    20 
       
    21 import java.util.ResourceBundle;
       
    22 
       
    23 import org.eclipse.jface.action.Action;
       
    24 import org.eclipse.ui.editors.text.TextEditor;
       
    25 import org.eclipse.ui.texteditor.ContentAssistAction;
       
    26 import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds;
       
    27 
       
    28 /**
       
    29  * Config source editor
       
    30  * 
       
    31  */
       
    32 public class ConfigSourceEditor extends TextEditor {
       
    33 	/**
       
    34 	 * Creates config source editor
       
    35 	 */
       
    36 	public ConfigSourceEditor() {
       
    37         super();
       
    38         setSourceViewerConfiguration( new ConfigSourceEditorConfiguration() );	
       
    39         
       
    40 	}
       
    41 	
       
    42 	/* (non-Javadoc)
       
    43 	 * @see org.eclipse.ui.editors.text.TextEditor#createActions()
       
    44 	 */
       
    45 	protected void createActions() {
       
    46 		ResourceBundle resourceBundle = ResourceBundle.getBundle( "STIFConfigEditor" );
       
    47 		Action action = new ContentAssistAction(resourceBundle, "ContentAssistProposal.", this); 
       
    48 		String id = ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS;
       
    49 		action.setActionDefinitionId(id);
       
    50 		setAction("ContentAssistProposal", action); 
       
    51 		markAsStateDependentAction("ContentAssistProposal", true);
       
    52 	}
       
    53 }