mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-60680: Map help buttons to each tab of the Artifacts page
This commit is contained in:
+1
-1
@@ -98,7 +98,7 @@ public class ArtifactConfigurable extends ProjectStructureElementConfigurable<Ar
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
return "reference.settingsdialog.project.structure.artifacts";
|
||||
return myEditor.getHelpTopic();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+9
@@ -483,6 +483,15 @@ public class ArtifactEditorImpl implements ArtifactEditorEx {
|
||||
myShowSpecificContentOptionsButton = new FixedSizeButton(16);
|
||||
}
|
||||
|
||||
public String getHelpTopic() {
|
||||
final int tab = myTabbedPane.getSelectedIndex();
|
||||
if (tab == 0) {
|
||||
return "reference.project.structure.artifacts.output";
|
||||
}
|
||||
String helpId = ArtifactPropertiesEditors.getHelpId(myTabbedPane.getSelectedTitle());
|
||||
return helpId != null ? helpId : "reference.settingsdialog.project.structure.artifacts";
|
||||
}
|
||||
|
||||
private class MyDataProvider implements TypeSafeDataProvider {
|
||||
public void calcData(DataKey key, DataSink sink) {
|
||||
if (ARTIFACTS_EDITOR_KEY.equals(key)) {
|
||||
|
||||
+15
@@ -24,6 +24,7 @@ import com.intellij.packaging.impl.artifacts.ArtifactUtil;
|
||||
import com.intellij.packaging.ui.ArtifactEditorContext;
|
||||
import com.intellij.packaging.ui.ArtifactPropertiesEditor;
|
||||
import com.intellij.ui.TabbedPaneWrapper;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.util.*;
|
||||
@@ -105,6 +106,20 @@ public class ArtifactPropertiesEditors {
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public static String getHelpId(String title) {
|
||||
if (ArtifactPropertiesEditor.VALIDATION_TAB.equals(title)) {
|
||||
return "reference.project.structure.artifacts.validation";
|
||||
}
|
||||
else if (ArtifactPropertiesEditor.PRE_PROCESSING_TAB.equals(title)) {
|
||||
return "reference.project.structure.artifacts.preprocessing";
|
||||
}
|
||||
else if (ArtifactPropertiesEditor.POST_PROCESSING_TAB.equals(title)) {
|
||||
return "reference.project.structure.artifacts.postprocessing";
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private class PropertiesEditorInfo {
|
||||
private final ArtifactPropertiesEditor myEditor;
|
||||
private final ArtifactProperties<?> myProperties;
|
||||
|
||||
Reference in New Issue
Block a user