--- a/SmallSense__CodeNavigationService.st Mon Mar 23 17:24:50 2015 +0100
+++ b/SmallSense__CodeNavigationService.st Mon Mar 23 17:28:56 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
stx:goodies/smallsense - A productivity plugin for Smalltalk/X IDE
Copyright (C) 2013-2014 Jan Vrany
@@ -255,7 +257,13 @@
!
navigateToTypeReference: node
- | classType className classes |
+ | classType className classes javaClass|
+
+ (javaClass := Smalltalk at:#JavaClass) isNil ifTrue:[
+ Transcript showCR:'libjava not loaded'.
+ service codeView textView flash.
+ ^ self.
+ ].
classType := node resolvedType.
classType notNil ifTrue:[
@@ -268,7 +276,7 @@
typeName size == 1 ifTrue:[
"/ Search imports...
unit imports do:[:import |
- | importedName typeName |
+ | importedName |
importedName := import getImportName. "/ returns char[][].
importedName last = typeName last ifTrue:[
@@ -284,7 +292,7 @@
].
].
"/ Kludge - support both old and new Java class naming scheme
- classes := (JavaClass canUnderstand: #binaryName)
+ classes := (javaClass canUnderstand: #binaryName)
ifTrue:[self environment allClasses select:[:cls | cls isJavaClass and:[cls binaryName = className]]]
ifFalse:[self environment allClasses select:[:cls | cls isJavaClass and:[cls name = className]]].
@@ -331,6 +339,14 @@
!CodeNavigationService class methodsFor:'documentation'!
+version
+ ^ '$Header: /cvs/stx/stx/goodies/smallsense/SmallSense__CodeNavigationService.st,v 1.2 2015-03-23 16:28:56 cg Exp $'
+!
+
+version_CVS
+ ^ '$Path: stx/goodies/smallsense/SmallSense__CodeNavigationService.st, Version: 1.0, User: cg, Time: 2015-03-23T17:29:41.758+01$'
+!
+
version_HG
^ '$Changeset: <not expanded> $'