Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 44167 Details for
Bug 145842
TVT3.2:TCT870: Wrong reading order of path/file names
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
apply patch to workbench and ide
145842.txt (text/plain), 9.92 KB, created by
Karice McIntyre
on 2006-06-12 14:21:56 EDT
(
hide
)
Description:
apply patch to workbench and ide
Filename:
MIME Type:
Creator:
Karice McIntyre
Created:
2006-06-12 14:21:56 EDT
Size:
9.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.ide >Index: src/org/eclipse/ui/internal/ide/model/WorkbenchFile.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/internal/ide/model/WorkbenchFile.java,v >retrieving revision 1.8 >diff -u -r1.8 WorkbenchFile.java >--- src/org/eclipse/ui/internal/ide/model/WorkbenchFile.java 8 May 2006 20:54:13 -0000 1.8 >+++ src/org/eclipse/ui/internal/ide/model/WorkbenchFile.java 12 Jun 2006 18:23:30 -0000 >@@ -14,6 +14,7 @@ > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.content.IContentType; > import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.ui.ISharedImages; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.ide.IDE; >@@ -22,7 +23,14 @@ > * An IWorkbenchAdapter that represents IFiles. > */ > public class WorkbenchFile extends WorkbenchResource { >- /** >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.internal.ide.model.WorkbenchResource#getLabel(java.lang.Object) >+ */ >+ public String getLabel(Object o) { >+ return TextProcessor.process(super.getLabel(o)); >+ } >+ >+ /** > * Answer the appropriate base image to use for the passed resource, optionally > * considering the passed open status as well iff appropriate for the type of > * passed resource >Index: src/org/eclipse/ui/views/properties/FilePropertySource.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/FilePropertySource.java,v >retrieving revision 1.7 >diff -u -r1.7 FilePropertySource.java >--- src/org/eclipse/ui/views/properties/FilePropertySource.java 8 May 2006 20:54:14 -0000 1.7 >+++ src/org/eclipse/ui/views/properties/FilePropertySource.java 12 Jun 2006 18:23:30 -0000 >@@ -15,6 +15,8 @@ > import org.eclipse.core.resources.IFile; > import org.eclipse.core.resources.IResource; > import org.eclipse.core.runtime.IPath; >+import org.eclipse.jface.viewers.IBasicPropertyConstants; >+import org.eclipse.osgi.util.TextProcessor; > > /** > * The FilePropertySource gives the extra information that is shown for files >@@ -64,8 +66,9 @@ > * Method declared on IPropertySource. > */ > public Object getPropertyValue(Object key) { >- >- Object returnValue = super.getPropertyValue(key); >+ Object returnValue = (key.equals(IBasicPropertyConstants.P_TEXT)) ? TextProcessor >+ .process(element.getName()) >+ : super.getPropertyValue(key); > > if (returnValue != null) { > return returnValue; >@@ -84,23 +87,23 @@ > private String getSizeString(IFile file) { > if (!file.isLocal(IResource.DEPTH_ZERO)) { > return NOT_LOCAL_TEXT; >- } else { >- IPath location = file.getLocation(); >- if (location == null) { >- if (file.isLinked()) { >- return UNDEFINED_PATH_VARIABLE; >- } >- >- return FILE_NOT_FOUND; >- } else { >- File localFile = location.toFile(); >- >- if (localFile.exists()) { >- return Long.toString(localFile.length()); >- } >- return FILE_NOT_FOUND; >- } >+ } >+ >+ IPath location = file.getLocation(); >+ if (location == null) { >+ if (file.isLinked()) { >+ return UNDEFINED_PATH_VARIABLE; >+ } >+ >+ return FILE_NOT_FOUND; >+ } >+ >+ File localFile = location.toFile(); >+ >+ if (localFile.exists()) { >+ return Long.toString(localFile.length()); > } >+ return FILE_NOT_FOUND; > } > > } >Index: src/org/eclipse/ui/views/properties/ResourcePropertySource.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.ide/src/org/eclipse/ui/views/properties/ResourcePropertySource.java,v >retrieving revision 1.14 >diff -u -r1.14 ResourcePropertySource.java >--- src/org/eclipse/ui/views/properties/ResourcePropertySource.java 8 May 2006 20:54:14 -0000 1.14 >+++ src/org/eclipse/ui/views/properties/ResourcePropertySource.java 12 Jun 2006 18:23:30 -0000 >@@ -19,6 +19,7 @@ > import org.eclipse.core.runtime.Assert; > import org.eclipse.core.runtime.IPath; > import org.eclipse.jface.viewers.IBasicPropertyConstants; >+import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.ui.internal.views.properties.IDEPropertiesMessages; > > /** >@@ -155,14 +156,13 @@ > } > > return FILE_NOT_FOUND; >- } else { >- File localFile = location.toFile(); >- if (localFile.exists()) { >- DateFormat format = new SimpleDateFormat(); >- return format.format(new Date(localFile.lastModified())); >- } >- return FILE_NOT_FOUND; >+ } >+ File localFile = location.toFile(); >+ if (localFile.exists()) { >+ DateFormat format = new SimpleDateFormat(); >+ return format.format(new Date(localFile.lastModified())); > } >+ return FILE_NOT_FOUND; > } > > /* (non-Javadoc) >@@ -187,18 +187,17 @@ > } > if (location == null) { > return FILE_NOT_FOUND; >- } else { >- String locationString = location.toOSString(); >- if (resolvedLocation != null && !isPathVariable(resource)) { >- // No path variable used. Display the file not exist message >- // in the location. Fixes bug 33318. >- File file = resolvedLocation.toFile(); >- if (!file.exists()) { >- locationString += " " + FILE_NOT_EXIST_TEXT; //$NON-NLS-1$ >- } >+ } >+ String locationString = location.toOSString(); >+ if (resolvedLocation != null && !isPathVariable(resource)) { >+ // No path variable used. Display the file not exist message >+ // in the location. Fixes bug 33318. >+ File file = resolvedLocation.toFile(); >+ if (!file.exists()) { >+ locationString += " " + FILE_NOT_EXIST_TEXT; //$NON-NLS-1$ > } >- return locationString; > } >+ return locationString; > } > > /** >@@ -217,15 +216,14 @@ > } > > return FILE_NOT_FOUND; >- } else { >- String locationString = location.toOSString(); >- File file = location.toFile(); >+ } >+ String locationString = location.toOSString(); >+ File file = location.toFile(); > >- if (!file.exists()) { >- locationString += " " + FILE_NOT_EXIST_TEXT; //$NON-NLS-1$ >- } >- return locationString; >+ if (!file.exists()) { >+ locationString += " " + FILE_NOT_EXIST_TEXT; //$NON-NLS-1$ > } >+ return locationString; > } > > /* (non-Javadoc) >@@ -234,9 +232,8 @@ > public IPropertyDescriptor[] getPropertyDescriptors() { > if (isPathVariable(element)) { > return propertyDescriptorsLinkVariable; >- } else { >- return propertyDescriptors; > } >+ return propertyDescriptors; > } > > /* (non-Javadoc) >@@ -247,17 +244,16 @@ > return element.getName(); > } > if (name.equals(IResourcePropertyConstants.P_PATH_RES)) { >- return element.getFullPath().toString(); >+ return TextProcessor.process(element.getFullPath().toString()); > } > if (name.equals(IResourcePropertyConstants.P_LAST_MODIFIED_RES)) { > return getDateStringValue(element); > } > if (name.equals(IResourcePropertyConstants.P_EDITABLE_RES)) { >- if (element.isReadOnly()) { >+ if (element.getResourceAttributes().isReadOnly()) { > return IDEPropertiesMessages.ResourceProperty_false; >- } else { >- return IDEPropertiesMessages.ResourceProperty_true; >- } >+ } >+ return IDEPropertiesMessages.ResourceProperty_true; > } > if (name.equals(IResourcePropertyConstants.P_DERIVED_RES)) { > return String.valueOf(element.isDerived()); >@@ -266,10 +262,10 @@ > return String.valueOf(element.isLinked()); > } > if (name.equals(IResourcePropertyConstants.P_LOCATION_RES)) { >- return getLocationText(element); >+ return TextProcessor.process(getLocationText(element)); > } > if (name.equals(IResourcePropertyConstants.P_RESOLVED_LOCATION_RES)) { >- return getResolvedLocationText(element); >+ return TextProcessor.process(getResolvedLocationText(element)); > } > return null; > } >@@ -336,9 +332,8 @@ > IPath location = resource.getLocation(); > if (location == null) { > return null; >- } else { >- return location.toFile(); > } >+ return location.toFile(); > } > > } >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/ReopenEditorMenu.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/ReopenEditorMenu.java,v >retrieving revision 1.14 >diff -u -r1.14 ReopenEditorMenu.java >--- Eclipse UI/org/eclipse/ui/internal/ReopenEditorMenu.java 25 Feb 2005 20:52:12 -0000 1.14 >+++ Eclipse UI/org/eclipse/ui/internal/ReopenEditorMenu.java 12 Jun 2006 18:23:31 -0000 >@@ -20,6 +20,7 @@ > import org.eclipse.jface.dialogs.MessageDialog; > import org.eclipse.jface.util.SafeRunnable; > import org.eclipse.osgi.util.NLS; >+import org.eclipse.osgi.util.TextProcessor; > import org.eclipse.swt.SWT; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; >@@ -165,7 +166,7 @@ > } > } > } >- return sb.toString(); >+ return TextProcessor.process(sb.toString(), TextProcessor.getDefaultDelimiters() + "]");//$NON-NLS-1$ > } > > /**
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 145842
:
43760
|
43761
|
44011
| 44167 |
49177
|
49183