[hg] main-silver: connecting issue framework's discardOutgoing w...

  • From: Ondrej Vrabec < >
  • To:
  • Subject: [hg] main-silver: connecting issue framework's discardOutgoing w...
  • Date: Mon, 07 Oct 2013 11:55:51 -0700

changeset b23b8d6d4d9e in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/b23b8d6d4d9e
description:
        connecting issue framework's discardOutgoing with implementations in 
our connectors

diffstat:

 bugzilla/src/org/netbeans/modules/bugzilla/BugzillaIssueProvider.java |  5 
+----
 bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java   |  2 +-
 jira/src/org/netbeans/modules/jira/JiraIssueProvider.java             |  3 
+--
 jira/src/org/netbeans/modules/jira/issue/IssuePanel.java              |  2 +-
 jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java             |  5 
+++++
 localtasks/src/org/netbeans/modules/localtasks/IssueProviderImpl.java |  2 +-
 localtasks/src/org/netbeans/modules/localtasks/task/LocalTask.java    |  2 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSIssueProvider.java |  3 
+--
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/IssuePanel.java  |  2 +-
 odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java   |  5 
+++++
 10 files changed, 18 insertions(+), 13 deletions(-)

diffs (155 lines):

diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaIssueProvider.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaIssueProvider.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaIssueProvider.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/BugzillaIssueProvider.java
@@ -39,13 +39,10 @@
 
 import java.beans.PropertyChangeListener;
 import java.io.File;
-import java.util.Date;
 import java.util.List;
 import org.netbeans.modules.bugtracking.team.spi.TeamIssueProvider;
 import org.netbeans.modules.bugtracking.team.spi.OwnerInfo;
 import org.netbeans.modules.bugtracking.spi.BugtrackingController;
-import org.netbeans.modules.bugtracking.spi.IssueProvider;
-import org.netbeans.modules.bugtracking.spi.IssueStatusProvider;
 import org.netbeans.modules.bugzilla.issue.BugzillaIssue;
 import org.netbeans.modules.bugzilla.repository.IssueField;
 
@@ -137,7 +134,7 @@
 
     @Override
     public void discardOutgoing(BugzillaIssue data) {
-        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
+        data.discardLocalEdits();
     }
 
 }
diff --git 
a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java 
b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
--- a/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
+++ b/bugzilla/src/org/netbeans/modules/bugzilla/issue/BugzillaIssue.java
@@ -1422,7 +1422,7 @@
         }
     }
     
-    boolean discardLocalEdits () {
+    public boolean discardLocalEdits () {
         clearUnsavedChanges();
         return cancelChanges();
     }
diff --git a/jira/src/org/netbeans/modules/jira/JiraIssueProvider.java 
b/jira/src/org/netbeans/modules/jira/JiraIssueProvider.java
--- a/jira/src/org/netbeans/modules/jira/JiraIssueProvider.java
+++ b/jira/src/org/netbeans/modules/jira/JiraIssueProvider.java
@@ -42,7 +42,6 @@
 import java.util.List;
 import org.netbeans.modules.bugtracking.spi.BugtrackingController;
 import org.netbeans.modules.bugtracking.spi.IssueProvider;
-import org.netbeans.modules.bugtracking.spi.IssueStatusProvider;
 import org.netbeans.modules.jira.issue.NbJiraIssue;
 
 /**
@@ -124,6 +123,6 @@
 
     @Override
     public void discardOutgoing(NbJiraIssue data) {
-        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
+        data.discardLocalEdits();
     }
 }
diff --git a/jira/src/org/netbeans/modules/jira/issue/IssuePanel.java 
b/jira/src/org/netbeans/modules/jira/issue/IssuePanel.java
--- a/jira/src/org/netbeans/modules/jira/issue/IssuePanel.java
+++ b/jira/src/org/netbeans/modules/jira/issue/IssuePanel.java
@@ -2272,7 +2272,7 @@
             public void run() {
                 boolean cleared = false;
                 try {
-                    cleared = issue.cancelChanges();
+                    cleared = issue.discardLocalEdits();
                 } finally {
                     final boolean fCleared = cleared;
                     EventQueue.invokeLater(new Runnable() {
diff --git a/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java 
b/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
--- a/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
+++ b/jira/src/org/netbeans/modules/jira/issue/NbJiraIssue.java
@@ -286,6 +286,11 @@
         deleteTask();
     }
 
+    public boolean discardLocalEdits () {
+        clearUnsavedChanges();
+        return cancelChanges();
+    }
+
     NbJiraIssue createSubtask () {
         assert !EventQueue.isDispatchThread();
         NbTask task;
diff --git 
a/localtasks/src/org/netbeans/modules/localtasks/IssueProviderImpl.java 
b/localtasks/src/org/netbeans/modules/localtasks/IssueProviderImpl.java
--- a/localtasks/src/org/netbeans/modules/localtasks/IssueProviderImpl.java
+++ b/localtasks/src/org/netbeans/modules/localtasks/IssueProviderImpl.java
@@ -121,7 +121,7 @@
 
     @Override
     public void discardOutgoing(LocalTask data) {
-        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
+        data.delete();
     }
     
 }
diff --git 
a/localtasks/src/org/netbeans/modules/localtasks/task/LocalTask.java 
b/localtasks/src/org/netbeans/modules/localtasks/task/LocalTask.java
--- a/localtasks/src/org/netbeans/modules/localtasks/task/LocalTask.java
+++ b/localtasks/src/org/netbeans/modules/localtasks/task/LocalTask.java
@@ -218,7 +218,7 @@
         });
     }
 
-    void delete () {
+    public void delete () {
         deleteTask();
     }
 
diff --git 
a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSIssueProvider.java 
b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSIssueProvider.java
--- a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSIssueProvider.java
+++ b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/ODCSIssueProvider.java
@@ -46,7 +46,6 @@
 import java.io.File;
 import org.netbeans.modules.bugtracking.spi.BugtrackingController;
 import org.netbeans.modules.bugtracking.spi.IssueProvider;
-import org.netbeans.modules.bugtracking.spi.IssueStatusProvider;
 import org.netbeans.modules.odcs.tasks.issue.ODCSIssue;
 
 /**
@@ -127,7 +126,7 @@
 
     @Override
     public void discardOutgoing(ODCSIssue data) {
-        throw new UnsupportedOperationException("Not supported yet."); //To 
change body of generated methods, choose Tools | Templates.
+        data.discardLocalEdits();
     }
     
 }
diff --git 
a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/IssuePanel.java 
b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/IssuePanel.java
--- a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/IssuePanel.java
+++ b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/IssuePanel.java
@@ -2786,7 +2786,7 @@
             public void run() {
                 boolean cleared = false;
                 try {
-                    cleared = issue.cancelChanges();
+                    cleared = issue.discardLocalEdits();
                 } finally {
                     final boolean fCleared = cleared;
                     EventQueue.invokeLater(new Runnable() {
diff --git 
a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java 
b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java
--- a/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java
+++ b/odcs.tasks/src/org/netbeans/modules/odcs/tasks/issue/ODCSIssue.java
@@ -904,6 +904,11 @@
         deleteTask();
     }
 
+    public boolean discardLocalEdits () {
+        clearUnsavedChanges();
+        return cancelChanges();
+    }
+
     public String getPriorityID() {
         return getPriority().getId().toString();
     }

[hg] main-silver: connecting issue framework's discardOutgoing w...

Ondrej Vrabec 10/07/2013

Project Features

About this Project

ConnectedDeveloper was started in November 2009, is owned by tpavek, and has 66 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close