當前位置: 首頁>>代碼示例>>Java>>正文


Java IAction.setText方法代碼示例

本文整理匯總了Java中org.eclipse.jface.action.IAction.setText方法的典型用法代碼示例。如果您正苦於以下問題:Java IAction.setText方法的具體用法?Java IAction.setText怎麽用?Java IAction.setText使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.action.IAction的用法示例。


在下文中一共展示了IAction.setText方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: extractSubmenuActions

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
/**
 * This extracts those actions in the <code>submenuActions</code> collection whose text is qualified and returns
 * a map of these actions, keyed by submenu text.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Map<String, Collection<IAction>> extractSubmenuActions ( Collection<IAction> createActions )
{
    Map<String, Collection<IAction>> createSubmenuActions = new LinkedHashMap<String, Collection<IAction>> ();
    if ( createActions != null )
    {
        for ( Iterator<IAction> actions = createActions.iterator (); actions.hasNext (); )
        {
            IAction action = actions.next ();
            StringTokenizer st = new StringTokenizer ( action.getText (), "|" ); //$NON-NLS-1$
            if ( st.countTokens () == 2 )
            {
                String text = st.nextToken ().trim ();
                Collection<IAction> submenuActions = createSubmenuActions.get ( text );
                if ( submenuActions == null )
                {
                    createSubmenuActions.put ( text, submenuActions = new ArrayList<IAction> () );
                }
                action.setText ( st.nextToken ().trim () );
                submenuActions.add ( action );
                actions.remove ();
            }
        }
    }
    return createSubmenuActions;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:33,代碼來源:DetailViewActionBarContributor.java

示例2: extractSubmenuActions

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
/**
 * This extracts those actions in the <code>submenuActions</code> collection whose text is qualified and returns
 * a map of these actions, keyed by submenu text.
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
protected Map<String, Collection<IAction>> extractSubmenuActions ( Collection<IAction> createActions )
{
    Map<String, Collection<IAction>> createSubmenuActions = new LinkedHashMap<String, Collection<IAction>> ();
    if ( createActions != null )
    {
        for ( Iterator<IAction> actions = createActions.iterator (); actions.hasNext (); )
        {
            IAction action = actions.next ();
            StringTokenizer st = new StringTokenizer ( action.getText (), "|" );
            if ( st.countTokens () == 2 )
            {
                String text = st.nextToken ().trim ();
                Collection<IAction> submenuActions = createSubmenuActions.get ( text );
                if ( submenuActions == null )
                {
                    createSubmenuActions.put ( text, submenuActions = new ArrayList<IAction> () );
                }
                action.setText ( st.nextToken ().trim () );
                submenuActions.add ( action );
                actions.remove ();
            }
        }
    }
    return createSubmenuActions;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:33,代碼來源:MemoryActionBarContributor.java

示例3: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof StepTreeObject) {
		Step step = ((StepTreeObject) treeObject).getObject();
		if (step instanceof AttributeStep || step instanceof XMLAttributeStep) {
			action.setText("Attribute always output true.");
			action.setEnabled(false);
		} else {
			output = !step.isOutput();
			String actionText = output ? "Output true":"Output false";
			actionText += recurse ? " recursively":"";
			action.setText(actionText);
		}
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:18,代碼來源:OutputStepAction.java

示例4: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof DesignDocumentViewTreeObject) {
		DesignDocumentViewTreeObject ddvto = (DesignDocumentViewTreeObject)treeObject;
		action.setText(CouchKey.reduce.key() + " function");
		action.setEnabled(!ddvto.hasReduce());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:11,代碼來源:CreateDesignDocumentViewReduceAction.java

示例5: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof DesignDocumentTreeObject) {
		action.setText(((DesignDocumentTreeObject)treeObject).getDefaultUpdateName());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:9,代碼來源:CreateDesignDocumentUpdateAction.java

示例6: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof PropertyTableTreeObject) {
		action.setText(((PropertyTableTreeObject)treeObject).getRowDefaultLabel());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:9,代碼來源:CreatePropertyTableRowAction.java

示例7: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof DesignDocumentTreeObject) {
		action.setText(((DesignDocumentTreeObject)treeObject).getDefaultFilterName());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:9,代碼來源:CreateDesignDocumentFilterAction.java

示例8: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof PropertyTableRowTreeObject) {
		action.setText(((PropertyTableRowTreeObject)treeObject).getColumnDefaultLabel());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:9,代碼來源:CreatePropertyTableColumnAction.java

示例9: selectionChanged

import org.eclipse.jface.action.IAction; //導入方法依賴的package包/類
public void selectionChanged(IAction action, ISelection selection) {
	super.selectionChanged(action, selection);
	IStructuredSelection structuredSelection = (IStructuredSelection) selection;
	TreeObject treeObject = (TreeObject) structuredSelection.getFirstElement();
	if (treeObject instanceof DesignDocumentTreeObject) {
		action.setText(((DesignDocumentTreeObject)treeObject).getDefaultViewName());
	}
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:9,代碼來源:CreateDesignDocumentViewAction.java


注:本文中的org.eclipse.jface.action.IAction.setText方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。