From b2e9b3ce4682afa52720aadeb8a7b24f097a0e44 Mon Sep 17 00:00:00 2001 From: Groboclown Date: Tue, 20 Jun 2017 17:04:20 -0500 Subject: [PATCH] Cleanup before 0.9.2 release. --- CHANGES.md | 5 +- plugin/META-INF/plugin.xml | 9 +- .../groboclown/idea/p4ic/P4Bundle.properties | 5 +- .../p4ic/swarm/SwarmConnectionComponent.java | 2 +- .../idea/p4ic/ui/RevertedFilesDialog.java | 24 +- .../idea/p4ic/ui/checkin/P4SubmitPanel.java | 22 ++ .../ui/config/ResolvedPropertiesPanel.form | 81 +++--- .../ui/config/ResolvedPropertiesPanel.java | 272 +++++++++++------- .../ui/config/props/ConfigStackPanel.java | 2 +- 9 files changed, 279 insertions(+), 143 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 5c58ed9b..3f6e1679 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ ### Overview * Started Helix Swarm integration. +* Minor improvements to the configuration panel. * Bug fixes. ### Details @@ -14,13 +15,15 @@ * The beginnings of Helix Swarm server integration is present in the code. It checks whether the Perforce server has a Swarm server registered with it, and will attempt to make a connection to the registered Swarm servers. -* Bug fixes. +* Minor improvements to the configuration panel. * Changed (again) the method for looking up the directory path for different configurations. Configurations now can be associated with the VCS roots, rather than the project root. This means that file location configurations will mark themselves as the directory where the file is located (or up to the VCS roots); future work may include a "global" file location vs. a local file location. (#148) + * Joined problems and resolved properties into a single panel. +* Bug fixes. * Fixed the pop-up link text no longer show an invalid character. * Added a minor improvement that limits the number of duplicate "enter a password" error messages in some circumstances. diff --git a/plugin/META-INF/plugin.xml b/plugin/META-INF/plugin.xml index 053dbbe4..2f68afa9 100644 --- a/plugin/META-INF/plugin.xml +++ b/plugin/META-INF/plugin.xml @@ -8,7 +8,14 @@
  1. 0.9.2
      -
    1. Fixed the pop-up link text no longer show an invalid character.
    2. +
    3. Started Helix Swarm integration.
    4. +
    5. Minor improvements to the configuration panel.
    6. +
    7. Changed (again) the method for looking up the directory path for different + configurations. Configurations now can be associated with the VCS roots, + rather than the project root.
    8. +
    9. Added a minor improvement that limits the number of duplicate "enter a password" + error messages in some circumstances.
    10. +
    11. Dead code clean up.
  2. 0.9.1 diff --git a/plugin/src/net/groboclown/idea/p4ic/P4Bundle.properties b/plugin/src/net/groboclown/idea/p4ic/P4Bundle.properties index 37dd47cb..d7bf6aa8 100644 --- a/plugin/src/net/groboclown/idea/p4ic/P4Bundle.properties +++ b/plugin/src/net/groboclown/idea/p4ic/P4Bundle.properties @@ -484,4 +484,7 @@ user-prefs.show-shelved=Show shel&ved files user-prefs.show-shelved.tooltip=Show the shelved files in the changelist view shelve.changes.action=Shelve changes to server action.shelve=Shelve open files -configpart.no.roots=No VCS roots for project, and no root defined for part \ No newline at end of file +configpart.no.roots=No VCS roots for project, and no root defined for part +config.resolved.problem-panel=Problems: +config.resolved.config-panel=Resolved Configuration: +config.resolve.other-roots-have-errors=Other root directories have problems. \ No newline at end of file diff --git a/plugin/src/net/groboclown/idea/p4ic/swarm/SwarmConnectionComponent.java b/plugin/src/net/groboclown/idea/p4ic/swarm/SwarmConnectionComponent.java index 87302f2c..e3a8d83f 100644 --- a/plugin/src/net/groboclown/idea/p4ic/swarm/SwarmConnectionComponent.java +++ b/plugin/src/net/groboclown/idea/p4ic/swarm/SwarmConnectionComponent.java @@ -93,7 +93,7 @@ public void refreshSwarmConfigsFor(@NotNull Project project) { final SwarmConfig config = server.createSwarmConfig(); if (config != null) { LOG.info("Trying Swarm Server " + config.getUri() + "; username " + - config.getUsername() + "; ticket " + config.getTicket()); + config.getUsername()); final SwarmClient client = SwarmClientFactory.createSwarmClient(config); validClients.put(server.getClientServerId(), client); LOG.info("Found valid swarm server: " + config); diff --git a/plugin/src/net/groboclown/idea/p4ic/ui/RevertedFilesDialog.java b/plugin/src/net/groboclown/idea/p4ic/ui/RevertedFilesDialog.java index a407df16..3ba7cc5d 100644 --- a/plugin/src/net/groboclown/idea/p4ic/ui/RevertedFilesDialog.java +++ b/plugin/src/net/groboclown/idea/p4ic/ui/RevertedFilesDialog.java @@ -107,6 +107,28 @@ private List exceptionDisplay(@NotNull final Collection return ret; } + /** + * @noinspection ALL + */ + private Font getFont1494608681498(String fontName, int style, int size, Font currentFont) { + if (currentFont == null) { + return null; + } + String resultName; + if (fontName == null) { + resultName = currentFont.getName(); + } else { + Font testFont = new Font(fontName, Font.PLAIN, 10); + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { + resultName = fontName; + } else { + resultName = currentFont.getName(); + } + } + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), + size >= 0 ? size : currentFont.getSize()); + } + /** * Method generated by IntelliJ IDEA GUI Designer * >>> IMPORTANT!! <<< @@ -210,7 +232,7 @@ private List exceptionDisplay(@NotNull final Collection /** * @noinspection ALL */ - private Font getFont1494608681498(String fontName, int style, int size, Font currentFont) { + private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { if (currentFont == null) { return null; } diff --git a/plugin/src/net/groboclown/idea/p4ic/ui/checkin/P4SubmitPanel.java b/plugin/src/net/groboclown/idea/p4ic/ui/checkin/P4SubmitPanel.java index 59890e14..c2f6275b 100644 --- a/plugin/src/net/groboclown/idea/p4ic/ui/checkin/P4SubmitPanel.java +++ b/plugin/src/net/groboclown/idea/p4ic/ui/checkin/P4SubmitPanel.java @@ -431,6 +431,28 @@ private Font getFont1494608681498(String fontName, int style, int size, Font cur label2.setLabelFor(myJobStatus); } + /** + * @noinspection ALL + */ + private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { + if (currentFont == null) { + return null; + } + String resultName; + if (fontName == null) { + resultName = currentFont.getName(); + } else { + Font testFont = new Font(fontName, Font.PLAIN, 10); + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { + resultName = fontName; + } else { + resultName = currentFont.getName(); + } + } + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), + size >= 0 ? size : currentFont.getSize()); + } + /** * @noinspection ALL */ diff --git a/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.form b/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.form index eda2cd42..29bc12d2 100644 --- a/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.form +++ b/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.form @@ -55,64 +55,63 @@ - + + + + + + + - + + + - + + - - - + - - - - - - - - - - - - - - - - + + + + + + + - + + + - + + - - - + - - - - - - - - - - - - - + + + + + + + + + + + + + - + diff --git a/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.java b/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.java index 313c49f5..275ad9f3 100644 --- a/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.java +++ b/plugin/src/net/groboclown/idea/p4ic/ui/config/ResolvedPropertiesPanel.java @@ -19,9 +19,14 @@ import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.ui.CollectionListModel; +import com.intellij.ui.ColorUtil; +import com.intellij.ui.JBColor; import com.intellij.uiDesigner.core.GridConstraints; import com.intellij.uiDesigner.core.GridLayoutManager; +import com.intellij.uiDesigner.core.Spacer; import com.intellij.util.ui.AsyncProcessIcon; +import com.jgoodies.forms.layout.CellConstraints; +import com.jgoodies.forms.layout.FormLayout; import net.groboclown.idea.p4ic.P4Bundle; import net.groboclown.idea.p4ic.background.BackgroundAwtActionRunner; import net.groboclown.idea.p4ic.config.ClientConfig; @@ -38,11 +43,20 @@ import org.jetbrains.annotations.Nullable; import javax.swing.*; -import java.awt.*; +import java.awt.Font; +import java.awt.Color; +import java.awt.BorderLayout; +import java.awt.FlowLayout; +import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; import java.util.List; +import java.util.Map; +import java.util.ResourceBundle; public class ResolvedPropertiesPanel { private static final Logger LOG = Logger.getInstance(ResolvedPropertiesPanel.class); @@ -55,10 +69,10 @@ public class ResolvedPropertiesPanel { private JButton refreshResolvedPropertiesButton; private JTextArea resolvedValuesText; - private JList configProblemsList; private AsyncProcessIcon refreshResolvedPropertiesSpinner; - private JTabbedPane resolutionTabbedPane; - private CollectionListModel/**/ configProblemsListModel; // JDK 1.6 doesn't have generic models + private JPanel myProblemsPanel; + private JList selectedProblemsList; + private CollectionListModel/**/ selectedProblemsListModel; // JDK 1.6 doesn't have generic models private P4ProjectConfig lastConfig; @@ -81,8 +95,8 @@ public void onConfigurationUpdated(@NotNull P4ProjectConfig config) { // Initialize GUI constant values $$$setupUI$$$(); - configProblemsListModel = new CollectionListModel/**/(); - configProblemsList.setModel(configProblemsListModel); + selectedProblemsListModel = new CollectionListModel/**/(); + selectedProblemsList.setModel(selectedProblemsListModel); rootDirDropdownBoxModel = new DefaultComboBoxModel/**/(); rootDirDropdownBox.setModel(rootDirDropdownBoxModel); @@ -120,8 +134,10 @@ public ComputedConfigResults runBackgroundProcess() { lastConfig = config; } if (lastConfig == null) { + // FIXME eliminate possible NPE final ComputedConfigResults results = new ComputedConfigResults(); - results.problemMessages.add(createNoClientConfigProblem()); + results.configs.add(new ConfigPath(null, config.getProject().getBaseDir(), + Collections.singletonList(createNoClientConfigProblem()))); return results; } @@ -149,8 +165,11 @@ public ComputedConfigResults runBackgroundProcess() { } } if (found) { + ConfigPath selectedPath = results.configs.get(results.selectedConfigIndex); results.selectedConfigText = createResolvedPropertiesText( - results.configs.get(results.selectedConfigIndex)).toString(); + selectedPath).toString(); + results.selectedProblemText = toProblemMessages(selectedPath.file, + selectedPath.allProblems); } else { results.selectedConfigText = null; } @@ -160,39 +179,31 @@ public ComputedConfigResults runBackgroundProcess() { @Override public void runAwtProcess(ComputedConfigResults results) { - if (results.problemMessages.isEmpty()) { - configProblemsListModel.removeAll(); - // No errors, so show the resolved properties - resolutionTabbedPane.setSelectedIndex(0); - } else { - configProblemsListModel.replaceAll(toProblemMessages(results.problemMessages)); - // Errors, so show the problems - resolutionTabbedPane.setSelectedIndex(1); - } if (results.configs == null || results.configs.isEmpty()) { rootDirDropdownBoxModel.removeAllElements(); rootDirDropdownBox.setEnabled(false); LOG.debug("No configurations; showing no resolved properties."); - showResolvedPropertiesNone(); + showResolvedProperties(null, results.selectedProblemText); } else { rootDirDropdownBox.setEnabled(true); rootDirDropdownBoxModel.removeAllElements(); for (ConfigPath config : results.configs) { rootDirDropdownBoxModel.addElement(config); } - if (results.selectedConfigIndex < 0 || results.selectedConfigText == null) { + if (results.selectedConfigIndex < 0) { if (LOG.isDebugEnabled()) { LOG.debug("Selected dropdown path in model is null or invalid: " + results.selectedConfigIndex); } - showResolvedPropertiesNone(); + results.selectedConfigText = null; } else { if (LOG.isDebugEnabled()) { LOG.debug("Showing dropdown path on reload for " + results.selectedConfigIndex); } rootDirDropdownBox.setSelectedIndex(results.selectedConfigIndex); - resolvedValuesText.setText(results.selectedConfigText); } + showResolvedProperties(results.selectedConfigText, + results.selectedProblemText); } } }); @@ -204,7 +215,7 @@ private void refreshSelectedConfig() { if (rootDirDropdownBoxModel.getSize() <= 0) { LOG.debug("No items in dropdown path box; showing no properties."); - showResolvedPropertiesNone(); + showResolvedProperties(null, null); } else { Object selected = rootDirDropdownBoxModel.getSelectedItem(); if (selected == null || !(selected instanceof ConfigPath)) { @@ -221,10 +232,27 @@ private void refreshSelectedConfig() { } } - private void showResolvedPropertiesNone() { + private void showResolvedProperties(String configText, List problemText) { ApplicationManager.getApplication().assertIsDispatchThread(); - resolvedValuesText.setText(P4Bundle.message("config.display.properties.no_path")); + if (configText == null || configText.isEmpty()) { + configText = P4Bundle.message("config.display.properties.no_path"); + } + resolvedValuesText.setText(configText); + + if (problemText == null || problemText.isEmpty()) { + selectedProblemsListModel.removeAll(); + if (myProblemsPanel.isVisible()) { + myProblemsPanel.setVisible(false); + rootPanel.doLayout(); + } + } else { + selectedProblemsListModel.replaceAll(problemText); + if (!myProblemsPanel.isVisible()) { + myProblemsPanel.setVisible(true); + rootPanel.doLayout(); + } + } } private void showResolvedPropertiesText(@NotNull final ConfigPath selected) { @@ -232,23 +260,28 @@ private void showResolvedPropertiesText(@NotNull final ConfigPath selected) { BackgroundAwtActionRunner.runBackgroundAwtAction( refreshResolvedPropertiesSpinner, refreshResolvedPropertiesButton, - new BackgroundAwtActionRunner.BackgroundAwtAction() { + new BackgroundAwtActionRunner.BackgroundAwtAction() { @Override - public String runBackgroundProcess() { - StringBuilder sb = createResolvedPropertiesText(selected); - return sb.toString(); + public ComputedConfigResults runBackgroundProcess() { + ComputedConfigResults ret = new ComputedConfigResults(); + ret.selectedConfigText = createResolvedPropertiesText(selected).toString(); + ret.selectedProblemText = toProblemMessages(selected.file, selected.allProblems); + return ret; } @Override - public void runAwtProcess(String value) { - resolvedValuesText.setText(value); + public void runAwtProcess(ComputedConfigResults value) { + showResolvedProperties(value.selectedConfigText, value.selectedProblemText); } }); } private StringBuilder createResolvedPropertiesText(@NotNull final ConfigPath selected) { + if (selected.config == null) { + return new StringBuilder(); + } Map props = ConfigPropertiesUtil.toProperties(selected.config); - ArrayList keys = new ArrayList(props.keySet()); + List keys = new ArrayList(props.keySet()); Collections.sort(keys); StringBuilder sb = new StringBuilder(); for (String key : keys) { @@ -257,6 +290,7 @@ private StringBuilder createResolvedPropertiesText(@NotNull final ConfigPath sel return sb; } + void setRequestConfigurationLoadListener( @NotNull RequestConfigurationLoadListener requestConfigurationLoadListener) { this.requestConfigurationLoadListener = requestConfigurationLoadListener; @@ -264,15 +298,16 @@ void setRequestConfigurationLoadListener( private ComputedConfigResults loadConfigResults(@NotNull final P4ProjectConfig projectConfig) { ComputedConfigResults results = new ComputedConfigResults(); - results.problemMessages = new ArrayList(projectConfig.getConfigProblems()); + List problemMessages = new ArrayList(projectConfig.getConfigProblems()); if (LOG.isDebugEnabled()) { - LOG.debug("Base project config problems: " + results.problemMessages); + LOG.debug("Base project config problems: " + problemMessages); } Collection configs = projectConfig.getClientConfigSetups(); if (configs.isEmpty()) { LOG.debug("No client configs in setup."); - results.problemMessages.add(createNoClientConfigProblem()); + problemMessages.add(createNoClientConfigProblem()); + results.configs.add(new ConfigPath(null, projectConfig.getProject().getBaseDir(), problemMessages)); } for (ClientConfigSetup configSetup : configs) { final ClientConfig config = configSetup.getClientConfig(); @@ -285,21 +320,21 @@ private ComputedConfigResults loadConfigResults(@NotNull final P4ProjectConfig p LOG.debug("Config setup " + configSetup.getSource() + " has problem " + problem); } - results.problemMessages.add(problem); + problemMessages.add(problem); } // We can have a connection without a client, for testing purposes, // but to actually use it, we need a client. if (!config.isWorkspaceCapable()) { - results.problemMessages.add(new ConfigProblem(configSetup.getSource(), false, + problemMessages.add(new ConfigProblem(configSetup.getSource(), false, "error.config.no-client")); } } if (config != null && config.getProjectSourceDirs().isEmpty()) { - results.problemMessages.add(new ConfigProblem(configSetup.getSource(), false, + problemMessages.add(new ConfigProblem(configSetup.getSource(), false, "client.root.non-existent", config.getProject().getBaseDir())); if (config.getProject().getBaseDir() != null) { results.configs.add(new ConfigPath( - configSetup.getSource(), config.getProject().getBaseDir())); + configSetup.getSource(), config.getProject().getBaseDir(), problemMessages)); } } Collection sourceDirs = config == null @@ -307,7 +342,7 @@ private ComputedConfigResults loadConfigResults(@NotNull final P4ProjectConfig p : config.getProjectSourceDirs(); for (VirtualFile virtualFile : sourceDirs) { if (virtualFile != null) { - results.configs.add(new ConfigPath(configSetup.getSource(), virtualFile)); + results.configs.add(new ConfigPath(configSetup.getSource(), virtualFile, problemMessages)); } } } @@ -319,14 +354,79 @@ private static ConfigProblem createNoClientConfigProblem() { new P4InvalidConfigException(P4Bundle.getString("configuration.error.no-config-list"))); } - private static List toProblemMessages(ArrayList problemMessages) { + private static List toProblemMessages( + @Nullable VirtualFile root, @NotNull List problemMessages) { + // Be sure to get this color anew each time, because the theme may have + // changed. + + //noinspection UseJBColor + final String errorColor = ColorUtil.toHex(new Color(JBColor.RED.getRGB())); + HashSet ret = new HashSet(); - for (ConfigProblem problemMessage : problemMessages) { - // TODO colorize the messages - ret.add(problemMessage.getMessage()); + for (ConfigProblem configProblem: problemMessages) { + // Filter out problems that don't belong to this root path. + if (configProblem.getRootPath() == null || configProblem.getRootPath().equals(root)) { + StringBuilder text = new StringBuilder(""); + if (configProblem.isError()) { + text.append("") + .append(configProblem.getMessage()) + .append(""); + } else { + text.append(configProblem.getMessage()); + } + ret.add(text.toString()); + } + } + if (ret.isEmpty() && ! problemMessages.isEmpty()) { + // Tell the user that there are problems on other root directories. + ret.add("" + P4Bundle.getString("config.resolve.other-roots-have-errors") + ""); } // Condense duplicate values - return new ArrayList(ret); + return new ArrayList(ret); + } + + /** + * @noinspection ALL + */ + private Font getFont1494608681498(String fontName, int style, int size, Font currentFont) { + if (currentFont == null) { + return null; + } + String resultName; + if (fontName == null) { + resultName = currentFont.getName(); + } else { + Font testFont = new Font(fontName, Font.PLAIN, 10); + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { + resultName = fontName; + } else { + resultName = currentFont.getName(); + } + } + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), + size >= 0 ? size : currentFont.getSize()); + } + + /** + * @noinspection ALL + */ + private Font $$$getFont$$$(String fontName, int style, int size, Font currentFont) { + if (currentFont == null) { + return null; + } + String resultName; + if (fontName == null) { + resultName = currentFont.getName(); + } else { + Font testFont = new Font(fontName, Font.PLAIN, 10); + if (testFont.canDisplay('a') && testFont.canDisplay('1')) { + resultName = fontName; + } else { + resultName = currentFont.getName(); + } + } + return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), + size >= 0 ? size : currentFont.getSize()); } /** @@ -365,58 +465,35 @@ private static List toProblemMessages(ArrayList problemMessages) ResourceBundle.getBundle("net/groboclown/idea/p4ic/P4Bundle").getString("configuration.resolved.path")); panel3.add(label1, new GridConstraints(0, 0, 1, 1, GridConstraints.ANCHOR_WEST, GridConstraints.FILL_NONE, GridConstraints.SIZEPOLICY_FIXED, GridConstraints.SIZEPOLICY_FIXED, null, null, null, 0, false)); - resolutionTabbedPane = new JTabbedPane(); - rootPanel.add(resolutionTabbedPane, BorderLayout.CENTER); - final JPanel panel4 = new JPanel(); - panel4.setLayout(new BorderLayout(0, 0)); - resolutionTabbedPane.addTab(ResourceBundle.getBundle("net/groboclown/idea/p4ic/P4Bundle") - .getString("configurations.resolved-values.tab"), panel4); - panel4.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4), null)); final JScrollPane scrollPane1 = new JScrollPane(); - scrollPane1.setVerticalScrollBarPolicy(22); - panel4.add(scrollPane1, BorderLayout.CENTER); - resolvedValuesText = new JTextArea(); - Font resolvedValuesTextFont = UIManager.getFont("TextArea.font"); - if (resolvedValuesTextFont != null) { - resolvedValuesText.setFont(resolvedValuesTextFont); - } - resolvedValuesText.setRows(8); - scrollPane1.setViewportView(resolvedValuesText); + rootPanel.add(scrollPane1, BorderLayout.CENTER); + scrollPane1.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(4, 0, 0, 0), null)); + final JPanel panel4 = new JPanel(); + panel4.setLayout(new FormLayout("fill:d:grow", + "center:max(d;4px):noGrow,top:4dlu:noGrow,center:max(d;4px):noGrow,top:4dlu:noGrow,center:d:grow")); + scrollPane1.setViewportView(panel4); + myProblemsPanel = new JPanel(); + myProblemsPanel.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); + CellConstraints cc = new CellConstraints(); + panel4.add(myProblemsPanel, cc.xy(1, 1)); + myProblemsPanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), + ResourceBundle.getBundle("net/groboclown/idea/p4ic/P4Bundle") + .getString("config.resolved.problem-panel"))); + selectedProblemsList = new JList(); + myProblemsPanel.add(selectedProblemsList, cc.xy(1, 1)); final JPanel panel5 = new JPanel(); - panel5.setLayout(new BorderLayout(0, 0)); - resolutionTabbedPane.addTab(ResourceBundle.getBundle("net/groboclown/idea/p4ic/P4Bundle") - .getString("configuration.problems-list.tab"), panel5); - panel5.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEmptyBorder(4, 4, 4, 4), null)); - final JScrollPane scrollPane2 = new JScrollPane(); - scrollPane2.setVisible(true); - panel5.add(scrollPane2, BorderLayout.CENTER); - configProblemsList = new JList(); - scrollPane2.setViewportView(configProblemsList); + panel5.setLayout(new FormLayout("fill:d:grow", "center:d:grow")); + panel4.add(panel5, cc.xy(1, 3)); + panel5.setBorder(BorderFactory.createTitledBorder(BorderFactory.createLoweredBevelBorder(), + ResourceBundle.getBundle("net/groboclown/idea/p4ic/P4Bundle") + .getString("config.resolved.config-panel"))); + resolvedValuesText = new JTextArea(); + panel5.add(resolvedValuesText, cc.xy(1, 1)); + final Spacer spacer1 = new Spacer(); + panel4.add(spacer1, cc.xy(1, 5, CellConstraints.DEFAULT, CellConstraints.FILL)); label1.setLabelFor(rootDirDropdownBox); } - /** - * @noinspection ALL - */ - private Font getFont1494608681498(String fontName, int style, int size, Font currentFont) { - if (currentFont == null) { - return null; - } - String resultName; - if (fontName == null) { - resultName = currentFont.getName(); - } else { - Font testFont = new Font(fontName, Font.PLAIN, 10); - if (testFont.canDisplay('a') && testFont.canDisplay('1')) { - resultName = fontName; - } else { - resultName = currentFont.getName(); - } - } - return new Font(resultName, style >= 0 ? style : currentFont.getStyle(), - size >= 0 ? size : currentFont.getSize()); - } - /** * @noinspection ALL */ @@ -454,20 +531,23 @@ private Font getFont1494608681498(String fontName, int style, int size, Font cur } private static class ComputedConfigResults { - ArrayList problemMessages = new ArrayList(); - ArrayList configs = new ArrayList(); + List configs = new ArrayList(); int selectedConfigIndex; String selectedConfigText; + List selectedProblemText; } private static class ConfigPath { - final DataPart config; + @Nullable final DataPart config; + private final List allProblems; final VirtualFile file; - private ConfigPath(@NotNull DataPart config, @NotNull VirtualFile virtualFile) { + private ConfigPath(@Nullable DataPart config, @NotNull VirtualFile virtualFile, + @NotNull List problems) { this.config = config; this.file = virtualFile; + this.allProblems = problems; } @Override diff --git a/plugin/src/net/groboclown/idea/p4ic/ui/config/props/ConfigStackPanel.java b/plugin/src/net/groboclown/idea/p4ic/ui/config/props/ConfigStackPanel.java index 1f52f704..ea42856e 100644 --- a/plugin/src/net/groboclown/idea/p4ic/ui/config/props/ConfigStackPanel.java +++ b/plugin/src/net/groboclown/idea/p4ic/ui/config/props/ConfigStackPanel.java @@ -414,7 +414,7 @@ public void run() { private void sendConfigStackUpdated() { // The refresh can take a long time, so run it in the background. - if (! Disposer.isDisposed(this)) { + if (!Disposer.isDisposed(this)) { BackgroundAwtActionRunner .runBackgrounAwtAction(new BackgroundAwtActionRunner.BackgroundAwtAction() { @Override