You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2018/05/03 22:26:55 UTC
[GitHub] emilianbold closed pull request #529: Moves the Git Diff window
tree selection panel into the toolbar
emilianbold closed pull request #529: Moves the Git Diff window tree selection panel into the toolbar
URL: https://github.com/apache/incubator-netbeans/pull/529
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.form b/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.form
index 8a464b57c..49a25a6a4 100644
--- a/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.form
+++ b/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.form
@@ -45,16 +45,13 @@
<Group type="103" groupAlignment="0" attributes="0">
<Component id="splitPane" pref="716" max="32767" attributes="0"/>
<Component id="controlToolbar" alignment="0" max="32767" attributes="0"/>
- <Component id="treeSelectionPanel" alignment="0" max="32767" attributes="0"/>
</Group>
</DimensionLayout>
<DimensionLayout dim="1">
<Group type="103" groupAlignment="0" attributes="0">
<Group type="102" alignment="1" attributes="0">
<Component id="controlToolbar" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="treeSelectionPanel" min="-2" max="-2" attributes="0"/>
- <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
+ <EmptySpace max="-2" attributes="0"/>
<Component id="splitPane" pref="332" max="32767" attributes="0"/>
</Group>
</Group>
@@ -324,81 +321,81 @@
<AuxValue name="generateMnemonicsCode" type="java.lang.Boolean" value="true"/>
</AuxValues>
</Component>
- </SubComponents>
- </Container>
- <Container class="javax.swing.JPanel" name="treeSelectionPanel">
- <AuxValues>
- <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="16"/>
- </AuxValues>
-
- <Layout>
- <DimensionLayout dim="0">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="102" alignment="0" attributes="0">
- <EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="cmbDiffTreeFirst" max="32767" attributes="0"/>
- <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
- <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
- <EmptySpace min="-2" max="-2" attributes="0"/>
- <Component id="cmbDiffTreeSecond" max="32767" attributes="0"/>
- <EmptySpace min="-2" max="-2" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- <DimensionLayout dim="1">
- <Group type="103" groupAlignment="0" attributes="0">
- <Group type="103" groupAlignment="3" attributes="0">
- <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="cmbDiffTreeFirst" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
- <Component id="cmbDiffTreeSecond" alignment="3" min="-2" max="-2" attributes="0"/>
- </Group>
- </Group>
- </DimensionLayout>
- </Layout>
- <SubComponents>
- <Component class="javax.swing.JLabel" name="jLabel1">
- <Properties>
- <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
- <ComponentRef name="cmbDiffTreeFirst"/>
- </Property>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/netbeans/modules/git/ui/diff/Bundle.properties" key="MultiDiffPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JComboBox" name="cmbDiffTreeFirst">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="0"/>
- </Property>
- </Properties>
- <AuxValues>
- <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="16"/>
- </AuxValues>
- </Component>
- <Component class="javax.swing.JLabel" name="jLabel2">
- <Properties>
- <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
- <ComponentRef name="cmbDiffTreeSecond"/>
- </Property>
- <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
- <ResourceString bundle="org/netbeans/modules/git/ui/diff/Bundle.properties" key="MultiDiffPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
- </Property>
- </Properties>
- </Component>
- <Component class="javax.swing.JComboBox" name="cmbDiffTreeSecond">
- <Properties>
- <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
- <StringArray count="0"/>
- </Property>
- </Properties>
+ <Container class="javax.swing.JPanel" name="treeSelectionPanel">
<AuxValues>
<AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="16"/>
</AuxValues>
- </Component>
+
+ <Layout>
+ <DimensionLayout dim="0">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="102" alignment="0" attributes="0">
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="cmbDiffTreeFirst" max="32767" attributes="0"/>
+ <EmptySpace type="unrelated" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel2" min="-2" max="-2" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ <Component id="cmbDiffTreeSecond" max="32767" attributes="0"/>
+ <EmptySpace min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ <DimensionLayout dim="1">
+ <Group type="103" groupAlignment="0" attributes="0">
+ <Group type="103" groupAlignment="3" attributes="0">
+ <Component id="jLabel1" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="cmbDiffTreeFirst" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="jLabel2" alignment="3" min="-2" max="-2" attributes="0"/>
+ <Component id="cmbDiffTreeSecond" alignment="3" min="-2" max="-2" attributes="0"/>
+ </Group>
+ </Group>
+ </DimensionLayout>
+ </Layout>
+ <SubComponents>
+ <Component class="javax.swing.JLabel" name="jLabel1">
+ <Properties>
+ <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="cmbDiffTreeFirst"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/netbeans/modules/git/ui/diff/Bundle.properties" key="MultiDiffPanel.jLabel1.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="cmbDiffTreeFirst">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="16"/>
+ </AuxValues>
+ </Component>
+ <Component class="javax.swing.JLabel" name="jLabel2">
+ <Properties>
+ <Property name="labelFor" type="java.awt.Component" editor="org.netbeans.modules.form.ComponentChooserEditor">
+ <ComponentRef name="cmbDiffTreeSecond"/>
+ </Property>
+ <Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
+ <ResourceString bundle="org/netbeans/modules/git/ui/diff/Bundle.properties" key="MultiDiffPanel.jLabel2.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
+ </Property>
+ </Properties>
+ </Component>
+ <Component class="javax.swing.JComboBox" name="cmbDiffTreeSecond">
+ <Properties>
+ <Property name="model" type="javax.swing.ComboBoxModel" editor="org.netbeans.modules.form.editors2.ComboBoxModelEditor">
+ <StringArray count="0"/>
+ </Property>
+ </Properties>
+ <AuxValues>
+ <AuxValue name="JavaCodeGenerator_VariableModifier" type="java.lang.Integer" value="16"/>
+ </AuxValues>
+ </Component>
+ </SubComponents>
+ </Container>
</SubComponents>
</Container>
<Container class="javax.swing.JSplitPane" name="splitPane">
diff --git a/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.java b/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.java
index 98eebffa5..3e3cf00b4 100644
--- a/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.java
+++ b/git/src/org/netbeans/modules/git/ui/diff/MultiDiffPanel.java
@@ -61,20 +61,20 @@ private void initComponents() {
controlToolbar.setRollover(true);
btnModeGroup.add(tgbHeadVsWorking);
- tgbHeadVsWorking.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/head_vs_working.png", false)); // NOI18N
+ tgbHeadVsWorking.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/head_vs_working.png", false));
java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/netbeans/modules/git/ui/diff/Bundle"); // NOI18N
tgbHeadVsWorking.setToolTipText(bundle.getString("MultiDiffPanel.tgbHeadVsWorking.toolTipText")); // NOI18N
tgbHeadVsWorking.setFocusable(false);
controlToolbar.add(tgbHeadVsWorking);
btnModeGroup.add(tgbHeadVsIndex);
- tgbHeadVsIndex.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/head_vs_index.png", false)); // NOI18N
+ tgbHeadVsIndex.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/head_vs_index.png", false));
tgbHeadVsIndex.setToolTipText(bundle.getString("MultiDiffPanel.tgbHeadVsIndex.toolTipText")); // NOI18N
tgbHeadVsIndex.setFocusable(false);
controlToolbar.add(tgbHeadVsIndex);
btnModeGroup.add(tgbIndexVsWorking);
- tgbIndexVsWorking.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/index_vs_working.png", false)); // NOI18N
+ tgbIndexVsWorking.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/index_vs_working.png", false));
tgbIndexVsWorking.setToolTipText(bundle.getString("MultiDiffPanel.tgbIndexVsWorking.toolTipText")); // NOI18N
tgbIndexVsWorking.setFocusable(false);
controlToolbar.add(tgbIndexVsWorking);
@@ -95,7 +95,7 @@ private void initComponents() {
controlToolbar.add(jPanel1);
viewTypeGroup.add(listButton);
- listButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/file_view.png", false)); // NOI18N
+ listButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/file_view.png", false));
listButton.setToolTipText(bundle.getString("MultiDiffPanel.listButton.toolTipText")); // NOI18N
listButton.setFocusable(false);
listButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@@ -103,7 +103,7 @@ private void initComponents() {
controlToolbar.add(listButton);
viewTypeGroup.add(treeButton);
- treeButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/logical_view.png", false)); // NOI18N
+ treeButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/logical_view.png", false));
treeButton.setSelected(true);
treeButton.setToolTipText(bundle.getString("MultiDiffPanel.treeButton.toolTipText")); // NOI18N
treeButton.setFocusable(false);
@@ -126,14 +126,14 @@ private void initComponents() {
controlToolbar.add(jPanel2);
- nextButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/diff-next.png", false)); // NOI18N
+ nextButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/diff-next.png", false));
nextButton.setToolTipText(org.openide.util.NbBundle.getMessage(MultiDiffPanel.class, "MultiDiffPanel.nextButton.toolTipText")); // NOI18N
nextButton.setFocusable(false);
nextButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
nextButton.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
controlToolbar.add(nextButton);
- prevButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/diff-prev.png", false)); // NOI18N
+ prevButton.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/diff-prev.png", false));
prevButton.setToolTipText(org.openide.util.NbBundle.getMessage(MultiDiffPanel.class, "MultiDiffPanel.prevButton.toolTipText")); // NOI18N
prevButton.setFocusable(false);
prevButton.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
@@ -155,7 +155,7 @@ private void initComponents() {
controlToolbar.add(jPanel4);
- btnRefresh.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/refresh.png", false)); // NOI18N
+ btnRefresh.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/refresh.png", false));
btnRefresh.setToolTipText(bundle.getString("MultiDiffPanel.btnRefresh.toolTipText")); // NOI18N
btnRefresh.setActionCommand("null"); // NOI18N
btnRefresh.setFocusable(false);
@@ -166,13 +166,13 @@ private void initComponents() {
jPanel3.setOpaque(false);
controlToolbar.add(jPanel3);
- btnRevert.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/get_clean.png", false)); // NOI18N
+ btnRevert.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/get_clean.png", false));
btnRevert.setToolTipText(bundle.getString("MultiDiffPanel.btnRevert.toolTipText")); // NOI18N
btnRevert.setFocusable(false);
btnRevert.setPreferredSize(new java.awt.Dimension(22, 25));
controlToolbar.add(btnRevert);
- btnCommit.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/commit.png", false)); // NOI18N
+ btnCommit.setIcon(org.openide.util.ImageUtilities.loadImageIcon("/org/netbeans/modules/git/resources/icons/commit.png", false));
btnCommit.setToolTipText(bundle.getString("MultiDiffPanel.btnCommit.toolTipText")); // NOI18N
btnCommit.setFocusable(false);
btnCommit.setPreferredSize(new java.awt.Dimension(22, 25));
@@ -208,6 +208,8 @@ private void initComponents() {
.addComponent(cmbDiffTreeSecond, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
);
+ controlToolbar.add(treeSelectionPanel);
+
splitPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
@@ -216,15 +218,12 @@ private void initComponents() {
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(splitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 716, Short.MAX_VALUE)
.addComponent(controlToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
- .addComponent(treeSelectionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(controlToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
- .addComponent(treeSelectionPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
- .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(splitPane, javax.swing.GroupLayout.DEFAULT_SIZE, 332, Short.MAX_VALUE))
);
}// </editor-fold>//GEN-END:initComponents
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists