本文整理汇总了Java中com.intellij.ide.errorTreeView.NewErrorTreeViewPanel类的典型用法代码示例。如果您正苦于以下问题:Java NewErrorTreeViewPanel类的具体用法?Java NewErrorTreeViewPanel怎么用?Java NewErrorTreeViewPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NewErrorTreeViewPanel类属于com.intellij.ide.errorTreeView包,在下文中一共展示了NewErrorTreeViewPanel类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createAllErrorsPanel
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void createAllErrorsPanel() {
ApplicationManager.getApplication().assertIsDispatchThread();
if (myProjectErrorTreeViewPanel == null) {
final Ref<Content> contentRef = new Ref<>();
myProjectErrorTreeViewPanel = new JSGraphQLErrorTreeViewPanel(myProject, myHelpId, null, myActions) {
public void close() {
final NewErrorTreeViewPanel oldPanel = myProjectErrorTreeViewPanel;
myProjectErrorTreeViewPanel = null;
myToolWindow.hide(() -> {
Content content = contentRef.get();
if (content != null) {
myToolWindow.getContentManager().removeContent(content, true);
}
if (oldPanel != null) {
Disposer.dispose(oldPanel);
}
});
}
};
Disposer.register(myProject, myProjectErrorTreeViewPanel);
contentRef.set(new ContentImpl(myProjectErrorTreeViewPanel, "Project Errors", false));
myToolWindow.getContentManager().addContent(contentRef.get());
}
}
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:26,代码来源:JSGraphQLLanguageToolWindowManager.java
示例2: contentRemoved
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
@Override
public void contentRemoved(ContentManagerEvent event) {
final Content eventContent = event.getContent();
if (!eventContent.equals(myContent)) {
return;
}
myMessageView.getContentManager().removeContentManagerListener(this);
NewErrorTreeViewPanel errorTreeView = eventContent.getUserData(KEY);
if (errorTreeView != null) {
errorTreeView.dispose();
}
eventContent.putUserData(KEY, null);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:StdErrorReporter.java
示例3: setProcessController
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public synchronized void setProcessController(NewErrorTreeViewPanel.ProcessController processController) {
if (myErrorsView == null) {
myProcessController = processController;
} else {
myErrorsView.setProcessController(processController);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:MessageViewHelper.java
示例4: contentRemoved
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
@Override
public void contentRemoved(ContentManagerEvent event) {
final Content eventContent = event.getContent();
if (!eventContent.equals(myContent)) {
return;
}
myMessageView.getContentManager().removeContentManagerListener(this);
NewErrorTreeViewPanel errorTreeView = eventContent.getUserData(myKey);
if (errorTreeView != null) {
errorTreeView.dispose();
}
eventContent.putUserData(myKey, null);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:MessageViewHelper.java
示例5: openMessageView
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void openMessageView() {
if (myIndicator.isCanceled()) {
return;
}
Project project = getNotNullProject();
JComponent component;
synchronized (myMessageViewLock) {
if (myErrorTreeView != null) {
return;
}
//noinspection ConstantConditions
myErrorTreeView = new GradleBuildTreeViewPanel(project);
myErrorTreeView.setProcessController(new NewErrorTreeViewPanel.ProcessController() {
@Override
public void stopProcess() {
stopBuild();
}
@Override
public boolean isProcessStopped() {
return !myIndicator.isRunning();
}
});
component = myErrorTreeView.getComponent();
}
Content content = ContentFactory.SERVICE.getInstance().createContent(component, CONTENT_NAME, true);
content.putUserData(CONTENT_ID_KEY, myContentId);
MessageView messageView = getMessageView();
ContentManager contentManager = messageView.getContentManager();
contentManager.addContent(content);
myCloseListener.setContent(contentManager, content);
removeUnpinnedBuildMessages(getNotNullProject(), content);
contentManager.setSelectedContent(content);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:40,代码来源:GradleTasksExecutor.java
示例6: setActivePanel
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void setActivePanel(NewErrorTreeViewPanel panel, ToolWindow window) {
final Content[] contents = window.getContentManager().getContents();
for (Content content : contents) {
if (content.getComponent() == panel) {
window.getContentManager().setSelectedContent(content);
break;
}
}
show();
}
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:11,代码来源:JSGraphQLLanguageToolWindowManager.java
示例7: logErrorsImpl
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private static void logErrorsImpl(NewErrorTreeViewPanel errorTreeViewPanel, List<JSGraphQLErrorResult> list) {
errorTreeViewPanel.getErrorViewStructure().clear();
for (JSGraphQLErrorResult compilerResult : list) {
String path = compilerResult.myFileAbsoluteSystemDependPath;
VirtualFile file = null;
if (path != null) {
file = LocalFileSystem.getInstance().findFileByPath(FileUtil.toSystemIndependentName(path));
}
int category = "warning".equalsIgnoreCase(compilerResult.myCategory) ? MessageCategory.WARNING : MessageCategory.ERROR;
errorTreeViewPanel.addMessage(category, new String[]{compilerResult.myErrorText}, file, compilerResult.myLine, compilerResult.myColumn, null);
}
errorTreeViewPanel.updateTree();
}
开发者ID:jimkyndemeyer,项目名称:js-graphql-intellij-plugin,代码行数:14,代码来源:JSGraphQLLanguageToolWindowManager.java
示例8: process
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void process(Collection<UnityLogPostHandlerRequest> list)
{
UIUtil.invokeLaterIfNeeded(() ->
{
NewErrorTreeViewPanel panel = getOrInitPanel();
WolfTheProblemSolver solver = WolfTheProblemSolver.getInstance(myProject);
VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
for(UnityLogPostHandlerRequest request : list)
{
DotNetCompilerMessage message = UnityLogParser.extractFileInfo(myProject, request.condition);
int value = request.getMessageCategory();
if(message != null)
{
VirtualFile fileByUrl = message.getFileUrl() == null ? null : virtualFileManager.findFileByUrl(message.getFileUrl());
if(fileByUrl != null && value == MessageCategory.ERROR)
{
Problem problem = solver.convertToProblem(fileByUrl, message.getLine(), message.getColumn(), new String[]{message.getMessage()});
if(problem != null)
{
solver.reportProblems(fileByUrl, Collections.singletonList(problem));
}
}
panel.addMessage(value, new String[]{message.getMessage()}, fileByUrl, message.getLine() - 1, message.getColumn(), null);
}
else
{
panel.addMessage(value, new String[]{
request.condition,
request.stackTrace
}, null, -1, -1, null);
}
}
});
}
开发者ID:consulo,项目名称:consulo-unity3d,代码行数:39,代码来源:Unity3dConsoleToolWindowService.java
示例9: openMessageView
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void openMessageView() {
if (isHeadlessMode()) {
return;
}
if (myIndicator.isCanceled()) {
return;
}
final JComponent component;
synchronized (myMessageViewLock) {
if (myErrorTreeView != null) {
return;
}
myErrorTreeView = new CompilerErrorTreeView(
myProject,
myRestartWork
);
myErrorTreeView.setProcessController(new NewErrorTreeViewPanel.ProcessController() {
public void stopProcess() {
cancel();
}
public boolean isProcessStopped() {
return !myIndicator.isRunning();
}
});
component = myErrorTreeView.getComponent();
}
final MessageView messageView = MessageView.SERVICE.getInstance(myProject);
final Content content = ContentFactory.SERVICE.getInstance().createContent(component, myContentName, true);
content.putUserData(myContentIdKey, myContentId);
messageView.getContentManager().addContent(content);
myCloseListener.setContent(content, messageView.getContentManager());
removeAllContents(myProject, content);
messageView.getContentManager().setSelectedContent(content);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:39,代码来源:CompilerTask.java
示例10: contentRemoved
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public void contentRemoved(ContentManagerEvent event) {
final Content eventContent = event.getContent();
if (!eventContent.equals(myContent)) {
return;
}
myMessageView.getContentManager().removeContentManagerListener(this);
NewErrorTreeViewPanel errorTreeView = eventContent.getUserData(KEY);
if (errorTreeView != null) {
errorTreeView.dispose();
}
eventContent.putUserData(KEY, null);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:StdErrorReporter.java
示例11: contentRemoved
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public void contentRemoved(ContentManagerEvent event) {
final Content eventContent = event.getContent();
if (!eventContent.equals(myContent)) {
return;
}
myMessageView.getContentManager().removeContentManagerListener(this);
NewErrorTreeViewPanel errorTreeView = eventContent.getUserData(myKey);
if (errorTreeView != null) {
errorTreeView.dispose();
}
eventContent.putUserData(myKey, null);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:MessageViewHelper.java
示例12: openMessageView
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private void openMessageView() {
if (isHeadlessMode()) {
return;
}
if (myIndicator.isCanceled()) {
return;
}
final JComponent component;
synchronized (myMessageViewLock) {
if (myErrorTreeView != null) {
return;
}
myErrorTreeView = new CompilerErrorTreeView(
myProject,
myRestartWork
);
myErrorTreeView.setProcessController(new NewErrorTreeViewPanel.ProcessController() {
@Override
public void stopProcess() {
cancel();
}
@Override
public boolean isProcessStopped() {
return !myIndicator.isRunning();
}
});
component = myErrorTreeView.getComponent();
}
final MessageView messageView = MessageView.SERVICE.getInstance(myProject);
final Content content = ContentFactory.SERVICE.getInstance().createContent(component, myContentName, true);
CONTENT_ID_KEY.set(content, myContentId);
SESSION_ID_KEY.set(content, mySessionId);
messageView.getContentManager().addContent(content);
myCloseListener.setContent(content, messageView.getContentManager());
removeAllContents(myProject, content);
messageView.getContentManager().setSelectedContent(content);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:42,代码来源:CompilerTask.java
示例13: ExcludeFromCompileAction
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public ExcludeFromCompileAction(Project project, NewErrorTreeViewPanel errorTreeView) {
super(CompilerBundle.message("actions.exclude.from.compile.text"));
myProject = project;
myErrorTreeView = errorTreeView;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:ExcludeFromCompileAction.java
示例14: createView
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
protected ErrorTreeView createView(Project project) {
return new NewErrorTreeViewPanel(project, null);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:TestNewErrorViewAction.java
示例15: showCodeSmellErrors
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
@Override
public void showCodeSmellErrors(@NotNull final List<CodeSmellInfo> smellList) {
Collections.sort(smellList, new Comparator<CodeSmellInfo>() {
@Override
public int compare(final CodeSmellInfo o1, final CodeSmellInfo o2) {
return o1.getTextRange().getStartOffset() - o2.getTextRange().getStartOffset();
}
});
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
if (myProject.isDisposed()) return;
if (smellList.isEmpty()) {
return;
}
final VcsErrorViewPanel errorTreeView = new VcsErrorViewPanel(myProject);
AbstractVcsHelperImpl helper = (AbstractVcsHelperImpl)AbstractVcsHelper.getInstance(myProject);
helper.openMessagesView(errorTreeView, VcsBundle.message("code.smells.error.messages.tab.name"));
FileDocumentManager fileManager = FileDocumentManager.getInstance();
for (CodeSmellInfo smellInfo : smellList) {
final VirtualFile file = fileManager.getFile(smellInfo.getDocument());
final OpenFileDescriptor navigatable =
new OpenFileDescriptor(myProject, file, smellInfo.getStartLine(), smellInfo.getStartColumn());
final String exportPrefix = NewErrorTreeViewPanel.createExportPrefix(smellInfo.getStartLine() + 1);
final String rendererPrefix =
NewErrorTreeViewPanel.createRendererPrefix(smellInfo.getStartLine() + 1, smellInfo.getStartColumn() + 1);
if (smellInfo.getSeverity() == HighlightSeverity.ERROR) {
errorTreeView.addMessage(MessageCategory.ERROR, new String[]{smellInfo.getDescription()}, file.getPresentableUrl(), navigatable,
exportPrefix, rendererPrefix, null);
}
else {//if (smellInfo.getSeverity() == HighlightSeverity.WARNING) {
errorTreeView.addMessage(MessageCategory.WARNING, new String[]{smellInfo.getDescription()}, file.getPresentableUrl(),
navigatable, exportPrefix, rendererPrefix, null);
}
}
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:45,代码来源:CodeSmellDetectorImpl.java
示例16: StdErrorReporter
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public StdErrorReporter(ValidateXmlActionHandler handler, Project project, Runnable rerunAction) {
super(handler);
myProject = project;
myErrorsView = new NewErrorTreeViewPanel(project, null, true, true, rerunAction);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:StdErrorReporter.java
示例17: MessageViewHelper
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public MessageViewHelper(Project project, String contentName, Key<NewErrorTreeViewPanel> key) {
myProject = project;
myContentName = contentName;
myKey = key;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MessageViewHelper.java
示例18: CloseListener
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
public CloseListener(Content content, String contentName, NewErrorTreeViewPanel errorsView) {
myContent = content;
myContentName = contentName;
myErrorsView = errorsView;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MessageViewHelper.java
示例19: MyContentDisposer
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
MyContentDisposer(final Content content, final MessageView messageView, Key<NewErrorTreeViewPanel> key) {
myContent = content;
myMessageView = messageView;
myKey = key;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:MessageViewHelper.java
示例20: doRun
import com.intellij.ide.errorTreeView.NewErrorTreeViewPanel; //导入依赖的package包/类
private static void doRun(final Project project, final VirtualFile instanceFile, final VirtualFile schemaFile) {
saveFiles(instanceFile, schemaFile);
final MessageViewHelper helper = new MessageViewHelper(project, CONTENT_NAME, KEY);
helper.openMessageView(new Runnable() {
@Override
public void run() {
doRun(project, instanceFile, schemaFile);
}
});
final Future<?> future = ApplicationManager.getApplication().executeOnPooledThread(new Runnable() {
@Override
public void run() {
ApplicationManager.getApplication().runReadAction(new Runnable() {
@Override
public void run() {
final MessageViewHelper.ErrorHandler eh = helper.new ErrorHandler();
instanceFile.putUserData(IN_PROGRESS_KEY, Boolean.TRUE);
try {
doValidation(instanceFile, schemaFile, eh);
} finally {
instanceFile.putUserData(IN_PROGRESS_KEY, null);
}
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
if (!eh.hadErrorOrWarning()) {
SwingUtilities.invokeLater(
new Runnable() {
@Override
public void run() {
helper.close();
WindowManager.getInstance().getStatusBar(project).setInfo("No errors detected");
}
}
);
}
}
}
);
}
});
}
});
helper.setProcessController(new NewErrorTreeViewPanel.ProcessController() {
@Override
public void stopProcess() {
future.cancel(true);
}
@Override
public boolean isProcessStopped() {
return future.isDone();
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:63,代码来源:ValidateAction.java
注:本文中的com.intellij.ide.errorTreeView.NewErrorTreeViewPanel类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论