Java Code Examples for org.eclipse.ui.dialogs.PreferencesUtil#createPropertyDialogOn()

The following examples show how to use org.eclipse.ui.dialogs.PreferencesUtil#createPropertyDialogOn() . 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: ConfigureProjectSdkMarkerResolution.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 5 votes vote down vote up
public void run(final IMarker marker) {
  PreferenceDialog page = PreferencesUtil.createPropertyDialogOn(
      CorePlugin.getDefault().getWorkbench().getActiveWorkbenchWindow().getShell(),
      marker.getResource().getProject(), projectPropertyPageID,
      new String[] {projectPropertyPageID}, null);

  page.open();
}
 
Example 2
Source File: AbstractProjectPropertiesAction.java    From gwt-eclipse-plugin with Eclipse Public License 1.0 5 votes vote down vote up
public void run(IAction action) {
  Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();

  if (resource != null && resource.getType() == IResource.PROJECT) {
    PreferenceDialog page = PreferencesUtil.createPropertyDialogOn(shell,
        resource, propertiesPageID, null, null);
    if (page != null) {
      page.open();
      return;
    }
  }

  CorePluginLog.logError("Could not create project properties dialog for resource "
      + resource.toString());
}
 
Example 3
Source File: NewTypeWizardPage.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 5 votes vote down vote up
private void typePageLinkActivated() {
	IJavaProject project= getJavaProject();
	if (project != null) {
		PreferenceDialog dialog= PreferencesUtil.createPropertyDialogOn(getShell(), project.getProject(), CodeTemplatePreferencePage.PROP_ID, null, null);
		dialog.open();
	} else {
		String title= NewWizardMessages.NewTypeWizardPage_configure_templates_title;
		String message= NewWizardMessages.NewTypeWizardPage_configure_templates_message;
		MessageDialog.openInformation(getShell(), title, message);
	}
}
 
Example 4
Source File: EngineStatusHandler.java    From thym with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public Object handleStatus(IStatus status, Object source)
		throws CoreException {
	HybridMobileStatus  hs = (HybridMobileStatus) status;
	
	final boolean open = MessageDialog.openQuestion(AbstractStatusHandler.getShell(), "Missing or incomplete Hybrid Mobile Engine", 
			NLS.bind("{0} \n\nWould you like to modify Hybrid Mobile Engine preferences to correct this issue?",hs.getMessage() ));
	
	if(open){
		PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(getShell(), hs.getProject(), 
				EnginePropertyPage.PAGE_ID, new String[]{EnginePropertyPage.PAGE_ID}, null);
		return (dialog != null && dialog.open() == Window.OK)? Boolean.TRUE: Boolean.FALSE; 
	}
	return Boolean.FALSE;
}
 
Example 5
Source File: NoSdkDefinedResolutionGenerator.java    From xds-ide with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void run(IMarker marker) {
	PreferenceDialog dlg = PreferencesUtil.createPropertyDialogOn(null, marker.getResource(), ModulaProjectPreferencePage.ID, null, null);
	dlg.open();
}
 
Example 6
Source File: BuildTargetsActionGroup.java    From goclipse with Eclipse Public License 1.0 4 votes vote down vote up
@Override
public void doRun() throws StatusException {
	PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(getShell(), getProject(), 
		getProjectConfigPropertyPage(), null, targetName);
	dialog.open();
}