From 712dcbce52d4dc806c7a622b53f1fe6805ff7bcc Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 5 Jul 2013 12:21:48 +0200 Subject: [PATCH] elements inspector: we must use node id instead of css selector to highlight node --- .../preview/ElementPreviewProvider.java | 15 +++++++++++++++ .../codeInsight/preview/PreviewHintProvider.java | 3 +-- .../ide/impl/StructureViewSelectInTarget.java | 1 + .../src/com/intellij/ide/SelectInContext.java | 2 +- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/platform/lang-api/src/com/intellij/codeInsight/preview/ElementPreviewProvider.java b/platform/lang-api/src/com/intellij/codeInsight/preview/ElementPreviewProvider.java index 376362751777..94d98c1d2402 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/preview/ElementPreviewProvider.java +++ b/platform/lang-api/src/com/intellij/codeInsight/preview/ElementPreviewProvider.java @@ -1,3 +1,18 @@ +/* + * Copyright 2000-2013 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.intellij.codeInsight.preview; import com.intellij.openapi.editor.Editor; diff --git a/platform/lang-api/src/com/intellij/codeInsight/preview/PreviewHintProvider.java b/platform/lang-api/src/com/intellij/codeInsight/preview/PreviewHintProvider.java index 9fbaf90926b0..9af51d850216 100644 --- a/platform/lang-api/src/com/intellij/codeInsight/preview/PreviewHintProvider.java +++ b/platform/lang-api/src/com/intellij/codeInsight/preview/PreviewHintProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2013 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -13,7 +13,6 @@ * See the License for the specific language governing permissions and * limitations under the License. */ - package com.intellij.codeInsight.preview; import com.intellij.openapi.extensions.ExtensionPointName; diff --git a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewSelectInTarget.java b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewSelectInTarget.java index 5298efb949b4..ba704b9a4a83 100644 --- a/platform/lang-impl/src/com/intellij/ide/impl/StructureViewSelectInTarget.java +++ b/platform/lang-impl/src/com/intellij/ide/impl/StructureViewSelectInTarget.java @@ -48,6 +48,7 @@ public class StructureViewSelectInTarget implements SelectInTarget { @Override public void selectIn(final SelectInContext context, final boolean requestFocus) { + @SuppressWarnings("ConstantConditions") final FileEditor fileEditor = context.getFileEditorProvider().openFileEditor(); StructureViewWrapper customStructureView = CUSTOM_STRUCTURE_VIEW_KEY.get(context.getVirtualFile()); diff --git a/platform/platform-api/src/com/intellij/ide/SelectInContext.java b/platform/platform-api/src/com/intellij/ide/SelectInContext.java index 2568e95ed1c9..6b4075d6617b 100644 --- a/platform/platform-api/src/com/intellij/ide/SelectInContext.java +++ b/platform/platform-api/src/com/intellij/ide/SelectInContext.java @@ -40,4 +40,4 @@ public interface SelectInContext { @Nullable FileEditorProvider getFileEditorProvider(); -} +} \ No newline at end of file