Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -569,9 +569,6 @@ jobs:
- name: ide/bugtracking.commons
run: ant $OPTS -f ide/bugtracking.commons test

# - name: ide/bugzilla
# run: ant $OPTS -f ide/bugzilla test

- name: ide/code.analysis
run: ant $OPTS -f ide/code.analysis test

Expand Down
4 changes: 0 additions & 4 deletions ide/bugtracking.bridge/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@
<test-dependencies>
<test-type>
<name>unit</name>
<test-dependency>
<code-name-base>org.eclipse.equinox.common</code-name-base>
<compile-dependency/>
</test-dependency>
<test-dependency>
<code-name-base>org.netbeans.libs.junit4</code-name-base>
<compile-dependency/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@
import org.netbeans.modules.bugtracking.api.Repository;
import org.netbeans.modules.bugtracking.api.RepositoryManager;
import org.netbeans.modules.bugtracking.api.Util;
import org.netbeans.modules.bugtracking.spi.BugtrackingConnector;
import org.openide.nodes.*;
import org.openide.util.Lookup;
import org.openide.util.NbBundle;

/**
Expand Down Expand Up @@ -85,10 +87,18 @@ public static BugtrackingRootNode getDefault() {
public Action[] getActions(boolean context) {
return new Action[] {
new AbstractAction(NbBundle.getMessage(BugtrackingRootNode.class, "LBL_CreateRepository")) { // NOI18N
final boolean hasConnector = Lookup.getDefault().lookup(BugtrackingConnector.class) != null;

@Override
public void actionPerformed(ActionEvent e) {
Util.createRepository();
}

@Override
public boolean isEnabled() {
return hasConnector;
}

}
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
import org.netbeans.modules.bugtracking.api.Issue;
import org.netbeans.modules.bugtracking.api.IssueQuickSearch;
import org.netbeans.modules.bugtracking.api.Repository;
import org.netbeans.modules.bugtracking.spi.BugtrackingConnector;
import org.netbeans.modules.versioning.util.VerticallyNonResizingPanel;
import org.openide.filesystems.FileObject;
import org.openide.util.Lookup;

/**
*
Expand Down Expand Up @@ -73,7 +75,7 @@ public HookPanel(FileObject context, boolean link, boolean resolve, boolean comm

qs = IssueQuickSearch.create(context);
qs.setChangeListener(this);
qs.setEnabled(true);
qs.setEnabled(hasRegisteredConnectors());
issuePanel.add(qs.getComponent(), BorderLayout.NORTH);

linkCheckBox.setSelected(link);
Expand Down Expand Up @@ -239,4 +241,7 @@ public void stateChanged(ChangeEvent e) {
enableFields();
}

private boolean hasRegisteredConnectors() {
return Lookup.getDefault().lookup(BugtrackingConnector.class) != null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,15 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.util.Collection;
import java.util.Date;
import java.util.logging.Level;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import org.eclipse.core.runtime.CoreException;
import org.netbeans.junit.NbTestCase;
import org.netbeans.modules.bugtracking.IssueImpl;
import org.netbeans.modules.bugtracking.TestKit;
import org.netbeans.modules.bugtracking.api.IssueQuickSearch;
import org.netbeans.modules.bugtracking.api.Repository;
import org.netbeans.modules.bugtracking.ui.search.QuickSearchComboBar;
import org.netbeans.modules.bugtracking.ui.search.QuickSearchPanel;
import org.netbeans.modules.bugtracking.vcs.VCSHooksConfig.HookType;
import org.netbeans.modules.bugtracking.vcs.VCSHooksConfig.PushOperation;
Expand Down Expand Up @@ -66,7 +61,7 @@ protected void setUp() throws Exception {
System.setProperty("netbeans.user", getWorkDir().getAbsolutePath() + "/userdir");
}

public void testPanel() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testPanel() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setLink(true);
Expand Down Expand Up @@ -101,7 +96,7 @@ public void testPanel() throws MalformedURLException, CoreException, IOException
assertTrue(panel.pushRadioButton.isSelected());
}

public void testBeforeCommitNoLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testBeforeCommitNoLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setLink(false);
Expand All @@ -114,7 +109,7 @@ public void testBeforeCommitNoLink() throws MalformedURLException, CoreException
assertNull(ctx);
}

public void testBeforeCommitWithLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testBeforeCommitWithLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setLink(true);
Expand All @@ -130,7 +125,7 @@ public void testBeforeCommitWithLink() throws MalformedURLException, CoreExcepti
assertNotSame(msg, ctx.getMessage()); // issue info was added
}

public void testAfterCommitLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setAfterCommit(true);
Expand All @@ -151,7 +146,7 @@ public void testAfterCommitLink() throws MalformedURLException, CoreException, I
assertFalse(HookIssue.getInstance().closed);
}

public void testAfterCommitResolve() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitResolve() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setAfterCommit(true);
Expand All @@ -171,7 +166,7 @@ public void testAfterCommitResolve() throws MalformedURLException, CoreException
assertTrue(HookIssue.getInstance().closed);
}

public void testAfterCommitLinkResolve() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitLinkResolve() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HgHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.HG).setAfterCommit(true);
Expand All @@ -192,7 +187,7 @@ public void testAfterCommitLinkResolve() throws MalformedURLException, CoreExcep
assertTrue(HookIssue.getInstance().closed);
}

public void testAfterCommitLinkResolveAfterPush() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitLinkResolveAfterPush() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
HookIssue.getInstance().reset();

HgHookImpl hook = getHook();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,17 @@
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.MalformedURLException;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.logging.Level;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JComboBox;
import org.eclipse.core.runtime.CoreException;
import org.netbeans.junit.NbTestCase;
import org.netbeans.junit.RandomlyFails;
import org.netbeans.modules.bugtracking.IssueImpl;
import org.netbeans.modules.bugtracking.TestKit;
import org.netbeans.modules.bugtracking.api.IssueQuickSearch;
import org.netbeans.modules.bugtracking.api.Repository;
import org.netbeans.modules.bugtracking.ui.search.QuickSearchComboBar;
import org.netbeans.modules.bugtracking.ui.search.QuickSearchPanel;
import org.netbeans.modules.bugtracking.vcs.VCSHooksConfig.HookType;
import org.netbeans.modules.versioning.hooks.SvnHook;
Expand Down Expand Up @@ -68,7 +63,7 @@ protected void setUp() throws Exception {
}

@RandomlyFails
public void testPanel() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testPanel() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(true);
Expand Down Expand Up @@ -98,7 +93,7 @@ public void testPanel() throws MalformedURLException, CoreException, IOException
assertFalse(panel.resolveCheckBox.isSelected());
}

public void testBeforeCommitNoLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testBeforeCommitNoLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(false);
Expand All @@ -111,7 +106,7 @@ public void testBeforeCommitNoLink() throws MalformedURLException, CoreException
assertNull(ctx);
}

public void testBeforeCommitWithLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testBeforeCommitWithLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(true);
Expand All @@ -127,7 +122,7 @@ public void testBeforeCommitWithLink() throws MalformedURLException, CoreExcepti
assertNotSame(msg, ctx.getMessage()); // issue info was added
}

public void testAfterCommitLink() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitLink() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(true);
Expand All @@ -147,7 +142,7 @@ public void testAfterCommitLink() throws MalformedURLException, CoreException, I
assertFalse(HookIssue.getInstance().closed);
}

public void testAfterCommitResolve() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitResolve() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(false);
Expand All @@ -166,7 +161,7 @@ public void testAfterCommitResolve() throws MalformedURLException, CoreException
assertTrue(HookIssue.getInstance().closed);
}

public void testAfterCommitLinkResolve() throws MalformedURLException, CoreException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
public void testAfterCommitLinkResolve() throws MalformedURLException, IOException, InterruptedException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException, NoSuchMethodException, InvocationTargetException {
SvnHookImpl hook = getHook();

VCSHooksConfig.getInstance(HookType.SVN).setLink(true);
Expand Down
1 change: 1 addition & 0 deletions ide/bugtracking.commons/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.

is.autoload=true
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

13 changes: 2 additions & 11 deletions ide/bugtracking.commons/nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,18 +146,9 @@
</test-dependency>
</test-type>
</test-dependencies>
<friend-packages>
<friend>org.netbeans.modules.bugzilla</friend>
<friend>org.netbeans.modules.jira</friend>
<friend>org.netbeans.modules.odcs.tasks</friend>
<friend>org.netbeans.modules.localtasks</friend>
<friend>com.oracle.netbeans.bugdb</friend>
<!-- https://github.com/junichi11/netbeans-github-issues-plugin -->
<friend>com.junichi11.netbeans.github.issues</friend>
<!-- https://github.com/junichi11/netbeans-backlog-plugin -->
<friend>com.junichi11.netbeans.backlog.plugin</friend>
<public-packages>
<package>org.netbeans.modules.bugtracking.issuetable</package>
</friend-packages>
</public-packages>
</data>
</configuration>
</project>
1 change: 1 addition & 0 deletions ide/bugtracking/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.

is.autoload=true
javac.source=1.8
javac.compilerargs=-Xlint -Xlint:-serial

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,10 @@ public static boolean isLocalConnectorID (String connectorID) {
return LOCAL_CONNECTOR_ID.equals(connectorID);
}

public boolean hasRegisteredConnectors() {
return getConnectors().length > 0;
}

public void addPropertyChangeListener(PropertyChangeListener listener) {
support.addPropertyChangeListener(listener);
}
Expand Down

This file was deleted.

Loading
Loading