woproject/projects/wolips/plugins/org.objectstyle.wolips.locate/java/org/objectstyle/wolips/locate/scope ComponentLocateScope.java,1.3,1.4

[email protected]
Newsgroups gmane.comp.web.webobjects.woproject.cvs
Message-ID <[email protected]>
Update of /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.locate/java/org/objectstyle/wolips/locate/scope
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18533/java/org/objectstyle/wolips/locate/scope

Modified Files:
	ComponentLocateScope.java 
Log Message:
Caching of locate results.

Index: ComponentLocateScope.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/wolips/plugins/org.objectstyle.wolips.locate/java/org/objectstyle/wolips/locate/scope/ComponentLocateScope.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- ComponentLocateScope.java	29 Oct 2005 17:22:48 -0000	1.3
+++ ComponentLocateScope.java	25 Jan 2006 08:12:46 -0000	1.4
@@ -2,7 +2,7 @@
  *
  * The ObjectStyle Group Software License, Version 1.0
  *
- * Copyright (c) 2005 The ObjectStyle Group,
+ * Copyright (c) 2005 - 2006 The ObjectStyle Group,
  * and individual authors of the software.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -57,6 +57,7 @@
 
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
+import org.objectstyle.wolips.locate.LocatePlugin;
 
 public class ComponentLocateScope extends DefaultLocateScope {
 
@@ -65,19 +66,11 @@
 				new String[] { name + ".wo" });
 	}
 
-  public static ComponentLocateScope createLocateScope(IProject _project, String _fileNamePossiblyWithExtension) {
-    String fileNameWithoutExtension;
-    int dotIndex = _fileNamePossiblyWithExtension.indexOf('.');
-    if (dotIndex != -1) {
-      fileNameWithoutExtension = _fileNamePossiblyWithExtension.substring(0, dotIndex);
-    }
-    else {
-      fileNameWithoutExtension = _fileNamePossiblyWithExtension;
-    }
-    return new ComponentLocateScope(_project, fileNameWithoutExtension);
-  }
+	public static ComponentLocateScope createLocateScope(IFile file) {
+		String fileNameWithoutExtension = LocatePlugin.getDefault()
+				.fileNameWithoutExtension(file);
 
-  public static ComponentLocateScope createLocateScope(IFile _file) {
-    return ComponentLocateScope.createLocateScope(_file.getProject(), _file.getName());
-  }
+		return new ComponentLocateScope(file.getProject(),
+				fileNameWithoutExtension);
+	}
 }



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.