Source Sniffer documentation v1.7x - OpenNTF

jumentousklipitiklopΛογισμικό & κατασκευή λογ/κού

30 Οκτ 2013 (πριν από 4 χρόνια και 2 μήνες)

101 εμφανίσεις



Source Sniffer

-

©
Ferry Kranenburg

documentation v1.
7

Table of contents

1.

about this application

................................
................................
................................
................................
......................

1

2.

about me

................................
................................
................................
................................
................................
............

1

3.

system requirem
ents
................................
................................
................................
................................
........................

1

4.

installation
................................
................................
................................
................................
................................
..........

2

5.

Source Sniffer
-

main application
-

quick guide

................................
................................
................................
...........

3

6.

using Source Sniffer
-

load a application in Source Sniffer

................................
................................
.......................

4

7.

using Source Sniffer
-

get all
references to the selected design element

................................
...............................

5

8.

using Source Sniffer
-

get all references of selected text

................................
................................
..........................

6

9.

using Source Sniffer
-

finding unused variables

................................
................................
................................
..........

7

10.

using Source Sniffer
-

the preferences page

................................
................................
................................
..........

7

11.

using Source Sniffer
-

the preferences page

................................
................................
................................
..........

8


1.

about


this application

Source Sniffer is a Domino Designer
extension

written in Eclipse. It can search in the source code of a entire
application, it supports Java, Javascript, Lotusscript and Formula languages. Xpages are completely
decoded so
code can be found there too
.


All graphics and icons are designed by my wife

;)

(
Willemien Kranenburg
)
. If you would like to use th
ose
icons

in your own application

you may
, but
let me know by sending me an

e
-
mail @

ferry.kranenburg@bureaubos.nl
.

2.

about me

Source Sniffer is my la
test project and is
the successor

of
Lotusscript

Manager (also available for download
on OpenNTF).

I spend three months on how to develop a
plug
-
in

in Eclipse for Lotus Domino. I did not
have
any experience with Java or

Eclipse. If you are a Eclipse
plug
-
in

developer beginner than I would
recommend
you
to visit the following sites:



www.openntf
.org
-

The catalog contains some nice examples to start with



www.domiclipse.com
-

step by step tutorial to create a simple
plug
-
in

within Eclipse.



www.mindoo.com
-

blog, contains some nice DDE
plug
-
in

examples



www.
lekkimworld.com
-

tutorials, tricks and hints about Eclipse developing

3.

system requirements

This
plug
-
in

requires Lotus Domino Designer 8.5.
1

4.

installation



First download Source Sniffer from openntf and unpack the zip file.



Make sure the policy ' Allow user initiated updates'
is
enabled
, otherwise this will not work. Locate the
file {notes install dir}
\
framework
\
rcp
\
plugin_customization.ini and add the line
com.ibm.notes.branding/enable.update.ui=true and restart the Notes cl
ient.



From the main menu select File
-
> Application
-
> Install.



Select search for new features to install.



Add folder location and browse to the unpacked
plug
-
in

directory
, go to the
org.openntf.sourcesniffer.update directory



Select next and check the
application 'Source Sniffer'



Accept the license and install the
plug
-
in
.






5.

Source Sniffer
-

main application
-

quick guide

Source Sniffer add itself to the default Domino Designer perspective in Eclipse. You can find it next to the
properties and events

views (default part of Domino Designer in Eclipse)
. You can also find it by choosing
'Window'
-
> 'Show eclipse views'
-
> 'Other'.



1. type your search text to filter all elements on that text in their source code. Pres
s ENTER to refresh the
treeview

or push the search button (3.)

2. All design element that contains some code (java, javascript, lotusscript or formula) will be listed here. You can
collapse all sections to get to the desired element.

Right click an element so you can get all references
to that
element.

3. Search button, sets a filter on the text typed (1.)

4
. Removes the current filter. No filter is being applied after this, so you should see all source code in your
application.

5
.
Open a previously saved Source Sniffer
-
xml file.

6
.
Save

current application code to a Source Sniffer
-
xml file.

8
.
Quickly find text within the source code. If you have large script where a specific string has to be found, this
option is the right tool for it.

9. Displays the current loaded application (nsf/ntf

or xml file)





6.

using Source Sniffer

-

load a application in Source Sniffer

From within Domino Designer you can right
-
click on a application and choose 'Load in Source Sniffer'

(1)
. All
design elements will be loaded into Source Sniffer. You can cancel
this progress by clicking cancel or hide this
progress (to the progress tab) to continue working while Source Sniffer is loading the application

(2)
.



1. load in source sniffer









2
. progress bar (=default Eclipse progress bar)




7.

using Source
Sniffer
-

get all references to the selected design element

Choose 'Get all references' if you right
-
click on a design element

(3)
. If the application is currently loaded in
Source Sniffer, it will load it
automatically
. It filters on the design element

na
me

in all code

(4)
. You can edit the
filter by editing it in de textbox and hitting ENTER. After ENTER the treeview will be refreshed and displays the
new results based on you filter.



3. Get all references to currently selected design element


4. The filter shows all references to '($Inbox)' in
your

code



8.

using Source Sniffer
-

get all references
of selected text

Currently only the Eclipse Domino Designer is supported by selecting text and
filter it
automatically
. After the text
selection you h
ave to click on the Source Sniffer icon in the toolbar. If the application is not loaded yet, it will be
automatically

loaded. I think screenshot 5 says it all...




9.

using Source Sniffer
-

finding unused variables

Activate the tab 'Unused variables' to
get a list of all declared variables. Variables not used are displayed in red.
Also note this from within the source code viewer.


10.

using Source Sniffer
-

the preferences page

Under File=> Preferences you'll find a option 'Source Sniffer'. On this page you

can select the temporary directory
if you would like to have Source Sniffer automatically cache all applications for you. If you leave this empty, no
caching will be created!

You can also define the default save/browse path for the Source Sniffer
-
xml file
s.




11.

using Source Sniffer
-

browse for xml files or save the current application to xml

Source Sniffer can save the currently loaded application to XML. All source code will be saved by using the Save
button so you can open it later by using the browse button.