From e21098473777126a170c63d24cebdcf722ca643f Mon Sep 17 00:00:00 2001 From: Alex Coles Date: Sun, 23 Mar 2008 11:57:09 +0100 Subject: [PATCH] Added missing API dependency (for Turbo API). Temporarily commented out AnnotationMark dependencies on Private API. --- nbproject/project.properties | 1 - nbproject/project.xml | 9 ++++++++ .../netbeans/modules/git/DiskMapTurboProvider.java | 4 +++- src/org/netbeans/modules/git/FileStatusCache.java | 4 +++- .../modules/git/ui/annotate/AnnotationMark.java | 25 +++++++++++----------- .../git/ui/annotate/AnnotationMarkInstaller.java | 24 ++++++++++++--------- .../git/ui/annotate/AnnotationMarkProvider.java | 6 +++--- 7 files changed, 45 insertions(+), 28 deletions(-) diff --git a/nbproject/project.properties b/nbproject/project.properties index 0fce95e..ec04c31 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -4,6 +4,5 @@ javahelp.base=org/netbeans/modules/git/docs javahelp.hs=git.hs license.file=LICENSE nbm.homepage=http://open.ikonoklastik.com/ -#nbm.homepage=http://wiki.netbeans.org/wiki/view/MercurialVersionControl nbm.module.author=Alex Coles nbm.needs.restart=true diff --git a/nbproject/project.xml b/nbproject/project.xml index 37f9218..d5ce862 100644 --- a/nbproject/project.xml +++ b/nbproject/project.xml @@ -77,6 +77,15 @@ + org.netbeans.modules.editor.lib2 + + + + 1 + 1.6.0.2 + + + org.netbeans.modules.editor.mimelookup diff --git a/src/org/netbeans/modules/git/DiskMapTurboProvider.java b/src/org/netbeans/modules/git/DiskMapTurboProvider.java index a4c8d50..1cc29ec 100644 --- a/src/org/netbeans/modules/git/DiskMapTurboProvider.java +++ b/src/org/netbeans/modules/git/DiskMapTurboProvider.java @@ -59,7 +59,9 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; import java.util.logging.Level; - +import org.netbeans.modules.turbo.TurboProvider; +import org.openide.filesystems.FileUtil; +import org.openide.filesystems.Repository; /** * Storage of file attributes with shortcut to retrieve all stored values. diff --git a/src/org/netbeans/modules/git/FileStatusCache.java b/src/org/netbeans/modules/git/FileStatusCache.java index d6b5dcd..bb6ab08 100644 --- a/src/org/netbeans/modules/git/FileStatusCache.java +++ b/src/org/netbeans/modules/git/FileStatusCache.java @@ -54,6 +54,8 @@ import java.util.Set; import java.util.logging.Level; import org.netbeans.modules.git.util.GitCommand; import org.netbeans.modules.git.util.GitUtils; +import org.netbeans.modules.turbo.CustomProviders; +import org.netbeans.modules.turbo.Turbo; import org.netbeans.modules.versioning.Utils; import org.netbeans.modules.versioning.spi.VCSContext; import org.netbeans.modules.versioning.spi.VersioningSupport; @@ -712,7 +714,7 @@ public class FileStatusCache { // Only interested in looking for Hg managed dirs for (File file : files) { if (file.isDirectory() && hg.getTopmostManagedParent(file) != null){ - if (hg.isAdministrative(file) || HgUtils.isIgnored(file)){ + if (hg.isAdministrative(file) || GitUtils.isIgnored(file)){ Git.LOG.log(Level.FINE, "scanFolder NotMng Ignored Dir {0}: exclude SubDir: {1}", // NOI18N new Object[]{dir.getAbsolutePath(), file.getName()}); folderFiles.put(file, FILE_INFORMATION_EXCLUDED_DIRECTORY); // Excluded dir diff --git a/src/org/netbeans/modules/git/ui/annotate/AnnotationMark.java b/src/org/netbeans/modules/git/ui/annotate/AnnotationMark.java index dd6732e..0534b74 100644 --- a/src/org/netbeans/modules/git/ui/annotate/AnnotationMark.java +++ b/src/org/netbeans/modules/git/ui/annotate/AnnotationMark.java @@ -42,14 +42,15 @@ package org.netbeans.modules.git.ui.annotate; import java.awt.Color; -import org.netbeans.modules.editor.errorstripe.privatespi.Mark; -import org.netbeans.modules.editor.errorstripe.privatespi.Status; + +//import org.netbeans.modules.editor.errorstripe.privatespi.Mark; +//import org.netbeans.modules.editor.errorstripe.privatespi.Status; /** * * @author Maros Sandor */ -final class AnnotationMark implements Mark { +final class AnnotationMark { //implements Mark { private static final Color COLOR = new Color(0x58,0x90,0xBE); @@ -73,15 +74,15 @@ final class AnnotationMark implements Mark { return COLOR; } - public int getPriority() { - return PRIORITY_DEFAULT; - } + //public int getPriority() { + // return PRIORITY_DEFAULT; + //} - public Status getStatus() { - return Status.STATUS_OK; - } + // public Status getStatus() { + // return Status.STATUS_OK; + // } - public int getType() { - return TYPE_ERROR_LIKE; - } + //public int getType() { + // return TYPE_ERROR_LIKE; + //} } \ No newline at end of file diff --git a/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkInstaller.java b/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkInstaller.java index 9e78618..029172e 100644 --- a/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkInstaller.java +++ b/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkInstaller.java @@ -42,25 +42,29 @@ package org.netbeans.modules.git.ui.annotate; import javax.swing.text.JTextComponent; -import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; -import org.netbeans.modules.editor.errorstripe.privatespi.MarkProviderCreator; +//import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; +//import org.netbeans.modules.editor.errorstripe.privatespi.MarkProviderCreator; /** * ErrorStripe SPI entry point registered at layer. * * @author Maros Sandor */ -public final class AnnotationMarkInstaller implements MarkProviderCreator { +public final class AnnotationMarkInstaller { //implements MarkProviderCreator { private static final Object PROVIDER_KEY = new Object(); - public MarkProvider createMarkProvider(JTextComponent pane) { - AnnotationMarkProvider amp = new AnnotationMarkProvider(); - pane.putClientProperty(PROVIDER_KEY, amp); - return amp; + static AnnotationMarkProvider getMarkProvider(JTextComponent textComponent) { + throw new UnsupportedOperationException("Not yet implemented"); } + + // public MarkProvider createMarkProvider(JTextComponent pane) { + // AnnotationMarkProvider amp = new AnnotationMarkProvider(); + // pane.putClientProperty(PROVIDER_KEY, amp); + // return amp; + // } - public static AnnotationMarkProvider getMarkProvider(JTextComponent pane) { - return (AnnotationMarkProvider) pane.getClientProperty(PROVIDER_KEY); - } + // public static AnnotationMarkProvider getMarkProvider(JTextComponent pane) { + // return (AnnotationMarkProvider) pane.getClientProperty(PROVIDER_KEY); + //} } \ No newline at end of file diff --git a/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkProvider.java b/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkProvider.java index a734568..974f4bc 100644 --- a/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkProvider.java +++ b/src/org/netbeans/modules/git/ui/annotate/AnnotationMarkProvider.java @@ -43,7 +43,7 @@ package org.netbeans.modules.git.ui.annotate; import java.util.Collections; import java.util.List; -import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; +//import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; /** * ErrorStripe liason, real work is done in AnnotationBar. @@ -51,14 +51,14 @@ import org.netbeans.modules.editor.errorstripe.privatespi.MarkProvider; * @author Petr Kuzel */ @SuppressWarnings("unchecked") // Get name clashes with Mark and AnnotationMark - final class AnnotationMarkProvider extends MarkProvider { + final class AnnotationMarkProvider { //extends MarkProvider { private List marks = Collections.emptyList(); public void setMarks(List marks) { List old = this.marks; this.marks = marks; - firePropertyChange(PROP_MARKS, old, marks); + // firePropertyChange(PROP_MARKS, old, marks); } public synchronized List/*Mark*/ getMarks() { -- 2.11.4.GIT