本文整理匯總了Java中org.eclipse.ui.dialogs.PreferencesUtil.createPropertyDialogOn方法的典型用法代碼示例。如果您正苦於以下問題:Java PreferencesUtil.createPropertyDialogOn方法的具體用法?Java PreferencesUtil.createPropertyDialogOn怎麽用?Java PreferencesUtil.createPropertyDialogOn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.ui.dialogs.PreferencesUtil
的用法示例。
在下文中一共展示了PreferencesUtil.createPropertyDialogOn方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
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();
}
示例2: run
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
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());
}
示例3: run
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
/**
* Run the command, displaying a new project properties dialog on the ZXTM
* settings page.
*/
/* Override */
public void run( ExecutionEvent event )
{
ZXTM currentZXTM = zxtm;
// No selection, check if the ZXTM Viewer has one currently.
if( currentZXTM == null ) {
ModelSelection currentSelection = ZXTMViewer.getSelectionForOpenViewer();
if( currentSelection != null && currentSelection.isOnlyOneZXTM() ) {
currentZXTM = currentSelection.firstZXTM();
}
}
if( currentZXTM == null ) {
return;
}
// Display the settings page.
IProject project = ZXTMProject.getProjectForZXTM( currentZXTM );
PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(
Display.getCurrent().getActiveShell(), project, Ids.RES_PREFS_ZXTM,
null, null
);
dialog.open();
}
示例4: typePageLinkActivated
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
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);
}
}
示例5: handle
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
@Override
public void handle() {
PreferenceDialog propertyDialog = PreferencesUtil.createPropertyDialogOn(getShell(),
requireSelection(ProjectSpace.class).getProject(), null, null, null);
if (propertyDialog != null) {
propertyDialog.open();
}
}
示例6: handleStatus
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
@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;
}
示例7: runAction
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
protected static void runAction(IBreakpoint breakpoint, IShellProvider shell) {
PreferenceDialog propertyDialog = PreferencesUtil.createPropertyDialogOn(
shell.getShell(), breakpoint, (String) null, (String[]) null, null);
propertyDialog.open();
}
示例8: doRun
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
@Override
public void doRun() throws StatusException {
PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(getShell(), getProject(),
getProjectConfigPropertyPage(), null, targetName);
dialog.open();
}
示例9: createContextMenu
import org.eclipse.ui.dialogs.PreferencesUtil; //導入方法依賴的package包/類
private void createContextMenu()
{
copyAction = new Action()
{
@Override
public void run()
{
if (selection.isEmpty()) return;
ObjectData data = (ObjectData) getSelection().getFirstElement();
setTemplate(getTemplateFromObject(ObjectUtil.clone(data)));
ClipboardUtil.toClipboard(selection);
}
};
copyAction.setText("Kopieren");
copyAction.setAccelerator(SWT.CONTROL | 'c');
copyAction.setImageDescriptor(getSharedImageDescriptor(ISharedImages.IMG_TOOL_COPY));
pasteAction = new Action()
{
@Override
public void run()
{
IStructuredSelection s = ClipboardUtil.fromClipboard();
if (s.isEmpty() || !(s.getFirstElement() instanceof ObjectData)) return;
selection = s;
}
};
pasteAction.setText("Einfügen");
pasteAction.setAccelerator(SWT.CONTROL | 'v');
pasteAction.setImageDescriptor(getSharedImageDescriptor(ISharedImages.IMG_TOOL_PASTE));
deleteAction = new Action()
{
@Override
public void run()
{
for(Object obj : selection.toArray())
{
int id = ((ObjectData) obj).id;
map.objects.remove(id);
}
setSelection(null);
}
};
deleteAction.setText("Entfernen");
deleteAction.setAccelerator(SWT.CONTROL | 'v');
deleteAction.setImageDescriptor(getSharedImageDescriptor(ISharedImages.IMG_TOOL_DELETE));
propertyAction = new Action()
{
@Override
public void run()
{
if (selection.isEmpty()) return;
ObjectData obj = (ObjectData) selection.getFirstElement();
if (obj == null) return;
ObjectAdapter adapter = new ObjectAdapter(editor.getProject(), obj);
PreferenceDialog dialog = PreferencesUtil.createPropertyDialogOn(
editor.getGLCanvas().getShell(), adapter, ObjectBasePropertyPage.ID, null, adapter);
if (dialog != null) dialog.open();
}
};
propertyAction.setText("Eigenschaften");
}