当前位置: 首页>>代码示例>>Java>>正文


Java PropertyDialogAction类代码示例

本文整理汇总了Java中org.eclipse.ui.dialogs.PropertyDialogAction的典型用法代码示例。如果您正苦于以下问题:Java PropertyDialogAction类的具体用法?Java PropertyDialogAction怎么用?Java PropertyDialogAction使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PropertyDialogAction类属于org.eclipse.ui.dialogs包,在下文中一共展示了PropertyDialogAction类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createActions

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
private void createActions() {
  // For the following commands we use actions, as they are already available

  final IActionBars ab = getViewSite().getActionBars();

  openAction = new OpenAction(getSite());
  openAction
      .setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_EDITOR);
  ab.setGlobalActionHandler(JdtActionConstants.OPEN, openAction);
  openAction.setEnabled(false);
  viewer.addSelectionChangedListener(openAction);

  PropertyDialogAction propertiesAction = new PropertyDialogAction(getSite(),
      viewer);
  propertiesAction
      .setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);
  ab.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(),
      propertiesAction);
  propertiesAction.setEnabled(false);
  viewer.addSelectionChangedListener(propertiesAction);
}
 
开发者ID:eclipse,项目名称:eclemma,代码行数:22,代码来源:CoverageView.java

示例2: NewTextSearchActionGroup

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
public NewTextSearchActionGroup(IViewPart part) {
    Assert.isNotNull(part);
    IWorkbenchPartSite site = part.getSite();
    fSelectionProvider = site.getSelectionProvider();
    fPage = site.getPage();
    fOpenPropertiesDialog = new PropertyDialogAction(site, fSelectionProvider);
    fOpenAction = new OpenFileAction(fPage);
    ISelection selection = fSelectionProvider.getSelection();

    if (selection instanceof IStructuredSelection) {
        fOpenPropertiesDialog.selectionChanged((IStructuredSelection) selection);
    } else {
        fOpenPropertiesDialog.selectionChanged(selection);
    }

}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:17,代码来源:NewTextSearchActionGroup.java

示例3: fillActions

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
public void fillActions(IMenuManager manager)
		{
			manager.add(new Separator(IWorkbenchActionConstants.NEW_EXT));
			if (newElement != null) manager.add(newElement);
			if (newGroup != null) manager.add(newGroup);
			manager.add(new Separator(IWorkbenchActionConstants.EDIT_START));
			if (openEditorAction != null) manager.add(openEditorAction);
			if (changeKeyAction != null) manager.add(changeKeyAction);
			manager.add(new Separator(IWorkbenchActionConstants.M_EDIT));
//			if (cutAction != null) manager.add(cutAction);
			if (copyAction != null) manager.add(copyAction);
			if (pasteAction != null) manager.add(pasteAction);
			if (deleteAction != null) manager.add(deleteAction);
			manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
			manager.add(new PropertyDialogAction(new SameShellProvider(viewer.getControl()), viewer));
		}
 
开发者ID:TheWhiteShadow3,项目名称:cuina,代码行数:17,代码来源:DatabaseUtil.java

示例4: execute

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException
{

    
    // FIXME Fix the selection of specs only
    IAction action = new PropertyDialogAction(UIHelper.getShellProvider(), Activator.getSpecManager());
    // IAction action = new PropertyDialogAction(UIHelper.getShellProvider(), HandlerUtil.getActivePart(event));
    action.run();
    
    return null;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:12,代码来源:PropertiesHandler.java

示例5: execute

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException
{

    IAction action = new PropertyDialogAction(UIHelper.getShellProvider(), UIHelper
            .getActiveEditorFileSelectionProvider());
    action.run();

    return null;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:10,代码来源:ModulePropertiesHandler.java

示例6: createSiteActions

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
private void createSiteActions(IWorkbenchSite site, ISelectionProvider specialProvider) {
	ISelectionProvider provider = specialProvider != null ? specialProvider : site.getSelectionProvider();

	fOpenPropertiesDialog = new PropertyDialogAction(site, provider);
	fOpenPropertiesDialog.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);

	initialize(provider);
}
 
开发者ID:grosenberg,项目名称:fluentmark,代码行数:9,代码来源:OpenViewActionGroup.java

示例7: createPartControl

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
@SuppressWarnings ("deprecation")
@Override
public void createPartControl(final Composite compo) {
	this.parent = GamaToolbarFactory.createToolbars(this, compo);

	super.createPartControl(parent);
	final IToolBarManager toolbar = getViewSite().getActionBars().getToolBarManager();
	for (final IContributionItem item : toolbar.getItems()) {
		if (item instanceof ActionContributionItem) {
			final ActionContributionItem aci = (ActionContributionItem) item;
			final IAction action = aci.getAction();
			if (action instanceof LinkEditorAction) {
				link = action;
				toolbar.remove(aci);
			} else if (action instanceof org.eclipse.ui.internal.navigator.actions.CollapseAllAction) {
				toolbar.remove(aci);
			}

		}
	}
	linkItem.setSelection(link.isChecked());
	toolbar.update(true);
	// linkItem.setSelection(link.isChecked());
	// final Action a = linkCommand.toCheckAction();
	// a.setChecked(link.isChecked());
	// toolbar.insertBefore("toolbar.toggle", a);
	toolbar.insertBefore("toolbar.toggle", byDate.toCheckAction());
	toolbar.insertBefore("toolbar.toggle", expandAll.toAction());
	toolbar.insertBefore(expandAll.getId(), collapseAll.toAction());

	try {
		final IDecoratorManager mgr = PlatformUI.getWorkbench().getDecoratorManager();
		mgr.setEnabled("msi.gama.application.date.decorator", false);
	} catch (final CoreException e) {
		e.printStackTrace();
	}
	properties =
			new PropertyDialogAction(new SameShellProvider(getSite().getShell()), getSite().getSelectionProvider());
	findControl.initialize();
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:41,代码来源:GamaNavigator.java

示例8: createSiteActions

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
private void createSiteActions(IWorkbenchSite site, ISelectionProvider specialProvider) {
	fOpenImplementation= new OpenImplementationAction(site);
	fOpenImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_IMPLEMENTATION);
	fOpenImplementation.setSpecialSelectionProvider(specialProvider);
	
	fOpenSuperImplementation= new OpenSuperImplementationAction(site);
	fOpenSuperImplementation.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_SUPER_IMPLEMENTATION);
	fOpenSuperImplementation.setSpecialSelectionProvider(specialProvider);

	fOpenAttachedJavadoc= new OpenAttachedJavadocAction(site);
	fOpenAttachedJavadoc.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_ATTACHED_JAVADOC);
	fOpenAttachedJavadoc.setSpecialSelectionProvider(specialProvider);

	fOpenTypeHierarchy= new OpenTypeHierarchyAction(site);
	fOpenTypeHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_TYPE_HIERARCHY);
	fOpenTypeHierarchy.setSpecialSelectionProvider(specialProvider);

	fOpenCallHierarchy= new OpenCallHierarchyAction(site);
	fOpenCallHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_CALL_HIERARCHY);
	fOpenCallHierarchy.setSpecialSelectionProvider(specialProvider);

	ISelectionProvider provider= specialProvider != null ? specialProvider : site.getSelectionProvider();

	fOpenPropertiesDialog= new PropertyDialogAction(site, provider);
	fOpenPropertiesDialog.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES);

	initialize(provider);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:29,代码来源:OpenViewActionGroup.java

示例9: init

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
public void init(final ICommonActionExtensionSite aSite) {
	
	delegateSelectionProvider = new DelegateSelectionProvider( aSite.getViewSite().getSelectionProvider());
	propertiesAction = new PropertyDialogAction(new IShellProvider() {
		public Shell getShell() {
			return aSite.getViewSite().getShell();
		}
	},delegateSelectionProvider);
	propertiesAction.setText("属性");
	propertiesAction.setActionDefinitionId(IWorkbenchCommandConstants.FILE_PROPERTIES); 
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:12,代码来源:PropertiesActionProvider.java

示例10: createActions

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
private void createActions() {
    selectAllAction = new Action() {
        @Override
        public void run() {
            changesTable.selectAll();
            changesTable.setFocus();
        }
    };

    copyAction = new Action() {
        @Override
        public void run() {
            changesTable.copySelectionToClipboard();
        }
    };

    showHideCommentAction = new Action() {
        @Override
        public void run() {
            if (sashForm.getMaximizedControl() == null) {
                sashForm.setMaximizedControl(changesTable);
                setChecked(false);
            } else {
                sashForm.setMaximizedControl(null);
                setChecked(true);
            }
        }
    };
    showHideCommentAction.setToolTipText(Messages.getString("SourceFilesCheckinControl.ShowHideActionTooltip")); //$NON-NLS-1$
    showHideCommentAction.setImageDescriptor(
        AbstractUIPlugin.imageDescriptorFromPlugin(
            TFSCommonUIClientPlugin.PLUGIN_ID,
            "images/vc/sourcefiles_showhidecomment.gif")); //$NON-NLS-1$
    showHideCommentAction.setChecked(true);

    /*
     * must use the deprecated constructor of PropertyDialogAction for 3.0
     * compatibility
     */
    propertiesAction = new PropertyDialogAction(getShell(), changesTable);
    propertiesAction.setEnabled(false);

    registerGlobalActionHandler(ActionFactory.SELECT_ALL.getId(), selectAllAction);
    registerGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
    registerGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:47,代码来源:SourceFilesCheckinControl.java

示例11: init

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
@Override
public void init(final IActionBars bars) {
	super.init(bars);
	editorInputSelectionProvider = new ISelectionProvider() {

		private final ListenerList listeners = new ListenerList(ListenerList.IDENTITY);

		ISelection selection = StructuredSelection.EMPTY;

		@Override
		public void addSelectionChangedListener(final ISelectionChangedListener listener) {
			if ( listener != null ) {
				this.listeners.add(listener);
			}
		}

		@Override
		public ISelection getSelection() {
			return this.selection;
		}

		@Override
		public void removeSelectionChangedListener(final ISelectionChangedListener listener) {
			if ( listener != null ) {
				this.listeners.remove(listener);
			}
		}

		@Override
		public void setSelection(ISelection selection) {
			if ( selection == null ) {
				selection = StructuredSelection.EMPTY;
			}
			if ( !selection.equals(this.selection) ) {
				this.selection = selection;
				final SelectionChangedEvent event = new SelectionChangedEvent(this, selection);
				Object[] listeners = this.listeners.getListeners();
				for ( int i = 0; i < listeners.length; ++i ) {
					final ISelectionChangedListener l = (ISelectionChangedListener) listeners[i];
					SafeRunner.run(new SafeRunnable() {

						@Override
						public void run() {
							l.selectionChanged(event);
						}
					});
				}
			}
		}
	};
	updateEditorInputSelectionProvider(currentEditor);
	IShellProvider shellProvider = new IShellProvider() {

		@Override
		public Shell getShell() {
			return currentEditor.getSite().getShell();
		}
	};
	propertiesAction = new PropertyDialogAction(shellProvider, editorInputSelectionProvider) {

		@Override
		public void selectionChanged(final IStructuredSelection selection) {
			setEnabled(isApplicableForSelection(selection));
		}
	};
	bars.setGlobalActionHandler(ActionFactory.PROPERTIES.getId(), propertiesAction);
}
 
开发者ID:gama-platform,项目名称:gama,代码行数:68,代码来源:ImageViewerActionBarContributor.java

示例12: createPartControl

import org.eclipse.ui.dialogs.PropertyDialogAction; //导入依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	GridLayout layout = new GridLayout();
	layout.marginHeight = 0;
	layout.marginWidth = 0;
	layout.verticalSpacing = 0;

	this.parent = parent;
	this.parent.setLayout(layout);

	cv = new CommonViewer();

	collectUserFields();
	plcp = new PatListeContentProvider(cv, currentUserFields, this);
	makeActions();
	plfb = new PatListFilterBox(parent);
	plfb.setLayoutData(SWTHelper.getFillGridData(1, true, 1, false));
	((GridData) plfb.getLayoutData()).heightHint = 0;

	dcfp = new DefaultControlFieldProvider(cv, currentUserFields);
	updateFocusField();

	vc = new ViewerConfigurer(
			// new LazyContentProvider(cv,loader,
			// AccessControlDefaults.PATIENT_DISPLAY),
			plcp, new PatLabelProvider(), dcfp, new ViewerConfigurer.DefaultButtonProvider(), // cv,Patient.class),
			new SimpleWidgetProvider(SimpleWidgetProvider.TYPE_LAZYLIST, SWT.SINGLE, cv));
	cv.create(vc, parent, SWT.NONE, getViewSite());
	// let user select patient by pressing ENTER in the control fields
	cv.getConfigurer().getControlFieldProvider().addChangeListener(new ControlFieldSelectionListener());
	cv.getViewerWidget().getControl().setFont(UiDesk.getFont(Preferences.USR_DEFAULTFONT));

	plcp.startListening();
	ElexisEventDispatcher.getInstance().addListeners(eeli_user);
	GlobalEventDispatcher.addActivationListener(this, this);

	populateViewMenu();

	StructuredViewer viewer = cv.getViewerWidget();
	viewer.addDoubleClickListener(new IDoubleClickListener() {

		@Override
		public void doubleClick(DoubleClickEvent event) {
			PropertyDialogAction pdAction = new PropertyDialogAction(new SameShellProvider(parent),
					PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart().getSite()
							.getSelectionProvider());

			if (pdAction.isApplicableForSelection())
				pdAction.run();
		}
	});
	getSite().registerContextMenu(menus.getContextMenu(), viewer);
	getSite().setSelectionProvider(viewer);

	// // ****DoubleClick Version Marlovits -> öffnet bei DoubleClick die
	// Patienten-Detail-Ansicht
	// cv.addDoubleClickListener(new DoubleClickListener() {
	// @Override
	// public void doubleClicked(PersistentObject obj, CommonViewer cv){
	// try {
	// PatientDetailView2 pdv =
	// (PatientDetailView2)
	// getSite().getPage().showView(PatientDetailView2.ID);
	// } catch (PartInitException e) {
	// ExHandler.handle(e);
	// }
	// }
	// });
}
 
开发者ID:elexis,项目名称:elexis-3-core,代码行数:70,代码来源:PatientenListeView.java


注:本文中的org.eclipse.ui.dialogs.PropertyDialogAction类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。