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


Java DialogBuilder.setHelpId方法代码示例

本文整理汇总了Java中com.intellij.openapi.ui.DialogBuilder.setHelpId方法的典型用法代码示例。如果您正苦于以下问题:Java DialogBuilder.setHelpId方法的具体用法?Java DialogBuilder.setHelpId怎么用?Java DialogBuilder.setHelpId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.openapi.ui.DialogBuilder的用法示例。


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

示例1: showDialog

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private static void showDialog(MergeRequestImpl data) {
  if (LOG.isDebugEnabled()) {
    LOG.debug("MergeTool - dialog");
  }
  DialogBuilder builder = new DialogBuilder(data.getProject());
  builder.setDimensionServiceKey(data.getGroupKey());
  builder.setTitle(data.getWindowTitle());
  Disposable parent = Disposer.newDisposable();
  builder.addDisposable(parent);
  MergePanel2 mergePanel = createMergeComponent(data, builder, parent);
  builder.setCenterPanel(mergePanel.getComponent());
  builder.setPreferredFocusComponent(mergePanel.getPreferredFocusedComponent());
  builder.setHelpId(data.getHelpId());
  int result = builder.show();
  MergeRequestImpl lastData = mergePanel.getMergeRequest();
  if (lastData != null) {
    lastData.setResult(result);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:MergeTool.java

示例2: showDialog

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private boolean showDialog() {
  DialogBuilder builder = new DialogBuilder(myBuildFile.getProject());
  builder.setCenterPanel(myForm.myWholePanel);
  builder.setDimensionServiceKey(DIMENSION_SERVICE_KEY);
  builder.setPreferredFocusComponent(myForm.getPreferedFocusComponent());
  builder.setTitle(AntBundle.message("build.file.properties.dialog.title"));
  builder.removeAllActions();
  builder.addOkAction();
  builder.addCancelAction();
  builder.setHelpId("reference.dialogs.buildfileproperties");

  boolean isOk = builder.show() == DialogWrapper.OK_EXIT_CODE;
  if (isOk) {
    apply();
  }
  beforeClose();
  return isOk;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:BuildFilePropertiesPanel.java

示例3: showInjectionUI

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private static BaseInjection showInjectionUI(final Project project, final MethodParameterInjection methodParameterInjection) {
  final AbstractInjectionPanel panel = new MethodParameterPanel(methodParameterInjection, project);
  panel.reset();
  final DialogBuilder builder = new DialogBuilder(project);
  builder.setHelpId("reference.settings.injection.language.injection.settings.java.parameter");
  builder.addOkAction();
  builder.addCancelAction();
  builder.setCenterPanel(panel.getComponent());
  builder.setTitle(EditInjectionSettingsAction.EDIT_INJECTION_TITLE);
  builder.setOkOperation(new Runnable() {
    public void run() {
      panel.apply();
      builder.getDialogWrapper().close(DialogWrapper.OK_EXIT_CODE);
    }
  });
  if (builder.show() == DialogWrapper.OK_EXIT_CODE) {
    return new BaseInjection(methodParameterInjection.getSupportId()).copyFrom(methodParameterInjection);
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JavaLanguageInjectionSupport.java

示例4: showDialog

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private static void showDialog(MergeRequestImpl data) {
  DialogBuilder builder = new DialogBuilder(data.getProject());
  builder.setDimensionServiceKey(data.getGroupKey());
  builder.setTitle(data.getWindowTitle());
  Disposable parent = Disposer.newDisposable();
  builder.addDisposable(parent);
  MergePanel2 mergePanel = createMergeComponent(data, builder, parent);
  builder.setCenterPanel(mergePanel.getComponent());
  builder.setPreferredFocusComponent(mergePanel.getPreferredFocusedComponent());
  builder.setHelpId(data.getHelpId());
  int result = builder.show();
  MergeRequestImpl lastData = mergePanel.getMergeRequest();
  if (lastData != null) {
    lastData.setResult(result);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:MergeTool.java

示例5: showDialog

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
private boolean showDialog()
{
	DialogBuilder builder = new DialogBuilder(myBuildFile.getProject());
	builder.setCenterPanel(myForm.myWholePanel);
	builder.setDimensionServiceKey(DIMENSION_SERVICE_KEY);
	builder.setPreferredFocusComponent(myForm.getPreferedFocusComponent());
	builder.setTitle(AntBundle.message("build.file.properties.dialog.title"));
	builder.removeAllActions();
	builder.addOkAction();
	builder.addCancelAction();
	builder.setHelpId("reference.dialogs.buildfileproperties");

	boolean isOk = builder.show() == DialogWrapper.OK_EXIT_CODE;
	if(isOk)
	{
		apply();
	}
	beforeClose();
	return isOk;
}
 
开发者ID:consulo,项目名称:consulo-apache-ant,代码行数:21,代码来源:BuildFilePropertiesPanel.java

示例6: process

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
@Override
public boolean process(final VirtualFile file, final Document document) {
  String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());

  final DialogBuilder builder = new DialogBuilder();
  builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
  builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
  builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
  builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      final ProjectEx project = (ProjectEx)ProjectLocator.getInstance().guessProjectForFile(file);

      FileType fileType = file.getFileType();
      String fsContent = LoadTextUtil.loadText(file).toString();
      DocumentContent content1 = DiffContentFactory.getInstance().create(fsContent, fileType);
      DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);
      String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
      String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");
      String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");
      DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);
      request.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
      DialogBuilder diffBuilder = new DialogBuilder(project);
      DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());
      diffPanel.setRequest(request);
      diffBuilder.setCenterPanel(diffPanel.getComponent());
      diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
      diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
      diffBuilder.addCancelAction();
      diffBuilder.setTitle(title);
      if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
        builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
      }
    }
  });
  builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
  builder.setButtonsAlignment(SwingConstants.CENTER);
  builder.setHelpId("reference.dialogs.fileCacheConflict");
  return builder.show() == 0;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:41,代码来源:FileDocumentManagerImpl.java

示例7: showDefaultInjectionUI

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
@Nullable
protected static BaseInjection showDefaultInjectionUI(final Project project, BaseInjection injection) {
  final BaseInjectionPanel panel = new BaseInjectionPanel(injection, project);
  panel.reset();
  final DialogBuilder builder = new DialogBuilder(project);
  LanguageInjectionSupport support = InjectorUtils.findInjectionSupport(injection.getSupportId());
  if (support instanceof AbstractLanguageInjectionSupport) {
    builder.setHelpId(((AbstractLanguageInjectionSupport)support).getHelpId());
  }
  builder.addOkAction();
  builder.addCancelAction();
  builder.setDimensionServiceKey("#org.intellij.plugins.intelliLang.inject.config.ui.BaseInjectionDialog");
  builder.setCenterPanel(panel.getComponent());
  builder.setTitle(EditInjectionSettingsAction.EDIT_INJECTION_TITLE);
  builder.setOkOperation(new Runnable() {
    public void run() {
      try {
        panel.apply();
        builder.getDialogWrapper().close(DialogWrapper.OK_EXIT_CODE);
      }
      catch (Exception e) {
        final Throwable cause = e.getCause();
        final String message = e.getMessage() + (cause != null? "\n  "+cause.getMessage():"");
        Messages.showErrorDialog(project, message, "Unable to Save");
      }
    }
  });
  if (builder.show() == DialogWrapper.OK_EXIT_CODE) {
    return injection;
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:AbstractLanguageInjectionSupport.java

示例8: showDefaultInjectionUI

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
@Nullable
protected static BaseInjection showDefaultInjectionUI(final Project project, BaseInjection injection) {
  final BaseInjectionPanel panel = new BaseInjectionPanel(injection, project);
  panel.reset();
  final DialogBuilder builder = new DialogBuilder(project);
  LanguageInjectionSupport support = InjectorUtils.findInjectionSupport(injection.getSupportId());
  if (support != null && support instanceof AbstractLanguageInjectionSupport) {
    builder.setHelpId(((AbstractLanguageInjectionSupport)support).getHelpId());
  }
  builder.addOkAction();
  builder.addCancelAction();
  builder.setDimensionServiceKey("#org.intellij.plugins.intelliLang.inject.config.ui.BaseInjectionDialog");
  builder.setCenterPanel(panel.getComponent());
  builder.setTitle(EditInjectionSettingsAction.EDIT_INJECTION_TITLE);
  builder.setOkOperation(new Runnable() {
    public void run() {
      try {
        panel.apply();
        builder.getDialogWrapper().close(DialogWrapper.OK_EXIT_CODE);
      }
      catch (Exception e) {
        final Throwable cause = e.getCause();
        final String message = e.getMessage() + (cause != null? "\n  "+cause.getMessage():"");
        Messages.showErrorDialog(project, message, "Unable to Save");
      }
    }
  });
  if (builder.show() == DialogWrapper.OK_EXIT_CODE) {
    return injection;
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:33,代码来源:AbstractLanguageInjectionSupport.java

示例9: askReloadFromDisk

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
public boolean askReloadFromDisk(VirtualFile file, Document document) {
  String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());

  final DialogBuilder builder = new DialogBuilder();
  builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
  builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
  builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
  builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      final ProjectEx project = (ProjectEx)ProjectLocator.getInstance().guessProjectForFile(file);

      FileType fileType = file.getFileType();
      String fsContent = LoadTextUtil.loadText(file).toString();
      DocumentContent content1 = DiffContentFactory.getInstance().create(project, fsContent, fileType);
      DocumentContent content2 = DiffContentFactory.getInstance().create(project, document, file);
      String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
      String title1 = UIBundle.message("file.cache.conflict.diff.content.file.system.content");
      String title2 = UIBundle.message("file.cache.conflict.diff.content.memory.content");
      DiffRequest request = new SimpleDiffRequest(title, content1, content2, title1, title2);
      request.putUserData(DiffUserDataKeys.GO_TO_SOURCE_DISABLE, true);
      DialogBuilder diffBuilder = new DialogBuilder(project);
      DiffRequestPanel diffPanel = DiffManager.getInstance().createRequestPanel(project, diffBuilder, diffBuilder.getWindow());
      diffPanel.setRequest(request);
      diffBuilder.setCenterPanel(diffPanel.getComponent());
      diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
      diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
      diffBuilder.addCancelAction();
      diffBuilder.setTitle(title);
      if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
        builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
      }
    }
  });
  builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
  builder.setButtonsAlignment(SwingConstants.CENTER);
  builder.setHelpId("reference.dialogs.fileCacheConflict");
  return builder.show() == 0;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:40,代码来源:MemoryDiskConflictResolver.java

示例10: askReloadFromDisk

import com.intellij.openapi.ui.DialogBuilder; //导入方法依赖的package包/类
protected boolean askReloadFromDisk(final VirtualFile file, final Document document) {
  ApplicationManager.getApplication().assertIsDispatchThread();
  if (!isDocumentUnsaved(document)) return true;

  String message = UIBundle.message("file.cache.conflict.message.text", file.getPresentableUrl());
  if (ApplicationManager.getApplication().isUnitTestMode()) throw new RuntimeException(message);
  final DialogBuilder builder = new DialogBuilder((Project)null);
  builder.setCenterPanel(new JLabel(message, Messages.getQuestionIcon(), SwingConstants.CENTER));
  builder.addOkAction().setText(UIBundle.message("file.cache.conflict.load.fs.changes.button"));
  builder.addCancelAction().setText(UIBundle.message("file.cache.conflict.keep.memory.changes.button"));
  builder.addAction(new AbstractAction(UIBundle.message("file.cache.conflict.show.difference.button")) {
    @Override
    public void actionPerformed(ActionEvent e) {
      String title = UIBundle.message("file.cache.conflict.for.file.dialog.title", file.getPresentableUrl());
      final ProjectEx project = (ProjectEx)ProjectLocator.getInstance().guessProjectForFile(file);

      SimpleDiffRequest request = new SimpleDiffRequest(project, title);
      FileType fileType = file.getFileType();
      String fsContent = LoadTextUtil.loadText(file).toString();
      request.setContents(new SimpleContent(fsContent, fileType),
                          new DocumentContent(project, document, fileType));
      request.setContentTitles(UIBundle.message("file.cache.conflict.diff.content.file.system.content"),
                               UIBundle.message("file.cache.conflict.diff.content.memory.content"));
      DialogBuilder diffBuilder = new DialogBuilder(project);
      DiffPanelImpl diffPanel = (DiffPanelImpl)DiffManager.getInstance().createDiffPanel(diffBuilder.getWindow(), project, diffBuilder, null);
      diffPanel.getOptions().setShowSourcePolicy(DiffPanelOptions.ShowSourcePolicy.DONT_SHOW);
      diffBuilder.setCenterPanel(diffPanel.getComponent());
      diffBuilder.setDimensionServiceKey("FileDocumentManager.FileCacheConflict");
      diffPanel.setDiffRequest(request);
      diffBuilder.addOkAction().setText(UIBundle.message("file.cache.conflict.save.changes.button"));
      diffBuilder.addCancelAction();
      diffBuilder.setTitle(title);
      if (diffBuilder.show() == DialogWrapper.OK_EXIT_CODE) {
        builder.getDialogWrapper().close(DialogWrapper.CANCEL_EXIT_CODE);
      }
    }
  });
  builder.setTitle(UIBundle.message("file.cache.conflict.dialog.title"));
  builder.setButtonsAlignment(SwingConstants.CENTER);
  builder.setHelpId("reference.dialogs.fileCacheConflict");
  return builder.show() == 0;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:43,代码来源:FileDocumentManagerImpl.java


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