Main /
EclipseMembersSortOrderAn attempt at customizing Eclipse's "Members Sort Order".The Eclipse cleanup facility can sort the members of a class. The sort order is controlled by (Mac OS X) Preferences -> Java -> Appearance -> Sort Order. The sort order is:
There is a checkbox for "Sort Members in same category by visibility" which has the following order:
Unfortunately, the Ptolemy II coding standard at http://ptolemy.eecs.berkeley.edu/ptolemyII/ptIIlatest/ptII/doc/coding/style.htm has a different order. Arguably, the Ptolemy coding standard should change, but perhaps it is possible to change the order in Eclipse. The Ptolemy order is: public class ClassName ... { constructors /////////////////////////////////////////////////////////////////// //// public variables //// public variables, in alphabetical order /////////////////////////////////////////////////////////////////// //// public methods //// public methods, in alphabetical order /////////////////////////////////////////////////////////////////// //// protected methods //// protected methods, in alphabetical order /////////////////////////////////////////////////////////////////// //// protected variables //// protected variables, in alphabetical order /////////////////////////////////////////////////////////////////// //// private methods //// private methods, in alphabetical order /////////////////////////////////////////////////////////////////// //// private variables //// private variables, in alphabetical order } The primary difference between the two classifications is that the Ptolemy style has all the public fieldds and methods first, then the protected methods and fields and then the private methods and fields. Types, Statics and Initializers are not specified. So, the order for Ptolemy might be:
Types (inner classes) and Statics would probably go in the appropriate visibility section:
The Problem StatementModify the sort order so that we can specify the visibility of the members. Current statusEclipse bugs
Building Eclipse under Mac OS X
The
Problems./build: line 55: [: missing `]'Problem: During build: ./build: line 55: [: missing `]' Solution: change [ "$os-$ws-$arch" = "hpux-motif-ia64_32"] to [ "$os-$ws-$arch" = "hpux-motif-ia64_32" ] Error occurred while transforming repository.Problem: During build of BUILD FAILED /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:56: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:122: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:103: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/build.xml:78: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/master-ecf/customTargets.xml:10: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/genericTargets.xml:59: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/fetch_master-ecf.xml:10: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/fetch_master-ecf.xml:44: Error occurred while transforming repository. Initial Solution: http://old.nabble.com/trouble-building-Eclipse-SDK-3.5.1-from-source-td26715114.html " * replace all instances of "fullmoon.ottawa.ibm.com" with "www.eclipse.org/external" in src/maps/org.eclipse.releng/maps/orbit.map (this was necessary to avoid "Error occurred while transforming repository." problems which would otherwise halt the build)
Real Solution: Don't use cvs problemThe problem: fetchElement: [eclipse.fetch] Could not retrieve feature.xml and/or build.properties: cvs exited with error code 1 [eclipse.fetch] Command line was [Executing 'cvs' with arguments: [eclipse.fetch] '-d:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse' [eclipse.fetch] '-q' [eclipse.fetch] 'export' [eclipse.fetch] '-r' [eclipse.fetch] 'v20080717' [eclipse.fetch] 'org.eclipse.sdk.examples-feature/feature.xml' [eclipse.fetch] [eclipse.fetch] The ' characters around the executable and arguments are [eclipse.fetch] not part of the command. Looks like a problem on the cvs server: bash-3.2$ touch foo bash-3.2$ cvs -t -d:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse -q export -r v20080717 org.eclipse.sdk.examples-feature/feature.xml -> main: Session ID is ufBZKuOL4ClLOefu -> main loop with CVSROOT=/cvsroot/eclipse -> parse_tagdate ((null), (null), v20080717) -> safe_location( where=(null) ) -> open_connection_to_server (:pserver:anonymous@dev.eclipse.org:/cvsroot/eclipse) -> Connecting to dev.eclipse.org(206.191.52.50):2401. can't create temporary directory /tmp/cvs-serv32602 No space left on device bash-3.2$ df -k /tmp Filesystem 1024-blocks Used Available Capacity Mounted on /dev/disk0s2 195025072 83067088 111701984 43% / bash-3.2$ The problem was likely on the Eclipse CVS server. After waiting, the problem went away.
One issue is that it seems like even though I downloaded the SDK with source, the build is still using CVS. What if I was connected via a slow connection?
The Eclipse3.6M4 #uncomment skipFetch if you are running the eclipse-sourceBuild-srcIncluded-${buildId}.zip #skipFetch=true References to win32 and linuxProblem: The /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:57: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:109: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/build.xml:34: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/build.xml:36: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/build.xml:105: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/master/customTargets.xml:18: The following error occurred while executing this line: /Users/cxh/src/eclipse/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/master/allElements.xml:16: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/genericTargets.xml:114: The following error occurred while executing this line: /Users/cxh/src/eclipse/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/genericTargets.xml:124: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/compile.master.xml:7: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml:138: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.win32.win32.x86_64/build.xml:65: srcdir "/Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.win32.win32.x86_64/src/Eclipse SWT Accessibility/win32" does not exist! The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml:149: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.x86_64/build.xml:65: srcdir "/Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.x86_64/src/Eclipse SWT/emulated/bidi" does not exist! The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml:150: The following error occurred while executing this line: /Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.s390x/build.xml:66: srcdir "/Users/cxh/src/eclipse/src/plugins/org.eclipse.swt.gtk.linux.s390x/src/Eclipse SWT Mozilla/gtk" does not exist! Solution? Try 3.6M4 3.6M4 fails: buildScripts/src/maps/org.eclipse.releng/maps not foundBUILD FAILED /Users/cxh/src/eclipse3.6M4/buildScripts/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:54: The following error occurred while executing this line: /Users/cxh/src/eclipse3.6M4/buildScripts/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:117: The following error occurred while executing this line: /Users/cxh/src/eclipse3.6M4/buildScripts/eclipse/plugins/org.eclipse.pde.build_3.6.0.v20091204/scripts/build.xml:76: The following error occurred while executing this line: /Users/cxh/src/eclipse3.6M4/buildScripts/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/sdk.examples/customTargets.xml:102: /Users/cxh/src/eclipse3.6M4/buildScripts/src/maps/org.eclipse.releng/maps not found. Total time: 0 seconds Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.core.internal.refresh.RefreshJob Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.core.internal.refresh.RefreshJob An error has occurred. See the log file /Users/cxh/Documents/workspace/.metadata/.log. Solution: Try the 3.5.1 again 3.5.1: Can't find org.eclipse.ecf.provider.filetransfer.source_3.0.0.qualifierBuild with /Users/cxh/src/eclipse3.5.1/buildScripts/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:56: The following error occurred while executing this line: /Users/cxh/src/eclipse3.5.1/buildScripts/org.eclipse.releng.eclipsebuilder/buildFromSource.xml:130: The following error occurred while executing this line: /Users/cxh/src/eclipse3.5.1/buildScripts/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/build.xml:91: The following error occurred while executing this line: /Users/cxh/src/eclipse3.5.1/buildScripts/org.eclipse.releng.eclipsebuilder/eclipse/buildConfigs/sdk/customTargets.xml:13: The following error occurred while executing this line: /Users/cxh/src/eclipse3.5.1/buildScripts/eclipse/plugins/org.eclipse.pde.build_3.5.1.R35x_20090820/scripts/genericTargets.xml:106: Unable to find plug-in: org.eclipse.ecf.source_3.0.0.v20090831-1906. Please check the error log for more details. Solution: build 3.5.1 from the "Source Build (Source fetched via CVS)" and replace Real solution: It looks like the jar file is missing? cd eclipse/plugins/ wget http://kde.mirrors.tds.net/pub/eclipse.org/rt/ecf/integration/platform/v2009-08-31_12-00-11/plugins/org.eclipse.ecf.filetransfer.source_3.0.0.v20090831-1906.jar Could not create feature[eclipse.buildScript] Could not create feature: file:/Users/cxh/src/eclipse3.5.1/buildScripts/src/features/org.eclipse.equinox.p2.user.ui.source/feature.xml. [eclipse.buildScript] XML document structures must start and end within the same entity. [eclipse.buildScript] Could not create feature: file:/Users/cxh/src/eclipse3.5.1/buildScripts/org.eclipse.releng.eclipsebuilder/../src/features/org.eclipse.equinox.p2.user.ui.source/feature.xml. [eclipse.buildScript] Could not create feature: file:/Users/cxh/src/eclipse3.5.1/buildScripts/src/features/org.eclipse.equinox.p2.user.ui.source/feature.xml. Solution: it looks like bash-3.2$ cat /Users/cxh/src/eclipse3.5.1/buildScripts/src/features/org.eclipse.equinox.p2.user.ui.source/*.xml <?xml version="1.0" encoding="UTF-8"?> <feature id="org.eclipse.equinox.p2.user.ui.source" version="1.2.0.v20090729-7u7AFm3FbPbJP5rV7cCTt6x" label="%featureName" provider-name="%providerName" image="eclipse_update_120.jpg" > <description > %description </description> <copyright > %copyright </copyright> <license url="%licenseURL"> %license </license> bash-3.2$ So I removed the Can't find ecf.provider.filetransfer.source_3.0.0 and httpclient.source_3.0.0Problem: [eclipse.buildScript] Unable to find plug-in: org.eclipse.ecf.provider.filetransfer.source_3.0.0.qualifier. Please check the error log for more details. [eclipse.buildScript] Unable to find plug-in: org.eclipse.ecf.provider.filetransfer.httpclient.source_3.0.0.qualifier. Please check the error log for more details. Solution, unjar the 3.0.1 version of these files, change the manifest and create new versions cd src/plugins mkdir tmp cd tmp jar -xf ../org.eclipse.ecf.provider.filetransfer.httpclient.source_3.0.1.v20090831-1906.jar # Edit META-INF/MANIFEST and change 3.0.1 to 3.0.0 jar -cmf META-INF/MANIFEST.MF ../org.eclipse.ecf.provider.filetransfer.httpclient.source_3.0.1.v20090831-1906.jar . rm -rf * # do the same for filetransfer.source_3.0.0 Real Solution: It turns out that these messages can be ignored. I suspect that my problem was that Eclipse files that are involved in the Members Sort Order
The plan: Add a bunch of constants to represent the members at a finer level of detail. The visibility option will be ignored. This is a hack. |