Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.m2e.launching')
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs80
-rw-r--r--org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs65
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java49
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java78
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java11
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java74
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java8
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java8
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java3
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java17
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java22
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java58
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java1
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchExtensionsTab.java7
-rw-r--r--org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java153
15 files changed, 397 insertions, 237 deletions
diff --git a/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs
index d80fc6eb..80d9c54b 100644
--- a/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.core.prefs
@@ -1,5 +1,12 @@
-#Sat Jul 30 19:02:00 MSD 2011
eclipse.preferences.version=1
+org.eclipse.jdt.core.builder.cleanOutputFolder=clean
+org.eclipse.jdt.core.builder.duplicateResourceTask=warning
+org.eclipse.jdt.core.builder.invalidClasspath=abort
+org.eclipse.jdt.core.builder.recreateModifiedClassFileInOutputFolder=ignore
+org.eclipse.jdt.core.builder.resourceCopyExclusionFilter=*.launch
+org.eclipse.jdt.core.circularClasspath=error
+org.eclipse.jdt.core.classpath.exclusionPatterns=enabled
+org.eclipse.jdt.core.classpath.multipleOutputLocations=enabled
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
@@ -8,6 +15,8 @@ org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
+org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
@@ -15,14 +24,16 @@ org.eclipse.jdt.core.compiler.compliance=1.5
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.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.maxProblemPerUnit=100
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
-org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
-org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=enabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=enabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
@@ -31,16 +42,29 @@ org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
-org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
-org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
-org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=warning
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=warning
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=enabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=public
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=public
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
@@ -49,39 +73,45 @@ org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
-org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
-org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=warning
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
-org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=warning
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=warning
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
-org.eclipse.jdt.core.compiler.problem.unusedImport=error
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
-org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=enabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
+org.eclipse.jdt.core.compiler.taskPriorities=NORMAL,HIGH,HIGH
+org.eclipse.jdt.core.compiler.taskTags=TODO,FIXME,XXX
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
@@ -92,15 +122,18 @@ org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
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_method_declaration=0
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_resources_in_try=80
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
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.alignment_for_union_type_in_multicatch=16
org.eclipse.jdt.core.formatter.blank_lines_after_imports=2
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=1
@@ -136,10 +169,16 @@ 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=do not insert
org.eclipse.jdt.core.formatter.comment.line_length=120
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
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.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
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
@@ -157,6 +196,7 @@ org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not 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=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
@@ -223,12 +263,14 @@ org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invoca
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_try=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=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_semicolon_in_try_resources=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
@@ -252,6 +294,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invoc
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_try=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
@@ -307,6 +350,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invoc
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=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not 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
@@ -316,6 +360,7 @@ org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=inser
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_semicolon_in_try_resources=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
@@ -325,6 +370,8 @@ org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_
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.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
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
@@ -337,5 +384,10 @@ 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=2
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
+org.eclipse.jdt.core.incompatibleJDKLevel=ignore
+org.eclipse.jdt.core.incompleteClasspath=error
diff --git a/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs b/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs
index 3860940c..595d9975 100644
--- a/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs
+++ b/org.eclipse.m2e.launching/.settings/org.eclipse.jdt.ui.prefs
@@ -1,9 +1,66 @@
eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_m2 plugin
-formatter_settings_version=11
+formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=ex
org.eclipse.jdt.ui.gettersetter.use.is=true
-org.eclipse.jdt.ui.javadoc=false
-org.eclipse.jdt.ui.keywordthis=false
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;org.w3c;org.xml;org.apache;com;junit;org.eclipse;org.codehaus;org.apache.lucene;org.apache.maven;org.sonatype;org.eclipse.m2e;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.keywordthis=true
+org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=false
-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">/**\n * @return the ${bare_field_name}\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">/**\n * @param ${param} the ${bare_field_name} to set\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">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************\n * Copyright (c) 2010 Sonatype, Inc.\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * Sonatype, Inc. - initial API and implementation\n *******************************************************************************/</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\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">/**\n * \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">/**\n * ${tags}\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">/* (non-Javadoc)\n * ${see_to_overridden}\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">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\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">\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">\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">\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">\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\n${exception_var}.printStackTrace();</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\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}\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><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\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.wst.jsdt.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.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+org.eclipse.jdt.ui.staticondemandthreshold=99
+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">/**\n * @return Returns the ${bare_field_name}.\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">/**\n * @param ${param} The ${bare_field_name} to set.\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">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*******************************************************************************&\#13;\n * Copyright (c) 2010 Sonatype, Inc.&\#13;\n * All rights reserved. This program and the accompanying materials&\#13;\n * are made available under the terms of the Eclipse Public License v1.0&\#13;\n * which accompanies this distribution, and is available at&\#13;\n * http\://www.eclipse.org/legal/epl-v10.html&\#13;\n *&\#13;\n * Contributors\:&\#13;\n * Sonatype, Inc. - initial API and implementation&\#13;\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">/**\n * ${type_name}\n *\n * @author ${user}\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">/**\n * \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">/**\n * ${tags}\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">/* (non-Javadoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="false" 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\nlog.error(${exception_var}.getMessage(), ${exception_var});</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 ${enclosing_method}\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}\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><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">/**\n * ${tags}\n * ${see_to_target}\n */</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">\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">\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">\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">\n</template><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created JavaScript files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\n * \n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for vars" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding function" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Jsdoc)\n * ${see_to_overridden}\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate functions" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${tags}\n * ${see_to_target}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="false" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\nlog.error(${exception_var}.getMessage(), ${exception_var});</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created function stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated function stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.wst.jsdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\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.wst.jsdt.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.wst.jsdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=false
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=false
+sp_cleanup.correct_indentation=false
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=false
+sp_cleanup.make_local_variable_final=false
+sp_cleanup.make_parameters_final=false
+sp_cleanup.make_private_fields_final=true
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=true
+sp_cleanup.on_save_use_additional_actions=false
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=false
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=false
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=false
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=false
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
index 7a30696c..d94eeab3 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/ExecutePomAction.java
@@ -13,6 +13,9 @@ package org.eclipse.m2e.actions;
import java.util.ArrayList;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
@@ -45,6 +48,14 @@ import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IFileEditorInput;
+import org.eclipse.ui.dialogs.ElementListSelectionDialog;
+
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
@@ -54,15 +65,6 @@ import org.eclipse.m2e.core.ui.internal.M2EUIPluginActivator;
import org.eclipse.m2e.internal.launch.LaunchingUtils;
import org.eclipse.m2e.internal.launch.Messages;
import org.eclipse.m2e.ui.internal.launch.MavenLaunchMainTab;
-import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.IEditorInput;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
-import org.eclipse.ui.dialogs.ElementListSelectionDialog;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
/**
@@ -130,7 +132,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
if(basecon == null) {
return;
}
-
+
IContainer basedir = findPomXmlBasedir(basecon);
ILaunchConfiguration launchConfiguration = getLaunchConfiguration(basedir, mode);
@@ -195,24 +197,26 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType launchConfigurationType = launchManager
.getLaunchConfigurationType(MavenLaunchConstants.LAUNCH_CONFIGURATION_TYPE_ID);
-
+
String launchSafeGoalName = goal.replace(':', '-');
- ILaunchConfigurationWorkingCopy workingCopy = launchConfigurationType.newInstance(null, //
- NLS.bind(Messages.ExecutePomAction_executing, launchSafeGoalName, basedir.getLocation().toString().replace('/', '-')));
+ ILaunchConfigurationWorkingCopy workingCopy = launchConfigurationType.newInstance(
+ null, //
+ NLS.bind(Messages.ExecutePomAction_executing, launchSafeGoalName,
+ basedir.getLocation().toString().replace('/', '-')));
workingCopy.setAttribute(MavenLaunchConstants.ATTR_POM_DIR, basedir.getLocation().toOSString());
workingCopy.setAttribute(MavenLaunchConstants.ATTR_GOALS, goal);
workingCopy.setAttribute(IDebugUIConstants.ATTR_PRIVATE, true);
workingCopy.setAttribute(RefreshTab.ATTR_REFRESH_SCOPE, "${project}"); //$NON-NLS-1$
workingCopy.setAttribute(RefreshTab.ATTR_REFRESH_RECURSIVE, true);
-
+
setProjectConfiguration(workingCopy, basedir);
IPath path = getJREContainerPath(basedir);
if(path != null) {
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_JRE_CONTAINER_PATH, path.toPortableString());
}
-
+
// TODO when launching Maven with debugger consider to add the following property
// -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"
@@ -284,7 +288,8 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
ArrayList<ILaunchConfiguration> matchingConfigs = new ArrayList<ILaunchConfiguration>();
for(ILaunchConfiguration configuration : launchConfigurations) {
// substitute variables
- String workDir = LaunchingUtils.substituteVar(configuration.getAttribute(MavenLaunchConstants.ATTR_POM_DIR, (String) null));
+ String workDir = LaunchingUtils.substituteVar(configuration.getAttribute(MavenLaunchConstants.ATTR_POM_DIR,
+ (String) null));
if(workDir == null) {
continue;
}
@@ -293,11 +298,11 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
matchingConfigs.add(configuration);
}
}
-
- if(matchingConfigs.size()==1) {
+
+ if(matchingConfigs.size() == 1) {
log.info("Using existing launch configuration");
return matchingConfigs.get(0);
- } else if(matchingConfigs.size()>1) {
+ } else if(matchingConfigs.size() > 1) {
final IDebugModelPresentation labelProvider = DebugUITools.newDebugModelPresentation();
ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(), //
new ILabelProvider() {
@@ -336,7 +341,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
});
dialog.setElements(matchingConfigs.toArray(new ILaunchConfiguration[matchingConfigs.size()]));
dialog.setTitle(Messages.ExecutePomAction_dialog_title);
- if (mode.equals(ILaunchManager.DEBUG_MODE)) {
+ if(mode.equals(ILaunchManager.DEBUG_MODE)) {
dialog.setMessage(Messages.ExecutePomAction_dialog_debug_message);
} else {
dialog.setMessage(Messages.ExecutePomAction_dialog_run_message);
@@ -346,7 +351,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
labelProvider.dispose();
return result == Window.OK ? (ILaunchConfiguration) dialog.getFirstResult() : null;
}
-
+
} catch(CoreException ex) {
log.error(ex.getMessage(), ex);
}
@@ -360,7 +365,7 @@ public class ExecutePomAction implements ILaunchShortcut, IExecutableExtension {
workingCopy.setAttribute(MavenLaunchConstants.ATTR_POM_DIR, basedirLocation.toString());
setProjectConfiguration(workingCopy, basedir);
-
+
// set other defaults if needed
// MavenLaunchMainTab maintab = new MavenLaunchMainTab();
// maintab.setDefaults(workingCopy);
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java
index 88565093..535f61c0 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/actions/MavenLaunchConstants.java
@@ -13,38 +13,50 @@ package org.eclipse.m2e.actions;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
+
public interface MavenLaunchConstants {
- public final String PLUGIN_ID = "org.eclipse.m2e.launching";
-
- // this should correspond with launchConfigurationType.id attribute in plugin.xml!
- public final String LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.m2e.Maven2LaunchConfigurationType"; //$NON-NLS-1$
- public final String BUILDER_CONFIGURATION_TYPE_ID = "org.eclipse.m2e.Maven2BuilderConfigurationType"; //$NON-NLS-1$
-
- // pom directory automatically became working directory for maven embedder launch
- public final String ATTR_POM_DIR = IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY;
-
- public final String ATTR_GOALS = "M2_GOALS"; //$NON-NLS-1$
- public final String ATTR_GOALS_AUTO_BUILD = "M2_GOALS_AUTO_BUILD"; //$NON-NLS-1$
- public final String ATTR_GOALS_MANUAL_BUILD = "M2_GOALS_MANUAL_BUILD"; //$NON-NLS-1$
- public final String ATTR_GOALS_CLEAN = "M2_GOALS_CLEAN"; //$NON-NLS-1$
- public final String ATTR_GOALS_AFTER_CLEAN = "M2_GOALS_AFTER_CLEAN"; //$NON-NLS-1$
-
- public final String ATTR_PROFILES = "M2_PROFILES"; //$NON-NLS-1$
- public final String ATTR_PROPERTIES = "M2_PROPERTIES"; //$NON-NLS-1$
-
- public final String ATTR_OFFLINE = "M2_OFFLINE"; //$NON-NLS-1$
- public final String ATTR_UPDATE_SNAPSHOTS = "M2_UPDATE_SNAPSHOTS"; //$NON-NLS-1$
- public final String ATTR_DEBUG_OUTPUT = "M2_DEBUG_OUTPUT"; //$NON-NLS-1$
- public final String ATTR_SKIP_TESTS = "M2_SKIP_TESTS"; //$NON-NLS-1$
- public final String ATTR_NON_RECURSIVE = "M2_NON_RECURSIVE"; //$NON-NLS-1$
- public final String ATTR_WORKSPACE_RESOLUTION = "M2_WORKSPACE_RESOLUTION"; //$NON-NLS-1$
-
- public final String ATTR_USER_SETTINGS = "M2_USER_SETTINGS"; //$NON-NLS-1$
-
- public final String ATTR_RUNTIME = "M2_RUNTIME"; //$NON-NLS-1$
-
- // hidden (for now) list of workspace components to be pushed into maven runtime
- public final String ATTR_FORCED_COMPONENTS_LIST = "M2_FORCED_COMPONENTS_LIST"; //$NON-NLS-1$
-
- public final String ATTR_DISABLED_EXTENSIONS = "M2_DISABLED_EXTENSIONS";
+ public final String PLUGIN_ID = "org.eclipse.m2e.launching";
+
+ // this should correspond with launchConfigurationType.id attribute in plugin.xml!
+ public final String LAUNCH_CONFIGURATION_TYPE_ID = "org.eclipse.m2e.Maven2LaunchConfigurationType"; //$NON-NLS-1$
+
+ public final String BUILDER_CONFIGURATION_TYPE_ID = "org.eclipse.m2e.Maven2BuilderConfigurationType"; //$NON-NLS-1$
+
+ // pom directory automatically became working directory for maven embedder launch
+ public final String ATTR_POM_DIR = IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY;
+
+ public final String ATTR_GOALS = "M2_GOALS"; //$NON-NLS-1$
+
+ public final String ATTR_GOALS_AUTO_BUILD = "M2_GOALS_AUTO_BUILD"; //$NON-NLS-1$
+
+ public final String ATTR_GOALS_MANUAL_BUILD = "M2_GOALS_MANUAL_BUILD"; //$NON-NLS-1$
+
+ public final String ATTR_GOALS_CLEAN = "M2_GOALS_CLEAN"; //$NON-NLS-1$
+
+ public final String ATTR_GOALS_AFTER_CLEAN = "M2_GOALS_AFTER_CLEAN"; //$NON-NLS-1$
+
+ public final String ATTR_PROFILES = "M2_PROFILES"; //$NON-NLS-1$
+
+ public final String ATTR_PROPERTIES = "M2_PROPERTIES"; //$NON-NLS-1$
+
+ public final String ATTR_OFFLINE = "M2_OFFLINE"; //$NON-NLS-1$
+
+ public final String ATTR_UPDATE_SNAPSHOTS = "M2_UPDATE_SNAPSHOTS"; //$NON-NLS-1$
+
+ public final String ATTR_DEBUG_OUTPUT = "M2_DEBUG_OUTPUT"; //$NON-NLS-1$
+
+ public final String ATTR_SKIP_TESTS = "M2_SKIP_TESTS"; //$NON-NLS-1$
+
+ public final String ATTR_NON_RECURSIVE = "M2_NON_RECURSIVE"; //$NON-NLS-1$
+
+ public final String ATTR_WORKSPACE_RESOLUTION = "M2_WORKSPACE_RESOLUTION"; //$NON-NLS-1$
+
+ public final String ATTR_USER_SETTINGS = "M2_USER_SETTINGS"; //$NON-NLS-1$
+
+ public final String ATTR_RUNTIME = "M2_RUNTIME"; //$NON-NLS-1$
+
+ // hidden (for now) list of workspace components to be pushed into maven runtime
+ public final String ATTR_FORCED_COMPONENTS_LIST = "M2_FORCED_COMPONENTS_LIST"; //$NON-NLS-1$
+
+ public final String ATTR_DISABLED_EXTENSIONS = "M2_DISABLED_EXTENSIONS";
}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java
index ea553e23..92878457 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/LaunchingUtils.java
@@ -8,17 +8,20 @@
* Contributors:
* Sonatype, Inc. - initial API and implementation
*******************************************************************************/
+
package org.eclipse.m2e.internal.launch;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.variables.VariablesPlugin;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.variables.VariablesPlugin;
+
+
public class LaunchingUtils {
-
+
private static Logger log = LoggerFactory.getLogger(LaunchingUtils.class);
-
+
/**
* Substitute any variable
*/
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java
index 9443260a..15fc655a 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenConsoleLineTracker.java
@@ -17,7 +17,9 @@ import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import org.codehaus.plexus.util.DirectoryScanner;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -34,10 +36,6 @@ import org.eclipse.debug.ui.console.IConsoleLineTracker;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
-import org.eclipse.m2e.actions.MavenLaunchConstants;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.m2e.core.project.IMavenProjectRegistry;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -46,8 +44,13 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.console.IHyperlink;
import org.eclipse.ui.ide.IDE;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import org.codehaus.plexus.util.DirectoryScanner;
+
+import org.eclipse.m2e.actions.MavenLaunchConstants;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.IMavenProjectRegistry;
/**
@@ -61,13 +64,13 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
private static final String PLUGIN_ID = "org.eclipse.m2e.launching"; //$NON-NLS-1$
private static final String LISTENING_MARKER = "Listening for transport dt_socket at address: ";
-
+
private static final String RUNNING_MARKER = "Running ";
private static final String TEST_TEMPLATE = "(?: )test.+\\(([\\w\\.]+)\\)"; //$NON-NLS-1$
-
+
private static final Pattern PATTERN2 = Pattern.compile(TEST_TEMPLATE);
-
+
private IConsole console;
public void init(IConsole console) {
@@ -79,15 +82,15 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
ILaunch launch = process.getLaunch();
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
- if(launchConfiguration!=null && isMavenProcess(launchConfiguration)) {
+ if(launchConfiguration != null && isMavenProcess(launchConfiguration)) {
try {
int offset = line.getOffset();
int length = line.getLength();
String text = console.getDocument().get(offset, length);
-
+
String testName = null;
-
+
int index = text.indexOf(RUNNING_MARKER);
if(index > -1) {
testName = text.substring(RUNNING_MARKER.length());
@@ -96,24 +99,24 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
} else if(text.startsWith(LISTENING_MARKER)) {
// create and start remote Java app launch configuration
String baseDir = getBaseDir(launchConfiguration);
- if(baseDir!=null) {
+ if(baseDir != null) {
String portString = text.substring(LISTENING_MARKER.length()).trim();
MavenDebugHyperLink link = new MavenDebugHyperLink(baseDir, portString);
console.addLink(link, offset, LISTENING_MARKER.length() + portString.length());
// launchRemoteJavaApp(baseDir, portString);
}
-
+
} else {
Matcher m = PATTERN2.matcher(text);
if(m.find()) {
testName = m.group(1);
offset += m.start(1);
- }
+ }
}
if(testName != null) {
String baseDir = getBaseDir(launchConfiguration);
- if(baseDir!=null) {
+ if(baseDir != null) {
MavenConsoleHyperLink link = new MavenConsoleHyperLink(baseDir, testName);
console.addLink(link, offset, testName.length());
}
@@ -170,19 +173,20 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
<listEntry value="org.eclipse.debug.ui.launchGroup.debug"/>
</listAttribute>
*/
-
+
ILaunchConfigurationWorkingCopy workingCopy = launchConfigurationType.newInstance(null, //
"Connecting debugger to port " + portString);
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_ALLOW_TERMINATE, false);
- workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR, IJavaLaunchConfigurationConstants.ID_SOCKET_ATTACH_VM_CONNECTOR);
-
+ workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_CONNECTOR,
+ IJavaLaunchConfigurationConstants.ID_SOCKET_ATTACH_VM_CONNECTOR);
+
Map<String, String> connectMap = new HashMap<String, String>();
connectMap.put("port", portString); //$NON-NLS-1$
connectMap.put("hostname", "localhost"); //$NON-NLS-1$ //$NON-NLS-2$
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CONNECT_MAP, connectMap);
IProject project = getProject(baseDir);
- if(project!=null) {
+ if(project != null) {
workingCopy.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
}
@@ -200,14 +204,14 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
}
return null;
}
-
-
+
/**
- * Opens a text editor for Maven test report
+ * Opens a text editor for Maven test report
*/
public class MavenConsoleHyperLink implements IHyperlink {
private final String baseDir;
+
private final String testName;
public MavenConsoleHyperLink(String baseDir, String testName) {
@@ -227,11 +231,11 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = window.getActivePage();
-
+
IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor("foo.txt"); //$NON-NLS-1$
-
+
File reportFile = new File(baseDir, includedFiles[0]);
-
+
try {
IDE.openEditor(page, new MavenFileEditorInput(reportFile.getAbsolutePath()), desc.getId());
} catch(PartInitException ex) {
@@ -249,24 +253,25 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
}
/**
- * Creates debug launch configuration for remote Java application. For example,
- * with surefire plugin the following property can be specified:
- * -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"
+ * Creates debug launch configuration for remote Java application. For example, with surefire plugin the following
+ * property can be specified: -Dmaven.surefire.debug=
+ * "-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 -Xnoagent -Djava.compiler=NONE"
*/
public class MavenDebugHyperLink implements IHyperlink {
private final String baseDir;
+
private final String portString;
public MavenDebugHyperLink(String baseDir, String portString) {
this.baseDir = baseDir;
this.portString = portString;
}
-
+
public void linkActivated() {
try {
launchRemoteJavaApp(baseDir, portString);
- } catch (CoreException ex) {
+ } catch(CoreException ex) {
log.error(ex.getMessage(), ex);
}
}
@@ -276,8 +281,7 @@ public class MavenConsoleLineTracker implements IConsoleLineTracker {
public void linkExited() {
}
-
+
}
-
-}
+}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
index d6829ab6..0bb3b970 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenFileEditorInput.java
@@ -23,15 +23,17 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IPersistableElement;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.editors.text.ILocationProvider;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+
+
/**
* Maven file editor input
- *
+ *
* @author Eugene Kuleshov
*/
public class MavenFileEditorInput implements IStorageEditorInput {
@@ -104,7 +106,7 @@ public class MavenFileEditorInput implements IStorageEditorInput {
@SuppressWarnings("rawtypes")
public Object getAdapter(Class adapter) {
- if(adapter==ILocationProvider.class) {
+ if(adapter == ILocationProvider.class) {
return new ILocationProvider() {
public IPath getPath(Object element) {
return Path.fromOSString(fileName);
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
index 7596906b..38dec65f 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchDelegate.java
@@ -20,6 +20,9 @@ import java.util.Collections;
import java.util.List;
import java.util.Set;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
@@ -37,15 +40,14 @@ import org.eclipse.jdt.launching.IVMRunner;
import org.eclipse.jdt.launching.JavaLaunchDelegate;
import org.eclipse.jdt.launching.VMRunnerConfiguration;
import org.eclipse.jdt.launching.sourcelookup.containers.JavaSourceLookupParticipant;
+import org.eclipse.osgi.util.NLS;
+
import org.eclipse.m2e.actions.MavenLaunchConstants;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMavenConfiguration;
import org.eclipse.m2e.core.embedder.IMavenLauncherConfiguration;
import org.eclipse.m2e.core.embedder.MavenRuntime;
import org.eclipse.m2e.core.internal.MavenPluginActivator;
-import org.eclipse.osgi.util.NLS;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
public class MavenLaunchDelegate extends JavaLaunchDelegate implements MavenLaunchConstants {
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java
index 17fb637e..82e5dabb 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchPlugin.java
@@ -13,8 +13,9 @@ package org.eclipse.m2e.internal.launch;
import org.eclipse.core.runtime.Plugin;
+
public class MavenLaunchPlugin extends Plugin {
-
+
private static MavenLaunchPlugin instance;
public MavenLaunchPlugin() {
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
index ed51974d..0418c7ac 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLaunchUtils.java
@@ -17,12 +17,21 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.List;
-import org.apache.maven.artifact.Artifact;
+import org.osgi.framework.Bundle;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.ibm.icu.util.StringTokenizer;
+
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.debug.core.ILaunchConfiguration;
+import org.eclipse.osgi.util.NLS;
+
+import org.apache.maven.artifact.Artifact;
+
import org.eclipse.m2e.actions.MavenLaunchConstants;
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
@@ -31,12 +40,6 @@ import org.eclipse.m2e.core.embedder.MavenRuntime;
import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.core.project.IMavenProjectRegistry;
-import org.eclipse.osgi.util.NLS;
-import org.osgi.framework.Bundle;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import com.ibm.icu.util.StringTokenizer;
/**
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java
index 2bc6b171..8bcb34c2 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenLauncherConfigurationHandler.java
@@ -23,9 +23,11 @@ import java.util.Map;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.osgi.util.NLS;
+
import org.eclipse.m2e.core.embedder.IMavenLauncherConfiguration;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
-import org.eclipse.osgi.util.NLS;
+
/**
* MavenLauncherConfigurationHandler
@@ -35,9 +37,13 @@ import org.eclipse.osgi.util.NLS;
public class MavenLauncherConfigurationHandler implements IMavenLauncherConfiguration {
private String mainType;
+
private String mainRealm;
+
private LinkedHashMap<String, List<String>> realms = new LinkedHashMap<String, List<String>>();
+
private List<String> forcedEntries = new ArrayList<String>();
+
private List<String> curEntries = forcedEntries;
public void addArchiveEntry(String entry) {
@@ -47,13 +53,13 @@ public class MavenLauncherConfigurationHandler implements IMavenLauncherConfigur
public void addProjectEntry(IMavenProjectFacade facade) {
final IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IFolder output = root.getFolder(facade.getOutputLocation());
- if (output.isAccessible()) {
+ if(output.isAccessible()) {
addArchiveEntry(output.getLocation().toFile().getAbsolutePath());
}
}
public void addRealm(String realm) {
- if (!realms.containsKey(realm)) {
+ if(!realms.containsKey(realm)) {
curEntries = new ArrayList<String>();
realms.put(realm, curEntries);
}
@@ -67,17 +73,17 @@ public class MavenLauncherConfigurationHandler implements IMavenLauncherConfigur
public void save(OutputStream os) throws IOException {
BufferedWriter out = new BufferedWriter(new OutputStreamWriter(os, "UTF-8")); //$NON-NLS-1$
out.write(NLS.bind("main is {0} from {1}\n", mainType, mainRealm));
- for (Map.Entry<String, List<String>> realm : realms.entrySet()) {
- if (LAUNCHER_REALM.equals(realm.getKey())) {
+ for(Map.Entry<String, List<String>> realm : realms.entrySet()) {
+ if(LAUNCHER_REALM.equals(realm.getKey())) {
continue;
}
out.write(NLS.bind("[{0}]\n", realm.getKey()));
- if (mainRealm.equals(realm.getKey())) {
- for (String entry : forcedEntries) {
+ if(mainRealm.equals(realm.getKey())) {
+ for(String entry : forcedEntries) {
out.write(NLS.bind("load {0}\n", entry));
}
}
- for (String entry : realm.getValue()) {
+ for(String entry : realm.getValue()) {
out.write(NLS.bind("load {0}\n", entry));
}
}
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java
index 8f3916cf..7475edb7 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/internal/launch/MavenSourcePathComputer.java
@@ -23,8 +23,6 @@ import java.util.Properties;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
-import org.apache.maven.artifact.Artifact;
-import org.codehaus.plexus.util.DirectoryScanner;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Path;
@@ -35,6 +33,11 @@ import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
import org.eclipse.jdt.launching.JavaRuntime;
+
+import org.codehaus.plexus.util.DirectoryScanner;
+
+import org.apache.maven.artifact.Artifact;
+
import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.embedder.IMavenLauncherConfiguration;
@@ -43,11 +46,8 @@ import org.eclipse.m2e.core.project.IMavenProjectFacade;
/**
- * Computes Maven launch configuration default source lookup path.
- *
- * Default source lookup includes Maven core libraries only.
- * It does not (and cannot) include entries for any Maven plugins
- * which are loaded dynamically at runtime.
+ * Computes Maven launch configuration default source lookup path. Default source lookup includes Maven core libraries
+ * only. It does not (and cannot) include entries for any Maven plugins which are loaded dynamically at runtime.
*
* @author Eugene Kuleshov
*/
@@ -74,14 +74,17 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
public void addArchiveEntry(String entry) throws CoreException {
addArchiveRuntimeClasspathEntry(entries, entry);
}
+
public void addProjectEntry(IMavenProjectFacade facade) {
IJavaProject javaProject = JavaCore.create(facade.getProject());
if(javaProject != null) {
entries.add(JavaRuntime.newDefaultProjectClasspathEntry(javaProject));
}
}
+
public void addRealm(String world) {
}
+
public void setMainType(String type, String world) {
}
};
@@ -95,22 +98,22 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
return JavaRuntime.getSourceContainers(resolved);
}
- protected void addArchiveRuntimeClasspathEntry(List<IRuntimeClasspathEntry> entries, String entryPath) throws CoreException {
+ protected void addArchiveRuntimeClasspathEntry(List<IRuntimeClasspathEntry> entries, String entryPath)
+ throws CoreException {
File entryFile = new File(entryPath);
-
- if (!entryFile.exists()) {
+
+ if(!entryFile.exists()) {
return;
}
-
- if (entryFile.isDirectory()) {
+
+ if(entryFile.isDirectory()) {
DirectoryScanner ds = new DirectoryScanner();
ds.setBasedir(entryFile);
- ds.setIncludes(new String[] {
- "META-INF/maven/*/*/pom.properties", //$NON-NLS-1$
+ ds.setIncludes(new String[] {"META-INF/maven/*/*/pom.properties", //$NON-NLS-1$
});
ds.scan();
String[] files = ds.getIncludedFiles();
- for (String file : files) {
+ for(String file : files) {
try {
BufferedInputStream is = new BufferedInputStream(new FileInputStream(new File(entryFile, file)));
try {
@@ -118,7 +121,7 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
} finally {
is.close();
}
- } catch (IOException e) {
+ } catch(IOException e) {
// ignore it
}
@@ -128,24 +131,25 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
JarFile jar = new JarFile(entryFile);
try {
Enumeration<JarEntry> zes = jar.entries();
- while (zes.hasMoreElements()) {
+ while(zes.hasMoreElements()) {
JarEntry ze = zes.nextElement();
String name = ze.getName();
- if (!ze.isDirectory() && name.startsWith("META-INF/maven/") && name.endsWith("pom.properties")) { //$NON-NLS-1$ //$NON-NLS-2$
+ if(!ze.isDirectory() && name.startsWith("META-INF/maven/") && name.endsWith("pom.properties")) { //$NON-NLS-1$ //$NON-NLS-2$
addArchiveRuntimeClasspathEntry(entries, entryPath, jar.getInputStream(ze));
}
}
} finally {
jar.close();
}
- } catch (IOException e) {
+ } catch(IOException e) {
// ignore it
}
}
-
+
}
-
- private void addArchiveRuntimeClasspathEntry(List<IRuntimeClasspathEntry> entries, String entryPath, InputStream is) throws IOException, CoreException {
+
+ private void addArchiveRuntimeClasspathEntry(List<IRuntimeClasspathEntry> entries, String entryPath, InputStream is)
+ throws IOException, CoreException {
Properties p = new Properties();
p.load(is);
@@ -154,8 +158,8 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
String version = p.getProperty("version"); //$NON-NLS-1$
File sourcesJar = getSourcesJar(groupId, artifactId, version);
- if (sourcesJar != null) {
- IRuntimeClasspathEntry entry = null;
+ if(sourcesJar != null) {
+ IRuntimeClasspathEntry entry = null;
entry = JavaRuntime.newArchiveRuntimeClasspathEntry(Path.fromOSString(entryPath));
entry.setSourceAttachmentPath(Path.fromOSString(sourcesJar.getAbsolutePath()));
entries.add(entry);
@@ -163,14 +167,14 @@ public class MavenSourcePathComputer implements ISourcePathComputer {
}
private File getSourcesJar(String groupId, String artifactId, String version) {
- if (groupId != null && artifactId != null && version != null) {
+ if(groupId != null && artifactId != null && version != null) {
IMaven maven = MavenPlugin.getMaven();
try {
Artifact artifact = maven.resolve(groupId, artifactId, version, "jar", "sources", null, null); //$NON-NLS-1$ //$NON-NLS-2$
File file = artifact.getFile();
-
- if (file != null && file.exists() && file.canRead()) {
+
+ if(file != null && file.exists() && file.canRead()) {
return file;
}
} catch(CoreException ex) {
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java
index 2128066e..a1197898 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchConfigurationTabGroup.java
@@ -21,6 +21,7 @@ import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
import org.eclipse.debug.ui.RefreshTab;
import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
+
import org.eclipse.m2e.internal.launch.MavenLaunchParticipantInfo;
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchExtensionsTab.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchExtensionsTab.java
index 3bc9a981..e42a5e44 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchExtensionsTab.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchExtensionsTab.java
@@ -29,9 +29,6 @@ import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.m2e.actions.MavenLaunchConstants;
-import org.eclipse.m2e.internal.launch.MavenLaunchParticipantInfo;
-import org.eclipse.m2e.internal.launch.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
@@ -40,6 +37,10 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
+import org.eclipse.m2e.actions.MavenLaunchConstants;
+import org.eclipse.m2e.internal.launch.MavenLaunchParticipantInfo;
+import org.eclipse.m2e.internal.launch.Messages;
+
public class MavenLaunchExtensionsTab extends AbstractLaunchConfigurationTab {
diff --git a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
index 827fd5e7..83115dd1 100644
--- a/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
+++ b/org.eclipse.m2e.launching/src/org/eclipse/m2e/ui/internal/launch/MavenLaunchMainTab.java
@@ -16,6 +16,9 @@ import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
@@ -35,16 +38,6 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
-import org.eclipse.m2e.actions.MavenLaunchConstants;
-import org.eclipse.m2e.core.MavenPlugin;
-import org.eclipse.m2e.core.embedder.IMavenConfiguration;
-import org.eclipse.m2e.core.embedder.MavenRuntime;
-import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
-import org.eclipse.m2e.core.ui.internal.MavenImages;
-import org.eclipse.m2e.core.ui.internal.dialogs.MavenGoalSelectionDialog;
-import org.eclipse.m2e.core.ui.internal.dialogs.MavenPropertyDialog;
-import org.eclipse.m2e.internal.launch.LaunchingUtils;
-import org.eclipse.m2e.internal.launch.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.FocusAdapter;
import org.eclipse.swt.events.FocusEvent;
@@ -69,12 +62,21 @@ import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.ContainerSelectionDialog;
import org.eclipse.ui.dialogs.PreferencesUtil;
import org.eclipse.ui.externaltools.internal.model.IExternalToolConstants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+
+import org.eclipse.m2e.actions.MavenLaunchConstants;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenRuntime;
+import org.eclipse.m2e.core.embedder.MavenRuntimeManager;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenGoalSelectionDialog;
+import org.eclipse.m2e.core.ui.internal.dialogs.MavenPropertyDialog;
+import org.eclipse.m2e.internal.launch.LaunchingUtils;
+import org.eclipse.m2e.internal.launch.Messages;
/**
- * Maven Launch dialog Main tab
+ * Maven Launch dialog Main tab
*
* @author Dmitri Maximovich
* @author Eugene Kuleshov
@@ -86,16 +88,21 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
public static final String ID_EXTERNAL_TOOLS_LAUNCH_GROUP = "org.eclipse.ui.externaltools.launchGroup"; //$NON-NLS-1$
private final boolean isBuilder;
-
+
protected Text pomDirNameText;
protected Text goalsText;
+
protected Text goalsAutoBuildText;
+
protected Text goalsManualBuildText;
+
protected Text goalsCleanText;
+
protected Text goalsAfterCleanText;
-
+
protected Text profilesText;
+
protected Table propsTable;
private Button offlineButton;
@@ -105,17 +112,16 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
private Button debugOutputButton;
private Button skipTestsButton;
-
+
private Button nonRecursiveButton;
-
+
private Button enableWorkspaceResolution;
private Button removePropButton;
-
+
private Button editPropButton;
-
- ComboViewer runtimeComboViewer;
+ ComboViewer runtimeComboViewer;
public MavenLaunchMainTab(boolean isBuilder) {
this.isBuilder = isBuilder;
@@ -174,13 +180,13 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
ContainerSelectionDialog dialog = new ContainerSelectionDialog(getShell(), //
ResourcesPlugin.getWorkspace().getRoot(), false, Messages.launchChoosePomDir); //$NON-NLS-1$
dialog.showClosedProjects(false);
-
+
int buttonId = dialog.open();
if(buttonId == IDialogConstants.OK_ID) {
Object[] resource = dialog.getResult();
if(resource != null && resource.length > 0) {
- String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression(
- "workspace_loc", ((IPath) resource[0]).toString()); //$NON-NLS-1$
+ String fileLoc = VariablesPlugin.getDefault().getStringVariableManager()
+ .generateVariableExpression("workspace_loc", ((IPath) resource[0]).toString()); //$NON-NLS-1$
pomDirNameText.setText(fileLoc);
entriesChanged();
}
@@ -214,7 +220,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
}
});
-
+
// pom file
// goals
@@ -248,7 +254,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
goalsManualBuildButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
goalsManualBuildButton.setText(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_btnManualBuild);
goalsManualBuildButton.addSelectionListener(new GoalSelectionAdapter(goalsManualBuildText));
-
+
Label cleanBuildGoalsLabel = new Label(mainComposite, SWT.NONE);
cleanBuildGoalsLabel.setText(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_lblCleanBuild);
goalsCleanText = new Text(mainComposite, SWT.BORDER);
@@ -259,7 +265,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
goalsCleanButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
goalsCleanButton.setText(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_btnCleanBuild);
goalsCleanButton.addSelectionListener(new GoalSelectionAdapter(goalsCleanText));
-
+
Label afterCleanGoalsLabel = new Label(mainComposite, SWT.NONE);
afterCleanGoalsLabel.setText(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_lblAfterClean);
goalsAfterCleanText = new Text(mainComposite, SWT.BORDER);
@@ -270,7 +276,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
goalsAfterCleanButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false));
goalsAfterCleanButton.setText(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_btnAfterClean);
goalsAfterCleanButton.addSelectionListener(new GoalSelectionAdapter(goalsAfterCleanText));
-
+
} else {
Label goalsLabel = new Label(mainComposite, SWT.NONE);
GridData gd_goalsLabel = new GridData();
@@ -358,14 +364,14 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
}
});
- tableViewer.addSelectionChangedListener(new ISelectionChangedListener(){
+ tableViewer.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
TableItem[] items = propsTable.getSelection();
- if(items == null || items.length == 0){
+ if(items == null || items.length == 0) {
editPropButton.setEnabled(false);
removePropButton.setEnabled(false);
- } else if(items.length == 1){
+ } else if(items.length == 1) {
editPropButton.setEnabled(true);
removePropButton.setEnabled(true);
} else {
@@ -373,12 +379,12 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
removePropButton.setEnabled(true);
}
}
-
+
});
-
+
this.propsTable = tableViewer.getTable();
//this.tProps.setItemCount(10);
- this.propsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 3));
+ this.propsTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 4, 3));
this.propsTable.setLinesVisible(true);
this.propsTable.setHeaderVisible(true);
@@ -458,12 +464,12 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
entriesChanged();
}
});
-
+
MavenRuntimeManager runtimeManager = MavenPlugin.getMavenRuntimeManager();
runtimeComboViewer.setInput(runtimeManager.getMavenRuntimes());
runtimeComboViewer.setSelection(new StructuredSelection(runtimeManager.getDefaultRuntime()));
}
-
+
Button configureRuntimesButton = new Button(mainComposite, SWT.NONE);
GridData gd_configureRuntimesButton = new GridData(SWT.FILL, SWT.CENTER, false, false);
configureRuntimesButton.setLayoutData(gd_configureRuntimesButton);
@@ -477,20 +483,21 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
runtimeComboViewer.setSelection(new StructuredSelection(runtimeManager.getDefaultRuntime()));
}
});
-
+
if(isBuilder) {
goalsAutoBuildText.setFocus();
} else {
goalsText.setFocus();
}
}
-
+
protected Shell getShell() {
return super.getShell();
}
void addProperty() {
- MavenPropertyDialog dialog = getMavenPropertyDialog(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_property_dialog_title, "", ""); //$NON-NLS-2$ //$NON-NLS-3$
+ MavenPropertyDialog dialog = getMavenPropertyDialog(
+ org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_property_dialog_title, "", ""); //$NON-NLS-2$ //$NON-NLS-3$
if(dialog.open() == IDialogConstants.OK_ID) {
TableItem item = new TableItem(propsTable, SWT.NONE);
item.setText(0, dialog.getName());
@@ -500,7 +507,8 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
void editProperty(String name, String value) {
- MavenPropertyDialog dialog = getMavenPropertyDialog(org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_property_dialog_edit_title, name, value);
+ MavenPropertyDialog dialog = getMavenPropertyDialog(
+ org.eclipse.m2e.internal.launch.Messages.MavenLaunchMainTab_property_dialog_edit_title, name, value);
if(dialog.open() == IDialogConstants.OK_ID) {
TableItem[] item = propsTable.getSelection();
item[0].setText(0, dialog.getName());
@@ -522,7 +530,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
variablesButton.setLayoutData(gd);
variablesButton.setFont(comp.getFont());
variablesButton.setText(Messages.launchPropertyDialogBrowseVariables); //$NON-NLS-1$;
-
+
variablesButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent se) {
StringVariableSelectionDialog variablesDialog = new StringVariableSelectionDialog(getShell());
@@ -534,19 +542,19 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
}
});
-
+
return comp;
}
};
}
-
+
public void initializeFrom(ILaunchConfiguration configuration) {
String pomDirName = getAttribute(configuration, ATTR_POM_DIR, ""); //$NON-NLS-1$
- if(isBuilder && pomDirName.length()==0) {
+ if(isBuilder && pomDirName.length() == 0) {
pomDirName = "${workspace_loc:/" + configuration.getFile().getProject().getName() + "}"; //$NON-NLS-1$ //$NON-NLS-2$
}
this.pomDirNameText.setText(pomDirName);
-
+
if(isBuilder) {
this.goalsAutoBuildText.setText(getAttribute(configuration, ATTR_GOALS_AUTO_BUILD, "install")); //$NON-NLS-1$
this.goalsManualBuildText.setText(getAttribute(configuration, ATTR_GOALS_MANUAL_BUILD, "install")); //$NON-NLS-1$
@@ -555,28 +563,29 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
} else {
this.goalsText.setText(getAttribute(configuration, ATTR_GOALS, "")); //$NON-NLS-1$
}
-
+
this.profilesText.setText(getAttribute(configuration, ATTR_PROFILES, "")); //$NON-NLS-1$
try {
-
+
MavenRuntimeManager runtimeManager = MavenPlugin.getMavenRuntimeManager();
IMavenConfiguration mavenConfiguration = MavenPlugin.getMavenConfiguration();
-
+
this.offlineButton.setSelection(getAttribute(configuration, ATTR_OFFLINE, mavenConfiguration.isOffline()));
- this.debugOutputButton.setSelection(getAttribute(configuration, ATTR_DEBUG_OUTPUT, mavenConfiguration.isDebugOutput()));
-
+ this.debugOutputButton.setSelection(getAttribute(configuration, ATTR_DEBUG_OUTPUT,
+ mavenConfiguration.isDebugOutput()));
+
this.updateSnapshotsButton.setSelection(getAttribute(configuration, ATTR_UPDATE_SNAPSHOTS, false));
this.skipTestsButton.setSelection(getAttribute(configuration, ATTR_SKIP_TESTS, false));
this.nonRecursiveButton.setSelection(getAttribute(configuration, ATTR_NON_RECURSIVE, false));
this.enableWorkspaceResolution.setSelection(getAttribute(configuration, ATTR_WORKSPACE_RESOLUTION, false));
-
+
String location = getAttribute(configuration, ATTR_RUNTIME, ""); //$NON-NLS-1$
MavenRuntime runtime = runtimeManager.getRuntime(location);
- if(runtime != null){
+ if(runtime != null) {
this.runtimeComboViewer.setSelection(new StructuredSelection(runtime));
- }
+ }
propsTable.removeAll();
-
+
@SuppressWarnings("unchecked")
List<String> properties = configuration.getAttribute(ATTR_PROPERTIES, Collections.EMPTY_LIST);
for(String property : properties) {
@@ -589,7 +598,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
value = property.substring(n + 1);
}
}
-
+
TableItem item = new TableItem(propsTable, SWT.NONE);
item.setText(0, name);
item.setText(1, value);
@@ -599,7 +608,7 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
setDirty(false);
}
-
+
private String getAttribute(ILaunchConfiguration configuration, String name, String defaultValue) {
try {
return configuration.getAttribute(name, defaultValue);
@@ -616,38 +625,38 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
return defaultValue;
}
}
-
+
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
}
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
configuration.setAttribute(ATTR_POM_DIR, this.pomDirNameText.getText());
-
+
if(isBuilder) {
configuration.setAttribute(ATTR_GOALS_AUTO_BUILD, goalsAutoBuildText.getText());
configuration.setAttribute(ATTR_GOALS_MANUAL_BUILD, this.goalsManualBuildText.getText());
configuration.setAttribute(ATTR_GOALS_CLEAN, this.goalsCleanText.getText());
configuration.setAttribute(ATTR_GOALS_AFTER_CLEAN, this.goalsAfterCleanText.getText());
-
+
StringBuffer sb = new StringBuffer();
- if(goalsAfterCleanText.getText().trim().length()>0) {
+ if(goalsAfterCleanText.getText().trim().length() > 0) {
sb.append(IExternalToolConstants.BUILD_TYPE_FULL).append(',');
}
- if(goalsManualBuildText.getText().trim().length()>0) {
+ if(goalsManualBuildText.getText().trim().length() > 0) {
sb.append(IExternalToolConstants.BUILD_TYPE_INCREMENTAL).append(',');
}
- if(goalsAutoBuildText.getText().trim().length()>0) {
+ if(goalsAutoBuildText.getText().trim().length() > 0) {
sb.append(IExternalToolConstants.BUILD_TYPE_AUTO).append(',');
}
- if(goalsCleanText.getText().trim().length()>0) {
+ if(goalsCleanText.getText().trim().length() > 0) {
sb.append(IExternalToolConstants.BUILD_TYPE_CLEAN);
}
configuration.setAttribute(IExternalToolConstants.ATTR_RUN_BUILD_KINDS, sb.toString());
-
+
} else {
configuration.setAttribute(ATTR_GOALS, this.goalsText.getText());
}
-
+
configuration.setAttribute(ATTR_PROFILES, this.profilesText.getText());
configuration.setAttribute(ATTR_OFFLINE, this.offlineButton.getSelection());
@@ -716,21 +725,19 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
updateLaunchConfigurationDialog();
}
-
private static final class GoalsFocusListener extends FocusAdapter {
private Text text;
public GoalsFocusListener(Text text) {
this.text = text;
}
-
+
public void focusGained(FocusEvent e) {
super.focusGained(e);
text.setData("focus"); //$NON-NLS-1$
}
}
-
private final class GoalSelectionAdapter extends SelectionAdapter {
private Text text;
@@ -748,12 +755,12 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
MavenGoalSelectionDialog dialog = new MavenGoalSelectionDialog(getShell());
int rc = dialog.open();
if(rc == IDialogConstants.OK_ID) {
- text.insert(""); // clear selected text //$NON-NLS-1$
-
+ text.insert(""); // clear selected text //$NON-NLS-1$
+
String txt = text.getText();
int len = txt.length();
int pos = text.getCaretPosition();
-
+
StringBuffer sb = new StringBuffer();
if((pos > 0 && txt.charAt(pos - 1) != ' ')) {
sb.append(' ');
@@ -771,16 +778,16 @@ public class MavenLaunchMainTab extends AbstractLaunchConfigurationTab implement
}
sep = " "; //$NON-NLS-1$
}
-
+
if(pos < len && txt.charAt(pos) != ' ') {
sb.append(' ');
}
-
+
text.insert(sb.toString());
text.setFocus();
entriesChanged();
}
}
}
-
+
}

Back to the top