--- a/JUnitTestCaseProxy.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JUnitTestCaseProxy.st Wed Jan 16 16:24:02 2013 +0000
@@ -181,8 +181,13 @@
!JUnitTestCaseProxy class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
JUnitTestCaseProxy initialize!
--- a/Java.st Tue Jan 15 18:40:37 2013 +0000
+++ b/Java.st Wed Jan 16 16:24:02 2013 +0000
@@ -4,7 +4,7 @@
New code and modifications done at SWING Research Group [1]:
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
+ SWING Research Group, Czech Technical University in Prague
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -22,13 +22,13 @@
Object subclass:#Java
instanceVariableNames:''
- classVariableNames:'Classes UnresolvedClassRefs Release ClassPath ClassPathPackages
- ClassPathExt ExtensionsPath ExtensionsPathPackages
- SourceDirectories SourceDirectoriesPackages CacheDirectory
- JavaHome InternedStrings Java_lang_String Java_lang_Class
- PrettyPrintStyle LastArgumentString Threads ExcludedClassPath
- FailedToLoadClasses SourceCache SourceArchiveCache
- JavaClassLoaderQuerySignal ClassLoaderQuerySignal ThreadsAccess'
+ classVariableNames:'Classes UnresolvedClassRefs Release RootBundle ClassPath
+ SourcePath ClassPathExt ExtensionsPath ExtensionsPathPackages
+ CacheDirectory JavaHome InternedStrings Java_lang_String
+ Java_lang_Class PrettyPrintStyle LastArgumentString Threads
+ ExcludedClassPath FailedToLoadClasses SourceCache
+ SourceArchiveCache JavaClassLoaderQuerySignal
+ ClassLoaderQuerySignal ThreadsAccess'
poolDictionaries:''
category:'Languages-Java-Support'
!
@@ -42,7 +42,7 @@
New code and modifications done at SWING Research Group [1]:
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
+ SWING Research Group, Czech Technical University in Prague
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -69,14 +69,14 @@
"HACK, required to load extensions methods"
cls := JavaClassQuery query: (aString copyReplaceAll:$. with: $/).
cls isNil ifTrue:[
- cls := JavaVM classForName: aString.
+ cls := JavaVM classForName: aString.
].
^cls.
"Modified: / 08-11-2012 / 00:25:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-classNamed: aString
+classNamed: aString
^JavaVM classNamed: aString.
!
@@ -111,8 +111,8 @@
internedString := InternedStrings at:stString ifAbsent:nil.
internedString isNil ifTrue:[
- InternedStrings at:stString put:aJavaString.
- internedString := aJavaString
+ InternedStrings at:stString put:aJavaString.
+ internedString := aJavaString
].
^ internedString
@@ -121,7 +121,7 @@
javaExtDirs
- ^Java release javaExtDirs
+ ^Java release javaExtDirs
"/ ,{
"/ ((Smalltalk packageDirectoryForPackageId: 'stx:libjava') asFilename
"/ / 'java' / 'libs') }.
@@ -131,7 +131,7 @@
java_lang_Class
Java_lang_Class isNil ifTrue:[
- Java_lang_Class := self at:'java.lang.Class'
+ Java_lang_Class := self at:'java.lang.Class'
].
^ Java_lang_Class
@@ -141,7 +141,7 @@
java_lang_String
Java_lang_String isNil ifTrue: [
- Java_lang_String := JavaVM classNamed: 'java/lang/String'.
+ Java_lang_String := JavaVM classNamed: 'java/lang/String'.
].
^ Java_lang_String.
@@ -167,13 +167,13 @@
Release := aJavaRelease.
"
- Java release: JavaRelease openJDK6.
- Java release: JavaRelease sunJDK6.
-
+ Java release: JavaRelease openJDK6.
+ Java release: JavaRelease sunJDK6.
+
"
"Created: / 22-11-2010 / 12:38:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 30-11-2010 / 11:54:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-01-2013 / 17:59:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
systemPropertyAt:key put:something
@@ -187,7 +187,7 @@
update: what with: param from: sender
what == #restarted ifTrue:[
- self reinitialize.
+ self reinitialize.
]
"Created: / 14-12-2010 / 21:00:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -218,7 +218,7 @@
initAllStaticFields
self allClassesDo:[:cls |
- cls initializeStaticFields
+ cls initializeStaticFields
]
!
@@ -228,28 +228,28 @@
system := JavaVM classForName: 'java.lang.System'.
system isNil ifTrue: [
- "/ JavaVM initializeVM.
- "/ system := Java at:'java.lang.System'.
- "/ system isNil ifTrue:[
- self warn: 'JavaVM: no ''' , 'java.lang.System' allBold , ''' class.'.
-
+ "/ JavaVM initializeVM.
+ "/ system := Java at:'java.lang.System'.
+ "/ system isNil ifTrue:[
+ self warn: 'JavaVM: no ''' , 'java.lang.System' allBold , ''' class.'.
+
"/ self error:'no ''java.lang.System'' class'.
-
- ^
+
+ ^
"/ ].
- self
+ self
].
system classInit.
(system implements: #'initializeSystemClass()V') ifTrue: [
- system "invokeStatic:" perform: #'initializeSystemClass()V'.
+ system "invokeStatic:" perform: #'initializeSystemClass()V'.
].
"
Java initSystemClass
(Java at:'java.lang.System')
- perform:#'getProperty(Ljava/lang/String;)Ljava/lang/String;'
- with:(Java as_String:'java.home')"
+ perform:#'getProperty(Ljava/lang/String;)Ljava/lang/String;'
+ with:(Java as_String:'java.home')"
"Modified: / 10.11.1998 / 12:39:58 / cg"
!
@@ -257,14 +257,17 @@
JavaNativeMethod flushAllCachedNativeMethods.
InternedStrings := Dictionary new.
FailedToLoadClasses := nil.
- ClassPath := UserPreferences current javaClassPath decodeAsLiteralArray asOrderedCollection.
ClassPathExt := nil.
ExcludedClassPath := OrderedCollection new.
SourceCache := CacheDictionary new: 32.
SourceArchiveCache := CacheDictionary new: 32.
- SourceDirectories := UserPreferences current javaSourcePath decodeAsLiteralArray asOrderedCollection.
+
Threads := IdentityDictionary new.
+ RootBundle := JavaRootBundle new.
+ ClassPath := OrderedCollection new. "/ for ad-hoc packages
+ SourcePath := OrderedCollection new."/ for ad-hoc packages
+
ThreadsAccess := RecursionLock forMutualExclusion.
self initializeRelease. "lazy initialization of Release"
self initializePrettyPrintStyle.
@@ -280,7 +283,7 @@
"Created: / 03-10-2010 / 15:54:02 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 15-10-2010 / 17:37:20 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 09-12-2011 / 13:16:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-07-2012 / 12:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:44:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initializePrettyPrintStyle
@@ -302,13 +305,13 @@
initializeRelease
Release isNil ifTrue:[
- self reinitializeRelease.
+ self reinitializeRelease.
].
"
- Release := nil.
- self initializeRelease.
- Release
+ Release := nil.
+ self initializeRelease.
+ Release
"
"Created: / 22-11-2010 / 13:41:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -337,7 +340,7 @@
"Kludge"
JavaMethod reinitialize.
- JavaMethodWithException reinitialize.
+ JavaMethodWithException reinitialize.
JavaMethodWithHandler reinitialize.
JavaNativeMethod reinitialize.
JavaNativeMethod flushAllCachedNativeMethods.
@@ -354,55 +357,56 @@
reinitializeRelease
- | nm |
+ | nm |
"Ask preferences if preffered release is set"
nm := UserPreferences current javaReleaseSelector.
- nm notNil ifTrue:[
- Release := JavaRelease perform: nm asSymbol ifNotUnderstood:[JavaRelease any]
- ] ifFalse:[
- Release := JavaRelease any
- ]
+ Release := nm notNil
+ ifTrue:[JavaRelease perform: nm asSymbol ifNotUnderstood:[JavaRelease any]]
+ ifFalse:[Release := JavaRelease any].
+
+
"
- Release := nil.
- self initializeRelease.
- Release
+ Release := nil.
+ self initializeRelease.
+ Release
"
"Created: / 26-07-2012 / 23:58:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-01-2013 / 17:59:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
startupJavaSystem
| javaEventThread haveEventThread haveScreenUpdater |
FailedToLoadClasses := nil.
-
+
"/
"/ check if already running
"/
-
+
haveEventThread := true.
javaEventThread := JavaVM javaEventThread.
(javaEventThread isNil or: [ javaEventThread isDead ]) ifTrue: [
- haveEventThread := false
+ haveEventThread := false
].
haveScreenUpdater := false.
haveEventThread ifTrue: [
- self threadsDo: [
- :aJavaThread |
- aJavaThread name = 'JAVA-Screen Updater' ifTrue: [
- aJavaThread isDead ifFalse: [
- "/ already running
- haveScreenUpdater := true
- ]
- ]
- ].
+ self threadsDo: [
+ :aJavaThread |
+ aJavaThread name = 'JAVA-Screen Updater' ifTrue: [
+ aJavaThread isDead ifFalse: [
+ "/ already running
+ haveScreenUpdater := true
+ ]
+ ]
+ ].
].
(haveEventThread and: [ haveScreenUpdater ]) ifTrue: [ ^ self ].
JavaClass orderOfClassInits isNil ifTrue: [
- "/ the very first start ...
- 'JAVA [info]: (re)initializing JAVA environment completely ...'
- infoPrintCR.
- JavaVM initializeVM.
+ "/ the very first start ...
+ 'JAVA [info]: (re)initializing JAVA environment completely ...'
+ infoPrintCR.
+ JavaVM initializeVM.
] ifFalse: [ JavaVM initializeVMIfNoEventThreadRunning ].
'JAVA [info]: done JAVA initialization.' infoPrintCR.
@@ -419,45 +423,45 @@
myself := Processor activeProcess.
threadsToKill := IdentitySet new.
Threads do: [
- :aJavaThread |
- aJavaThread ~~ myself ifTrue: [
- (aJavaThread isNil or: [ aJavaThread == 0 ]) ifFalse: [
- (aJavaThread isMemberOf: JavaProcess) ifTrue: [
- aJavaThread isDead ifFalse: [ threadsToKill add: aJavaThread ]
- ]
- ]
- ]
+ :aJavaThread |
+ aJavaThread ~~ myself ifTrue: [
+ (aJavaThread isNil or: [ aJavaThread == 0 ]) ifFalse: [
+ (aJavaThread isMemberOf: JavaProcess) ifTrue: [
+ aJavaThread isDead ifFalse: [ threadsToKill add: aJavaThread ]
+ ]
+ ]
+ ]
].
threadsToKill size > 0 ifTrue: [
- Logger
- log: 'Killing ' , threadsToKill size printString , ' java processes'
- severity: #info
- facility: #JVM.
- semaphore := Semaphore new: 1 - threadsToKill size.
- semaphore name: 'Java thread killer'.
- threadsToKill do: [
- :aThread |
- aThread == JavaVM javaScreenUpdaterThread ifTrue: [ self halt ].
- aThread == JavaVM javaEventQueueThread ifTrue: [ self halt ].
- aThread
- addExitAction: [
- Logger
- log: 'Java thread killed successfully'
- severity: #info
- facility: #JVM.
- semaphore signal
- ].
-
- aThread terminate
- ].
- semaphore wait.
+ Logger
+ log: 'Killing ' , threadsToKill size printString , ' java processes'
+ severity: #info
+ facility: #JVM.
+ semaphore := Semaphore new: 1 - threadsToKill size.
+ semaphore name: 'Java thread killer'.
+ threadsToKill do: [
+ :aThread |
+ aThread == JavaVM javaScreenUpdaterThread ifTrue: [ self halt ].
+ aThread == JavaVM javaEventQueueThread ifTrue: [ self halt ].
+ aThread
+ addExitAction: [
+ Logger
+ log: 'Java thread killed successfully'
+ severity: #info
+ facility: #JVM.
+ semaphore signal
+ ].
+
+ aThread terminate
+ ].
+ semaphore wait.
].
JavaVM releaseAllMonitors.
- Logger
- log: 'No Java threads running at this point'
- severity: #info
- facility: #JVM.
-
+ Logger
+ log: 'No Java threads running at this point'
+ severity: #info
+ facility: #JVM.
+
Threads := nil.
"
@@ -479,9 +483,9 @@
dumpConfig
Transcript notNil ifTrue:[
- self dumpConfigOn: Transcript
+ self dumpConfigOn: Transcript
] ifFalse:[
- self dumpConfigOn: Stdout
+ self dumpConfigOn: Stdout
]
"Created: / 10-12-2011 / 12:54:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -497,12 +501,12 @@
JavaVM initializeSystemPropertiesInto: props.
stream nextPutAll: '== Initial system properties =='; cr.
props keysAndValuesDo:[:key :value|
- '%-30s : %s' printf: { key . value } on: stream.
- stream cr.
+ '%-30s : %s' printf: { key . value } on: stream.
+ stream cr.
].
"
- Java dumpConfigOn: Transcript.
+ Java dumpConfigOn: Transcript.
"
"Created: / 10-12-2011 / 12:54:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
@@ -568,34 +572,34 @@
"Modified: 7.8.1997 / 21:22:05 / cg"
!
-as_Hashtable: aDictionary
+as_Hashtable: aDictionary
"given a smalltalk dictionary, create and return
a Java hashTable for it"
-
+
| hashTable |
hashTable := (JavaVM classForName: 'java.util.Hashtable') new.
- aDictionary
- keysAndValuesDo: [
- :k :v |
- | sk sv jk jv |
+ aDictionary
+ keysAndValuesDo: [
+ :k :v |
+ | sk sv jk jv |
- (sk := k) isSymbol ifTrue: [ sk := sk asString ].
- (sv := v) isSymbol ifTrue: [ sv := sv asString ].
- jk := self as_Object: sk.
- jv := self as_Object: sv.
- hashTable
- perform: #'put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;'
- with: jk
- with: jv.
- ].
+ (sk := k) isSymbol ifTrue: [ sk := sk asString ].
+ (sv := v) isSymbol ifTrue: [ sv := sv asString ].
+ jk := self as_Object: sk.
+ jv := self as_Object: sv.
+ hashTable
+ perform: #'put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;'
+ with: jk
+ with: jv.
+ ].
^ hashTable
"
Java as_Hashtable:(Dictionary new
- at:'hello' put:'Hallo';
- at:'world' put:'Welt';
- yourself)"
+ at:'hello' put:'Hallo';
+ at:'world' put:'Welt';
+ yourself)"
"Modified: / 14.1.1998 / 17:02:13 / cg"
!
@@ -620,10 +624,10 @@
"convert an ST-Object into a Java Object"
anObject isString ifTrue:[
- ^ self as_String:anObject
+ ^ self as_String:anObject
].
anObject isInteger ifTrue:[
- ^ self as_Integer:anObject
+ ^ self as_Integer:anObject
].
self halt.
@@ -636,40 +640,40 @@
"Modified: 7.8.1997 / 21:20:07 / cg"
!
-as_ST_String: aJavaString
+as_ST_String: aJavaString
"hard-coding internas of java.lang.String here is bad ..."
-
+
| str count offs start stop |
aJavaString isNil ifTrue: [ ^ nil ].
-
+
"/ count := aJavaString instVarNamed:'count'.
-
+
count := aJavaString instVarAt: 3+1"lockWord".
-
+
"/ str := aJavaString instVarNamed:'value'
-
+
str := aJavaString instVarAt: 1+1"lockWord".
- str size == count
- ifTrue:
- [ "cos I don't see any reason to do this"
- "/ ^ str asOneByteString.
- ^ str ].
-
+ str size == count
+ ifTrue:
+ [ "cos I don't see any reason to do this"
+ "/ ^ str asOneByteString.
+ ^ str ].
+
"/ offs := (aJavaString instVarNamed:'offset').
-
+
offs := aJavaString instVarAt: 2+1"lockWord".
-
+
"/ start := offs + 1.
-
+
start := offs + 1.
-
+
"/ stop := start + (aJavaString instVarNamed:'count') - 1.
-
+
stop := start + count - 1.
-
+
"/ ^ ((aJavaString instVarNamed:'value') copyFrom:start to:stop) asString
-
+
^ (str copyFrom: start to: stop) asOneByteString
"Created: / 08-08-1997 / 12:02:55 / cg"
@@ -712,9 +716,9 @@
"/ kludge for volume
OperatingSystem isMSDOSlike ifTrue:[
- ((s size > 1) and:[(s at:2) == $:]) ifTrue:[
- s := 'file:' , (s copy at:2 put:$|)
- ]
+ ((s size > 1) and:[(s at:2) == $:]) ifTrue:[
+ s := 'file:' , (s copy at:2 put:$|)
+ ]
].
u := (self at:'java.net.URL') newCleared.
u perform:#'<init>(Ljava/lang/String;)V' with:(self as_String:s).
@@ -734,8 +738,8 @@
cacheDirectory
CacheDirectory ifNil:[
- CacheDirectory := Filename homeDirectory / '.smalltalk' / 'libjava' / 'caches' /
- (((Smalltalk at:#stx_libjava) svnRepositoryUrlBase copyReplaceAll:$/ with:$_) replaceAll:$: with:$_)
+ CacheDirectory := Filename homeDirectory / '.smalltalk' / 'libjava' / 'caches' /
+ (((Smalltalk at:#stx_libjava) svnRepositoryUrlBase copyReplaceAll:$/ with:$_) replaceAll:$: with:$_)
].
^CacheDirectory
@@ -744,40 +748,18 @@
!
classPath
-
- ^ ClassPath ,
- self classPathFromEnvironment ,
- self classPathFromPackages .
-
-
-"/
-"/ ^ "for testing only"
-"/ "/Release classPath,
-"/
-"/ {(packagePath / 'java' / 'libjava-projects' / 'Conversion' / 'bin')
-"/ pathName.
-"/ (packagePath / 'java' / 'libjava-support' / 'bin') pathName}
-"/ , ((packagePath / 'java' / 'libs') directoryContentsAsFilenames
-"/ select:[:f | f suffix = 'jar']
-"/ thenCollect:[:f | f pathName])
-"/ , (ClassPath ? #()) , cp
-"/
- "
- Java classPath
- "
+ ^ClassPath
"Created: / 07-02-1997 / 19:23:45 / cg"
- "Modified: / 13-12-2011 / 23:56:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:45:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
classPath:aCollectionOfPaths
- ClassPath := aCollectionOfPaths asOrderedCollection.
- self classPathInRuntime: ClassPath.
- FailedToLoadClasses := nil
+ ClassPath := aCollectionOfPaths
"Created: / 07-02-1997 / 19:23:45 / cg"
"Modified: / 17-09-1998 / 20:44:09 / cg"
- "Modified: / 02-08-2012 / 21:59:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:44:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
classPathAsString
@@ -787,7 +769,7 @@
!
effectiveClassPath
- ^self effectiveClassPathForRelease: Release
+ ^RootBundle classPath , self classPath
"
Java effectiveClassPath
@@ -795,8 +777,7 @@
"Created: / 22-11-2010 / 13:03:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 17-01-2011 / 09:44:16 / kursjan <kursjan@fit.cvut.cz>"
- "Modified: / 27-07-2012 / 18:31:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified (format): / 06-09-2012 / 11:19:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:45:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
effectiveExtensionsPath
@@ -815,12 +796,13 @@
!
effectiveSourceDirectories
- ^self effectiveSourceDirectoriesForRelease: Release
+ ^RootBundle sourcePath , SourcePath
"
- Java effectiveSourceDirectories
+ Java effectiveSourceDirectories
"
"Created: / 30-11-2010 / 11:53:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:46:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
excludedClassPath
@@ -835,7 +817,7 @@
nm := fileName asFilename pathName.
ExcludedClassPath do:[:excludedPath |
- (nm startsWith:excludedPath) ifTrue:[^ true].
+ (nm startsWith:excludedPath) ifTrue:[^ true].
].
^ false
@@ -862,35 +844,86 @@
!
sourcePath
- ^
- SourceDirectories ? #() ,
- self sourcePathFromPackages
+ ^SourcePath
"Created: / 16-01-1998 / 13:26:55 / cg"
- "Modified: / 14-12-2011 / 20:00:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:45:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Java class methodsFor:'paths-adding & removing'!
-addToClassPath:pathOrCollection
- ^self addToClassPath:pathOrCollection origin: JavaPathElement originUser
+addToClassPath:pathOrCollection
+ ^ self addToPath:ClassPath path:pathOrCollection
"Created: / 01-08-1997 / 21:10:07 / cg"
"Modified: / 17-09-1998 / 20:43:55 / cg"
- "Modified: / 27-07-2012 / 12:06:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-12-2011 / 00:04:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addToPath:cp filesMatching:pattern in:path
+ |dir|
+
+ dir := path asFilename.
+ dir exists ifFalse:[ ^ self ].
+ dir directoryContents do:[:fname |
+ (fname matches:pattern) ifTrue:[
+ |p|
+
+ p := (dir / fname) pathName.
+ (cp includes:p) ifFalse:[
+ cp add:p.
+ cp == ClassPath ifTrue:[
+ self addToClassPathInRuntime:p.
+ ].
+ FailedToLoadClasses := nil
+ ]
+ ]
+ ].
+
+ "Created: / 14-12-2011 / 00:04:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+addToPath:cp path:pathOrCollection
+ |path|
+
+ (pathOrCollection isSequenceable and:[pathOrCollection isCharacters not]) ifTrue:[
+ pathOrCollection do:[:each |
+ self addToPath:cp path:each
+ ].
+ ^ self.
+ ].
+ path := pathOrCollection asFilename.
+ (pathOrCollection asString includes:$*) ifTrue:[
+ self
+ addToPath:cp
+ filesMatching:path baseName
+ in:path directoryName.
+ ] ifFalse:[
+ (ClassPath includes:pathOrCollection asString) ifFalse:[
+ cp add:pathOrCollection asString.
+ cp == ClassPath ifTrue:[
+ self addToClassPathInRuntime:pathOrCollection.
+ ].
+ FailedToLoadClasses := nil
+ ]
+ ]
+
+ "Created: / 01-08-1997 / 21:10:07 / cg"
+ "Modified: / 17-09-1998 / 20:43:55 / cg"
+ "Created: / 14-12-2011 / 00:03:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
addToSourcePath:pathOrCollection
- self addToSourcePath:pathOrCollection origin: JavaPathElement originUser
+ self addToPath: SourcePath path: pathOrCollection
"Created: / 02-08-1997 / 14:12:31 / cg"
- "Modified: / 27-07-2012 / 12:02:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 14-12-2011 / 00:08:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
removeFromClassPath:aPath
(ClassPath includes:aPath) ifTrue:[
- ClassPath remove:aPath
+ ClassPath remove:aPath
]
"Modified: 7.2.1997 / 19:23:55 / cg"
@@ -899,7 +932,7 @@
removeFromSourcePath:aPath
(SourceDirectories includes:aPath) ifTrue:[
- SourceDirectories remove:aPath
+ SourceDirectories remove:aPath
]
"Modified: 7.2.1997 / 19:23:55 / cg"
@@ -908,25 +941,7 @@
!Java class methodsFor:'paths-utils'!
-addToClassPath:pathOrCollection name: name
- ^self addToClassPath:pathOrCollection name: name origin: JavaPathElement originUser
-
- "Created: / 22-08-2012 / 06:25:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToClassPath:pathOrCollection name: name origin: origin
- ^ self addToPath:ClassPath path:pathOrCollection origin: origin name: name
-
- "Created: / 22-08-2012 / 06:27:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToClassPath:pathOrCollection origin: origin
- ^ self addToPath:ClassPath path:pathOrCollection origin: origin
-
- "Created: / 27-07-2012 / 12:05:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToClassPathInRuntime: aPath
+addToClassPathInRuntime: aPath
| path file url scl |
"Java might not be loaded/or initialized, in this case
@@ -936,8 +951,8 @@
scl isNil ifTrue:[ ^self ].
path := Java as_String: aPath asString.
file := ((JavaVM at: 'java.io.File') new)
- perform: #'<init>(Ljava/lang/String;)V' with: path;
- yourself.
+ perform: #'<init>(Ljava/lang/String;)V' with: path;
+ yourself.
url := file perform: #'toURL()Ljava/net/URL;'.
scl perform: #'addURL(Ljava/net/URL;)V' with: url.
@@ -946,137 +961,7 @@
"Created: / 07-08-2011 / 14:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-addToPath:cp filesMatching:pattern in:path origin: origin name: namePrefix
- |dir|
-
- dir := path asFilename.
- dir exists ifFalse:[ ^ self ].
- dir directoryContents do:[:fname |
- (fname matches:pattern) ifTrue:[
- | f p nm |
-
- p := (f := dir / fname) pathName.
- namePrefix notNil ifTrue:[
- nm := namePrefix , ' - ' , f baseName
- ] ifFalse:[
- nm := f baseName.
- ].
- self addToPath: cp pathElement:(JavaPathElement new: p origin: origin name: nm).
- ]
- ].
-
- "Created: / 22-08-2012 / 06:33:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToPath:cp path:pathOrCollection origin: origin
- ^self addToPath:cp path:pathOrCollection origin: origin name: nil
-
- "Created: / 27-07-2012 / 12:04:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToPath:cp path:pathOrCollection origin: origin name: name
- |path|
-
- (pathOrCollection isSequenceable and:[pathOrCollection isCharacters not]) ifTrue:[
- pathOrCollection do:[:each |
- | nm |
-
- nm := name.
- (name notNil and:[(name includesAny: '?*') not]) ifTrue:[
- nm := name , ' - ' , each asFilename baseName.
- ].
- self addToPath:cp path: each origin: origin name: nm.
- ].
- ^ self.
- ].
- path := pathOrCollection asFilename.
- (pathOrCollection asString includes:$*) ifTrue:[
- "Glob-style pattern, expand..."
- self
- addToPath:cp
- filesMatching:path baseName
- in:path directoryName
- origin: origin
- name: name.
- ] ifFalse:[
- "Single path"
- self addToPath: cp pathElement:(JavaPathElement new: pathOrCollection asString origin: origin name: name).
-
- ]
-
- "Created: / 10-08-2012 / 19:06:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToPath:cp pathElement: element
- (cp contains:[:each|each pathName = element pathName]) ifFalse:[
- cp add: element.
- cp == ClassPath ifTrue:[
- self addToClassPathInRuntime:element pathName.
- FailedToLoadClasses := nil.
- UserPreferences current javaClassPath: (cp literalArrayEncoding)
- ] ifFalse:[
- cp == SourceDirectories ifTrue:[
- UserPreferences current javaSourcePath: (cp literalArrayEncoding)
- ]
- ].
- ].
-
- "Created: / 27-07-2012 / 12:39:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToSourcePath:pathOrCollection name: name
-
- self addToSourcePath:pathOrCollection origin: JavaPathElement originUser name: name
-
- "Created: / 22-08-2012 / 06:27:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToSourcePath:pathOrCollection origin: origin
- self addToPath: SourceDirectories path: pathOrCollection origin: origin
-
- "Created: / 27-07-2012 / 11:49:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-addToSourcePath:pathOrCollection origin: origin name: name
- self addToPath: SourceDirectories path: pathOrCollection origin: origin name: name
-
- "Created: / 22-08-2012 / 06:27:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-classPathFromEnvironment
-
- | classpath |
-
- classpath := OperatingSystem getEnvironment:'CLASSPATH'.
- classpath isEmptyOrNil ifTrue:[ ^ #() ].
- ^(classpath
- tokensBasedOn:OperatingSystem pathSeparator)
- collect:[:path| JavaPathElement newFromEnvironment: path]
-
- "Modified: / 27-07-2012 / 12:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-classPathFromPackages
-
- ClassPathPackages isNil ifTrue:[
- ClassPathPackages := OrderedCollection new.
- ProjectDefinition allSubclassesDo:[:pkg|
- self addToPath: ClassPathPackages path: pkg javaClassPath origin: JavaPathElement originPackage name: pkg package
- ].
- ].
- ^ClassPathPackages
-
-
- "
- Java classPathFromPackages
- Java addToClassPath: Java classPathFromPackages
- "
-
- "Created: / 07-02-1997 / 19:23:45 / cg"
- "Created: / 13-12-2011 / 23:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-classPathInRuntime: classPath
+classPathInRuntime: classPath
"Sets the classpath in already booted/running Java environment"
| urls ucp scl |
@@ -1088,13 +973,13 @@
urls := (Java classForName:'java.net.URL') javaArrayClass new: classPath size.
classPath withIndexDo:[:element :index|
- | path file url |
- path := Java as_String: element pathName.
- file := ((JavaVM at: 'java.io.File') new)
- perform: #'<init>(Ljava/lang/String;)V' with: path;
- yourself.
- url := file perform: #'toURL()Ljava/net/URL;'.
- urls at: index put: url
+ | path file url |
+ path := Java as_String: element pathName.
+ file := ((JavaVM at: 'java.io.File') new)
+ perform: #'<init>(Ljava/lang/String;)V' with: path;
+ yourself.
+ url := file perform: #'toURL()Ljava/net/URL;'.
+ urls at: index put: url
].
ucp := (Java classForName:'sun.misc.URLClassPath') new.
ucp perform: #'<init>([Ljava/net/URL;)V' with: urls.
@@ -1103,65 +988,29 @@
"Created: / 02-08-2012 / 16:04:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-effectiveClassPathForRelease: release
-
- ClassPathExt ifNil:[
- ClassPathExt := OrderedCollection new.
- self javaExtDirs do:[:dir|
- dir isDirectory ifTrue:[
- dir directoryContentsAsFilenamesDo:[:file|
- file suffix = 'jar' ifTrue:[
- ClassPathExt add: file pathName
- ]
- ]
- ]
- ]
- ].
-
- ^release classPath , "ClassPathExt ," self classPath
-
- "
- Java effectiveClassPath
- "
-
- "Created: / 27-07-2012 / 18:31:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
effectiveExtensionsPathForRelease: aRelease
^ (ExtensionsPath ? #()) ,
- self extensionsPathFromPackages
+ self extensionsPathFromPackages
"Created: / 06-09-2012 / 11:27:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-effectiveSourceDirectoriesForRelease: release
-
- ^release sourcePath ,
- self sourcePath
-
- "
- Java effectiveSourceDirectories
- "
-
- "Created: / 27-07-2012 / 18:31:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
extensionsPathFromPackages
ExtensionsPathPackages isNil ifTrue:[
- ExtensionsPathPackages := OrderedCollection new.
- Smalltalk allProjectIDs do:[:pkg|
- | dir |
+ ExtensionsPathPackages := OrderedCollection new.
+ Smalltalk allProjectIDs do:[:pkg|
+ | dir |
- dir := Smalltalk packageDirectoryForPackageId: pkg.
- dir notNil ifTrue:[
- dir := dir asFilename / 'java' / 'extensions'.
- dir exists ifTrue:[
- ExtensionsPathPackages add: dir
- ].
- ]
- ].
+ dir := Smalltalk packageDirectoryForPackageId: pkg.
+ dir notNil ifTrue:[
+ dir := dir asFilename / 'java' / 'extensions'.
+ dir exists ifTrue:[
+ ExtensionsPathPackages add: dir
+ ].
+ ]
+ ].
].
^ExtensionsPathPackages.
@@ -1171,46 +1020,23 @@
"
- Java extensionsPathFromPackages
+ Java extensionsPathFromPackages
"
"Created: / 06-09-2012 / 11:30:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-sourceDirectories
- ^ SourceDirectories
-!
-
sourceDirectories:aCollectionOfPaths
SourceDirectories := aCollectionOfPaths asOrderedCollection
"
Java
- sourceDirectories:#(
- '/phys/ibm3/java/src'
- )
+ sourceDirectories:#(
+ '/phys/ibm3/java/src'
+ )
"
-!
-
-sourcePathFromPackages
-
- SourceDirectoriesPackages isNil ifTrue:[
- SourceDirectoriesPackages := OrderedCollection new.
- ProjectDefinition allSubclassesDo:[:pkg|
- self addToPath: SourceDirectoriesPackages path: pkg javaSourcePath origin: JavaPathElement originPackage name: pkg package
- ].
- ].
- ^SourceDirectoriesPackages.
-
-
- "
- Java sourcePathFromPackages
- "
-
- "Created: / 07-02-1997 / 19:23:45 / cg"
- "Created: / 14-12-2011 / 19:59:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Java class methodsFor:'queries'!
@@ -1230,7 +1056,7 @@
smalltalkDerefType:typeString
(typeString startsWith:'[') ifTrue:[
- ^ typeString copyFrom:2
+ ^ typeString copyFrom:2
].
self halt.
@@ -1239,8 +1065,8 @@
!Java class methodsFor:'registering java classes'!
-at: aJavaName
-
+at: aJavaName
+
^JavaVM at: aJavaName.
"Modified: / 18-07-1998 / 22:55:16 / cg"
@@ -1260,7 +1086,7 @@
self flushClasses.
JavaVM registry flush.
JavaVM reflection notNil ifTrue:[
- JavaVM reflection flush.
+ JavaVM reflection flush.
].
InternedStrings := Dictionary new.
SourceCache := CacheDictionary new: 32.
@@ -1269,25 +1095,25 @@
ClassPathPackages := nil.
JavaMonitor initialize.
Smalltalk garbageCollect.
- ObjectMemory
- allObjectsDo: [:someObject |
- someObject isBehavior ifTrue: [
- someObject isJavaClass ifTrue: [
- | cp |
+ ObjectMemory
+ allObjectsDo: [:someObject |
+ someObject isBehavior ifTrue: [
+ someObject isJavaClass ifTrue: [
+ | cp |
- cp := someObject constantPool.
- Class flushSubclassInfoFor: someObject.
- 1 to: cp size do:[:i|cp at: i put: nil].
- someObject setConstantPool: nil.
- someObject setInterfaces: nil.
- someObject setMethodDictionary: (MethodDictionary new).
- Logger
- log: 'flushing ' , someObject fullName
- severity: #info
- facility: 'JVM'.
- ]
- ].
- ].
+ cp := someObject constantPool.
+ Class flushSubclassInfoFor: someObject.
+ 1 to: cp size do:[:i|cp at: i put: nil].
+ someObject setConstantPool: nil.
+ someObject setInterfaces: nil.
+ someObject setMethodDictionary: (MethodDictionary new).
+ Logger
+ log: 'flushing ' , someObject fullName
+ severity: #info
+ facility: 'JVM'.
+ ]
+ ].
+ ].
JavaVM releasehSystemClassLoader.
JavaVM releasehSmalltalkClassLoader.
Class flushSubclassInfoFor: JavaObject.
@@ -1295,7 +1121,7 @@
GroovyCompiler flushGroovyClassLoader.
JavaClass flushClassesInitOrder.
JavaVM finalizationLobby notNil ifTrue:[
- JavaVM finalizationLobby stopFinalizationProcess
+ JavaVM finalizationLobby stopFinalizationProcess
]
"
@@ -1310,9 +1136,9 @@
UnresolvedClassRefs := nil.
JavaVM flushClasses.
Smalltalk keysAndValuesDo:[:name :class |
- class isJavaClass ifTrue:[
- Smalltalk removeKey: name.
- ]
+ class isJavaClass ifTrue:[
+ Smalltalk removeKey: name.
+ ]
].
Smalltalk removeKey:#'JAVA'.
@@ -1333,7 +1159,7 @@
markAllClassesUninitialized
self allClassesDo:[:aJavaClass |
- aJavaClass markUninitialized
+ aJavaClass markUninitialized
].
"
@@ -1345,11 +1171,11 @@
('JAVA: remember unresolved class: ' , anUnresolvedClassRef fullName) infoPrintCR.
UnresolvedClassRefs isNil ifTrue:[
- UnresolvedClassRefs := Dictionary new.
+ UnresolvedClassRefs := Dictionary new.
].
- UnresolvedClassRefs
- at:anUnresolvedClassRef fullName
- put:anUnresolvedClassRef
+ UnresolvedClassRefs
+ at:anUnresolvedClassRef fullName
+ put:anUnresolvedClassRef
"Created: / 18.4.1996 / 00:05:31 / cg"
"Modified: / 19.10.1998 / 20:57:44 / cg"
@@ -1361,16 +1187,16 @@
|javaName sym cls p ns|
self breakPoint: #jv.
- self breakPoint: #mh.
+ self breakPoint: #mh.
javaName := aJavaClass fullName.
sym := javaName asSymbolIfInterned.
sym notNil ifTrue:[
- cls := JavaVM classForName: sym definedBy: aJavaClass classLoader.
+ cls := JavaVM classForName: sym definedBy: aJavaClass classLoader.
].
(cls notNil and:[cls == aJavaClass]) ifTrue:[
- self updateClassRefsFrom:aJavaClass to:nil.
+ self updateClassRefsFrom:aJavaClass to:nil.
].
Smalltalk removeKey:('JAVA::' , javaName) asSymbol.
Smalltalk removeKey:javaName asSymbol.
@@ -1381,10 +1207,10 @@
p := aJavaClass nameSpacePath.
p knownAsSymbol ifTrue:[
- ns := Smalltalk at:p asSymbol.
- (ns notNil and:[ns isNameSpace]) ifTrue:[
- Smalltalk removeKey:(p , '::' , aJavaClass lastName) asSymbol
- ]
+ ns := Smalltalk at:p asSymbol.
+ (ns notNil and:[ns isNameSpace]) ifTrue:[
+ Smalltalk removeKey:(p , '::' , aJavaClass lastName) asSymbol
+ ]
].
JavaVM registry unregisterClass: aJavaClass.
@@ -1405,15 +1231,15 @@
sent, when a class is reloaded"
newClass notNil ifTrue:[
- "/
- "/ kludge: the new class might have been resolved with the oldClass ...
- "/
- newClass constantPool
- updateClassRefsFrom:oldClass to:newClass.
+ "/
+ "/ kludge: the new class might have been resolved with the oldClass ...
+ "/
+ newClass constantPool
+ updateClassRefsFrom:oldClass to:newClass.
].
self allClassesDo:[:aJavaClass |
- aJavaClass updateClassRefsFrom:oldClass to:newClass
+ aJavaClass updateClassRefsFrom:oldClass to:newClass
].
"Created: 26.3.1997 / 13:49:20 / cg"
@@ -1422,54 +1248,54 @@
!Java class methodsFor:'source management'!
-classSource:filename package:package in:dirOrZipFile
+classSource:filename package:package in:dirOrZipFile
|fn pn zar f |
fn := dirOrZipFile asFilename.
pn := dirOrZipFile asString.
- fn isDirectory
- ifTrue:
- [ package notNil
- ifTrue:[ (f:= fn / package / filename) exists ifTrue:[ ^ f contents asString ]. ].
- (f := fn / filename) exists ifTrue:[ ^ f contents asString ]. ]
- ifFalse:
- [ ((pn last == $p and: [fn hasSuffix:'zip']) or:
- [(pn last == $r and: [fn hasSuffix:'jar'])])
- ifTrue:
- [ zar := SourceArchiveCache
- at: dirOrZipFile
- ifAbsentPut:[ZipArchive oldFileNamed:fn pathName].
- zar notNil
- ifTrue:
- [ package notNil
- ifTrue:[
- OperatingSystem fileSeparator ~~ $/ ifTrue: [
- f := (package copyReplaceAll: OperatingSystem fileSeparator with: $/) , '/' , filename
- ] ifFalse:[
- f := package , '/' , filename.
- ]]
- ifFalse:[ f := filename].
- (zar findMember: f) ifNotNil:
- [
- "Kludge because of broken ZipArchive"
- | cache |
- cache := Java cacheDirectory / Release name / 'src'.
- cache exists ifFalse:[cache recursiveMakeDirectory].
- (cache / f) exists ifTrue:[^(cache / f) contents asString].
- OperatingSystem
- executeCommand:('unzip "%1" "%2"' bindWith: fn asAbsoluteFilename asString
- with: f asString)
- inDirectory: cache asString.
- (f := cache / f) exists ifTrue:[^f contents asString]
- ].
- zar closeFile.
- ]]].
+ fn isDirectory
+ ifTrue:
+ [ package notNil
+ ifTrue:[ (f:= fn / package / filename) exists ifTrue:[ ^ f contents asString ]. ].
+ (f := fn / filename) exists ifTrue:[ ^ f contents asString ]. ]
+ ifFalse:
+ [ ((pn last == $p and: [fn hasSuffix:'zip']) or:
+ [(pn last == $r and: [fn hasSuffix:'jar'])])
+ ifTrue:
+ [ zar := SourceArchiveCache
+ at: dirOrZipFile
+ ifAbsentPut:[ZipArchive oldFileNamed:fn pathName].
+ zar notNil
+ ifTrue:
+ [ package notNil
+ ifTrue:[
+ OperatingSystem fileSeparator ~~ $/ ifTrue: [
+ f := (package copyReplaceAll: OperatingSystem fileSeparator with: $/) , '/' , filename
+ ] ifFalse:[
+ f := package , '/' , filename.
+ ]]
+ ifFalse:[ f := filename].
+ (zar findMember: f) ifNotNil:
+ [
+ "Kludge because of broken ZipArchive"
+ | cache |
+ cache := Java cacheDirectory / Release name / 'src'.
+ cache exists ifFalse:[cache recursiveMakeDirectory].
+ (cache / f) exists ifTrue:[^(cache / f) contents asString].
+ OperatingSystem
+ executeCommand:('unzip "%1" "%2"' bindWith: fn asAbsoluteFilename asString
+ with: f asString)
+ inDirectory: cache asString.
+ (f := cache / f) exists ifTrue:[^f contents asString]
+ ].
+ zar closeFile.
+ ]]].
^ nil
"
- Java classSource: 'Object.java' package:'java/lang' in:'/home/jv/Projects/JavaX/java-6-openjdk/src'
- Java classSource: 'Object.java' package:'java/lang' in:'/usr/lib/jvm/java-6-openjdk/src.zip'
+ Java classSource: 'Object.java' package:'java/lang' in:'/home/jv/Projects/JavaX/java-6-openjdk/src'
+ Java classSource: 'Object.java' package:'java/lang' in:'/usr/lib/jvm/java-6-openjdk/src.zip'
"
@@ -1482,7 +1308,7 @@
|package dirName binary sourceFileName sourceFile loader codeBaseURL protocol codeBaseURLIdx src|
aClass isNil ifTrue:[
- ^ nil
+ ^ nil
].
"/ look at the cache"
SourceCache at: aClass ifPresent: [:src|^src].
@@ -1492,90 +1318,111 @@
binary := aClass binaryFile.
binary notNil ifTrue:[
- binary := binary asFilename.
- aClass sourceFile notNil ifTrue:[
- sourceFileName := binary directory constructString:(aClass sourceFile).
- sourceFileName asFilename exists ifFalse:[
- sourceFileName := nil.
- ]
- ].
- sourceFileName isNil ifTrue:[
- sourceFileName := binary withSuffix:'java'.
- ].
- sourceFile := sourceFileName asFilename.
+ binary := binary asFilename.
+ aClass sourceFile notNil ifTrue:[
+ sourceFileName := binary directory constructString:(aClass sourceFile).
+ sourceFileName asFilename exists ifFalse:[
+ sourceFileName := nil.
+ ]
+ ].
+ sourceFileName isNil ifTrue:[
+ sourceFileName := binary withSuffix:'java'.
+ ].
+ sourceFile := sourceFileName asFilename.
] ifFalse:[
- "/ maybe it was loaded by a java classLoader ...
- (loader := aClass classLoader) notNil ifTrue:[
- codeBaseURLIdx := loader class instVarOffsetOf:'codeBaseURL'.
- codeBaseURLIdx notNil ifTrue:[
- (codeBaseURL := loader instVarAt:codeBaseURLIdx) notNil ifTrue:[
- (protocol := codeBaseURL instVarNamed:'protocol') notNil ifTrue:[
- (Java as_ST_String:protocol) = 'file' ifTrue:[
- dirName := Java as_ST_String:(codeBaseURL instVarNamed:'file').
- dirName := dirName asFilename.
- dirName exists ifTrue:[
- aClass sourceFile notNil ifTrue:[
- sourceFile := sourceFileName := dirName construct:aClass sourceFile.
- ]
- ]
- ]
- ]
- ]
- ]
- ]
+ "/ maybe it was loaded by a java classLoader ...
+ (loader := aClass classLoader) notNil ifTrue:[
+ codeBaseURLIdx := loader class instVarOffsetOf:'codeBaseURL'.
+ codeBaseURLIdx notNil ifTrue:[
+ (codeBaseURL := loader instVarAt:codeBaseURLIdx) notNil ifTrue:[
+ (protocol := codeBaseURL instVarNamed:'protocol') notNil ifTrue:[
+ (Java as_ST_String:protocol) = 'file' ifTrue:[
+ dirName := Java as_ST_String:(codeBaseURL instVarNamed:'file').
+ dirName := dirName asFilename.
+ dirName exists ifTrue:[
+ aClass sourceFile notNil ifTrue:[
+ sourceFile := sourceFileName := dirName construct:aClass sourceFile.
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
+ ]
].
sourceFile notNil ifTrue:[
- sourceFile exists ifFalse:[
- binary notNil ifTrue:[
- sourceFileName := binary withSuffix:'jav'.
- sourceFile := sourceFileName asFilename.
- sourceFile exists ifFalse:[
- sourceFileName := binary withSuffix:'JAV'.
- sourceFile := sourceFileName asFilename.
- sourceFile exists ifFalse:[
- sourceFileName := binary withSuffix:'JAVA'.
- sourceFile := sourceFileName asFilename.
- ].
- ].
- ]
- ].
+ sourceFile exists ifFalse:[
+ binary notNil ifTrue:[
+ sourceFileName := binary withSuffix:'jav'.
+ sourceFile := sourceFileName asFilename.
+ sourceFile exists ifFalse:[
+ sourceFileName := binary withSuffix:'JAV'.
+ sourceFile := sourceFileName asFilename.
+ sourceFile exists ifFalse:[
+ sourceFileName := binary withSuffix:'JAVA'.
+ sourceFile := sourceFileName asFilename.
+ ].
+ ].
+ ]
+ ].
].
"/ special case: there were multiple classes in a single
"/ source file.
(binary notNil and:[aClass sourceFile notNil]) ifTrue:[
- binary withoutSuffix baseName ~= aClass sourceFile asFilename withoutSuffix baseName ifTrue:[
- 'JAVA: trouble extracting fileName: ' infoPrint.
- binary withoutSuffix baseName print. ' vs. ' infoPrint.
- aClass sourceFile asFilename withoutSuffix baseName infoPrintCR.
- ].
+ binary withoutSuffix baseName ~= aClass sourceFile asFilename withoutSuffix baseName ifTrue:[
+ 'JAVA: trouble extracting fileName: ' infoPrint.
+ binary withoutSuffix baseName print. ' vs. ' infoPrint.
+ aClass sourceFile asFilename withoutSuffix baseName infoPrintCR.
+ ].
].
"/ if that fails, look in standard places
(sourceFile isNil or:[sourceFile exists not]) ifTrue:[
- sourceFile := aClass sourceFile.
- sourceFile isNil ifTrue:[
- "Hmm, hmm...just a guess"
- sourceFile := (aClass lastName upTo: $$) , '.java'.
- ].
- package := aClass javaPackageAsDirname.
- self effectiveSourceDirectories do:[:dir|
- src := self classSource: sourceFile package: package in: dir.
- src ifNotNil:[^src]
- ]
+ sourceFile := aClass sourceFile.
+ sourceFile isNil ifTrue:[
+ "Hmm, hmm...just a guess"
+ sourceFile := (aClass lastName upTo: $$) , '.java'.
+ ].
+ package := aClass javaPackageAsDirname.
+ self effectiveSourceDirectories do:[:dir|
+ src := self classSource: sourceFile package: package in: dir.
+ src ifNotNil:[^src]
+ ]
].
sourceFile isFilename ifFalse:[^nil].
^ (sourceFile contentsOfEntireFile).
"
- Java classSourceOf: JAVA::java::lang::Object
+ Java classSourceOf: JAVA::java::lang::Object
"
"Modified: / 27-01-1999 / 20:40:30 / cg"
"Modified (format): / 23-02-2012 / 10:50:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourceDirectories
+ ^self sourcePath
+"/
+"/ ^ "for testing only"
+"/ "/Release classPath,
+"/
+"/ {(packagePath / 'java' / 'libjava-projects' / 'Conversion' / 'bin')
+"/ pathName.
+"/ (packagePath / 'java' / 'libjava-support' / 'bin') pathName}
+"/ , ((packagePath / 'java' / 'libs') directoryContentsAsFilenames
+"/ select:[:f | f suffix = 'jar']
+"/ thenCollect:[:f | f pathName])
+"/ , (ClassPath ? #()) , cp
+"/
+ "
+ Java classPath
+ "
+
+ "Modified: / 16-01-2013 / 12:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!Java class methodsFor:'starting apps'!
@@ -1598,49 +1445,49 @@
argString := argStringIn.
argString isNil ifTrue:[
- argString := Dialog
- request:'argument string:'
- initialAnswer:LastArgumentString ? ''
- onCancel:nil.
- argString isNil ifTrue:[^ nil].
+ argString := Dialog
+ request:'argument string:'
+ initialAnswer:LastArgumentString ? ''
+ onCancel:nil.
+ argString isNil ifTrue:[^ nil].
- LastArgumentString := argString.
+ LastArgumentString := argString.
].
JavaVM initializeVMIfNoEventThreadRunning.
(Java at:'java.lang.System') instVarNamed:'security' put:nil.
argString isEmpty ifTrue:[
- argStringArray := #()
+ argStringArray := #()
] ifFalse:[
- argStringArray := argString asCollectionOfWords collect:[:s | Java as_String:s] as:Array.
+ argStringArray := argString asCollectionOfWords collect:[:s | Java as_String:s] as:Array.
].
- p := JavaProcess
- for:[
- "/ if the program reads from stdin, let user provide a file
- "/ for it.
- JavaVM stdinReplacementFileQuerySignal handle:[:ex |
- |fn|
+ p := JavaProcess
+ for:[
+ "/ if the program reads from stdin, let user provide a file
+ "/ for it.
+ JavaVM stdinReplacementFileQuerySignal handle:[:ex |
+ |fn|
- alreadyAskedForStdin == true ifFalse:[
- fn := Dialog
- requestFileName:'Program reads from Stdin - give inputFile or cancel for EOF'
- default:nil
- fromDirectory:(FileSelectionBox lastFileSelectionDirectory).
- fn notNil ifTrue:[
- stdInReplacement := fn asFilename readStream.
- ].
- alreadyAskedForStdin := true.
- ].
- ex proceedWith:stdInReplacement
- ] do:[
- aJavaClass
- performStatic:#'main([Ljava/lang/String;)V'
- with:argStringArray.
- ]
- ]
- priority:(Processor activePriority - 1).
+ alreadyAskedForStdin == true ifFalse:[
+ fn := Dialog
+ requestFileName:'Program reads from Stdin - give inputFile or cancel for EOF'
+ default:nil
+ fromDirectory:(FileSelectionBox lastFileSelectionDirectory).
+ fn notNil ifTrue:[
+ stdInReplacement := fn asFilename readStream.
+ ].
+ alreadyAskedForStdin := true.
+ ].
+ ex proceedWith:stdInReplacement
+ ] do:[
+ aJavaClass
+ performStatic:#'main([Ljava/lang/String;)V'
+ with:argStringArray.
+ ]
+ ]
+ priority:(Processor activePriority - 1).
p name:(aJavaClass fullName , '::main()').
p restartable:true.
@@ -1652,13 +1499,13 @@
!Java class methodsFor:'threads'!
-addThread: jThread for: stProcess
- ThreadsAccess
- critical: [
- self assert: (Threads includesKey: jThread) not.
- jThread == 0 ifTrue: [self breakPoint:#mh].
- Threads at: jThread put: stProcess.
- ]
+addThread: jThread for: stProcess
+ ThreadsAccess
+ critical: [
+ self assert: (Threads includesKey: jThread) not.
+ jThread == 0 ifTrue: [self breakPoint:#mh].
+ Threads at: jThread put: stProcess.
+ ]
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:47:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -1666,7 +1513,7 @@
initializeCurrentThread
"adds current thread into known threads"
-
+
| thisProcess jThread |
thisProcess := Processor activeProcess.
jThread := JavaVM newThread: thisProcess name.
@@ -1676,9 +1523,9 @@
"Created: / 09-12-2011 / 12:08:34 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-removeThread: jThread for: stProcess
-ThreadsAccess
- critical: [
+removeThread: jThread for: stProcess
+ThreadsAccess
+ critical: [
self assert: (Threads includesKey: jThread).
Threads removeKey: jThread.]
@@ -1687,26 +1534,26 @@
!
removeThread: jThread ifAbsent: block
- ThreadsAccess
- critical: [
-
- Threads removeKey: jThread ifAbsent: block
- ]
+ ThreadsAccess
+ critical: [
+
+ Threads removeKey: jThread ifAbsent: block
+ ]
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:51:52 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-threadForStProcess: stProcess
+threadForStProcess: stProcess
ThreadsAccess critical: [ ^Threads keyAtValue: stProcess ].
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:50:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-threadForStProcess: stProcess ifAbsent: block
- ThreadsAccess
- critical: [ |result| result := Threads keyAtValue: stProcess ifAbsent: block. result == 0 ifTrue: [self breakPoint:#mh]. ^ result ].
+threadForStProcess: stProcess ifAbsent: block
+ ThreadsAccess
+ critical: [ |result| result := Threads keyAtValue: stProcess ifAbsent: block. result == 0 ifTrue: [self breakPoint:#mh]. ^ result ].
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:53:11 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
@@ -1720,14 +1567,14 @@
"Modified: / 09-12-2011 / 12:49:43 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-threadsAt: key
+threadsAt: key
^Threads at: key.
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:31:56 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
!
-threadsAt: key ifAbsent: block
+threadsAt: key ifAbsent: block
ThreadsAccess critical: [ ^ Threads at: key ifAbsent: block ]
"Created: / 26-08-1997 / 19:53:57 / cg"
@@ -1735,8 +1582,8 @@
!
threadsDo: block
- ThreadsAccess
- critical: [ Threads do: block]
+ ThreadsAccess
+ critical: [ Threads do: block]
"Created: / 26-08-1997 / 19:53:57 / cg"
"Created: / 09-12-2011 / 12:49:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
--- a/JavaClassReaderTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaClassReaderTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -235,6 +235,11 @@
!JavaClassReaderTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaClassRefTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaClassRefTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -312,6 +312,11 @@
!JavaClassRefTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaCodeBundle.st Wed Jan 16 16:24:02 2013 +0000
@@ -0,0 +1,195 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaCodeLibraryOrBundle subclass:#JavaCodeBundle
+ instanceVariableNames:'libraries'
+ classVariableNames:'Root'
+ poolDictionaries:''
+ category:'Languages-Java-Support-Libraries'
+!
+
+!JavaCodeBundle class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ A container for several JavaCodeLibraries bundled together.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaCodeBundle class methodsFor:'instance creation'!
+
+new
+ "return an initialized instance"
+
+ ^ self basicNew initialize.
+!
+
+standardPackageBundleFor: packageId
+ "Return bundle for packageId. Assumes that that
+ package has standard layout, i.e.,
+
+ <package-dir>/java
+ bin ..................... compiler .class files
+ src ..................... java sources
+ libs .................... required .jar files
+ libs-src ................ (optional) sources code for .jars
+ "
+
+ | bundle lib pkg javadir p libs libssrc |
+
+ pkg := ProjectDefinition definitionClassForPackage: packageId.
+ pkg isNil ifTrue:[ ^ nil ].
+ javadir := pkg packageDirectory / 'java'.
+ (javadir isDirectory not or:[javadir isReadable not]) ifTrue:[ ^ nil ].
+ bundle := JavaCodeBundle new name: pkg package.
+ (p := javadir / 'bin') isDirectory ifTrue:[
+ lib := JavaCodeLibrary new name: 'java'.
+ lib classes: p pathName.
+ (p := javadir /'src') isDirectory ifTrue:[
+ lib sources: p pathName
+ ].
+ bundle add: lib.
+ ].
+ libs := javadir / 'libs'.
+ libssrc := javadir / 'libs-src'.
+ libs isDirectory ifTrue:[
+ libs directoryContentsAsFilenamesDo:[:each|
+ each suffix = 'jar' ifTrue:[
+ lib := JavaCodeLibrary new name: each baseName.
+ lib classes: each pathName.
+ (p := libssrc / (each withoutSuffix baseName , '-sources.jar') ) exists ifTrue:[
+ lib sources: p pathName.
+ ] ifFalse:[
+ (p := libssrc / (each withoutSuffix baseName , '-sources.zip') ) exists ifTrue:[
+ lib sources: p pathName.
+ ].
+ ].
+ bundle add: lib.
+ ].
+ ].
+ ].
+ ^bundle
+
+ "
+ JavaCodeBundle standardPackageBundleFor: #'stx:libjava'
+ JavaCodeBundle standardPackageBundleFor: #'stx:libjava/libs'
+ "
+
+ "Created: / 15-01-2013 / 17:05:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeBundle methodsFor:'accessing'!
+
+libraries
+ ^ libraries
+
+ "Modified: / 15-01-2013 / 17:32:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeBundle methodsFor:'adding & removing'!
+
+add: libraryOrBundle
+
+ libraries add: libraryOrBundle
+
+ "Created: / 12-01-2013 / 16:08:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+remove: libraryOrBundle
+
+ libraries remove: libraryOrBundle
+
+ "Created: / 12-01-2013 / 16:08:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeBundle methodsFor:'generating'!
+
+classPathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ ^ self libraries do:[:each|each classPathOn: aStream].
+
+ "Modified: / 15-01-2013 / 17:32:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ ^ self libraries do:[:each|each sourcePathOn: aStream].
+
+ "Created: / 12-01-2013 / 16:24:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-01-2013 / 17:32:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeBundle methodsFor:'initialization'!
+
+initialize
+ "Invoked when a new instance is created."
+
+ "/ please change as required (and remove this comment)
+ libraries := OrderedCollection new.
+
+ "/ super initialize. -- commented since inherited method does nothing
+
+ "Modified: / 12-01-2013 / 16:07:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeBundle class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaCodeLibrary.st Wed Jan 16 16:24:02 2013 +0000
@@ -0,0 +1,127 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaCodeLibraryOrBundle subclass:#JavaCodeLibrary
+ instanceVariableNames:'classes sources javadoc'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Java-Support-Libraries'
+!
+
+!JavaCodeLibrary class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ A representation of a Java library. It knows where .class files
+ are located as well as its source (optional) and javadoc (also optional).
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaCodeLibrary methodsFor:'accessing'!
+
+classes
+ ^ classes
+!
+
+classes:something
+ classes := something.
+!
+
+javadoc
+ ^ javadoc
+!
+
+javadoc:something
+ javadoc := something.
+!
+
+sources
+ ^ sources
+!
+
+sources:something
+ sources := something.
+! !
+
+!JavaCodeLibrary methodsFor:'generating'!
+
+classPathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ classes asFilename isReadable ifTrue:[
+ aStream nextPut: classes.
+ ].
+
+ "Modified: / 12-01-2013 / 16:19:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ (sources notNil and:[sources asFilename isReadable]) ifTrue:[
+ aStream nextPut: sources.
+ ].
+
+ "Created: / 12-01-2013 / 16:24:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:12:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeLibrary class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaCodeLibraryOrBundle.st Wed Jan 16 16:24:02 2013 +0000
@@ -0,0 +1,128 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+Object subclass:#JavaCodeLibraryOrBundle
+ instanceVariableNames:'name'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Java-Support-Libraries'
+!
+
+!JavaCodeLibraryOrBundle class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ Abstract class for JavaLibrary or JavaBundle
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaCodeLibraryOrBundle methodsFor:'accessing'!
+
+name
+ ^ name ? '???'
+
+ "Modified: / 12-01-2013 / 16:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+name:something
+ name := something.
+! !
+
+!JavaCodeLibraryOrBundle methodsFor:'generating'!
+
+classPath
+ ^OrderedCollection streamContents:[:s|self classPathOn: s]
+
+ "Created: / 15-01-2013 / 17:55:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+classPathOn: aStream
+ self subclassResponsibility
+
+ "Created: / 12-01-2013 / 16:18:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePath
+ ^OrderedCollection streamContents:[:s|self sourcePathOn: s]
+
+ "Created: / 15-01-2013 / 17:55:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePathOn: aStream
+ self subclassResponsibility
+
+ "Created: / 12-01-2013 / 16:24:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeLibraryOrBundle methodsFor:'printing & storing'!
+
+printOn:aStream
+ "append a printed representation if the receiver to the argument, aStream"
+
+ super printOn:aStream.
+ aStream nextPut:$(.
+ name printOn: aStream.
+ aStream nextPut:$).
+
+ "Modified: / 15-01-2013 / 17:20:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaCodeLibraryOrBundle class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
--- a/JavaExceptionTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaExceptionTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -65,6 +65,7 @@
"Created: / 30-03-2012 / 13:38:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
+
!JavaExceptionTests methodsFor:'callbacks'!
call: trhower with: aBoolean
@@ -299,6 +300,11 @@
!JavaExceptionTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaFieldRefTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaFieldRefTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -449,6 +449,11 @@
!JavaFieldRefTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaInterfaceMethodRefTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaInterfaceMethodRefTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -193,6 +193,11 @@
!JavaInterfaceMethodRefTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaJUnitTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaJUnitTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -131,6 +131,11 @@
!JavaJUnitTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaLibraries.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaLibraries.st Wed Jan 16 16:24:02 2013 +0000
@@ -90,12 +90,12 @@
(dir := self directory / 'libs') exists ifFalse: [ self update ].
dir recursiveDirectoryContentsAsFilenames do: [ :file |
- file suffix = 'jar' ifTrue: [ Java addToClassPath: file pathName name: 'stx:libjava - libraries - ' , file baseName ]
+ file suffix = 'jar' ifTrue: [ Java addToClassPath: file pathName ]
].
(dir := self directory / 'libs-src') exists ifTrue:[
dir recursiveDirectoryContentsAsFilenames do: [ :file |
- file suffix = 'jar' ifTrue: [ Java addToSourcePath: file pathName name: 'stx:libjava - libraries - ' , file baseName ]
+ file suffix = 'jar' ifTrue: [ Java addToSourcePath: file pathName ]
]
].
@@ -108,7 +108,7 @@
"Created: / 02-09-2011 / 09:24:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 03-11-2011 / 12:51:00 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 22-08-2012 / 06:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:09:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
addToClassPath: jarname
@@ -119,7 +119,7 @@
ifFalse:[self update].
(jar := dir / jarname) exists ifTrue: [
- Java addToClassPath: jar pathName name: 'stx:libjava libraries'
+ Java addToClassPath: jar pathName
] ifFalse:[
self error:'Library ' , jarname , ' not found in ', dir pathName
].
@@ -130,6 +130,7 @@
"
"Created: / 08-04-2011 / 16:49:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:09:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
flush
--- a/JavaMethodRefTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaMethodRefTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -425,6 +425,11 @@
!JavaMethodRefTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaNativeMemoryTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaNativeMemoryTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -161,6 +161,11 @@
!JavaNativeMemoryTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id:: $'
+ ^ '§Id:: §'
! !
--- a/JavaPathElement.st Tue Jan 15 18:40:37 2013 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,301 +0,0 @@
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-"
-"{ Package: 'stx:libjava' }"
-
-Object subclass:#JavaPathElement
- instanceVariableNames:'name pathName enabled origin'
- classVariableNames:'OriginRelease OriginEnvironment OriginPackage OriginUser'
- poolDictionaries:''
- category:'Languages-Java-Support'
-!
-
-!JavaPathElement class methodsFor:'documentation'!
-
-copyright
-"
- COPYRIGHT (c) 1996-2011 by Claus Gittinger
-
- New code and modifications done at SWING Research Group [1]:
-
- COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
- SWING Research Group, Czech Technical University in Prague
-
- This software is furnished under a license and may be used
- only in accordance with the terms of that license and with the
- inclusion of the above copyright notice. This software may not
- be provided or otherwise made available to, or used by, any
- other person. No title to or ownership of the software is
- hereby transferred.
-
- [1] Code written at SWING Research Group contains a signature
- of one of the above copright owners. For exact set of such code,
- see the differences between this version and version stx:libjava
- as of 1.9.2010
-
-"
-!
-
-documentation
-"
- JavaPathElement represents a single element in 'java paths' (Java classPath and
- Java sourcePath). The aim is to support easy configuration of libjava and storing
- paths in preferences.
-
- [author:]
- Jan Vrany <jan.vrany@fit.cvut.cz>
-
- [instance variables:]
- name ...... human-readable name of the entry - displayed by the UI
- pathName .. path to the file/directory the element represents
- enable .... whether the elements should be used or not (allows for
- keeping path elements in prefs but not using them)
- origin .... one of #jdk #package or #user
- #release... this element is part of java release (such as rt.jar)
- #env ...... this element comes from environment (CLASSPATH)
- #package .. this element was defined by some smalltalk package
- that uses libjava (see ProjectDefinition>>javaClassPath/javaSourcePath)
- #user ..... user-defined element (only thise are stored in preferences
-
- [class variables:]
-
- [see also:]
-
-"
-! !
-
-!JavaPathElement class methodsFor:'initialization'!
-
-initialize
- "Invoked at system start or when the class is dynamically loaded."
-
- "/ please change as required (and remove this comment)
-
- OriginRelease := #release.
- OriginEnvironment := #environment.
- OriginPackage := #package.
- OriginUser := #user.
-
- "Modified: / 27-07-2012 / 11:51:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement class methodsFor:'accessing-constants'!
-
-originEnvironment
- ^OriginEnvironment
-
- "Created: / 27-07-2012 / 11:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-originPackage
- ^OriginPackage
-
- "Created: / 27-07-2012 / 11:51:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-originRelease
- ^OriginRelease
-
- "Created: / 27-07-2012 / 11:51:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-originUser
- ^OriginUser
-
- "Created: / 27-07-2012 / 11:51:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement class methodsFor:'instance'!
-
-new: pathName
- ^self new: pathName origin: OriginUser
-
- "Created: / 27-07-2012 / 11:42:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-new: pathName origin: origin
- ^self new
- pathName: pathName;
- origin: origin;
- yourself
-
- "Created: / 27-07-2012 / 11:42:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-new: pathName origin: origin name: name
- ^self new
- pathName: pathName;
- origin: origin;
- name: name;
- yourself
-
- "Created: / 10-08-2012 / 19:07:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-newFromEnvironment: pathName
- ^self new: pathName origin: OriginEnvironment
-
- "Created: / 27-07-2012 / 11:43:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-newFromPackage: pathName
- ^self new: pathName origin: OriginPackage
-
- "Created: / 27-07-2012 / 11:44:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-newFromRelease:pathName
- ^ self new:pathName origin: OriginRelease
-
- "Created: / 27-07-2012 / 11:43:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-newFromUser: pathName
- ^self new: pathName origin: OriginUser
-
- "Created: / 27-07-2012 / 11:43:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement methodsFor:'accessing'!
-
-enabled
- ^ enabled ? true "/ enabled by default
-
- "Modified (comment): / 27-07-2012 / 11:26:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-enabled:aBoolean
- enabled := aBoolean.
-!
-
-name
- ^ name notNil ifTrue:[name] ifFalse:[self nameDefault]
-
- "Modified: / 10-08-2012 / 19:21:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-name:aString
- name := aString.
-!
-
-nameDefault
- ^ pathName ? '???'
-"/ pathName isNil ifTrue:[ ^ '???' ].
-"/ ^ pathName asFilename baseName
-
- "Created: / 10-08-2012 / 19:02:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-nameOrNil
- ^ name
-
- "Created: / 13-08-2012 / 22:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-origin
- ^ origin
-!
-
-origin: newOrigin
- self assert: origin isNil description: 'Trying to set origin twice'.
- self assert: (newOrigin == OriginRelease
- or:[newOrigin == OriginEnvironment
- or:[newOrigin == OriginPackage
- or:[newOrigin == OriginUser]]]) description:'Unknown/Unssuported path element origin ' , newOrigin printString.
-
- origin := newOrigin.
-
- "Modified: / 27-07-2012 / 12:17:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-pathName
- ^ pathName
-!
-
-pathName:aString
-"/ self assert: pathName isNil description: 'Trying to set pathName twice'.
- pathName := aString.
-
- "Modified: / 10-08-2012 / 19:14:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement methodsFor:'comparing'!
-
-= another
-
- ^another class == self class
- and:[self nameOrNil = another nameOrNil
- and:[ pathName = another pathName
- and:[self enabled = another enabled
- and:[origin = another origin]]]]
-
- "Created: / 02-08-2012 / 09:50:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-hash
- ^name hash bitXor:(pathName hash bitXor:(enabled hash bitXor: origin hash))
-
- "Created: / 02-08-2012 / 09:49:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement methodsFor:'conversion'!
-
-asFilename
- ^pathName asFilename
-
- "Created: / 27-07-2012 / 11:26:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-asString
- ^pathName
-
- "Created: / 27-07-2012 / 11:27:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement methodsFor:'printing & storing'!
-
-printOn:aStream
- "append a printed representation if the receiver to the argument, aStream"
-
- self enabled ifTrue:[
- aStream nextPutAll:'[X] '
- ] ifFalse:[
- aStream nextPutAll:'[ ] '
- ].
- pathName printOn:aStream.
- aStream space; nextPut:${.
- origin printOn:aStream.
- aStream nextPut:$}.
-
- "Modified: / 27-07-2012 / 12:25:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaPathElement class methodsFor:'documentation'!
-
-version_HG
-
- ^ '$Changeset: <not expanded> $'
-!
-
-version_SVN
- ^ '§Id:: §'
-! !
-
-JavaPathElement initialize!
--- a/JavaRefMock.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaRefMock.st Wed Jan 16 16:24:02 2013 +0000
@@ -100,6 +100,11 @@
!JavaRefMock class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaRelease.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaRelease.st Wed Jan 16 16:24:02 2013 +0000
@@ -22,7 +22,7 @@
Object subclass:#JavaRelease
instanceVariableNames:'javaHome classPath sourcePath classes bootClassPathClasses
- extDirsClasses'
+ extDirsClasses bundle'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Support'
@@ -254,6 +254,35 @@
"Modified: / 08-01-2013 / 12:20:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
+codeBundle
+ "Return a code bundle representing this Java release
+ (JDK)"
+
+ | src_zip |
+
+ bundle isNil ifTrue:[
+ | b |
+ b := JavaCodeBundle new.
+ b name: self name.
+ src_zip := self sourcePath detect:[:p|p endsWith: 'src.zip'].
+
+ self classPath do:[:p|
+ | lib |
+
+ lib := JavaCodeLibrary new.
+ lib name: p asFilename baseName.
+ lib classes: p.
+ lib sources: src_zip.
+ b add: lib.
+ ].
+ bundle := b.
+ ].
+ ^bundle
+
+ "Created: / 12-01-2013 / 15:50:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 15-01-2013 / 16:44:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
javaExtDirs
"Returns a default value of java.ext.dirs property"
@@ -601,12 +630,13 @@
searchForClassPath
| jreHome jdkHome |
+ bundle := nil.
classPath := OrderedCollection new.
jreHome := self jreHome asFilename.
jdkHome := self javaHome asFilename.
jreHome isNil ifTrue:[ ^ #() ].
"Ensure, that rt.jar is first"
- classPath add: (JavaPathElement newFromRelease:(jreHome / 'lib' / 'rt.jar') asString).
+ classPath add: (jreHome / 'lib' / 'rt.jar') pathName.
self searchForClassPathIn: jreHome / 'lib' .
self searchForClassPathIn: jreHome / 'lib' / 'modules'.
@@ -624,7 +654,7 @@
"
"Created: / 27-10-2010 / 21:15:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 15-12-2012 / 01:05:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-01-2013 / 15:55:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
searchForClassPathIn: dir
@@ -633,13 +663,13 @@
:file |
" this is to make sure that rt.jar is always first --v "
(file suffix = 'jar' and: [ file baseName ~= 'rt.jar' ]) ifTrue: [
- classPath add: (JavaPathElement newFromRelease:file asString)
+ classPath add: file pathName.
]
]
"Created: / 27-10-2010 / 21:38:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 02-11-2011 / 17:49:59 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 27-07-2012 / 11:45:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-01-2013 / 15:55:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
searchForJavaHome
@@ -687,10 +717,11 @@
| java_home src_zip |
sourcePath := OrderedCollection new.
+ bundle := nil.
java_home := self javaHome.
java_home notNil ifTrue:[
src_zip := self javaHome asFilename / 'src.zip'.
- src_zip exists ifTrue:[sourcePath add: (JavaPathElement newFromRelease:src_zip asString)].
+ src_zip exists ifTrue:[sourcePath add: src_zip pathName].
].
"
@@ -698,7 +729,7 @@
"
"Created: / 27-10-2010 / 21:15:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 15-12-2012 / 14:57:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-01-2013 / 15:55:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaRelease methodsFor:'validating'!
@@ -1006,7 +1037,7 @@
java_homes do:[ :java_home |
src_zip := java_home asFilename directory / 'src.zip'.
- src_zip exists ifTrue:[sourcePath add: (JavaPathElement newFromRelease:src_zip asString)].
+ src_zip exists ifTrue:[sourcePath add: src_zip pathName].
].
"
@@ -1014,7 +1045,7 @@
"
"Created: / 03-09-2012 / 18:38:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 09-01-2013 / 17:09:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 12-01-2013 / 15:56:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaRelease::OpenJDK7 class methodsFor:'documentation'!
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/JavaRootBundle.st Wed Jan 16 16:24:02 2013 +0000
@@ -0,0 +1,260 @@
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+"
+"{ Package: 'stx:libjava' }"
+
+JavaCodeBundle subclass:#JavaRootBundle
+ instanceVariableNames:'release environment packages user'
+ classVariableNames:''
+ poolDictionaries:''
+ category:'Languages-Java-Support-Libraries'
+!
+
+JavaCodeBundle subclass:#EnvironmentBundle
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:JavaRootBundle
+!
+
+JavaCodeBundle subclass:#PackagesBundle
+ instanceVariableNames:''
+ classVariableNames:''
+ poolDictionaries:''
+ privateIn:JavaRootBundle
+!
+
+!JavaRootBundle class methodsFor:'documentation'!
+
+copyright
+"
+ COPYRIGHT (c) 1996-2011 by Claus Gittinger
+
+ New code and modifications done at SWING Research Group [1]:
+
+ COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
+ SWING Research Group, Czech Technical University in Prague
+
+ This software is furnished under a license and may be used
+ only in accordance with the terms of that license and with the
+ inclusion of the above copyright notice. This software may not
+ be provided or otherwise made available to, or used by, any
+ other person. No title to or ownership of the software is
+ hereby transferred.
+
+ [1] Code written at SWING Research Group contains a signature
+ of one of the above copright owners. For exact set of such code,
+ see the differences between this version and version stx:libjava
+ as of 1.9.2010
+
+"
+!
+
+documentation
+"
+ A top-level bundle representing all accessible Java code
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaRootBundle methodsFor:'accessing'!
+
+libraries
+ {
+ self release.
+ environment.
+ packages.
+ user.
+ }
+
+ "Created: / 15-01-2013 / 17:50:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:42:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+name
+ ^ name ? '<root>'
+
+ "Created: / 15-01-2013 / 17:50:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+release
+ ^Java release codeBundle
+
+ "Modified: / 15-01-2013 / 17:59:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle methodsFor:'adding & removing'!
+
+add: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+remove: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle methodsFor:'generating'!
+
+classPathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ self release classPathOn: aStream.
+ environment classPathOn: aStream.
+ packages classPathOn: aStream.
+ user classPathOn: aStream.
+
+ "Created: / 15-01-2013 / 17:51:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:42:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+sourcePathOn:aStream
+ "superclass JavaCodeLibraryOrBundle says that I am responsible to implement this method"
+
+ self release sourcePathOn: aStream.
+ environment sourcePathOn: aStream.
+ packages sourcePathOn: aStream.
+ user sourcePathOn: aStream.
+
+ "Created: / 15-01-2013 / 17:51:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 12:42:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle methodsFor:'initialization'!
+
+initialize
+ "Invoked when a new instance is created."
+
+ "/ please change as required (and remove this comment)
+ libraries := nil.
+ environment := EnvironmentBundle new name:'CLASSPATH'.
+ packages := PackagesBundle new name:'Package libraries'.
+ user := JavaCodeBundle new name:'User libraries'.
+
+
+ "/ super initialize. -- commented since inherited method does nothing
+
+ "Created: / 15-01-2013 / 17:49:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:29:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle::EnvironmentBundle class methodsFor:'documentation'!
+
+documentation
+"
+ A special 'dynamic' code bundle to represent java code paths
+ specified in CLASSPATH environment variable.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaRootBundle::EnvironmentBundle methodsFor:'adding & removing'!
+
+add: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+remove: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle::PackagesBundle class methodsFor:'documentation'!
+
+documentation
+"
+ A special 'dynamic' code bundle to represent all bundles
+ provided by individual packages.
+
+ [author:]
+ Jan Vrany <jan.vrany@fit.cvut.cz>
+
+ [instance variables:]
+
+ [class variables:]
+
+ [see also:]
+
+"
+! !
+
+!JavaRootBundle::PackagesBundle methodsFor:'accessing'!
+
+libraries
+
+ ^ProjectDefinition allSubclasses collect:[:e|e javaBundle] thenSelect:[:e|e notNil].
+
+ "
+ Java::PackagesBundle new libraries
+ "
+
+ "Created: / 15-01-2013 / 17:34:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle::PackagesBundle methodsFor:'adding & removing'!
+
+add: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+remove: libraryOrBundle
+
+ self shouldNotImplement
+
+ "Created: / 15-01-2013 / 17:31:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!JavaRootBundle class methodsFor:'documentation'!
+
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+! !
--- a/JavaRuntimeConstantPoolTests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaRuntimeConstantPoolTests.st Wed Jan 16 16:24:02 2013 +0000
@@ -126,6 +126,11 @@
!JavaRuntimeConstantPoolTests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaUTF8Tests.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaUTF8Tests.st Wed Jan 16 16:24:02 2013 +0000
@@ -138,6 +138,11 @@
!JavaUTF8Tests class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id$'
+ ^ '§Id§'
! !
--- a/JavaVM.st Tue Jan 15 18:40:37 2013 +0000
+++ b/JavaVM.st Wed Jan 16 16:24:02 2013 +0000
@@ -1988,6 +1988,8 @@
"/> jdk 6
+ ThreadInterrupts := Dictionary new.
+
self initializeClassReader.
self initializeOpenFileTable.
self initializeReflection.
@@ -2000,7 +2002,7 @@
StartupTime := OperatingSystem getOSTime.
FinalizationLobby startFinalizationProcessAt: 5.
PerfCounters := Performance for: self.
- ThreadInterrupts := Dictionary new.
+
JavaNativeMethod allInstancesDo:[:e|e nCallsReset ].
@@ -2013,7 +2015,7 @@
"Modified: / 15-10-2010 / 15:27:45 / Jan Kurs <kurs.jan@post.cz>"
"Modified: / 24-02-2012 / 13:59:29 / Marcel Hlopko <hlopik@gmail.com>"
"Modified: / 24-02-2012 / 14:37:06 / Marcel Hlopko <hlopkmar@fel.cvut.cz>"
- "Modified: / 06-09-2012 / 11:18:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:18:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
initializeVMIfNoEventThreadRunning
@@ -2887,7 +2889,7 @@
|s|
s := '' writeStream.
- Java classPath
+ Java effectiveClassPath
do:[:p | s nextPutAll:p asString ]
separatedBy: [s nextPut: OperatingSystem pathSeparator].
@@ -2898,7 +2900,7 @@
"
"Created: / 03-01-1998 / 14:27:21 / cg"
- "Modified: / 27-07-2012 / 19:31:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:15:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
defaultExtDirs
--- a/Make.proto Tue Jan 15 18:40:37 2013 +0000
+++ b/Make.proto Wed Jan 16 16:24:02 2013 +0000
@@ -205,7 +205,6 @@
$(OUTDIR)JavaObject.$(O) JavaObject.$(H): JavaObject.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaObjectDictionary.$(O) JavaObjectDictionary.$(H): JavaObjectDictionary.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaPackage.$(O) JavaPackage.$(H): JavaPackage.st $(INCLUDE_TOP)/stx/libbasic/NameSpace.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaPathElement.$(O) JavaPathElement.$(H): JavaPathElement.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaPopUpView.$(O) JavaPopUpView.$(H): JavaPopUpView.st $(INCLUDE_TOP)/stx/libview/PopUpView.$(H) $(INCLUDE_TOP)/stx/libview/TopView.$(H) $(INCLUDE_TOP)/stx/libview/View.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaProcess.$(O) JavaProcess.$(H): JavaProcess.st $(INCLUDE_TOP)/stx/libbasic/Process.$(H) $(INCLUDE_TOP)/stx/libbasic/Link.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaRef2.$(O) JavaRef2.$(H): JavaRef2.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -268,6 +267,7 @@
$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)/stx/libjava/JavaClassContentRef2.$(H) $(INCLUDE_TOP)/stx/libjava/JavaRef2.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(INCLUDE_TOP)/stx/libjava/JavaMethod.$(H) $(INCLUDE_TOP)/stx/libbasic/CompiledCode.$(H) $(INCLUDE_TOP)/stx/libbasic/ExecutableFunction.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaRootBundle.$(O) JavaRootBundle.$(H): JavaRootBundle.st $(INCLUDE_TOP)/stx/libjava/JavaCodeBundle.$(H) $(INCLUDE_TOP)/stx/libjava/JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodAndNode.$(O) ProxyMethodAndNode.$(H): ProxyMethodAndNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodBlockInvocationNode.$(O) ProxyMethodBlockInvocationNode.$(H): ProxyMethodBlockInvocationNode.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldGetter.$(O) ProxyMethodJavaFieldGetter.$(H): ProxyMethodJavaFieldGetter.st $(INCLUDE_TOP)/stx/libjava/ProxyMethodJavaFieldAccessor.$(H) $(INCLUDE_TOP)/stx/libjava/ProxyMethodNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
--- a/Make.spec Tue Jan 15 18:40:37 2013 +0000
+++ b/Make.spec Wed Jan 16 16:24:02 2013 +0000
@@ -164,9 +164,12 @@
GroovyMetaclass \
JavaNioSupport \
JavaFinalizationRegistry \
- JavaPathElement \
JavaMirror \
JavaClassQuery \
+ JavaCodeLibraryOrBundle \
+ JavaCodeBundle \
+ JavaCodeLibrary \
+ JavaRootBundle \
@@ -286,9 +289,12 @@
$(OUTDIR)GroovyMetaclass.$(O) \
$(OUTDIR)JavaNioSupport.$(O) \
$(OUTDIR)JavaFinalizationRegistry.$(O) \
- $(OUTDIR)JavaPathElement.$(O) \
$(OUTDIR)JavaMirror.$(O) \
$(OUTDIR)JavaClassQuery.$(O) \
+ $(OUTDIR)JavaCodeLibraryOrBundle.$(O) \
+ $(OUTDIR)JavaCodeBundle.$(O) \
+ $(OUTDIR)JavaCodeLibrary.$(O) \
+ $(OUTDIR)JavaRootBundle.$(O) \
$(OUTDIR)extensions.$(O) \
--- a/abbrev.stc Tue Jan 15 18:40:37 2013 +0000
+++ b/abbrev.stc Wed Jan 16 16:24:02 2013 +0000
@@ -138,10 +138,10 @@
JavaNioSupport JavaNioSupport stx:libjava 'Languages-Java-Support-Native' 0
JavaNativeMemoryTests JavaNativeMemoryTests stx:libjava 'Languages-Java-Tests' 1
JavaFinalizationRegistry JavaFinalizationRegistry stx:libjava 'Languages-Java-Support' 0
-JavaPathElement JavaPathElement stx:libjava 'Languages-Java-Support' 0
JavaMirror JavaMirror stx:libjava 'Languages-Java-Classes' 0
JavaClassQuery JavaClassQuery stx:libjava 'Languages-Java-Classes' 1
JUnitTestCaseProxy JUnitTestCaseProxy stx:libjava 'Languages-Java-Tests-Proxies' 3
JavaLookupResolutionAlgorithmTests JavaLookupResolutionAlgorithmTests stx:libjava 'Languages-Java-Tests-Interop' 1
JavaLookupTests JavaLookupTests stx:libjava 'Languages-Java-Tests-Interop' 1
JavaLookupTestsResource JavaLookupTestsResource stx:libjava 'Languages-Java-Tests-Interop' 3
+JavaRootBundle JavaRootBundle stx:libjava 'Languages-Java-Support-Libraries' 0
--- a/bc.mak Tue Jan 15 18:40:37 2013 +0000
+++ b/bc.mak Wed Jan 16 16:24:02 2013 +0000
@@ -139,7 +139,6 @@
$(OUTDIR)JavaObject.$(O) JavaObject.$(H): JavaObject.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaObjectDictionary.$(O) JavaObjectDictionary.$(H): JavaObjectDictionary.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaPackage.$(O) JavaPackage.$(H): JavaPackage.st $(INCLUDE_TOP)\stx\libbasic\NameSpace.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaPathElement.$(O) JavaPathElement.$(H): JavaPathElement.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaPopUpView.$(O) JavaPopUpView.$(H): JavaPopUpView.st $(INCLUDE_TOP)\stx\libview\PopUpView.$(H) $(INCLUDE_TOP)\stx\libview\TopView.$(H) $(INCLUDE_TOP)\stx\libview\View.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\DeviceGraphicsContext.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaProcess.$(O) JavaProcess.$(H): JavaProcess.st $(INCLUDE_TOP)\stx\libbasic\Process.$(H) $(INCLUDE_TOP)\stx\libbasic\Link.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaRef2.$(O) JavaRef2.$(H): JavaRef2.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -202,6 +201,7 @@
$(OUTDIR)JavaFieldRef2.$(O) JavaFieldRef2.$(H): JavaFieldRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodRef2.$(O) JavaMethodRef2.$(H): JavaMethodRef2.st $(INCLUDE_TOP)\stx\libjava\JavaClassContentRef2.$(H) $(INCLUDE_TOP)\stx\libjava\JavaRef2.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaMethodWithException.$(O) JavaMethodWithException.$(H): JavaMethodWithException.st $(INCLUDE_TOP)\stx\libjava\JavaMethod.$(H) $(INCLUDE_TOP)\stx\libbasic\CompiledCode.$(H) $(INCLUDE_TOP)\stx\libbasic\ExecutableFunction.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaRootBundle.$(O) JavaRootBundle.$(H): JavaRootBundle.st $(INCLUDE_TOP)\stx\libjava\JavaCodeBundle.$(H) $(INCLUDE_TOP)\stx\libjava\JavaCodeLibraryOrBundle.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodAndNode.$(O) ProxyMethodAndNode.$(H): ProxyMethodAndNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodConditionNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodBlockInvocationNode.$(O) ProxyMethodBlockInvocationNode.$(H): ProxyMethodBlockInvocationNode.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodInvocationNode.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)ProxyMethodJavaFieldGetter.$(O) ProxyMethodJavaFieldGetter.$(H): ProxyMethodJavaFieldGetter.st $(INCLUDE_TOP)\stx\libjava\ProxyMethodJavaFieldAccessor.$(H) $(INCLUDE_TOP)\stx\libjava\ProxyMethodNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
--- a/experiments/abbrev.stc Tue Jan 15 18:40:37 2013 +0000
+++ b/experiments/abbrev.stc Wed Jan 16 16:24:02 2013 +0000
@@ -9,7 +9,7 @@
SetSample SetSample stx:libjava/experiments 'Languages-Java-Experiments-Tests' 0
Benchmarks::JavaLookup Benchmarks__JavaLookup stx:libjava/experiments 'benchmarks-Misc' 0
JavaByteCodeInterpreter JavaByteCodeInterpreter stx:libjava/experiments 'Languages-Java-Bytecode' 0
-JavaByteCodeInterpreterTests JavaByteCodeInterpreterTests stx:libjava/experiments 'Languages-Java-Tests' 1
+JavaByteCodeInterpreterTests JavaByteCodeInterpreterTests stx:libjava/experiments 'Languages-Java-Tests' 0
JavaByteCodeSteppableInterpreter JavaByteCodeSteppableInterpreter stx:libjava/experiments 'Languages-Java-Bytecode' 0
ClassReloadingTests ClassReloadingTests stx:libjava/experiments 'Languages-Java-Tests-ClassReloading' 1
JavaCompiler JavaCompiler stx:libjava/experiments 'Languages-Java-Support-Compiling' 0
--- a/experiments/experiments.rc Tue Jan 15 18:40:37 2013 +0000
+++ b/experiments/experiments.rc Wed Jan 16 16:24:02 2013 +0000
@@ -22,10 +22,10 @@
VALUE "FileDescription", "Smalltalk/X Class library (LIB)\0"
VALUE "FileVersion", "6.2.32767.32767\0"
VALUE "InternalName", "stx:libjava/experiments\0"
- VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2012\nCopyright eXept Software AG 1998-2012\0"
+ VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2013\nCopyright eXept Software AG 1998-2013\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Fri, 21 Dec 2012 18:14:42 GMT\0"
+ VALUE "ProductDate", "Tue, 15 Jan 2013 18:09:19 GMT\0"
END
END
--- a/experiments/stx_libjava_experiments.st Tue Jan 15 18:40:37 2013 +0000
+++ b/experiments/stx_libjava_experiments.st Wed Jan 16 16:24:02 2013 +0000
@@ -134,31 +134,11 @@
!stx_libjava_experiments class methodsFor:'description - java'!
-javaClassPath
-
- <javaclasspath>
-
- ^{
- self packageDirectory / 'java' / 'bin' .
- self packageDirectory / 'java' / 'libs' / '*.jar' .
- JavaCompiler fileOutDirectory.
- }
+javaBundle
- "Created: / 17-11-2011 / 23:00:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 15-12-2012 / 23:03:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourcePath
-
- <javasourcepath>
+ ^JavaCodeBundle standardPackageBundleFor: self package
- ^{
- self packageDirectory / 'java' / 'src' .
- JavaCompiler fileOutDirectory.
- }
-
- "Created: / 17-11-2011 / 23:01:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 15-12-2012 / 23:03:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 15-01-2013 / 17:35:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!stx_libjava_experiments class methodsFor:'description - svn'!
--- a/extensions.st Tue Jan 15 18:40:37 2013 +0000
+++ b/extensions.st Wed Jan 16 16:24:02 2013 +0000
@@ -1347,6 +1347,17 @@
!ProjectDefinition class methodsFor:'description - java'!
+javaBundle
+ "Defines a Java code bundle provided by this package.
+ Used by STX:LIBJAVA"
+
+ ^nil
+
+ "Created: / 15-01-2013 / 16:49:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
+!ProjectDefinition class methodsFor:'description - java'!
+
javaClassPath
"Defines a Java class path containing java classes/jars
@@ -1724,64 +1735,6 @@
!UserPreferences methodsFor:'accessing-java'!
-javaClassPath
- "Return the Java user-defined class path encoded as literal array"
-
- ^ self at:#javaClassPath ifAbsent:[#()].
-
- "
- UserPreferences current javaClassPath
- UserPreferences current javaClassPath: #openJDK7
-
- Java classPath
- "
-
- "Created: / 27-07-2012 / 12:52:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaClassPath: literalArrayEncoding
- "Sets the Java user-defined class path as literalArrayEncoding of a collection
- of JavaPathElements"
-
- self at:#javaClassPath put: literalArrayEncoding.
- (Java notNil and:[thisContext sender receiver == Java]) ifFalse:[
- | classPath |
- classPath := literalArrayEncoding decodeAsLiteralArray.
- Java classPath: classPath.
- ].
-
-
- "
- UserPreferences current javaClassPath
- UserPreferences current javaClassPath: #openJDK7
-
- Java classPath
- "
-
- "Created: / 27-07-2012 / 12:50:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaClassPathDecoded
- "Return the Java user-defined class path (a collection of JavaPathElement)"
-
- ^ self javaClassPath decodeAsLiteralArray
-
- "
- UserPreferences current javaClassPathDecoded
- UserPreferences current javaClassPath
-
- Java classPath
- "
-
- "Created: / 02-08-2012 / 09:43:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
javaRelease
"Return the Java release according to the preferences
or nil, if not set"
@@ -1838,64 +1791,6 @@
"Created: / 27-07-2012 / 10:02:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
-!UserPreferences methodsFor:'accessing-java'!
-
-javaSourcePath
- "Return the Java user-defined source path encoded as literal array"
-
- ^ self at:#javaSourcePath ifAbsent:[#()].
-
- "
- UserPreferences current javaSourcePath
- UserPreferences current javaSourcePath: #openJDK7
-
- Java sourcePath
- "
-
- "Created: / 27-07-2012 / 12:54:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaSourcePath: literalArrayEncoding
- "Sets the Java user-defined source path as literalArrayEncoding of a collection
- of JavaPathElements"
-
- self at:#javaSourcePath put: literalArrayEncoding.
- (Java notNil and:[thisContext sender receiver == Java]) ifFalse:[
- | classPath |
- classPath := literalArrayEncoding decodeAsLiteralArray.
- Java sourceDirectories: classPath.
- ].
-
-
- "
- UserPreferences current javaClassPath
- UserPreferences current javaClassPath: #openJDK7
-
- Java sourceDirectories
- "
-
- "Created: / 27-07-2012 / 12:54:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!UserPreferences methodsFor:'accessing-java'!
-
-javaSourcePathDecoded
- "Return the Java user-defined source path (a collection of JavaPathElement)"
-
- ^ self javaSourcePath decodeAsLiteralArray
-
- "
- UserPreferences current javaSourcePathDecoded
- UserPreferences current javaSourcePath
-
- Java sourceDirectories
- "
-
- "Created: / 02-08-2012 / 09:44:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!UserPreferences methodsFor:'accessing-java-devel'!
javaTestsDirectory
--- a/libInit.cc Tue Jan 15 18:40:37 2013 +0000
+++ b/libInit.cc Wed Jan 16 16:24:02 2013 +0000
@@ -44,6 +44,7 @@
_JavaClassQuery_Init(pass,__pRT__,snd);
_JavaClassRegistry_Init(pass,__pRT__,snd);
_JavaClassReloader_Init(pass,__pRT__,snd);
+_JavaCodeLibraryOrBundle_Init(pass,__pRT__,snd);
_JavaCompiler_137Eclipse_Init(pass,__pRT__,snd);
_JavaConstantPool_Init(pass,__pRT__,snd);
_JavaConstants_Init(pass,__pRT__,snd);
@@ -69,7 +70,6 @@
_JavaObject_Init(pass,__pRT__,snd);
_JavaObjectDictionary_Init(pass,__pRT__,snd);
_JavaPackage_Init(pass,__pRT__,snd);
-_JavaPathElement_Init(pass,__pRT__,snd);
_JavaPopUpView_Init(pass,__pRT__,snd);
_JavaProcess_Init(pass,__pRT__,snd);
_JavaRef2_Init(pass,__pRT__,snd);
@@ -108,6 +108,8 @@
_JavaClassContentRef2_Init(pass,__pRT__,snd);
_JavaClassReader_Init(pass,__pRT__,snd);
_JavaClassRef2_Init(pass,__pRT__,snd);
+_JavaCodeBundle_Init(pass,__pRT__,snd);
+_JavaCodeLibrary_Init(pass,__pRT__,snd);
_JavaEmbeddedFrameView_Init(pass,__pRT__,snd);
_JavaFieldAnnotationContainer_Init(pass,__pRT__,snd);
_JavaFieldDescriptor_Init(pass,__pRT__,snd);
@@ -132,6 +134,7 @@
_JavaFieldRef2_Init(pass,__pRT__,snd);
_JavaMethodRef2_Init(pass,__pRT__,snd);
_JavaMethodWithException_Init(pass,__pRT__,snd);
+_JavaRootBundle_Init(pass,__pRT__,snd);
_ProxyMethodAndNode_Init(pass,__pRT__,snd);
_ProxyMethodBlockInvocationNode_Init(pass,__pRT__,snd);
_ProxyMethodJavaFieldGetter_Init(pass,__pRT__,snd);
--- a/libjava.rc Tue Jan 15 18:40:37 2013 +0000
+++ b/libjava.rc Wed Jan 16 16:24:02 2013 +0000
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n SWING Research Group, Czech Technical University In Prague\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Wed, 09 Jan 2013 17:41:11 GMT\0"
+ VALUE "ProductDate", "Wed, 16 Jan 2013 13:35:24 GMT\0"
END
END
--- a/libs/Make.proto Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/Make.proto Wed Jan 16 16:24:02 2013 +0000
@@ -69,12 +69,10 @@
mvn:
(cd java && mvn package)
-.PHONY: mvn
-
-# Update SVN revision in stx_libbasic3.st
+# Update SVN revision in package definition class
ifneq (,$(findstring .svn,$(wildcard .svn)))
.svnversion: *.st
if [ -d .svn ]; then \
@@ -84,7 +82,7 @@
echo -n exported > .svnversion; \
fi
-stx_libjava_libs.o: stx_libjava_libs.st .svnversion
+stx_libjava_libs.o: stx_libjava_libs.st .svnversion
@if [ -d .svn ]; then \
rev2="$(shell printf "%-16s" $$(cat .svnversion))"; \
echo " [SV] Expanding svnRevisionNo in $1.st"; \
@@ -93,11 +91,27 @@
$(MAKE) CC="$(CLASSLIB_CC)" OPT="$(OPT)" SEPINITCODE="$(SEPINITCODE)" STC="$(STC)" STFILE=.stx_libjava_libs.svn $(C_RULE);
sed -i -e "s/\".stx_libjava_libs.svn.st\");/\"\stx_libjava_libs.st\");/g" .stx_libjava_libs.svn.c
$(MAKE) .stx_libjava_libs.svn.$(O)
- @mv .stx_libjava_libs.svn.$(O) stx_libjava_libs.$(O)
+ @mv .stx_libjava_libs.svn.$(O) stx_libjava_libs.$(O)
endif
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+ifneq (**NOHG**, $(shell hg root 2> /dev/null || echo -n '**NOHG**'))
+stx_libjava_libs.$(O): $(shell hg root)/.hg/dirstate
+endif
+
+
+
+
+# run default testsuite for this package
+test: $(TOP)/goodies/builder/reports
+ $(MAKE) -C $(TOP)/goodies/builder/reports
+ $(TOP)/goodies/builder/reports/report-runner.sh -D . -r Builder::TestReport -p $(PACKAGE)
+
+
# add more install actions here
install::
--- a/libs/bc.mak Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/bc.mak Wed Jan 16 16:24:02 2013 +0000
@@ -64,7 +64,21 @@
+
+test: $(TOP)\goodies\builder\reports\NUL
+ pushd $(TOP)\goodies\builder\reports & $(MAKE_BAT)
+ $(TOP)\goodies\builder\reports\report-runner.bat -D . -r Builder::TestReport -p $(PACKAGE)
+
# BEGINMAKEDEPEND --- do not remove this line; make depend needs it
$(OUTDIR)stx_libjava_libs.$(O) stx_libjava_libs.$(H): stx_libjava_libs.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
+
+# **Must be at end**
+
+# Enforce recompilation of package definition class if Mercurial working
+# copy state changes. Together with --guessVersion it ensures that package
+# definition class always contains correct binary revision string.
+!IFDEF HGROOT
+$(OUTDIR)stx_libjava_libs.$(O): $(HGROOT)\.hg\dirstate
+!ENDIF
--- a/libs/bmake.bat Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/bmake.bat Wed Jan 16 16:24:02 2013 +0000
@@ -3,6 +3,10 @@
@REM type bmake, and wait...
@REM do not edit - automatically generated from ProjectDefinition
@REM -------
-make.exe -N -f bc.mak %*
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+make.exe -N -f bc.mak %DEFINES% %*
--- a/libs/libs.rc Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/libs.rc Wed Jan 16 16:24:02 2013 +0000
@@ -3,8 +3,8 @@
// automagically generated from the projectDefinition: stx_libjava_libs.
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 6,2,0,1
- PRODUCTVERSION 6,2,3,1
+ FILEVERSION 6,2,32767,32767
+ PRODUCTVERSION 6,2,3,0
#if (__BORLANDC__)
FILEFLAGSMASK VS_FF_DEBUG | VS_FF_PRERELEASE
FILEFLAGS VS_FF_PRERELEASE | VS_FF_SPECIALBUILD
@@ -20,12 +20,12 @@
BEGIN
VALUE "CompanyName", "eXept Software AG & SWING Research Group\0"
VALUE "FileDescription", "Java support for Smalltalk/X - external java libraries (LIB)\0"
- VALUE "FileVersion", "6.2.0.1\0"
+ VALUE "FileVersion", "6.2.32767.32767\0"
VALUE "InternalName", "stx:libjava/libs\0"
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\nCopyright Jan Vrany, Jan Kurs and Marcel Hlopko\n SWING Research Group, Czech Technical University In Prague\0"
VALUE "ProductName", "Smalltalk/X\0"
- VALUE "ProductVersion", "6.2.3.1\0"
- VALUE "ProductDate", "Thu, 15 Nov 2012 23:56:49 GMT\0"
+ VALUE "ProductVersion", "6.2.3.0\0"
+ VALUE "ProductDate", "Wed, 16 Jan 2013 13:28:06 GMT\0"
END
END
--- a/libs/mingwmake.bat Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/mingwmake.bat Wed Jan 16 16:24:02 2013 +0000
@@ -3,6 +3,10 @@
@REM type mingwmake, and wait...
@REM do not edit - automatically generated from ProjectDefinition
@REM -------
-make.exe -N -f bc.mak -DUSEMINGW=1 %*
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+make.exe -N -f bc.mak -DUSEMINGW=1 %DEFINES% %*
--- a/libs/stx_libjava_libs.st Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/stx_libjava_libs.st Wed Jan 16 16:24:02 2013 +0000
@@ -185,6 +185,11 @@
!stx_libjava_libs class methodsFor:'documentation'!
+version_HG
+
+ ^ '$Changeset: <not expanded> $'
+!
+
version_SVN
- ^ '$Id:: $'
+ ^ '§Id:: §'
! !
--- a/libs/vcmake.bat Tue Jan 15 18:40:37 2013 +0000
+++ b/libs/vcmake.bat Wed Jan 16 16:24:02 2013 +0000
@@ -7,6 +7,12 @@
@if not defined VSINSTALLDIR (
call ..\..\rules\vcsetup.bat
)
-make.exe -N -f bc.mak -DUSEVC %*
+@SET DEFINES=
+@REM Kludge got Mercurial, cannot be implemented in Borland make
+@FOR /F "tokens=*" %%i in ('hg root') do SET HGROOT=%%i
+@IF "%HGROOT%" NEQ "" SET DEFINES=%DEFINES% "-DHGROOT=%HGROOT%"
+make.exe -N -f bc.mak -DUSEVC=1 %DEFINES% %*
+
+
--- a/stx_libjava.st Tue Jan 15 18:40:37 2013 +0000
+++ b/stx_libjava.st Wed Jan 16 16:24:02 2013 +0000
@@ -20,7 +20,7 @@
"
"{ Package: 'stx:libjava' }"
-LibraryDefinition subclass:#stx_libjava
+LibraryDefinition subclass:#'stx_libjava'
instanceVariableNames:''
classVariableNames:''
poolDictionaries:''
@@ -159,17 +159,17 @@
exclude individual packages in the #excludedFromPrerequisites method."
^ #(
- #'stx:goodies/sunit' "TestAsserter - superclass of JavaTestCaseProxy "
- #'stx:libbasic' "CharacterArray - superclass of extended String "
- #'stx:libbasic2' "BitArray - superclass of extended BooleanArray "
+ #'stx:goodies/sunit' "TestSuite - referenced by stx_libjava class>>testSuite "
+ #'stx:libbasic' "IdentityDictionary - superclass of extended UserPreferences "
+ #'stx:libbasic2' "UnboxedIntegerArray - superclass of extended WordArray "
#'stx:libbasic3' "MessageTracer - referenced by JavaMethod>>setBreakPoint "
- #'stx:libcomp' "ByteCodeCompiler - referenced by ProxyMethodCompiler>>compile "
+ #'stx:libcomp' "StatementNode - referenced by ProxyMethodGuardNode>>generate: "
#'stx:libhtml' "URL - referenced by JavaEmbeddedFrameView>>setupAppletFrameIn:initializeJava: "
#'stx:libtool' "WorkspaceApplication - referenced by GroovyEvaluator>>evaluate:in:receiver:notifying:logged:ifFail: "
- #'stx:libview' "PopUpView - superclass of JavaPopUpView "
- #'stx:libview2' "Plug - referenced by JavaSourceCodeCache>>findMethodLine:inMethods: "
- #'stx:libwidg' "Label - referenced by JavaVM class>>_WLabelPeer_create: "
- #'stx:libwidg2' "ComboListView - referenced by JavaVM class>>_WChoicePeer_create: "
+ #'stx:libview' "SimpleView - superclass of JavaEmbeddedFrameView "
+ #'stx:libview2' "GIFReader - referenced by JavaVM class>>_GifImageDecoder_parseImage: "
+ #'stx:libwidg' "HorizontalScrollBar - referenced by JavaVM class>>_WScrollPanePeer__getHScrollbarHeight: "
+ #'stx:libwidg2' "MenuPanel - referenced by JavaVM class>>processEvent: "
)
! !
@@ -405,13 +405,13 @@
JavaNioSupport
(JavaNativeMemoryTests autoload)
JavaFinalizationRegistry
- JavaPathElement
JavaMirror
JavaClassQuery
(JUnitTestCaseProxy autoload)
(JavaLookupResolutionAlgorithmTests autoload)
(JavaLookupTests autoload)
(JavaLookupTestsResource autoload)
+ JavaRootBundle
)
!
@@ -555,18 +555,12 @@
'Boolean class' javaWrap:
ProgrammingLanguage isGroovy
ProgrammingLanguage isJavaLike
- UserPreferences javaClassPath
- UserPreferences javaClassPath:
UserPreferences javaRelease
UserPreferences javaReleaseSelector
UserPreferences javaReleaseSelector:
- UserPreferences javaSourcePath
- UserPreferences javaSourcePath:
Class javaMirror
Class javaMirrorClass
ExecutableFunction isJavaConstructor
- UserPreferences javaClassPathDecoded
- UserPreferences javaSourcePathDecoded
Process isParked
Semaphore parkWithTimeoutMs:
Object isSocket
@@ -583,36 +577,32 @@
'Boolean class' javaWrapRequired
CharacterArray withoutSuffix:
ExecutableFunction isProxyMethod
+ 'ProjectDefinition class' javaBundle
)
- "Modified: / 16-12-2012 / 14:11:37 / Marcel Hlopko <marcel.hlopko@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:31:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!stx_libjava class methodsFor:'description - java'!
-javaClassPath
-
- <javaclasspath>
+javaBundle
- ^{
- self packageDirectory / 'java' / 'bin' .
- self packageDirectory / 'java' / 'libs' / '*.jar'
- }
+ ^JavaCodeBundle standardPackageBundleFor: self package
- "Created: / 17-11-2011 / 23:00:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 15-01-2013 / 17:35:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-javaSourcePath
-
- <javasourcepath>
+javaClassPath
+ <resource: #obsolete>
- ^{
- self packageDirectory / 'java' / 'src' .
- self packageDirectory / 'java' / 'libs-src' / '*.jar' .
- }
+ "Defines paths to Java .class files (for packages that
+ contains Java code"
+ ^#()
- "Created: / 17-11-2011 / 23:01:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
+ "Created: / 15-01-2013 / 18:04:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+ !
!stx_libjava class methodsFor:'description - project information'!
--- a/tools/JavaSettingsApplication.st Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/JavaSettingsApplication.st Wed Jan 16 16:24:02 2013 +0000
@@ -2,49 +2,12 @@
AbstractSettingsApplication subclass:#JavaSettingsApplication
instanceVariableNames:'javaReleaseHolder javaReleaseList javaHomeHolder
- javaReleaseIsCustomHolder javaClassPathHolder
- javaSourceDirectoriesHolder infoPanel'
+ javaReleaseIsCustomHolder infoPanel'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Tools'
!
-ApplicationModel subclass:#PathEditor
- instanceVariableNames:'selectionHolder pathListEffectiveHolder pathListHolder pathList
- treeList treeView treeListItemForUserDefined'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaSettingsApplication
-!
-
-SimpleDialog subclass:#PathElementEditor
- instanceVariableNames:'nameHolder pathHolder enabledHolder'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaSettingsApplication::PathEditor
-!
-
-HierarchicalList subclass:#PathElementList
- instanceVariableNames:'userItem userCategory'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaSettingsApplication::PathEditor
-!
-
-HierarchicalItem subclass:#Category
- instanceVariableNames:'origin label'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaSettingsApplication::PathEditor::PathElementList
-!
-
-HierarchicalItem subclass:#Item
- instanceVariableNames:'element x'
- classVariableNames:''
- poolDictionaries:''
- privateIn:JavaSettingsApplication::PathEditor::PathElementList
-!
-
!JavaSettingsApplication class methodsFor:'initialization'!
@@ -492,46 +455,6 @@
)
! !
-!JavaSettingsApplication methodsFor:'accessing-private'!
-
-javaClassPathEffective
- | rel |
-
- rel := self javaReleaseHolder value.
- ^rel isNil ifTrue:[
- #()
- ] ifFalse:[
- Java effectiveClassPathForRelease: rel
- ]
-
- "Created: / 30-07-2012 / 19:39:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaClassPathLiteralArray
- ^self javaClassPathHolder value asOrderedCollection literalArrayEncoding
-
- "Created: / 02-08-2012 / 10:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourceDirectoriesEffective
- | rel |
-
- rel := self javaReleaseHolder value.
- ^rel isNil ifTrue:[
- #()
- ] ifFalse:[
- Java effectiveSourceDirectoriesForRelease: rel
- ]
-
- "Created: / 30-07-2012 / 19:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourcePathLiteralArray
- ^self javaSourceDirectoriesHolder value asOrderedCollection literalArrayEncoding
-
- "Created: / 02-08-2012 / 10:04:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
!JavaSettingsApplication methodsFor:'actions'!
doBrowseJavaHome
@@ -558,43 +481,6 @@
"Created: / 09-02-2012 / 19:23:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
-javaClassPathEffectiveAspect
- "return/create the 'javaClassPathHolder' value holder (automatically generated)"
-
- ^BlockValue with: [:rel | self javaClassPathEffective] argument: self javaReleaseHolder
-
- "Created: / 30-07-2012 / 19:38:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaClassPathHolder
- "return/create the 'javaClassPathHolder' value holder (automatically generated)"
-
- javaClassPathHolder isNil ifTrue:[
- javaClassPathHolder := ValueHolder new.
- javaClassPathHolder addDependent:self.
- ].
- ^ javaClassPathHolder
-!
-
-javaClassPathHolder:something
- "set the 'javaClassPathHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- javaClassPathHolder notNil ifTrue:[
- oldValue := javaClassPathHolder value.
- javaClassPathHolder removeDependent:self.
- ].
- javaClassPathHolder := something.
- javaClassPathHolder notNil ifTrue:[
- javaClassPathHolder addDependent:self.
- ].
- newValue := javaClassPathHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:javaClassPathHolder.
- ].
-!
-
javaHomeHolder
<resource: #uiAspect>
@@ -643,53 +529,6 @@
^ javaReleaseList.
"Modified: / 27-07-2012 / 00:13:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourceDirectoriesEffectiveAspect
- "return/create the 'javaClassPathHolder' value holder (automatically generated)"
-
- ^BlockValue with: [:rel | self javaSourceDirectoriesEffective] argument: self javaReleaseHolder
-
- "Created: / 30-07-2012 / 19:39:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourceDirectoriesHolder
- "return/create the 'javaSourceDirectoriesHolder' value holder (automatically generated)"
-
- javaSourceDirectoriesHolder isNil ifTrue:[
- javaSourceDirectoriesHolder := ValueHolder new.
- javaSourceDirectoriesHolder addDependent:self.
- ].
- ^ javaSourceDirectoriesHolder
-!
-
-javaSourceDirectoriesHolder:something
- "set the 'javaSourceDirectoriesHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- javaSourceDirectoriesHolder notNil ifTrue:[
- oldValue := javaSourceDirectoriesHolder value.
- javaSourceDirectoriesHolder removeDependent:self.
- ].
- javaSourceDirectoriesHolder := something.
- javaSourceDirectoriesHolder notNil ifTrue:[
- javaSourceDirectoriesHolder addDependent:self.
- ].
- newValue := javaSourceDirectoriesHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:javaSourceDirectoriesHolder.
- ].
-! !
-
-!JavaSettingsApplication methodsFor:'change & update'!
-
-updatePaths
-
- self javaClassPathHolder value: (currentUserPrefs javaClassPathDecoded) asList.
- self javaSourceDirectoriesHolder value: (currentUserPrefs javaSourcePathDecoded) asList.
-
- "Created: / 27-07-2012 / 18:34:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication methodsFor:'protocol'!
@@ -703,9 +542,8 @@
].
self javaReleaseHolder value: rel.
- self updatePaths.
- "Modified: / 27-07-2012 / 18:47:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:45:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
basicSaveSettings
@@ -714,10 +552,8 @@
] ifFalse:[
currentUserPrefs javaReleaseSelector: nil.
].
- currentUserPrefs javaClassPath: self javaClassPathLiteralArray.
- currentUserPrefs javaSourcePath: self javaSourcePathLiteralArray.
- "Modified: / 02-08-2012 / 10:05:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:45:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
helpFilename
@@ -753,1039 +589,12 @@
prefRel ~~ setRel ifTrue:[ ^ true ].
- (self
- hasUnsavedChangesInUserEntriesInPath: self javaClassPathHolder value
- comparedTo: currentUserPrefs javaClassPathDecoded)
- ifTrue:[ ^true ].
-
- (self
- hasUnsavedChangesInUserEntriesInPath: self javaSourceDirectoriesHolder value
- comparedTo: currentUserPrefs javaSourcePathDecoded)
- ifTrue:[ ^true ].
-
^false
- "Modified: / 10-08-2012 / 16:28:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-hasUnsavedChangesInUserEntriesInPath: currentPath comparedTo: originalPath
-
- currentPath size ~~ originalPath size ifTrue:[ ^ true ].
-
- currentPath with: originalPath do:[:current :original|
- current ~= original ifTrue:[ ^ true ]
- ].
- ^false
-
- "Created: / 30-07-2012 / 18:40:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor class methodsFor:'interface specs'!
-
-windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:JavaSettingsApplication::PathEditor andSelector:#windowSpec
- JavaSettingsApplication::PathEditor new openInterface:#windowSpec
- JavaSettingsApplication::PathEditor open
- "
-
- <resource: #canvas>
-
- ^
- #(FullSpec
- name: windowSpec
- window:
- (WindowSpec
- label: 'NewApplication'
- name: 'NewApplication'
- bounds: (Rectangle 0 0 300 300)
- )
- component:
- (SpecCollection
- collection: (
- (HierarchicalListViewSpec
- name: 'PathList'
- layout: (LayoutFrame 0 0 0 0 -82 1 0 1)
- model: selectionHolder
- hasHorizontalScrollBar: true
- hasVerticalScrollBar: true
- listModel: treeList
- useIndex: false
- highlightMode: line
- useDefaultIcons: false
- postBuildCallback: postBuildTreeView:
- )
- (VerticalPanelViewSpec
- name: 'Buttons1'
- layout: (LayoutFrame -80 1 0 0 0 1 -22 1)
- horizontalLayout: fit
- verticalLayout: top
- horizontalSpace: 5
- verticalSpace: 3
- component:
- (SpecCollection
- collection: (
- (ActionButtonSpec
- label: 'Add...'
- name: 'ButtonAdd'
- activeHelpKey: addPathElement
- translateLabel: true
- model: actionAdd
- extent: (Point 80 22)
- )
- (ActionButtonSpec
- label: 'Edit...'
- name: 'ButtonEdit'
- activeHelpKey: editPathElement
- translateLabel: true
- model: actionEdit
- enableChannel: canEditHolder
- extent: (Point 80 22)
- )
- (ActionButtonSpec
- label: 'Move Up'
- name: 'ButtonModeUp'
- activeHelpKey: modePathElementUp
- translateLabel: true
- model: actionMoveUp
- enableChannel: canMoveUpHolder
- extent: (Point 80 22)
- )
- (ActionButtonSpec
- label: 'Move Down'
- name: 'ButtonModeDown'
- activeHelpKey: modePathElementDown
- translateLabel: true
- model: actionMoveDown
- enableChannel: canMoveDownHolder
- extent: (Point 80 22)
- )
- (LabelSpec
- name: 'SpacingLabel'
- translateLabel: true
- extent: (Point 80 22)
- )
- (ActionButtonSpec
- label: 'Remove'
- name: 'ButtonRemove'
- activeHelpKey: removePathElement
- translateLabel: true
- model: actionRemove
- enableChannel: canEditHolder
- extent: (Point 80 22)
- )
- )
-
- )
- )
- )
-
- )
- )
-! !
-
-!JavaSettingsApplication::PathEditor class methodsFor:'plugIn spec'!
-
-aspectSelectors
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this. If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "Return a description of exported aspects;
- these can be connected to aspects of an embedding application
- (if this app is embedded in a subCanvas)."
-
- ^ #(
- #pathListEffectiveHolder
- #pathListHolder
- #selectionHolder
- ).
-
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'actions'!
-
-actionAdd
-
- | dlg |
- dlg := PathElementEditor new.
- dlg enabled: true.
- dlg open ifTrue:[
- | el |
-
- el := JavaPathElement newFromUser: dlg path.
- el name: dlg name.
- el enabled: dlg enabled.
- self pathList add: el.
- ]
-
- "Modified: / 10-08-2012 / 19:17:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-actionEdit
-
- | sel dlg |
- sel := self selectionHolder value.
- sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ].
- dlg := PathElementEditor new.
- dlg name: sel element name.
- dlg path: sel element pathName.
- dlg enabled: sel element enabled.
- dlg open ifTrue:[
- sel element name: dlg name.
- sel element pathName: dlg path.
- sel element enabled: dlg enabled.
- self updateModifiedChannel.
- treeView invalidate.
- ]
-
- "Modified: / 13-08-2012 / 22:52:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-actionMoveDown
- | sel |
- sel := self selectionHolder value.
- sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ].
- self treeList moveDown: sel.
- self selectionHolder value: sel.
-
- "Modified: / 10-08-2012 / 17:11:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-actionMoveUp
- | sel |
- sel := self selectionHolder value.
- sel origin ~~ JavaPathElement originUser ifTrue:[ ^ self ].
- self treeList moveUp: sel.
- self selectionHolder value: sel.
-
- "Modified: / 10-08-2012 / 17:11:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-actionRemove
- | sel |
- sel := self selectionHolder value.
- self selectionHolder value: nil.
- sel isNil ifTrue:[ ^ self ].
- self path remove: sel element.
-
- "Modified: / 02-08-2012 / 09:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'aspects'!
-
-path
- ^self pathList value
-
- "Created: / 30-07-2012 / 18:35:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-pathList
- "return/create the 'pathList' value holder (automatically generated)"
-
- pathList isNil ifTrue:[
- pathList := ValueHolder new.
- pathList addDependent:self.
- ].
- ^ pathList
-!
-
-pathList:something
- "set the 'pathList' value holder (automatically generated)"
-
- |oldValue newValue|
-
- self assert: (something isNil or:[something isList]).
-
- pathList notNil ifTrue:[
- oldValue := pathList value.
- pathList removeDependent:self.
- ].
- pathList := something.
- pathList notNil ifTrue:[
- pathList addDependent:self.
- ].
- newValue := pathList value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:pathList.
- ].
-
- "Modified: / 30-07-2012 / 18:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-pathListEffectiveHolder
- "return/create the 'pathListEffectiveHolder' value holder (automatically generated)"
-
- pathListEffectiveHolder isNil ifTrue:[
- pathListEffectiveHolder := ValueHolder new.
- pathListEffectiveHolder addDependent:self.
- ].
- ^ pathListEffectiveHolder
-!
-
-pathListEffectiveHolder:something
- "set the 'pathListEffectiveHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- pathListEffectiveHolder notNil ifTrue:[
- oldValue := pathListEffectiveHolder value.
- pathListEffectiveHolder removeDependent:self.
- ].
- pathListEffectiveHolder := something.
- pathListEffectiveHolder notNil ifTrue:[
- pathListEffectiveHolder addDependent:self.
- ].
- newValue := pathListEffectiveHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:pathListEffectiveHolder.
- ].
-!
-
-pathListHolder
- "return/create the 'pathListHolder' value holder (automatically generated)"
-
- pathListHolder isNil ifTrue:[
- pathListHolder := ValueHolder new.
- pathListHolder addDependent:self.
- ].
- ^ pathListHolder
-!
-
-pathListHolder:something
- "set the 'pathListHolder' value holder (automatically generated)"
-
- |oldValue newValue|
-
- pathListHolder notNil ifTrue:[
- oldValue := pathListHolder value.
- pathListHolder removeDependent:self.
- ].
- pathListHolder := something.
- pathListHolder notNil ifTrue:[
- pathListHolder addDependent:self.
- ].
- newValue := pathListHolder value.
- oldValue ~~ newValue ifTrue:[
- self update:#value with:newValue from:pathListHolder.
- ].
-!
-
-selectionHolder
- "return/create the 'selectionHolder' value holder (automatically generated)"
-
- selectionHolder isNil ifTrue:[
- selectionHolder := ValueHolder new.
- ].
- ^ selectionHolder
-!
-
-selectionHolder:something
- "set the 'selectionHolder' value holder (automatically generated)"
-
- selectionHolder := something.
-!
-
-treeList
-
- treeList isNil ifTrue:[
- treeList := PathElementList new.
- treeList application: self.
- treeList showRoot: false.
- treeList buildTree
- ].
- ^treeList
-
- "Created: / 27-07-2012 / 18:36:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'aspects-queries'!
-
-canEditHolder
-
- ^BlockValue
- with:[:sel|
- sel notNil
- and:[sel isPathElementItem
- and:[sel origin == JavaPathElement originUser]].
- ] argument: self selectionHolder
-
- "Created: / 02-08-2012 / 16:08:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-canMoveDownHolder
-
- ^BlockValue
- with:[:sel|
- sel notNil
- and:[sel isPathElementItem
- and:[sel origin == JavaPathElement originUser
- and:[sel parent children last ~~ sel]]]
- ] argument: self selectionHolder
-
- "Created: / 02-08-2012 / 16:12:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-canMoveUpHolder
-
- ^BlockValue
- with:[:sel|
- sel notNil
- and:[sel isPathElementItem
- and:[sel origin == JavaPathElement originUser
- and:[sel parent children first ~~ sel]]]
- ] argument: self selectionHolder
-
- "Created: / 02-08-2012 / 16:13:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'change & update'!
-
-update:something with:aParameter from:changedObject
- "Invoked when an object that I depend upon sends a change notification."
-
- "stub code automatically generated - please change as required"
-
- changedObject == pathListHolder ifTrue:[
- self pathList: pathListHolder value.
- self treeList buildTree.
- ^self.
- ].
-
- changedObject == pathList ifTrue:[
- self updateModifiedChannel.
- something == #insert: ifTrue:[
- self treeList updateAfterInsertAt: aParameter.
- ^self.
- ].
- something == #removeFrom: ifTrue:[
- self treeList updateAfterRemoveFrom: aParameter first to: aParameter second.
- ^self.
- ].
- something == #value ifTrue:[
- self updateTree.
- ^self.
- ].
-
- something == #at: ifTrue:[
- ^self.
- ].
-
- self breakPoint: #jv.
- self updateTree.
- ^ self.
- ].
- super update:something with:aParameter from:changedObject
-
- "Modified: / 10-08-2012 / 17:11:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-updateModifiedChannel
- masterApplication notNil ifTrue:[
- masterApplication perform: #updateModifiedChannel ifNotUnderstood:[].
- ].
-
- "Created: / 30-07-2012 / 20:11:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-updateTree
- self treeList buildTree
-
- "Created: / 27-07-2012 / 18:16:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'event processing'!
-
-buttonPress:button x:x y:y view:aView
-
- | itemIndex item |
-
- button ~= 1 ifTrue:[^aView buttonPress:button x:x y:y].
-
- itemIndex := aView yVisibleToLineNr:y.
- itemIndex isNil ifTrue:[^self].
- itemIndex == 0 ifTrue:[^self].
- itemIndex > aView list size ifTrue:[^self].
- item := aView list at: itemIndex.
- item isPathElementCategoryItem ifTrue:[
- ^aView buttonPress:button x:x y:y
- ].
- ((aView left + x) between: ((item x ? 0) - 16) and: (item x ? 0)) ifFalse:[
- ^aView buttonPress:button x:x y:y
- ].
-
- item origin ~~ JavaPathElement originRelease ifTrue:[
- item enabled: item enabled not.
- self updateModifiedChannel.
- aView invalidate
- ].
-
- "Created: / 08-12-2009 / 14:12:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 18-11-2011 / 14:55:41 / cg"
- "Modified: / 10-08-2012 / 16:43:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-handlesButtonPress:button inView:aView
-
- ^treeView scrolledView == aView
-
- "Created: / 08-12-2009 / 14:08:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor methodsFor:'hooks'!
-
-postBuildTreeView: aView
-
- treeView := aView.
- treeView scrolledView delegate: self.
-
- "Created: / 29-11-2011 / 14:56:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementEditor class methodsFor:'help specs'!
-
-helpSpec
- "This resource specification was automatically generated
- by the UIHelpTool of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIHelpTool may not be able to read the specification."
-
- "
- UIHelpTool openOnClass:JavaSettingsApplication::PathEditor::PathElementEditor
- "
-
- <resource: #help>
-
- ^ super helpSpec addPairsFrom:#(
-
-#enabled
-'When unchecked, path element is ignored by the runtime system'
-
-#name
-'Human readable name displayed in user interface (defaults to filename)'
-
-#path
-'Path to directory or .jar or .zip file'
-
-)
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementEditor class methodsFor:'interface specs'!
-
-windowSpec
- "This resource specification was automatically generated
- by the UIPainter of ST/X."
-
- "Do not manually edit this!! If it is corrupted,
- the UIPainter may not be able to read the specification."
-
- "
- UIPainter new openOnClass:JavaSettingsApplication::PathEditor::PathElementEditor andSelector:#windowSpec
- JavaSettingsApplication::PathEditor::PathElementEditor new openInterface:#windowSpec
- JavaSettingsApplication::PathEditor::PathElementEditor open
- "
-
- <resource: #canvas>
-
- ^
- #(FullSpec
- name: windowSpec
- window:
- (WindowSpec
- label: 'Path Element'
- name: 'Path Element'
- min: (Point 10 10)
- bounds: (Rectangle 0 0 558 123)
- )
- component:
- (SpecCollection
- collection: (
- (ViewSpec
- name: 'Content'
- layout: (LayoutFrame 0 0 0 0 0 1 -30 1)
- component:
- (SpecCollection
- collection: (
- (LabelSpec
- label: 'Name:'
- name: 'Label15'
- layout: (LayoutFrame 9 0 9 0 70 0 31 0)
- activeHelpKey: packageMatchPattern
- translateLabel: true
- adjust: right
- )
- (InputFieldSpec
- name: 'NameField'
- layout: (LayoutFrame 71 0 9 0 -9 1 31 0)
- activeHelpKey: name
- enableChannel: useManager
- model: nameHolder
- )
- (LabelSpec
- label: 'Path:'
- name: 'Label16'
- layout: (LayoutFrame 9 0 39 0 70 0 61 0)
- activeHelpKey: path
- translateLabel: true
- adjust: right
- )
- (FilenameInputFieldSpec
- name: 'FilenameEntryField1'
- layout: (LayoutFrame 71 0 39 0 -9 1 61 0)
- activeHelpKey: manager
- model: pathHolder
- )
- (CheckBoxSpec
- label: 'Enabled'
- name: 'CheckBox1'
- layout: (LayoutFrame 66 0 71 0 193 0 90 0)
- activeHelpKey: enabled
- model: enabledHolder
- translateLabel: true
- )
- )
-
- )
- )
- (HorizontalPanelViewSpec
- name: 'Buttons'
- layout: (LayoutFrame 0 0 -30 1 0 1 0 1)
- horizontalLayout: fit
- verticalLayout: center
- horizontalSpace: 3
- verticalSpace: 3
- reverseOrderIfOKAtLeft: true
- component:
- (SpecCollection
- collection: (
- (ActionButtonSpec
- label: 'Cancel'
- name: 'Button2'
- translateLabel: true
- model: doCancel
- extent: (Point 277 22)
- )
- (ActionButtonSpec
- label: 'OK'
- name: 'Button1'
- translateLabel: true
- model: doAccept
- enableChannel: doAcceptEnabled
- extent: (Point 278 22)
- )
- )
-
- )
- )
- )
-
- )
- )
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementEditor methodsFor:'accessing'!
-
-enabled
- ^ self enabledHolder value
-
- "Created: / 10-08-2012 / 19:00:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-enabled: aBoolean
- self enabledHolder value: aBoolean
-
- "Created: / 10-08-2012 / 18:59:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-name
- ^self nameHolder value
-
- "Created: / 10-08-2012 / 19:00:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-name: aString
- self nameHolder value: aString
-
- "Created: / 10-08-2012 / 19:00:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-path
- ^self pathHolder value
-
- "Created: / 10-08-2012 / 18:59:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-path: path
- self pathHolder value: path
-
- "Created: / 10-08-2012 / 18:59:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementEditor methodsFor:'aspects'!
-
-doAcceptEnabled
- <resource: #uiAspect>
-
- |holder|
-
- (holder := builder bindingAt:#doAcceptEnabled) isNil ifTrue:[
- holder := BlockValue
- with: [:path | path value notEmptyOrNil ]
- argument: self pathHolder.
-
- builder aspectAt:#doAcceptEnabled put:holder.
- ].
- ^ holder.
-
- "Modified: / 10-08-2012 / 18:56:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-enabledHolder
- <resource: #uiAspect>
-
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
-
- enabledHolder isNil ifTrue:[
- enabledHolder := true asValue.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ enabledHolder addDependent:self.
-"/ enabledHolder onChangeSend:#enabledHolderChanged to:self.
- ].
- ^ enabledHolder.
-!
-
-nameHolder
- <resource: #uiAspect>
-
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
-
- nameHolder isNil ifTrue:[
- nameHolder := ValueHolder new.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ nameHolder addDependent:self.
-"/ nameHolder onChangeSend:#nameHolderChanged to:self.
- ].
- ^ nameHolder.
-!
-
-pathHolder
- <resource: #uiAspect>
-
- "automatically generated by UIPainter ..."
-
- "*** the code below creates a default model when invoked."
- "*** (which may not be the one you wanted)"
- "*** Please change as required and accept it in the browser."
- "*** (and replace this comment by something more useful ;-)"
-
- pathHolder isNil ifTrue:[
- pathHolder := ValueHolder new.
-"/ if your app needs to be notified of changes, uncomment one of the lines below:
-"/ pathHolder addDependent:self.
-"/ pathHolder onChangeSend:#pathHolderChanged to:self.
- ].
- ^ pathHolder.
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'accessing'!
-
-allElements
- ^self application pathListEffectiveHolder value
-
- "Created: / 30-07-2012 / 19:42:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-userElements
- ^self application pathList
-
- "Created: / 30-07-2012 / 19:42:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'actions'!
-
-moveDown: item
- | parent index tmp |
- parent := item parent.
- index := parent children indexOf: item.
- index >= parent children size ifTrue: [ ^ self ].
-
- tmp := parent children at: index + 1.
- parent children at: index + 1 put: (parent children at: index).
- parent children at: index put: tmp.
-
- tmp := self userElements at: index + 1.
- self userElements at: index + 1 put: (self userElements at: index).
- self userElements at: index put: tmp.
-
- parent childrenOrderChanged.
- self application selectionHolder changed: #value
-
- "Created: / 10-08-2012 / 17:15:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-moveUp: item
- | parent index tmp |
- parent := item parent.
- index := parent children indexOf: item.
- index < 1 ifTrue: [ ^ self ].
-
- tmp := parent children at: index - 1.
- parent children at: index - 1 put: (parent children at: index).
- parent children at: index put: tmp.
-
- tmp := self userElements at: index - 1.
- self userElements at: index - 1 put: (self userElements at: index).
- self userElements at: index put: tmp.
-
- parent childrenOrderChanged.
- self application selectionHolder changed: #value
-
- "Created: / 10-08-2012 / 17:05:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'building'!
-
-buildTree
- | rt |
-
- rt := Category new
- addIfNotNil: (self buildCategory: JavaPathElement originRelease);
- addIfNotNil: (self buildCategory: JavaPathElement originPackage);
- addIfNotNil: (self buildCategory: JavaPathElement originEnvironment);
- addIfNotNil: (userCategory := self buildCategory: JavaPathElement originUser);
- yourself.
- userCategory expand.
- self root: rt.
-
- "Created: / 30-07-2012 / 19:00:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'building-private'!
-
-buildCategory: origin
- | cat elements |
-
- elements := self elementsForOrigin: origin.
- (elements isEmptyOrNil and:[origin ~~ JavaPathElement originUser]) ifTrue:[ ^ nil ].
- cat := Category new origin: origin.
- cat children: (elements collect:[:e| (self buildElement: e) parent: cat]).
- ^cat
-
- "Created: / 27-07-2012 / 18:26:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-buildElement: element
- ^Item new element: element.
-
- "Created: / 27-07-2012 / 18:46:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-elementsForOrigin: origin
- ^origin == JavaPathElement originUser ifTrue:[
- self userElements
- ] ifFalse:[
- self allElements select:[:e|e origin = origin]
- ].
-
- "Created: / 30-07-2012 / 19:42:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList methodsFor:'change & update'!
-
-updateAfterInsertAt: index
- | el item |
-
- el := self userElements at: index.
- self assert: el origin = JavaPathElement originUser.
- userCategory add: (item := self buildElement: el) beforeIndex: index.
- item parent expand.
- self application selectionHolder value: item.
-
- "Created: / 30-07-2012 / 19:46:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-updateAfterRemoveFrom: start to: stop
-
- userCategory removeFromIndex:start toIndex: stop
-
- "Created: / 02-08-2012 / 09:56:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'accessing'!
-
-element
- ^nil
-
- "Created: / 30-07-2012 / 19:15:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-label
- label isNil ifTrue:[
- label := self originAsHumanReadableString asText allBold.
- origin ~~ JavaPathElement originUser ifTrue:[
- label colorizeAllWith: Color gray
- ].
- ].
- ^label
-
- "Created: / 27-07-2012 / 18:21:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-origin
- ^ origin
-!
-
-origin:originId
- origin := originId.
-!
-
-originAsHumanReadableString
- origin isNil ifTrue:[^self application resources string: 'Path'].
- origin == JavaPathElement originRelease ifTrue:[^self application resources string: 'Java Runtime'].
- origin == JavaPathElement originEnvironment ifTrue:[^self application resources string: 'System Environment'].
- origin == JavaPathElement originPackage ifTrue:[^self application resources string: 'Package Defined'].
- origin == JavaPathElement originUser ifTrue:[^self application resources string: 'User Defined'].
- self error:'Invalid origin'
-
- "Created: / 27-07-2012 / 18:39:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'adding & removing'!
-
-addIfNotNil: childOrNil
- childOrNil notNil ifTrue:[self add: childOrNil]
-
- "Created: / 27-07-2012 / 18:51:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Category methodsFor:'testing'!
-
-isPathElementCategoryItem
- ^true
-
- "Created: / 30-07-2012 / 14:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-isPathElementItem
- ^false
-
- "Created: / 30-07-2012 / 14:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'accessing'!
-
-element
- ^ element
-!
-
-element:something
- element := something.
-!
-
-enabled
- ^element enabled
-
- "Created: / 30-07-2012 / 14:26:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-enabled: aBoolean
- element enabled: aBoolean
-
- "Created: / 30-07-2012 / 14:26:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-icon
- ^element enabled ifTrue:[
- MenuPanel iconIndicationOn
- ] ifFalse:[
- MenuPanel iconIndicationOff
- ].
-
- "Created: / 30-07-2012 / 14:11:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-label
- | label |
- label := element name asText.
- self origin ~~ JavaPathElement originUser ifTrue:[
- label colorizeAllWith: Color gray
- ].
- ^label
-
- "Created: / 27-07-2012 / 18:42:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-origin
- ^element origin
-
- "Created: / 27-07-2012 / 18:41:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-x
- ^ x
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'displaying'!
-
-__displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
-
- | l w |
-
- l := self label.
- x := newX.
- [
- w := l widthOn: aGC.
- w > (aGC width - x)
- ] whileTrue:[
- l := '...' , (l copyFrom: 9).
- ].
-
- super displayLabel:l h:h on:aGC x:newX y:y h:h.
-
- "Created: / 30-07-2012 / 14:18:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-displayLabel:aLabel h:lH on:aGC x:newX y:y h:h
- x := newX.
- super displayLabel:aLabel h:lH on:aGC x:newX y:y h:h.
-
- "Created: / 30-07-2012 / 14:23:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-! !
-
-!JavaSettingsApplication::PathEditor::PathElementList::Item methodsFor:'testing'!
-
-isPathElementCategoryItem
- ^false
-
- "Created: / 30-07-2012 / 14:28:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-isPathElementItem
- ^true
-
- "Created: / 30-07-2012 / 14:28:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 16-01-2013 / 13:44:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!JavaSettingsApplication class methodsFor:'documentation'!
--- a/tools/Make.proto Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/Make.proto Wed Jan 16 16:24:02 2013 +0000
@@ -34,7 +34,7 @@
# add the path(es) here:,
# ********** OPTIONAL: MODIFY the next lines ***
# LOCALINCLUDES=-Ifoo -Ibar
-LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/stx/libwidg2 -I$(INCLUDE_TOP)/squeak/petitparser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libtool
+LOCALINCLUDES= -I$(INCLUDE_TOP)/stx/libview -I$(INCLUDE_TOP)/stx/libwidg -I$(INCLUDE_TOP)/stx/libview2 -I$(INCLUDE_TOP)/stx/libjava -I$(INCLUDE_TOP)/stx/goodies/sunit -I$(INCLUDE_TOP)/stx/libbasic2 -I$(INCLUDE_TOP)/squeak/petitparser -I$(INCLUDE_TOP)/stx/libbasic -I$(INCLUDE_TOP)/stx/goodies/petitparser -I$(INCLUDE_TOP)/stx/libcomp -I$(INCLUDE_TOP)/stx/libtool
# if you need any additional defines for embedded C code,
@@ -164,8 +164,7 @@
$(OUTDIR)JavaParser_Eclipse.$(O) JavaParser_Eclipse.$(H): JavaParser_Eclipse.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaScannerBase.$(O) JavaScannerBase.$(H): JavaScannerBase.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaSetInspectorView.$(O) JavaSetInspectorView.$(H): JavaSetInspectorView.st $(INCLUDE_TOP)/stx/libtool/SetInspectorView.$(H) $(INCLUDE_TOP)/stx/libtool/InspectorView.$(H) $(INCLUDE_TOP)/stx/libview/SimpleView.$(H) $(INCLUDE_TOP)/stx/libview/DisplaySurface.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsMedium.$(H) $(INCLUDE_TOP)/stx/libview/DeviceGraphicsContext.$(H) $(INCLUDE_TOP)/stx/libview/GraphicsContext.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSettingsApplication.$(O) JavaSettingsApplication.$(H): JavaSettingsApplication.st $(INCLUDE_TOP)/stx/libtool/AbstractSettingsApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalItem.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(INCLUDE_TOP)/stx/libwidg2/HierarchicalList.$(H) $(INCLUDE_TOP)/stx/libbasic2/List.$(H) $(INCLUDE_TOP)/stx/libbasic/OrderedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(STCHDR)
-$(OUTDIR)JavaSourcePartitionerTests.$(O) JavaSourcePartitionerTests.$(H): JavaSourcePartitionerTests.st $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParserTest.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPAbstractParseTest.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestCase.$(H) $(INCLUDE_TOP)/stx/goodies/sunit/TestAsserter.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)JavaSettingsApplication.$(O) JavaSettingsApplication.$(H): JavaSettingsApplication.st $(INCLUDE_TOP)/stx/libtool/AbstractSettingsApplication.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaSourceReference.$(O) JavaSourceReference.$(H): JavaSourceReference.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)stx_libjava_tools.$(O) stx_libjava_tools.$(H): stx_libjava_tools.st $(INCLUDE_TOP)/stx/libbasic/LibraryDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaCommentNode.$(O) JavaCommentNode.$(H): JavaCommentNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
@@ -185,9 +184,8 @@
$(OUTDIR)JavaIntTypeNode.$(O) JavaIntTypeNode.$(H): JavaIntTypeNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaTypeNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaLongTypeNode.$(O) JavaLongTypeNode.$(H): JavaLongTypeNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaTypeNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaParser.$(O) JavaParser.$(H): JavaParser.st $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSourcePartitioner.$(O) JavaSourcePartitioner.$(H): JavaSourcePartitioner.st $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
$(OUTDIR)JavaVoidTypeNode.$(O) JavaVoidTypeNode.$(H): JavaVoidTypeNode.st $(INCLUDE_TOP)/stx/libjava/tools/JavaTypeNode.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNode.$(H) $(INCLUDE_TOP)/stx/libcomp/ParseNode.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScanner.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScannerBase.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNodeBuilder.$(H) $(STCHDR)
+$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParseNodeBuilder.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScanner.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaScannerBase.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParser.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserII.$(H) $(INCLUDE_TOP)/stx/libjava/tools/JavaParserI.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPCompositeParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPDelegateParser.$(H) $(INCLUDE_TOP)/stx/goodies/petitparser/PPParser.$(H) $(STCHDR)
$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libjava/JavaClass.$(H) $(INCLUDE_TOP)/stx/libjava/JavaBehavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Class.$(H) $(INCLUDE_TOP)/stx/libbasic/ClassDescription.$(H) $(INCLUDE_TOP)/stx/libbasic/Behavior.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libjava/JavaObject.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)/stx/libtool/SystemBrowser.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(INCLUDE_TOP)/stx/libwidg/GenericToolbarIconLibrary.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/tools/Make.spec Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/Make.spec Wed Jan 16 16:24:02 2013 +0000
@@ -78,7 +78,6 @@
JavaScannerBase \
JavaScanner \
JavaSyntaxHighlighter \
- JavaSourcePartitioner \
JavaSettingsApplication \
JavaSourceReference \
@@ -114,7 +113,6 @@
$(OUTDIR)JavaScannerBase.$(O) \
$(OUTDIR)JavaScanner.$(O) \
$(OUTDIR)JavaSyntaxHighlighter.$(O) \
- $(OUTDIR)JavaSourcePartitioner.$(O) \
$(OUTDIR)JavaSettingsApplication.$(O) \
$(OUTDIR)JavaSourceReference.$(O) \
$(OUTDIR)extensions.$(O) \
--- a/tools/bc.mak Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/bc.mak Wed Jan 16 16:24:02 2013 +0000
@@ -34,7 +34,7 @@
-LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\stx\libwidg2 -I$(INCLUDE_TOP)\squeak\petitparser -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libtool
+LOCALINCLUDES= -I$(INCLUDE_TOP)\stx\libview -I$(INCLUDE_TOP)\stx\libwidg -I$(INCLUDE_TOP)\stx\libview2 -I$(INCLUDE_TOP)\stx\libjava -I$(INCLUDE_TOP)\stx\goodies\sunit -I$(INCLUDE_TOP)\stx\libbasic2 -I$(INCLUDE_TOP)\squeak\petitparser -I$(INCLUDE_TOP)\stx\libbasic -I$(INCLUDE_TOP)\stx\goodies\petitparser -I$(INCLUDE_TOP)\stx\libcomp -I$(INCLUDE_TOP)\stx\libtool
LOCALDEFINES=
STCLOCALOPT=-package=$(PACKAGE) -I. $(LOCALINCLUDES) -headerDir=. $(STCLOCALOPTIMIZATIONS) $(STCWARNINGS) $(LOCALDEFINES) -varPrefix=$(LIBNAME)
@@ -89,8 +89,7 @@
$(OUTDIR)JavaParser_Eclipse.$(O) JavaParser_Eclipse.$(H): JavaParser_Eclipse.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaScannerBase.$(O) JavaScannerBase.$(H): JavaScannerBase.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaSetInspectorView.$(O) JavaSetInspectorView.$(H): JavaSetInspectorView.st $(INCLUDE_TOP)\stx\libtool\SetInspectorView.$(H) $(INCLUDE_TOP)\stx\libtool\InspectorView.$(H) $(INCLUDE_TOP)\stx\libview\SimpleView.$(H) $(INCLUDE_TOP)\stx\libview\DisplaySurface.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsMedium.$(H) $(INCLUDE_TOP)\stx\libview\DeviceGraphicsContext.$(H) $(INCLUDE_TOP)\stx\libview\GraphicsContext.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSettingsApplication.$(O) JavaSettingsApplication.$(H): JavaSettingsApplication.st $(INCLUDE_TOP)\stx\libtool\AbstractSettingsApplication.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalItem.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(INCLUDE_TOP)\stx\libwidg2\HierarchicalList.$(H) $(INCLUDE_TOP)\stx\libbasic2\List.$(H) $(INCLUDE_TOP)\stx\libbasic\OrderedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(STCHDR)
-$(OUTDIR)JavaSourcePartitionerTests.$(O) JavaSourcePartitionerTests.$(H): JavaSourcePartitionerTests.st $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParserTest.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPAbstractParseTest.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestCase.$(H) $(INCLUDE_TOP)\stx\goodies\sunit\TestAsserter.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)JavaSettingsApplication.$(O) JavaSettingsApplication.$(H): JavaSettingsApplication.st $(INCLUDE_TOP)\stx\libtool\AbstractSettingsApplication.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaSourceReference.$(O) JavaSourceReference.$(H): JavaSourceReference.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)stx_libjava_tools.$(O) stx_libjava_tools.$(H): stx_libjava_tools.st $(INCLUDE_TOP)\stx\libbasic\LibraryDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaCommentNode.$(O) JavaCommentNode.$(H): JavaCommentNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
@@ -110,9 +109,8 @@
$(OUTDIR)JavaIntTypeNode.$(O) JavaIntTypeNode.$(H): JavaIntTypeNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaTypeNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaLongTypeNode.$(O) JavaLongTypeNode.$(H): JavaLongTypeNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaTypeNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaParser.$(O) JavaParser.$(H): JavaParser.st $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSourcePartitioner.$(O) JavaSourcePartitioner.$(H): JavaSourcePartitioner.st $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
$(OUTDIR)JavaVoidTypeNode.$(O) JavaVoidTypeNode.$(H): JavaVoidTypeNode.st $(INCLUDE_TOP)\stx\libjava\tools\JavaTypeNode.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNode.$(H) $(INCLUDE_TOP)\stx\libcomp\ParseNode.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScanner.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScannerBase.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNodeBuilder.$(H) $(STCHDR)
+$(OUTDIR)JavaSyntaxHighlighter.$(O) JavaSyntaxHighlighter.$(H): JavaSyntaxHighlighter.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParseNodeBuilder.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScanner.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaScannerBase.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParser.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserII.$(H) $(INCLUDE_TOP)\stx\libjava\tools\JavaParserI.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPCompositeParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPDelegateParser.$(H) $(INCLUDE_TOP)\stx\goodies\petitparser\PPParser.$(H) $(STCHDR)
$(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libjava\JavaClass.$(H) $(INCLUDE_TOP)\stx\libjava\JavaBehavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Class.$(H) $(INCLUDE_TOP)\stx\libbasic\ClassDescription.$(H) $(INCLUDE_TOP)\stx\libbasic\Behavior.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libjava\JavaObject.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)\stx\libtool\SystemBrowser.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(INCLUDE_TOP)\stx\libwidg\GenericToolbarIconLibrary.$(H) $(STCHDR)
# ENDMAKEDEPEND --- do not remove this line
--- a/tools/libInit.cc Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/libInit.cc Wed Jan 16 16:24:02 2013 +0000
@@ -55,7 +55,6 @@
_JavaIntTypeNode_Init(pass,__pRT__,snd);
_JavaLongTypeNode_Init(pass,__pRT__,snd);
_JavaParser_Init(pass,__pRT__,snd);
-_JavaSourcePartitioner_Init(pass,__pRT__,snd);
_JavaVoidTypeNode_Init(pass,__pRT__,snd);
_JavaSyntaxHighlighter_Init(pass,__pRT__,snd);
--- a/tools/stx_libjava_tools.st Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/stx_libjava_tools.st Wed Jan 16 16:24:02 2013 +0000
@@ -91,7 +91,7 @@
#('JavaSourcePartitioner' autoload)
JavaSettingsApplication
JavaSourceReference
- JavaSourcePartitionerTests
+ #('JavaSourcePartitionerTests' autoload)
)
!
@@ -122,28 +122,11 @@
!stx_libjava_tools class methodsFor:'description - java'!
-javaClassPath
-
- <javaclasspath>
-
- ^{
- self packageDirectory / 'java' / 'bin' .
- self packageDirectory / 'java' / 'libs' / '*.jar'
- }
+javaBundle
- "Created: / 17-11-2011 / 23:00:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-!
-
-javaSourcePath
-
- <javasourcepath>
+ ^JavaCodeBundle standardPackageBundleFor: self package
- ^{
- self packageDirectory / 'java' / 'src' .
- self packageDirectory / 'java' / 'libs-src' / '*.jar' .
- }
-
- "Created: / 17-11-2011 / 23:01:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Created: / 15-01-2013 / 17:35:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!stx_libjava_tools class methodsFor:'description - project information'!
--- a/tools/tools.rc Tue Jan 15 18:40:37 2013 +0000
+++ b/tools/tools.rc Wed Jan 16 16:24:02 2013 +0000
@@ -25,7 +25,7 @@
VALUE "LegalCopyright", "Copyright Claus Gittinger 1988-2011\nCopyright eXept Software AG 1998-2011\0"
VALUE "ProductName", "Smalltalk/X\0"
VALUE "ProductVersion", "6.2.3.0\0"
- VALUE "ProductDate", "Fri, 11 Jan 2013 12:37:05 GMT\0"
+ VALUE "ProductDate", "Wed, 16 Jan 2013 13:45:44 GMT\0"
END
END