// final IPath path = file.getFullPath();
final IPreferenceStore store = ExternalToolsPlugin.getDefault()
.getPreferenceStore();
- final String filename = fFileToParse.getLocation().toString();
+ final String filename = fFileToParse.getFullPath().toString();
final String[] arguments = { filename };
final MessageFormat form = new MessageFormat(store
<feature
id="net.sourceforge.phpeclipse.feature"
label="PHPeclipse"
- version="1.2.0.qualifier"
+ version="0.0.0.qualifier"
provider-name="PHPEclipse project team"
image="phpeclipse.jpeg">
<install-handler/>
</license>
<url>
- <update label="PHPEclipse update site" url="http://phpeclipse.sourceforge.net/update/releases/"/>
+ <update label="PHPEclipse Nightly update site" url="http://update.phpeclipse.net/update/nightly"/>
</url>
<requires>
version="0.0.0"/>
<plugin
- id="net.sourceforge.phpeclipse.phphelp"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
id="net.sourceforge.phpeclipse.smarty.ui"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
- id="net.sourceforge.phpeclipse.help"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="net.sourceforge.phpeclipse.debug.core"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="net.sourceforge.phpeclipse.debug.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="net.sourceforge.phpeclipse.xdebug.core"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="net.sourceforge.phpeclipse.xdebug.ui"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="net.sourceforge.phpeclipse.launching"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
- id="net.sourceforge.phpeclipse.phpmanual"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="net.sourceforge.phpeclipse.phpmanual.htmlparser"
+ id="net.sourceforge.phpeclipse.help"
download-size="0"
install-size="0"
version="0.0.0"/>
protected void addToLoadPath(StringBuffer loadPath, IProject project) {
loadPath.append(" -I "
- + osDependentPath(project.getLocation().toOSString()));
+ + osDependentPath(project.getFullPath().toOSString()));
}
protected String osDependentPath(String aPath) {
//return project.getLocation().toOSString() + "/" + getFileName();
IResource file = project.findMember(path);
- return file.getLocation().toOSString();
+ return file.getFullPath().toOSString();
}
public String getFileName() {
IProject project = getProject().getProject();
if (!useRemoteDebugger())
- return project.getLocation().toOSString();
+ return project.getFullPath().toOSString();
else {
try {
return configuration.getAttribute(
if (remoteSourcePath.isPrefixOf (path)) { // Is the server side filename with the remote source path
path = path.removeFirstSegments (remoteSourcePath.matchingFirstSegments (path)); // Remove the remote source path
file = path.toString (); // The filename without the remote source path
- projectPath = (PHPeclipsePlugin.getWorkspace().getRoot().getProject(projectName).getLocation()); // Get the absolute project path
+ projectPath = (PHPeclipsePlugin.getWorkspace().getRoot().getProject(projectName).getFullPath()); // Get the absolute project path
return (projectPath.append (path)).toOSString (); // Return the filename as absolute client side path
}
localPath = new Path (local); // Create new IPath object for the local/client side path
path = localPath.append (path); // Prepend the project relative path to filename
- projectPath = (PHPeclipsePlugin.getWorkspace().getRoot().getProject(projectName).getLocation()); // Get the absolute project path
+ projectPath = (PHPeclipsePlugin.getWorkspace().getRoot().getProject(projectName).getFullPath()); // Get the absolute project path
return (projectPath.append (path)).toOSString (); // Return the filename as absolute client side path
}
IFile[] files = root.findFilesForLocation(filePath);
for (int i = 0; i < files.length; i++) {
if (files[i].getProject().equals(proj)) {
- fileName = proj.getLocation().append(files[i].getProjectRelativePath()).toOSString();
+ fileName = proj.getFullPath().append(files[i].getProjectRelativePath()).toOSString();
break;
}
}
protected void initializeDefaultPreferences(IPreferenceStore store) {
store.setDefault(PHP_LOCALHOST_PREF, "http://localhost");
store.setDefault(PHP_DOCUMENTROOT_PREF, getWorkspace().getRoot()
- .getLocation().toString());
+ .getFullPath().toString());
// store.setDefault(PHP_BOOKMARK_DEFAULT, "");
store.setDefault(PHP_AUTO_PREVIEW_DEFAULT, "false");
store = WebUI.getDefault().getPreferenceStore();
}
// IPath path = file.getFullPath();
- String localhostURL = file.getLocation().toString();
+ String localhostURL = file.getFullPath().toString();
String lowerCaseFileName = localhostURL.toLowerCase();
+ //removed by ed_mann for RSE fixes testing
// String documentRoot =
// store.getString(PHPeclipsePlugin.DOCUMENTROOT_PREF);
- IPath documentRootPath = ProjectPrefUtil.getDocumentRoot(file
- .getProject());
+ //IPath documentRootPath = ProjectPrefUtil.getDocumentRoot(file
+ // .getProject());
+ IPath documentRootPath = file.getProject().getFullPath();
String documentRoot = documentRootPath.toString().toLowerCase();
if (lowerCaseFileName.startsWith(documentRoot)) {
localhostURL = localhostURL.substring(documentRoot.length());
}
// return store.getString(PHPeclipsePlugin.LOCALHOST_PREF) +
// localhostURL;
- return ProjectPrefUtil.getMiscProjectsPreferenceValue(file
- .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF)
- + localhostURL;
+ String projectPath = ProjectPrefUtil.getMiscProjectsPreferenceValue(file
+ .getProject(), IPreferenceConstants.PHP_LOCALHOST_PREF);
+ if(projectPath.endsWith("/") && localhostURL.startsWith("/")) {
+ localhostURL = localhostURL.substring(1);
+ }
+ return projectPath + localhostURL;
}
return "http://localhost";
}
org.eclipse.core.runtime;bundle-version="3.0.0",
org.eclipse.ui;bundle-version="3.0.0",
org.eclipse.ui.ide;bundle-version="3.0.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.4
+Bundle-RequiredExecutionEnvironment: J2SE-1.4,
+ J2SE-1.5
Eclipse-LazyStart: true
public void run(IAction action) {
URL url = null;
try {
- url = new URL("file://" + resource.getLocation());
+ url = new URL("file://" + resource.getFullPath());
WebBrowser.openURL(new WebBrowserEditorInput(url,
WebBrowserEditorInput.SHOW_ALL
| WebBrowserEditorInput.FORCE_NEW_PAGE));
URL url = null;
try {
if (file != null && file.exists())
- url = file.getLocation().toFile().toURL();
+ url = file.getFullPath().toFile().toURL();
} catch (Exception e) {
Trace.trace(Trace.SEVERE, "Error getting URL to file");
}
import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;
-import java.nio.charset.Charset;
import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowser;
import net.sourceforge.phpeclipse.webbrowser.internal.WebBrowserUtil;
boolean doParse = false;
root = null;
if (file != null) {
- String filename = file.getLocation().toString();
+ String filename = file.getFullPath().toString();
int len = filename.length();
if (len >= 4) {
if ((filename.charAt(len - 1) != 'l' && filename
} else { // internal resource (not an IFile or not existing)
IPath location;
if (file.getType() != IResource.FILE
- || (location = file.getLocation()) == null) {
+ || (location = file.getFullPath()) == null) {
throw new CoreException(
new Status(
IStatus.ERROR,
JavaCore.PLUGIN_ID, -1, Util.bind(
"file.notFound", path.toString()), null)); //$NON-NLS-1$
}
- IPath location = file.getLocation();
+ IPath location = file.getFullPath();
if (location == null) {
throw new CoreException(new Status(IStatus.ERROR,
JavaCore.PLUGIN_ID, -1, Util.bind(
if (file != null) {
try {
return new InputStreamReader(new FileInputStream(file
- .getLocation().toString()), file.getCharset());
+ .getFullPath().toString()), file.getCharset());
} catch (UnsupportedEncodingException e) {
// do nothing
} catch (FileNotFoundException e) {
public static String[] getLocationOSStrings(IResource[] resources) {
List result = new ArrayList(resources.length);
for (int i = 0; i < resources.length; i++) {
- IPath location = resources[i].getLocation();
+ IPath location = resources[i].getFullPath();
if (location != null)
result.add(location.toOSString());
}
// PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
String workspaceLocation;
if (fProject != null) {
- workspaceLocation = fProject.getLocation().toString() + '/';
+ workspaceLocation = fProject.getFullPath().toString() + '/';
} else {
// should never happen?
workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
- .getLocation().toString();
+ .getFullPath().toString();
}
String filename = workspaceLocation + fLocation.getFilename();
PHPDocUtil.appendPHPDoc(hoverInfoBuffer, filename, fLocation);
String workspaceLocation;
String workspaceName;
if (fProject != null) {
- workspaceLocation = fProject.getLocation().toString() + '/';
+ workspaceLocation = fProject.getFullPath().toString() + '/';
workspaceName = fProject.getName().toString() + '/';
} else {
// should never happen?
workspaceLocation = PHPeclipsePlugin.getWorkspace().getRoot()
- .getLocation().toString();
+ .getFullPath().toString();
workspaceName = workspaceLocation;
}
String filename = fLocation.getFilename();
return null;
}
- String projectPath = project.getLocation().toString();
+ String projectPath = project.getFullPath().toString();
String filePath = absoluteFilePath.toString().substring(
projectPath.length() + 1);
return project.getFile(filePath);
if (!absolute) {
IFile ifile = FileBuffers.getWorkspaceFileAtLocation(path);
if (ifile != null) {
- file = ifile.getFullPath().toFile();
- if (file.exists()) {
- return true;
- }
+ IResource resource = ifile;
+ if (resource.exists()) {
+ return true;
+ }
}
}
return false;
}
} catch (CoreException e) {
String msg = "Project: "
- + project.getLocation().toOSString()
+ + project.getFullPath().toOSString()
+ " CoreException " + e.getMessage();
result.addError(msg);
} catch (Exception e) {
String msg = "Project: "
- + project.getLocation().toOSString()
+ + project.getFullPath().toOSString()
+ " Exception " + e.getMessage();
result.addError(msg);
}
}
} catch (CoreException e) {
String msg = "Workspace: "
- + rootContainer.getLocation().toOSString()
+ + rootContainer.getFullPath().toOSString()
+ " CoreException " + e.getMessage();
result.addError(msg);
}
search(project, result);
}
} catch (CoreException e) {
- String msg = "Project: " + project.getLocation().toOSString()
+ String msg = "Project: " + project.getFullPath().toOSString()
+ " CoreException " + e.getMessage();
result.addError(msg);
} catch (Exception e) {
- String msg = "Project: " + project.getLocation().toOSString()
+ String msg = "Project: " + project.getFullPath().toOSString()
+ " Exception " + e.getMessage();
result.addError(msg);
}
}
} catch (InvalidInputException e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " InvalidInputException " + e.getMessage();
status.addError(msg);
} catch (SyntaxError e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " SyntaxError " + e.getMessage();
status.addError(msg);
}
} catch (Exception e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " Exception " + e.getMessage();
status.addError(msg);
}
.getLength(), result);
}
} catch (CoreException e) {
- String msg = "Project: " + project.getLocation().toOSString()
+ String msg = "Project: " + project.getFullPath().toOSString()
+ " CoreException " + e.getMessage();
result.addError(msg);
} catch (Exception e) {
- String msg = "Project: " + project.getLocation().toOSString()
+ String msg = "Project: " + project.getFullPath().toOSString()
+ " Exception " + e.getMessage();
result.addError(msg);
}
}
} catch (InvalidInputException e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " InvalidInputException " + e.getMessage();
status.addError(msg);
} catch (SyntaxError e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " SyntaxError " + e.getMessage();
status.addError(msg);
}
}
} catch (InvalidInputException e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " InvalidInputException " + e.getMessage();
status.addError(msg);
} catch (SyntaxError e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " SyntaxError " + e.getMessage();
status.addError(msg);
}
} catch (Exception e) {
- String msg = "File: " + file.getLocation().toOSString()
+ String msg = "File: " + file.getFullPath().toOSString()
+ " Exception " + e.getMessage();
status.addError(msg);
}
}
private void parseIdentifiers(char[] charArray) {
- char[] ident;
IFile file;
- String identifier;
- int counter = 0;
-
Scanner scanner = new Scanner(false, false, false, false, true, null,
null, true /* taskCaseSensitive */);
scanner.setSource(charArray);
char[] includeName = scanner
.getCurrentStringLiteralSource();
try {
+ System.out.println(includeName);
file = getIncludeFile(new String(includeName));
addFile(file);
} catch (Exception e) {
public IFile getIncludeFile(String relativeFilename) {
IContainer container = getWorkingLocation(fEditorInput);
- String fullPath = fProject.getLocation().toString();
IFile file = null;
if (relativeFilename.startsWith("../")) {
Path path = new Path(relativeFilename);
if (list != null && list.size() > 0) {
// String workspaceLocation =
// PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
- String workspaceLocation = fProject.getLocation()
+ String workspaceLocation = fProject.getFullPath()
.toString()
+ java.io.File.separatorChar;
// PHPeclipsePlugin.getWorkspace().getRoot()
// .getLocation().toString();
- String workspaceLocation = fProject.getLocation().toString()
+ String workspaceLocation = fProject.getFullPath().toString()
+ java.io.File.separatorChar;
// TODO show all entries of the list in a dialog box
// at the moment always the first entry will be opened
private IFile getIncludeFile(IProject project,
IFileEditorInput editorInput, String relativeFilename) {
IContainer container = getWorkingLocation(editorInput);
- String fullPath = project.getLocation().toString();
+ String fullPath = project.getFullPath().toString();
IFile file = null;
if (relativeFilename.startsWith("../")) {
Path path = new Path(relativeFilename);
if (list != null && list.size() > 0) {
// String workspaceLocation =
// PHPeclipsePlugin.getWorkspace().getRoot().getLocation().toString();
- String workspaceLocation = fProject.getLocation()
+ String workspaceLocation = fProject.getFullPath()
.toString()
+ File.separatorChar;
}
private File getTemplateFile() {
- IPath path = fProject.getLocation();
+ IPath path = fProject.getFullPath();
// PHPeclipsePlugin.getDefault().getStateLocation();
path = path.append(TEMPLATE_FILE);
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IPath testPath = new Path(targetDirectory);
- if (root.getLocation().isPrefixOf(testPath))
+ if (root.getFullPath().isPrefixOf(testPath))
return ObfuscatorExportMessages.getString("FileExport.rootName"); //$NON-NLS-1$
IProject[] projects = root.getProjects();
for (int i = 0; i < projects.length; i++) {
- if (projects[i].getLocation().isPrefixOf(testPath))
+ if (projects[i].getFullPath().isPrefixOf(testPath))
return projects[i].getName();
}
StringBuffer hoverInfoBuffer = new StringBuffer();
String workspaceLocation;
if (fProject != null) {
- workspaceLocation = fProject.getLocation()
+ workspaceLocation = fProject.getFullPath()
.toString() + '/';
} else {
// should never happen?
workspaceLocation = PHPeclipsePlugin
.getWorkspace().getRoot()
- .getLocation().toString();
+ .getFullPath().toString();
}
// boolean foundPHPdoc = false;
for (int i = 0; i < list.size(); i++) {