当前位置: 首页>>代码示例>>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;未经允许,请勿转载。