You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(3) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(15) |
Feb
(33) |
Mar
(35) |
Apr
(53) |
May
(1) |
Jun
(2) |
Jul
|
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <wu...@us...> - 2008-02-06 10:15:06
|
Revision: 34 http://davinspector.svn.sourceforge.net/davinspector/?rev=34&view=rev Author: wuest Date: 2008-02-06 02:15:00 -0800 (Wed, 06 Feb 2008) Log Message: ----------- Initial Commit Added Paths: ----------- trunk/DAVInspector/src/de/dlr/DAVInspector/icons/inspector32.png Added: trunk/DAVInspector/src/de/dlr/DAVInspector/icons/inspector32.png =================================================================== (Binary files differ) Property changes on: trunk/DAVInspector/src/de/dlr/DAVInspector/icons/inspector32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-02-04 20:53:23
|
Revision: 33 http://davinspector.svn.sourceforge.net/davinspector/?rev=33&view=rev Author: wuest Date: 2008-02-04 12:53:16 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Initial import. Added Paths: ----------- trunk/DAVInspector/.classpath trunk/DAVInspector/.project trunk/DAVInspector/.settings/ trunk/DAVInspector/.settings/org.eclipse.jdt.core.prefs trunk/DAVInspector/.settings/org.eclipse.jdt.ui.prefs trunk/DAVInspector/DAVInspector.bat trunk/DAVInspector/bin/ trunk/DAVInspector/build-user.xml trunk/DAVInspector/build.xml trunk/DAVInspector/config.properties trunk/DAVInspector/src/ trunk/DAVInspector/src/.externalToolBuilders/ trunk/DAVInspector/src/.externalToolBuilders/AUTO.launch trunk/DAVInspector/src/.externalToolBuilders/DAVI.launch trunk/DAVInspector/src/.settings/ trunk/DAVInspector/src/.settings/org.eclipse.jdt.core.prefs trunk/DAVInspector/src/.settings/org.eclipse.jdt.ui.prefs trunk/DAVInspector/src/.settings/org.eclipse.wst.validation.prefs trunk/DAVInspector/src/de/ trunk/DAVInspector/src/de/dlr/ trunk/DAVInspector/src/de/dlr/DAVInspector/ trunk/DAVInspector/src/de/dlr/DAVInspector/Common/ trunk/DAVInspector/src/de/dlr/DAVInspector/Common/Util.java trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/ trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/DAVInspector.java trunk/DAVInspector/src/de/dlr/DAVInspector/HTTP/ trunk/DAVInspector/src/de/dlr/DAVInspector/HTTP/HTTPMessage.java trunk/DAVInspector/src/de/dlr/DAVInspector/HTTP/HTTPMethod.java trunk/DAVInspector/src/de/dlr/DAVInspector/HTTP/HTTPStatusCode.java trunk/DAVInspector/src/de/dlr/DAVInspector/HTTP/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/History/ trunk/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableCellRenderer.java trunk/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableModel.java trunk/DAVInspector/src/de/dlr/DAVInspector/History/Message.java trunk/DAVInspector/src/de/dlr/DAVInspector/History/MessageHistory.java trunk/DAVInspector/src/de/dlr/DAVInspector/History/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/ trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/EditPlugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/ViewPlugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/Plugin/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/ trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/ChannelThread.java trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/ClientListener.java trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/RelayModel.java trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/RelayModelInterface.java trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/ServerListener.java trunk/DAVInspector/src/de/dlr/DAVInspector/Relay/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/UI/ trunk/DAVInspector/src/de/dlr/DAVInspector/UI/AboutDialog.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/ConfigurationDialog.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/MainController.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/MainControllerInterface.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/MainView.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationDialog.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationTableModel.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/UIResource.java trunk/DAVInspector/src/de/dlr/DAVInspector/UI/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/icons/ trunk/DAVInspector/src/de/dlr/DAVInspector/icons/configure.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/connect_no.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/control_play.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/control_stop.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/delete.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/deleteleft.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/deleteright.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/documentinfo.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/exit.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/help.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/inspector16.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/inspector32.ico trunk/DAVInspector/src/de/dlr/DAVInspector/icons/totheleft.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/totheright.png trunk/DAVInspector/src/de/dlr/DAVInspector/icons/wizard.png trunk/DAVInspector/src/de/dlr/DAVInspector/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/ trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/ trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/HeaderPlugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/ trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/JTextPaneContentHandler.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/XMLPlugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/XMLTextPane.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/package.html trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/ trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/JTreeContentHandler.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/XMLTreePlugin.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/XMLTreeView.java trunk/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/package.html trunk/DAVInspector/src/src-style/ trunk/DAVInspector/src/src-style/checks.xml trunk/DAVInspector/src/src-style/eclipse-codetemplates.xml trunk/DAVInspector/src/src-style/eclipse-formatter.xml Added: trunk/DAVInspector/.classpath =================================================================== --- trunk/DAVInspector/.classpath (rev 0) +++ trunk/DAVInspector/.classpath 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: trunk/DAVInspector/.project =================================================================== --- trunk/DAVInspector/.project (rev 0) +++ trunk/DAVInspector/.project 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>DAVInspector</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jdt.core.javanature</nature> + </natures> +</projectDescription> Added: trunk/DAVInspector/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/DAVInspector/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/DAVInspector/.settings/org.eclipse.jdt.core.prefs 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,12 @@ +#Mon Feb 04 14:52:05 CET 2008 +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 Added: trunk/DAVInspector/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- trunk/DAVInspector/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ trunk/DAVInspector/.settings/org.eclipse.jdt.ui.prefs 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,3 @@ +#Mon Feb 04 14:52:05 CET 2008 +eclipse.preferences.version=1 +internal.default.compliance=default Added: trunk/DAVInspector/DAVInspector.bat =================================================================== --- trunk/DAVInspector/DAVInspector.bat (rev 0) +++ trunk/DAVInspector/DAVInspector.bat 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,3 @@ +@echo off + +C:\Programme\Java\jdk1.6.0\bin\java -jar DAVInspector.jar Added: trunk/DAVInspector/build-user.xml =================================================================== --- trunk/DAVInspector/build-user.xml (rev 0) +++ trunk/DAVInspector/build-user.xml 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,58 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse.ant.import?> +<project> + + <target name="dist" description="Generates distribution in subdirectory dist"> + + <!-- Change to desired location --> + <property name="dist" location="C:/Programme/DAVInspector" /> + + <!-- Create necessary directories --> + <delete dir="${dist}" /> + + <mkdir dir="${dist}" /> + <mkdir dir="${dist}/plugins" /> + <mkdir dir="${dist}/lib" /> + <mkdir dir="${dist}/doc" /> + + <!-- Create plugin jar files --> + <jar jarfile="${dist}/plugins/HeaderPlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/HeaderPlugin/**"> + </jar> + <jar jarfile="${dist}/plugins/XMLPlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/XMLPlugin/**"> + </jar> + <jar jarfile="${dist}/plugins/XMLTreePlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/XMLTreePlugin/**"> + </jar> + + <!-- Create DAVInspector jar file --> + <jar jarfile="${dist}/DAVInspector.jar" + basedir="bin" + includes="de/dlr/DAVInspector/**" + excludes="de/dlr/DAVInspector/plugins/**, de/dlr/DAVInspector/src-style/**"> + <manifest> + <attribute name="Main-Class" value="de/dlr/DAVInspector.DAVInspector"/> + <attribute name="Built-By" value="${user.name}"/> + <section name="DAVInspector"> + <attribute name="Specification-Title" value="DAVInspector"/> + <attribute name="Specification-Version" value="${java.specification.version}"/> + <attribute name="Specification-Vendor" value="DLR"/> + <attribute name="Implementation-Title" value="DAVInspector"/> + <attribute name="Implementation-Version" value="${java.version}"/> + <attribute name="Implementation-Vendor" value="DLR"/> + </section> + </manifest> + </jar> + + <!-- Copy script files --> + <copy todir="${dist}"> + <fileset dir="." includes="*.bat, config.properties" /> + <fileset dir="bin/de/dlr/DAVInspector/icons/" includes="*.ico" /> + </copy> + + </target> +</project> \ No newline at end of file Added: trunk/DAVInspector/build.xml =================================================================== --- trunk/DAVInspector/build.xml (rev 0) +++ trunk/DAVInspector/build.xml 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- WARNING: Eclipse auto-generated file. + Any modifications will be overwritten. + To include a user specific buildfile here, simply create one in the same + directory with the processing instruction <?eclipse.ant.import?> + as the first entry and export the buildfile again. --> +<project basedir="." default="build" name="DAVInspector-Prototyp2"> + <property environment="env"/> + <property name="ECLIPSE_HOME" value="../../../../Programme/eclipse"/> + <property name="debuglevel" value="source,lines,vars"/> + <property name="target" value="1.6"/> + <property name="source" value="1.6"/> + <import file="build-user.xml" /> + <path id="DAVInspector-Prototyp2.classpath"> + <pathelement location="bin"/> + </path> + <target name="init"> + <mkdir dir="bin"/> + <copy includeemptydirs="false" todir="bin"> + <fileset dir="src" excludes="**/*.uad, **/*.ucd, **/*.uld, **/*.upd, **/*.udd, **/*.uod, **/*.usd, **/*.utd, **/*.uud, **/*.odd, **/*.ead, **/*.ecd, **/*.eld, **/*.epd, **/*.edd, **/*.eod, **/*.esd, **/*.etd, **/*.eud, **/*.urd*.uml, **/*.ecore, **/*.launch, **/*.java"/> + </copy> + </target> + <target name="clean"> + <delete dir="bin"/> + </target> + <target depends="clean" name="cleanall"/> + <target depends="build-subprojects,build-project" name="build"/> + <target name="build-subprojects"/> + <target depends="init" name="build-project"> + <echo message="${ant.project.name}: ${ant.file}"/> + <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"> + <src path="src"/> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </javac> + </target> + <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> + <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> + <copy todir="${ant.library.dir}"> + <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> + </copy> + <unzip dest="${ant.library.dir}"> + <patternset includes="jdtCompilerAdapter.jar"/> + <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> + </unzip> + </target> + <target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> + <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> + <antcall target="build"/> + </target> + <target name="New_configuration (2)"> + <java classname="" failonerror="true" fork="yes"> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </java> + </target> + <target name="DAVInspector"> + <java classname="de.dlr.DAVInspector.DAVInspector" failonerror="true" fork="yes"> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </java> + </target> +</project> Added: trunk/DAVInspector/config.properties =================================================================== --- trunk/DAVInspector/config.properties (rev 0) +++ trunk/DAVInspector/config.properties 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,5 @@ +#Mon Feb 04 20:56:00 CET 2008 +ClientPort=9999 +ServerPort=8080 +ServerAddress=localhost +ClientAddress= Added: trunk/DAVInspector/src/.externalToolBuilders/AUTO.launch =================================================================== --- trunk/DAVInspector/src/.externalToolBuilders/AUTO.launch (rev 0) +++ trunk/DAVInspector/src/.externalToolBuilders/AUTO.launch 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="build,dist,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/DAVInspector-Prototyp1/build.xml"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="1"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DAVInspector-Prototyp1"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/DAVInspector-Prototyp1/build.xml}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> Added: trunk/DAVInspector/src/.externalToolBuilders/DAVI.launch =================================================================== --- trunk/DAVInspector/src/.externalToolBuilders/DAVI.launch (rev 0) +++ trunk/DAVInspector/src/.externalToolBuilders/DAVI.launch 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<launchConfiguration type="org.eclipse.ant.AntBuilderLaunchConfigurationType"> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_AUTO_TARGETS" value="build,dist,"/> +<stringAttribute key="org.eclipse.ant.ui.ATTR_ANT_MANUAL_TARGETS" value="build,dist,"/> +<booleanAttribute key="org.eclipse.ant.ui.ATTR_TARGETS_UPDATED" value="true"/> +<booleanAttribute key="org.eclipse.ant.ui.DEFAULT_VM_INSTALL" value="false"/> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS"> +<listEntry value="/DAVInspector-Prototyp1"/> +</listAttribute> +<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES"> +<listEntry value="4"/> +</listAttribute> +<booleanAttribute key="org.eclipse.debug.core.appendEnvironmentVariables" value="true"/> +<booleanAttribute key="org.eclipse.debug.ui.ATTR_LAUNCH_IN_BACKGROUND" value="false"/> +<stringAttribute key="org.eclipse.jdt.launching.CLASSPATH_PROVIDER" value="org.eclipse.ant.ui.AntClasspathProvider"/> +<booleanAttribute key="org.eclipse.jdt.launching.DEFAULT_CLASSPATH" value="true"/> +<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="DAVInspector-Prototyp1"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_LOCATION" value="${workspace_loc:/DAVInspector-Prototyp2/build.xml}"/> +<stringAttribute key="org.eclipse.ui.externaltools.ATTR_RUN_BUILD_KINDS" value="full,incremental,auto,"/> +<booleanAttribute key="org.eclipse.ui.externaltools.ATTR_TRIGGERS_CONFIGURED" value="true"/> +</launchConfiguration> Added: trunk/DAVInspector/src/.settings/org.eclipse.jdt.core.prefs =================================================================== --- trunk/DAVInspector/src/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ trunk/DAVInspector/src/.settings/org.eclipse.jdt.core.prefs 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,256 @@ +#Thu Oct 11 16:36:52 CEST 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=140 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true Added: trunk/DAVInspector/src/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- trunk/DAVInspector/src/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ trunk/DAVInspector/src/.settings/org.eclipse.jdt.ui.prefs 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,5 @@ +#Wed Jan 23 14:50:48 CET 2008 +eclipse.preferences.version=1 +formatter_profile=_DLR +formatter_settings_version=11 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${todo}\: ${user}\: enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n *\r\n * @version $$LastChangedRevision$$\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n *\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * ${file_name}\r\n * \r\n * ${todo}\: ${user} Enter comment\!\r\n * \r\n * Created\: ${date} ${user} <email>\r\n * Changed\:\r\n * \r\n * $$Id$$\r\n * \r\n * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR)\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the 'License');\r\n * you may not use this file except in compliance with the License. \r\n * You may obtain a copy of the License at \r\n * \r\n * http\://www.apache.org/licenses/LICENSE-2.0 \r\n * \r\n * Unless required by applicable law or agreed to in writing, software \r\n * distributed under the License is distributed on an 'AS IS' BASIS, \r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n \r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\nlogger.error(${exception_var}.getStackTrace());</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> Added: trunk/DAVInspector/src/.settings/org.eclipse.wst.validation.prefs =================================================================== --- trunk/DAVInspector/src/.settings/org.eclipse.wst.validation.prefs (rev 0) +++ trunk/DAVInspector/src/.settings/org.eclipse.wst.validation.prefs 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,6 @@ +#Thu Oct 11 16:32:55 CEST 2007 +DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator; +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator; +USER_PREFERENCE=overrideGlobalPreferencesfalse +eclipse.preferences.version=1 Added: trunk/DAVInspector/src/de/dlr/DAVInspector/Common/Util.java =================================================================== --- trunk/DAVInspector/src/de/dlr/DAVInspector/Common/Util.java (rev 0) +++ trunk/DAVInspector/src/de/dlr/DAVInspector/Common/Util.java 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,70 @@ +/* + * Util.java + * + * TODO: HJW Enter comment! + * + * Created: 04.02.2008 HJW <email> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.Common; + +import java.awt.Dimension; +import java.awt.Toolkit; +import java.awt.Window; + +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + + +/** + * TODO: HJW: Enter comment! + * + * @version $LastChangedRevision$ + * @author HJW + */ +public class Util { + + public static void setUIDesign() { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException lfe) { + System.err.println(lfe); + } catch (IllegalAccessException iae) { + System.err.println(iae); + } catch (InstantiationException ie) { + System.err.println(ie); + } catch (ClassNotFoundException cnfe) { + System.err.println(cnfe); + } + } + + public static void centerWindow(Window window) { + // Center the window + Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize(); + Dimension windowSize = window.getSize(); + if (windowSize.height > screenSize.height) { + windowSize.height = screenSize.height; + } + if (windowSize.width > screenSize.width) { + windowSize.width = screenSize.width; + } + window.setLocation((screenSize.width - windowSize.width) / 2, (screenSize.height - windowSize.height) / 2); + } +} Added: trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java =================================================================== --- trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java (rev 0) +++ trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,280 @@ +/* + * Configuration.java + * + * This Class stores the configuration of the DAVInspector. + * + * Created: 21.12.2007 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.Configuration; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Properties; +import java.util.Vector; + +import de.dlr.DAVInspector.Plugin.Plugin; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Configuration { + + /** + * + */ + private Properties properties; + + /** + * Port number of the server connection. + */ + private int serverPort; + + /** + * Port number of the client connection. + */ + private int clientPort; + + /** + * Address of the server. + */ + private String serverAddress; + + /** + * Address of the client. + */ + private String clientAddress; + + /** + * This list contains all available plugins that let you edit the traffic. + */ + private List<Plugin> availableEditPlugins; + + /** + * This list contains all available plugins that let you view the traffic. + */ + private List<Plugin> availableViewPlugins; + + /** + * This list contains all plugins to view the traffic to the server. + */ + private List<Plugin> activeViewPluginsToServer; + + /** + * This list contains all plugins to view the traffic to the client. + */ + private List<Plugin> activeViewPluginsToClient; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToServer; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToClient; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Configuration() { + loadConfiguration(); + + availableEditPlugins = new Vector<Plugin>(); + availableViewPlugins = new Vector<Plugin>(); + // TODO: Load available plugins + + activeViewPluginsToServer = new Vector<Plugin>(); + activeViewPluginsToClient = new Vector<Plugin>(); + activeEditPluginsToServer = new Vector<Plugin>(); + activeEditPluginsToClient = new Vector<Plugin>(); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getAvailableEditPlugins() { + return availableEditPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getAvailableViewPlugins() { + return availableViewPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToServer() { + return activeViewPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToClient() { + return activeViewPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToServer() { + return activeEditPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToClient() { + return activeEditPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getServerAddress() { + return serverAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getServerPort() { + return serverPort; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getClientAddress() { + return clientAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getClientPort() { + return clientPort; + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void loadConfiguration() { + properties = new Properties(); + try { + properties.load(new FileInputStream(Constant.CONFIGURATION_FILENAME)); + // assign properties to variables + serverAddress = properties.getProperty("ServerAddress", Constant.PROXY_SERVERADDRESS); + serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constant.PROXY_SERVERPORT))); + clientAddress = properties.getProperty("ClientAddress", Constant.PROXY_CLIENTADDRESS); + clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constant.PROXY_CLIENTPORT))); + + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void storeConfiguration() { + // save variables in properties + properties.setProperty("ServerAddress", serverAddress); + properties.setProperty("ServerPort", String.valueOf(serverPort)); + properties.setProperty("ClientAddress", clientAddress); + properties.setProperty("ClientPort", String.valueOf(clientPort)); + + try { + properties.store(new FileOutputStream(Constant.CONFIGURATION_FILENAME), null); + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverAddressC server address + */ + public void setServerAddress(String serverAddressC) { + this.serverAddress = serverAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientAddressC client address + */ + public void setClientAddress(String clientAddressC) { + this.clientAddress = clientAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverPortC server port + */ + public void setServerPort(String serverPortC) { + this.serverPort = Integer.parseInt(serverPortC); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientPortC client port + */ + public void setClientPort(String clientPortC) { + this.clientPort = Integer.parseInt(clientPortC); + } +} Added: trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java =================================================================== --- trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java (rev 0) +++ trunk/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java 2008-02-04 20:53:16 UTC (rev 33) @@ -0,0 +1,194 @@ +/* + * Constants.java + * + * Definition aller ben\xF6tigten Konstanten. + * + * Created: 11.10.2007 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, eit... [truncated message content] |
From: <wu...@us...> - 2008-02-04 20:46:18
|
Revision: 32 http://davinspector.svn.sourceforge.net/davinspector/?rev=32&view=rev Author: wuest Date: 2008-02-04 12:46:13 -0800 (Mon, 04 Feb 2008) Log Message: ----------- Initial import. Added Paths: ----------- trunk/DAVInspector/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-24 15:58:49
|
Revision: 31 http://davinspector.svn.sourceforge.net/davinspector/?rev=31&view=rev Author: wuest Date: 2008-01-24 07:58:38 -0800 (Thu, 24 Jan 2008) Log Message: ----------- Added build files, icons, new plugins (XMLView, XMLTree). Renamed Constants.java to Constant.java. Added Packet HTTP. Reorganisation of the packet structure. Replaced LocalJarHelperClassLoader with URLClassLoader. Modified Paths: -------------- branches/prototype1/DAVInspector/.checkstyle branches/prototype1/DAVInspector/.project branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Relay.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/StreamCopyThread.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/ConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/HeaderPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/XMLPlugin.java branches/prototype1/DAVInspector/src/src-style/checks.xml Added Paths: ----------- branches/prototype1/DAVInspector/DAVInspector.bat branches/prototype1/DAVInspector/build-user.xml branches/prototype1/DAVInspector/build.xml branches/prototype1/DAVInspector/config.cfg branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HTTP/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableCellRenderer.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/Message.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/UIResource.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/control_play.png branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/control_stop.png branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/wand.png branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/XMLTreePlugin.java Removed Paths: ------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Message.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableCellRenderer.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableModel.java Modified: branches/prototype1/DAVInspector/.checkstyle =================================================================== --- branches/prototype1/DAVInspector/.checkstyle 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/.checkstyle 2008-01-24 15:58:38 UTC (rev 31) @@ -3,7 +3,10 @@ <local-check-config name="DLR" location="src/src-style/checks.xml" type="project" description=""> <additional-data name="protect-config-file" value="false"/> </local-check-config> - <fileset name="Alle" enabled="true" check-config-name="DLR" local="true"> + <local-check-config name="DAVInspector" location="C:\Dokumente und Einstellungen\wues_ha\workspace\DAVInspector-Prototyp1\src\src-style\checks.xml" type="external" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="Alle" enabled="true" check-config-name="DAVInspector" local="true"> <file-match-pattern match-pattern="." include-pattern="true"/> </fileset> </fileset-config> Modified: branches/prototype1/DAVInspector/.project =================================================================== --- branches/prototype1/DAVInspector/.project 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/.project 2008-01-24 15:58:38 UTC (rev 31) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <projectDescription> - <name>DAVInspector</name> + <name>DAVInspector-Prototyp1</name> <comment></comment> <projects> </projects> @@ -15,6 +15,16 @@ <arguments> </arguments> </buildCommand> + <buildCommand> + <name>org.eclipse.ui.externaltools.ExternalToolBuilder</name> + <triggers>auto,full,incremental,</triggers> + <arguments> + <dictionary> + <key>LaunchConfigHandle</key> + <value><project>/.externalToolBuilders/AUTO.launch</value> + </dictionary> + </arguments> + </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> Modified: branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs 2008-01-24 15:58:38 UTC (rev 31) @@ -1,5 +1,5 @@ -#Thu Oct 11 16:38:01 CEST 2007 +#Wed Jan 23 14:50:48 CET 2008 eclipse.preferences.version=1 formatter_profile=_DLR formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${todo}\: ${user}\: enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n *\r\n * @version $$LastChangedRevision$$\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n *\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * ${file_name}\r\n * \r\n * ${todo}\: ${user} Enter comment\!\r\n * \r\n * Created\: ${date} ${user} <email>\r\n * Changed\:\r\n * \r\n * $$Id$$\r\n *\r\n * Copyright (C) 2007-${year} DLR SC, Germany\r\n * \r\n * All rights reserved\r\n * \r\n * http\://www.dlr.de/\r\n */\r\n \r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\nlogger.error(${exception_var}.getStackTrace());</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${todo}\: ${user}\: enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n *\r\n * @version $$LastChangedRevision$$\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n *\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * ${file_name}\r\n * \r\n * ${todo}\: ${user} Enter comment\!\r\n * \r\n * Created\: ${date} ${user} <email>\r\n * Changed\:\r\n * \r\n * $$Id$$\r\n * \r\n * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR)\r\n * \r\n * Licensed under the Apache License, Version 2.0 (the 'License');\r\n * you may not use this file except in compliance with the License. \r\n * You may obtain a copy of the License at \r\n * \r\n * http\://www.apache.org/licenses/LICENSE-2.0 \r\n * \r\n * Unless required by applicable law or agreed to in writing, software \r\n * distributed under the License is distributed on an 'AS IS' BASIS, \r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n \r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\nlogger.error(${exception_var}.getStackTrace());</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> Added: branches/prototype1/DAVInspector/DAVInspector.bat =================================================================== --- branches/prototype1/DAVInspector/DAVInspector.bat (rev 0) +++ branches/prototype1/DAVInspector/DAVInspector.bat 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,3 @@ +@echo off + +java -jar DAVInspector.jar Added: branches/prototype1/DAVInspector/build-user.xml =================================================================== --- branches/prototype1/DAVInspector/build-user.xml (rev 0) +++ branches/prototype1/DAVInspector/build-user.xml 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<?eclipse.ant.import?> +<project> + + <target name="dist" description="Generates distribution in subdirectory dist"> + + <property name="dist" location="C:/Programme/DAVInspector" /> + + <!-- Create necessary directories --> + <delete dir="${dist}" /> + + <mkdir dir="${dist}" /> + <mkdir dir="${dist}/plugins" /> + <mkdir dir="${dist}/lib" /> + <mkdir dir="${dist}/doc" /> + + <!-- Create plugin jar files --> + <jar jarfile="${dist}/plugins/HeaderPlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/HeaderPlugin/**"> + </jar> + <jar jarfile="${dist}/plugins/XMLPlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/XMLPlugin/**"> + </jar> + <jar jarfile="${dist}/plugins/XMLTreePlugin.jar" + basedir="bin" + includes="de/dlr/DAVInspector/plugins/XMLTreePlugin/**"> + </jar> + + <!-- Create DAVInspector jar file --> + <jar jarfile="${dist}/DAVInspector.jar" + basedir="bin" + includes="de/dlr/DAVInspector/**" + excludes="de/dlr/DAVInspector/plugins/**, de/dlr/DAVInspector/src-style/**"> + <manifest> + <attribute name="Main-Class" value="de/dlr/DAVInspector.DAVInspector"/> + <attribute name="Built-By" value="${user.name}"/> + <section name="DAVInspector"> + <attribute name="Specification-Title" value="DAVInspector"/> + <attribute name="Specification-Version" value="${java.specification.version}"/> + <attribute name="Specification-Vendor" value="DLR"/> + <attribute name="Implementation-Title" value="DAVInspector"/> + <attribute name="Implementation-Version" value="${java.version}"/> + <attribute name="Implementation-Vendor" value="DLR"/> + </section> + </manifest> + </jar> + + <!-- Copy script files --> + <copy todir="${dist}"> + <fileset dir="." includes="*.bat, config.cfg" /> + </copy> + + </target> +</project> \ No newline at end of file Added: branches/prototype1/DAVInspector/build.xml =================================================================== --- branches/prototype1/DAVInspector/build.xml (rev 0) +++ branches/prototype1/DAVInspector/build.xml 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- WARNING: Eclipse auto-generated file. + Any modifications will be overwritten. + To include a user specific buildfile here, simply create one in the same + directory with the processing instruction <?eclipse.ant.import?> + as the first entry and export the buildfile again. --> +<project basedir="." default="build" name="DAVInspector-Prototyp2"> + <property environment="env"/> + <property name="ECLIPSE_HOME" value="../../../../Programme/eclipse"/> + <property name="debuglevel" value="source,lines,vars"/> + <property name="target" value="1.6"/> + <property name="source" value="1.6"/> + <import file="build-user.xml" /> + <path id="DAVInspector-Prototyp2.classpath"> + <pathelement location="bin"/> + </path> + <target name="init"> + <mkdir dir="bin"/> + <copy includeemptydirs="false" todir="bin"> + <fileset dir="src" excludes="**/*.uad, **/*.ucd, **/*.uld, **/*.upd, **/*.udd, **/*.uod, **/*.usd, **/*.utd, **/*.uud, **/*.odd, **/*.ead, **/*.ecd, **/*.eld, **/*.epd, **/*.edd, **/*.eod, **/*.esd, **/*.etd, **/*.eud, **/*.urd*.uml, **/*.ecore, **/*.launch, **/*.java"/> + </copy> + </target> + <target name="clean"> + <delete dir="bin"/> + </target> + <target depends="clean" name="cleanall"/> + <target depends="build-subprojects,build-project" name="build"/> + <target name="build-subprojects"/> + <target depends="init" name="build-project"> + <echo message="${ant.project.name}: ${ant.file}"/> + <javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}"> + <src path="src"/> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </javac> + </target> + <target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/> + <target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"> + <copy todir="${ant.library.dir}"> + <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> + </copy> + <unzip dest="${ant.library.dir}"> + <patternset includes="jdtCompilerAdapter.jar"/> + <fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/> + </unzip> + </target> + <target description="compile project with Eclipse compiler" name="build-eclipse-compiler"> + <property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/> + <antcall target="build"/> + </target> + <target name="New_configuration (2)"> + <java classname="" failonerror="true" fork="yes"> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </java> + </target> + <target name="DAVInspector"> + <java classname="de.dlr.DAVInspector.DAVInspector" failonerror="true" fork="yes"> + <classpath refid="DAVInspector-Prototyp2.classpath"/> + </java> + </target> +</project> Added: branches/prototype1/DAVInspector/config.cfg =================================================================== --- branches/prototype1/DAVInspector/config.cfg (rev 0) +++ branches/prototype1/DAVInspector/config.cfg 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,5 @@ +#Tue Jan 22 13:53:49 CET 2008 +ClientPort=9999 +ServerPort=8080 +ServerAddress=localhost +ClientAddress= Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java 2008-01-24 15:58:38 UTC (rev 31) @@ -212,12 +212,12 @@ public void loadConfiguration() { properties = new Properties(); try { - properties.load(new FileInputStream(Constants.CONFIGURATION_FILENAME)); + properties.load(new FileInputStream(Constant.CONFIGURATION_FILENAME)); // assign properties to variables - serverAddress = properties.getProperty("ServerAddress", Constants.PROXY_SERVERADDRESS); - serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.PROXY_SERVERPORT))); - clientAddress = properties.getProperty("ClientAddress", Constants.PROXY_CLIENTADDRESS); - clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.PROXY_CLIENTPORT))); + serverAddress = properties.getProperty("ServerAddress", Constant.PROXY_SERVERADDRESS); + serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constant.PROXY_SERVERPORT))); + clientAddress = properties.getProperty("ClientAddress", Constant.PROXY_CLIENTADDRESS); + clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constant.PROXY_CLIENTPORT))); } catch (IOException ioe) { System.err.println(ioe); @@ -236,7 +236,7 @@ properties.setProperty("ClientPort", String.valueOf(clientPort)); try { - properties.store(new FileOutputStream(Constants.CONFIGURATION_FILENAME), null); + properties.store(new FileOutputStream(Constant.CONFIGURATION_FILENAME), null); } catch (IOException ioe) { System.err.println(ioe); } Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java (from rev 30, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constant.java 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,194 @@ +/* + * Constants.java + * + * Definition aller ben\xF6tigten Konstanten. + * + * Created: 11.10.2007 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.Configuration; + +import java.awt.Color; + + +/** + * Constants. + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class Constant { + + /** + * GUI Width. + */ + public static final int UI_MAIN_WINDOW_WIDTH = 800; + + /** + * GUI Height. + */ + public static final int UI_MAIN_WINDOW_HEIGHT = 600; + + /** + * Configuration Dialog Width. + */ + public static final int UI_CONFIG_DIALOG_WIDTH = 300; + + /** + * Configuration Dialog Height. + */ + public static final int UI_CONFIG_DIALOG_HEIGHT = 200; + + /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; + + /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_WIDTH = 300; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_HEIGTH = 300; + + /** + * + */ + public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); + + /** + * + */ + public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); + + /** + * Line Feed + Carriage Return. + */ + public static final String LFCR = "\r\n"; + + /** + * Line Feed. + */ + public static final String LF = "\r"; + + /** + * Carriage Return. + */ + public static final String CR = "\n"; + + /** + * EOF. + */ + public static final int EOF = -1; + + /** + * Application Title. + */ + public static final String APP_TITLE = "Proxy - DAVInspector Prototype 1"; + + /** + * Filename of the configuration file. + */ + public static final String APP_VERSION = "0.1"; + + /** + * Filename of the configuration file. + */ + public static final String CONFIGURATION_FILENAME = "config.cfg"; + + /** + * Timeout waiting for a StreamCopyThread to finish in ms. + */ + public static final int PROXY_THREADTIMEOUT = 1000; + + /** + * Linger time in seconds for socket. + */ + public static final int PROXY_LINGERTIME = 30; + + /** + * Size of the receive buffer. + */ + public static final int PROXY_RECVBUFFERSIZE = 64; + + /** + * Backlog parameter used when creating the ServerSocket. + */ + public static final int PROXY_BACKLOG = 100; + + /** + * Address of the Server. IP address or domain name. + */ + public static final String PROXY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; + + /** + * Server port. + */ + public static final int PROXY_SERVERPORT = 8080; + + /** + * Address of the Client. Normally this is empty and + * the address of the client is of no importance. + */ + public static final String PROXY_CLIENTADDRESS = ""; + + /** + * Client port. + */ + public static final int PROXY_CLIENTPORT = 8888; + + /** + * Indentifier for plugin-type. + * ### plugin for server & client!? + */ + public enum PlugInType { + /** + * + */ + ViewGeneral, + /** + * + */ + EditGeneral, + /** + * + */ + ViewClient, + /** + * + */ + ViewServer, + /** + * + */ + EditClient, + /** + * + */ + EditServer + } +} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java 2008-01-24 15:58:38 UTC (rev 31) @@ -1,194 +0,0 @@ -/* - * Constants.java - * - * Definition aller ben\xF6tigten Konstanten. - * - * Created: 11.10.2007 Jochen Wuest <joc...@dl...> - * Changed: - * - * $Id$ - * - * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package de.dlr.DAVInspector.Configuration; - -import java.awt.Color; - - -/** - * Constants. - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public final class Constants { - - /** - * GUI Width. - */ - public static final int UI_MAIN_WINDOW_WIDTH = 800; - - /** - * GUI Height. - */ - public static final int UI_MAIN_WINDOW_HEIGHT = 600; - - /** - * Configuration Dialog Width. - */ - public static final int UI_CONFIG_DIALOG_WIDTH = 300; - - /** - * Configuration Dialog Height. - */ - public static final int UI_CONFIG_DIALOG_HEIGHT = 200; - - /** - * - */ - public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; - - /** - * - */ - public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; - - /** - * - */ - public static final int UI_ABOUT_DIALOG_WIDTH = 300; - - /** - * - */ - public static final int UI_ABOUT_DIALOG_HEIGTH = 300; - - /** - * - */ - public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); - - /** - * - */ - public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); - - /** - * Line Feed + Carriage Return. - */ - public static final String LFCR = "\r\n"; - - /** - * Line Feed. - */ - public static final String LF = "\r"; - - /** - * Carriage Return. - */ - public static final String CR = "\n"; - - /** - * EOF. - */ - public static final int EOF = -1; - - /** - * Application Title. - */ - public static final String APP_TITLE = "Proxy - DAVInspector Prototype 1"; - - /** - * Filename of the configuration file. - */ - public static final String APP_VERSION = "0.1"; - - /** - * Filename of the configuration file. - */ - public static final String CONFIGURATION_FILENAME = "config.cfg"; - - /** - * Timeout waiting for a StreamCopyThread to finish in ms. - */ - public static final int PROXY_THREADTIMEOUT = 1000; - - /** - * Linger time in seconds for socket. - */ - public static final int PROXY_LINGERTIME = 15; - - /** - * Size of the receive buffer. - */ - public static final int PROXY_RECVBUFFERSIZE = 64; - - /** - * Backlog parameter used when creating the ServerSocket. - */ - public static final int PROXY_BACKLOG = 100; - - /** - * Address of the Server. IP address or domain name. - */ - public static final String PROXY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; - - /** - * Server port. - */ - public static final int PROXY_SERVERPORT = 8080; - - /** - * Address of the Client. Normally this is empty and - * the address of the client is of no importance. - */ - public static final String PROXY_CLIENTADDRESS = ""; - - /** - * Client port. - */ - public static final int PROXY_CLIENTPORT = 8888; - - /** - * Indentifier for plugin-type. - * ### plugin for server & client!? - */ - public enum PlugInType { - /** - * - */ - ViewGeneral, - /** - * - */ - EditGeneral, - /** - * - */ - ViewClient, - /** - * - */ - ViewServer, - /** - * - */ - EditClient, - /** - * - */ - EditServer - } -} Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableCellRenderer.java (from rev 30, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableCellRenderer.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableCellRenderer.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableCellRenderer.java 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,92 @@ +/* + * HistoryTableCellRenderer.java + * + * TODO: wues_ha Enter comment! + * + * Created: 21.01.2008 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.History; + +import java.awt.Color; +import java.awt.Component; + +import javax.swing.JTable; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.TableCellRenderer; + +import de.dlr.DAVInspector.Configuration.Constant; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class HistoryTableCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * + */ + private Boolean isRequest = false; + + /** + * {@inheritDoc} + * + * @see javax.swing.table.DefaultTableCellRenderer#getTableCellRendererComponent + * (javax.swing.JTable, java.lang.Object, boolean, boolean, int, int) + */ + public Component getTableCellRendererComponent(JTable table, Object value, + boolean isSelected, boolean hasFocus, int row, int column) { + super.getTableCellRendererComponent(table, value, isSelected, + hasFocus, row, column); + + if (value instanceof Boolean){ + isRequest = ((Boolean) value).booleanValue(); + if (isRequest) { + setText("Request"); + } else { + setText("Reply"); + } + } else { + setText(value.toString()); + } + + if (hasFocus || isSelected) { + setForeground(Color.getColor("textHighlighttext")); + setBackground(Color.getColor("textHighlight")); + } else { + setForeground(Color.getColor("windowText")); + if (isRequest) { + setBackground(Constant.UI_REQUEST_COLOR); + } else { + setBackground(Constant.UI_REPLY_COLOR); + } + } + + return this; + } +} Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableModel.java (from rev 30, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableModel.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableModel.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/HistoryTableModel.java 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,80 @@ +/* + * HistoryTableModel.java + * + * TODO: wues_ha Enter comment! + * + * Created: 15.01.2008 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.History; + +import javax.swing.table.DefaultTableModel; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class HistoryTableModel extends DefaultTableModel { + + /** + * + */ + private static final long serialVersionUID = 0L; + + /** + * + */ + private String[] columnNames = { + "Type", + "ID", + "Timestamp", + "Size" + }; + + /** + * {@inheritDoc} + * + * @see javax.swing.table.TableModel#getColumnCount() + */ + @Override + public int getColumnCount() { + return columnNames.length; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#getColumnName(int) + */ + public String getColumnName(int col) { + return columnNames[col]; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) + */ + public boolean isCellEditable(int row, int col) { + return false; + } +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/Message.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/Message.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/History/Message.java 2008-01-24 15:58:38 UTC (rev 31) @@ -0,0 +1,149 @@ +/* + * Message.java + * + * TODO: wues_ha Enter comment! + * + * Created: 15.01.2008 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.History; + +import java.util.Date; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Message { + /** + * + */ + private static int idCounter; + + /** + * + */ + private int id; + + /** + * + */ + private Date timestamp; + + /** + * + */ + private Boolean clientToSever; + + /** + * + */ + private String data; + + /** + * + */ + private int size; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Message() { + ++idCounter; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return id + */ + public int getId() { + return id; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return timestamp + */ + public Date getTimestamp() { + return timestamp; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param ts Date/Timestamp + */ + public void setTimestamp(Date ts) { + this.timestamp = ts; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return clientToServer + */ + public Boolean getClientToSever() { + return clientToSever; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param cTS Boolean + */ + public void setClientToSever(Boolean cTS) { + this.clientToSever = cTS; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return data + */ + public String getData() { + return data; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param msg String + */ + public void setData(String msg) { + this.data = msg; + this.size = msg.length(); + this.id = idCounter; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return size + */ + public int getSize() { + return size; + } +} Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java 2008-01-24 15:58:38 UTC (rev 31) @@ -52,7 +52,7 @@ * @throws IOException IO Exception */ public LocalJarHelperClassLoader(String jarFileName) throws IOException { - this(new File(jarFileName)); + this(new File(jarFileName)); } /** @@ -66,6 +66,68 @@ } /** + * Findet die Klasse mit dem angegebenen bin\xE4ren Namen (binary name). + * (Der Name, wie er von der JVM verwendet wird.) + * @param name Der bin\xE4re Name der Klasse + * @return Das entsprechende Klassenobjekt + * @throws ClassNotFoundException falls die Klase nicht gefunden werden konnte + */ + /* + protected Class<?> findClass(String name) throws ClassNotFoundException { + byte[] b = loadClassData(name); + return defineClass(name, b, 0, b.length); + } + */ + + /** + * L\xE4dt die Klassendaten der Klasse mit dem angegebenen bin\xE4ren Namen. + * Benutzt den ClassLoader auf den reloadCL verweist, um die Klassendaten zu finden. + * @param name Der bin\xE4re Name der Klasse + * @return Die Klassendaten + * @throws ClassNotFoundException falls die Klasse nicht gefunden werden konnte + */ + /* + private byte[] loadClassData(String name) throws ClassNotFoundException { + byte[] data = new byte[0]; + try { + InputStream in = getSystemClassLoader().getResourceAsStream(name.replace('.','/') + ".class"); + byte[] buf = new byte[100]; + int i; + while((i = in.read(buf)) != -1) { + byte[] tmp = new byte[data.length + i]; + System.arraycopy(data, 0, tmp, 0, data.length); + System.arraycopy(buf, 0, tmp, data.length, i); + data = tmp; + } + } catch(Exception e) { + throw new ClassNotFoundException(name); + } + return data; + } + */ + + /** + * L\xE4dt die Klasse mit dem angegebenen bin\xE4ren Namen. + * Wenn die Klasse nicht schon von dieser Instanz geladen wurde + * und Reloadable implementiert, wird sie neu geladen. + * Implementiert sie die Schnittstelle nicht, wird das Laden an den ClassLoader delegiert, + * auf den defaultCL verweist. + * @param name Der bin\xE4re Name der Klasse + * @param resolve Gibt an, ob die Klasse gelinkt werden muss. + * @return Das entsprechende Klassenobjekt + * @throws ClassNotFoundException falls die Klase nicht gefunden werden konnte + */ + /* + protected synchronized Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException { + Class<?> c = getSystemClassLoader().loadClass(name); + if (resolve) { + resolveClass(c); + } + return c; + } + */ + + /** * Closes the jar file. * * @throws IOException IO Exception Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java 2008-01-24 15:58:38 UTC (rev 31) @@ -25,10 +25,8 @@ package de.dlr.DAVInspector.Plugin; -import de.dlr.DAVInspector.Configuration.Constants.PlugInType; +import de.dlr.DAVInspector.Configuration.Constant.PlugInType; -//### import org.apache.log4j.Logger; - /** * TODO: wues_ha: Enter comment! * Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java 2008-01-24 15:58:38 UTC (rev 31) @@ -27,11 +27,14 @@ import java.io.File; import java.io.IOException; +import java.net.URL; +import java.net.URLClassLoader; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Vector; +//### import org.apache.log4j.Logger; /** @@ -51,7 +54,7 @@ /** * */ - private Map<String, LocalJarHelperClassLoader> loaderHashmap = new HashMap<String, LocalJarHelperClassLoader>(); + private Map<String, URLClassLoader> loaderHashmap = new HashMap<String, URLClassLoader>(); /** * @@ -80,15 +83,14 @@ public void loadAllPlugins() { //\xFCber jar-dateien im plugin-verzeichnis iterieren // TODO: filter f\xFCr jar dateien - // TODO: Pfad - File pluginVZ = new File("./bin/plugins/"); + System.err.println("loading plugins ..."); + File pluginVZ = new File("plugins"); if (pluginVZ.isDirectory()) { - System.err.println("Dir: " + pluginVZ.getName()); String[] fils = pluginVZ.list(); + String pathToPluginDir = pluginVZ.getAbsolutePath(); for (int i = 0; i < fils.length; ++i) { - File plug = new File(fils[i]); - System.err.println("file: " + plug); - loadPlugin(plug); + File plug = new File(pathToPluginDir + "/" + fils[i]); + loadPlugin(plug.getAbsoluteFile()); } } } @@ -100,15 +102,19 @@ * @param jarfile File */ public void loadPlugin(File jarfile) { + Plugin plugin = null; String name = jarfile.getName().substring(0, jarfile.getName().lastIndexOf(".")); - LocalJarHelperClassLoader jcl = null; + // LocalJarHelperClassLoader jcl = null; try { - System.err.println(jarfile.getAbsolutePath()); -// jcl = new LocalJarHelperClassLoader("./bin/plugins/" + name); - jcl = new LocalJarHelperClassLoader(jarfile); - Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name + "." + name); - //Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name); + URLClassLoader jcl = new URLClassLoader(new URL[] { jarfile.toURI().toURL() }); +// jcl = new LocalJarHelperClassLoader(jarfile.getAbsolutePath()); + System.out.println(jarfile.getAbsolutePath()); + //de\dlr\DAVInspector\plugins\HeaderPlugin\HeaderPlugin.class + //de.dlr.DAVInspector.plugins.HeaderPlugin.HeaderPlugin + //de/dlr/DAVInspector/plugins/HeaderPlugin/HeaderPlugin + Class<?> c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name + "." + name); +// Class<?> c = jcl.loadClass(name); // lets try to load plugin... plugin = (Plugin) c.newInstance(); plugin.init(); @@ -140,12 +146,12 @@ System.err.println(ioe); // we do need a logger, // something is going to hell here... - try { - jcl.closeJarFile(); - jarfile.delete(); - } catch (IOException ioe2) { - System.err.println(ioe2); - } +// try { +// jcl.closeJarFile(); + jarfile.delete(); +// } catch (IOException ioe2) { +// System.err.println(ioe2); +// } } } @@ -159,13 +165,12 @@ public boolean unloadPlugin(String pluginName) { // unload plugin try { - LocalJarHelperClassLoader jcl = (LocalJarHelperClassLoader) loaderHashmap.get(pluginName); - jcl.closeJarFile(); + URLClassLoader jcl = (URLClassLoader) loaderHashmap.get(pluginName); +// jcl.closeJarFile(); Plugin aSinglePlugin = null; for (Plugin current : pluginVector) { String uniqueName = current.getClass().getName(); - uniqueName = uniqueName.substring( - uniqueName.lastIndexOf(".") + 1, uniqueName.length()); + uniqueName = uniqueName.substring(uniqueName.lastIndexOf(".") + 1, uniqueName.length()); if (uniqueName.equals(pluginName)) { aSinglePlugin = current; pluginVector.remove(aSinglePlugin); @@ -175,7 +180,7 @@ // cleanup GUI, free memory... return true; - } catch (IOException ioe) { + } catch (Exception ioe) { System.err.println(ioe); // oh yes baby, we do need a logger.... // again the hell is freezing over... Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Message.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Message.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Message.java 2008-01-24 15:58:38 UTC (rev 31) @@ -1,149 +0,0 @@ -/* - * Message.java - * - * TODO: wues_ha Enter comment! - * - * Created: 15.01.2008 Jochen Wuest <joc...@dl...> - * Changed: - * - * $Id$ - * - * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) - * - * Licensed under the Apache License, Version 2.0 (the 'License'); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an 'AS IS' BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package de.dlr.DAVInspector.Relay; - -import java.util.Date; - - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class Message { - /** - * - */ - private static int idCounter; - - /** - * - */ - private int id; - - /** - * - */ - private Date timestamp; - - /** - * - */ - private Boolean clientToSever; - - /** - * - */ - private String data; - - /** - * - */ - private int size; - - /** - * TODO: wues_ha: enter comment! - * - */ - public Message() { - ++idCounter; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return id - */ - public int getId() { - return id; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return timestamp - */ - public Date getTimestamp() { - return timestamp; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param ts Date/Timestamp - */ - public void setTimestamp(Date ts) { - this.timestamp = ts; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return clientToServer - */ - public Boolean getClientToSever() { - return clientToSever; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param cTS Boolean - */ - public void setClientToSever(Boolean cTS) { - this.clientToSever = cTS; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return data - */ - public String getData() { - return data; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param msg String - */ - public void setData(String msg) { - this.data = msg; - this.size = msg.length(); - this.id = idCounter; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return size - */ - public int getSize() { - return size; - } -} Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Relay.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Relay.java 2008-01-23 08:45:53 UTC (rev 30) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Relay.java 2008-01-24 15:58:38 UTC (rev 31) @@ -34,7 +34,7 @@ import java.net.SocketException; import de.dlr.DAVInspector.Configuration.Configuration; -import de.dlr.DAVInspector.Configuration.Constants; +import de.dlr.DAVInspector.Configuration.Constant; import de.dlr.DAVInspector.UI.Gui; /** @@ -130,9 +130,9 @@ this.out = outStream; this.err = errStream; if (clientAddress == null) { - this.srvSock = new ServerSocket(config.getClientPort(), Constants.PROXY_BACKLOG); + this.srvSock = new ServerSocket(config.getClientPort(), Constant.PROXY_BACKLOG); } else { - this.srvSock = new ServerSocket(config.getClientPort(), Constants.PROXY_BACKLOG, clientAddress); + this.srvSock = new ServerSocket(config.getClientPort(), Constant.PROXY_BACKLOG, clientAddress); } this.dstAddr = serverAddress; this.dstPort = config.getServerPort(); @@ -152,9 +152,9 @@ while (!isInterrupted()) { serverSocket = srvSock.accept(); try { - serverSocket.setSoLinger(true, Constants.PROXY_LINGERTIME); + serverSocket.setSoLinger(true, Constant.PROXY_LINGERTIME); clientSocket = new Socket(dstAddr, dstPort); - clientSocket.setSoLinger(true, Constants.PROXY_LINGERTIME); + clientSocket.setSoLinger(true, Constant.PROXY_LINGERTIME); sToC = new StreamCopyThread(serverSocket, clientSocket, lock, err, gui, guiLock); cToS = new StreamCopyThread(clientSocket, serverSocket, lock, err, gui, guiLock); sToC.setPeer(cToS); @@ -195,8 +195,8 @@ try { cToS.interrupt(); sToC.interrupt(); - cToS.join(Constants.PROXY_THREADTIMEOUT); - sToC.join(Constants.PROXY_THREADTIMEOUT); + cToS.join(Constant.PROXY_THREADTIMEOUT); + sToC.join(Constant.PROXY_THREADTIMEOUT); } catch (InterruptedException ie) { System.err.println(ie); } @@ -238,13 +238,13 @@ header = false; } else { buffer = lines[i]; - String chunkLength = Constants.LFCR + Integer.toHexString(lines[i].length()) + Constants.LFCR; + String chunkLength = Constant.LFCR + Integer.toHexString(lines[i].length()) + Constant.LFCR; // if the content of the chunk is empty, it is assumed that this is the last chunk. // the last chunk is indicated by a length of 0 followed by an empty line. if (buffer.trim().isEmpty()) { - buffer = Constants.LFCR; - ... [truncated message content] |
From: <wu...@us...> - 2008-01-23 08:46:08
|
Revision: 30 http://davinspector.svn.sourceforge.net/davinspector/?rev=30&view=rev Author: wuest Date: 2008-01-23 00:45:53 -0800 (Wed, 23 Jan 2008) Log Message: ----------- Renamed remotely Added Paths: ----------- branches/prototype2/ Removed Paths: ------------- branches/prototyp2/ Copied: branches/prototype2 (from rev 29, branches/prototyp2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-22 16:50:59
|
Revision: 29 http://davinspector.svn.sourceforge.net/davinspector/?rev=29&view=rev Author: wuest Date: 2008-01-22 08:50:51 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Prototype 2 first commit Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/package.html Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/DAVInspector.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/EditPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/LocalJarHelperClassLoader.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/PluginManager.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin/ViewPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Message.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/Relay.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Relay/StreamCopyThread.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/ConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableCellRenderer.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/UI/PluginConfigurationTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/HeaderPlugin/HeaderPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/JTextPaneContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/XMLPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLPlugin/XMLTextPane.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/JTreeContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/XMLTreePlugin/XMLTreeView.java Removed Paths: ------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableCellRenderer.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ViewPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/RawPlugin.java Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,161 +0,0 @@ -/* - * AboutDialog.java - * - * TODO: wues_ha Enter comment! - * - * Created: 16.01.2008 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2008 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.awt.BorderLayout; -import java.awt.Frame; -import java.awt.SystemColor; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextPane; - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class AboutDialog extends JDialog { - - /** - * - */ - private static final long serialVersionUID = 1L; - - /** - * - */ - private JPanel jContentPane = null; - - /** - * - */ - private JButton jButton = null; - - /** - * - */ - private JTextPane jTextPane = null; - - /** - * - */ - private JPanel jPanel = null; - - /** - * - */ - private JLabel jLabel = null; - - /** - * @param owner Parent Frame - */ - public AboutDialog(Frame owner) { - super(owner); - initialize(); - } - - /** - * This method initializes this. - */ - private void initialize() { - this.setSize(Constants.UI_ABOUT_DIALOG_WIDTH, Constants.UI_ABOUT_DIALOG_HEIGTH); - this.setTitle(Constants.APP_TITLE + " About"); - this.setContentPane(getJContentPane()); - } - - /** - * This method initializes jContentPane. - * - * @return javax.swing.JPanel - */ - private JPanel getJContentPane() { - if (jContentPane == null) { - jLabel = new JLabel(); - jLabel.setText(Constants.APP_TITLE); - jContentPane = new JPanel(); - jContentPane.setLayout(new BorderLayout()); - jContentPane.add(getJButton(), BorderLayout.SOUTH); - jContentPane.add(getJTextPane(), BorderLayout.CENTER); - jContentPane.add(getJPanel(), BorderLayout.NORTH); - } - return jContentPane; - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void closeWindow() { - this.setVisible(false); - this.dispose(); - } - - /** - * This method initializes jButton. - * - * @return javax.swing.JButton - */ - private JButton getJButton() { - if (jButton == null) { - jButton = new JButton(); - jButton.setText("Ok"); - jButton.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - closeWindow(); - } - }); - } - return jButton; - } - - /** - * This method initializes jTextPane. - * - * @return javax.swing.JTextPane - */ - private JTextPane getJTextPane() { - if (jTextPane == null) { - jTextPane = new JTextPane(); - jTextPane.setBackground(SystemColor.control); - jTextPane.setText("Apache 2.0 Lizenz\nJochen Wuest\nDLR\n2007-2008"); - } - return jTextPane; - } - - /** - * This method initializes jPanel. - * - * @return javax.swing.JPanel - */ - private JPanel getJPanel() { - if (jPanel == null) { - //ImageIcon iiLogo = createImageIcon("icons/davinspector_trans.gif", ""); - //JLabel logo = new JLabel(iiLogo); - //jPanel.add(logo, BorderLayout.NORTH); - - jPanel = new JPanel(); - jPanel.setLayout(new BorderLayout()); - jPanel.add(jLabel, BorderLayout.SOUTH); - } - return jPanel; - } -} // @jve:decl-index=0:visual-constraint="9,11" Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java (from rev 26, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Configuration.java 2008-01-22 16:50:51 UTC (rev 29) @@ -0,0 +1,280 @@ +/* + * Configuration.java + * + * This Class stores the configuration of the DAVInspector. + * + * Created: 21.12.2007 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.Configuration; + +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Properties; +import java.util.Vector; + +import de.dlr.DAVInspector.Plugin.Plugin; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Configuration { + + /** + * + */ + private Properties properties; + + /** + * Port number of the server connection. + */ + private int serverPort; + + /** + * Port number of the client connection. + */ + private int clientPort; + + /** + * Address of the server. + */ + private String serverAddress; + + /** + * Address of the client. + */ + private String clientAddress; + + /** + * This list contains all available plugins that let you edit the traffic. + */ + private List<Plugin> availableEditPlugins; + + /** + * This list contains all available plugins that let you view the traffic. + */ + private List<Plugin> availableViewPlugins; + + /** + * This list contains all plugins to view the traffic to the server. + */ + private List<Plugin> activeViewPluginsToServer; + + /** + * This list contains all plugins to view the traffic to the client. + */ + private List<Plugin> activeViewPluginsToClient; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToServer; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToClient; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Configuration() { + loadConfiguration(); + + availableEditPlugins = new Vector<Plugin>(); + availableViewPlugins = new Vector<Plugin>(); + // TODO: Load available plugins + + activeViewPluginsToServer = new Vector<Plugin>(); + activeViewPluginsToClient = new Vector<Plugin>(); + activeEditPluginsToServer = new Vector<Plugin>(); + activeEditPluginsToClient = new Vector<Plugin>(); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getAvailableEditPlugins() { + return availableEditPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getAvailableViewPlugins() { + return availableViewPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToServer() { + return activeViewPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToClient() { + return activeViewPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToServer() { + return activeEditPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToClient() { + return activeEditPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getServerAddress() { + return serverAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getServerPort() { + return serverPort; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getClientAddress() { + return clientAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getClientPort() { + return clientPort; + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void loadConfiguration() { + properties = new Properties(); + try { + properties.load(new FileInputStream(Constants.CONFIGURATION_FILENAME)); + // assign properties to variables + serverAddress = properties.getProperty("ServerAddress", Constants.PROXY_SERVERADDRESS); + serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.PROXY_SERVERPORT))); + clientAddress = properties.getProperty("ClientAddress", Constants.PROXY_CLIENTADDRESS); + clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.PROXY_CLIENTPORT))); + + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void storeConfiguration() { + // save variables in properties + properties.setProperty("ServerAddress", serverAddress); + properties.setProperty("ServerPort", String.valueOf(serverPort)); + properties.setProperty("ClientAddress", clientAddress); + properties.setProperty("ClientPort", String.valueOf(clientPort)); + + try { + properties.store(new FileOutputStream(Constants.CONFIGURATION_FILENAME), null); + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverAddressC server address + */ + public void setServerAddress(String serverAddressC) { + this.serverAddress = serverAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientAddressC client address + */ + public void setClientAddress(String clientAddressC) { + this.clientAddress = clientAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverPortC server port + */ + public void setServerPort(String serverPortC) { + this.serverPort = Integer.parseInt(serverPortC); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientPortC client port + */ + public void setClientPort(String clientPortC) { + this.clientPort = Integer.parseInt(clientPortC); + } +} Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java (from rev 26, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration/Constants.java 2008-01-22 16:50:51 UTC (rev 29) @@ -0,0 +1,194 @@ +/* + * Constants.java + * + * Definition aller ben\xF6tigten Konstanten. + * + * Created: 11.10.2007 Jochen Wuest <joc...@dl...> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector.Configuration; + +import java.awt.Color; + + +/** + * Constants. + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class Constants { + + /** + * GUI Width. + */ + public static final int UI_MAIN_WINDOW_WIDTH = 800; + + /** + * GUI Height. + */ + public static final int UI_MAIN_WINDOW_HEIGHT = 600; + + /** + * Configuration Dialog Width. + */ + public static final int UI_CONFIG_DIALOG_WIDTH = 300; + + /** + * Configuration Dialog Height. + */ + public static final int UI_CONFIG_DIALOG_HEIGHT = 200; + + /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; + + /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_WIDTH = 300; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_HEIGTH = 300; + + /** + * + */ + public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); + + /** + * + */ + public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); + + /** + * Line Feed + Carriage Return. + */ + public static final String LFCR = "\r\n"; + + /** + * Line Feed. + */ + public static final String LF = "\r"; + + /** + * Carriage Return. + */ + public static final String CR = "\n"; + + /** + * EOF. + */ + public static final int EOF = -1; + + /** + * Application Title. + */ + public static final String APP_TITLE = "Proxy - DAVInspector Prototype 1"; + + /** + * Filename of the configuration file. + */ + public static final String APP_VERSION = "0.1"; + + /** + * Filename of the configuration file. + */ + public static final String CONFIGURATION_FILENAME = "config.cfg"; + + /** + * Timeout waiting for a StreamCopyThread to finish in ms. + */ + public static final int PROXY_THREADTIMEOUT = 1000; + + /** + * Linger time in seconds for socket. + */ + public static final int PROXY_LINGERTIME = 15; + + /** + * Size of the receive buffer. + */ + public static final int PROXY_RECVBUFFERSIZE = 64; + + /** + * Backlog parameter used when creating the ServerSocket. + */ + public static final int PROXY_BACKLOG = 100; + + /** + * Address of the Server. IP address or domain name. + */ + public static final String PROXY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; + + /** + * Server port. + */ + public static final int PROXY_SERVERPORT = 8080; + + /** + * Address of the Client. Normally this is empty and + * the address of the client is of no importance. + */ + public static final String PROXY_CLIENTADDRESS = ""; + + /** + * Client port. + */ + public static final int PROXY_CLIENTPORT = 8888; + + /** + * Indentifier for plugin-type. + * ### plugin for server & client!? + */ + public enum PlugInType { + /** + * + */ + ViewGeneral, + /** + * + */ + EditGeneral, + /** + * + */ + ViewClient, + /** + * + */ + ViewServer, + /** + * + */ + EditClient, + /** + * + */ + EditServer + } +} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,270 +0,0 @@ -/* - * Configuration.java - * - * This Class stores the configuration of the DAVInspector. - * - * Created: 21.12.2007 Jochen Wuest - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2007 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.List; -import java.util.Properties; -import java.util.Vector; - - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class Configuration { - - /** - * - */ - private Properties properties; - - /** - * Port number of the server connection. - */ - private int serverPort; - - /** - * Port number of the client connection. - */ - private int clientPort; - - /** - * Address of the server. - */ - private String serverAddress; - - /** - * Address of the client. - */ - private String clientAddress; - - /** - * This list contains all available plugins that let you edit the traffic. - */ - private List<Plugin> availableEditPlugins; - - /** - * This list contains all available plugins that let you view the traffic. - */ - private List<Plugin> availableViewPlugins; - - /** - * This list contains all plugins to view the traffic to the server. - */ - private List<Plugin> activeViewPluginsToServer; - - /** - * This list contains all plugins to view the traffic to the client. - */ - private List<Plugin> activeViewPluginsToClient; - - /** - * This list contains all plugins to edit the traffic to the server. - */ - private List<Plugin> activeEditPluginsToServer; - - /** - * This list contains all plugins to edit the traffic to the server. - */ - private List<Plugin> activeEditPluginsToClient; - - /** - * TODO: wues_ha: enter comment! - * - */ - public Configuration() { - loadConfiguration(); - - availableEditPlugins = new Vector<Plugin>(); - availableViewPlugins = new Vector<Plugin>(); - // TODO: Load available plugins - - activeViewPluginsToServer = new Vector<Plugin>(); - activeViewPluginsToClient = new Vector<Plugin>(); - activeEditPluginsToServer = new Vector<Plugin>(); - activeEditPluginsToClient = new Vector<Plugin>(); - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getAvailableEditPlugins() { - return availableEditPlugins; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getAvailableViewPlugins() { - return availableViewPlugins; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getActiveViewPluginsToServer() { - return activeViewPluginsToServer; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getActiveViewPluginsToClient() { - return activeViewPluginsToClient; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getActiveEditPluginsToServer() { - return activeEditPluginsToServer; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Vector - */ - public List<Plugin> getActiveEditPluginsToClient() { - return activeEditPluginsToClient; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return String with address of the server - */ - public String getServerAddress() { - return serverAddress; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Integer Server port - */ - public int getServerPort() { - return serverPort; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return String with address of the server - */ - public String getClientAddress() { - return clientAddress; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return Integer Server port - */ - public int getClientPort() { - return clientPort; - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void loadConfiguration() { - properties = new Properties(); - try { - properties.load(new FileInputStream(Constants.CONFIGURATION_FILENAME)); - // assign properties to variables - serverAddress = properties.getProperty("ServerAddress", Constants.PROXY_SERVERADDRESS); - serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.PROXY_SERVERPORT))); - clientAddress = properties.getProperty("ClientAddress", Constants.PROXY_CLIENTADDRESS); - clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.PROXY_CLIENTPORT))); - - } catch (IOException ioe) { - System.err.println(ioe); - } - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void storeConfiguration() { - // save variables in properties - properties.setProperty("ServerAddress", serverAddress); - properties.setProperty("ServerPort", String.valueOf(serverPort)); - properties.setProperty("ClientAddress", clientAddress); - properties.setProperty("ClientPort", String.valueOf(clientPort)); - - try { - properties.store(new FileOutputStream(Constants.CONFIGURATION_FILENAME), null); - } catch (IOException ioe) { - System.err.println(ioe); - } - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param serverAddressC server address - */ - public void setServerAddress(String serverAddressC) { - this.serverAddress = serverAddressC; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param clientAddressC client address - */ - public void setClientAddress(String clientAddressC) { - this.clientAddress = clientAddressC; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param serverPortC server port - */ - public void setServerPort(String serverPortC) { - this.serverPort = Integer.parseInt(serverPortC); - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param clientPortC client port - */ - public void setClientPort(String clientPortC) { - this.clientPort = Integer.parseInt(clientPortC); - } -} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,260 +0,0 @@ -/* - * Configuration.java - * - * TODO: wues_ha Enter comment! - * - * Created: 19.12.2007 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2007 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.awt.Frame; -import java.awt.GridLayout; -import java.awt.event.KeyEvent; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.SwingConstants; - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class ConfigurationDialog extends JDialog { - - /** - * - */ - private static final long serialVersionUID = 1L; - /** - * - */ - private JPanel jContentPane = null; - /** - * - */ - private JLabel jLabelServerPort = null; - /** - * - */ - private JLabel jLabelClientAddress = null; - /** - * - */ - private JLabel jLabelClientPort = null; - /** - * - */ - private JLabel jLabelServerAddress = null; - /** - * - */ - private JButton jButtonCancel = null; - /** - * - */ - private JTextField jTextFieldClientPort = null; - /** - * - */ - private JTextField jTextFieldServerPort = null; - /** - * - */ - private JTextField jTextFieldServerAddress = null; - /** - * - */ - private JTextField jTextFieldClientAddress = null; - /** - * - */ - private JButton jButtonOk = null; - /** - * @param owner Owner of the Dialog. - */ - public ConfigurationDialog(Frame owner) { - super(owner); - initialize(); - } - - /** - * This method initializes this. - */ - private void initialize() { - this.setSize(Constants.UI_CONFIG_DIALOG_WIDTH, Constants.UI_CONFIG_DIALOG_HEIGHT); - this.setTitle(Constants.APP_TITLE + " Configuration"); - this.setContentPane(this.getJContentPane()); - // Load Configuration from file - Configuration config = new Configuration(); - jTextFieldClientAddress.setText(config.getClientAddress()); - jTextFieldClientPort.setText(String.valueOf(config.getClientPort())); - jTextFieldServerAddress.setText(config.getServerAddress()); - jTextFieldServerPort.setText(String.valueOf(config.getServerPort())); - } - - /** - * This method initializes jContentPane. - * - * @return javax.swing.JPanel - */ - private JPanel getJContentPane() { - if (jContentPane == null) { - jLabelServerAddress = new JLabel(); - jLabelServerAddress.setText("Server Address:"); - jLabelServerAddress.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelClientPort = new JLabel(); - jLabelClientPort.setText("Client Port:"); - jLabelClientPort.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelClientAddress = new JLabel(); - jLabelClientAddress.setText("Client Address:"); - jLabelClientAddress.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelServerPort = new JLabel(); - jLabelServerPort.setText("Server Port:"); - jLabelServerPort.setHorizontalAlignment(SwingConstants.RIGHT); - GridLayout gridLayout = new GridLayout(5, 2, 10, 10); - jContentPane = new JPanel(); - jContentPane.setLayout(gridLayout); - jContentPane.add(jLabelClientAddress, null); - jContentPane.add(getJTextFieldClientAddress(), null); - jContentPane.add(jLabelClientPort, null); - jContentPane.add(getJTextFieldClientPort(), null); - jContentPane.add(jLabelServerAddress, null); - jContentPane.add(getJTextFieldServerAddress(), null); - jContentPane.add(jLabelServerPort, null); - jContentPane.add(getJTextFieldServerPort(), null); - jContentPane.add(getJButtonCancel(), null); - jContentPane.add(getJButtonOk(), null); - } - return jContentPane; - } - - /** - * This method initializes jButton. - * - * @return javax.swing.JButton - */ - private JButton getJButtonCancel() { - if (jButtonCancel == null) { - jButtonCancel = new JButton(); - jButtonCancel.setText("Cancel"); - jButtonCancel.setMnemonic(KeyEvent.VK_C); - jButtonCancel.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - closeWindow(); - } - - }); - } - return jButtonCancel; - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void closeWindow() { - this.setVisible(false); - this.dispose(); - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void saveConfiguration() { - Configuration config = new Configuration(); - config.setClientAddress(jTextFieldClientAddress.getText()); - config.setClientPort(jTextFieldClientPort.getText()); - config.setServerAddress(jTextFieldServerAddress.getText()); - config.setServerPort(jTextFieldServerPort.getText()); - config.storeConfiguration(); - // TODO: aktualisierung proxy!! ### - } - - /** - * This method initializes jTextField. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldClientPort() { - if (jTextFieldClientPort == null) { - jTextFieldClientPort = new JTextField(); - jTextFieldClientPort.setText("8888"); - } - return jTextFieldClientPort; - } - - /** - * This method initializes jTextField1. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldServerPort() { - if (jTextFieldServerPort == null) { - jTextFieldServerPort = new JTextField(); - jTextFieldServerPort.setText("8080"); - } - return jTextFieldServerPort; - } - - /** - * This method initializes jTextField2. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldServerAddress() { - if (jTextFieldServerAddress == null) { - jTextFieldServerAddress = new JTextField(); - jTextFieldServerAddress.setText("localhost"); - } - return jTextFieldServerAddress; - } - - /** - * This method initializes jTextField3. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldClientAddress() { - if (jTextFieldClientAddress == null) { - jTextFieldClientAddress = new JTextField(); - } - return jTextFieldClientAddress; - } - - /** - * This method initializes jButton1. - * - * @return javax.swing.JButton - */ - private JButton getJButtonOk() { - if (jButtonOk == null) { - jButtonOk = new JButton(); - jButtonOk.setText("Ok"); - jButtonOk.setMnemonic(KeyEvent.VK_O); - jButtonOk.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - saveConfiguration(); - closeWindow(); - } - }); - } - return jButtonOk; - } - -} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,186 +0,0 @@ -/* - * Constants.java - * - * Definition aller ben\xF6tigten Konstanten. - * - * Created: 11.10.2007 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2007 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.awt.Color; - - -/** - * Constants. - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public final class Constants { - - /** - * GUI Width. - */ - public static final int UI_MAIN_WINDOW_WIDTH = 800; - - /** - * GUI Height. - */ - public static final int UI_MAIN_WINDOW_HEIGHT = 600; - - /** - * Configuration Dialog Width. - */ - public static final int UI_CONFIG_DIALOG_WIDTH = 300; - - /** - * Configuration Dialog Height. - */ - public static final int UI_CONFIG_DIALOG_HEIGHT = 200; - - /** - * - */ - public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; - - /** - * - */ - public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; - - /** - * - */ - public static final int UI_ABOUT_DIALOG_WIDTH = 300; - - /** - * - */ - public static final int UI_ABOUT_DIALOG_HEIGTH = 300; - - /** - * - */ - public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); - - /** - * - */ - public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); - - /** - * Line Feed + Carriage Return. - */ - public static final String LFCR = "\r\n"; - - /** - * Line Feed. - */ - public static final String LF = "\r"; - - /** - * Carriage Return. - */ - public static final String CR = "\n"; - - /** - * EOF. - */ - public static final int EOF = -1; - - /** - * Application Title. - */ - public static final String APP_TITLE = "Proxy - DAVInspector Prototype 1"; - - /** - * Filename of the configuration file. - */ - public static final String APP_VERSION = "0.1"; - - /** - * Filename of the configuration file. - */ - public static final String CONFIGURATION_FILENAME = "config.cfg"; - - /** - * Timeout waiting for a StreamCopyThread to finish in ms. - */ - public static final int PROXY_THREADTIMEOUT = 1000; - - /** - * Linger time in seconds for socket. - */ - public static final int PROXY_LINGERTIME = 15; - - /** - * Size of the receive buffer. - */ - public static final int PROXY_RECVBUFFERSIZE = 64; - - /** - * Backlog parameter used when creating the ServerSocket. - */ - public static final int PROXY_BACKLOG = 100; - - /** - * Address of the Server. IP address or domain name. - */ - public static final String PROXY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; - - /** - * Server port. - */ - public static final int PROXY_SERVERPORT = 8080; - - /** - * Address of the Client. Normally this is empty and - * the address of the client is of no importance. - */ - public static final String PROXY_CLIENTADDRESS = ""; - - /** - * Client port. - */ - public static final int PROXY_CLIENTPORT = 8888; - - /** - * Indentifier for plugin-type. - * ### plugin for server & client!? - */ - public enum PlugInType { - /** - * - */ - ViewGeneral, - /** - * - */ - EditGeneral, - /** - * - */ - ViewClient, - /** - * - */ - ViewServer, - /** - * - */ - EditClient, - /** - * - */ - EditServer - } -} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/DAVInspector.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/DAVInspector.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/DAVInspector.java 2008-01-22 16:50:51 UTC (rev 29) @@ -0,0 +1,52 @@ +/* + * DAVInspector.java + * + * TODO: wues_ha Enter comment! + * + * Created: 22.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package de.dlr.DAVInspector; + +import de.dlr.DAVInspector.UI.Gui; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class DAVInspector { + + /** + * Hide utility class constructor. + */ + private DAVInspector() { } + + /** + * TODO: wues_ha: Enter comment! + * + * @param args String[] + */ + public static void main(String[] args) { + new Gui(); + } +} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,36 +0,0 @@ -/* - * EditPlugin.java - * - * TODO: wues_ha Enter comment! - * - * Created: 17.01.2008 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2008 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public interface EditPlugin extends Plugin { - /** - * Returns the processed data of the plugin. - * - * @return String - */ - String getOutput(); - - //### klasse!? -> verarbeitungsreihenfolge -} Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-22 16:48:29 UTC (rev 28) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-22 16:50:51 UTC (rev 29) @@ -1,1310 +0,0 @@ -/* - * Gui.java - * - * TODO: wues_ha Enter comment! - * - * Created: 09.11.2007 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2007 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.awt.BorderLayout; -import java.awt.Dimension; -import java.awt.GridBagLayout; -import java.awt.SystemColor; -import java.awt.event.KeyEvent; -import java.io.IOException; -import java.util.Date; -import java.util.Iterator; -import java.util.List; -import java.util.Vector; - -import javax.swing.ImageIcon; -import javax.swing.JButton; -import javax.swing.JFrame; -import javax.swing.JMenu; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JPanel; -import javax.swing.JScrollPane; -import javax.swing.JSplitPane; -import javax.swing.JTabbedPane; -import javax.swing.JTable; -import javax.swing.JTextPane; -import javax.swing.JToggleButton; -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; - -import org.xml.sax.SAXException; - -import de.dlr.DAVInspector.Constants.PlugInType; - -/** - * TODO: wues_ha: Enter comment! - * TODO: aktualisierung auf server und clientseite verbessern. - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class Gui { - - /** - * - */ - private static final double DIVIDER_HORZ = 0.5; - - /** - * - */ - private static final int DIVIDER_VERT = 450; - - /** - * - */ - private JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="115,38" - /** - * - */ - private Object guiLock = new Object(); // @jve:decl-index=0: - /** - * - */ - private JPanel jContentPane = null; - /** - * - */ - private JSplitPane jSplitPane = null; - /** - * - */ - private JButton jBtnSendToServer = null; - /** - * - */ - private JMenuBar jJMenuBar = null; - /** - * - */ - private JMenu jMenu = null; - /** - * - */ - private JMenuItem jMenuItem = null; - /** - * - */ - private JMenu jMenu1 = null; - /** - * - */ - private JMenuItem jMenuItem1 = null; - /** - * - */ - private JButton jBtnSendToClient = null; - /** - * - */ - private Proxy pr = null; // @jve:decl-index=0: - /** - * - */ - private JMenuItem jMenuItem2 = null; - /** - * - */ - private JMenuItem jMenuItem3 = null; - /** - * - */ - private JTextPane jTextPaneClientRaw = null; - /** - * - */ - private XMLTextPane xTextPaneClient = null; - /** - * - */ - private XMLTreeView xTreeViewClient = null; - /** - * - */ - private XMLTextPane xTextPaneServer = null; - /** - * - */ - private XMLTreeView xTreeViewServer = null; - - /** - * - */ - private String clientHeader = ""; // @jve:decl-index=0: - /** - * - */ - private String clientBody = ""; // @jve:decl-index=0: - /** - * - */ - private String serverHeader = ""; // @jve:decl-index=0: - /** - * - */ - private String serverBody = ""; // @jve:decl-index=0: - - /** - * - */ - private JTextPane jTextPaneClientHeader = null; - /** - * - */ - private JTextPane jTextPaneServerHeader = null; - /** - * - */ - private JTabbedPane jTabbedPaneClient = null; - /** - * - */ - private JScrollPane jScrollPaneClientRaw = null; - /** - * - */ - private JScrollPane jScrollPaneClientHeader = null; - /** - * - */ - private JScrollPane jScrollPaneServerHeader = null; - /** - * - */ - private JScrollPane jScrollPaneClientXML = null; - /** - * - */ - private JScrollPane jScrollPaneClientXMLTree = null; - /** - * - */ - private JScrollPane jScrollPaneServerXML = null; - /** - * - */ - private JScrollPane jScrollPaneServerXMLTree = null; - - /** - * - */ - private JMenu jMenu2 = null; - - /** - * - */ - private JMenuItem jMenuItem4 = null; - - /** - * - */ - private JTabbedPane jTabbedPaneServer = null; - - /** - * - */ - private JScrollPane getJScrollPaneServerRaw = null; - - /** - * - */ - private JTextPane jTextPaneServerRaw = null; - - /** - * - */ - private JMenuItem jMenuItem5 = null; - - /** - * - */ - private JMenu jMenu3 = null; - - /** - * - */ - private JMenuItem jMenuItem6 = null; - - /** - * - */ - private ConfigurationDialog configDialog = null; - - /** - * - */ - private PluginConfigurationDialog pluginConfigDialog = null; - - /** - * - */ - private JSplitPane jSplitPane1 = null; - - /** - * - */ - private JPanel jPanel = null; - - /** - * - */ - private JPanel jPanel1 = null; - - /** - * - */ - private JPanel jPanel2 = null; - - /** - * - */ - private JTable jTable = null; - - /** - * - */ - private JScrollPane jScrollPane = null; - - /** - * - */ - private List<Message> messages = null; - - /** - * - */ - private HistoryTableModel myTableModel; - - /** - * - */ - private AboutDialog aboutDialog; - - /** - * - */ - private JToggleButton jToggleButton = null; - - /** - * - */ - private Boolean relayActive = false; - - /** - * - */ - private JToggleButton jToggleButton1 = null; - - /** - * - */ - private PluginManager pluginManager = null; - - /** - * - */ - //### TODO: private Icon stopButtonIcon = new ImageIcon("icons/stop.gif"); // @jve:decl-index=0: - - /** - * TODO: wues_ha: enter comment! - * - */ - public Gui() { - - try { - UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); - } catch (UnsupportedLookAndFeelException lfe) { - System.err.println(lfe); - } catch (IllegalAccessException iae) { - System.err.println(iae); - } catch (InstantiationException ie) { - System.err.println(ie); - } catch (ClassNotFoundException cnfe) { - System.err.println(cnfe); - } - - pluginManager = PluginManager.getInstance(); - pluginManager.loadAllPlugins(); - - jFrame = getJFrame(); - jFrame.pack(); - jFrame.setVisible(true); - - //### startRelay(); - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void startRelay() { - try { - Configuration config = new Configuration(); - messages = new Vector<Message>(); - pr = new Proxy(config, System.out, System.err, this, guiLock); - relayActive = true; - jToggleButton.setText("Stop"); - } catch (IOException ioe) { - System.err.println(ioe); - } - } - - /** - * TODO: wues_ha: Enter comment! - * - */ - public void stopRelay() { - pr.stopProxy(); - relayActive = false; - jToggleButton.setText("Start"); - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param data String data - * @param toClient Boolean whether this is a client or server connection - */ - public void neu(String data, boolean toClient) { - if (!toClient) { - jTextPaneServerRaw.setText(jTextPaneServerRaw.getText() + data); - } else { - jTextPaneClientRaw.setText(jTextPaneClientRaw.getText() + data); - } - } - - /** - * This method initializes jFrame. - * - * @return javax.swing.JFrame - */ - private JFrame getJFrame() { - if (jFrame == null) { - jFrame = new JFrame(); - // jFrame.setIconImage(createImageIcon("icons/davinspector.gif", "")); - jFrame.setSize(new Dimension(Constants.UI_MAIN_WINDOW_WIDTH, Constants.UI_MAIN_WINDOW_HEIGHT)); - jFrame.setContentPane(getJContentPane()); - jFrame.setJMenuBar(getJJMenuBar()); - jFrame.setTitle(Constants.APP_TITLE); - jFrame.addWindowListener(new java.awt.event.WindowAdapter() { - - public void windowOpened(java.awt.event.WindowEvent e) { - // windowOpened() - } - - public void windowClosing(java.awt.event.WindowEvent e) { - // windowClosing() - System.exit(0); - } - }); - } - return jFrame; - } - - /** - * This method initializes jContentPane. - * - * @return javax.swing.JPanel - */ - private JPanel getJContentPane() { - if (jContentPane == null) { - jContentPane = new JPanel(); - jContentPane.setLayout(new BorderLayout()); - jContentPane.setPreferredSize(new Dimension(Constants.UI_MAIN_WINDOW_WIDTH, Constants.UI_MAIN_WINDOW_HEIGHT)); - jContentPane.add(getJSplitPane1(), BorderLayout.CENTER); - jContentPane.add(getJPanel1(), BorderLayout.NORTH); - jContentPane.addComponentListener(new java.awt.event.ComponentAdapter() { - public void componentResized(java.awt.event.ComponentEvent e) { - //resize - jSplitPane.setDividerLocation(DIVIDER_HORZ); - } - }); - } - return jContentPane; - } - - /** - * This method initializes jSplitPane. - * - * @return javax.swing.JSplitPane - */ - private JSplitPane getJSplitPane() { - if (jSplitPane == null) { - jSplitPane = new JSplitPane(); - jSplitPane.setLeftComponent(getJTabbedPaneClient()); - jSplitPane.setRightComponent(getJTabbedPaneServer()); - jSplitPane.setDividerLocation(DIVIDER_HORZ); - } - return jSplitPane; - } - - /** - * This method initializes jButton. - * - * @return javax.swing.JButton - */ - private JButton getJButtonSendToServer() { - if (jBtnSendToServer == null) { - jBtnSendToServer = new JButton(); - jBtnSendToServer.setText("Send to Server"); - jBtnSendToServer.setIcon(createImageIcon("icons/totheright.png", "DD")); - jBtnSendToServer.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - updateMessages(jTextPaneClientRaw.getText(), true); - pr.writeToServer(jTextPaneClientRaw.getText()); - jTextPaneClientRaw.setText(""); - } - }); - } - return jBtnSendToServer; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return XMLTreeView - */ - private XMLTreeView getXMLTreeViewClient() { - if (xTreeViewClient == null) { - xTreeViewClient = new XMLTreeView(); - } - return xTreeViewClient; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return XMLTextPane - */ - private XMLTextPane getXMLTextPaneClient() { - if (xTextPaneClient == null) { - xTextPaneClient = new XMLTextPane(); - } - return xTextPaneClient; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return XMLTreeView - */ - private XMLTreeView getXMLTreeViewServer() { - if (xTreeViewServer == null) { - xTreeViewServer = new XMLTreeView(); - } - return xTreeViewServer; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @return XMLTextPane - */ - private XMLTextPane getXMLTextPaneServer() { - if (xTextPaneServer == null) { - xTextPaneServer = new XMLTextPane(); - xTextPaneServer.setContentType("text/rtf"); - } - return xTextPaneServer; - } - - /** - * This method initializes jJMenuBar. - * - * @return javax.swing.JMenuBar - */ - private JMenuBar getJJMenuBar() { - if (jJMenuBar == null) { - jJMenuBar = new JMenuBar(); - jJMenuBar.add(getJMenu()); - jJMenuBar.add(getJMenu1()); - jJMenuBar.add(getJMenu3()); - jJMenuBar.add(getJMenu2()); - } - return jJMenuBar; - } - - /** - * This method initializes jMenu. - * - * @return javax.swing.JMenu - */ - private JMenu getJMenu() { - if (jMenu == null) { - jMenu = new JMenu(); - jMenu.setText("File"); - jMenu.setMnemonic(KeyEvent.VK_F); - jMenu.add(getJMenuItem4()); - jMenu.add(getJMenuItem()); - } - return jMenu; - } - - /** - * This method initializes jMenuItem. - * - * @return javax.swing.JMenuItem - */ - private JMenuItem getJMenuItem() { - if (jMenuItem == null) { - jMenuItem = new JMenuItem(); - jMenuItem.setText("Exit"); - jMenuItem.setMnemonic(KeyEvent.VK_UNDEFINED); - jMenuItem.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - System.exit(0); - } - }); - } - return jMenuItem; - } - - /** - * This method initializes jMenu1. - * - * @return javax.swing.JMenu - */ - private JMenu getJMenu1() { - if (jMenu1 == null) { - jMenu1 = new JMenu(); - jMenu1.setText("View"); - jMenu1.setMnemonic(KeyEvent.VK_V); - jMenu1.add(getJMenuItem1()); - jMenu1.add(getJMenuItem2()); - jMenu1.add(getJMenuItem3()); - } - return jMenu1; - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param data Data - * @param cTS Boolean Client to Server - */ - private void updateMessages(String data, Boolean cTS) { - // store Message - Message msg = new Message(); - msg.setClientToSever(cTS); - msg.setData(data); - msg.setTimestamp(new Date()); - messages.add(msg); - // update history table - myTableModel.addRow(new Object[]{msg.getClientToSever(), msg.getId(), msg.getTimestamp(), msg.getSize()}); - myTableModel.fireTableDataChanged(); - - //update plugins - List<Plugin> plugged = pluginManager.getAvailablePlugins(); - for (Iterator<Plugin> iterator = plugged.iterator(); iterator.hasNext();) { - Plugin plugin = (Plugin) iterator.next(); - plugin.update(data); - } - } - - /** - * TODO: wues_ha: Enter comment! - * ### - */ - public void extGui() { - - } - - /** - * This method initializes jMenuItem1. - * - * @return javax.swing.JMenuItem - */ - private JMenuItem getJMenuItem1() { - if (jMenuItem1 == null) { - jMenuItem1 = new JMenuItem(); - jMenuItem1.setText("Clear all"); - jMenuItem1.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - //Clear - jTextPaneClientRaw.setText(""); - jTextPaneServerRaw.setText(""); - } - }); - } - return jMenuItem1; - } - - /** - * This method initializes jButton1. - * - * @return javax.swing.JButton - */ - private JButton getJButtonSendToClient() { - if (jBtnSendToClient == null) { - jBtnSendToClient = new JButton(); - jBtnSendToClient.setText("Send to Client... [truncated message content] |
From: <wu...@us...> - 2008-01-22 16:48:31
|
Revision: 28 http://davinspector.svn.sourceforge.net/davinspector/?rev=28&view=rev Author: wuest Date: 2008-01-22 08:48:29 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Added Paths: ----------- branches/prototyp2/DAVInspector/ Copied: branches/prototyp2/DAVInspector (from rev 27, branches/prototype1/DAVInspector) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-22 16:47:41
|
Revision: 27 http://davinspector.svn.sourceforge.net/davinspector/?rev=27&view=rev Author: wuest Date: 2008-01-22 08:47:39 -0800 (Tue, 22 Jan 2008) Log Message: ----------- branch Added Paths: ----------- branches/prototyp2/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-22 10:30:41
|
Revision: 26 http://davinspector.svn.sourceforge.net/davinspector/?rev=26&view=rev Author: wuest Date: 2008-01-22 02:30:37 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Added checkstyle defintions, codetemplates and formatter configuration. Added Paths: ----------- branches/prototype1/DAVInspector/src/src-style/ branches/prototype1/DAVInspector/src/src-style/checks.xml branches/prototype1/DAVInspector/src/src-style/eclipse-codetemplates.xml branches/prototype1/DAVInspector/src/src-style/eclipse-formatter.xml Added: branches/prototype1/DAVInspector/src/src-style/checks.xml =================================================================== --- branches/prototype1/DAVInspector/src/src-style/checks.xml (rev 0) +++ branches/prototype1/DAVInspector/src/src-style/checks.xml 2008-01-22 10:30:37 UTC (rev 26) @@ -0,0 +1,147 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + This configuration file was written by the eclipse-cs plugin configuration editor +--> +<!-- + Checkstyle-Configuration: DLR + Description: none +--> +<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.2//EN" "http://www.puppycrawl.com/dtds/configuration_1_2.dtd"> +<module name="Checker"> + <property name="severity" value="warning"/> + <module name="TreeWalker"> + <property name="tabWidth" value="4"/> + <module name="JavadocVariable"/> + <module name="JavadocStyle"/> + <module name="JavadocType"> + <property name="scope" value="anoninner"/> + <property name="authorFormat" value="[A-Z][\-\p{L}]*\s+[\p{L}\.\s]*[A-Z][\-\p{L}]*"/> + <property name="versionFormat" value="\$LastChangedRevision.*\$"/> + </module> + <module name="JavadocMethod"/> + <module name="ConstantName"/> + <module name="LocalFinalVariableName"/> + <module name="LocalVariableName"/> + <module name="MemberName"/> + <module name="MethodName"/> + <module name="PackageName"/> + <module name="ParameterName"/> + <module name="StaticVariableName"/> + <module name="TypeName"/> + <module name="AvoidStarImport"/> + <module name="IllegalImport"/> + <module name="RedundantImport"/> + <module name="UnusedImports"/> + <module name="ImportOrder"> + <property name="groups" value="java,java.beans,java.awt,javax,junit,org.omg,org.apache,org.globus,org,com,COM,de.rcenvironment,de"/> + <property name="separated" value="true"/> + </module> + <module name="FileLength"/> + <module name="LineLength"> + <property name="max" value="140"/> + </module> + <module name="MethodLength"> + <property name="tokens" value="METHOD_DEF"/> + </module> + <module name="ParameterNumber"> + <property name="tokens" value="METHOD_DEF"/> + </module> + <module name="EmptyForIteratorPad"/> + <module name="MethodParamPad"/> + <module name="OperatorWrap"/> + <module name="ParenPad"/> + <module name="TypecastParenPad"/> + <module name="WhitespaceAfter"/> + <module name="WhitespaceAround"> + <property name="tokens" value="ASSIGN,MINUS,PLUS,PLUS_ASSIGN,MINUS_ASSIGN,STAR_ASSIGN,DIV_ASSIGN,QUESTION,LOR,LAND,NOT_EQUAL,EQUAL,LT,GT,LE,GE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE"/> + </module> + <module name="TabCharacter"/> + <module name="ModifierOrder"/> + <module name="RedundantModifier"/> + <module name="AvoidNestedBlocks"/> + <module name="EmptyBlock"/> + <module name="LeftCurly"/> + <module name="NeedBraces"/> + <module name="RightCurly"/> + <module name="AvoidInlineConditionals"/> + <module name="DoubleCheckedLocking"/> + <module name="EmptyStatement"/> + <module name="EqualsHashCode"/> + <module name="HiddenField"/> + <module name="InnerAssignment"/> + <module name="IllegalInstantiation"> + <property name="classes" value="java.lang.Boolean"/> + </module> + <module name="MagicNumber"> + <property name="ignoreNumbers" value="0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10"/> + </module> + <module name="MissingSwitchDefault"/> + <module name="ModifiedControlVariable"/> + <module name="RedundantThrows"/> + <module name="SimplifyBooleanExpression"/> + <module name="SimplifyBooleanReturn"/> + <module name="StringLiteralEquality"/> + <module name="NestedIfDepth"> + <property name="max" value="3"/> + </module> + <module name="NestedTryDepth"> + <property name="max" value="3"/> + </module> + <module name="IllegalCatch"> + <property name="illegalClassNames" value="java.lang.Exception, java.lang.Throwable"/> + </module> + <module name="ReturnCount"> + <property name="max" value="3"/> + </module> + <module name="IllegalType"/> + <module name="DeclarationOrder"/> + <module name="DefaultComesLast"/> + <module name="MultipleStringLiterals"> + <property name="allowedDuplicates" value="2"/> + <property name="ignoreStringsRegexp" value="^(("")|(", ")|(" ")|("\\n")||("\)")|("\(")|("Dialog"))$"/> + </module> + <module name="MultipleVariableDeclarations"/> + <module name="FinalClass"/> + <module name="HideUtilityClassConstructor"/> + <module name="MutableException"/> + <module name="InterfaceIsType"/> + <module name="VisibilityModifier"> + <property name="protectedAllowed" value="true"/> + </module> + <module name="GenericIllegalRegexp"> + <property name="format" value="e\.printStackTrace"/> + <property name="message" value="Provide a useful error message (instead of e.printStackTrace())."/> + </module> + <module name="UpperEll"/> + <module name="ArrayTypeStyle"/> + <module name="Indentation"> + <property name="caseIndent" value="0"/> + </module> + <module name="GenericIllegalRegexp"> + <property name="format" value="System[.]out[.]print"/> + <property name="message" value="Usage of print and println is not allowed."/> + </module> + <module name="Regexp"> + <property name="format" value="\A/\*\n \* [A-Z][a-zA-Z0-9]*\.java\n \*\s*\n"/> + <property name="message" value="Correct file header not found (1)! Add file header from template. (Filename)"/> + </module> + <module name="Regexp"> + <property name="format" value=" \* Copyright [\d]+ Deutsches Zentrum fuer Luft- und Raumfahrt e\.V\. \(DLR\)\n"/> + <property name="message" value="Correct file header not found (2)! Add file header from template. (Copyright)"/> + </module> + <module name="Regexp"> + <property name="format" value=" \* \$Id"/> + <property name="message" value="Correct file header not found (3)! Add file header from template. (ID)"/> + </module> + <module name="Regexp"> + <property name="format" value=" \* Licensed under the Apache License, Version 2\.0 \(the 'License'\);\n"/> + <property name="message" value="Correct file header not found (4)! Add file header from template. (License)"/> + </module> + <module name="LineLength"> + <property name="max" value="140"/> + </module> + </module> + <module name="PackageHtml"/> + <module name="NewlineAtEndOfFile"/> + <module name="Translation"/> +</module> Added: branches/prototype1/DAVInspector/src/src-style/eclipse-codetemplates.xml =================================================================== --- branches/prototype1/DAVInspector/src/src-style/eclipse-codetemplates.xml (rev 0) +++ branches/prototype1/DAVInspector/src/src-style/eclipse-codetemplates.xml 2008-01-22 10:30:37 UTC (rev 26) @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="gettercomment_context" deleted="false" description="Comment for getter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name="gettercomment">/** + * ${todo}: ${user}: Comment! + * @return Returns the ${bare_field_name}. + */</template><template autoinsert="true" context="settercomment_context" deleted="false" description="Comment for setter method" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.settercomment" name="settercomment">/** + * ${todo}: ${user}: Comment! + * @param ${param} The ${bare_field_name} to set. + */</template><template autoinsert="true" context="constructorcomment_context" deleted="false" description="Comment for created constructors" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name="constructorcomment">/** + * ${todo}: ${user}: enter comment! + * + * ${tags} + */</template><template autoinsert="true" context="filecomment_context" deleted="false" description="Comment for created Java files" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.filecomment" name="filecomment">/** + * + */</template><template autoinsert="false" context="typecomment_context" deleted="false" description="Comment for created types" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.typecomment" name="typecomment">/** + * ${todo}: ${user}: Enter comment! + * + * @version $$LastChangedRevision$$ + * @author ${user} + */</template><template autoinsert="true" context="fieldcomment_context" deleted="false" description="Comment for fields" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name="fieldcomment">/** + * + */</template><template autoinsert="true" context="methodcomment_context" deleted="false" description="Comment for non-overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name="methodcomment">/** + * ${todo}: ${user}: Enter comment! + * + * ${tags} + */</template><template autoinsert="true" context="overridecomment_context" deleted="false" description="Comment for overriding methods" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name="overridecomment">/** + * {@inheritDoc} + * + * ${see_to_overridden} + */</template><template autoinsert="false" context="newtype_context" deleted="false" description="New classes and interfaces" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.newtype" name="newtype">/* + * ${file_name} + * + * ${todo}: ${user} Enter comment! + * + * Created: ${date} ${user} <email> + * Changed: + * + * $$Id$$ + * + * Copyright 2007 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. (DLR) + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +${package_declaration} + +${typecomment} +${type_declaration}</template><template autoinsert="true" context="catchblock_context" deleted="false" description="Code in new catch blocks" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.catchblock" name="catchblock">// ${todo} Auto-generated catch block +logger.error(${exception_var}.getStackTrace());</template><template autoinsert="true" context="methodbody_context" deleted="false" description="Code in created method stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.methodbody" name="methodbody">// ${todo} Auto-generated method stub +${body_statement}</template><template autoinsert="true" context="constructorbody_context" deleted="false" description="Code in created constructor stubs" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name="constructorbody">${body_statement} +// ${todo} Auto-generated constructor stub</template><template autoinsert="true" context="getterbody_context" deleted="false" description="Code in created getters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.getterbody" name="getterbody">return ${field};</template><template autoinsert="true" context="setterbody_context" deleted="false" description="Code in created setters" enabled="true" id="org.eclipse.jdt.ui.text.codetemplates.setterbody" name="setterbody">${field} = ${param};</template></templates> \ No newline at end of file Added: branches/prototype1/DAVInspector/src/src-style/eclipse-formatter.xml =================================================================== --- branches/prototype1/DAVInspector/src/src-style/eclipse-formatter.xml (rev 0) +++ branches/prototype1/DAVInspector/src/src-style/eclipse-formatter.xml 2008-01-22 10:30:37 UTC (rev 26) @@ -0,0 +1,246 @@ +<?xml version="1.0" encoding="UTF-8"?> +<profiles version="8"> +<profile name="DAVInspector Conventions" version="8"> +<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="18"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="18"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="18"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="18"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="82"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="18"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> +<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="end_of_line"/> +<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.comment.format_comments" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="140"/> +<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/> +<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> +<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> +<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> +<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="140"/> +<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> +<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/> +<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/> +<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> +<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> +<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="false"/> +</profile> +</profiles> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-22 09:49:29
|
Revision: 25 http://davinspector.svn.sourceforge.net/davinspector/?rev=25&view=rev Author: wuest Date: 2008-01-22 01:49:23 -0800 (Tue, 22 Jan 2008) Log Message: ----------- First version of the plugin concept with following restrictions: - no UI configuration of plugins - hardcoded jar-filename - no seperate filter queues for client and server History table now in colors and stereo ;) Modified Paths: -------------- branches/prototype1/DAVInspector/.checkstyle branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java Modified: branches/prototype1/DAVInspector/.checkstyle =================================================================== --- branches/prototype1/DAVInspector/.checkstyle 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/.checkstyle 2008-01-22 09:49:23 UTC (rev 25) @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <fileset-config file-format-version="1.2.0" simple-config="true"> - <local-check-config name="DLR" location="src/de/dlr/src-style/checks.xml" type="project" description=""> + <local-check-config name="DLR" location="src/src-style/checks.xml" type="project" description=""> <additional-data name="protect-config-file" value="false"/> </local-check-config> <fileset name="Alle" enabled="true" check-config-name="DLR" local="true"> Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-22 09:49:23 UTC (rev 25) @@ -21,7 +21,6 @@ import java.awt.Frame; import java.awt.SystemColor; -import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-22 09:49:23 UTC (rev 25) @@ -17,7 +17,9 @@ package de.dlr.DAVInspector; +import java.awt.Color; + /** * Constants. * @version $LastChangedRevision$ @@ -48,7 +50,7 @@ /** * */ - public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 300; + public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 650; /** * @@ -64,6 +66,16 @@ * */ public static final int UI_ABOUT_DIALOG_HEIGTH = 300; + + /** + * + */ + public static final Color UI_REPLY_COLOR = new Color(255, 204, 102); + + /** + * + */ + public static final Color UI_REQUEST_COLOR = new Color(170, 240, 240); /** * Line Feed + Carriage Return. @@ -142,12 +154,33 @@ public static final int PROXY_CLIENTPORT = 8888; /** - * Indentifier for plugin-type + * Indentifier for plugin-type. + * ### plugin for server & client!? */ - enum PlugInType { + public enum PlugInType { + /** + * + */ + ViewGeneral, + /** + * + */ + EditGeneral, + /** + * + */ ViewClient, + /** + * + */ ViewServer, + /** + * + */ EditClient, + /** + * + */ EditServer - } + } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-22 09:49:23 UTC (rev 25) @@ -24,6 +24,7 @@ import java.awt.event.KeyEvent; import java.io.IOException; import java.util.Date; +import java.util.Iterator; import java.util.List; import java.util.Vector; @@ -45,6 +46,8 @@ import org.xml.sax.SAXException; +import de.dlr.DAVInspector.Constants.PlugInType; + /** * TODO: wues_ha: Enter comment! * TODO: aktualisierung auf server und clientseite verbessern. @@ -303,10 +306,20 @@ * */ private Boolean relayActive = false; + + /** + * + */ + private JToggleButton jToggleButton1 = null; /** * */ + private PluginManager pluginManager = null; + + /** + * + */ //### TODO: private Icon stopButtonIcon = new ImageIcon("icons/stop.gif"); // @jve:decl-index=0: /** @@ -314,6 +327,7 @@ * */ public Gui() { + try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); } catch (UnsupportedLookAndFeelException lfe) { @@ -325,6 +339,10 @@ } catch (ClassNotFoundException cnfe) { System.err.println(cnfe); } + + pluginManager = PluginManager.getInstance(); + pluginManager.loadAllPlugins(); + jFrame = getJFrame(); jFrame.pack(); jFrame.setVisible(true); @@ -446,6 +464,7 @@ if (jBtnSendToServer == null) { jBtnSendToServer = new JButton(); jBtnSendToServer.setText("Send to Server"); + jBtnSendToServer.setIcon(createImageIcon("icons/totheright.png", "DD")); jBtnSendToServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateMessages(jTextPaneClientRaw.getText(), true); @@ -588,9 +607,24 @@ msg.setTimestamp(new Date()); messages.add(msg); // update history table - myTableModel.addRow(new Object[]{msg.getId(), msg.getClientToSever(), msg.getTimestamp(), msg.getSize()}); + myTableModel.addRow(new Object[]{msg.getClientToSever(), msg.getId(), msg.getTimestamp(), msg.getSize()}); myTableModel.fireTableDataChanged(); + + //update plugins + List<Plugin> plugged = pluginManager.getAvailablePlugins(); + for (Iterator<Plugin> iterator = plugged.iterator(); iterator.hasNext();) { + Plugin plugin = (Plugin) iterator.next(); + plugin.update(data); + } } + + /** + * TODO: wues_ha: Enter comment! + * ### + */ + public void extGui() { + + } /** * This method initializes jMenuItem1. @@ -621,6 +655,7 @@ if (jBtnSendToClient == null) { jBtnSendToClient = new JButton(); jBtnSendToClient.setText("Send to Client"); + jBtnSendToClient.setIcon(createImageIcon("icons/totheleft.png", "To the left")); jBtnSendToClient.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { updateMessages(jTextPaneServerRaw.getText(), false); @@ -829,6 +864,19 @@ jTabbedPaneClient.addTab("Header", null, getJScrollPaneClientHeader(), null); jTabbedPaneClient.addTab("XML", null, getJScrollPaneClientXML(), null); jTabbedPaneClient.addTab("XML-Tree", null, getJScrollPaneClientXMLTree(), null); + + //update plugins + if (pluginManager != null) { + List<Plugin> plugged = pluginManager.getAvailablePlugins(); + for (Iterator<Plugin> iterator = plugged.iterator(); iterator.hasNext();) { + Plugin plugin = (Plugin) iterator.next(); + if (plugin.getType() == PlugInType.ViewGeneral) { + ViewPlugin viewPlugin = (ViewPlugin) plugin; + jTabbedPaneClient.addTab(viewPlugin.getName(), null, viewPlugin.getUI(), null); + } + } + } + jTabbedPaneClient.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { if (jTabbedPaneClient.getSelectedIndex() >= 1) { @@ -1097,6 +1145,7 @@ if (pluginConfigDialog == null) { pluginConfigDialog = new PluginConfigurationDialog(jFrame); } + pluginConfigDialog.addPlugins(pluginManager.getAvailablePlugins()); pluginConfigDialog.setVisible(true); } }); @@ -1160,6 +1209,7 @@ jPanel2 = new JPanel(); jPanel2.setLayout(new GridBagLayout()); jPanel2.add(getJToggleButton()); + jPanel2.add(getJToggleButton1(), null); } return jPanel2; } @@ -1171,12 +1221,14 @@ */ private JTable getJTable() { - if (jTable == null) { + if (jTable == null) { myTableModel = new HistoryTableModel(); jTable = new JTable(myTableModel); jTable.setShowGrid(true); jTable.setAutoCreateRowSorter(true); + + jTable.setDefaultRenderer(Object.class, new HistoryTableCellRenderer()); } return jTable; } @@ -1217,6 +1269,19 @@ } /** + * This method initializes jToggleButton1. + * + * @return javax.swing.JToggleButton + */ + private JToggleButton getJToggleButton1() { + if (jToggleButton1 == null) { + jToggleButton1 = new JToggleButton(); + jToggleButton1.setText("Automode"); + } + return jToggleButton1; + } + + /** * TODO: wues_ha: Enter comment! * * @param argv String[] arguments @@ -1225,7 +1290,7 @@ public static void main(String[] argv) throws Exception { new Gui(); } - + /** * Returns an ImageIcon, or null if the path was invalid. * @@ -1233,7 +1298,7 @@ * @param description Desc * @return Image */ - protected ImageIcon createImageIcon(String path, String description) { + public ImageIcon createImageIcon(String path, String description) { java.net.URL imgURL = getClass().getResource(path); if (imgURL != null) { return new ImageIcon(imgURL, description); @@ -1241,5 +1306,5 @@ System.err.println("Couldn't find file: " + path); return null; } - } + } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java 2008-01-22 09:49:23 UTC (rev 25) @@ -36,8 +36,8 @@ * */ private String[] columnNames = { - "ID", "Type", + "ID", "Timestamp", "Size" }; @@ -64,15 +64,6 @@ /** * {@inheritDoc} * - * @see javax.swing.table.AbstractTableModel#getColumnClass(int) - */ - public Class getColumnClass(int c) { - return getValueAt(0, c).getClass(); - } - - /** - * {@inheritDoc} - * * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) */ public boolean isCellEditable(int row, int col) { Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java 2008-01-22 09:49:23 UTC (rev 25) @@ -20,41 +20,49 @@ import java.io.File; import java.io.IOException; -import java.io.InputStream; -import java.util.Hashtable; import java.util.jar.JarFile; -import java.util.zip.ZipEntry; /** * - * TODO: litz_ma: Enter comment! - * * Prototype example to load a jar file - with the possibility to * close and unload the class afterwards. + * + * @version $LastChangedRevision$ + * @author Markus Litz */ public class LocalJarHelperClassLoader extends ClassLoader { + /** + * + */ private JarFile jar; - private Hashtable cache = new Hashtable(); - - public LocalJarHelperClassLoader(String jar) throws IOException { - this(new File(jar)); + /** + * Load jar from by a given filename. + * + * @param jarFileName filename of the jar + * @throws IOException IO Exception + */ + public LocalJarHelperClassLoader(String jarFileName) throws IOException { + this(new File(jarFileName)); } - public LocalJarHelperClassLoader(File jar) throws IOException { - this.jar = new JarFile(jar); + /** + * Load jar by a given file object. + * + * @param jarFile file object + * @throws IOException IO Exception + */ + public LocalJarHelperClassLoader(File jarFile) throws IOException { + this.jar = new JarFile(jarFile); } /** - * * Closes the jar file. * - * @throws IOException + * @throws IOException IO Exception */ public void closeJarFile() throws IOException { jar.close(); } - - -} \ No newline at end of file +} Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java 2008-01-22 09:49:23 UTC (rev 25) @@ -41,7 +41,6 @@ * view/edit * * @return string - * ### typen vorgeben??! */ PlugInType getType(); Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java 2008-01-22 09:49:23 UTC (rev 25) @@ -19,6 +19,7 @@ import java.awt.BorderLayout; import java.awt.Frame; +import java.util.List; import javax.swing.JButton; import javax.swing.JDialog; @@ -75,6 +76,19 @@ super(owner); initialize(); } + + /** + * TODO: wues_ha: Enter comment! + * + * @param availablePlugins vector + */ + public void addPlugins(List<Plugin> availablePlugins) { + for (Plugin current : availablePlugins) { + myTableModel.addRow(new Object[]{true, true, current.getName(), + current.getVersion(), current.getAuthor(), current.getDescription()}); + } + myTableModel.fireTableDataChanged(); + } /** * This method initializes this. @@ -156,6 +170,7 @@ */ public void savePluginConfiguration() { // TODO: speichern + //for (jTable.getRowCount() closeWindow(); } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java 2008-01-22 09:49:23 UTC (rev 25) @@ -39,16 +39,12 @@ private String[] columnNames = { "Client", "Server", - "Plugin" + "Name", + "Version", + "Author", + "Description" }; - /* - { - {new Boolean(true), new Boolean(false), "Header View"}, - {new Boolean(false), new Boolean(true), "XML View"}, - {new Boolean(true), new Boolean(false), "XML-Tree View"} - }; - */ /** * {@inheritDoc} * @@ -83,8 +79,11 @@ * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) */ public boolean isCellEditable(int row, int col) { - return true; - } + if (col < 2) { + return true; + } + return false; + } /** * {@inheritDoc} @@ -93,9 +92,9 @@ */ /* public void setValueAt(Object value, int row, int col) { - dataVector.setElementAt(value, row); - //data[row][col] = value; + Vector rowVector = (Vector) dataVector.elementAt(row); + rowVector.setElementAt(value, col); fireTableCellUpdated(row, col); } - */ + */ } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java 2008-01-22 09:49:23 UTC (rev 25) @@ -18,13 +18,11 @@ package de.dlr.DAVInspector; import java.io.File; -import java.util.Enumeration; -import java.util.Hashtable; +import java.io.IOException; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Vector; - -import de.dlr.DAVInspector.LocalJarHelperClassLoader; -import de.dlr.DAVInspector.Constants.PlugInType; /** @@ -36,16 +34,22 @@ */ public final class PluginManager { - Hashtable loader_hashtable = new Hashtable(); - - Vector pluginVector = new Vector(); - /** * */ private static PluginManager instance = new PluginManager(); - + /** + * + */ + private Map<String, LocalJarHelperClassLoader> loaderHashmap = new HashMap<String, LocalJarHelperClassLoader>(); + + /** + * + */ + private List<Plugin> pluginVector = new Vector<Plugin>(); + + /** * Default constructor, * not callable from outside this class. */ @@ -65,17 +69,28 @@ * */ public void loadAllPlugins() { - //eigener classloader!? //\xFCber jar-dateien im plugin-verzeichnis iterieren - //zu hashmap hinzu - // + //laden + //filter f\xFCr jar dateien + // TODO: Pfad + File pluginVZ = new File("./bin/de/dlr/DAVInspector/plugins/RawPlugin.jar"); + loadPlugin(pluginVZ); + /* + if (pluginVZ.isDirectory()) { + String[] fils = pluginVZ.list(); + for (int i = 0; i < fils.length; ++i) { + File plug = new File(fils[i]); + loadPlugin(plug); + } + } + */ } /** * * load a plugin from a given Java-File-var. * - * @param jarfile + * @param jarfile File */ public void loadPlugin(File jarfile) { Plugin plugin = null; @@ -84,28 +99,44 @@ LocalJarHelperClassLoader jcl = null; try { jcl = new LocalJarHelperClassLoader(jarfile); - Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name + "." + name); +// Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name + "." + name); + Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name); // lets try to load plugin... plugin = (Plugin) c.newInstance(); plugin.init(); // ok, the plugin is initialized if (plugin != null) { - pluginVector.addElement(plugin); - loader_hashtable.put(name, jcl); - // plugin loaded + pluginVector.add(plugin); + loaderHashmap.put(name, jcl); + // plugin loaded ### + /* if (plugin.getType() == PlugInType.ViewClient) { - // ViewClient specific....maybe GUI setup.... + // ViewClient GUI setup.... + plugin.init(); } else if (plugin.getType() == PlugInType.ViewServer) { - // ViewServer specific....maybe GUI setup.... + // ViewServer GUI setup.... + plugin.init(); + } else if (plugin.getType() == PlugInType.ViewGeneral) { + // ViewGeneral GUI setup.... + plugin.init(); } + */ } - } catch (Exception e) { + } catch (ClassNotFoundException cnfe) { + System.err.println(cnfe); + } catch (InstantiationException ie) { + System.err.println(ie); + } catch (IllegalAccessException iae) { + System.err.println(iae); + } catch (IOException ioe) { + System.err.println(ioe); // we do need a logger, // something is going to hell here... try { jcl.closeJarFile(); jarfile.delete(); - } catch (Exception ex) { + } catch (IOException ioe2) { + System.err.println(ioe2); } } } @@ -114,34 +145,32 @@ * * Unloads a loaded plugin. * - * @param pluginName - * @return + * @param pluginName String + * @return Boolean */ public boolean unloadPlugin(String pluginName) { // unload plugin try { - LocalJarHelperClassLoader jcl = (LocalJarHelperClassLoader) loader_hashtable.get(pluginName); + LocalJarHelperClassLoader jcl = (LocalJarHelperClassLoader) loaderHashmap.get(pluginName); jcl.closeJarFile(); Plugin aSinglePlugin = null; - Enumeration en = pluginVector.elements(); - while (en.hasMoreElements()) { - Plugin current = (Plugin) en.nextElement(); + for (Plugin current : pluginVector) { String uniqueName = current.getClass().getName(); uniqueName = uniqueName.substring( uniqueName.lastIndexOf(".") + 1, uniqueName.length()); if (uniqueName.equals(pluginName)) { aSinglePlugin = current; pluginVector.remove(aSinglePlugin); - loader_hashtable.remove(pluginName); + loaderHashmap.remove(pluginName); } } // cleanup GUI, free memory... return true; - } catch (Exception e) { + } catch (IOException ioe) { + System.err.println(ioe); // oh yes baby, we do need a logger.... // again the hell is freezing over... - e.printStackTrace(); return false; } } @@ -152,6 +181,6 @@ * @return Vector */ public List<Plugin> getAvailablePlugins() { - return new Vector<Plugin>(); + return pluginVector; } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2008-01-22 09:38:58 UTC (rev 24) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2008-01-22 09:49:23 UTC (rev 25) @@ -172,14 +172,14 @@ */ public void stopProxy() { this.interrupt(); - //### out.println("stopped2"); + out.println("stopped2"); } /** * All StreamCopyThreads are interrupted and joined. */ private void cleanup() { - //### out.println("stopped3"); + out.println("stopped3"); try { cToS.interrupt(); sToC.interrupt(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-22 09:39:03
|
Revision: 24 http://davinspector.svn.sourceforge.net/davinspector/?rev=24&view=rev Author: wuest Date: 2008-01-22 01:38:58 -0800 (Tue, 22 Jan 2008) Log Message: ----------- Added table cell renderer for history table. Added button icons. Added test plugin. Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableCellRenderer.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheleft.png branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheright.png branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/RawPlugin.java Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableCellRenderer.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableCellRenderer.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableCellRenderer.java 2008-01-22 09:38:58 UTC (rev 24) @@ -0,0 +1,82 @@ +/* + * HistoryTableCellRenderer.java + * + * TODO: wues_ha Enter comment! + * + * Created: 21.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.Color; +import java.awt.Component; + +import javax.swing.JTable; +import javax.swing.table.DefaultTableCellRenderer; +import javax.swing.table.TableCellRenderer; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class HistoryTableCellRenderer extends DefaultTableCellRenderer implements TableCellRenderer { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * + */ + private Boolean isRequest = false; + + /** + * {@inheritDoc} + * + * @see javax.swing.table.DefaultTableCellRenderer#getTableCellRendererComponent + * (javax.swing.JTable, java.lang.Object, boolean, boolean, int, int) + */ + public Component getTableCellRendererComponent(JTable table, Object value, + boolean isSelected, boolean hasFocus, int row, int column) { + super.getTableCellRendererComponent(table, value, isSelected, + hasFocus, row, column); + + if (value instanceof Boolean){ + isRequest = ((Boolean) value).booleanValue(); + if (isRequest) { + setText("Request"); + } else { + setText("Reply"); + } + } else { + setText(value.toString()); + } + + if (hasFocus || isSelected) { + setForeground(Color.getColor("textHighlighttext")); + setBackground(Color.getColor("textHighlight")); + } else { + setForeground(Color.getColor("windowText")); + if (isRequest) { + setBackground(Constants.UI_REQUEST_COLOR); + } else { + setBackground(Constants.UI_REPLY_COLOR); + } + } + + return this; + } +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheleft.png =================================================================== (Binary files differ) Property changes on: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheleft.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheright.png =================================================================== (Binary files differ) Property changes on: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/icons/totheright.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/RawPlugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/RawPlugin.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/plugins/RawPlugin.java 2008-01-22 09:38:58 UTC (rev 24) @@ -0,0 +1,153 @@ +/* + * RawPlugin.java + * + * TODO: wues_ha Enter comment! + * + * Created: 18.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector.plugins; + +import java.awt.SystemColor; + +import javax.swing.JComponent; +import javax.swing.JTextPane; + +import de.dlr.DAVInspector.Constants.PlugInType; +import de.dlr.DAVInspector.ViewPlugin; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class RawPlugin implements ViewPlugin { + + /** + * + */ + private Boolean active; + + /** + * + */ + private JTextPane jTextPane = null; + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.ViewPlugin#getUI() + */ + @Override + public JComponent getUI() { + return jTextPane; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#getAuthor() + */ + @Override + public String getAuthor() { + return "Jochen Wuest"; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#getDescription() + */ + @Override + public String getDescription() { + return "Raw view of the data."; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#getName() + */ + @Override + public String getName() { + return "Raw"; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#getType() + */ + @Override + public PlugInType getType() { + return PlugInType.ViewGeneral; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#getVersion() + */ + @Override + public int getVersion() { + return 1; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#init() + */ + @Override + public void init() { + if (jTextPane == null) { + jTextPane = new JTextPane(); + jTextPane.setEditable(false); + jTextPane.setBackground(SystemColor.yellow); + } + jTextPane.setText(""); + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#isActive() + */ + @Override + public Boolean isActive() { + return active; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#setActive(java.lang.Boolean) + */ + @Override + public void setActive(Boolean state) { + active = state; + } + + /** + * {@inheritDoc} + * + * @see de.dlr.DAVInspector.Plugin#update(java.lang.String) + */ + @Override + public void update(String data) { +// if (active) { + jTextPane.setText(data); +// } + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kil...@us...> - 2008-01-18 07:16:23
|
Revision: 23 http://davinspector.svn.sourceforge.net/davinspector/?rev=23&view=rev Author: killerjoe Date: 2008-01-17 23:16:14 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Removed test-code. Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java 2008-01-17 21:24:53 UTC (rev 22) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java 2008-01-18 07:16:14 UTC (rev 23) @@ -56,89 +56,5 @@ jar.close(); } - /** - * Load the class from the file. - * - * @param myClassName - * @return - */ - private Class loadClassFromJar(String myClassName) { - Class cls = null; - String name = classToFile(myClassName); - try { - ZipEntry entry = jar.getEntry(name); - if (entry == null) - return null; - InputStream inStream = jar.getInputStream(entry); - int len = (int) entry.getSize(); - byte[] data = new byte[len]; - int success = 0; - int offset = 0; - while (success < len) { - len -= success; - offset += success; - success = inStream.read(data, offset, len); - if (success == -1) { - return null; - } - } - - cls = defineClass(myClassName, data, 0, data.length); - - return cls; - } catch (IOException io) { - return null; - } - } - - /** - * - * {@inheritDoc} - * - * @see java.lang.ClassLoader#findClass(java.lang.String) - */ - protected Class findClass(String myClassName) throws ClassNotFoundException { - Class c = null; - - // look in the cache for the class - c = (Class) cache.get(myClassName); - - // if class is not in the cache, try to get it from the jar file - if (c == null) { - c = loadClassFromJar(myClassName); - } - - // if class is not in jar, try to get it from SystemClassLoader - if (c == null) { - c = findSystemClass(myClassName); - } - - if (c == null) { - throw new ClassNotFoundException(); - } - return c; - } - - /** - * - * {@inheritDoc} - * - * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String) - */ - public InputStream getResourceAsStream(String resource) { - try { - ZipEntry entry = jar.getEntry(resource); - if (entry == null) - return null; - - InputStream in = jar.getInputStream(entry); - return in; - } catch (IOException io) { - return null; - } - } - - private String classToFile(String name) { - return name.replace('.', '/').concat(".class"); - } + } \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kil...@us...> - 2008-01-17 21:24:57
|
Revision: 22 http://davinspector.svn.sourceforge.net/davinspector/?rev=22&view=rev Author: killerjoe Date: 2008-01-17 13:24:53 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Prototyping for the PlugIn-management. Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-17 16:39:49 UTC (rev 21) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-17 21:24:53 UTC (rev 22) @@ -140,4 +140,14 @@ * Client port. */ public static final int PROXY_CLIENTPORT = 8888; + + /** + * Indentifier for plugin-type + */ + enum PlugInType { + ViewClient, + ViewServer, + EditClient, + EditServer + } } Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/LocalJarHelperClassLoader.java 2008-01-17 21:24:53 UTC (rev 22) @@ -0,0 +1,144 @@ +/* + * JarClassLoader.java + * + * JarClassLoader....extends java Class Loader to load jar-files + * from local harddisk. + * + * Created: 17.01.2008 Markus Litz <Mar...@dl...> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/sc + */ + +package de.dlr.DAVInspector; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.util.Hashtable; +import java.util.jar.JarFile; +import java.util.zip.ZipEntry; + +/** + * + * TODO: litz_ma: Enter comment! + * + * Prototype example to load a jar file - with the possibility to + * close and unload the class afterwards. + */ +public class LocalJarHelperClassLoader extends ClassLoader { + + private JarFile jar; + + private Hashtable cache = new Hashtable(); + + public LocalJarHelperClassLoader(String jar) throws IOException { + this(new File(jar)); + } + + public LocalJarHelperClassLoader(File jar) throws IOException { + this.jar = new JarFile(jar); + } + + /** + * + * Closes the jar file. + * + * @throws IOException + */ + public void closeJarFile() throws IOException { + jar.close(); + } + + /** + * Load the class from the file. + * + * @param myClassName + * @return + */ + private Class loadClassFromJar(String myClassName) { + Class cls = null; + String name = classToFile(myClassName); + try { + ZipEntry entry = jar.getEntry(name); + if (entry == null) + return null; + InputStream inStream = jar.getInputStream(entry); + int len = (int) entry.getSize(); + byte[] data = new byte[len]; + int success = 0; + int offset = 0; + while (success < len) { + len -= success; + offset += success; + success = inStream.read(data, offset, len); + if (success == -1) { + return null; + } + } + + cls = defineClass(myClassName, data, 0, data.length); + + return cls; + } catch (IOException io) { + return null; + } + } + + /** + * + * {@inheritDoc} + * + * @see java.lang.ClassLoader#findClass(java.lang.String) + */ + protected Class findClass(String myClassName) throws ClassNotFoundException { + Class c = null; + + // look in the cache for the class + c = (Class) cache.get(myClassName); + + // if class is not in the cache, try to get it from the jar file + if (c == null) { + c = loadClassFromJar(myClassName); + } + + // if class is not in jar, try to get it from SystemClassLoader + if (c == null) { + c = findSystemClass(myClassName); + } + + if (c == null) { + throw new ClassNotFoundException(); + } + return c; + } + + /** + * + * {@inheritDoc} + * + * @see java.lang.ClassLoader#getResourceAsStream(java.lang.String) + */ + public InputStream getResourceAsStream(String resource) { + try { + ZipEntry entry = jar.getEntry(resource); + if (entry == null) + return null; + + InputStream in = jar.getInputStream(entry); + return in; + } catch (IOException io) { + return null; + } + } + + private String classToFile(String name) { + return name.replace('.', '/').concat(".class"); + } +} \ No newline at end of file Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java 2008-01-17 16:39:49 UTC (rev 21) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java 2008-01-17 21:24:53 UTC (rev 22) @@ -17,6 +17,8 @@ package de.dlr.DAVInspector; +import de.dlr.DAVInspector.Constants.PlugInType; + //### import org.apache.log4j.Logger; /** @@ -41,7 +43,7 @@ * @return string * ### typen vorgeben??! */ - String getType(); + PlugInType getType(); /** * Returns the name of the plugin. Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java 2008-01-17 16:39:49 UTC (rev 21) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java 2008-01-17 21:24:53 UTC (rev 22) @@ -17,9 +17,16 @@ package de.dlr.DAVInspector; +import java.io.File; +import java.util.Enumeration; +import java.util.Hashtable; import java.util.List; import java.util.Vector; + +import de.dlr.DAVInspector.LocalJarHelperClassLoader; +import de.dlr.DAVInspector.Constants.PlugInType; + /** * TODO: wues_ha: Enter comment! * Fast and thread safe implementation of the Singleton pattern. @@ -29,6 +36,10 @@ */ public final class PluginManager { + Hashtable loader_hashtable = new Hashtable(); + + Vector pluginVector = new Vector(); + /** * */ @@ -53,7 +64,7 @@ * TODO: wues_ha: Enter comment! * */ - public void loadPlugins() { + public void loadAllPlugins() { //eigener classloader!? //\xFCber jar-dateien im plugin-verzeichnis iterieren //zu hashmap hinzu @@ -61,6 +72,81 @@ } /** + * + * load a plugin from a given Java-File-var. + * + * @param jarfile + */ + public void loadPlugin(File jarfile) { + Plugin plugin = null; + + String name = jarfile.getName().substring(0, jarfile.getName().lastIndexOf(".")); + LocalJarHelperClassLoader jcl = null; + try { + jcl = new LocalJarHelperClassLoader(jarfile); + Class c = jcl.loadClass("de.dlr.DAVInspector.plugins." + name + "." + name); + // lets try to load plugin... + plugin = (Plugin) c.newInstance(); + plugin.init(); + // ok, the plugin is initialized + if (plugin != null) { + pluginVector.addElement(plugin); + loader_hashtable.put(name, jcl); + // plugin loaded + if (plugin.getType() == PlugInType.ViewClient) { + // ViewClient specific....maybe GUI setup.... + } else if (plugin.getType() == PlugInType.ViewServer) { + // ViewServer specific....maybe GUI setup.... + } + } + } catch (Exception e) { + // we do need a logger, + // something is going to hell here... + try { + jcl.closeJarFile(); + jarfile.delete(); + } catch (Exception ex) { + } + } + } + + /** + * + * Unloads a loaded plugin. + * + * @param pluginName + * @return + */ + public boolean unloadPlugin(String pluginName) { + // unload plugin + try { + LocalJarHelperClassLoader jcl = (LocalJarHelperClassLoader) loader_hashtable.get(pluginName); + jcl.closeJarFile(); + Plugin aSinglePlugin = null; + Enumeration en = pluginVector.elements(); + while (en.hasMoreElements()) { + Plugin current = (Plugin) en.nextElement(); + String uniqueName = current.getClass().getName(); + uniqueName = uniqueName.substring( + uniqueName.lastIndexOf(".") + 1, uniqueName.length()); + if (uniqueName.equals(pluginName)) { + aSinglePlugin = current; + pluginVector.remove(aSinglePlugin); + loader_hashtable.remove(pluginName); + } + } + // cleanup GUI, free memory... + + return true; + } catch (Exception e) { + // oh yes baby, we do need a logger.... + // again the hell is freezing over... + e.printStackTrace(); + return false; + } + } + + /** * Returns Vector containing the available plugins. * * @return Vector This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-17 16:39:53
|
Revision: 21 http://davinspector.svn.sourceforge.net/davinspector/?rev=21&view=rev Author: wuest Date: 2008-01-17 08:39:49 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Menu order changed. Loading icons and images from file. Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-17 16:35:58 UTC (rev 20) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-17 16:39:49 UTC (rev 21) @@ -21,6 +21,7 @@ import java.awt.Frame; import java.awt.SystemColor; +import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JLabel; @@ -148,11 +149,14 @@ */ private JPanel getJPanel() { if (jPanel == null) { + //ImageIcon iiLogo = createImageIcon("icons/davinspector_trans.gif", ""); + //JLabel logo = new JLabel(iiLogo); + //jPanel.add(logo, BorderLayout.NORTH); + jPanel = new JPanel(); jPanel.setLayout(new BorderLayout()); - jPanel.add(jLabel, BorderLayout.CENTER); + jPanel.add(jLabel, BorderLayout.SOUTH); } return jPanel; } - } // @jve:decl-index=0:visual-constraint="9,11" Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-17 16:35:58 UTC (rev 20) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-17 16:39:49 UTC (rev 21) @@ -19,6 +19,7 @@ import java.awt.BorderLayout; import java.awt.Dimension; +import java.awt.GridBagLayout; import java.awt.SystemColor; import java.awt.event.KeyEvent; import java.io.IOException; @@ -26,6 +27,7 @@ import java.util.List; import java.util.Vector; +import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JMenu; @@ -378,6 +380,7 @@ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); + // jFrame.setIconImage(createImageIcon("icons/davinspector.gif", "")); jFrame.setSize(new Dimension(Constants.UI_MAIN_WINDOW_WIDTH, Constants.UI_MAIN_WINDOW_HEIGHT)); jFrame.setContentPane(getJContentPane()); jFrame.setJMenuBar(getJJMenuBar()); @@ -513,8 +516,8 @@ jJMenuBar = new JMenuBar(); jJMenuBar.add(getJMenu()); jJMenuBar.add(getJMenu1()); + jJMenuBar.add(getJMenu3()); jJMenuBar.add(getJMenu2()); - jJMenuBar.add(getJMenu3()); } return jJMenuBar; } @@ -1155,8 +1158,8 @@ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); - jPanel2.setLayout(new BorderLayout()); - jPanel2.add(getJToggleButton(), BorderLayout.NORTH); + jPanel2.setLayout(new GridBagLayout()); + jPanel2.add(getJToggleButton()); } return jPanel2; } @@ -1222,4 +1225,21 @@ public static void main(String[] argv) throws Exception { new Gui(); } + + /** + * Returns an ImageIcon, or null if the path was invalid. + * + * @param path Path + * @param description Desc + * @return Image + */ + protected ImageIcon createImageIcon(String path, String description) { + java.net.URL imgURL = getClass().getResource(path); + if (imgURL != null) { + return new ImageIcon(imgURL, description); + } else { + System.err.println("Couldn't find file: " + path); + return null; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-17 16:36:03
|
Revision: 20 http://davinspector.svn.sourceforge.net/davinspector/?rev=20&view=rev Author: wuest Date: 2008-01-17 08:35:58 -0800 (Thu, 17 Jan 2008) Log Message: ----------- Added plugin design. Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ViewPlugin.java Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/EditPlugin.java 2008-01-17 16:35:58 UTC (rev 20) @@ -0,0 +1,36 @@ +/* + * EditPlugin.java + * + * TODO: wues_ha Enter comment! + * + * Created: 17.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public interface EditPlugin extends Plugin { + /** + * Returns the processed data of the plugin. + * + * @return String + */ + String getOutput(); + + //### klasse!? -> verarbeitungsreihenfolge +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Plugin.java 2008-01-17 16:35:58 UTC (rev 20) @@ -0,0 +1,95 @@ +/* + * Plugin.java + * + * TODO: wues_ha Enter comment! + * + * Created: 17.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +//### import org.apache.log4j.Logger; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public interface Plugin { + /** + * Returns the version of the plugin. + * + * @return int with version information + */ + int getVersion(); + + /** + * Returns the type of the plugin. + * client/server + * view/edit + * + * @return string + * ### typen vorgeben??! + */ + String getType(); + + /** + * Returns the name of the plugin. + * + * @return String + */ + String getName(); + + /** + * Returns the name of the author of the plugin. + * + * @return String + */ + String getAuthor(); + + /** + * Returns the description of the plugin. + * + * @return String + */ + String getDescription(); + + /** + * Initializes the plugin. + * + */ + void init(); + + /** + * Starts processing of the data. + * + * @param data String + */ + void update(String data); + + /** + * Enable/disable the plugin. + * + * @param state Boolean + */ + void setActive(Boolean state); + + /** + * Returns the current state of the plugin. + * + * @return Boolean + */ + Boolean isActive(); + + //### hasUI? +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginManager.java 2008-01-17 16:35:58 UTC (rev 20) @@ -0,0 +1,71 @@ +/* + * PluginManager.java + * + * TODO: wues_ha Enter comment! + * + * Created: 17.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.util.List; +import java.util.Vector; + +/** + * TODO: wues_ha: Enter comment! + * Fast and thread safe implementation of the Singleton pattern. + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class PluginManager { + + /** + * + */ + private static PluginManager instance = new PluginManager(); + + /** + * Default constructor, + * not callable from outside this class. + */ + private PluginManager() {} + + /** + * Static method, returns the only instance of this class. + * + * @return PluginManager + */ + public static PluginManager getInstance() { + return instance; + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void loadPlugins() { + //eigener classloader!? + //\xFCber jar-dateien im plugin-verzeichnis iterieren + //zu hashmap hinzu + // + } + + /** + * Returns Vector containing the available plugins. + * + * @return Vector + */ + public List<Plugin> getAvailablePlugins() { + return new Vector<Plugin>(); + } +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ViewPlugin.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ViewPlugin.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ViewPlugin.java 2008-01-17 16:35:58 UTC (rev 20) @@ -0,0 +1,36 @@ +/* + * ViewPlugin.java + * + * TODO: wues_ha Enter comment! + * + * Created: 17.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import javax.swing.JComponent; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public interface ViewPlugin extends Plugin { + /** + * Returns the JComponent of the plugin. + * + * @return JComponent + */ + JComponent getUI(); +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-16 16:46:32
|
Revision: 19 http://davinspector.svn.sourceforge.net/davinspector/?rev=19&view=rev Author: wuest Date: 2008-01-16 08:46:27 -0800 (Wed, 16 Jan 2008) Log Message: ----------- starting and stopping of the proxy now possible rework of constants naming schema some minor updates Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2008-01-16 16:46:27 UTC (rev 19) @@ -204,10 +204,10 @@ try { properties.load(new FileInputStream(Constants.CONFIGURATION_FILENAME)); // assign properties to variables - serverAddress = properties.getProperty("ServerAddress", Constants.SERVERADDRESS); - serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.SERVERPORT))); - clientAddress = properties.getProperty("ClientAddress", Constants.CLIENTADDRESS); - clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.CLIENTPORT))); + serverAddress = properties.getProperty("ServerAddress", Constants.PROXY_SERVERADDRESS); + serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.PROXY_SERVERPORT))); + clientAddress = properties.getProperty("ClientAddress", Constants.PROXY_CLIENTADDRESS); + clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.PROXY_CLIENTPORT))); } catch (IOException ioe) { System.err.println(ioe); Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2008-01-16 16:46:27 UTC (rev 19) @@ -96,8 +96,8 @@ * This method initializes this. */ private void initialize() { - this.setSize(Constants.CONFIG_DIALOG_SIZE_WIDTH, Constants.CONFIG_DIALOG_SIZE_HEIGHT); - this.setTitle(Constants.APPTITLE + " Configuration"); + this.setSize(Constants.UI_CONFIG_DIALOG_WIDTH, Constants.UI_CONFIG_DIALOG_HEIGHT); + this.setTitle(Constants.APP_TITLE + " Configuration"); this.setContentPane(this.getJContentPane()); // Load Configuration from file Configuration config = new Configuration(); Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-16 16:46:27 UTC (rev 19) @@ -28,24 +28,44 @@ /** * GUI Width. */ - public static final int GUI_SIZE_WIDTH = 800; + public static final int UI_MAIN_WINDOW_WIDTH = 800; /** * GUI Height. */ - public static final int GUI_SIZE_HEIGHT = 600; + public static final int UI_MAIN_WINDOW_HEIGHT = 600; /** * Configuration Dialog Width. */ - public static final int CONFIG_DIALOG_SIZE_WIDTH = 300; + public static final int UI_CONFIG_DIALOG_WIDTH = 300; /** * Configuration Dialog Height. */ - public static final int CONFIG_DIALOG_SIZE_HEIGHT = 200; + public static final int UI_CONFIG_DIALOG_HEIGHT = 200; /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_WIDTH = 300; + + /** + * + */ + public static final int UI_PLUGIN_CONFIG_DIALOG_HEIGTH = 250; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_WIDTH = 300; + + /** + * + */ + public static final int UI_ABOUT_DIALOG_HEIGTH = 300; + + /** * Line Feed + Carriage Return. */ public static final String LFCR = "\r\n"; @@ -61,58 +81,63 @@ public static final String CR = "\n"; /** - * Timeout waiting for a StreamCopyThread to finish in ms. + * EOF. */ - public static final int THREADTIMEOUT = 1000; + public static final int EOF = -1; + + /** + * Application Title. + */ + public static final String APP_TITLE = "Proxy - DAVInspector Prototype 1"; /** - * Linger time in seconds for socket. + * Filename of the configuration file. */ - public static final int LINGERTIME = 15; + public static final String APP_VERSION = "0.1"; /** - * Size of the receive buffer. + * Filename of the configuration file. */ - public static final int RECVBUFFERSIZE = 64; + public static final String CONFIGURATION_FILENAME = "config.cfg"; /** - * Backlog parameter used when creating the ServerSocket. + * Timeout waiting for a StreamCopyThread to finish in ms. */ - public static final int BACKLOG = 100; + public static final int PROXY_THREADTIMEOUT = 1000; /** - * EOF. + * Linger time in seconds for socket. */ - public static final int EOF = -1; - + public static final int PROXY_LINGERTIME = 15; + /** - * Application Title. + * Size of the receive buffer. */ - public static final String APPTITLE = "Proxy - DAVInspector Prototype 1"; + public static final int PROXY_RECVBUFFERSIZE = 64; /** + * Backlog parameter used when creating the ServerSocket. + */ + public static final int PROXY_BACKLOG = 100; + + /** * Address of the Server. IP address or domain name. */ - public static final String SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; + public static final String PROXY_SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; /** * Server port. */ - public static final int SERVERPORT = 8080; + public static final int PROXY_SERVERPORT = 8080; /** * Address of the Client. Normally this is empty and * the address of the client is of no importance. */ - public static final String CLIENTADDRESS = ""; + public static final String PROXY_CLIENTADDRESS = ""; /** * Client port. */ - public static final int CLIENTPORT = 8888; - - /** - * Filename of the configuration file. - */ - public static final String CONFIGURATION_FILENAME = "config.xml"; + public static final int PROXY_CLIENTPORT = 8888; } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-16 16:46:27 UTC (rev 19) @@ -19,7 +19,6 @@ import java.awt.BorderLayout; import java.awt.Dimension; -import java.awt.GridBagLayout; import java.awt.SystemColor; import java.awt.event.KeyEvent; import java.io.IOException; @@ -38,6 +37,7 @@ import javax.swing.JTabbedPane; import javax.swing.JTable; import javax.swing.JTextPane; +import javax.swing.JToggleButton; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -109,7 +109,7 @@ /** * */ - private Proxy pr = null; + private Proxy pr = null; // @jve:decl-index=0: /** * */ @@ -280,22 +280,32 @@ /** * */ - private JButton jButton = null; + private List<Message> messages = null; + + /** + * + */ + private HistoryTableModel myTableModel; + + /** + * + */ + private AboutDialog aboutDialog; /** * */ - private JButton jButton1 = null; + private JToggleButton jToggleButton = null; /** * */ - private List<Message> messages = null; + private Boolean relayActive = false; /** * */ - private HistoryTableModel myTableModel; + //### TODO: private Icon stopButtonIcon = new ImageIcon("icons/stop.gif"); // @jve:decl-index=0: /** * TODO: wues_ha: enter comment! @@ -317,10 +327,20 @@ jFrame.pack(); jFrame.setVisible(true); + //### startRelay(); + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void startRelay() { try { Configuration config = new Configuration(); messages = new Vector<Message>(); pr = new Proxy(config, System.out, System.err, this, guiLock); + relayActive = true; + jToggleButton.setText("Stop"); } catch (IOException ioe) { System.err.println(ioe); } @@ -329,6 +349,16 @@ /** * TODO: wues_ha: Enter comment! * + */ + public void stopRelay() { + pr.stopProxy(); + relayActive = false; + jToggleButton.setText("Start"); + } + + /** + * TODO: wues_ha: Enter comment! + * * @param data String data * @param toClient Boolean whether this is a client or server connection */ @@ -348,10 +378,10 @@ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); - jFrame.setSize(new Dimension(Constants.GUI_SIZE_WIDTH, Constants.GUI_SIZE_HEIGHT)); + jFrame.setSize(new Dimension(Constants.UI_MAIN_WINDOW_WIDTH, Constants.UI_MAIN_WINDOW_HEIGHT)); jFrame.setContentPane(getJContentPane()); jFrame.setJMenuBar(getJJMenuBar()); - jFrame.setTitle(Constants.APPTITLE); + jFrame.setTitle(Constants.APP_TITLE); jFrame.addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent e) { @@ -376,7 +406,7 @@ if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); - jContentPane.setPreferredSize(new Dimension(Constants.GUI_SIZE_WIDTH, Constants.GUI_SIZE_HEIGHT)); + jContentPane.setPreferredSize(new Dimension(Constants.UI_MAIN_WINDOW_WIDTH, Constants.UI_MAIN_WINDOW_HEIGHT)); jContentPane.add(getJSplitPane1(), BorderLayout.CENTER); jContentPane.add(getJPanel1(), BorderLayout.NORTH); jContentPane.addComponentListener(new java.awt.event.ComponentAdapter() { @@ -555,8 +585,7 @@ msg.setTimestamp(new Date()); messages.add(msg); // update history table - myTableModel.insertRow(myTableModel.getRowCount(), - new Object[]{msg.getId(), msg.getClientToSever(), msg.getTimestamp(), msg.getSize()}); + myTableModel.addRow(new Object[]{msg.getId(), msg.getClientToSever(), msg.getTimestamp(), msg.getSize()}); myTableModel.fireTableDataChanged(); } @@ -927,11 +956,6 @@ jMenu2.setText("Help"); jMenu2.setMnemonic(KeyEvent.VK_HELP); jMenu2.add(getJMenuItem5()); - jMenu2.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - // TODO: Display Help - } - }); } return jMenu2; } @@ -1030,6 +1054,14 @@ if (jMenuItem5 == null) { jMenuItem5 = new JMenuItem(); jMenuItem5.setText("About"); + jMenuItem5.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + if (aboutDialog == null) { + aboutDialog = new AboutDialog(jFrame); + } + aboutDialog.setVisible(true); + } + }); } return jMenuItem5; } @@ -1123,9 +1155,8 @@ private JPanel getJPanel2() { if (jPanel2 == null) { jPanel2 = new JPanel(); - jPanel2.setLayout(new GridBagLayout()); - jPanel2.add(getJButton()); - jPanel2.add(getJButton1()); + jPanel2.setLayout(new BorderLayout()); + jPanel2.add(getJToggleButton(), BorderLayout.NORTH); } return jPanel2; } @@ -1161,32 +1192,28 @@ } /** - * This method initializes jButton. + * This method initializes jToggleButton. * - * @return javax.swing.JButton + * @return javax.swing.JToggleButton */ - private JButton getJButton() { - if (jButton == null) { - jButton = new JButton(); - jButton.setText("Start"); + private JToggleButton getJToggleButton() { + if (jToggleButton == null) { + jToggleButton = new JToggleButton(); + jToggleButton.setText("Start"); + jToggleButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + if (relayActive) { + stopRelay(); + } else { + startRelay(); + } + } + }); } - return jButton; + return jToggleButton; } /** - * This method initializes jButton1. - * - * @return javax.swing.JButton - */ - private JButton getJButton1() { - if (jButton1 == null) { - jButton1 = new JButton(); - jButton1.setText("Stopp"); - } - return jButton1; - } - - /** * TODO: wues_ha: Enter comment! * * @param argv String[] arguments Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java 2008-01-16 16:46:27 UTC (rev 19) @@ -17,9 +17,8 @@ package de.dlr.DAVInspector; -import javax.swing.table.DefaultTableModel ; +import javax.swing.table.DefaultTableModel; - /** * TODO: wues_ha: Enter comment! * @@ -38,7 +37,7 @@ */ private String[] columnNames = { "ID", - "CTS", + "Type", "Timestamp", "Size" }; Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java 2008-01-16 16:46:27 UTC (rev 19) @@ -30,7 +30,7 @@ /** * */ - private static int idCount; + private static int idCounter; /** * @@ -62,7 +62,7 @@ * */ public Message() { - ++idCount; + ++idCounter; } /** @@ -127,7 +127,7 @@ public void setData(String msg) { this.data = msg; this.size = msg.length(); - this.id = idCount; + this.id = idCounter; } /** Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2008-01-16 16:46:27 UTC (rev 19) @@ -118,9 +118,9 @@ this.out = outStream; this.err = errStream; if (clientAddress == null) { - this.srvSock = new ServerSocket(config.getClientPort(), Constants.BACKLOG); + this.srvSock = new ServerSocket(config.getClientPort(), Constants.PROXY_BACKLOG); } else { - this.srvSock = new ServerSocket(config.getClientPort(), Constants.BACKLOG, clientAddress); + this.srvSock = new ServerSocket(config.getClientPort(), Constants.PROXY_BACKLOG, clientAddress); } this.dstAddr = serverAddress; this.dstPort = config.getServerPort(); @@ -140,9 +140,9 @@ while (!isInterrupted()) { serverSocket = srvSock.accept(); try { - serverSocket.setSoLinger(true, Constants.LINGERTIME); + serverSocket.setSoLinger(true, Constants.PROXY_LINGERTIME); clientSocket = new Socket(dstAddr, dstPort); - clientSocket.setSoLinger(true, Constants.LINGERTIME); + clientSocket.setSoLinger(true, Constants.PROXY_LINGERTIME); sToC = new StreamCopyThread(serverSocket, clientSocket, lock, err, gui, guiLock); cToS = new StreamCopyThread(clientSocket, serverSocket, lock, err, gui, guiLock); sToC.setPeer(cToS); @@ -165,16 +165,26 @@ out.println("stopped"); } } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void stopProxy() { + this.interrupt(); + //### out.println("stopped2"); + } /** * All StreamCopyThreads are interrupted and joined. */ private void cleanup() { + //### out.println("stopped3"); try { cToS.interrupt(); sToC.interrupt(); - cToS.join(Constants.THREADTIMEOUT); - sToC.join(Constants.THREADTIMEOUT); + cToS.join(Constants.PROXY_THREADTIMEOUT); + sToC.join(Constants.PROXY_THREADTIMEOUT); } catch (InterruptedException ie) { System.err.println(ie); } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java 2008-01-16 16:37:07 UTC (rev 18) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java 2008-01-16 16:46:27 UTC (rev 19) @@ -109,7 +109,7 @@ * @see java.lang.Thread#run() */ public void run() { - byte[] buffer = new byte[Constants.RECVBUFFERSIZE]; + byte[] buffer = new byte[Constants.PROXY_RECVBUFFERSIZE]; int count = Constants.EOF; try { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-16 16:37:12
|
Revision: 18 http://davinspector.svn.sourceforge.net/davinspector/?rev=18&view=rev Author: wuest Date: 2008-01-16 08:37:07 -0800 (Wed, 16 Jan 2008) Log Message: ----------- Added about dialog Added plugin config dialog Added plugin table model Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/AboutDialog.java 2008-01-16 16:37:07 UTC (rev 18) @@ -0,0 +1,158 @@ +/* + * AboutDialog.java + * + * TODO: wues_ha Enter comment! + * + * Created: 16.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.BorderLayout; +import java.awt.Frame; +import java.awt.SystemColor; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextPane; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class AboutDialog extends JDialog { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * + */ + private JPanel jContentPane = null; + + /** + * + */ + private JButton jButton = null; + + /** + * + */ + private JTextPane jTextPane = null; + + /** + * + */ + private JPanel jPanel = null; + + /** + * + */ + private JLabel jLabel = null; + + /** + * @param owner Parent Frame + */ + public AboutDialog(Frame owner) { + super(owner); + initialize(); + } + + /** + * This method initializes this. + */ + private void initialize() { + this.setSize(Constants.UI_ABOUT_DIALOG_WIDTH, Constants.UI_ABOUT_DIALOG_HEIGTH); + this.setTitle(Constants.APP_TITLE + " About"); + this.setContentPane(getJContentPane()); + } + + /** + * This method initializes jContentPane. + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jLabel = new JLabel(); + jLabel.setText(Constants.APP_TITLE); + jContentPane = new JPanel(); + jContentPane.setLayout(new BorderLayout()); + jContentPane.add(getJButton(), BorderLayout.SOUTH); + jContentPane.add(getJTextPane(), BorderLayout.CENTER); + jContentPane.add(getJPanel(), BorderLayout.NORTH); + } + return jContentPane; + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void closeWindow() { + this.setVisible(false); + this.dispose(); + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButton() { + if (jButton == null) { + jButton = new JButton(); + jButton.setText("Ok"); + jButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + closeWindow(); + } + }); + } + return jButton; + } + + /** + * This method initializes jTextPane. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPane() { + if (jTextPane == null) { + jTextPane = new JTextPane(); + jTextPane.setBackground(SystemColor.control); + jTextPane.setText("Apache 2.0 Lizenz\nJochen Wuest\nDLR\n2007-2008"); + } + return jTextPane; + } + + /** + * This method initializes jPanel. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel() { + if (jPanel == null) { + jPanel = new JPanel(); + jPanel.setLayout(new BorderLayout()); + jPanel.add(jLabel, BorderLayout.CENTER); + } + return jPanel; + } + +} // @jve:decl-index=0:visual-constraint="9,11" Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationDialog.java 2008-01-16 16:37:07 UTC (rev 18) @@ -0,0 +1,197 @@ +/* + * PluginConfigurationDialog.java + * + * TODO: wues_ha Enter comment! + * + * Created: 10.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.BorderLayout; +import java.awt.Frame; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JTable; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class PluginConfigurationDialog extends JDialog { + + /** + * + */ + private static final long serialVersionUID = 1L; + /** + * + */ + private JPanel jContentPane = null; + /** + * + */ + private JScrollPane jScrollPane = null; + /** + * + */ + private JPanel jPanel1 = null; + /** + * + */ + private JTable jTable = null; + /** + * + */ + private JButton jButton = null; + /** + * + */ + private JButton jButton1 = null; + + /** + * + */ + private PluginConfigurationTableModel myTableModel; + + /** + * @param owner ParentFrame + */ + public PluginConfigurationDialog(Frame owner) { + super(owner); + initialize(); + } + + /** + * This method initializes this. + */ + private void initialize() { + this.setSize(Constants.UI_PLUGIN_CONFIG_DIALOG_WIDTH, Constants.UI_PLUGIN_CONFIG_DIALOG_HEIGTH); + this.setTitle(Constants.APP_TITLE + " Plugin Configuration Dialog"); + this.setContentPane(getJContentPane()); + } + + /** + * This method initializes jContentPane. + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jContentPane = new JPanel(); + jContentPane.setLayout(new BorderLayout()); + jContentPane.add(getJScrollPane(), BorderLayout.CENTER); + jContentPane.add(getJPanel1(), BorderLayout.SOUTH); + } + return jContentPane; + } + + /** + * This method initializes jScrollPane. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane() { + if (jScrollPane == null) { + jScrollPane = new JScrollPane(); + jScrollPane.setViewportView(getJTable()); + } + return jScrollPane; + } + + /** + * This method initializes jPanel1. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel1() { + if (jPanel1 == null) { + jPanel1 = new JPanel(); + jPanel1.setLayout(new BorderLayout()); + jPanel1.add(getJButton(), BorderLayout.WEST); + jPanel1.add(getJButton1(), BorderLayout.EAST); + } + return jPanel1; + } + + /** + * This method initializes jList. + * + * @return javax.swing.JList + */ + private JTable getJTable() { + if (jTable == null) { + myTableModel = new PluginConfigurationTableModel(); + jTable = new JTable(myTableModel); + } + return jTable; + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void closeWindow() { + this.setVisible(false); + this.dispose(); + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void savePluginConfiguration() { + // TODO: speichern + closeWindow(); + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButton() { + if (jButton == null) { + jButton = new JButton(); + jButton.setText("Cancel"); + jButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + closeWindow(); + } + }); + } + return jButton; + } + + /** + * This method initializes jButton1. + * + * @return javax.swing.JButton + */ + private JButton getJButton1() { + if (jButton1 == null) { + jButton1 = new JButton(); + jButton1.setText("Ok"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + savePluginConfiguration(); + } + }); + } + return jButton1; + } +} // @jve:decl-index=0:visual-constraint="10,10" Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/PluginConfigurationTableModel.java 2008-01-16 16:37:07 UTC (rev 18) @@ -0,0 +1,101 @@ +/* + * PluginConfigurationTableModel.java + * + * TODO: wues_ha Enter comment! + * + * Created: 16.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import javax.swing.table.DefaultTableModel; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class PluginConfigurationTableModel extends DefaultTableModel { + + /** + * + */ + private static final long serialVersionUID = 1L; + + /** + * + */ + private String[] columnNames = { + "Client", + "Server", + "Plugin" + }; + + /* + { + {new Boolean(true), new Boolean(false), "Header View"}, + {new Boolean(false), new Boolean(true), "XML View"}, + {new Boolean(true), new Boolean(false), "XML-Tree View"} + }; + */ + /** + * {@inheritDoc} + * + * @see javax.swing.table.TableModel#getColumnCount() + */ + @Override + public int getColumnCount() { + return columnNames.length; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#getColumnName(int) + */ + public String getColumnName(int col) { + return columnNames[col]; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#getColumnClass(int) + */ + public Class getColumnClass(int c) { + return getValueAt(0, c).getClass(); + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) + */ + public boolean isCellEditable(int row, int col) { + return true; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.DefaultTableModel#setValueAt(java.lang.Object, int, int) + */ + /* + public void setValueAt(Object value, int row, int col) { + dataVector.setElementAt(value, row); + //data[row][col] = value; + fireTableCellUpdated(row, col); + } + */ +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2008-01-15 16:03:15
|
Revision: 17 http://davinspector.svn.sourceforge.net/davinspector/?rev=17&view=rev Author: wuest Date: 2008-01-15 08:03:07 -0800 (Tue, 15 Jan 2008) Log Message: ----------- Added Configuration Added Configuration Dialog Added History Table Added Data Model for History Table Added Class Message, it stores one Message UI rework Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2007-12-21 12:57:47 UTC (rev 16) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2008-01-15 16:03:07 UTC (rev 17) @@ -17,7 +17,14 @@ package de.dlr.DAVInspector; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; +import java.util.Properties; +import java.util.Vector; + /** * TODO: wues_ha: Enter comment! * @@ -25,29 +32,136 @@ * @author Jochen Wuest */ public class Configuration { + /** * */ + private Properties properties; + + /** + * Port number of the server connection. + */ private int serverPort; /** - * + * Port number of the client connection. */ private int clientPort; /** - * + * Address of the server. */ private String serverAddress; /** - * + * Address of the client. */ private String clientAddress; /** + * This list contains all available plugins that let you edit the traffic. + */ + private List<Plugin> availableEditPlugins; + + /** + * This list contains all available plugins that let you view the traffic. + */ + private List<Plugin> availableViewPlugins; + + /** + * This list contains all plugins to view the traffic to the server. + */ + private List<Plugin> activeViewPluginsToServer; + + /** + * This list contains all plugins to view the traffic to the client. + */ + private List<Plugin> activeViewPluginsToClient; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToServer; + + /** + * This list contains all plugins to edit the traffic to the server. + */ + private List<Plugin> activeEditPluginsToClient; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Configuration() { + loadConfiguration(); + + availableEditPlugins = new Vector<Plugin>(); + availableViewPlugins = new Vector<Plugin>(); + // TODO: Load available plugins + + activeViewPluginsToServer = new Vector<Plugin>(); + activeViewPluginsToClient = new Vector<Plugin>(); + activeEditPluginsToServer = new Vector<Plugin>(); + activeEditPluginsToClient = new Vector<Plugin>(); + } + + /** * TODO: wues_ha: Enter comment! * + * @return Vector + */ + public List<Plugin> getAvailableEditPlugins() { + return availableEditPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getAvailableViewPlugins() { + return availableViewPlugins; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToServer() { + return activeViewPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveViewPluginsToClient() { + return activeViewPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToServer() { + return activeEditPluginsToServer; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Vector + */ + public List<Plugin> getActiveEditPluginsToClient() { + return activeEditPluginsToClient; + } + + /** + * TODO: wues_ha: Enter comment! + * * @return String with address of the server */ public String getServerAddress() { @@ -80,4 +194,77 @@ public int getClientPort() { return clientPort; } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void loadConfiguration() { + properties = new Properties(); + try { + properties.load(new FileInputStream(Constants.CONFIGURATION_FILENAME)); + // assign properties to variables + serverAddress = properties.getProperty("ServerAddress", Constants.SERVERADDRESS); + serverPort = Integer.parseInt(properties.getProperty("ServerPort", String.valueOf(Constants.SERVERPORT))); + clientAddress = properties.getProperty("ClientAddress", Constants.CLIENTADDRESS); + clientPort = Integer.parseInt(properties.getProperty("ClientPort", String.valueOf(Constants.CLIENTPORT))); + + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void storeConfiguration() { + // save variables in properties + properties.setProperty("ServerAddress", serverAddress); + properties.setProperty("ServerPort", String.valueOf(serverPort)); + properties.setProperty("ClientAddress", clientAddress); + properties.setProperty("ClientPort", String.valueOf(clientPort)); + + try { + properties.store(new FileOutputStream(Constants.CONFIGURATION_FILENAME), null); + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverAddressC server address + */ + public void setServerAddress(String serverAddressC) { + this.serverAddress = serverAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientAddressC client address + */ + public void setClientAddress(String clientAddressC) { + this.clientAddress = clientAddressC; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param serverPortC server port + */ + public void setServerPort(String serverPortC) { + this.serverPort = Integer.parseInt(serverPortC); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param clientPortC client port + */ + public void setClientPort(String clientPortC) { + this.clientPort = Integer.parseInt(clientPortC); + } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2007-12-21 12:57:47 UTC (rev 16) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2008-01-15 16:03:07 UTC (rev 17) @@ -99,6 +99,12 @@ this.setSize(Constants.CONFIG_DIALOG_SIZE_WIDTH, Constants.CONFIG_DIALOG_SIZE_HEIGHT); this.setTitle(Constants.APPTITLE + " Configuration"); this.setContentPane(this.getJContentPane()); + // Load Configuration from file + Configuration config = new Configuration(); + jTextFieldClientAddress.setText(config.getClientAddress()); + jTextFieldClientPort.setText(String.valueOf(config.getClientPort())); + jTextFieldServerAddress.setText(config.getServerAddress()); + jTextFieldServerPort.setText(String.valueOf(config.getServerPort())); } /** @@ -149,12 +155,36 @@ jButtonCancel.setMnemonic(KeyEvent.VK_C); jButtonCancel.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - // TODO Auto-generated Event stub actionPerformed() - } + closeWindow(); + } + }); } return jButtonCancel; } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void closeWindow() { + this.setVisible(false); + this.dispose(); + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void saveConfiguration() { + Configuration config = new Configuration(); + config.setClientAddress(jTextFieldClientAddress.getText()); + config.setClientPort(jTextFieldClientPort.getText()); + config.setServerAddress(jTextFieldServerAddress.getText()); + config.setServerPort(jTextFieldServerPort.getText()); + config.storeConfiguration(); + // TODO: aktualisierung proxy!! ### + } /** * This method initializes jTextField. @@ -217,10 +247,11 @@ jButtonOk = new JButton(); jButtonOk.setText("Ok"); jButtonOk.setMnemonic(KeyEvent.VK_O); - jButtonOk.addActionListener(new java.awt.event.ActionListener() { + jButtonOk.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - // TODO Auto-generated Event stub actionPerformed() - } + saveConfiguration(); + closeWindow(); + } }); } return jButtonOk; Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-21 12:57:47 UTC (rev 16) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2008-01-15 16:03:07 UTC (rev 17) @@ -110,4 +110,9 @@ * Client port. */ public static final int CLIENTPORT = 8888; + + /** + * Filename of the configuration file. + */ + public static final String CONFIGURATION_FILENAME = "config.xml"; } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-21 12:57:47 UTC (rev 16) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2008-01-15 16:03:07 UTC (rev 17) @@ -19,11 +19,13 @@ import java.awt.BorderLayout; import java.awt.Dimension; -import java.awt.GridLayout; +import java.awt.GridBagLayout; import java.awt.SystemColor; import java.awt.event.KeyEvent; import java.io.IOException; -import java.net.InetAddress; +import java.util.Date; +import java.util.List; +import java.util.Vector; import javax.swing.JButton; import javax.swing.JFrame; @@ -34,6 +36,7 @@ import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTabbedPane; +import javax.swing.JTable; import javax.swing.JTextPane; import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; @@ -52,21 +55,16 @@ /** * */ - private static final double DIVIDER = 0.5; + private static final double DIVIDER_HORZ = 0.5; /** * */ - private int clientPort = Constants.CLIENTPORT; + private static final int DIVIDER_VERT = 450; /** * */ - private int serverPort = Constants.SERVERPORT; - - /** - * - */ private JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="115,38" /** * @@ -79,10 +77,6 @@ /** * */ - private JPanel jPanel = null; - /** - * - */ private JSplitPane jSplitPane = null; /** * @@ -249,6 +243,61 @@ private ConfigurationDialog configDialog = null; /** + * + */ + private PluginConfigurationDialog pluginConfigDialog = null; + + /** + * + */ + private JSplitPane jSplitPane1 = null; + + /** + * + */ + private JPanel jPanel = null; + + /** + * + */ + private JPanel jPanel1 = null; + + /** + * + */ + private JPanel jPanel2 = null; + + /** + * + */ + private JTable jTable = null; + + /** + * + */ + private JScrollPane jScrollPane = null; + + /** + * + */ + private JButton jButton = null; + + /** + * + */ + private JButton jButton1 = null; + + /** + * + */ + private List<Message> messages = null; + + /** + * + */ + private HistoryTableModel myTableModel; + + /** * TODO: wues_ha: enter comment! * */ @@ -269,12 +318,9 @@ jFrame.setVisible(true); try { - // TODO: port and address check, load from config - InetAddress serverAddress = InetAddress.getByName(Constants.SERVERADDRESS); - InetAddress clientAddress = InetAddress.getByName(Constants.CLIENTADDRESS); - - pr = new Proxy(clientAddress, clientPort, serverAddress, serverPort, - System.out, System.err, this, guiLock); + Configuration config = new Configuration(); + messages = new Vector<Message>(); + pr = new Proxy(config, System.out, System.err, this, guiLock); } catch (IOException ioe) { System.err.println(ioe); } @@ -286,14 +332,14 @@ * @param data String data * @param toClient Boolean whether this is a client or server connection */ - public void neu(String data, boolean toClient) { + public void neu(String data, boolean toClient) { if (!toClient) { jTextPaneServerRaw.setText(jTextPaneServerRaw.getText() + data); } else { jTextPaneClientRaw.setText(jTextPaneClientRaw.getText() + data); } } - + /** * This method initializes jFrame. * @@ -331,12 +377,12 @@ jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); jContentPane.setPreferredSize(new Dimension(Constants.GUI_SIZE_WIDTH, Constants.GUI_SIZE_HEIGHT)); - jContentPane.add(getJPanel(), BorderLayout.SOUTH); - jContentPane.add(getJSplitPane(), BorderLayout.CENTER); + jContentPane.add(getJSplitPane1(), BorderLayout.CENTER); + jContentPane.add(getJPanel1(), BorderLayout.NORTH); jContentPane.addComponentListener(new java.awt.event.ComponentAdapter() { public void componentResized(java.awt.event.ComponentEvent e) { //resize - jSplitPane.setDividerLocation(DIVIDER); + jSplitPane.setDividerLocation(DIVIDER_HORZ); } }); } @@ -344,25 +390,6 @@ } /** - * This method initializes jPanel. - * - * @return javax.swing.JPanel - */ - private JPanel getJPanel() { - if (jPanel == null) { - GridLayout gridLayout = new GridLayout(); - gridLayout.setColumns(4); - gridLayout.setRows(1); - jPanel = new JPanel(); - jPanel.setLayout(gridLayout); - jPanel.setName("toolPanel"); - jPanel.add(getJButtonSendToServer(), null); - jPanel.add(getJButtonSendToClient(), null); - } - return jPanel; - } - - /** * This method initializes jSplitPane. * * @return javax.swing.JSplitPane @@ -372,7 +399,7 @@ jSplitPane = new JSplitPane(); jSplitPane.setLeftComponent(getJTabbedPaneClient()); jSplitPane.setRightComponent(getJTabbedPaneServer()); - jSplitPane.setDividerLocation(DIVIDER); + jSplitPane.setDividerLocation(DIVIDER_HORZ); } return jSplitPane; } @@ -388,6 +415,7 @@ jBtnSendToServer.setText("Send to Server"); jBtnSendToServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { + updateMessages(jTextPaneClientRaw.getText(), true); pr.writeToServer(jTextPaneClientRaw.getText()); jTextPaneClientRaw.setText(""); } @@ -512,6 +540,25 @@ } return jMenu1; } + + /** + * TODO: wues_ha: Enter comment! + * + * @param data Data + * @param cTS Boolean Client to Server + */ + private void updateMessages(String data, Boolean cTS) { + // store Message + Message msg = new Message(); + msg.setClientToSever(cTS); + msg.setData(data); + msg.setTimestamp(new Date()); + messages.add(msg); + // update history table + myTableModel.insertRow(myTableModel.getRowCount(), + new Object[]{msg.getId(), msg.getClientToSever(), msg.getTimestamp(), msg.getSize()}); + myTableModel.fireTableDataChanged(); + } /** * This method initializes jMenuItem1. @@ -544,6 +591,7 @@ jBtnSendToClient.setText("Send to Client"); jBtnSendToClient.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { + updateMessages(jTextPaneServerRaw.getText(), false); pr.writeToClient(jTextPaneServerRaw.getText()); jTextPaneServerRaw.setText(""); } @@ -881,7 +929,7 @@ jMenu2.add(getJMenuItem5()); jMenu2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - // TODO Display Help + // TODO: Display Help } }); } @@ -1009,11 +1057,136 @@ if (jMenuItem6 == null) { jMenuItem6 = new JMenuItem(); jMenuItem6.setText("Config"); + jMenuItem6.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + if (pluginConfigDialog == null) { + pluginConfigDialog = new PluginConfigurationDialog(jFrame); + } + pluginConfigDialog.setVisible(true); + } + }); } return jMenuItem6; } /** + * This method initializes jSplitPane1. + * + * @return javax.swing.JSplitPane + */ + private JSplitPane getJSplitPane1() { + if (jSplitPane1 == null) { + jSplitPane1 = new JSplitPane(); + jSplitPane1.setOrientation(JSplitPane.VERTICAL_SPLIT); + jSplitPane1.setDividerLocation(DIVIDER_VERT); + jSplitPane1.setBottomComponent(getJPanel()); + jSplitPane1.setTopComponent(getJSplitPane()); + } + return jSplitPane1; + } + + /** + * This method initializes jPanel. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel() { + if (jPanel == null) { + jPanel = new JPanel(); + jPanel.setLayout(new BorderLayout()); + jPanel.add(getJScrollPane(), BorderLayout.CENTER); + } + return jPanel; + } + + /** + * This method initializes jPanel1. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel1() { + if (jPanel1 == null) { + jPanel1 = new JPanel(); + jPanel1.setLayout(new BorderLayout()); + jPanel1.add(getJButtonSendToServer(), BorderLayout.WEST); + jPanel1.add(getJPanel2(), BorderLayout.CENTER); + jPanel1.add(getJButtonSendToClient(), BorderLayout.EAST); + } + return jPanel1; + } + + /** + * This method initializes jPanel2. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel2() { + if (jPanel2 == null) { + jPanel2 = new JPanel(); + jPanel2.setLayout(new GridBagLayout()); + jPanel2.add(getJButton()); + jPanel2.add(getJButton1()); + } + return jPanel2; + } + + /** + * This method initializes jTable. + * + * @return javax.swing.JTable + */ + private JTable getJTable() { + + if (jTable == null) { + myTableModel = new HistoryTableModel(); + + jTable = new JTable(myTableModel); + jTable.setShowGrid(true); + jTable.setAutoCreateRowSorter(true); + } + return jTable; + } + + /** + * This method initializes jScrollPane. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane() { + if (jScrollPane == null) { + jScrollPane = new JScrollPane(); + jScrollPane.setViewportView(getJTable()); + } + return jScrollPane; + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButton() { + if (jButton == null) { + jButton = new JButton(); + jButton.setText("Start"); + } + return jButton; + } + + /** + * This method initializes jButton1. + * + * @return javax.swing.JButton + */ + private JButton getJButton1() { + if (jButton1 == null) { + jButton1 = new JButton(); + jButton1.setText("Stopp"); + } + return jButton1; + } + + /** * TODO: wues_ha: Enter comment! * * @param argv String[] arguments Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/HistoryTableModel.java 2008-01-15 16:03:07 UTC (rev 17) @@ -0,0 +1,82 @@ +/* + * HistoryTableModel.java + * + * TODO: wues_ha Enter comment! + * + * Created: 15.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import javax.swing.table.DefaultTableModel ; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class HistoryTableModel extends DefaultTableModel { + + /** + * + */ + private static final long serialVersionUID = 0L; + + /** + * + */ + private String[] columnNames = { + "ID", + "CTS", + "Timestamp", + "Size" + }; + + /** + * {@inheritDoc} + * + * @see javax.swing.table.TableModel#getColumnCount() + */ + @Override + public int getColumnCount() { + return columnNames.length; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#getColumnName(int) + */ + public String getColumnName(int col) { + return columnNames[col]; + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#getColumnClass(int) + */ + public Class getColumnClass(int c) { + return getValueAt(0, c).getClass(); + } + + /** + * {@inheritDoc} + * + * @see javax.swing.table.AbstractTableModel#isCellEditable(int, int) + */ + public boolean isCellEditable(int row, int col) { + return false; + } +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Message.java 2008-01-15 16:03:07 UTC (rev 17) @@ -0,0 +1,141 @@ +/* + * Message.java + * + * TODO: wues_ha Enter comment! + * + * Created: 15.01.2008 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2008 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.util.Date; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Message { + /** + * + */ + private static int idCount; + + /** + * + */ + private int id; + + /** + * + */ + private Date timestamp; + + /** + * + */ + private Boolean clientToSever; + + /** + * + */ + private String data; + + /** + * + */ + private int size; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Message() { + ++idCount; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return id + */ + public int getId() { + return id; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return timestamp + */ + public Date getTimestamp() { + return timestamp; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param ts Date/Timestamp + */ + public void setTimestamp(Date ts) { + this.timestamp = ts; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return clientToServer + */ + public Boolean getClientToSever() { + return clientToSever; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param cTS Boolean + */ + public void setClientToSever(Boolean cTS) { + this.clientToSever = cTS; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return data + */ + public String getData() { + return data; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param msg String + */ + public void setData(String msg) { + this.data = msg; + this.size = msg.length(); + this.id = idCount; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return size + */ + public int getSize() { + return size; + } +} Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2007-12-21 12:57:47 UTC (rev 16) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2008-01-15 16:03:07 UTC (rev 17) @@ -97,27 +97,33 @@ /** * TODO: wues_ha: enter comment! * - * @param sourceAddress Source Address - * @param sourcePort Source Port - * @param destinationAddress Destination Address - * @param destinationPort Destination Port + * param sourceAddress Source Address + * param sourcePort Source Port + * param destinationAddress Destination Address + * param destinationPort Destination Port + * @param config Configuration * @param outStream Out Printstream * @param errStream Error Printstream * @param guiRef Reference to gui * @param guiLockRef Lock object for gui * @throws IOException if something goes not as planned */ - public Proxy(InetAddress sourceAddress, int sourcePort, InetAddress destinationAddress, int destinationPort, - PrintStream outStream, PrintStream errStream, Gui guiRef, Object guiLockRef) throws IOException { + public Proxy(Configuration config, PrintStream outStream, + PrintStream errStream, Gui guiRef, Object guiLockRef) throws IOException { + // InetAddress sourceAddress, int sourcePort, InetAddress destinationAddress, int destinationPort, + + InetAddress serverAddress = InetAddress.getByName(config.getClientAddress()); + InetAddress clientAddress = InetAddress.getByName(config.getServerAddress()); + this.out = outStream; this.err = errStream; - if (sourceAddress == null) { - this.srvSock = new ServerSocket(sourcePort, Constants.BACKLOG); + if (clientAddress == null) { + this.srvSock = new ServerSocket(config.getClientPort(), Constants.BACKLOG); } else { - this.srvSock = new ServerSocket(sourcePort, Constants.BACKLOG, sourceAddress); + this.srvSock = new ServerSocket(config.getClientPort(), Constants.BACKLOG, clientAddress); } - this.dstAddr = destinationAddress; - this.dstPort = destinationPort; + this.dstAddr = serverAddress; + this.dstPort = config.getServerPort(); this.gui = guiRef; this.guiLock = guiLockRef; start(); @@ -213,7 +219,7 @@ String chunkLength = Constants.LFCR + Integer.toHexString(lines[i].length()) + Constants.LFCR; // if the content of the chunk is empty, it is assumed that this is the last chunk. - // the last chunk ist indicated by a length of 0 followed by an empty line. + // the last chunk is indicated by a length of 0 followed by an empty line. if (buffer.trim().isEmpty()) { buffer = Constants.LFCR; chunkLength = Constants.LFCR + "0" + Constants.LFCR; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-21 12:57:49
|
Revision: 16 http://davinspector.svn.sourceforge.net/davinspector/?rev=16&view=rev Author: wuest Date: 2007-12-21 04:57:47 -0800 (Fri, 21 Dec 2007) Log Message: ----------- Christmas Checkin :) Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-21 12:48:04 UTC (rev 15) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-21 12:57:47 UTC (rev 16) @@ -73,7 +73,7 @@ /** * Size of the receive buffer. */ - public static final int RECVBUFFERSIZE = 1024; + public static final int RECVBUFFERSIZE = 64; /** * Backlog parameter used when creating the ServerSocket. @@ -93,12 +93,12 @@ /** * Address of the Server. IP address or domain name. */ - public static final String SERVERADDRESS = "bsasdf01.as.bs.dlr.de"; + public static final String SERVERADDRESS = "localhost"; //"bsasdf01.as.bs.dlr.de"; /** * Server port. */ - public static final int SERVERPORT = 80; + public static final int SERVERPORT = 8080; /** * Address of the Client. Normally this is empty and Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-21 12:48:04 UTC (rev 15) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-21 12:57:47 UTC (rev 16) @@ -229,6 +229,26 @@ private JTextPane jTextPaneServerRaw = null; /** + * + */ + private JMenuItem jMenuItem5 = null; + + /** + * + */ + private JMenu jMenu3 = null; + + /** + * + */ + private JMenuItem jMenuItem6 = null; + + /** + * + */ + private ConfigurationDialog configDialog = null; + + /** * TODO: wues_ha: enter comment! * */ @@ -249,7 +269,7 @@ jFrame.setVisible(true); try { - // TODO: port and address check + // TODO: port and address check, load from config InetAddress serverAddress = InetAddress.getByName(Constants.SERVERADDRESS); InetAddress clientAddress = InetAddress.getByName(Constants.CLIENTADDRESS); @@ -436,6 +456,7 @@ jJMenuBar.add(getJMenu()); jJMenuBar.add(getJMenu1()); jJMenuBar.add(getJMenu2()); + jJMenuBar.add(getJMenu3()); } return jJMenuBar; } @@ -609,15 +630,17 @@ * @param raw String raw input */ public void setRawInputClient(String raw) { - if (raw.contains("<?xml version")) { - String[] s = raw.split("<\\?xml version="); - clientBody = "<?xml version=" + s[1]; - clientHeader = s[0]; + clientBody = getBody(raw); + clientHeader = getHeader(raw); + /* + if (containsBody(raw)) { + clientBody = getBody(raw); + clientHeader = getHeader(raw); } else { clientBody = ""; clientHeader = raw; } - + */ } /** @@ -626,18 +649,56 @@ * @param raw String raw input */ public void setRawInputServer(String raw) { - if (raw.contains("<?xml version")) { - String[] s = raw.split("<\\?xml version="); - serverBody = "<?xml version=" + s[1]; - serverHeader = s[0]; - } else { - serverBody = ""; - serverHeader = raw; + serverBody = getBody(raw); + serverHeader = getHeader(raw); + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param input String containig http packet + * @return String with body + */ + private String getBody(String input) { + String result = ""; + + // HTTP/1.1 HTTP/1.0 HTTP/0.9 + // TODO: split input into different HTTP messages + //String[] httpMessages = input.split("HTTP/[1.1|1.0|0.9]{1}"); + + // TODO: nur die erste Nachricht wird angezeigt + //input = httpMessages[0]; + + String[] s = input.split("\r\n\r\n"); + for (int i = 1; i < s.length; i++) { + result = s[i]; } + + + // detect and process chunked data + // split the input in the different chunks. + // each chunk starts with the length of the chunk in hex. + String[] lines = result.split("(\r\n[0-9a-fA-F]+\r\n)"); + result = ""; + for (int i = 0; i < lines.length; i++) { + result += lines[i]; + } + return result; } - + /** + * TODO: wues_ha: Enter comment! + * + * @param input String containing http packet + * @return String with headers + */ + private String getHeader(String input) { + String[] s = input.split("\r\n\r\n"); + return s[0]; + } + + /** * This method initializes jTextPane. * * @return javax.swing.JTextPane @@ -817,6 +878,7 @@ jMenu2 = new JMenu(); jMenu2.setText("Help"); jMenu2.setMnemonic(KeyEvent.VK_HELP); + jMenu2.add(getJMenuItem5()); jMenu2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { // TODO Display Help @@ -836,9 +898,11 @@ jMenuItem4 = new JMenuItem(); jMenuItem4.setText("Configuration"); jMenuItem4.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - Configuration configGui = new Configuration(jFrame); - configGui.setVisible(true); + public void actionPerformed(java.awt.event.ActionEvent e) { + if (configDialog == null) { + configDialog = new ConfigurationDialog(jFrame); + } + configDialog.setVisible(true); } }); } @@ -910,6 +974,46 @@ } /** + * This method initializes jMenuItem5. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem5() { + if (jMenuItem5 == null) { + jMenuItem5 = new JMenuItem(); + jMenuItem5.setText("About"); + } + return jMenuItem5; + } + + /** + * This method initializes jMenu3. + * + * @return javax.swing.JMenu + */ + private JMenu getJMenu3() { + if (jMenu3 == null) { + jMenu3 = new JMenu(); + jMenu3.setText("Plugins"); + jMenu3.add(getJMenuItem6()); + } + return jMenu3; + } + + /** + * This method initializes jMenuItem6. + * + * @return javax.swing.JMenuItem. + */ + private JMenuItem getJMenuItem6() { + if (jMenuItem6 == null) { + jMenuItem6 = new JMenuItem(); + jMenuItem6.setText("Config"); + } + return jMenuItem6; + } + + /** * TODO: wues_ha: Enter comment! * * @param argv String[] arguments This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-21 12:48:09
|
Revision: 15 http://davinspector.svn.sourceforge.net/davinspector/?rev=15&view=rev Author: wuest Date: 2007-12-21 04:48:04 -0800 (Fri, 21 Dec 2007) Log Message: ----------- First Commit Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2007-12-21 12:48:04 UTC (rev 15) @@ -0,0 +1,83 @@ +/* + * Configuration.java + * + * This Class stores the configuration of the DAVInspector. + * + * Created: 21.12.2007 Jochen Wuest + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Configuration { + /** + * + */ + private int serverPort; + + /** + * + */ + private int clientPort; + + /** + * + */ + private String serverAddress; + + /** + * + */ + private String clientAddress; + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getServerAddress() { + return serverAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getServerPort() { + return serverPort; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String with address of the server + */ + public String getClientAddress() { + return clientAddress; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return Integer Server port + */ + public int getClientPort() { + return clientPort; + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-21 12:47:03
|
Revision: 14 http://davinspector.svn.sourceforge.net/davinspector/?rev=14&view=rev Author: wuest Date: 2007-12-21 04:47:00 -0800 (Fri, 21 Dec 2007) Log Message: ----------- test Removed Paths: ------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java Deleted: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2007-12-21 12:45:13 UTC (rev 13) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2007-12-21 12:47:00 UTC (rev 14) @@ -1,220 +0,0 @@ -/* - * Configuration.java - * - * TODO: wues_ha Enter comment! - * - * Created: 19.12.2007 wues_ha <email> - * Changed: - * - * $Id$ - * - * Copyright (C) 2007-2007 DLR SC, Germany - * - * All rights reserved - * - * http://www.dlr.de/ - */ - -package de.dlr.DAVInspector; - -import java.awt.Frame; -import java.awt.GridLayout; -import java.awt.event.KeyEvent; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; -import javax.swing.JPanel; -import javax.swing.JTextField; -import javax.swing.SwingConstants; - -/** - * TODO: wues_ha: Enter comment! - * - * @version $LastChangedRevision$ - * @author Jochen Wuest - */ -public class Configuration extends JDialog { - - /** - * - */ - private static final long serialVersionUID = 1L; - /** - * - */ - private JPanel jContentPane = null; - /** - * - */ - private JLabel jLabelServerPort = null; - /** - * - */ - private JLabel jLabelClientAddress = null; - /** - * - */ - private JLabel jLabelClientPort = null; - /** - * - */ - private JLabel jLabelServerAddress = null; - /** - * - */ - private JButton jButtonCancel = null; - /** - * - */ - private JTextField jTextFieldClientPort = null; - /** - * - */ - private JTextField jTextFieldServerPort = null; - /** - * - */ - private JTextField jTextFieldServerAddress = null; - /** - * - */ - private JTextField jTextFieldClientAddress = null; - /** - * - */ - private JButton jButtonOk = null; - /** - * @param owner Owner of the Dialog. - */ - public Configuration(Frame owner) { - super(owner); - initialize(); - } - - /** - * This method initializes this. - */ - private void initialize() { - this.setSize(Constants.CONFIG_DIALOG_SIZE_WIDTH, Constants.CONFIG_DIALOG_SIZE_HEIGHT); - this.setContentPane(this.getJContentPane()); - } - - /** - * This method initializes jContentPane. - * - * @return javax.swing.JPanel - */ - private JPanel getJContentPane() { - if (jContentPane == null) { - jLabelServerAddress = new JLabel(); - jLabelServerAddress.setText("Server Address:"); - jLabelServerAddress.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelClientPort = new JLabel(); - jLabelClientPort.setText("Client Port:"); - jLabelClientPort.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelClientAddress = new JLabel(); - jLabelClientAddress.setText("Client Address:"); - jLabelClientAddress.setHorizontalAlignment(SwingConstants.RIGHT); - jLabelServerPort = new JLabel(); - jLabelServerPort.setText("Server Port:"); - jLabelServerPort.setHorizontalAlignment(SwingConstants.RIGHT); - GridLayout gridLayout = new GridLayout(5, 2, 10, 10); - jContentPane = new JPanel(); - jContentPane.setLayout(gridLayout); - jContentPane.add(jLabelClientAddress, null); - jContentPane.add(getJTextFieldClientAddress(), null); - jContentPane.add(jLabelClientPort, null); - jContentPane.add(getJTextFieldClientPort(), null); - jContentPane.add(jLabelServerAddress, null); - jContentPane.add(getJTextFieldServerAddress(), null); - jContentPane.add(jLabelServerPort, null); - jContentPane.add(getJTextFieldServerPort(), null); - jContentPane.add(getJButtonCancel(), null); - jContentPane.add(getJButtonOk(), null); - } - return jContentPane; - } - - /** - * This method initializes jButton. - * - * @return javax.swing.JButton - */ - private JButton getJButtonCancel() { - if (jButtonCancel == null) { - jButtonCancel = new JButton(); - jButtonCancel.setText("Cancel"); - jButtonCancel.setMnemonic(KeyEvent.VK_C); - jButtonCancel.addActionListener(new java.awt.event.ActionListener() { - public void actionPerformed(java.awt.event.ActionEvent e) { - // TODO: cancel action - } - }); - } - return jButtonCancel; - } - - /** - * This method initializes jTextField. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldClientPort() { - if (jTextFieldClientPort == null) { - jTextFieldClientPort = new JTextField(); - } - return jTextFieldClientPort; - } - - /** - * This method initializes jTextField1. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldServerPort() { - if (jTextFieldServerPort == null) { - jTextFieldServerPort = new JTextField(); - } - return jTextFieldServerPort; - } - - /** - * This method initializes jTextField2. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldServerAddress() { - if (jTextFieldServerAddress == null) { - jTextFieldServerAddress = new JTextField(); - } - return jTextFieldServerAddress; - } - - /** - * This method initializes jTextField3. - * - * @return javax.swing.JTextField - */ - private JTextField getJTextFieldClientAddress() { - if (jTextFieldClientAddress == null) { - jTextFieldClientAddress = new JTextField(); - } - return jTextFieldClientAddress; - } - - /** - * This method initializes jButton1. - * - * @return javax.swing.JButton - */ - private JButton getJButtonOk() { - if (jButtonOk == null) { - jButtonOk = new JButton(); - jButtonOk.setText("Ok"); - jButtonOk.setMnemonic(KeyEvent.VK_O); - } - return jButtonOk; - } - -} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-21 12:45:21
|
Revision: 13 http://davinspector.svn.sourceforge.net/davinspector/?rev=13&view=rev Author: wuest Date: 2007-12-21 04:45:13 -0800 (Fri, 21 Dec 2007) Log Message: ----------- First Commit Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java Copied: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java (from rev 12, branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java) =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ConfigurationDialog.java 2007-12-21 12:45:13 UTC (rev 13) @@ -0,0 +1,229 @@ +/* + * Configuration.java + * + * TODO: wues_ha Enter comment! + * + * Created: 19.12.2007 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.Frame; +import java.awt.GridLayout; +import java.awt.event.KeyEvent; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.SwingConstants; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class ConfigurationDialog extends JDialog { + + /** + * + */ + private static final long serialVersionUID = 1L; + /** + * + */ + private JPanel jContentPane = null; + /** + * + */ + private JLabel jLabelServerPort = null; + /** + * + */ + private JLabel jLabelClientAddress = null; + /** + * + */ + private JLabel jLabelClientPort = null; + /** + * + */ + private JLabel jLabelServerAddress = null; + /** + * + */ + private JButton jButtonCancel = null; + /** + * + */ + private JTextField jTextFieldClientPort = null; + /** + * + */ + private JTextField jTextFieldServerPort = null; + /** + * + */ + private JTextField jTextFieldServerAddress = null; + /** + * + */ + private JTextField jTextFieldClientAddress = null; + /** + * + */ + private JButton jButtonOk = null; + /** + * @param owner Owner of the Dialog. + */ + public ConfigurationDialog(Frame owner) { + super(owner); + initialize(); + } + + /** + * This method initializes this. + */ + private void initialize() { + this.setSize(Constants.CONFIG_DIALOG_SIZE_WIDTH, Constants.CONFIG_DIALOG_SIZE_HEIGHT); + this.setTitle(Constants.APPTITLE + " Configuration"); + this.setContentPane(this.getJContentPane()); + } + + /** + * This method initializes jContentPane. + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jLabelServerAddress = new JLabel(); + jLabelServerAddress.setText("Server Address:"); + jLabelServerAddress.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelClientPort = new JLabel(); + jLabelClientPort.setText("Client Port:"); + jLabelClientPort.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelClientAddress = new JLabel(); + jLabelClientAddress.setText("Client Address:"); + jLabelClientAddress.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelServerPort = new JLabel(); + jLabelServerPort.setText("Server Port:"); + jLabelServerPort.setHorizontalAlignment(SwingConstants.RIGHT); + GridLayout gridLayout = new GridLayout(5, 2, 10, 10); + jContentPane = new JPanel(); + jContentPane.setLayout(gridLayout); + jContentPane.add(jLabelClientAddress, null); + jContentPane.add(getJTextFieldClientAddress(), null); + jContentPane.add(jLabelClientPort, null); + jContentPane.add(getJTextFieldClientPort(), null); + jContentPane.add(jLabelServerAddress, null); + jContentPane.add(getJTextFieldServerAddress(), null); + jContentPane.add(jLabelServerPort, null); + jContentPane.add(getJTextFieldServerPort(), null); + jContentPane.add(getJButtonCancel(), null); + jContentPane.add(getJButtonOk(), null); + } + return jContentPane; + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButtonCancel() { + if (jButtonCancel == null) { + jButtonCancel = new JButton(); + jButtonCancel.setText("Cancel"); + jButtonCancel.setMnemonic(KeyEvent.VK_C); + jButtonCancel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + // TODO Auto-generated Event stub actionPerformed() + } + }); + } + return jButtonCancel; + } + + /** + * This method initializes jTextField. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldClientPort() { + if (jTextFieldClientPort == null) { + jTextFieldClientPort = new JTextField(); + jTextFieldClientPort.setText("8888"); + } + return jTextFieldClientPort; + } + + /** + * This method initializes jTextField1. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldServerPort() { + if (jTextFieldServerPort == null) { + jTextFieldServerPort = new JTextField(); + jTextFieldServerPort.setText("8080"); + } + return jTextFieldServerPort; + } + + /** + * This method initializes jTextField2. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldServerAddress() { + if (jTextFieldServerAddress == null) { + jTextFieldServerAddress = new JTextField(); + jTextFieldServerAddress.setText("localhost"); + } + return jTextFieldServerAddress; + } + + /** + * This method initializes jTextField3. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldClientAddress() { + if (jTextFieldClientAddress == null) { + jTextFieldClientAddress = new JTextField(); + } + return jTextFieldClientAddress; + } + + /** + * This method initializes jButton1. + * + * @return javax.swing.JButton + */ + private JButton getJButtonOk() { + if (jButtonOk == null) { + jButtonOk = new JButton(); + jButtonOk.setText("Ok"); + jButtonOk.setMnemonic(KeyEvent.VK_O); + jButtonOk.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + // TODO Auto-generated Event stub actionPerformed() + } + }); + } + return jButtonOk; + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-19 16:24:30
|
Revision: 12 http://davinspector.svn.sourceforge.net/davinspector/?rev=12&view=rev Author: wuest Date: 2007-12-19 08:24:23 -0800 (Wed, 19 Dec 2007) Log Message: ----------- Added Configuration Dialog. XMLTextPane now with Highlighting and word wrap disabled. Added all views on the server side (raw, header, XML, XML-tree). If the body of a message is empty the XML tree is empty now, too. Added methods "expandAll" and collapseAll to XMLTreeView. GUI class is now tidy. Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java Added Paths: ----------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Configuration.java 2007-12-19 16:24:23 UTC (rev 12) @@ -0,0 +1,220 @@ +/* + * Configuration.java + * + * TODO: wues_ha Enter comment! + * + * Created: 19.12.2007 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.Frame; +import java.awt.GridLayout; +import java.awt.event.KeyEvent; + +import javax.swing.JButton; +import javax.swing.JDialog; +import javax.swing.JLabel; +import javax.swing.JPanel; +import javax.swing.JTextField; +import javax.swing.SwingConstants; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Configuration extends JDialog { + + /** + * + */ + private static final long serialVersionUID = 1L; + /** + * + */ + private JPanel jContentPane = null; + /** + * + */ + private JLabel jLabelServerPort = null; + /** + * + */ + private JLabel jLabelClientAddress = null; + /** + * + */ + private JLabel jLabelClientPort = null; + /** + * + */ + private JLabel jLabelServerAddress = null; + /** + * + */ + private JButton jButtonCancel = null; + /** + * + */ + private JTextField jTextFieldClientPort = null; + /** + * + */ + private JTextField jTextFieldServerPort = null; + /** + * + */ + private JTextField jTextFieldServerAddress = null; + /** + * + */ + private JTextField jTextFieldClientAddress = null; + /** + * + */ + private JButton jButtonOk = null; + /** + * @param owner Owner of the Dialog. + */ + public Configuration(Frame owner) { + super(owner); + initialize(); + } + + /** + * This method initializes this. + */ + private void initialize() { + this.setSize(Constants.CONFIG_DIALOG_SIZE_WIDTH, Constants.CONFIG_DIALOG_SIZE_HEIGHT); + this.setContentPane(this.getJContentPane()); + } + + /** + * This method initializes jContentPane. + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jLabelServerAddress = new JLabel(); + jLabelServerAddress.setText("Server Address:"); + jLabelServerAddress.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelClientPort = new JLabel(); + jLabelClientPort.setText("Client Port:"); + jLabelClientPort.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelClientAddress = new JLabel(); + jLabelClientAddress.setText("Client Address:"); + jLabelClientAddress.setHorizontalAlignment(SwingConstants.RIGHT); + jLabelServerPort = new JLabel(); + jLabelServerPort.setText("Server Port:"); + jLabelServerPort.setHorizontalAlignment(SwingConstants.RIGHT); + GridLayout gridLayout = new GridLayout(5, 2, 10, 10); + jContentPane = new JPanel(); + jContentPane.setLayout(gridLayout); + jContentPane.add(jLabelClientAddress, null); + jContentPane.add(getJTextFieldClientAddress(), null); + jContentPane.add(jLabelClientPort, null); + jContentPane.add(getJTextFieldClientPort(), null); + jContentPane.add(jLabelServerAddress, null); + jContentPane.add(getJTextFieldServerAddress(), null); + jContentPane.add(jLabelServerPort, null); + jContentPane.add(getJTextFieldServerPort(), null); + jContentPane.add(getJButtonCancel(), null); + jContentPane.add(getJButtonOk(), null); + } + return jContentPane; + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButtonCancel() { + if (jButtonCancel == null) { + jButtonCancel = new JButton(); + jButtonCancel.setText("Cancel"); + jButtonCancel.setMnemonic(KeyEvent.VK_C); + jButtonCancel.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + // TODO: cancel action + } + }); + } + return jButtonCancel; + } + + /** + * This method initializes jTextField. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldClientPort() { + if (jTextFieldClientPort == null) { + jTextFieldClientPort = new JTextField(); + } + return jTextFieldClientPort; + } + + /** + * This method initializes jTextField1. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldServerPort() { + if (jTextFieldServerPort == null) { + jTextFieldServerPort = new JTextField(); + } + return jTextFieldServerPort; + } + + /** + * This method initializes jTextField2. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldServerAddress() { + if (jTextFieldServerAddress == null) { + jTextFieldServerAddress = new JTextField(); + } + return jTextFieldServerAddress; + } + + /** + * This method initializes jTextField3. + * + * @return javax.swing.JTextField + */ + private JTextField getJTextFieldClientAddress() { + if (jTextFieldClientAddress == null) { + jTextFieldClientAddress = new JTextField(); + } + return jTextFieldClientAddress; + } + + /** + * This method initializes jButton1. + * + * @return javax.swing.JButton + */ + private JButton getJButtonOk() { + if (jButtonOk == null) { + jButtonOk = new JButton(); + jButtonOk.setText("Ok"); + jButtonOk.setMnemonic(KeyEvent.VK_O); + } + return jButtonOk; + } + +} Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-19 16:24:23 UTC (rev 12) @@ -26,16 +26,26 @@ public final class Constants { /** - * GUI-Width. + * GUI Width. */ - public static final int GUI_SIZE_X = 800; + public static final int GUI_SIZE_WIDTH = 800; /** - * GUI-Height. + * GUI Height. */ - public static final int GUI_SIZE_Y = 600; + public static final int GUI_SIZE_HEIGHT = 600; /** + * Configuration Dialog Width. + */ + public static final int CONFIG_DIALOG_SIZE_WIDTH = 300; + + /** + * Configuration Dialog Height. + */ + public static final int CONFIG_DIALOG_SIZE_HEIGHT = 200; + + /** * Line Feed + Carriage Return. */ public static final String LFCR = "\r\n"; @@ -81,11 +91,22 @@ public static final String APPTITLE = "Proxy - DAVInspector Prototype 1"; /** + * Address of the Server. IP address or domain name. + */ + public static final String SERVERADDRESS = "bsasdf01.as.bs.dlr.de"; + + /** * Server port. */ - public static final int SERVERPORT = 8080; - + public static final int SERVERPORT = 80; + /** + * Address of the Client. Normally this is empty and + * the address of the client is of no importance. + */ + public static final String CLIENTADDRESS = ""; + + /** * Client port. */ public static final int CLIENTPORT = 8888; Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-19 16:24:23 UTC (rev 12) @@ -42,6 +42,7 @@ /** * TODO: wues_ha: Enter comment! + * TODO: aktualisierung auf server und clientseite verbessern. * * @version $LastChangedRevision$ * @author Jochen Wuest @@ -86,18 +87,10 @@ /** * */ - private JButton jButton = null; + private JButton jBtnSendToServer = null; /** * */ - private JScrollPane jScrollPane1 = null; - /** - * - */ - private JTextPane jTextPane1 = null; - /** - * - */ private JMenuBar jJMenuBar = null; /** * @@ -118,7 +111,7 @@ /** * */ - private JButton jButton1 = null; + private JButton jBtnSendToClient = null; /** * */ @@ -134,51 +127,108 @@ /** * */ - private JTextPane jTextPane = null; + private JTextPane jTextPaneClientRaw = null; /** * */ - private XMLTextPane xTextPane = null; + private XMLTextPane xTextPaneClient = null; /** * */ - private XMLTreeView xTreeView = null; + private XMLTreeView xTreeViewClient = null; + /** + * + */ + private XMLTextPane xTextPaneServer = null; + /** + * + */ + private XMLTreeView xTreeViewServer = null; /** * */ - private String header = ""; // @jve:decl-index=0: + private String clientHeader = ""; // @jve:decl-index=0: /** * */ - private String body = ""; // @jve:decl-index=0: + private String clientBody = ""; // @jve:decl-index=0: + /** + * + */ + private String serverHeader = ""; // @jve:decl-index=0: + /** + * + */ + private String serverBody = ""; // @jve:decl-index=0: /** * */ - private JTextPane jTextPane3 = null; + private JTextPane jTextPaneClientHeader = null; /** * */ - private JTabbedPane jTabbedPane1 = null; + private JTextPane jTextPaneServerHeader = null; /** * */ - private JScrollPane jScrollPane = null; + private JTabbedPane jTabbedPaneClient = null; /** * */ - private JScrollPane jScrollPane2 = null; + private JScrollPane jScrollPaneClientRaw = null; /** * */ - private JScrollPane jScrollPane3 = null; + private JScrollPane jScrollPaneClientHeader = null; /** * */ - private JScrollPane jScrollPane4 = null; + private JScrollPane jScrollPaneServerHeader = null; + /** + * + */ + private JScrollPane jScrollPaneClientXML = null; + /** + * + */ + private JScrollPane jScrollPaneClientXMLTree = null; + /** + * + */ + private JScrollPane jScrollPaneServerXML = null; + /** + * + */ + private JScrollPane jScrollPaneServerXMLTree = null; /** + * + */ + private JMenu jMenu2 = null; + + /** + * + */ + private JMenuItem jMenuItem4 = null; + + /** + * + */ + private JTabbedPane jTabbedPaneServer = null; + + /** + * + */ + private JScrollPane getJScrollPaneServerRaw = null; + + /** + * + */ + private JTextPane jTextPaneServerRaw = null; + + /** * TODO: wues_ha: enter comment! * */ @@ -197,8 +247,13 @@ jFrame = getJFrame(); jFrame.pack(); jFrame.setVisible(true); + try { - pr = new Proxy(null, clientPort, InetAddress.getByName("localhost"), serverPort, + // TODO: port and address check + InetAddress serverAddress = InetAddress.getByName(Constants.SERVERADDRESS); + InetAddress clientAddress = InetAddress.getByName(Constants.CLIENTADDRESS); + + pr = new Proxy(clientAddress, clientPort, serverAddress, serverPort, System.out, System.err, this, guiLock); } catch (IOException ioe) { System.err.println(ioe); @@ -213,11 +268,9 @@ */ public void neu(String data, boolean toClient) { if (!toClient) { - jTextPane1.setText(jTextPane1.getText() + data); - // jTextPane1.repaint(); + jTextPaneServerRaw.setText(jTextPaneServerRaw.getText() + data); } else { - jTextPane.setText(jTextPane.getText() + data); - // jTextPane.repaint(); + jTextPaneClientRaw.setText(jTextPaneClientRaw.getText() + data); } } @@ -229,7 +282,7 @@ private JFrame getJFrame() { if (jFrame == null) { jFrame = new JFrame(); - jFrame.setSize(new Dimension(Constants.GUI_SIZE_X, Constants.GUI_SIZE_Y)); + jFrame.setSize(new Dimension(Constants.GUI_SIZE_WIDTH, Constants.GUI_SIZE_HEIGHT)); jFrame.setContentPane(getJContentPane()); jFrame.setJMenuBar(getJJMenuBar()); jFrame.setTitle(Constants.APPTITLE); @@ -257,7 +310,7 @@ if (jContentPane == null) { jContentPane = new JPanel(); jContentPane.setLayout(new BorderLayout()); - jContentPane.setPreferredSize(new Dimension(Constants.GUI_SIZE_X, Constants.GUI_SIZE_Y)); + jContentPane.setPreferredSize(new Dimension(Constants.GUI_SIZE_WIDTH, Constants.GUI_SIZE_HEIGHT)); jContentPane.add(getJPanel(), BorderLayout.SOUTH); jContentPane.add(getJSplitPane(), BorderLayout.CENTER); jContentPane.addComponentListener(new java.awt.event.ComponentAdapter() { @@ -283,8 +336,8 @@ jPanel = new JPanel(); jPanel.setLayout(gridLayout); jPanel.setName("toolPanel"); - jPanel.add(getJButton(), null); - jPanel.add(getJButton1(), null); + jPanel.add(getJButtonSendToServer(), null); + jPanel.add(getJButtonSendToClient(), null); } return jPanel; } @@ -297,8 +350,8 @@ private JSplitPane getJSplitPane() { if (jSplitPane == null) { jSplitPane = new JSplitPane(); - jSplitPane.setRightComponent(getJScrollPane1()); - jSplitPane.setLeftComponent(getJTabbedPane1()); + jSplitPane.setLeftComponent(getJTabbedPaneClient()); + jSplitPane.setRightComponent(getJTabbedPaneServer()); jSplitPane.setDividerLocation(DIVIDER); } return jSplitPane; @@ -309,69 +362,67 @@ * * @return javax.swing.JButton */ - private JButton getJButton() { - if (jButton == null) { - jButton = new JButton(); - jButton.setText("cTs ok"); - jButton.addActionListener(new java.awt.event.ActionListener() { + private JButton getJButtonSendToServer() { + if (jBtnSendToServer == null) { + jBtnSendToServer = new JButton(); + jBtnSendToServer.setText("Send to Server"); + jBtnSendToServer.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - pr.writeToServer(jTextPane.getText()); - jTextPane.setText(""); + pr.writeToServer(jTextPaneClientRaw.getText()); + jTextPaneClientRaw.setText(""); } }); } - return jButton; + return jBtnSendToServer; } /** - * This method initializes jScrollPane1. + * TODO: wues_ha: Enter comment! * - * @return javax.swing.JScrollPane + * @return XMLTreeView */ - private JScrollPane getJScrollPane1() { - if (jScrollPane1 == null) { - jScrollPane1 = new JScrollPane(); - jScrollPane1.setViewportView(getJTextPane1()); + private XMLTreeView getXMLTreeViewClient() { + if (xTreeViewClient == null) { + xTreeViewClient = new XMLTreeView(); } - return jScrollPane1; + return xTreeViewClient; } - + /** * TODO: wues_ha: Enter comment! * - * @return XMLTreeView + * @return XMLTextPane */ - private XMLTreeView getXMLTreeView() { - if (xTreeView == null) { - xTreeView = new XMLTreeView(); + private XMLTextPane getXMLTextPaneClient() { + if (xTextPaneClient == null) { + xTextPaneClient = new XMLTextPane(); } - return xTreeView; + return xTextPaneClient; } - + /** * TODO: wues_ha: Enter comment! * - * @return XMLTextPane + * @return XMLTreeView */ - private XMLTextPane getXMLTextPane() { - if (xTextPane == null) { - xTextPane = new XMLTextPane(); + private XMLTreeView getXMLTreeViewServer() { + if (xTreeViewServer == null) { + xTreeViewServer = new XMLTreeView(); } - return xTextPane; + return xTreeViewServer; } - + /** - * This method initializes jTextPane1. + * TODO: wues_ha: Enter comment! * - * @return javax.swing.JTextPane + * @return XMLTextPane */ - private JTextPane getJTextPane1() { - if (jTextPane1 == null) { - jTextPane1 = new JTextPane(); - jTextPane1.setBackground(SystemColor.info); - jTextPane1.setEditable(true); + private XMLTextPane getXMLTextPaneServer() { + if (xTextPaneServer == null) { + xTextPaneServer = new XMLTextPane(); + xTextPaneServer.setContentType("text/rtf"); } - return jTextPane1; + return xTextPaneServer; } /** @@ -384,6 +435,7 @@ jJMenuBar = new JMenuBar(); jJMenuBar.add(getJMenu()); jJMenuBar.add(getJMenu1()); + jJMenuBar.add(getJMenu2()); } return jJMenuBar; } @@ -398,6 +450,7 @@ jMenu = new JMenu(); jMenu.setText("File"); jMenu.setMnemonic(KeyEvent.VK_F); + jMenu.add(getJMenuItem4()); jMenu.add(getJMenuItem()); } return jMenu; @@ -415,7 +468,6 @@ jMenuItem.setMnemonic(KeyEvent.VK_UNDEFINED); jMenuItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - //Ende System.exit(0); } }); @@ -452,8 +504,8 @@ jMenuItem1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { //Clear - jTextPane.setText(""); - jTextPane1.setText(""); + jTextPaneClientRaw.setText(""); + jTextPaneServerRaw.setText(""); } }); } @@ -465,18 +517,18 @@ * * @return javax.swing.JButton */ - private JButton getJButton1() { - if (jButton1 == null) { - jButton1 = new JButton(); - jButton1.setText("sTc ok"); - jButton1.addActionListener(new java.awt.event.ActionListener() { + private JButton getJButtonSendToClient() { + if (jBtnSendToClient == null) { + jBtnSendToClient = new JButton(); + jBtnSendToClient.setText("Send to Client"); + jBtnSendToClient.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - pr.writeToClient(jTextPane1.getText()); - jTextPane1.setText(""); + pr.writeToClient(jTextPaneServerRaw.getText()); + jTextPaneServerRaw.setText(""); } }); } - return jButton1; + return jBtnSendToClient; } /** @@ -490,7 +542,7 @@ jMenuItem2.setText("Clear Client Data"); jMenuItem2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - jTextPane.setText(""); + jTextPaneClientRaw.setText(""); } }); } @@ -508,7 +560,7 @@ jMenuItem3.setText("Clear Server Data"); jMenuItem3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { - jTextPane1.setText(""); + jTextPaneServerRaw.setText(""); } }); } @@ -520,8 +572,8 @@ * * @return String Body of the message */ - public String getBody() { - return body; + public String getClientBody() { + return clientBody; } /** @@ -529,40 +581,75 @@ * * @return String Header of the message */ - public String getHeader() { - return header; + public String getClientHeader() { + return clientHeader; } /** * TODO: wues_ha: Enter comment! * + * @return String Body of the message + */ + public String getServerBody() { + return serverBody; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String Header of the message + */ + public String getServerHeader() { + return serverHeader; + } + + /** + * TODO: wues_ha: Enter comment! + * * @param raw String raw input */ - public void setRawInput(String raw) { + public void setRawInputClient(String raw) { if (raw.contains("<?xml version")) { String[] s = raw.split("<\\?xml version="); - body = "<?xml version=" + s[1]; - header = s[0]; + clientBody = "<?xml version=" + s[1]; + clientHeader = s[0]; } else { - body = ""; - header = raw; + clientBody = ""; + clientHeader = raw; } } /** + * TODO: wues_ha: Enter comment! + * + * @param raw String raw input + */ + public void setRawInputServer(String raw) { + if (raw.contains("<?xml version")) { + String[] s = raw.split("<\\?xml version="); + serverBody = "<?xml version=" + s[1]; + serverHeader = s[0]; + } else { + serverBody = ""; + serverHeader = raw; + } + + } + + /** * This method initializes jTextPane. * * @return javax.swing.JTextPane */ - private JTextPane getJTextPane() { - if (jTextPane == null) { - jTextPane = new JTextPane(); - jTextPane.setText(""); - jTextPane.setEditable(true); - jTextPane.setBackground(SystemColor.info); + private JTextPane getJTextPaneClientRaw() { + if (jTextPaneClientRaw == null) { + jTextPaneClientRaw = new JTextPane(); + jTextPaneClientRaw.setText(""); + jTextPaneClientRaw.setEditable(true); + jTextPaneClientRaw.setBackground(SystemColor.info); } - return jTextPane; + return jTextPaneClientRaw; } /** @@ -570,50 +657,61 @@ * * @return javax.swing.JTextPane */ - private JTextPane getJTextPane3() { - if (jTextPane3 == null) { - jTextPane3 = new JTextPane(); + private JTextPane getJTextPaneClientHeader() { + if (jTextPaneClientHeader == null) { + jTextPaneClientHeader = new JTextPane(); } - return jTextPane3; + return jTextPaneClientHeader; } /** + * This method initializes jTextPane3. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPaneServerHeader() { + if (jTextPaneServerHeader == null) { + jTextPaneServerHeader = new JTextPane(); + } + return jTextPaneServerHeader; + } + + /** * This method initializes jTabbedPane1. * * @return javax.swing.JTabbedPane */ - private JTabbedPane getJTabbedPane1() { - if (jTabbedPane1 == null) { - jTabbedPane1 = new JTabbedPane(); - jTabbedPane1.addTab("Raw", null, getJScrollPane(), null); - jTabbedPane1.addTab("Header", null, getJScrollPane2(), null); -// jTabbedPane1.addTab("XML", null, getJScrollPane3(), null); - jTabbedPane1.addTab("XML", null, getJScrollPane3(), null); - jTabbedPane1.addTab("XML-Tree", null, getJScrollPane4(), null); - jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() { + private JTabbedPane getJTabbedPaneClient() { + if (jTabbedPaneClient == null) { + jTabbedPaneClient = new JTabbedPane(); + jTabbedPaneClient.addTab("Raw", null, getJScrollPaneClientRaw(), null); + jTabbedPaneClient.addTab("Header", null, getJScrollPaneClientHeader(), null); + jTabbedPaneClient.addTab("XML", null, getJScrollPaneClientXML(), null); + jTabbedPaneClient.addTab("XML-Tree", null, getJScrollPaneClientXMLTree(), null); + jTabbedPaneClient.addChangeListener(new javax.swing.event.ChangeListener() { public void stateChanged(javax.swing.event.ChangeEvent e) { - if (jTabbedPane1.getSelectedIndex() >= 1) { - setRawInput(jTextPane.getText()); + if (jTabbedPaneClient.getSelectedIndex() >= 1) { + setRawInputClient(jTextPaneClientRaw.getText()); try { - xTextPane.init(getBody()); + xTextPaneClient.init(getClientBody()); } catch (SAXException se) { System.err.println(se); } catch (IOException ioe) { System.err.println(ioe); } try { - xTreeView.init(getBody()); + xTreeViewClient.init(getClientBody()); } catch (SAXException se) { System.err.println(se); } catch (IOException ioe) { System.err.println(ioe); } - jTextPane3.setText(getHeader()); + jTextPaneClientHeader.setText(getClientHeader()); } } }); } - return jTabbedPane1; + return jTabbedPaneClient; } /** @@ -621,13 +719,13 @@ * * @return javax.swing.JScrollPane */ - private JScrollPane getJScrollPane() { - if (jScrollPane == null) { - jScrollPane = new JScrollPane(); - jScrollPane.setVisible(false); - jScrollPane.setViewportView(getJTextPane()); + private JScrollPane getJScrollPaneClientRaw() { + if (jScrollPaneClientRaw == null) { + jScrollPaneClientRaw = new JScrollPane(); + jScrollPaneClientRaw.setVisible(false); + jScrollPaneClientRaw.setViewportView(getJTextPaneClientRaw()); } - return jScrollPane; + return jScrollPaneClientRaw; } /** @@ -635,41 +733,183 @@ * * @return javax.swing.JScrollPane */ - private JScrollPane getJScrollPane2() { - if (jScrollPane2 == null) { - jScrollPane2 = new JScrollPane(); - jScrollPane2.setViewportView(getJTextPane3()); + private JScrollPane getJScrollPaneClientHeader() { + if (jScrollPaneClientHeader == null) { + jScrollPaneClientHeader = new JScrollPane(); + jScrollPaneClientHeader.setViewportView(getJTextPaneClientHeader()); } - return jScrollPane2; + return jScrollPaneClientHeader; } /** + * This method initializes jScrollPane2. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPaneServerHeader() { + if (jScrollPaneServerHeader == null) { + jScrollPaneServerHeader = new JScrollPane(); + jScrollPaneServerHeader.setViewportView(getJTextPaneServerHeader()); + } + return jScrollPaneServerHeader; + } + + /** * This method initializes jScrollPane3. * * @return javax.swing.JScrollPane */ - private JScrollPane getJScrollPane3() { - if (jScrollPane3 == null) { - jScrollPane3 = new JScrollPane(); - jScrollPane3.setViewportView(getXMLTextPane()); + private JScrollPane getJScrollPaneClientXML() { + if (jScrollPaneClientXML == null) { + jScrollPaneClientXML = new JScrollPane(); + jScrollPaneClientXML.setViewportView(getXMLTextPaneClient()); } - return jScrollPane3; + return jScrollPaneClientXML; } /** + * This method initializes jScrollPane3. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPaneServerXML() { + if (jScrollPaneServerXML == null) { + jScrollPaneServerXML = new JScrollPane(); + jScrollPaneServerXML.setBorder(null); + jScrollPaneServerXML.setViewportView(getXMLTextPaneServer()); + } + return jScrollPaneServerXML; + } + + /** * This method initializes jScrollPane4. * * @return javax.swing.JScrollPane */ - private JScrollPane getJScrollPane4() { - if (jScrollPane4 == null) { - jScrollPane4 = new JScrollPane(); - jScrollPane4.setViewportView(getXMLTreeView()); + private JScrollPane getJScrollPaneClientXMLTree() { + if (jScrollPaneClientXMLTree == null) { + jScrollPaneClientXMLTree = new JScrollPane(); + jScrollPaneClientXMLTree.setViewportView(getXMLTreeViewClient()); } - return jScrollPane4; + return jScrollPaneClientXMLTree; } /** + * This method initializes jScrollPane4. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPaneServerXMLTree() { + if (jScrollPaneServerXMLTree == null) { + jScrollPaneServerXMLTree = new JScrollPane(); + jScrollPaneServerXMLTree.setViewportView(getXMLTreeViewServer()); + } + return jScrollPaneServerXMLTree; + } + + /** + * This method initializes jMenu2. + * + * @return javax.swing.JMenu + */ + private JMenu getJMenu2() { + if (jMenu2 == null) { + jMenu2 = new JMenu(); + jMenu2.setText("Help"); + jMenu2.setMnemonic(KeyEvent.VK_HELP); + jMenu2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + // TODO Display Help + } + }); + } + return jMenu2; + } + + /** + * This method initializes jMenuItem4. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem4() { + if (jMenuItem4 == null) { + jMenuItem4 = new JMenuItem(); + jMenuItem4.setText("Configuration"); + jMenuItem4.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + Configuration configGui = new Configuration(jFrame); + configGui.setVisible(true); + } + }); + } + return jMenuItem4; + } + + /** + * This method initializes jTabbedPane. + * + * @return javax.swing.JTabbedPane. + */ + private JTabbedPane getJTabbedPaneServer() { + if (jTabbedPaneServer == null) { + jTabbedPaneServer = new JTabbedPane(); + jTabbedPaneServer.addTab("Raw", null, getJScrollPaneServerRaw(), null); + jTabbedPaneServer.addTab("Header", null, getJScrollPaneServerHeader(), null); + jTabbedPaneServer.addTab("XML", null, getJScrollPaneServerXML(), null); + jTabbedPaneServer.addTab("XML-Tree", null, getJScrollPaneServerXMLTree(), null); + jTabbedPaneServer.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent e) { + if (jTabbedPaneServer.getSelectedIndex() >= 1) { + setRawInputClient(jTextPaneServerRaw.getText()); + try { + xTextPaneServer.init(getClientBody()); + } catch (SAXException se) { + System.err.println(se); + } catch (IOException ioe) { + System.err.println(ioe); + } + try { + xTreeViewServer.init(getClientBody()); + } catch (SAXException se) { + System.err.println(se); + } catch (IOException ioe) { + System.err.println(ioe); + } + jTextPaneServerHeader.setText(getClientHeader()); + } + } + }); + } + return jTabbedPaneServer; + } + + /** + * This method initializes jScrollPane1. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPaneServerRaw() { + if (getJScrollPaneServerRaw == null) { + getJScrollPaneServerRaw = new JScrollPane(); + getJScrollPaneServerRaw.setViewportView(getJTextPaneServerRaw()); + } + return getJScrollPaneServerRaw; + } + + /** + * This method initializes jTextPane1. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPaneServerRaw() { + if (jTextPaneServerRaw == null) { + jTextPaneServerRaw = new JTextPane(); + jTextPaneServerRaw.setBackground(SystemColor.info); + } + return jTextPaneServerRaw; + } + + /** * TODO: wues_ha: Enter comment! * * @param argv String[] arguments @@ -677,25 +917,5 @@ */ public static void main(String[] argv) throws Exception { new Gui(); - } - - /* - public String beautifyXML(String raw) { - XMLBeautyfier xb = new XMLBeautyfier(); - String nice = ""; - DOMParser dp = new DOMParser(); - try { - dp.parse(body); - } catch (IOException ioe) { - - } catch (SAXException se) { - - } - - Document doc = dp.getDocument(); - nice = doc.toString(); - nice = xb.beautify(body); - return nice; - } -*/ + } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java 2007-12-19 16:24:23 UTC (rev 12) @@ -17,6 +17,7 @@ package de.dlr.DAVInspector; +import java.awt.Color; import java.util.HashMap; import java.util.Iterator; import java.util.Map; @@ -24,6 +25,9 @@ import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.Element; +import javax.swing.text.SimpleAttributeSet; +import javax.swing.text.StyleConstants; +import javax.swing.text.StyleContext; import javax.swing.text.StyledDocument; import org.xml.sax.Attributes; @@ -46,7 +50,7 @@ /** * */ - static final String INDENT = "\t"; + static final String INDENT = " "; /** * Store URI to prefix mappings. @@ -65,6 +69,19 @@ * */ private int level; + + /** + * + */ + private String bufferCharacterData; + /** + * + */ + private String bufferEndTag; + /** + * + */ + private String bufferStartTag; /** * TODO: wues_ha: enter comment! @@ -78,20 +95,30 @@ Element e = doc.getDefaultRootElement(); as = e.getAttributes(); level = 0; + bufferCharacterData = ""; + bufferEndTag = ""; + bufferStartTag = ""; + addText(Color.magenta, "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" + NEWLINE); } /** * TODO: wues_ha: Enter comment! * - * @param text - * to add to pane. + * @param c Color of the text. + * @param text String to add to pane. */ - private void addText(String text) { + private void addText(Color c, String text) { + StyleContext sc = StyleContext.getDefaultStyleContext(); + AttributeSet aset = sc.addAttribute(SimpleAttributeSet.EMPTY, + StyleConstants.Foreground, c); + try { - doc.insertString(doc.getLength(), getIndent() + text, as); + doc.insertString(doc.getLength(), text, as); } catch (BadLocationException ble) { System.err.println(ble); } + + doc.setCharacterAttributes(doc.getLength() - text.length(), text.length(), aset, false); } /** @@ -114,7 +141,10 @@ */ @Override public void characters(char[] ch, int start, int length) throws SAXException { - // TODO addText("CD: "+ new String(ch) + NEWLINE); + String s = new String(ch, start, length).trim(); + if (s.length() > 0) { + bufferCharacterData += s; + } } /** @@ -125,25 +155,33 @@ */ @Override public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { + // if there is a buffered start tag, write to the output + if (!bufferStartTag.trim().isEmpty()) { + level--; + addText(Color.BLUE , getIndent() + bufferStartTag + NEWLINE); + level++; + } // Determine namespace + // TODO: namespace nur bei bedarf anzeigen - schon in hashmap? + String prefix = ""; if (namespaceURI.length() > 0) { - String prefix = (String) namespaceMappings.get(namespaceURI); + prefix = (String) namespaceMappings.get(namespaceURI); if (prefix.equals("")) { prefix = "[None]"; - } + } + prefix = " xmlns:" + prefix + "=\"" + namespaceURI + "\""; } + + bufferStartTag = "<" + qName + prefix; - String result = "<" + qName; - // Attribute ausgeben for (int i = 0; i < atts.getLength(); i++) { - result += " " + atts.getQName(i) + "=\"" + atts.getValue(i) + "\""; + bufferStartTag += " " + atts.getQName(i) + "=\"" + atts.getValue(i) + "\""; } - result += ">" + NEWLINE; - addText(result); - + bufferStartTag += ">"; + level++; } @@ -155,8 +193,20 @@ */ @Override public void endElement(String namespaceURI, String localName, String qName) throws SAXException { + bufferEndTag = "</" + qName + ">"; level--; - addText("</" + qName + ">" + NEWLINE); + + if (bufferCharacterData.trim().isEmpty()) { + addText(Color.BLUE, getIndent() + bufferStartTag + bufferEndTag + NEWLINE); + } else { + addText(Color.BLUE, getIndent() + bufferStartTag); + addText(Color.BLACK, bufferCharacterData); + addText(Color.BLUE, bufferEndTag + NEWLINE); + } + + bufferCharacterData = ""; + bufferEndTag = ""; + bufferStartTag = ""; } /** @@ -166,7 +216,7 @@ */ @Override public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException { - // This is ignorable, so don't display it + // empty } /** @@ -220,6 +270,11 @@ } /** + * This indicates the beginning of an XML Namespace prefix mapping. Although this typically + * occurs within the root element of an XML document, it can occur at any point within the + * document. Note that a prefix mapping on an element triggers this callback before the + * callback for the actual element itself (startElement) occurs. + * * {@inheritDoc} * * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String) @@ -230,6 +285,9 @@ } /** + * This indicates the end of a prefix mapping, when the namespace reported in a + * startPrefixMapping callback is no longer available. + * * {@inheritDoc} * * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java 2007-12-19 16:24:23 UTC (rev 12) @@ -43,10 +43,6 @@ * */ private static final String APOSTROPHE = "'"; - /** - * Hold onto the locator for location information. - */ - //private Locator locator; /** * Store URI to prefix mappings. @@ -54,11 +50,6 @@ private Map<String, String> namespaceMappings; /** - * Tree Model to add nodes to. - */ - //private DefaultTreeModel treeModel; - - /** * Current node to add sub-nodes to. */ private DefaultMutableTreeNode current; @@ -70,20 +61,15 @@ * @param base node to start adding sub-nodes to. */ public JTreeContentHandler(DefaultTreeModel treeModelp, DefaultMutableTreeNode base) { - //this.treeModel = treeModelp; this.current = base; this.namespaceMappings = new HashMap<String, String>(); } /** - * Provide reference to Locator which provides information about where in a - * document callbacks occur. - * * @param locatorP Locator object tied to callback process. */ public void setDocumentLocator(Locator locatorP) { - // Save this for later use - //this.locator = locatorP; + // empty } /** @@ -228,7 +214,7 @@ */ public void characters(char[] ch, int start, int length) throws SAXException { - String s = new String(ch, start, length); + String s = new String(ch, start, length).trim(); DefaultMutableTreeNode data = new DefaultMutableTreeNode("Character Data: '" + s + APOSTROPHE); current.add(data); } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2007-12-19 16:24:23 UTC (rev 12) @@ -164,7 +164,6 @@ * All StreamCopyThreads are interrupted and joined. */ private void cleanup() { -// out.println("cleaning up"); try { cToS.interrupt(); sToC.interrupt(); @@ -236,8 +235,6 @@ * @param data String data to write to the client. */ public void writeToClient(String data) { -// out.println(" to Client "); - try { OutputStream outStream = serverSocket.getOutputStream(); if (isChunked(data)) { @@ -256,8 +253,6 @@ * @param data String data to write to the server. */ public void writeToServer(String data) { -// out.println(" to Server "); - try { OutputStream outStream = clientSocket.getOutputStream(); if (isChunked(data)) { Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java 2007-12-19 16:24:23 UTC (rev 12) @@ -17,6 +17,7 @@ package de.dlr.DAVInspector; +import java.awt.Dimension; import java.io.IOException; import java.io.StringReader; @@ -54,6 +55,30 @@ public XMLTextPane() { } + + /** + * To achieve no wordwrap. + * {@inheritDoc} + * + * @see java.awt.Component#setSize(java.awt.Dimension) + */ + public void setSize(Dimension d) { + if (d.width < getParent().getSize().width) { + d.width = getParent().getSize().width; + } + + super.setSize(d); + } + + /** + * To achieve no wordwrap. + * {@inheritDoc} + * + * @see javax.swing.JEditorPane#getScrollableTracksViewportWidth() + */ + public boolean getScrollableTracksViewportWidth() { + return false; + } /** * TODO: wues_ha: Enter comment! Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java 2007-12-18 14:52:48 UTC (rev 11) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java 2007-12-19 16:24:23 UTC (rev 12) @@ -64,18 +64,21 @@ */ public void init(String xmlInput) throws IOException, SAXException { - if (!xmlInput.trim().equals("")) { - DefaultMutableTreeNode base = new DefaultMutableTreeNode("XML Document: " + "Root"); - - // Build the tree model - defaultTreeModel = new DefaultTreeModel(base); - this.setModel(defaultTreeModel); - - // TODO: empty tree - - // Construct the tree hierarchy - buildTree(defaultTreeModel, base, xmlInput); + // if xml input is empty assign default input + if (xmlInput.trim().isEmpty()) { + xmlInput = "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><empty></empty>"; } + + DefaultMutableTreeNode base = new DefaultMutableTreeNode("XML Document: " + "Root"); + + // Build the tree model + defaultTreeModel = new DefaultTreeModel(base); + this.setModel(defaultTreeModel); + + // Construct the tree hierarchy + buildTree(defaultTreeModel, base, xmlInput); + + expandAll(); } /** @@ -102,4 +105,28 @@ InputSource inSource = new InputSource(inStream); reader.parse(inSource); } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void expandAll() { + int row = 0; + while (row < getRowCount()) { + expandRow(row); + row++; + } + } + + /** + * TODO: wues_ha: Enter comment! + * + */ + public void collapseAll() { + int row = getRowCount() - 1; + while (row >= 0) { + collapseRow(row); + row--; + } + } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-18 14:52:55
|
Revision: 11 http://davinspector.svn.sourceforge.net/davinspector/?rev=11&view=rev Author: wuest Date: 2007-12-18 06:52:48 -0800 (Tue, 18 Dec 2007) Log Message: ----------- working with chunked encoding Modified Paths: -------------- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-17 14:56:53 UTC (rev 10) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-18 14:52:48 UTC (rev 11) @@ -19,19 +19,19 @@ /** - * Konstanten. + * Constants. * @version $LastChangedRevision$ * @author Jochen Wuest */ public final class Constants { /** - * GUI-H\xF6he. + * GUI-Width. */ public static final int GUI_SIZE_X = 800; /** - * GUI-Breite. + * GUI-Height. */ public static final int GUI_SIZE_Y = 600; @@ -39,8 +39,18 @@ * Line Feed + Carriage Return. */ public static final String LFCR = "\r\n"; + + /** + * Line Feed. + */ + public static final String LF = "\r"; /** + * Carriage Return. + */ + public static final String CR = "\n"; + + /** * Timeout waiting for a StreamCopyThread to finish in ms. */ public static final int THREADTIMEOUT = 1000; @@ -51,7 +61,7 @@ public static final int LINGERTIME = 15; /** - * Size of receive buffer. + * Size of the receive buffer. */ public static final int RECVBUFFERSIZE = 1024; @@ -71,13 +81,12 @@ public static final String APPTITLE = "Proxy - DAVInspector Prototype 1"; /** - * + * Server port. */ public static final int SERVERPORT = 8080; /** - * + * Client port. */ public static final int CLIENTPORT = 8888; - } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-17 14:56:53 UTC (rev 10) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-18 14:52:48 UTC (rev 11) @@ -316,6 +316,7 @@ jButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { pr.writeToServer(jTextPane.getText()); + jTextPane.setText(""); } }); } @@ -471,6 +472,7 @@ jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent e) { pr.writeToClient(jTextPane1.getText()); + jTextPane1.setText(""); } }); } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2007-12-17 14:56:53 UTC (rev 10) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java 2007-12-18 14:52:48 UTC (rev 11) @@ -17,8 +17,6 @@ package de.dlr.DAVInspector; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import java.io.PrintStream; @@ -36,12 +34,12 @@ public class Proxy extends Thread { /** - * The address to forward connections to. + * Address to forward connections to. */ private InetAddress dstAddr; /** - * The port to forward connections to. + * Port to forward connections to. */ private int dstPort; @@ -51,43 +49,48 @@ private ServerSocket srvSock; /** - * Log streams for output messages. + * Log stream for output messages. + * TODO: to be deleted. */ private PrintStream out; /** - * Log streams for error messages. + * Log stream for error messages. */ private PrintStream err; /** - * + * Reference to the Gui. */ private Gui gui; + /** - * + * Gui lock object. */ private Object guiLock = null; + /** - * + * Lock object. */ private Object lock = new Object(); // ### this?? /** - * + * Client to Server StreamCopyThread. */ private StreamCopyThread cToS = null; + /** - * + * Server to Client StreamCopyThread. */ private StreamCopyThread sToC = null; /** - * + * Client socket. */ private Socket clientSocket; + /** - * + * Server socket. */ private Socket serverSocket; @@ -158,11 +161,10 @@ } /** - * TODO: wues_ha: Enter comment! - * + * All StreamCopyThreads are interrupted and joined. */ private void cleanup() { - out.println("cleaning up"); +// out.println("cleaning up"); try { cToS.interrupt(); sToC.interrupt(); @@ -174,33 +176,13 @@ } /** - * TODO: wues_ha: Enter comment! + * Determines whether the data is chunked or not. * - * @param data String data to write to the server. + * @param data String data to send. + * @return Boolean Returns true if the data is chunked. */ - public void writeToServer(String data) { - out.println(" to Server "); - - try { - OutputStream outStream = clientSocket.getOutputStream(); - if (isChunked(data)) { - sendChunkedData(outStream, data); - } else { - outStream.write(data.getBytes()); - // outStream.flush(); - } - } catch (IOException ioe) { - System.err.println(ioe); - } - } - - /** - * TODO: wues_ha: Enter comment! - * - * @param data String data to send - * @return Boolean true if data is chunked - */ private Boolean isChunked(String data) { + //TODO: RFC 2616 14.39 TE / 14.41 Transfer-Encoding Boolean result = false; if (data.contains("Transfer-Encoding: chunked")) { result = true; @@ -209,69 +191,82 @@ } /** - * TODO: wues_ha: Enter comment! + * Sends the chunked Data. Each chunk is send separately. * - * @param outStream Socket to stream data to - * @param data String with data to send + * @param outStream Socket to stream the data to. + * @param data String with the data to send. */ private void sendChunkedData(OutputStream outStream, String data) { String buffer = ""; + Boolean header = true; + + // split the input in the different chunks. + // each chunk starts with the length of the chunk in hex. + String[] lines = data.split("(\r\n[0-9a-fA-F]+\r\n)"); + for (int i = 0; i < lines.length; i++) { - String dateiName = "Test.txt"; - try { - FileOutputStream schreibeStrom = new FileOutputStream(dateiName); - - String[] lines = data.split(Constants.LFCR); - for (int i = 0; i < lines.length; i++) { - - try { - //check if the line contains the length of the chunk - if (lines[i].matches("^[0-9a-fA-F]+$")) { - buffer += Constants.LFCR; - schreibeStrom.write(buffer.getBytes()); - outStream.write(buffer.getBytes()); - outStream.flush(); - buffer = ""; - } - if (!buffer.isEmpty()) { - buffer += Constants.LFCR + lines[i]; - } else { - buffer += lines[i]; - } + try { + if (header) { + buffer = lines[i]; + header = false; + } else { + buffer = lines[i]; + String chunkLength = Constants.LFCR + Integer.toHexString(lines[i].length()) + Constants.LFCR; - } catch (IOException ioe) { - System.err.println(ioe); + // if the content of the chunk is empty, it is assumed that this is the last chunk. + // the last chunk ist indicated by a length of 0 followed by an empty line. + if (buffer.trim().isEmpty()) { + buffer = Constants.LFCR; + chunkLength = Constants.LFCR + "0" + Constants.LFCR; + } + buffer = chunkLength + buffer; } - } - try { - schreibeStrom.close(); + + outStream.write(buffer.getBytes()); + outStream.flush(); } catch (IOException ioe) { System.err.println(ioe); - } - } catch (FileNotFoundException fnfe) { - System.err.println(fnfe); - } + } + } } /** - * TODO: wues_ha: Enter comment! + * Writes data to the Client. * * @param data String data to write to the client. */ public void writeToClient(String data) { - out.println(" to Client "); +// out.println(" to Client "); try { OutputStream outStream = serverSocket.getOutputStream(); if (isChunked(data)) { sendChunkedData(outStream, data); - // outStream.close(); } else { outStream.write(data.getBytes()); - // outStream.flush(); } } catch (IOException ioe) { System.err.println(ioe); } } + + /** + * Writes Data to the Server. + * + * @param data String data to write to the server. + */ + public void writeToServer(String data) { +// out.println(" to Server "); + + try { + OutputStream outStream = clientSocket.getOutputStream(); + if (isChunked(data)) { + sendChunkedData(outStream, data); + } else { + outStream.write(data.getBytes()); + } + } catch (IOException ioe) { + System.err.println(ioe); + } + } } Modified: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java 2007-12-17 14:56:53 UTC (rev 10) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java 2007-12-18 14:52:48 UTC (rev 11) @@ -70,6 +70,8 @@ // Build the tree model defaultTreeModel = new DefaultTreeModel(base); this.setModel(defaultTreeModel); + + // TODO: empty tree // Construct the tree hierarchy buildTree(defaultTreeModel, base, xmlInput); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <wu...@us...> - 2007-12-17 14:57:00
|
Revision: 10 http://davinspector.svn.sourceforge.net/davinspector/?rev=10&view=rev Author: wuest Date: 2007-12-17 06:56:53 -0800 (Mon, 17 Dec 2007) Log Message: ----------- Initial import. Added Paths: ----------- branches/prototype1/DAVInspector/.checkstyle branches/prototype1/DAVInspector/.classpath branches/prototype1/DAVInspector/.project branches/prototype1/DAVInspector/.settings/ branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.core.prefs branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs branches/prototype1/DAVInspector/.settings/org.eclipse.wst.validation.prefs branches/prototype1/DAVInspector/src/ branches/prototype1/DAVInspector/src/de/ branches/prototype1/DAVInspector/src/de/dlr/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTreeContentHandler.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Proxy.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/StreamCopyThread.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTextPane.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/XMLTreeView.java branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/package.html Added: branches/prototype1/DAVInspector/.checkstyle =================================================================== --- branches/prototype1/DAVInspector/.checkstyle (rev 0) +++ branches/prototype1/DAVInspector/.checkstyle 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<fileset-config file-format-version="1.2.0" simple-config="true"> + <local-check-config name="DLR" location="src/de/dlr/src-style/checks.xml" type="project" description=""> + <additional-data name="protect-config-file" value="false"/> + </local-check-config> + <fileset name="Alle" enabled="true" check-config-name="DLR" local="true"> + <file-match-pattern match-pattern="." include-pattern="true"/> + </fileset> +</fileset-config> Added: branches/prototype1/DAVInspector/.classpath =================================================================== --- branches/prototype1/DAVInspector/.classpath (rev 0) +++ branches/prototype1/DAVInspector/.classpath 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<classpath> + <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> + <classpathentry kind="output" path="bin"/> +</classpath> Added: branches/prototype1/DAVInspector/.project =================================================================== --- branches/prototype1/DAVInspector/.project (rev 0) +++ branches/prototype1/DAVInspector/.project 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>DAVInspector</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + <buildCommand> + <name>org.eclipse.jdt.core.javabuilder</name> + <arguments> + </arguments> + </buildCommand> + <buildCommand> + <name>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</name> + <arguments> + </arguments> + </buildCommand> + </buildSpec> + <natures> + <nature>org.eclipse.jem.workbench.JavaEMFNature</nature> + <nature>org.eclipse.jdt.core.javanature</nature> + <nature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</nature> + <nature>org.eclipse.jem.beaninfo.BeanInfoNature</nature> + </natures> +</projectDescription> Added: branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.core.prefs =================================================================== --- branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.core.prefs (rev 0) +++ branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.core.prefs 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,256 @@ +#Thu Oct 11 16:36:52 CEST 2007 +eclipse.preferences.version=1 +org.eclipse.jdt.core.formatter.align_type_members_on_columns=false +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=18 +org.eclipse.jdt.core.formatter.alignment_for_assignment=0 +org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 +org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 +org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=82 +org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 +org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 +org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=18 +org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 +org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 +org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_after_package=1 +org.eclipse.jdt.core.formatter.blank_lines_before_field=0 +org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=1 +org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 +org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 +org.eclipse.jdt.core.formatter.blank_lines_before_method=1 +org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 +org.eclipse.jdt.core.formatter.blank_lines_before_package=0 +org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 +org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 +org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line +org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false +org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false +org.eclipse.jdt.core.formatter.comment.format_block_comments=true +org.eclipse.jdt.core.formatter.comment.format_header=false +org.eclipse.jdt.core.formatter.comment.format_html=true +org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true +org.eclipse.jdt.core.formatter.comment.format_line_comments=true +org.eclipse.jdt.core.formatter.comment.format_source_code=true +org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true +org.eclipse.jdt.core.formatter.comment.indent_root_tags=true +org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert +org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert +org.eclipse.jdt.core.formatter.comment.line_length=100 +org.eclipse.jdt.core.formatter.compact_else_if=true +org.eclipse.jdt.core.formatter.continuation_indentation=2 +org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 +org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true +org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true +org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_empty_lines=false +org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true +org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true +org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false +org.eclipse.jdt.core.formatter.indentation.size=4 +org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert +org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert +org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert +org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert +org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert +org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert +org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert +org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert +org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert +org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert +org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert +org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert +org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false +org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false +org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false +org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false +org.eclipse.jdt.core.formatter.lineSplit=140 +org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false +org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false +org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 +org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 +org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true +org.eclipse.jdt.core.formatter.tabulation.char=space +org.eclipse.jdt.core.formatter.tabulation.size=4 +org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false +org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true Added: branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs =================================================================== --- branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs (rev 0) +++ branches/prototype1/DAVInspector/.settings/org.eclipse.jdt.ui.prefs 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,5 @@ +#Thu Oct 11 16:38:01 CEST 2007 +eclipse.preferences.version=1 +formatter_profile=_DLR +formatter_settings_version=11 +org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @return Returns the ${bare_field_name}.\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * ${todo}\: ${user}\: Comment\!\r\n * @param ${param} The ${bare_field_name} to set.\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${todo}\: ${user}\: enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="false" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n *\r\n * @version $$LastChangedRevision$$\r\n * @author ${user}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${todo}\: ${user}\: Enter comment\!\r\n * \r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\r\n * {@inheritDoc}\r\n *\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="New classes and interfaces" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * ${file_name}\r\n * \r\n * ${todo}\: ${user} Enter comment\!\r\n * \r\n * Created\: ${date} ${user} <email>\r\n * Changed\:\r\n * \r\n * $$Id$$\r\n *\r\n * Copyright (C) 2007-${year} DLR SC, Germany\r\n * \r\n * All rights reserved\r\n * \r\n * http\://www.dlr.de/\r\n */\r\n \r\n${package_declaration}\r\n\r\n${typecomment}\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\nlogger.error(${exception_var}.getStackTrace());</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> Added: branches/prototype1/DAVInspector/.settings/org.eclipse.wst.validation.prefs =================================================================== --- branches/prototype1/DAVInspector/.settings/org.eclipse.wst.validation.prefs (rev 0) +++ branches/prototype1/DAVInspector/.settings/org.eclipse.wst.validation.prefs 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,6 @@ +#Thu Oct 11 16:32:55 CEST 2007 +DELEGATES_PREFERENCE=delegateValidatorListorg.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator\=org.eclipse.wst.xsd.core.internal.validation.eclipse.Validator; +USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator; +USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.wst.dtd.core.internal.validation.eclipse.Validator;org.eclipse.wst.xsd.core.internal.validation.eclipse.XSDDelegatingValidator;org.eclipse.wst.xml.core.internal.validation.eclipse.Validator; +USER_PREFERENCE=overrideGlobalPreferencesfalse +eclipse.preferences.version=1 Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Constants.java 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,83 @@ +/* + * Constants.java + * + * Definition aller ben\xF6tigten Konstanten. + * + * Created: 11.10.2007 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + + +/** + * Konstanten. + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public final class Constants { + + /** + * GUI-H\xF6he. + */ + public static final int GUI_SIZE_X = 800; + + /** + * GUI-Breite. + */ + public static final int GUI_SIZE_Y = 600; + + /** + * Line Feed + Carriage Return. + */ + public static final String LFCR = "\r\n"; + + /** + * Timeout waiting for a StreamCopyThread to finish in ms. + */ + public static final int THREADTIMEOUT = 1000; + + /** + * Linger time in seconds for socket. + */ + public static final int LINGERTIME = 15; + + /** + * Size of receive buffer. + */ + public static final int RECVBUFFERSIZE = 1024; + + /** + * Backlog parameter used when creating the ServerSocket. + */ + public static final int BACKLOG = 100; + + /** + * EOF. + */ + public static final int EOF = -1; + + /** + * Application Title. + */ + public static final String APPTITLE = "Proxy - DAVInspector Prototype 1"; + + /** + * + */ + public static final int SERVERPORT = 8080; + + /** + * + */ + public static final int CLIENTPORT = 8888; + +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/Gui.java 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,699 @@ +/* + * Gui.java + * + * TODO: wues_ha Enter comment! + * + * Created: 09.11.2007 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2007-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.awt.BorderLayout; +import java.awt.Dimension; +import java.awt.GridLayout; +import java.awt.SystemColor; +import java.awt.event.KeyEvent; +import java.io.IOException; +import java.net.InetAddress; + +import javax.swing.JButton; +import javax.swing.JFrame; +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; +import javax.swing.JPanel; +import javax.swing.JScrollPane; +import javax.swing.JSplitPane; +import javax.swing.JTabbedPane; +import javax.swing.JTextPane; +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +import org.xml.sax.SAXException; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class Gui { + + /** + * + */ + private static final double DIVIDER = 0.5; + + /** + * + */ + private int clientPort = Constants.CLIENTPORT; + + /** + * + */ + private int serverPort = Constants.SERVERPORT; + + /** + * + */ + private JFrame jFrame = null; // @jve:decl-index=0:visual-constraint="115,38" + /** + * + */ + private Object guiLock = new Object(); // @jve:decl-index=0: + /** + * + */ + private JPanel jContentPane = null; + /** + * + */ + private JPanel jPanel = null; + /** + * + */ + private JSplitPane jSplitPane = null; + /** + * + */ + private JButton jButton = null; + /** + * + */ + private JScrollPane jScrollPane1 = null; + /** + * + */ + private JTextPane jTextPane1 = null; + /** + * + */ + private JMenuBar jJMenuBar = null; + /** + * + */ + private JMenu jMenu = null; + /** + * + */ + private JMenuItem jMenuItem = null; + /** + * + */ + private JMenu jMenu1 = null; + /** + * + */ + private JMenuItem jMenuItem1 = null; + /** + * + */ + private JButton jButton1 = null; + /** + * + */ + private Proxy pr = null; + /** + * + */ + private JMenuItem jMenuItem2 = null; + /** + * + */ + private JMenuItem jMenuItem3 = null; + /** + * + */ + private JTextPane jTextPane = null; + /** + * + */ + private XMLTextPane xTextPane = null; + /** + * + */ + private XMLTreeView xTreeView = null; + + /** + * + */ + private String header = ""; // @jve:decl-index=0: + /** + * + */ + private String body = ""; // @jve:decl-index=0: + + /** + * + */ + private JTextPane jTextPane3 = null; + /** + * + */ + private JTabbedPane jTabbedPane1 = null; + /** + * + */ + private JScrollPane jScrollPane = null; + /** + * + */ + private JScrollPane jScrollPane2 = null; + /** + * + */ + private JScrollPane jScrollPane3 = null; + /** + * + */ + private JScrollPane jScrollPane4 = null; + + /** + * TODO: wues_ha: enter comment! + * + */ + public Gui() { + try { + UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); + } catch (UnsupportedLookAndFeelException lfe) { + System.err.println(lfe); + } catch (IllegalAccessException iae) { + System.err.println(iae); + } catch (InstantiationException ie) { + System.err.println(ie); + } catch (ClassNotFoundException cnfe) { + System.err.println(cnfe); + } + jFrame = getJFrame(); + jFrame.pack(); + jFrame.setVisible(true); + try { + pr = new Proxy(null, clientPort, InetAddress.getByName("localhost"), serverPort, + System.out, System.err, this, guiLock); + } catch (IOException ioe) { + System.err.println(ioe); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param data String data + * @param toClient Boolean whether this is a client or server connection + */ + public void neu(String data, boolean toClient) { + if (!toClient) { + jTextPane1.setText(jTextPane1.getText() + data); + // jTextPane1.repaint(); + } else { + jTextPane.setText(jTextPane.getText() + data); + // jTextPane.repaint(); + } + } + + /** + * This method initializes jFrame. + * + * @return javax.swing.JFrame + */ + private JFrame getJFrame() { + if (jFrame == null) { + jFrame = new JFrame(); + jFrame.setSize(new Dimension(Constants.GUI_SIZE_X, Constants.GUI_SIZE_Y)); + jFrame.setContentPane(getJContentPane()); + jFrame.setJMenuBar(getJJMenuBar()); + jFrame.setTitle(Constants.APPTITLE); + jFrame.addWindowListener(new java.awt.event.WindowAdapter() { + + public void windowOpened(java.awt.event.WindowEvent e) { + // windowOpened() + } + + public void windowClosing(java.awt.event.WindowEvent e) { + // windowClosing() + System.exit(0); + } + }); + } + return jFrame; + } + + /** + * This method initializes jContentPane. + * + * @return javax.swing.JPanel + */ + private JPanel getJContentPane() { + if (jContentPane == null) { + jContentPane = new JPanel(); + jContentPane.setLayout(new BorderLayout()); + jContentPane.setPreferredSize(new Dimension(Constants.GUI_SIZE_X, Constants.GUI_SIZE_Y)); + jContentPane.add(getJPanel(), BorderLayout.SOUTH); + jContentPane.add(getJSplitPane(), BorderLayout.CENTER); + jContentPane.addComponentListener(new java.awt.event.ComponentAdapter() { + public void componentResized(java.awt.event.ComponentEvent e) { + //resize + jSplitPane.setDividerLocation(DIVIDER); + } + }); + } + return jContentPane; + } + + /** + * This method initializes jPanel. + * + * @return javax.swing.JPanel + */ + private JPanel getJPanel() { + if (jPanel == null) { + GridLayout gridLayout = new GridLayout(); + gridLayout.setColumns(4); + gridLayout.setRows(1); + jPanel = new JPanel(); + jPanel.setLayout(gridLayout); + jPanel.setName("toolPanel"); + jPanel.add(getJButton(), null); + jPanel.add(getJButton1(), null); + } + return jPanel; + } + + /** + * This method initializes jSplitPane. + * + * @return javax.swing.JSplitPane + */ + private JSplitPane getJSplitPane() { + if (jSplitPane == null) { + jSplitPane = new JSplitPane(); + jSplitPane.setRightComponent(getJScrollPane1()); + jSplitPane.setLeftComponent(getJTabbedPane1()); + jSplitPane.setDividerLocation(DIVIDER); + } + return jSplitPane; + } + + /** + * This method initializes jButton. + * + * @return javax.swing.JButton + */ + private JButton getJButton() { + if (jButton == null) { + jButton = new JButton(); + jButton.setText("cTs ok"); + jButton.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + pr.writeToServer(jTextPane.getText()); + } + }); + } + return jButton; + } + + /** + * This method initializes jScrollPane1. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane1() { + if (jScrollPane1 == null) { + jScrollPane1 = new JScrollPane(); + jScrollPane1.setViewportView(getJTextPane1()); + } + return jScrollPane1; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return XMLTreeView + */ + private XMLTreeView getXMLTreeView() { + if (xTreeView == null) { + xTreeView = new XMLTreeView(); + } + return xTreeView; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return XMLTextPane + */ + private XMLTextPane getXMLTextPane() { + if (xTextPane == null) { + xTextPane = new XMLTextPane(); + } + return xTextPane; + } + + /** + * This method initializes jTextPane1. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPane1() { + if (jTextPane1 == null) { + jTextPane1 = new JTextPane(); + jTextPane1.setBackground(SystemColor.info); + jTextPane1.setEditable(true); + } + return jTextPane1; + } + + /** + * This method initializes jJMenuBar. + * + * @return javax.swing.JMenuBar + */ + private JMenuBar getJJMenuBar() { + if (jJMenuBar == null) { + jJMenuBar = new JMenuBar(); + jJMenuBar.add(getJMenu()); + jJMenuBar.add(getJMenu1()); + } + return jJMenuBar; + } + + /** + * This method initializes jMenu. + * + * @return javax.swing.JMenu + */ + private JMenu getJMenu() { + if (jMenu == null) { + jMenu = new JMenu(); + jMenu.setText("File"); + jMenu.setMnemonic(KeyEvent.VK_F); + jMenu.add(getJMenuItem()); + } + return jMenu; + } + + /** + * This method initializes jMenuItem. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem() { + if (jMenuItem == null) { + jMenuItem = new JMenuItem(); + jMenuItem.setText("Exit"); + jMenuItem.setMnemonic(KeyEvent.VK_UNDEFINED); + jMenuItem.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + //Ende + System.exit(0); + } + }); + } + return jMenuItem; + } + + /** + * This method initializes jMenu1. + * + * @return javax.swing.JMenu + */ + private JMenu getJMenu1() { + if (jMenu1 == null) { + jMenu1 = new JMenu(); + jMenu1.setText("View"); + jMenu1.setMnemonic(KeyEvent.VK_V); + jMenu1.add(getJMenuItem1()); + jMenu1.add(getJMenuItem2()); + jMenu1.add(getJMenuItem3()); + } + return jMenu1; + } + + /** + * This method initializes jMenuItem1. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem1() { + if (jMenuItem1 == null) { + jMenuItem1 = new JMenuItem(); + jMenuItem1.setText("Clear all"); + jMenuItem1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + //Clear + jTextPane.setText(""); + jTextPane1.setText(""); + } + }); + } + return jMenuItem1; + } + + /** + * This method initializes jButton1. + * + * @return javax.swing.JButton + */ + private JButton getJButton1() { + if (jButton1 == null) { + jButton1 = new JButton(); + jButton1.setText("sTc ok"); + jButton1.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + pr.writeToClient(jTextPane1.getText()); + } + }); + } + return jButton1; + } + + /** + * This method initializes jMenuItem2. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem2() { + if (jMenuItem2 == null) { + jMenuItem2 = new JMenuItem(); + jMenuItem2.setText("Clear Client Data"); + jMenuItem2.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + jTextPane.setText(""); + } + }); + } + return jMenuItem2; + } + + /** + * This method initializes jMenuItem3. + * + * @return javax.swing.JMenuItem + */ + private JMenuItem getJMenuItem3() { + if (jMenuItem3 == null) { + jMenuItem3 = new JMenuItem(); + jMenuItem3.setText("Clear Server Data"); + jMenuItem3.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent e) { + jTextPane1.setText(""); + } + }); + } + return jMenuItem3; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String Body of the message + */ + public String getBody() { + return body; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return String Header of the message + */ + public String getHeader() { + return header; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param raw String raw input + */ + public void setRawInput(String raw) { + if (raw.contains("<?xml version")) { + String[] s = raw.split("<\\?xml version="); + body = "<?xml version=" + s[1]; + header = s[0]; + } else { + body = ""; + header = raw; + } + + } + + /** + * This method initializes jTextPane. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPane() { + if (jTextPane == null) { + jTextPane = new JTextPane(); + jTextPane.setText(""); + jTextPane.setEditable(true); + jTextPane.setBackground(SystemColor.info); + } + return jTextPane; + } + + /** + * This method initializes jTextPane3. + * + * @return javax.swing.JTextPane + */ + private JTextPane getJTextPane3() { + if (jTextPane3 == null) { + jTextPane3 = new JTextPane(); + } + return jTextPane3; + } + + /** + * This method initializes jTabbedPane1. + * + * @return javax.swing.JTabbedPane + */ + private JTabbedPane getJTabbedPane1() { + if (jTabbedPane1 == null) { + jTabbedPane1 = new JTabbedPane(); + jTabbedPane1.addTab("Raw", null, getJScrollPane(), null); + jTabbedPane1.addTab("Header", null, getJScrollPane2(), null); +// jTabbedPane1.addTab("XML", null, getJScrollPane3(), null); + jTabbedPane1.addTab("XML", null, getJScrollPane3(), null); + jTabbedPane1.addTab("XML-Tree", null, getJScrollPane4(), null); + jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() { + public void stateChanged(javax.swing.event.ChangeEvent e) { + if (jTabbedPane1.getSelectedIndex() >= 1) { + setRawInput(jTextPane.getText()); + try { + xTextPane.init(getBody()); + } catch (SAXException se) { + System.err.println(se); + } catch (IOException ioe) { + System.err.println(ioe); + } + try { + xTreeView.init(getBody()); + } catch (SAXException se) { + System.err.println(se); + } catch (IOException ioe) { + System.err.println(ioe); + } + jTextPane3.setText(getHeader()); + } + } + }); + } + return jTabbedPane1; + } + + /** + * This method initializes jScrollPane. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane() { + if (jScrollPane == null) { + jScrollPane = new JScrollPane(); + jScrollPane.setVisible(false); + jScrollPane.setViewportView(getJTextPane()); + } + return jScrollPane; + } + + /** + * This method initializes jScrollPane2. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane2() { + if (jScrollPane2 == null) { + jScrollPane2 = new JScrollPane(); + jScrollPane2.setViewportView(getJTextPane3()); + } + return jScrollPane2; + } + + /** + * This method initializes jScrollPane3. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane3() { + if (jScrollPane3 == null) { + jScrollPane3 = new JScrollPane(); + jScrollPane3.setViewportView(getXMLTextPane()); + } + return jScrollPane3; + } + + /** + * This method initializes jScrollPane4. + * + * @return javax.swing.JScrollPane + */ + private JScrollPane getJScrollPane4() { + if (jScrollPane4 == null) { + jScrollPane4 = new JScrollPane(); + jScrollPane4.setViewportView(getXMLTreeView()); + } + return jScrollPane4; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param argv String[] arguments + * @throws Exception if something fails + */ + public static void main(String[] argv) throws Exception { + new Gui(); + } + + /* + public String beautifyXML(String raw) { + XMLBeautyfier xb = new XMLBeautyfier(); + String nice = ""; + DOMParser dp = new DOMParser(); + try { + dp.parse(body); + } catch (IOException ioe) { + + } catch (SAXException se) { + + } + + Document doc = dp.getDocument(); + nice = doc.toString(); + nice = xb.beautify(body); + return nice; + } +*/ +} Added: branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java =================================================================== --- branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java (rev 0) +++ branches/prototype1/DAVInspector/src/de/dlr/DAVInspector/JTextPaneContentHandler.java 2007-12-17 14:56:53 UTC (rev 10) @@ -0,0 +1,249 @@ +/* + * JTextPaneContentHandler.java + * + * ContentHandler for SAX-Parser. + * + * Created: 11.12.2007 wues_ha <email> + * Changed: + * + * $Id$ + * + * Copyright (C) 2006-2007 DLR SC, Germany + * + * All rights reserved + * + * http://www.dlr.de/ + */ + +package de.dlr.DAVInspector; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import javax.swing.text.AttributeSet; +import javax.swing.text.BadLocationException; +import javax.swing.text.Element; +import javax.swing.text.StyledDocument; + +import org.xml.sax.Attributes; +import org.xml.sax.ContentHandler; +import org.xml.sax.Locator; +import org.xml.sax.SAXException; + +/** + * TODO: wues_ha: Enter comment! + * + * @version $LastChangedRevision$ + * @author Jochen Wuest + */ +public class JTextPaneContentHandler implements ContentHandler { + + /** + * + */ + static final String NEWLINE = "\r\n"; + /** + * + */ + static final String INDENT = "\t"; + + /** + * Store URI to prefix mappings. + */ + private Map<String, String> namespaceMappings; + + /** + * + */ + private StyledDocument doc; + /** + * + */ + private AttributeSet as; + /** + * + */ + private int level; + + /** + * TODO: wues_ha: enter comment! + * + * @param document + * Object from TextPane. + */ + public JTextPaneContentHandler(StyledDocument document) { + this.namespaceMappings = new HashMap<String, String>(); + this.doc = document; + Element e = doc.getDefaultRootElement(); + as = e.getAttributes(); + level = 0; + } + + /** + * TODO: wues_ha: Enter comment! + * + * @param text + * to add to pane. + */ + private void addText(String text) { + try { + doc.insertString(doc.getLength(), getIndent() + text, as); + } catch (BadLocationException ble) { + System.err.println(ble); + } + } + + /** + * TODO: wues_ha: Enter comment! + * + * @return indents needed. + */ + public String getIndent() { + String result = ""; + for (int i = 0; i < level; i++) { + result += INDENT; + } + return result; + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#characters(char[], int, int) + */ + @Override + public void characters(char[] ch, int start, int length) throws SAXException { + // TODO addText("CD: "+ new String(ch) + NEWLINE); + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, + * java.lang.String, org.xml.sax.Attributes) + */ + @Override + public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException { + + // Determine namespace + if (namespaceURI.length() > 0) { + String prefix = (String) namespaceMappings.get(namespaceURI); + if (prefix.equals("")) { + prefix = "[None]"; + } + } + + String result = "<" + qName; + + // Attribute ausgeben + for (int i = 0; i < atts.getLength(); i++) { + result += " " + atts.getQName(i) + "=\"" + atts.getValue(i) + "\""; + } + + result += ">" + NEWLINE; + addText(result); + + level++; + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, + * java.lang.String) + */ + @Override + public void endElement(String namespaceURI, String localName, String qName) throws SAXException { + level--; + addText("</" + qName + ">" + NEWLINE); + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) + */ + @Override + public void ignorableWhitespace(char[] arg0, int arg1, int arg2) throws SAXException { + // This is ignorable, so don't display it + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String) + */ + @Override + public void processingInstruction(String arg0, String arg1) throws SAXException { + // empty + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator) + */ + @Override + public void setDocumentLocator(Locator locator) { + // empty + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#endDocument() + */ + @Override + public void endDocument() throws SAXException { + // empty + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#startDocument() + */ + @Override + public void startDocument() throws SAXException { + // empty + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String) + */ + @Override + public void skippedEntity(String name) throws SAXException { + // empty + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String) + */ + @Override + public void startPrefixMapping(String prefix, String uri) throws SAXException { + namespaceMappings.put(uri, prefix); + } + + /** + * {@inheritDoc} + * + * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) + */ + @Override + publ... [truncated message content] |