D2 Java Code
D2 Java Code
Sébastien Paumier
LIGM, Université Paris-Est
paumier@univ-mlv.fr 2
Unitex logic
paumier@univ-mlv.fr 3
IDELing logic
paumier@univ-mlv.fr 4
The challenge
paumier@univ-mlv.fr 5
ConfigModel
paumier@univ-mlv.fr 6
ConfigManager
paumier@univ-mlv.fr 7
Configuration storage
● in Unitex:
– a file named Config in the language
directory
– produced by the an instance of
Preferences
– some things are hard-coded
paumier@univ-mlv.fr 8
Configuration storage
● in IDELing, there are 4 files:
– pom.xml: maven configuration file
● Pom.java
– project.local_config: user's private preferences (text
editor, last graphs used…)
● ProjectLocalConfig.java
– project.preferences: Unitex preferences (font, …)
● Preferences.java
– project.versionable_config: project settings to be shared
on SVN (preprocessing config, …)
● ProjectVersionableConfig.java
● top-level object: Project.java that
delegates to the previous classes
paumier@univ-mlv.fr 9
Configuration storage
paumier@univ-mlv.fr 10
Frames
● InternalFrameManager: allows each
project to have its own JDesktopPane in
IDELing
● FrameFactory objects to manage frames
● TabbableInternalFrame: used to provide
a tab access to frames in IDELing
paumier@univ-mlv.fr 12
Launching commands
paumier@univ-mlv.fr 13
Adding a new command
paumier@univ-mlv.fr 15
SVN support
paumier@univ-mlv.fr 16
SVN support
● SvnExecutor.getSvnStatusInfo returns
a SvnStatusInfo instance that lists:
– unversioned files
– added files
– modified files
– removed files
– files in conflict
● used to refresh the tree and to prepare
commits
paumier@univ-mlv.fr 17
SVN credentials
paumier@univ-mlv.fr 18
Ignore/add policy
● by default, ignore ..* *.fst2 *.bin
*.inf target dep build
project.local_config diff
– could be overriden by a manual svn add,
but you don't really want that
● .grf files are forced to be considered as
binary files in order to avoid svn diff3
merging them as text
● don't add any file above the src directory,
except gramlab configuration files
paumier@univ-mlv.fr 19
$HOME/.gramlab
svn_repositories: 2
http://foosvn.univmlv.fr/svn/test/fr
http://my.other.svn.server.com/svn/biniou
/home/paumier/my_gramlab
en
fr
paumier@univ-mlv.fr 20
Maven support
paumier@univ-mlv.fr 21
Maven support
paumier@univ-mlv.fr 22
Packaging a project
mvn Dunitextoollogger=<path to it> ...
paumier@univ-mlv.fr 23
Getting dependencies
paumier@univ-mlv.fr 24
Hornet nests
paumier@univ-mlv.fr 25