Skip to content

Commit

Permalink
Merge pull request #2 from alexyida/master
Browse files Browse the repository at this point in the history
Trivial changes
  • Loading branch information
CarolineM committed Jan 25, 2013
2 parents 850fc59 + 694a846 commit 16aae00
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 4 deletions.
Binary file removed .DS_Store
Binary file not shown.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bin/
.DS_Store
Binary file removed VersionChecker/.DS_Store
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@ public void mouseClicked(MouseEvent e) {
}

public String getSelectedID() {
return this.selectedAF.getId();
if (this.selectedAF != null)
return this.selectedAF.getId();
return null;
}

public String getSelectedVer() {
return this.selectedAF.getVersion();
if (this.selectedAF != null)
return this.selectedAF.getVersion();
return null;
}

private void addEntry(VCArtifact toAdd) {
Expand Down
11 changes: 9 additions & 2 deletions VersionChecker/src/versionchecker/actions/VCMainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;

Expand Down Expand Up @@ -120,15 +121,21 @@ public void actionPerformed(ActionEvent event) {
fetchButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String id = tablePanel.getSelectedID();
VCCloneTask task = new VCCloneTask(id,null);
if (id != null)
new VCCloneTask(id,null);
else
JOptionPane.showMessageDialog(null, "No component is selected.", "VersionChecker", 1);;
}
});

cloneButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
String id = tablePanel.getSelectedID();
String ver = tablePanel.getSelectedVer();
VCCloneTask task = new VCCloneTask(id,ver);
if (id != null)
new VCCloneTask(id,ver);
else
JOptionPane.showMessageDialog(null, "No component is selected.", "VersionChecker", 1);;
}
});

Expand Down

0 comments on commit 16aae00

Please sign in to comment.