org.eclipse.jdt.internal.ui.IJavaHelpContextIds Java Examples

The following examples show how to use org.eclipse.jdt.internal.ui.IJavaHelpContextIds. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: PromoteTempWizard.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public void createControl(Composite parent) {
	Composite result= new Composite(parent, SWT.NONE);
	setControl(result);
	GridLayout layout= new GridLayout();
	layout.numColumns= 2;
	layout.verticalSpacing= 8;
	result.setLayout(layout);

	addFieldNameField(result);
	addVisibilityControl(result);
	addInitizeInRadioButtonGroup(result);
	addDeclareStaticCheckbox(result);
	addDeclareFinalCheckbox(result);

	Dialog.applyDialogFont(result);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.PROMOTE_TEMP_TO_FIELD_WIZARD_PAGE);

	updateStatus();
}
 
Example #2
Source File: PackageExplorerPart.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@Override
public Object getAdapter(Class key) {
	if (key.equals(ISelectionProvider.class))
		return fViewer;
	if (key == IShowInSource.class) {
		return getShowInSource();
	}
	if (key == IShowInTargetList.class) {
		return new IShowInTargetList() {
			public String[] getShowInTargetIds() {
				return new String[] { JavaPlugin.ID_RES_NAV };
			}

		};
	}
	if (key == IContextProvider.class) {
		return JavaUIHelp.getHelpContextProvider(this, IJavaHelpContextIds.PACKAGES_VIEW);
	}
	return super.getAdapter(key);
}
 
Example #3
Source File: ChangeTypeWizard.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
public void createControl(Composite parent) {
	Composite composite= new Composite(parent, SWT.NONE);
	setControl(composite);
	composite.setLayout(new GridLayout());
	composite.setLayoutData(new GridData());

	Label label= new Label(composite, SWT.NONE);
	label.setText(Messages.format(
			RefactoringMessages.ChangeTypeWizard_pleaseChooseType,
			((ChangeTypeRefactoring) getRefactoring()).getTarget()));
	label.setLayoutData(new GridData());

	addTreeComponent(composite);
	Dialog.applyDialogFont(composite);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.CHANGE_TYPE_WIZARD_PAGE);
}
 
Example #4
Source File: NLSAccessorConfigurationDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 6 votes vote down vote up
@Override
protected Control createDialogArea(Composite ancestor) {
	Composite parent= (Composite) super.createDialogArea(ancestor);

	final int nOfColumns= 4;

	initializeDialogUnits(ancestor);

	GridLayout layout= (GridLayout) parent.getLayout();
	layout.numColumns= nOfColumns;
	parent.setLayout(layout);

	createAccessorPart(parent, nOfColumns, convertWidthInCharsToPixels(40));

	Separator s= new Separator(SWT.SEPARATOR | SWT.HORIZONTAL);
	s.doFillIntoGrid(parent, nOfColumns);

	createPropertyPart(parent, nOfColumns, convertWidthInCharsToPixels(40));

	Dialog.applyDialogFont(parent);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.EXTERNALIZE_WIZARD_PROPERTIES_FILE_PAGE);
	validateAll();
	return parent;
}
 
Example #5
Source File: FindWriteReferencesInHierarchyAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
void init() {
	setText(SearchMessages.Search_FindWriteReferencesInHierarchyAction_label);
	setToolTipText(SearchMessages.Search_FindWriteReferencesInHierarchyAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_WRITE_REFERENCES_IN_HIERARCHY_ACTION);
}
 
Example #6
Source File: ExternalizeWizardPage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public void createControl(Composite parent) {
	initializeDialogUnits(parent);

	Composite supercomposite= new Composite(parent, SWT.NONE);
	supercomposite.setFont(parent.getFont());
	supercomposite.setLayout(new GridLayout());

	createIsEclipseNLSCheckbox(supercomposite);

	createKeyPrefixField(supercomposite);

	SashForm composite= new SashForm(supercomposite, SWT.VERTICAL);
	composite.setFont(supercomposite.getFont());

	GridData data= new GridData(GridData.FILL_BOTH);
	composite.setLayoutData(data);

	createTableViewer(composite);
	createSourceViewer(composite);

	createAccessorInfoComposite(supercomposite);

	composite.setWeights(new int[]{65, 45});

	validateKeys(false);
	updateButtonStates(StructuredSelection.EMPTY);

	// promote control
	setControl(supercomposite);
	Dialog.applyDialogFont(supercomposite);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(supercomposite, IJavaHelpContextIds.EXTERNALIZE_WIZARD_KEYVALUE_PAGE);
}
 
Example #7
Source File: FindReadReferencesInWorkingSetAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
void init() {
	setText(SearchMessages.Search_FindReadReferencesInWorkingSetAction_label);
	setToolTipText(SearchMessages.Search_FindReadReferencesInWorkingSetAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_READ_REFERENCES_IN_WORKING_SET_ACTION);
}
 
Example #8
Source File: LexicalSortingAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public LexicalSortingAction(StructuredViewer viewer, String id, JdtViewerDropSupport dropSupport) {
	super();
	fViewer= viewer;
	fDropSupport= dropSupport;
	fPreferenceKey= "LexicalSortingAction." + id + ".isChecked"; //$NON-NLS-1$ //$NON-NLS-2$
	setText(JavaBrowsingMessages.LexicalSortingAction_label);
	JavaPluginImages.setLocalImageDescriptors(this, "alphab_sort_co.gif"); //$NON-NLS-1$
	setToolTipText(JavaBrowsingMessages.LexicalSortingAction_tooltip);
	setDescription(JavaBrowsingMessages.LexicalSortingAction_description);
	boolean checked= JavaPlugin.getDefault().getPreferenceStore().getBoolean(fPreferenceKey);
	valueChanged(checked, false);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.LEXICAL_SORTING_BROWSING_ACTION);
}
 
Example #9
Source File: RefreshElementAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates the action to refresh a single element in the call hierarchy.
 *
 * @param viewer the call hierarchy viewer
 */
public RefreshElementAction(CallHierarchyViewer viewer) {
	fViewer= viewer;
	setText(CallHierarchyMessages.RefreshSingleElementAction_text);
	setToolTipText(CallHierarchyMessages.RefreshSingleElementAction_tooltip);
	setDescription(CallHierarchyMessages.RefreshSingleElementAction_description);
	JavaPluginImages.setLocalImageDescriptors(this, "refresh.gif");//$NON-NLS-1$
	setActionDefinitionId(IWorkbenchCommandConstants.FILE_REFRESH);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_REFRESH_SINGLE_ELEMENT_ACTION);
	setEnabled(true);
}
 
Example #10
Source File: EditVariableEntryDialog.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected Control createDialogArea(Composite parent) {
	initializeDialogUnits(parent);
	Composite composite= (Composite) super.createDialogArea(parent);

	GridLayout layout= (GridLayout) composite.getLayout();
	layout.numColumns= 3;

	int widthHint= convertWidthInCharsToPixels(50);

	GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	gd.horizontalSpan= 3;

	// archive name field
	fFileNameField.doFillIntoGrid(composite, 4);
	LayoutUtil.setHorizontalSpan(fFileNameField.getLabelControl(null), 3);
	LayoutUtil.setWidthHint(fFileNameField.getTextControl(null), widthHint);
	LayoutUtil.setHorizontalGrabbing(fFileNameField.getTextControl(null));

	// label that shows the resolved path for variable jars
	//DialogField.createEmptySpace(composite, 1);
	fFullPathResolvedLabel= new CLabel(composite, SWT.LEFT);
	fFullPathResolvedLabel.setText(getResolvedLabelString());
	fFullPathResolvedLabel.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
	DialogField.createEmptySpace(composite, 2);


	fFileNameField.postSetFocusOnDialogField(parent.getDisplay());

	PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IJavaHelpContextIds.SOURCE_ATTACHMENT_BLOCK);
	applyDialogFont(composite);
	return composite;
}
 
Example #11
Source File: LocalHistoryActionGroup.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public LocalHistoryActionGroup(CompilationUnitEditor editor, String groupName) {
	Assert.isNotNull(groupName);
	fGroupName= groupName;
	fCompareWith= new JavaCompareWithEditionAction();
	fCompareWith.init(editor,
		CompareMessages.LocalHistoryActionGroup_action_compare_with,
		CompareMessages.LocalHistoryActionGroup_action_compare_with_title,
		CompareMessages.LocalHistoryActionGroup_action_compare_with_message);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(fCompareWith, IJavaHelpContextIds.COMPARE_WITH_HISTORY_ACTION);

	fReplaceWithPrevious= new JavaReplaceWithPreviousEditionAction();
	fReplaceWithPrevious.init(editor,
		CompareMessages.LocalHistoryActionGroup_action_replace_with_previous,
		CompareMessages.LocalHistoryActionGroup_action_replace_with_previous_title,
		CompareMessages.LocalHistoryActionGroup_action_replace_with_previous_message);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(fReplaceWithPrevious, IJavaHelpContextIds.REPLACE_WITH_PREVIOUS_FROM_HISTORY_ACTION);

	fReplaceWith= new JavaReplaceWithEditionAction();
	fReplaceWith.init(editor,
		CompareMessages.LocalHistoryActionGroup_action_replace_with,
		CompareMessages.LocalHistoryActionGroup_action_replace_with_title,
		CompareMessages.LocalHistoryActionGroup_action_replace_with_message);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(fReplaceWith, IJavaHelpContextIds.REPLACE_WITH_HISTORY_ACTION);

	fAddFrom= new JavaAddElementFromHistory();
	fAddFrom.init(editor,
		CompareMessages.LocalHistoryActionGroup_action_add,
		CompareMessages.LocalHistoryActionGroup_action_add_title,
		CompareMessages.LocalHistoryActionGroup_action_add_message);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(fAddFrom, IJavaHelpContextIds.ADD_FROM_HISTORY_ACTION);
}
 
Example #12
Source File: CreateSourceFolderAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private CreateSourceFolderAction(IWorkbenchSite site, ISetSelectionTarget selectionTarget, IRunnableContext context) {
	super(site, selectionTarget, BuildpathModifierAction.CREATE_FOLDER);

	setText(ActionMessages.OpenNewSourceFolderWizardAction_text2);
	setDescription(ActionMessages.OpenNewSourceFolderWizardAction_description);
	setToolTipText(ActionMessages.OpenNewSourceFolderWizardAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_TOOL_NEWPACKROOT);

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_SOURCEFOLDER_WIZARD_ACTION);
}
 
Example #13
Source File: ShowQualifiedTypeNamesAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public ShowQualifiedTypeNamesAction(ITypeHierarchyViewPart v, boolean initValue) {
	super(TypeHierarchyMessages.ShowQualifiedTypeNamesAction_label);
	setDescription(TypeHierarchyMessages.ShowQualifiedTypeNamesAction_description);
	setToolTipText(TypeHierarchyMessages.ShowQualifiedTypeNamesAction_tooltip);

	JavaPluginImages.setLocalImageDescriptors(this, "th_showqualified.gif"); //$NON-NLS-1$

	fView= v;
	setChecked(initValue);

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.SHOW_QUALIFIED_NAMES_ACTION);
}
 
Example #14
Source File: AddDelegateMethodsAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates a new <code>AddDelegateMethodsAction</code>. The action requires that
 * the selection provided by the site's selection provider is of type <code>
 * org.eclipse.jface.viewers.IStructuredSelection</code>.
 *
 * @param site the site providing context information for this action
 */
public AddDelegateMethodsAction(IWorkbenchSite site) {
	super(site);
	setText(ActionMessages.AddDelegateMethodsAction_label);
	setDescription(ActionMessages.AddDelegateMethodsAction_description);
	setToolTipText(ActionMessages.AddDelegateMethodsAction_tooltip);

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.ADD_DELEGATE_METHODS_ACTION);
}
 
Example #15
Source File: ToggleTextHoverAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Constructs and updates the action.
 */
public ToggleTextHoverAction() {
	super(JavaEditorMessages.getBundleForConstructedKeys(), "ToggleTextHover.", null); //$NON-NLS-1$
	JavaPluginImages.setToolImageDescriptors(this, "jdoc_hover_edit.gif"); //$NON-NLS-1$
	setActionDefinitionId(IJavaEditorActionDefinitionIds.TOGGLE_TEXT_HOVER);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.TOGGLE_TEXTHOVER_ACTION);
	update();
}
 
Example #16
Source File: JavaOutlinePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public ClassOnlyAction() {
	super();
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GO_INTO_TOP_LEVEL_TYPE_ACTION);
	setText(JavaEditorMessages.JavaOutlinePage_GoIntoTopLevelType_label);
	setToolTipText(JavaEditorMessages.JavaOutlinePage_GoIntoTopLevelType_tooltip);
	setDescription(JavaEditorMessages.JavaOutlinePage_GoIntoTopLevelType_description);
	JavaPluginImages.setLocalImageDescriptors(this, "gointo_toplevel_type.gif"); //$NON-NLS-1$

	IPreferenceStore preferenceStore= JavaPlugin.getDefault().getPreferenceStore();
	boolean showclass= preferenceStore.getBoolean("GoIntoTopLevelTypeAction.isChecked"); //$NON-NLS-1$
	setTopLevelTypeOnly(showclass);
}
 
Example #17
Source File: FindWriteReferencesInWorkingSetAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
void init() {
	setText(SearchMessages.Search_FindWriteReferencesInWorkingSetAction_label);
	setToolTipText(SearchMessages.Search_FindWriteReferencesInWorkingSetAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_WRITE_REFERENCES_IN_WORKING_SET_ACTION);
}
 
Example #18
Source File: HistoryAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public HistoryAction(CallHierarchyViewPart viewPart, IMember[] members) {
	super("", AS_RADIO_BUTTON); //$NON-NLS-1$
	fView= viewPart;
	fMembers= members;

	String elementName= getElementLabel(members);
	setText(elementName);
	setImageDescriptor(getImageDescriptor(members));

	setDescription(Messages.format(CallHierarchyMessages.HistoryAction_description, elementName));
	setToolTipText(Messages.format(CallHierarchyMessages.HistoryAction_tooltip, elementName));

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CALL_HIERARCHY_HISTORY_ACTION);
}
 
Example #19
Source File: ShowInheritedMembersAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates the action.
 * @param viewer the viewer
 * @param initValue the initial state
 */
public ShowInheritedMembersAction(MethodsViewer viewer, boolean initValue) {
	super(TypeHierarchyMessages.ShowInheritedMembersAction_label);
	setDescription(TypeHierarchyMessages.ShowInheritedMembersAction_description);
	setToolTipText(TypeHierarchyMessages.ShowInheritedMembersAction_tooltip);

	JavaPluginImages.setLocalImageDescriptors(this, "inher_co.gif"); //$NON-NLS-1$

	fMethodsViewer= viewer;

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.SHOW_INHERITED_ACTION);

	setChecked(initValue);
}
 
Example #20
Source File: OpenNewClassWizardAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates an instance of the <code>OpenNewClassWizardAction</code>.
 */
public OpenNewClassWizardAction() {
	setText(ActionMessages.OpenNewClassWizardAction_text);
	setDescription(ActionMessages.OpenNewClassWizardAction_description);
	setToolTipText(ActionMessages.OpenNewClassWizardAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_WIZBAN_NEWCLASS);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.OPEN_CLASS_WIZARD_ACTION);

	fPage= null;
	fOpenEditorOnFinish= true;
}
 
Example #21
Source File: ClearWorkingSetAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public ClearWorkingSetAction(WorkingSetFilterActionGroup actionGroup) {
	super(WorkingSetMessages.ClearWorkingSetAction_text);
	Assert.isNotNull(actionGroup);
	setToolTipText(WorkingSetMessages.ClearWorkingSetAction_toolTip);
	setEnabled(actionGroup.getWorkingSet() != null);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.CLEAR_WORKING_SET_ACTION);
	fActionGroup= actionGroup;
}
 
Example #22
Source File: FindReferencesInProjectAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
void init() {
	setText(SearchMessages.Search_FindReferencesInProjectAction_label);
	setToolTipText(SearchMessages.Search_FindReferencesInProjectAction_tooltip);
	setImageDescriptor(JavaPluginImages.DESC_OBJS_SEARCH_REF);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.FIND_REFERENCES_IN_PROJECT_ACTION);
}
 
Example #23
Source File: HistoryAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public HistoryAction(TypeHierarchyViewPart viewPart, IJavaElement[] elements) {
       super("", AS_RADIO_BUTTON); //$NON-NLS-1$
	fViewPart= viewPart;
	fElements= elements;

	String elementName= getElementLabel(elements);
	setText(elementName);
	setImageDescriptor(getImageDescriptor(elements[0]));

	setDescription(Messages.format(TypeHierarchyMessages.HistoryAction_description, elementName));
	setToolTipText(Messages.format(TypeHierarchyMessages.HistoryAction_tooltip, elementName));
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.HISTORY_ACTION);
}
 
Example #24
Source File: SortMembersAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates a new <code>SortMembersAction</code>. The action requires
 * that the selection provided by the site's selection provider is of type <code>
 * org.eclipse.jface.viewers.IStructuredSelection</code>.
 *
 * @param site the site providing context information for this action
 */
public SortMembersAction(IWorkbenchSite site) {
	super(site);
	setText(ActionMessages.SortMembersAction_label);
	setDescription(ActionMessages.SortMembersAction_description);
	setToolTipText(ActionMessages.SortMembersAction_tooltip);

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.SORT_MEMBERS_ACTION);
}
 
Example #25
Source File: PullUpMethodPage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public void createControl(final Composite parent) {
	final Composite composite= new Composite(parent, SWT.NONE);
	composite.setLayout(new GridLayout());

	createTreeAndSourceViewer(composite);
	createButtonComposite(composite);
	setControl(composite);

	Dialog.applyDialogFont(composite);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.PULL_UP_WIZARD_PAGE);
}
 
Example #26
Source File: AddSourceFolderWizardPage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private IFolder chooseFolder(String title, String message, IPath initialPath) {
	Class<?>[] acceptedClasses= new Class[] { IFolder.class };
	ISelectionStatusValidator validator= new TypedElementSelectionValidator(acceptedClasses, false);
	ViewerFilter filter= new TypedViewerFilter(acceptedClasses, null);

	ILabelProvider lp= new WorkbenchLabelProvider();
	ITreeContentProvider cp= new WorkbenchContentProvider();

	IProject currProject= fNewElement.getJavaProject().getProject();

	ElementTreeSelectionDialog dialog= new ElementTreeSelectionDialog(getShell(), lp, cp) {
		@Override
		protected Control createDialogArea(Composite parent) {
			Control result= super.createDialogArea(parent);
			PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.BP_CHOOSE_EXISTING_FOLDER_TO_MAKE_SOURCE_FOLDER);
			return result;
		}
	};
	dialog.setValidator(validator);
	dialog.setTitle(title);
	dialog.setMessage(message);
	dialog.addFilter(filter);
	dialog.setInput(currProject);
	dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
	IResource res= currProject.findMember(initialPath);
	if (res != null) {
		dialog.setInitialSelection(res);
	}

	if (dialog.open() == Window.OK) {
		return (IFolder) dialog.getFirstResult();
	}
	return null;
}
 
Example #27
Source File: MoveAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
/**
 * Creates a new <code>MoveAction</code>. The action requires
 * that the selection provided by the site's selection provider is of type <code>
 * org.eclipse.jface.viewers.IStructuredSelection</code>.
 *
 * @param site the site providing context information for this action
 */
public MoveAction(IWorkbenchSite site) {
	super(site);
	setText(RefactoringMessages.MoveAction_text);
	fMoveStaticMembersAction= new MoveStaticMembersAction(site);
	fMoveInstanceMethodAction= new MoveInstanceMethodAction(site);
	fReorgMoveAction= new ReorgMoveAction(site);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.MOVE_ACTION);
}
 
Example #28
Source File: RenamePackageWizard.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
protected RenameInputWizardPage createInputPage(String message, String initialSetting) {
	return new RenamePackageInputWizardPage(message, IJavaHelpContextIds.RENAME_PACKAGE_WIZARD_PAGE, initialSetting) {
		@Override
		protected RefactoringStatus validateTextField(String text) {
			return validateNewName(text);
		}
	};
}
 
Example #29
Source File: DeleteAction.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
public DeleteAction(IWorkbenchSite site) {
	super(site);
	setText(ReorgMessages.DeleteAction_3);
	setDescription(ReorgMessages.DeleteAction_4);
	ISharedImages workbenchImages= JavaPlugin.getDefault().getWorkbench().getSharedImages();
	setDisabledImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE_DISABLED));
	setImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
	setHoverImageDescriptor(workbenchImages.getImageDescriptor(ISharedImages.IMG_TOOL_DELETE));

	PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.DELETE_ACTION);
}
 
Example #30
Source File: ImportOrganizePreferencePage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void createControl(Composite parent) {
	IWorkbenchPreferenceContainer container= (IWorkbenchPreferenceContainer) getContainer();
	fConfigurationBlock= new ImportOrganizeConfigurationBlock(getNewStatusChangedListener(), getProject(), container);

	super.createControl(parent);
	PlatformUI.getWorkbench().getHelpSystem().setHelp(parent, IJavaHelpContextIds.ORGANIZE_IMPORTS_PREFERENCE_PAGE);
}