Skip to content

Commit

Permalink
- remove deprecated internal friend api code
Browse files Browse the repository at this point in the history
 - bump major spec version of versioning.util and mercurial
  • Loading branch information
mbien committed Mar 30, 2024
1 parent 0d9f149 commit a9e073d
Show file tree
Hide file tree
Showing 22 changed files with 23 additions and 827 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,12 @@
* under the License.
*/

package org.netbeans.modules.bugtracking.team;
package org.netbeans.modules.bugtracking.dummies;

import java.util.Collection;
import java.util.Collections;
import org.netbeans.modules.bugtracking.RepositoryImpl;
import org.netbeans.modules.bugtracking.team.TeamRepositories;

/**
* Dummy implementation that returns an empty array of repositories.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
import org.junit.Test;
import org.netbeans.modules.bugtracking.dummies.DummyBugtrackingConnector;
import org.netbeans.modules.bugtracking.dummies.DummyBugtrackingOwnerSupport;
import org.netbeans.modules.bugtracking.team.DummyRepositories;
import org.netbeans.modules.bugtracking.dummies.DummyRepositories;
import org.netbeans.modules.bugtracking.dummies.DummyNode;
import org.netbeans.modules.bugtracking.dummies.DummyTopComponentRegistry;
import org.netbeans.modules.bugtracking.dummies.DummyWindowManager;
Expand Down Expand Up @@ -69,7 +69,8 @@ public class RepositoryComboSupportTest {

@BeforeClass
public static void setLookup() {
MockLookup.setLayersAndInstances(new DummyRepositories(),
MockLookup.setLayersAndInstances(
new DummyRepositories(),
new DummyWindowManager(),
new DummyBugtrackingOwnerSupport(),
new DummyProjectServices(),
Expand Down
1 change: 0 additions & 1 deletion ide/git/src/org/netbeans/modules/git/Annotator.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ public Image annotateIcon(Image icon, VCSContext context) {
for (File file : context.getRootFiles()) {
if (file.isDirectory()) {
folderAnnotation = true;
Utils.addFolderToLog(file);
break;
}
}
Expand Down
13 changes: 3 additions & 10 deletions ide/git/src/org/netbeans/modules/git/ui/blame/TooltipWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@
import org.netbeans.modules.git.Git;
import org.netbeans.modules.git.ui.history.SearchHistoryAction;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.AuthorLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.IssueLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.StyledDocumentHyperlink;
import org.netbeans.modules.versioning.util.VCSHyperlinkProvider;
Expand Down Expand Up @@ -264,15 +263,9 @@ public TooltipContentPanel(JTextComponent parentPane) {
}

// author
{
String author = annotateLine.getAuthor().toString();
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
if (l != null) {
l.insertString(doc, authorStyle);
} else {
doc.insertString(doc.getLength(), author, normalStyle);
}
}
String author = annotateLine.getAuthor().toString();
doc.insertString(doc.getLength(), author, normalStyle);

// date
doc.insertString(doc.getLength(), " ", normalStyle);
doc.insertString(doc.getLength(), DateFormat.getDateInstance().format(new Date(annotateLine.getRevisionInfo().getCommitTime())), normalStyle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,6 @@ public SummaryView(SearchHistoryPanel master, List<? extends LogEntry> results)
this.master = master;
}

@Deprecated(forRemoval = true)
public SummaryView(SearchHistoryPanel master, List<? extends LogEntry> results, Map<String, org.netbeans.modules.versioning.util.VCSKenaiAccessor.KenaiUser> kenaiUserMap) {
this(master, results);
}

private static SummaryViewMaster createViewSummaryMaster (final SearchHistoryPanel master) {
final Map<String, String> colors = Map.of(
"A", GitUtils.getColorString(AnnotationColorProvider.getInstance().ADDED_FILE.getActualColor()),
Expand Down
6 changes: 1 addition & 5 deletions ide/mercurial/nbproject/org-netbeans-modules-mercurial.sig
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#Signature file v4.1
#Version 1.65.0
#Version 1.66.0

CLSS public java.lang.Object
cons public init()
Expand All @@ -22,11 +22,7 @@ meth public static boolean isClientAvailable(boolean)
meth public static boolean isRepository(java.lang.String)
meth public static java.io.File openCloneWizard(java.lang.String,boolean) throws java.net.MalformedURLException
meth public static void addRecentUrl(java.lang.String) throws java.net.MalformedURLException
meth public static void cloneRepository(java.lang.String,java.io.File,java.lang.String,java.lang.String,java.lang.String) throws java.net.MalformedURLException
anno 0 java.lang.Deprecated()
meth public static void cloneRepository(java.lang.String,java.io.File,java.lang.String,java.lang.String,java.lang.String,boolean) throws java.net.MalformedURLException
meth public static void cloneRepository(java.lang.String,java.io.File,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String) throws java.net.MalformedURLException
anno 0 java.lang.Deprecated()
meth public static void cloneRepository(java.lang.String,java.io.File,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,boolean) throws java.net.MalformedURLException
meth public static void commit(java.io.File[],java.lang.String)
meth public static void openCloneWizard(java.lang.String) throws java.net.MalformedURLException
Expand Down
2 changes: 1 addition & 1 deletion ide/mercurial/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ javac.source=1.8
nbm.homepage=http://wiki.netbeans.org/wiki/view/MercurialVersionControl
nbm.module.author=John Rice and Padraig O'Briain
nbm.needs.restart=true
spec.version.base=1.66.0
spec.version.base=2.0.0

#qa-functional
test.qa-functional.cp.extra=${openide.nodes.dir}/modules/org-openide-nodes.jar:\${openide.util.dir}/lib/org-openide-util.jar:${openide.util.ui.dir}/lib/org-openide-util-ui.jar
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ public Image annotateIcon(Image icon, VCSContext context) {
for (File file : context.getRootFiles()) {
if (file.isDirectory()) {
folderAnnotation = true;
Utils.addFolderToLog(file);
break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,38 +61,8 @@
public class Mercurial {

/**
* <p><strong>Depracated</strong>, use {@link #cloneRepository(String,File,String,String,String,boolean)} instead.</p>
* Clones the given repository to the given directory. The method blocks
* until the whole chcekout is done. Do not call in AWT.
* After the clone a scan for netbeans projects will be started.
*
* @param repositoryUrl URL of the Mercurial repository to be cloned
* @param targetDir target where cloned repository should be created
* @param cloneName name of the cloned repository
* (name of the root folder of the clone)
* @param defaultPull initial URL for pulling updates
* @param defaultPush initial URL for pushing updates
*/
@Deprecated
public static void cloneRepository(String repositoryUrl,
File targetDir,
String cloneName,
String defaultPull,
String defaultPush) throws MalformedURLException {
assert !SwingUtilities.isEventDispatchThread() : "Accessing remote repository. Do not call in awt!";
cloneRepository(repositoryUrl,
targetDir,
cloneName,
defaultPull,
defaultPush,
null,
null,
true);
}

/**
* Clones the given repository to the given directory. The method blocks
* until the whole chcekout is done. Do not call in AWT.
* until the whole checkout is done. Do not call in AWT.
*
* @param repositoryUrl URL of the Mercurial repository to be cloned
* @param targetDir target where cloned repository should be created
Expand All @@ -119,43 +89,9 @@ public static void cloneRepository(String repositoryUrl,
scanForProjects);
}

/**
* <p><strong>Depracated</strong>, use {@link #cloneRepository(String,File,String,String,String,String,String,boolean)} instead.</p>
* Clones the given repository to the given directory. The method blocks
* until the whole chcekout is done. Do not call in AWT.
* After the clone a scan for netbeans projects will be started.
*
* @param repositoryUrl URL of the Mercurial repository to be cloned
* @param targetDir target where cloned repository should be created
* @param cloneName name of the cloned repository
* (name of the root folder of the clone)
* @param defaultPull initial URL for pulling updates
* @param defaultPush initial URL for pushing updates
* @param username username for access to the given repository
* @param password password for access to the given repository
*/
@Deprecated
public static void cloneRepository(String repositoryUrl,
File targetDir,
String cloneName,
String pullUrl,
String pushUrl,
String username,
String password)
throws MalformedURLException {
cloneRepository(repositoryUrl,
targetDir,
cloneName,
pullUrl,
pushUrl,
username,
password,
true);
}

/**
* Clones the given repository to the given directory. The method blocks
* until the whole chcekout is done. Do not call in AWT.
* until the whole checkout is done. Do not call in AWT.
*
* @param repositoryUrl URL of the Mercurial repository to be cloned
* @param targetDir target where cloned repository should be created
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
import org.netbeans.modules.mercurial.Mercurial;
import org.netbeans.modules.mercurial.ui.log.LogAction;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.AuthorLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.IssueLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.StyledDocumentHyperlink;
import org.netbeans.modules.versioning.util.VCSHyperlinkProvider;
Expand Down Expand Up @@ -254,15 +253,8 @@ public TooltipContentPanel(JTextComponent parentPane) {
}

// author
{
String author = annotateLine.getAuthor();
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
if (l != null) {
l.insertString(doc, authorStyle);
} else {
doc.insertString(doc.getLength(), author, normalStyle);
}
}
String author = annotateLine.getAuthor();
doc.insertString(doc.getLength(), author, normalStyle);

// date
doc.insertString(doc.getLength(), " ", normalStyle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,9 +596,6 @@ private Image annotateFolderIcon(VCSContext context, Image icon) {
if (info == null) {
filesToRefresh.add(file);
}
if (file.isDirectory()) {
Utils.addFolderToLog(file);
}
}
cache.refreshAsync(filesToRefresh);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.netbeans.api.queries.SharabilityQuery;
import org.netbeans.modules.subversion.config.PasswordFile;
import org.netbeans.modules.subversion.ui.repository.RepositoryConnection;
import org.netbeans.modules.versioning.spi.VersioningSupport;
import org.netbeans.modules.versioning.util.DelayScanRegistry;
import org.netbeans.modules.versioning.util.VCSHyperlinkProvider;
import org.openide.filesystems.FileUtil;
Expand Down Expand Up @@ -478,7 +479,9 @@ public File getTopmostManagedAncestor (File file) {
}
break;
}
if (org.netbeans.modules.versioning.util.Utils.isScanForbidden(file)) break;
if (VersioningSupport.isExcluded(file)) {
break;
}
// is the folder a special one where metadata should not be looked for?
boolean forbiddenFolder = org.netbeans.modules.versioning.util.Utils.isForbiddenFolder(file);
if (!forbiddenFolder && SvnUtils.hasMetadata(file)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@
import javax.swing.text.StyledDocument;
import org.netbeans.modules.subversion.Subversion;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.AuthorLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.IssueLinker;
import org.netbeans.modules.versioning.util.VCSHyperlinkSupport.StyledDocumentHyperlink;
import org.netbeans.modules.versioning.util.VCSHyperlinkProvider;
Expand Down Expand Up @@ -240,15 +239,8 @@ public TooltipContentPanel(JTextComponent parentPane) {
doc.insertString(doc.getLength(), annotateLine.getRevision() + " - ", normalStyle);

// author
{
String author = annotateLine.getAuthor();
StyledDocumentHyperlink l = linkerSupport.getLinker(AuthorLinker.class, 0);
if (l != null) {
l.insertString(doc, authorStyle);
} else {
doc.insertString(doc.getLength(), author, normalStyle);
}
}
String author = annotateLine.getAuthor();
doc.insertString(doc.getLength(), author, normalStyle);

// date
doc.insertString(doc.getLength(), " ", normalStyle);
Expand Down
2 changes: 1 addition & 1 deletion ide/versioning.util/nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ javac.source=11
javac.target=11

javadoc.name=Versioning Support Utilities
spec.version.base=1.94.0
spec.version.base=2.0.0
is.autoload=true

# Fatal error: Fatal error: class javax.net.SocketFactory not found
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ public abstract class AbstractSummaryView implements MouseListener, MouseMotionL
private final VCSHyperlinkSupport linkerSupport = new VCSHyperlinkSupport();
private static final int NEXT_FILES_INITIAL_PAGING = 50;

@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public AbstractSummaryView(SummaryViewMaster master, final List<? extends LogEntry> results, Map<String, org.netbeans.modules.versioning.util.VCSKenaiAccessor.KenaiUser> kenaiUsersMap) {
this(master, results);
}

public AbstractSummaryView(SummaryViewMaster master, final List<? extends LogEntry> results) {
this.master = master;
list = WeakListeners.propertyChange(this, null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,6 @@ public SummaryCellRenderer(AbstractSummaryView summaryView, VCSHyperlinkSupport
searchHiliteAttrs = ((FontColorSettings) MimeLookup.getLookup(MimePath.get("text/x-java")).lookup(FontColorSettings.class)).getFontColors("highlight-search"); //NOI18N
}

@SuppressWarnings("removal")
@Deprecated(forRemoval = true)
public SummaryCellRenderer(AbstractSummaryView summaryView, final VCSHyperlinkSupport linkerSupport, Map<String, org.netbeans.modules.versioning.util.VCSKenaiAccessor.KenaiUser> kenaiUsersMap) {
this(summaryView, linkerSupport);
}

private static Color darker (Color c) {
return darker(c, DARKEN_FACTOR);
}
Expand Down
Loading

0 comments on commit a9e073d

Please sign in to comment.