eclipse plugin: It seems that the latest source format...
...didn't work how I thought.
This commit is contained in:
parent
9be9b78208
commit
dd75660284
143 changed files with 661 additions and 696 deletions
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -379,13 +379,13 @@ public class WMLProposalProvider extends AbstractWMLProposalProvider
|
|||
|
||||
/**
|
||||
* Returns the proposal for the specified tag, usign the specified indent
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The tag from which to construct the proposal
|
||||
* The tag from which to construct the proposal
|
||||
* @param indent
|
||||
* The indent used to indent the tag and subsequent keys
|
||||
* The indent used to indent the tag and subsequent keys
|
||||
* @param ruleProposal
|
||||
* Whether this is a proposal for an entire rule or not
|
||||
* Whether this is a proposal for an entire rule or not
|
||||
* @param context
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -114,7 +114,7 @@ public class WMLEditor extends XtextEditor
|
|||
|
||||
/**
|
||||
* Gets current edited file.
|
||||
*
|
||||
*
|
||||
* @return An IFile instance
|
||||
*/
|
||||
public static IFile getActiveEditorFile( )
|
||||
|
@ -124,9 +124,9 @@ public class WMLEditor extends XtextEditor
|
|||
|
||||
/**
|
||||
* Gets the edited file from the specified editor
|
||||
*
|
||||
*
|
||||
* @param editor
|
||||
* The editor to get the file from
|
||||
* The editor to get the file from
|
||||
* @return An IFile instance
|
||||
*/
|
||||
public static IFile getEditorFile( XtextEditor editor )
|
||||
|
@ -140,7 +140,7 @@ public class WMLEditor extends XtextEditor
|
|||
/**
|
||||
* Here it comes the part that handles external files
|
||||
* (from outside the workspace)
|
||||
*
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* Copyright (c) 2010, Cloudsmith Inc.
|
||||
|
@ -199,7 +199,7 @@ public class WMLEditor extends XtextEditor
|
|||
/**
|
||||
* Overridden to allow customization of editor context menu via injected
|
||||
* handler
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.ui.editors.text.TextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
|
||||
*/
|
||||
@Override
|
||||
|
@ -277,7 +277,7 @@ public class WMLEditor extends XtextEditor
|
|||
|
||||
/**
|
||||
* Throws WrappedException - the URI must refer to an existing file!
|
||||
*
|
||||
*
|
||||
* @param uri
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,7 +12,7 @@ import org.eclipse.xtext.ui.label.DefaultDescriptionLabelProvider;
|
|||
|
||||
/**
|
||||
* Provides labels for a IEObjectDescriptions and IResourceDescriptions.
|
||||
*
|
||||
*
|
||||
* see
|
||||
* http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
|
||||
*/
|
||||
|
@ -22,11 +22,11 @@ public class WMLDescriptionLabelProvider extends
|
|||
|
||||
/*
|
||||
* //Labels and icons can be computed like this:
|
||||
*
|
||||
*
|
||||
* String text(IEObjectDescription ele) {
|
||||
* return "my "+ele.getName();
|
||||
* }
|
||||
*
|
||||
*
|
||||
* String image(IEObjectDescription ele) {
|
||||
* return ele.getEClass().getName() + ".gif";
|
||||
* }
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -20,7 +20,7 @@ import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
|
|||
|
||||
/**
|
||||
* Provides labels for a EObjects.
|
||||
*
|
||||
*
|
||||
* see
|
||||
* http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -17,14 +17,14 @@ public interface IWMLDocProvider
|
|||
{
|
||||
/**
|
||||
* Gets the title of the wmldoc dialog
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getTitle( );
|
||||
|
||||
/**
|
||||
* Gets the text to be written in the info statusbar
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getInfoText( );
|
||||
|
@ -32,14 +32,14 @@ public interface IWMLDocProvider
|
|||
/**
|
||||
* Gets the contents to be written into the
|
||||
* styledtext control of the wmldoc dialog
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getContents( );
|
||||
|
||||
/**
|
||||
* Gets an array of StyleRange used to style the contents
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public StyleRange[] getStyleRanges( );
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -74,7 +74,7 @@ public class WMLDocMacro implements IWMLDocProvider
|
|||
|
||||
/**
|
||||
* Adds a style range to current list
|
||||
*
|
||||
*
|
||||
* @param offset
|
||||
* @param length
|
||||
* @param style
|
||||
|
@ -110,7 +110,7 @@ public class WMLDocMacro implements IWMLDocProvider
|
|||
|
||||
/**
|
||||
* Gets the associated macro
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Define getMacro( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -80,7 +80,7 @@ public class WMLDocTag implements IWMLDocProvider
|
|||
|
||||
/**
|
||||
* Adds a style range to current list
|
||||
*
|
||||
*
|
||||
* @param offset
|
||||
* @param length
|
||||
* @param style
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -60,17 +60,17 @@ public class WMLHyperlinkHelper extends HyperlinkHelper
|
|||
|
||||
/**
|
||||
* Creates a hyperlink for opening the macro definition
|
||||
*
|
||||
*
|
||||
* @param paths
|
||||
* The paths variable for the current install
|
||||
* The paths variable for the current install
|
||||
* @param file
|
||||
* The current edited file
|
||||
* The current edited file
|
||||
* @param object
|
||||
* The current object
|
||||
* The current object
|
||||
* @param acceptor
|
||||
* The hyperlink acceptor
|
||||
* The hyperlink acceptor
|
||||
* @param node
|
||||
* The node model representation of the macro
|
||||
* The node model representation of the macro
|
||||
*/
|
||||
private void createMacroHyperlink( Paths paths, IFile file, EObject object,
|
||||
IHyperlinkAcceptor acceptor, ICompositeNode node )
|
||||
|
@ -109,15 +109,15 @@ public class WMLHyperlinkHelper extends HyperlinkHelper
|
|||
|
||||
/**
|
||||
* Creates a hyperlink for opening the map ( if applying )
|
||||
*
|
||||
*
|
||||
* @param paths
|
||||
* The paths variable for the current install
|
||||
* The paths variable for the current install
|
||||
* @param object
|
||||
* The current object
|
||||
* The current object
|
||||
* @param acceptor
|
||||
* The hyperlink acceptor
|
||||
* The hyperlink acceptor
|
||||
* @param node
|
||||
* The node model representation of the macro
|
||||
* The node model representation of the macro
|
||||
*/
|
||||
private void createMapHyperlink( Paths paths, EObject object,
|
||||
IHyperlinkAcceptor acceptor, ICompositeNode node )
|
||||
|
|
|
@ -9,7 +9,7 @@ import org.wesnoth.wml.WMLRoot;
|
|||
|
||||
/**
|
||||
* customization of the default outline structure
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class WMLOutlineTreeProvider extends DefaultOutlineTreeProvider
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -130,13 +130,13 @@ public class WMLSemanticHighlightingCalculator implements
|
|||
/**
|
||||
* Copied from org.eclipse.xtext.xtext.ui.editor.syntaxcoloring.
|
||||
* SemanticHighlightingCalculator
|
||||
*
|
||||
*
|
||||
* @param node
|
||||
* The node to highlight
|
||||
* The node to highlight
|
||||
* @param id
|
||||
* The id of the coloring
|
||||
* The id of the coloring
|
||||
* @param acceptor
|
||||
* The acceptor to add the node to
|
||||
* The acceptor to add the node to
|
||||
*/
|
||||
private void highlightNode( INode node, String id,
|
||||
IHighlightedPositionAcceptor acceptor )
|
||||
|
@ -160,11 +160,11 @@ public class WMLSemanticHighlightingCalculator implements
|
|||
/**
|
||||
* Copied from org.eclipse.xtext.xtext.ui.editor.syntaxcoloring.
|
||||
* SemanticHighlightingCalculator
|
||||
*
|
||||
*
|
||||
* @param semantic
|
||||
* The object to search in
|
||||
* The object to search in
|
||||
* @param feature
|
||||
* The feature to search for
|
||||
* The feature to search for
|
||||
* @return Null if there is no feature, or an {@link INode} node
|
||||
*/
|
||||
public INode getFirstFeatureNode( EObject semantic,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -56,8 +56,7 @@ public class Logger
|
|||
return;
|
||||
}
|
||||
try {
|
||||
if( WorkspaceUtils.getTemporaryFolder( ) == null )
|
||||
{
|
||||
if( WorkspaceUtils.getTemporaryFolder( ) == null ) {
|
||||
throw new IOException( "Could not create the temporary folder." ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -110,9 +109,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Prints a message to the error log (severity: info)
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* The message to log
|
||||
* The message to log
|
||||
*/
|
||||
public void log( String message )
|
||||
{
|
||||
|
@ -121,9 +120,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Logs a warning message
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* The message to log
|
||||
* The message to log
|
||||
*/
|
||||
public void logWarn( String message )
|
||||
{
|
||||
|
@ -132,9 +131,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Logs an error message
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* The message to log
|
||||
* The message to log
|
||||
*/
|
||||
public void logError( String message )
|
||||
{
|
||||
|
@ -143,9 +142,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Logs the specified exception, providing the stacktrace to the console
|
||||
*
|
||||
*
|
||||
* @param e
|
||||
* The exception to log
|
||||
* The exception to log
|
||||
*/
|
||||
public void logException( Exception e )
|
||||
{
|
||||
|
@ -154,9 +153,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Logs the specified exception, providing the stacktrace to the console
|
||||
*
|
||||
*
|
||||
* @param e
|
||||
* The exception to log
|
||||
* The exception to log
|
||||
*/
|
||||
public void logToolException( Exception e )
|
||||
{
|
||||
|
@ -180,11 +179,11 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Logs the message (severity: info) showing also a messagebox to the user
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* The message to log
|
||||
* The message to log
|
||||
* @param guiMessage
|
||||
* The message to show to the user
|
||||
* The message to show to the user
|
||||
*/
|
||||
public void log( String message, String guiMessage )
|
||||
{
|
||||
|
@ -194,11 +193,11 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Prints a message to the error log with the specified severity
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* the message to log
|
||||
* the message to log
|
||||
* @param severity
|
||||
* the severity level from IStatus enum
|
||||
* the severity level from IStatus enum
|
||||
*/
|
||||
public void log( String message, int severity )
|
||||
{
|
||||
|
@ -207,9 +206,9 @@ public class Logger
|
|||
|
||||
/**
|
||||
* Prints a message to the tool launch log (severity: info)
|
||||
*
|
||||
*
|
||||
* @param message
|
||||
* The message to log
|
||||
* The message to log
|
||||
*/
|
||||
public void logTool( String message )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -80,7 +80,7 @@ public class WesnothPlugin extends AbstractUIPlugin
|
|||
|
||||
/**
|
||||
* Returns the shared instance
|
||||
*
|
||||
*
|
||||
* @return the shared instance
|
||||
*/
|
||||
public static WesnothPlugin getDefault( )
|
||||
|
@ -91,9 +91,9 @@ public class WesnothPlugin extends AbstractUIPlugin
|
|||
/**
|
||||
* Returns an image descriptor for the image file at the given plug-in
|
||||
* relative path
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* the path
|
||||
* the path
|
||||
* @return the image descriptor
|
||||
*/
|
||||
public static ImageDescriptor getImageDescriptor( String path )
|
||||
|
@ -103,7 +103,7 @@ public class WesnothPlugin extends AbstractUIPlugin
|
|||
|
||||
/**
|
||||
* Returns the plugin's shell
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static Shell getShell( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -35,7 +35,7 @@ public class WesnothProjectReport extends ObjectActionDelegate
|
|||
|
||||
/**
|
||||
* Gets the report for specified container (sceanarios, maps, units)
|
||||
*
|
||||
*
|
||||
* @param container
|
||||
* @return
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -69,10 +69,10 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Create the whole dependency list from scratch.
|
||||
*
|
||||
*
|
||||
* @param force
|
||||
* True for force re-creating the list even if it
|
||||
* was previously created
|
||||
* True for force re-creating the list even if it
|
||||
* was previously created
|
||||
*/
|
||||
public void createDependencyList( boolean force )
|
||||
{
|
||||
|
@ -95,9 +95,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Adds a new node in the PDL
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to add
|
||||
* The file to add
|
||||
* @return The newly created node
|
||||
*/
|
||||
public DependencyListNode addNode( IFile file )
|
||||
|
@ -192,9 +192,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Adds the containers and their contents to the list
|
||||
*
|
||||
*
|
||||
* @param containerList
|
||||
* The list of container paths
|
||||
* The list of container paths
|
||||
*/
|
||||
private void internal_addContainers( Collection< String > containerList )
|
||||
{
|
||||
|
@ -205,9 +205,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Add the container and it's contents to the list
|
||||
*
|
||||
*
|
||||
* @param containerPath
|
||||
* The path of the container
|
||||
* The path of the container
|
||||
*/
|
||||
private void internal_addContainer( String containerPath )
|
||||
{
|
||||
|
@ -311,9 +311,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Adds a new node to this list
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to add
|
||||
* The file to add
|
||||
* @return The newly created node
|
||||
*/
|
||||
private DependencyListNode internal_addNode( IFile file )
|
||||
|
@ -374,9 +374,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Removes a node specified by the file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to remove from the list
|
||||
* The file to remove from the list
|
||||
*/
|
||||
public void removeNode( IFile file )
|
||||
{
|
||||
|
@ -385,9 +385,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Removes the specified node from the list
|
||||
*
|
||||
*
|
||||
* @param node
|
||||
* The node to remove from the list
|
||||
* The node to remove from the list
|
||||
*/
|
||||
public void removeNode( DependencyListNode node )
|
||||
{
|
||||
|
@ -431,9 +431,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Removes the container and all it's contents from the list
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The container's path
|
||||
* The container's path
|
||||
*/
|
||||
private void internal_removeContainer( String path )
|
||||
{
|
||||
|
@ -471,9 +471,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Updates the current node in the list
|
||||
*
|
||||
*
|
||||
* @param node
|
||||
* The node to update
|
||||
* The node to update
|
||||
*/
|
||||
public void updateNode( DependencyListNode node )
|
||||
{
|
||||
|
@ -609,9 +609,9 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the node specified by the file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to get the depedency node for
|
||||
* The file to get the depedency node for
|
||||
* @return An instance of {@link DependencyListNode}
|
||||
*/
|
||||
public DependencyListNode getNode( IFile file )
|
||||
|
@ -623,9 +623,9 @@ public class DependencyListBuilder implements Serializable
|
|||
* Returns the node specified by the key. The keys are
|
||||
* usually project-relative paths for project's files, or
|
||||
* the {@link #ROOT_NODE_KEY}
|
||||
*
|
||||
*
|
||||
* @param key
|
||||
* The key to get the node by
|
||||
* The key to get the node by
|
||||
* @return An instance of {@link DependencyListNode}
|
||||
*/
|
||||
public DependencyListNode getNode( String key )
|
||||
|
@ -635,7 +635,7 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* Returns true if the list was already created, false otherwise
|
||||
*
|
||||
*
|
||||
* @return A boolean value
|
||||
*/
|
||||
public boolean getIsCreated( )
|
||||
|
@ -680,7 +680,7 @@ public class DependencyListBuilder implements Serializable
|
|||
|
||||
/**
|
||||
* The class that represents the entry in the list of included directories
|
||||
*
|
||||
*
|
||||
*/
|
||||
protected static class ListDirectoryEntry implements Serializable
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -23,7 +23,7 @@ import org.wesnoth.utils.ResourceUtils;
|
|||
/**
|
||||
* This class represents a node in the Project's Depedency list,
|
||||
* which is constructed on a full build of the project.
|
||||
*
|
||||
*
|
||||
* Alternatively, a list node is created
|
||||
* when a new resource is added.
|
||||
*/
|
||||
|
@ -35,7 +35,7 @@ public class DependencyListNode implements Serializable
|
|||
* This integer represents the default step between 2 file indexes.
|
||||
* Since int it's on 4 bytes, it can hold values between
|
||||
* -2,147,483,648 and 2,147,483,647.
|
||||
*
|
||||
*
|
||||
* With an increment of 100k, we could have 2 * 21,474 config files.
|
||||
*/
|
||||
public static final int INDEX_STEP = 100000;
|
||||
|
@ -66,7 +66,7 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Gets this node's file
|
||||
*
|
||||
*
|
||||
* @return A IFile resource
|
||||
*/
|
||||
public IFile getFile( )
|
||||
|
@ -76,10 +76,10 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Gets the includes from this node
|
||||
*
|
||||
*
|
||||
* @param refresh
|
||||
* True to force reloading the current file and return
|
||||
* the newly parsed ones
|
||||
* True to force reloading the current file and return
|
||||
* the newly parsed ones
|
||||
* @return A set with string paths for included directories
|
||||
*/
|
||||
public List< String > getIncludes( boolean refresh )
|
||||
|
@ -94,7 +94,7 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the index of this node in the whole dependency list
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public int getIndex( )
|
||||
|
@ -104,9 +104,9 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Sets a new index for this node
|
||||
*
|
||||
*
|
||||
* @param index
|
||||
* The index to set
|
||||
* The index to set
|
||||
*/
|
||||
protected void setIndex( int index )
|
||||
{
|
||||
|
@ -121,7 +121,7 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Gets the node before the current node
|
||||
*
|
||||
*
|
||||
* @return A node or null if there is no parent
|
||||
*/
|
||||
public DependencyListNode getPrevious( )
|
||||
|
@ -131,9 +131,9 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Sets a new previous node for this node
|
||||
*
|
||||
*
|
||||
* @param previous
|
||||
* The new previous node to set
|
||||
* The new previous node to set
|
||||
*/
|
||||
public void setPrevious( DependencyListNode previous )
|
||||
{
|
||||
|
@ -142,7 +142,7 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Gets the node after the current node
|
||||
*
|
||||
*
|
||||
* @return A node or null if there is no parent
|
||||
*/
|
||||
public DependencyListNode getNext( )
|
||||
|
@ -152,9 +152,9 @@ public class DependencyListNode implements Serializable
|
|||
|
||||
/**
|
||||
* Sets a new next node for this node
|
||||
*
|
||||
*
|
||||
* @param next
|
||||
* The new next node to set
|
||||
* The new next node to set
|
||||
*/
|
||||
public void setNext( DependencyListNode next )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -49,9 +49,9 @@ public class ToggleWesnothNatureAction extends ObjectActionDelegate
|
|||
|
||||
/**
|
||||
* Toggles sample nature on a project
|
||||
*
|
||||
*
|
||||
* @param project
|
||||
* to have sample nature added or removed
|
||||
* to have sample nature added or removed
|
||||
*/
|
||||
public void toggleNature( IProject project )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -49,9 +49,9 @@ public class ToggleXtextNatureAction extends ObjectActionDelegate
|
|||
|
||||
/**
|
||||
* Toggles sample nature on a project
|
||||
*
|
||||
*
|
||||
* @param project
|
||||
* to have sample nature added or removed
|
||||
* to have sample nature added or removed
|
||||
*/
|
||||
public void toggleNature( IProject project )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -48,7 +48,7 @@ import org.wesnoth.wml.WMLConfig;
|
|||
/**
|
||||
* The builder does the following steps in order to create and ensure
|
||||
* a correct PDL (Project Dependency Lits)
|
||||
*
|
||||
*
|
||||
* 1) remove REMOVED files from the PDL
|
||||
* 2) parse ADDED or CHANGED files, to check if new directory/file includes
|
||||
* happened
|
||||
|
@ -137,9 +137,9 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
|
|||
|
||||
/**
|
||||
* Does a full build on this project
|
||||
*
|
||||
*
|
||||
* @param monitor
|
||||
* The monitor used to signal progress
|
||||
* The monitor used to signal progress
|
||||
* @return True if there were config files processed
|
||||
* @throws CoreException
|
||||
*/
|
||||
|
@ -175,11 +175,11 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
|
|||
|
||||
/**
|
||||
* Does an incremental build on this project
|
||||
*
|
||||
*
|
||||
* @param delta
|
||||
* The delta which contains the project modifications
|
||||
* The delta which contains the project modifications
|
||||
* @param monitor
|
||||
* The monitor used to signal progress
|
||||
* The monitor used to signal progress
|
||||
* @return True if there were config files processed
|
||||
* @throws CoreException
|
||||
*/
|
||||
|
@ -277,12 +277,12 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
|
|||
|
||||
/**
|
||||
* Runs the ant job that copies the project in user add-ons directory
|
||||
*
|
||||
*
|
||||
* @param paths
|
||||
* The paths instance which contains the paths to wesnoth
|
||||
* utilities
|
||||
* The paths instance which contains the paths to wesnoth
|
||||
* utilities
|
||||
* @param monitor
|
||||
* The monitor used to signal progress
|
||||
* The monitor used to signal progress
|
||||
* @return true or false whether the job completed successfully
|
||||
*/
|
||||
private boolean runAntJob( Paths paths, IProgressMonitor monitor )
|
||||
|
@ -336,8 +336,7 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
|
|||
|
||||
List< String > defines = new ArrayList< String >( );
|
||||
// parse the core only if we don't have any macros file
|
||||
if( ! new File( macrosFilePath ).exists( ) )
|
||||
{
|
||||
if( ! new File( macrosFilePath ).exists( ) ) {
|
||||
defines.add( "SKIP_CORE" ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -392,7 +391,7 @@ public class WesnothProjectBuilder extends IncrementalProjectBuilder
|
|||
|
||||
/**
|
||||
* Run the wmlscope for the specified file
|
||||
*
|
||||
*
|
||||
* @param monitor
|
||||
* @param file
|
||||
* @throws CoreException
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -13,10 +13,10 @@ import org.eclipse.xtext.formatting.impl.FormattingConfig;
|
|||
|
||||
/**
|
||||
* This class contains custom formatting description.
|
||||
*
|
||||
*
|
||||
* see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#formatting
|
||||
* on how and when to use it
|
||||
*
|
||||
*
|
||||
* Also see {@link org.eclipse.xtext.xtext.XtextFormattingTokenSerializer} as an
|
||||
* example
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -88,7 +88,7 @@ public class ImportProjectPage extends WizardPageTemplate
|
|||
|
||||
/**
|
||||
* Returns the imported project's path
|
||||
*
|
||||
*
|
||||
* @return A string with the project path
|
||||
*/
|
||||
public String getProjectPath( )
|
||||
|
@ -98,7 +98,7 @@ public class ImportProjectPage extends WizardPageTemplate
|
|||
|
||||
/**
|
||||
* Returns the imported project's name
|
||||
*
|
||||
*
|
||||
* @return A string with the imported project's name
|
||||
*/
|
||||
public String getProjectName( )
|
||||
|
@ -108,7 +108,7 @@ public class ImportProjectPage extends WizardPageTemplate
|
|||
|
||||
/**
|
||||
* Returns the selected install name
|
||||
*
|
||||
*
|
||||
* @return A string with the selected install name
|
||||
*/
|
||||
public String getSelectedInstallName( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -66,7 +66,7 @@ public class SelectWesnothInstallDialog extends Dialog
|
|||
|
||||
/**
|
||||
* Gets the install selected by the user
|
||||
*
|
||||
*
|
||||
* @return A string with the name of the install selected
|
||||
*/
|
||||
public String getSelectedInstallName( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -31,7 +31,7 @@ public class WesnothInstallsUtils
|
|||
/**
|
||||
* Returns a list of the current wesnoth installations available
|
||||
* in the preferences store
|
||||
*
|
||||
*
|
||||
* @return A list with Wesnoth Installs
|
||||
*/
|
||||
public static List< WesnothInstall > getInstalls( )
|
||||
|
@ -61,17 +61,16 @@ public class WesnothInstallsUtils
|
|||
|
||||
/**
|
||||
* Sets the specified Installs list in the preferences store
|
||||
*
|
||||
*
|
||||
* @param installsList
|
||||
* The list to replace / set the installs list
|
||||
* The list to replace / set the installs list
|
||||
*/
|
||||
public static void setInstalls( Collection< WesnothInstall > installsList )
|
||||
{
|
||||
// pack back the installs
|
||||
StringBuilder installs = new StringBuilder( );
|
||||
for( WesnothInstall install: installsList ) {
|
||||
if( installs.length( ) > 0 )
|
||||
{
|
||||
if( installs.length( ) > 0 ) {
|
||||
installs.append( ";" ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -85,9 +84,9 @@ public class WesnothInstallsUtils
|
|||
|
||||
/**
|
||||
* Returns the install name for the specified resource
|
||||
*
|
||||
*
|
||||
* @param resourcePath
|
||||
* The path to the resource
|
||||
* The path to the resource
|
||||
* @return The install name for the resource
|
||||
*/
|
||||
public static String getInstallNameForResource( String resourcePath )
|
||||
|
@ -102,15 +101,14 @@ public class WesnothInstallsUtils
|
|||
|
||||
/**
|
||||
* Returns the install name for the specified resource
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* The resource
|
||||
* The resource
|
||||
* @return The install name for the resource
|
||||
*/
|
||||
public static String getInstallNameForResource( IResource resource )
|
||||
{
|
||||
if( resource == null || ! resource.exists( ) )
|
||||
{
|
||||
if( resource == null || ! resource.exists( ) ) {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -120,11 +118,11 @@ public class WesnothInstallsUtils
|
|||
|
||||
/**
|
||||
* Sets the install name for the specified resource
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* The resource to set the install to
|
||||
* The resource to set the install to
|
||||
* @param newInstallName
|
||||
* The new install name
|
||||
* The new install name
|
||||
*/
|
||||
public static void setInstallNameForResource( IResource resource,
|
||||
String newInstallName )
|
||||
|
@ -140,9 +138,9 @@ public class WesnothInstallsUtils
|
|||
/**
|
||||
* Fills the specified combo box with all the current installs
|
||||
* and selects the default or the first ( if no default exists )
|
||||
*
|
||||
*
|
||||
* @param comboBox
|
||||
* The combobox to fill
|
||||
* The combobox to fill
|
||||
*/
|
||||
public static void fillComboWithInstalls( Combo comboBox )
|
||||
{
|
||||
|
@ -171,10 +169,10 @@ public class WesnothInstallsUtils
|
|||
* Checks whether the Wesnoth Installation is properly setup
|
||||
* for the specified resource. If it is not, it will guide the user
|
||||
* through selecting a proper install (if any).
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* True if the installation is valid, false
|
||||
* otherwise
|
||||
* True if the installation is valid, false
|
||||
* otherwise
|
||||
* @return Boolean flag whether the setup was successfull or failed.
|
||||
*/
|
||||
public static boolean setupInstallForResource( IResource resource )
|
||||
|
@ -192,8 +190,7 @@ public class WesnothInstallsUtils
|
|||
.showMessageBox( String.format(
|
||||
Messages.WesnothInstallsUtils_1, resource
|
||||
.getProject( ).getName( ) ),
|
||||
SWT.ICON_QUESTION | SWT.YES | SWT.NO ) == SWT.NO )
|
||||
{
|
||||
SWT.ICON_QUESTION | SWT.YES | SWT.NO ) == SWT.NO ) {
|
||||
return false; // no hope :(
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -18,12 +18,12 @@ public class RegexStringFieldEditor extends StringFieldEditor
|
|||
|
||||
/**
|
||||
* An regex matcher string field editor.
|
||||
*
|
||||
*
|
||||
* @param regex
|
||||
* The regex to match this textbox's string
|
||||
* The regex to match this textbox's string
|
||||
* @param errorMessage
|
||||
* The message to show as error when field's text
|
||||
* doesn't match the regex
|
||||
* The message to show as error when field's text
|
||||
* doesn't match the regex
|
||||
*/
|
||||
public RegexStringFieldEditor( String name, String labelText, String regex,
|
||||
String errorMessage, Composite parent )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -28,7 +28,7 @@ public abstract class AbstractPreferencePage extends FieldEditorPreferencePage
|
|||
|
||||
/**
|
||||
* Adds the specified field editor with the specified tooltip
|
||||
*
|
||||
*
|
||||
* @param editor
|
||||
* @param tooltip
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -109,10 +109,10 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Gets the install preference prefix for the specified install name.
|
||||
*
|
||||
*
|
||||
* @param installName
|
||||
* The name of the install. If the parameter is null,
|
||||
* the default install prefix is returned
|
||||
* The name of the install. If the parameter is null,
|
||||
* the default install prefix is returned
|
||||
*/
|
||||
public static String getInstallPrefix( String installName )
|
||||
{
|
||||
|
@ -125,7 +125,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the name of the default install
|
||||
*
|
||||
*
|
||||
* @return Returns the name of the default install
|
||||
*/
|
||||
public static String getDefaultInstallName( )
|
||||
|
@ -135,9 +135,9 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Sets the default install name
|
||||
*
|
||||
*
|
||||
* @param newInstallName
|
||||
* The new install name
|
||||
* The new install name
|
||||
*/
|
||||
public static void setDefaultInstallName( String newInstallName )
|
||||
{
|
||||
|
@ -147,16 +147,15 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns a new Paths object based on the specified install name
|
||||
*
|
||||
*
|
||||
* @param installName
|
||||
* The install name used for the paths
|
||||
* The install name used for the paths
|
||||
* @return A new Paths object
|
||||
*/
|
||||
public static Paths getPaths( String installName )
|
||||
{
|
||||
// no null allowed -> fallback to ""
|
||||
if( installName == null )
|
||||
{
|
||||
if( installName == null ) {
|
||||
installName = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -186,7 +185,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the install name associated with this instance
|
||||
*
|
||||
*
|
||||
* @return A string representing the install name
|
||||
*/
|
||||
public String getInstallName( )
|
||||
|
@ -196,7 +195,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the addons directory
|
||||
*
|
||||
*
|
||||
* @return Returns the addons directory
|
||||
*/
|
||||
public String getAddonsDir( )
|
||||
|
@ -206,7 +205,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the data user directory
|
||||
*
|
||||
*
|
||||
* @return Returns the data user directory
|
||||
*/
|
||||
public String getUserDataDir( )
|
||||
|
@ -216,7 +215,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the campaign directory
|
||||
*
|
||||
*
|
||||
* @return Returns the campaign directory
|
||||
*/
|
||||
public String getCampaignDir( )
|
||||
|
@ -226,7 +225,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the 'data/core' directory
|
||||
*
|
||||
*
|
||||
* @return Returns the 'data/core' directory
|
||||
*/
|
||||
public String getCoreDir( )
|
||||
|
@ -236,7 +235,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the <b>schema.cfg</b> file path
|
||||
*
|
||||
*
|
||||
* @return Returns the schema.cfg file path
|
||||
*/
|
||||
public String getSchemaPath( )
|
||||
|
@ -246,7 +245,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the user's directory
|
||||
*
|
||||
*
|
||||
* @return Returns the user's directory
|
||||
*/
|
||||
public String getUserDir( )
|
||||
|
@ -258,7 +257,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
/**
|
||||
* Returns the working directory that contains the
|
||||
* <b>data</b> folder
|
||||
*
|
||||
*
|
||||
* @return Returns the working directory
|
||||
*/
|
||||
public String getWorkingDir( )
|
||||
|
@ -270,7 +269,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
/**
|
||||
* Returns the directory that contains the wml tools
|
||||
* ( wmlscope, wmllint, wmlindent, wesnoth_addons_manager, etc)
|
||||
*
|
||||
*
|
||||
* @return Returns the directory that contains the wml tools
|
||||
*/
|
||||
public String getWMLToolsDir( )
|
||||
|
@ -281,7 +280,7 @@ public class Preferences extends AbstractPreferenceInitializer
|
|||
|
||||
/**
|
||||
* Returns the path to the wesnoth executable
|
||||
*
|
||||
*
|
||||
* @return Returns the path to the wesnoth executable
|
||||
*/
|
||||
public String getWesnothExecutablePath( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -358,9 +358,9 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
|
||||
/**
|
||||
* Updates the interface with the specified install
|
||||
*
|
||||
*
|
||||
* @param install
|
||||
* The install
|
||||
* The install
|
||||
*/
|
||||
private void updateInterface( WesnothInstall install )
|
||||
{
|
||||
|
@ -376,11 +376,11 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
|
||||
/**
|
||||
* Sets the fields's internal preference name based on the installPrefix
|
||||
*
|
||||
*
|
||||
* @param installPrefix
|
||||
* The install prefix
|
||||
* The install prefix
|
||||
* @param loadPreferences
|
||||
* True to load the current stored preference
|
||||
* True to load the current stored preference
|
||||
*/
|
||||
private void setFieldsPreferenceName( String installPrefix,
|
||||
boolean loadPreferences )
|
||||
|
@ -443,8 +443,7 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
if( Constants.IS_MAC_MACHINE ) {
|
||||
os = "mac"; //$NON-NLS-1$
|
||||
}
|
||||
else if( Constants.IS_WINDOWS_MACHINE )
|
||||
{
|
||||
else if( Constants.IS_WINDOWS_MACHINE ) {
|
||||
os = "windows"; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -501,7 +500,7 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
|
||||
/**
|
||||
* Tests for wmltools in the specified path
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* @return
|
||||
*/
|
||||
|
@ -521,11 +520,11 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
* Tests the list of paths and if any path exists it will
|
||||
* set it as the string value to the field editor
|
||||
* if the field editor value is empty
|
||||
*
|
||||
*
|
||||
* @param list
|
||||
* The list to search in
|
||||
* The list to search in
|
||||
* @param field
|
||||
* The field to put the path in
|
||||
* The field to put the path in
|
||||
*/
|
||||
private void testPaths( String[] list, StringFieldEditor field )
|
||||
{
|
||||
|
@ -545,7 +544,7 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
* Checks whether the fields are empty (contain no text)
|
||||
* and the combobox/name don't have any values also
|
||||
* (the user doesn't create a new install)
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private boolean isFieldsEmpty( )
|
||||
|
@ -559,7 +558,7 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
|
||||
/**
|
||||
* Saves the current install
|
||||
*
|
||||
*
|
||||
* @return true if the save was successfully, false otherwise
|
||||
*/
|
||||
private boolean saveInstall( )
|
||||
|
@ -622,20 +621,16 @@ public class WesnothInstallsPage extends AbstractPreferencePage
|
|||
*/
|
||||
private boolean savePreferences( )
|
||||
{
|
||||
if( ! wesnothExecutableField_.isValid( ) )
|
||||
{
|
||||
if( ! wesnothExecutableField_.isValid( ) ) {
|
||||
wesnothExecutableField_.setStringValue( "" ); //$NON-NLS-1$
|
||||
}
|
||||
if( ! wesnothUserDirField_.isValid( ) )
|
||||
{
|
||||
if( ! wesnothUserDirField_.isValid( ) ) {
|
||||
wesnothUserDirField_.setStringValue( "" ); //$NON-NLS-1$
|
||||
}
|
||||
if( ! wesnothWorkingDirField_.isValid( ) )
|
||||
{
|
||||
if( ! wesnothWorkingDirField_.isValid( ) ) {
|
||||
wesnothWorkingDirField_.setStringValue( "" ); //$NON-NLS-1$
|
||||
}
|
||||
if( ! wmlToolsField_.isValid( ) )
|
||||
{
|
||||
if( ! wmlToolsField_.isValid( ) ) {
|
||||
wmlToolsField_.setStringValue( "" ); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -78,7 +78,7 @@ public class Define
|
|||
|
||||
/**
|
||||
* Gets the arguments of this macro
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List< String > getArguments( )
|
||||
|
@ -88,7 +88,7 @@ public class Define
|
|||
|
||||
/**
|
||||
* Returns a string containing the current define, formatted
|
||||
*
|
||||
*
|
||||
* @return The string value of the define
|
||||
*/
|
||||
@Override
|
||||
|
@ -107,7 +107,7 @@ public class Define
|
|||
|
||||
/**
|
||||
* Reads the defines from the specified file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* @return Returns a map of defines
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -120,7 +120,7 @@ public class DefinesSAXHandler extends DefaultHandler
|
|||
|
||||
/**
|
||||
* Gets the map of defines parsed
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map< String, Define > getDefines( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Andreas Buchen <andreas.buchen@sap.com> - Bug 206584
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Andreas Buchen <andreas.buchen@sap.com> - Bug 206584
|
||||
*******************************************************************************/
|
||||
package org.wesnoth.product;
|
||||
|
||||
|
@ -235,7 +235,7 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
|
||||
/**
|
||||
* The coolbar context menu manager.
|
||||
*
|
||||
*
|
||||
* @since 3.3
|
||||
*/
|
||||
private MenuManager coolbarPopupMenuManager;
|
||||
|
@ -243,9 +243,9 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
/**
|
||||
* Constructs a new action builder which contributes actions
|
||||
* to the given window.
|
||||
*
|
||||
*
|
||||
* @param configurer
|
||||
* the action bar configurer for the window
|
||||
* the action bar configurer for the window
|
||||
*/
|
||||
public WorkbenchActionBuilder( IActionBarConfigurer configurer )
|
||||
{
|
||||
|
@ -330,7 +330,7 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
* In order to ensure that the pin action toolbar sets its size
|
||||
* correctly, the pin action should set its visiblity before we call
|
||||
* updatePinActionToolbar().
|
||||
*
|
||||
*
|
||||
* In other words we always want the PinActionContributionItem to be
|
||||
* notified before the
|
||||
* WorkbenchActionBuilder.
|
||||
|
@ -822,11 +822,11 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
* The test for whether a separator should be added is done by checking for
|
||||
* the existence of a preference matching the string
|
||||
* useSeparator.MENUID.GROUPID that is set to <code>true</code>.
|
||||
*
|
||||
*
|
||||
* @param menu
|
||||
* the menu to add to
|
||||
* the menu to add to
|
||||
* @param groupId
|
||||
* the group id for the added separator or group marker
|
||||
* the group id for the added separator or group marker
|
||||
*/
|
||||
private void addSeparatorOrGroupMarker( MenuManager menu, String groupId )
|
||||
{
|
||||
|
@ -1308,9 +1308,9 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
|
||||
/**
|
||||
* Returns whether any of the given infos have a welcome page.
|
||||
*
|
||||
*
|
||||
* @param infos
|
||||
* the infos
|
||||
* the infos
|
||||
* @return <code>true</code> if a welcome page was found, <code>false</code>
|
||||
* if not
|
||||
*/
|
||||
|
@ -1326,9 +1326,9 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
|
||||
/**
|
||||
* Returns whether any of the given infos have tips and tricks.
|
||||
*
|
||||
*
|
||||
* @param infos
|
||||
* the infos
|
||||
* the infos
|
||||
* @return <code>true</code> if tips and tricks were found,
|
||||
* <code>false</code> if not
|
||||
*/
|
||||
|
@ -1345,11 +1345,11 @@ public class WorkbenchActionBuilder extends ActionBarAdvisor
|
|||
/**
|
||||
* Update the build actions on the toolbar and menu bar based on the current
|
||||
* state of autobuild. This method can be called from any thread.
|
||||
*
|
||||
*
|
||||
* @param immediately
|
||||
* <code>true</code> to update the actions immediately,
|
||||
* <code>false</code> to queue the update to be run in the
|
||||
* event loop
|
||||
* <code>true</code> to update the actions immediately,
|
||||
* <code>false</code> to queue the update to be run in the
|
||||
* event loop
|
||||
*/
|
||||
void updateBuildActions( boolean immediately )
|
||||
{
|
||||
|
|
|
@ -24,7 +24,7 @@ public abstract class WorkbenchAdvisorHack extends WorkbenchAdvisor
|
|||
* Declares all IDE-specific workbench images. This includes both "shared"
|
||||
* images (named in {@link IDE.SharedImages}) and internal images (named in
|
||||
* {@link org.eclipse.ui.internal.ide.IDEInternalWorkbenchImages}).
|
||||
*
|
||||
*
|
||||
* @see org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor#declareImage
|
||||
*/
|
||||
protected void declareWorkbenchImages( )
|
||||
|
@ -208,15 +208,15 @@ public abstract class WorkbenchAdvisorHack extends WorkbenchAdvisor
|
|||
|
||||
/**
|
||||
* Declares an IDE-specific workbench image.
|
||||
*
|
||||
*
|
||||
* @param symbolicName
|
||||
* the symbolic name of the image
|
||||
* the symbolic name of the image
|
||||
* @param path
|
||||
* the path of the image file; this path is relative to the base
|
||||
* of the IDE plug-in
|
||||
* the path of the image file; this path is relative to the base
|
||||
* of the IDE plug-in
|
||||
* @param shared
|
||||
* <code>true</code> if this is a shared image, and
|
||||
* <code>false</code> if this is not a shared image
|
||||
* <code>true</code> if this is a shared image, and
|
||||
* <code>false</code> if this is not a shared image
|
||||
* @see org.eclipse.ui.internal.ide.IDEWorkbenchAdvisor#declareImage
|
||||
*/
|
||||
private void declareWorkbenchImage( Bundle ideBundle, String symbolicName,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -38,7 +38,7 @@ import org.wesnoth.wml.WMLVariable;
|
|||
* A class that stores some project specific infos
|
||||
* for current session.
|
||||
* Some of the fields of this cache can be saved to disk
|
||||
*
|
||||
*
|
||||
* @see ProjectCache#saveCache()
|
||||
*/
|
||||
public class ProjectCache implements Serializable
|
||||
|
@ -78,7 +78,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Gets the properties map for this project.
|
||||
*
|
||||
*
|
||||
* @return A map with properties of the project
|
||||
*/
|
||||
public Map< String, String > getProperties( )
|
||||
|
@ -90,7 +90,7 @@ public class ProjectCache implements Serializable
|
|||
* Gets the map with the WMLConfigs
|
||||
* The key represent the filenames of the files
|
||||
* and the value the scenarioId from that file
|
||||
*
|
||||
*
|
||||
* @return A map with key the file path and value the WMLConfig
|
||||
*/
|
||||
public Map< String, WMLConfig > getWMLConfigs( )
|
||||
|
@ -101,7 +101,7 @@ public class ProjectCache implements Serializable
|
|||
/**
|
||||
* Gets the WMLConfig by the specified file project-relative path.
|
||||
* If the WMLConfig doesn't exist it will be created
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The project-relative path for the file.
|
||||
* @return
|
||||
|
@ -119,7 +119,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the variables found in this project
|
||||
*
|
||||
*
|
||||
* @return A multimap containing all the variables
|
||||
*/
|
||||
public Map< String, WMLVariable > getVariables( )
|
||||
|
@ -170,7 +170,7 @@ public class ProjectCache implements Serializable
|
|||
* Saves:
|
||||
* - properties
|
||||
* - existing scenarios
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean saveCache( )
|
||||
|
@ -193,7 +193,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Reads the defines files for this project
|
||||
*
|
||||
*
|
||||
* @param force
|
||||
* Read the defines even if the defines file's contents
|
||||
* haven't changed since last time read.
|
||||
|
@ -215,7 +215,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the defines associated with this project
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Map< String, Define > getDefines( )
|
||||
|
@ -234,7 +234,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Sets the new install used in the project
|
||||
*
|
||||
*
|
||||
* @param newInstallName
|
||||
* The new install name
|
||||
*/
|
||||
|
@ -247,7 +247,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the current dependency tree builder for this project
|
||||
*
|
||||
*
|
||||
* @return A dependency tree
|
||||
*/
|
||||
public DependencyListBuilder getDependencyList( )
|
||||
|
@ -273,7 +273,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the parsed Event names from the config files
|
||||
*
|
||||
*
|
||||
* @return A set with event names
|
||||
*/
|
||||
public Set< String > getEvents( )
|
||||
|
@ -289,7 +289,7 @@ public class ProjectCache implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the parsed WML Tags from all configs of this project
|
||||
*
|
||||
*
|
||||
* @return A list of Tags
|
||||
*/
|
||||
public Map< String, WMLTag > getWMLTags( )
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -45,7 +45,7 @@ public class ProjectUtils
|
|||
|
||||
/**
|
||||
* Gets the properties map for this project.
|
||||
*
|
||||
*
|
||||
* @return A map with properties of the project
|
||||
*/
|
||||
public static Map< String, String > getPropertiesForProject(
|
||||
|
@ -56,7 +56,7 @@ public class ProjectUtils
|
|||
|
||||
/**
|
||||
* Gets the cache for the specified project
|
||||
*
|
||||
*
|
||||
* @param project
|
||||
* @return
|
||||
*/
|
||||
|
@ -75,7 +75,7 @@ public class ProjectUtils
|
|||
/**
|
||||
* Creates a new wesnoth project with the specified name
|
||||
* and on the specified location on disk
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* The name of the new project
|
||||
* @param location
|
||||
|
@ -109,7 +109,7 @@ public class ProjectUtils
|
|||
* Creates a project that has associated the wesnoth nature using
|
||||
* the specified handle. If the project is created there will be
|
||||
* no modifications done by this method.
|
||||
*
|
||||
*
|
||||
* @param handle
|
||||
* the handle to the project
|
||||
* @param description
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -36,16 +36,15 @@ public class SchemaParser
|
|||
|
||||
/**
|
||||
* Returns a SchemaParser instance based on the specified install
|
||||
*
|
||||
*
|
||||
* @param installName
|
||||
* The name of the install
|
||||
* The name of the install
|
||||
* @return A SchemaParser singleton instance
|
||||
*/
|
||||
public static SchemaParser getInstance( String installName )
|
||||
{
|
||||
// null not allowed
|
||||
if( installName == null )
|
||||
{
|
||||
if( installName == null ) {
|
||||
installName = ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
|
@ -61,9 +60,9 @@ public class SchemaParser
|
|||
|
||||
/**
|
||||
* Reloads all currently stored schemas
|
||||
*
|
||||
*
|
||||
* @param force
|
||||
* True to force reloading schemas
|
||||
* True to force reloading schemas
|
||||
*/
|
||||
public static void reloadSchemas( boolean force )
|
||||
{
|
||||
|
@ -88,13 +87,13 @@ public class SchemaParser
|
|||
|
||||
/**
|
||||
* Parses the schema
|
||||
*
|
||||
*
|
||||
* @param installName
|
||||
* The install to use. It will get the default schema
|
||||
* path based on that
|
||||
*
|
||||
* The install to use. It will get the default schema
|
||||
* path based on that
|
||||
*
|
||||
* @param force
|
||||
* True to force parsing the schema, skipping the existing cache
|
||||
* True to force parsing the schema, skipping the existing cache
|
||||
*/
|
||||
public void parseSchema( boolean force )
|
||||
{
|
||||
|
@ -104,11 +103,11 @@ public class SchemaParser
|
|||
|
||||
/**
|
||||
* Parses the schema
|
||||
*
|
||||
*
|
||||
* @param force
|
||||
* True to force parsing the schema, skipping the existing cache
|
||||
* True to force parsing the schema, skipping the existing cache
|
||||
* @param schemaPath
|
||||
* The path to the 'schema.cfg' file
|
||||
* The path to the 'schema.cfg' file
|
||||
*/
|
||||
public void parseSchemaFile( boolean force, String schemaPath )
|
||||
{
|
||||
|
@ -135,7 +134,8 @@ public class SchemaParser
|
|||
for( int index = 0; index < lines.length; index++ ) {
|
||||
String line = lines[index];
|
||||
// skip comments and empty lines
|
||||
if( StringUtils.startsWith( line, "#" ) || line.matches( "^[\t ]*$" ) ) {
|
||||
if( StringUtils.startsWith( line, "#" )
|
||||
|| line.matches( "^[\t ]*$" ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -246,8 +246,7 @@ public class SchemaParser
|
|||
}
|
||||
else {
|
||||
String tmpLine = line.trim( );
|
||||
if( line.contains( "#" ) )
|
||||
{
|
||||
if( line.contains( "#" ) ) {
|
||||
tmpLine = line
|
||||
.substring( 0, line.lastIndexOf( "#" ) ).trim( ); //$NON-NLS-1$
|
||||
}
|
||||
|
@ -285,8 +284,7 @@ public class SchemaParser
|
|||
currentTag.getExpressions( ).add( targetTag );
|
||||
}
|
||||
else {
|
||||
if( primitives_.get( value[1] ) == null )
|
||||
{
|
||||
if( primitives_.get( value[1] ) == null ) {
|
||||
Logger.getInstance( )
|
||||
.logError(
|
||||
"Undefined primitive type in schema.cfg for: " + value[1] ); //$NON-NLS-1$
|
||||
|
@ -341,9 +339,9 @@ public class SchemaParser
|
|||
|
||||
/**
|
||||
* Sorts all tag's children by using the cardinality comparator
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The tag to whom to sort the children
|
||||
* The tag to whom to sort the children
|
||||
*/
|
||||
private void sortChildren( WMLTag tag )
|
||||
{
|
||||
|
@ -375,9 +373,9 @@ public class SchemaParser
|
|||
* optional = ?
|
||||
* repeated = *
|
||||
* forbidden = -
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* The value the parse
|
||||
* The value the parse
|
||||
*/
|
||||
public char getCardinality( String value )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -12,10 +12,10 @@ import org.eclipse.xtext.scoping.impl.AbstractDeclarativeScopeProvider;
|
|||
|
||||
/**
|
||||
* This class contains custom scoping description.
|
||||
*
|
||||
*
|
||||
* see : http://www.eclipse.org/Xtext/documentation/latest/xtext.html#scoping
|
||||
* on how and when to use it
|
||||
*
|
||||
*
|
||||
*/
|
||||
public class WMLScopeProvider extends AbstractDeclarativeScopeProvider
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -131,11 +131,11 @@ public class TemplateProvider
|
|||
|
||||
/**
|
||||
* Gets a string of the processed specified template
|
||||
*
|
||||
*
|
||||
* @param templateName
|
||||
* The name of the template to process
|
||||
* The name of the template to process
|
||||
* @param parameters
|
||||
* The parameters to replace into the template
|
||||
* The parameters to replace into the template
|
||||
* @return
|
||||
*/
|
||||
public String getProcessedTemplate( String templateName,
|
||||
|
@ -178,8 +178,7 @@ public class TemplateProvider
|
|||
}
|
||||
}
|
||||
|
||||
if( skipLine == false )
|
||||
{
|
||||
if( skipLine == false ) {
|
||||
result.append( template[i] + "\n" ); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -188,15 +187,14 @@ public class TemplateProvider
|
|||
|
||||
/**
|
||||
* Returns the template with the specified name or empty string if none
|
||||
*
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
public String getTemplate( String name )
|
||||
{
|
||||
String result = templates_.get( name );
|
||||
if( result == null )
|
||||
{
|
||||
if( result == null ) {
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
return result;
|
||||
|
@ -204,9 +202,9 @@ public class TemplateProvider
|
|||
|
||||
/**
|
||||
* Gets the Content Assist Config list for the specified type
|
||||
*
|
||||
*
|
||||
* @param type
|
||||
* The type of the CAC
|
||||
* The type of the CAC
|
||||
* @return A list of String values. The returned list is read-only
|
||||
*/
|
||||
public List< String > getCAC( String type )
|
||||
|
@ -225,9 +223,9 @@ public class TemplateProvider
|
|||
* value is a list of <String, String> that consist of <Filename, Template
|
||||
* used for file contents> and the second return value is a list of String
|
||||
* with directories names
|
||||
*
|
||||
*
|
||||
* @param structureTemplate
|
||||
* the template
|
||||
* the template
|
||||
* @return
|
||||
*/
|
||||
public Pair< List< Pair< String, String >>, List< String >> getFilesDirectories(
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -30,13 +30,13 @@ public class AntUtils
|
|||
{
|
||||
/**
|
||||
* Runs the specified ant file, and returns the output of the runned file
|
||||
*
|
||||
*
|
||||
* @param antFile
|
||||
* @param properties
|
||||
* the hasmap with userproperties to be added to the ant file
|
||||
* the hasmap with userproperties to be added to the ant file
|
||||
* @param recordOutput
|
||||
* true if the output of the runned file should be recorded and
|
||||
* returned
|
||||
* true if the output of the runned file should be recorded and
|
||||
* returned
|
||||
* @return null if the build didn't success
|
||||
*/
|
||||
public static String runAnt( String antFile,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -33,9 +33,9 @@ public class EditorUtils
|
|||
{
|
||||
/**
|
||||
* Writes the specified content in current opened editor
|
||||
*
|
||||
*
|
||||
* @param content
|
||||
* the string content to write
|
||||
* the string content to write
|
||||
*/
|
||||
public static void writeInEditor( String content )
|
||||
{
|
||||
|
@ -44,9 +44,9 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Writes the specified content in the specified editor
|
||||
*
|
||||
*
|
||||
* @param content
|
||||
* the string content to write
|
||||
* the string content to write
|
||||
*/
|
||||
public static void writeInEditor( IEditorPart targetEditor, String content )
|
||||
{
|
||||
|
@ -60,9 +60,9 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Replaces the text in current opened editor with the specified one
|
||||
*
|
||||
*
|
||||
* @param content
|
||||
* the string to replace the current content
|
||||
* the string to replace the current content
|
||||
*/
|
||||
public static void replaceEditorText( String content )
|
||||
{
|
||||
|
@ -71,9 +71,9 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Replaces the text in the specified editor with the specified one
|
||||
*
|
||||
*
|
||||
* @param content
|
||||
* the string to replace the current content
|
||||
* the string to replace the current content
|
||||
*/
|
||||
public static void replaceEditorText( IEditorPart targetEditor,
|
||||
String content )
|
||||
|
@ -90,7 +90,7 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Gets the current opened editor's document
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IDocument getEditorDocument( )
|
||||
|
@ -100,7 +100,7 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Gets the specified editor's document
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IDocument getEditorDocument( IEditorPart targetEditor )
|
||||
|
@ -116,7 +116,7 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Gets the text editor of the current opened editor
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static ITextEditor getTextEditor( )
|
||||
|
@ -126,7 +126,7 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Gets the text editor of the specified editor
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static ITextEditor getTextEditor( IEditorPart targetEditor )
|
||||
|
@ -144,7 +144,7 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Gets the editor part of the current edited file
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static IEditorPart getEditedFile( )
|
||||
|
@ -155,11 +155,11 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Opens the editor on the specified file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to open
|
||||
* The file to open
|
||||
* @param activatePage
|
||||
* True to activate the opened file
|
||||
* True to activate the opened file
|
||||
*/
|
||||
public static IEditorPart openEditor( IFile file, boolean activatePage )
|
||||
{
|
||||
|
@ -175,9 +175,9 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Opens the editor on the specified file (will use IFileStore)
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to open
|
||||
* The file to open
|
||||
*/
|
||||
public static IEditorPart openEditor( String file )
|
||||
{
|
||||
|
@ -187,9 +187,9 @@ public class EditorUtils
|
|||
|
||||
/**
|
||||
* Opens the editor on the specified file (will use IFileStore)
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to open
|
||||
* The file to open
|
||||
*/
|
||||
public static IEditorPart openEditor( IFileStore file )
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -46,11 +46,11 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Creates an external tool invoker with specified options
|
||||
*
|
||||
*
|
||||
* @param fileName
|
||||
* the file name to be invoked
|
||||
* the file name to be invoked
|
||||
* @param arguments
|
||||
* the arguments passed to the file
|
||||
* the arguments passed to the file
|
||||
*/
|
||||
public ExternalToolInvoker( String fileName, List< String > arguments )
|
||||
{
|
||||
|
@ -89,12 +89,10 @@ public class ExternalToolInvoker
|
|||
Constants.IS_WINDOWS_MACHINE ) {
|
||||
String wesnothParent = new File( arguments_.get( 0 ) )
|
||||
.getParent( ) + "/"; //$NON-NLS-1$
|
||||
if( new File( wesnothParent + "stdout.txt" ).exists( ) )
|
||||
{
|
||||
if( new File( wesnothParent + "stdout.txt" ).exists( ) ) {
|
||||
stdoutReader = new FileReader( wesnothParent + "stdout.txt" ); //$NON-NLS-1$
|
||||
}
|
||||
if( new File( wesnothParent + "stderr.txt" ).exists( ) )
|
||||
{
|
||||
if( new File( wesnothParent + "stderr.txt" ).exists( ) ) {
|
||||
stderrReader = new FileReader( wesnothParent + "stderr.txt" ); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -117,10 +115,10 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Waits for the current tool, and returns the return value
|
||||
*
|
||||
*
|
||||
* if the process is null (not started) => 0
|
||||
* if there was an error => -1
|
||||
*
|
||||
*
|
||||
* @return the return value of the tool
|
||||
*/
|
||||
public int waitForTool( )
|
||||
|
@ -138,7 +136,7 @@ public class ExternalToolInvoker
|
|||
/**
|
||||
* Reads a line from the stdout.
|
||||
* Returns null if process wasn't started or an exception was thrown
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String readOutputLine( )
|
||||
|
@ -158,7 +156,7 @@ public class ExternalToolInvoker
|
|||
/**
|
||||
* Reads a line from the stderr.
|
||||
* Returns null if process wasn't started or an exception was thrown
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String readErrorLine( )
|
||||
|
@ -189,10 +187,10 @@ public class ExternalToolInvoker
|
|||
* Starts a new thread monitoring stderr.
|
||||
* All "Error" output will be available to be read from
|
||||
* <code>getErrorContent()</code>
|
||||
*
|
||||
*
|
||||
* @param extraStreams
|
||||
* The extra streams array where stderr will be written or null
|
||||
* if none
|
||||
* The extra streams array where stderr will be written or null
|
||||
* if none
|
||||
*/
|
||||
public void startErrorMonitor( final OutputStream[] extraStreams )
|
||||
{
|
||||
|
@ -204,8 +202,7 @@ public class ExternalToolInvoker
|
|||
String line = ""; //$NON-NLS-1$
|
||||
while( ( line = readErrorLine( ) ) != null ) {
|
||||
if( extraStreams != null && extraStreams.length > 0 ) {
|
||||
for( OutputStream stream: extraStreams )
|
||||
{
|
||||
for( OutputStream stream: extraStreams ) {
|
||||
stream.write( ( line + "\n" ).getBytes( ) ); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -233,10 +230,10 @@ public class ExternalToolInvoker
|
|||
* Starts a new thread monitoring stdout.
|
||||
* All "Output" output will be available to be read from
|
||||
* <code>getOutputContent()</code>
|
||||
*
|
||||
*
|
||||
* @param extraStreams
|
||||
* The extra streams array where stdout will be written or null
|
||||
* if none
|
||||
* The extra streams array where stdout will be written or null
|
||||
* if none
|
||||
*/
|
||||
public void startOutputMonitor( final OutputStream[] extraStreams )
|
||||
{
|
||||
|
@ -248,8 +245,7 @@ public class ExternalToolInvoker
|
|||
String line = ""; //$NON-NLS-1$
|
||||
while( ( line = readOutputLine( ) ) != null ) {
|
||||
if( extraStreams != null && extraStreams.length > 0 ) {
|
||||
for( OutputStream stream: extraStreams )
|
||||
{
|
||||
for( OutputStream stream: extraStreams ) {
|
||||
stream.write( ( line + "\n" ).getBytes( ) ); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
@ -267,7 +263,7 @@ public class ExternalToolInvoker
|
|||
/**
|
||||
* Gets the content (as String) of the stderr,
|
||||
* if the caller started "startErrorMonitor"
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getErrorContent( )
|
||||
|
@ -278,7 +274,7 @@ public class ExternalToolInvoker
|
|||
/**
|
||||
* Gets the content (as String) of the stdout,
|
||||
* if the caller started "startOutputMonitor"
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public String getOutputContent( )
|
||||
|
@ -288,7 +284,7 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Returns the OutputStream
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public OutputStream getStdin( )
|
||||
|
@ -302,7 +298,7 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Returns the InputStream
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public InputStream getStdout( )
|
||||
|
@ -316,7 +312,7 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Returns the ErrorStream
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public InputStream getStderr( )
|
||||
|
@ -330,7 +326,7 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Returns true if the process ended
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public boolean processEnded( )
|
||||
|
@ -351,11 +347,11 @@ public class ExternalToolInvoker
|
|||
|
||||
/**
|
||||
* Kills the current opened tool. No effect is tool is already killed
|
||||
*
|
||||
*
|
||||
* @param waitForKilling
|
||||
* true to wait until the process is killed, so when the call
|
||||
* returns the process will be already finished (it has
|
||||
* "exitValue")
|
||||
* true to wait until the process is killed, so when the call
|
||||
* returns the process will be already finished (it has
|
||||
* "exitValue")
|
||||
*/
|
||||
public void kill( boolean waitForKilling )
|
||||
{
|
||||
|
@ -375,17 +371,17 @@ public class ExternalToolInvoker
|
|||
/**
|
||||
* Launches the specified tool, with the specified argument list.
|
||||
* The caller returns immediatelly
|
||||
*
|
||||
*
|
||||
* @param fileName
|
||||
* the full path to the executable to be launched
|
||||
* the full path to the executable to be launched
|
||||
* @param args
|
||||
* the arguments list
|
||||
* the arguments list
|
||||
* @param stdout
|
||||
* An array of outputstreams where the stdout from the tool will
|
||||
* be written
|
||||
* An array of outputstreams where the stdout from the tool will
|
||||
* be written
|
||||
* @param stderr
|
||||
* An array of outputstreams where the stderr from the tool will
|
||||
* be written
|
||||
* An array of outputstreams where the stderr from the tool will
|
||||
* be written
|
||||
* @return
|
||||
*/
|
||||
public static ExternalToolInvoker launchTool( final String fileName,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 - 2011 by Timotei Dolean <timotei21@gmail.com>
|
||||
*
|
||||
*
|
||||
* This program and the accompanying materials are made available
|
||||
* under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -23,11 +23,11 @@ public class GUIUtils
|
|||
{
|
||||
/**
|
||||
* Shows an information message box with the specified message (thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param message
|
||||
* the message to print
|
||||
* the message to print
|
||||
*/
|
||||
public static int showInfoMessageBox( final String message )
|
||||
{
|
||||
|
@ -37,11 +37,11 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Shows an information message box with the specified message (thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param message
|
||||
* the message to print
|
||||
* the message to print
|
||||
*/
|
||||
public static int showWarnMessageBox( final String message )
|
||||
{
|
||||
|
@ -51,11 +51,11 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Shows an error message box with the specified message (thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param message
|
||||
* the message to print
|
||||
* the message to print
|
||||
*/
|
||||
public static int showErrorMessageBox( final String message )
|
||||
{
|
||||
|
@ -65,11 +65,11 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Shows a message box with the specified message and style(thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param style
|
||||
* the style of the messageBox
|
||||
* the style of the messageBox
|
||||
*/
|
||||
public static int showMessageBox( final String message, final int style )
|
||||
{
|
||||
|
@ -79,11 +79,11 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Shows a message box with the specified message (thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param message
|
||||
* the message to print
|
||||
* the message to print
|
||||
*/
|
||||
public static int showMessageBox( final IWorkbenchWindow window,
|
||||
final String message )
|
||||
|
@ -93,11 +93,11 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Shows a message box with the specified message (thread-safe)
|
||||
*
|
||||
*
|
||||
* @param window
|
||||
* the window where to show the message box
|
||||
* the window where to show the message box
|
||||
* @param message
|
||||
* the message to print
|
||||
* the message to print
|
||||
*/
|
||||
public static int showMessageBox( final IWorkbenchWindow window,
|
||||
final String message, final int style )
|
||||
|
@ -126,13 +126,13 @@ public class GUIUtils
|
|||
|
||||
/**
|
||||
* Creates and returns a console with the specified parameters
|
||||
*
|
||||
*
|
||||
* @param consoleTitle
|
||||
* The title of the console
|
||||
* The title of the console
|
||||
* @param imageDescriptor
|
||||
* The image Descriptor
|
||||
* The image Descriptor
|
||||
* @param activate
|
||||
* True to activate the console
|
||||
* True to activate the console
|
||||
* @return
|
||||
*/
|
||||
public static MessageConsole createConsole( String consoleTitle,
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue