eclipse plugin: Run the source cleanup
This commit is contained in:
parent
d515751435
commit
32f843752d
9 changed files with 65 additions and 65 deletions
|
@ -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
|
||||
|
|
|
@ -191,7 +191,7 @@ public class WMLProposalProvider extends AbstractWMLProposalProvider
|
|||
String keyName = key.getName( );
|
||||
|
||||
// handle the next_scenario and first_scenario
|
||||
if( keyName.equals( "next_scenario" ) || //$NON-NLS-1$
|
||||
if( keyName.equals( "next_scenario" ) || //$NON-NLS-1$
|
||||
keyName.equals( "first_scenario" ) ) //$NON-NLS-1$
|
||||
{
|
||||
for( WMLConfig config: projectCache_.getWMLConfigs( ).values( ) ) {
|
||||
|
@ -379,7 +379,7 @@ 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
|
||||
* @param indent
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -64,7 +64,7 @@ public class ResourceUtils
|
|||
{
|
||||
/**
|
||||
* Copies a file from source to target
|
||||
*
|
||||
*
|
||||
* @param source
|
||||
* @param target
|
||||
* @throws IOException
|
||||
|
@ -135,7 +135,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Gets the contents as string of the specified file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file
|
||||
* @return
|
||||
|
@ -147,7 +147,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Creates the desired resource
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* the resource to be created (IFile/IFolder)
|
||||
* @param project
|
||||
|
@ -189,7 +189,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Creates a folder in the specified project with the specified details
|
||||
*
|
||||
*
|
||||
* @param project
|
||||
* the project in which the folder will be created
|
||||
* @param folderName
|
||||
|
@ -203,7 +203,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Rercursively deletes a directory
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The directory's path
|
||||
* @return True if the delete was ok, false otherwise
|
||||
|
@ -227,7 +227,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Rercursively deletes a directory
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The directory's path
|
||||
* @return True if the delete was ok, false otherwise
|
||||
|
@ -239,7 +239,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Creates a file in the specified project with the specified details
|
||||
*
|
||||
*
|
||||
* @param project
|
||||
* the project in which the file will be created
|
||||
* @param fileName
|
||||
|
@ -274,7 +274,7 @@ public class ResourceUtils
|
|||
/**
|
||||
* Creates the '.wesnoth' file with the specified path
|
||||
* only if it doesn't exist already
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The path of '.wesnoth' file
|
||||
* @param force
|
||||
|
@ -295,7 +295,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Creates the 'build.xml' with the specified path
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* The full path to the 'build.xml' file
|
||||
* @param params
|
||||
|
@ -319,7 +319,7 @@ public class ResourceUtils
|
|||
/**
|
||||
* Creates a new empty file in the target.
|
||||
* Subsequent non-existent directories in the path will be created
|
||||
*
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
*/
|
||||
|
@ -336,7 +336,7 @@ public class ResourceUtils
|
|||
/**
|
||||
* Creates the specified directory.
|
||||
* Subsequent non-existent directories will be created
|
||||
*
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
*/
|
||||
|
@ -347,7 +347,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Removes the specified file
|
||||
*
|
||||
*
|
||||
* @param target
|
||||
* @return
|
||||
*/
|
||||
|
@ -361,7 +361,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Checks if the specified path points to a valid (existing file)
|
||||
*
|
||||
*
|
||||
* @param filePath
|
||||
* The path to check
|
||||
* @return True if the filePath points to an existing file, false otherwise
|
||||
|
@ -379,7 +379,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Checks if the specified path is in the user's addons directory
|
||||
*
|
||||
*
|
||||
* @param paths
|
||||
* The paths to use when doing the check
|
||||
* @param path
|
||||
|
@ -398,7 +398,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Checks if the specified path is in the campaigns directory
|
||||
*
|
||||
*
|
||||
* @param paths
|
||||
* The paths to use when doing the check
|
||||
* @param path
|
||||
|
@ -417,7 +417,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Returns true if the resource is a WML config file
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* The resource to check
|
||||
* @return True or false
|
||||
|
@ -435,7 +435,7 @@ public class ResourceUtils
|
|||
* It will start searching upwards starting from curren
|
||||
* resource's directory, until it finds a '_main.cfg' but it will
|
||||
* stop when encounters a project
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* The resource where to search for '_main.cfg'
|
||||
* @return
|
||||
|
@ -501,7 +501,7 @@ public class ResourceUtils
|
|||
* If the resource is not a '_main.cfg' it will search for it
|
||||
* with
|
||||
* {@link org.wesnoth.projects.ProjectUtils#getMainConfigLocation(IResource)}
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* The resource where to search the id
|
||||
* @return
|
||||
|
@ -516,7 +516,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Gets the campaign id
|
||||
*
|
||||
*
|
||||
* @param fileName
|
||||
* @return
|
||||
*/
|
||||
|
@ -529,7 +529,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Returns the SaxHandler for the parsed specified wml resource
|
||||
*
|
||||
*
|
||||
* @param resourcePath
|
||||
* The resourcepath to parse
|
||||
* @param saxHandler
|
||||
|
@ -564,7 +564,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Deletes all markers of type specified from the resource
|
||||
*
|
||||
*
|
||||
* @param resource
|
||||
* @param type
|
||||
*/
|
||||
|
@ -581,7 +581,7 @@ public class ResourceUtils
|
|||
* Parses the current line of the file and add the marker (if any) on the
|
||||
* file.
|
||||
* Current used format: "sourcefile", line x: error message
|
||||
*
|
||||
*
|
||||
* @param line
|
||||
* the line to parse
|
||||
* @param type
|
||||
|
@ -632,7 +632,7 @@ public class ResourceUtils
|
|||
/**
|
||||
* Returns the corresponding {@link IResource} from the specified
|
||||
* EMF Resource
|
||||
*
|
||||
*
|
||||
* @param emfResource
|
||||
* The EMF Resource
|
||||
* @return An {@link IResource} instance
|
||||
|
@ -649,7 +649,7 @@ public class ResourceUtils
|
|||
/**
|
||||
* Gets the set of included containers in this file
|
||||
* as a macro call
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to get the containers from
|
||||
* @return A set of containers represented by their Path as string
|
||||
|
@ -685,7 +685,7 @@ public class ResourceUtils
|
|||
* forms:
|
||||
* - {campaigns/... }
|
||||
* - {~add-ons/... }
|
||||
*
|
||||
*
|
||||
*/
|
||||
// TODO: check for including a specific config file?
|
||||
if( ! ( text.startsWith( "{campaigns" ) ) && //$NON-NLS-1$
|
||||
|
@ -713,7 +713,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Gets the associated dependency index for the specified file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to get the index for
|
||||
* @return An index or {@link Integer.MAX_VALUE}
|
||||
|
@ -735,7 +735,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* This is a WML files comparator, based on the WML parsing rules.
|
||||
*
|
||||
*
|
||||
* @see http://wiki.wesnoth.org/PreprocessorRef
|
||||
*/
|
||||
public static class WMLFilesComparator implements Comparator< IResource >,
|
||||
|
@ -754,7 +754,7 @@ public class ResourceUtils
|
|||
|
||||
/**
|
||||
* Compares 2 filenames to get the wml file order
|
||||
*
|
||||
*
|
||||
* @param fileName1
|
||||
* The first filename
|
||||
* @param fileName2
|
||||
|
|
|
@ -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
|
||||
|
@ -52,7 +52,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Gets the WML Grammar root of the specified file
|
||||
*
|
||||
*
|
||||
* @param file
|
||||
* The file to get the WML model from
|
||||
* @return A WMLRoot instance or null if there is none
|
||||
|
@ -78,7 +78,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Returns the child key of the specified tag by its name.
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The tag to search into
|
||||
* @param name
|
||||
|
@ -98,7 +98,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Returns the child tag of the specified tag by its name.
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The tag to search into
|
||||
* @param name
|
||||
|
@ -118,7 +118,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Returns the key value from the list as a string value
|
||||
*
|
||||
*
|
||||
* @param values
|
||||
* The list of values of the key
|
||||
* @return A string representation of the key's value
|
||||
|
@ -136,7 +136,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Returns a WML string representation of the specified tag
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The tag to get the WML String representation for
|
||||
* @return The string representation
|
||||
|
@ -173,7 +173,7 @@ public class WMLUtils
|
|||
|
||||
/**
|
||||
* Returns a WML string representation of the specified key
|
||||
*
|
||||
*
|
||||
* @param tag
|
||||
* The key to get the WML String representation for
|
||||
* @return The string representation
|
||||
|
@ -186,7 +186,7 @@ public class WMLUtils
|
|||
/**
|
||||
* Returns the string representation of the specified WML object
|
||||
* with the preceeding space/new lines cleaned
|
||||
*
|
||||
*
|
||||
* @param object
|
||||
* A WML EObject
|
||||
* @return A string representation
|
||||
|
|
|
@ -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
|
||||
|
@ -25,7 +25,7 @@ public class WMLConfig implements Serializable
|
|||
public String ScenarioId;
|
||||
/**
|
||||
* True if there was a [scenario] tag present in the file.
|
||||
*
|
||||
*
|
||||
* However The {@link WMLConfig#ScenarioId} may be null
|
||||
*/
|
||||
public boolean IsScenario;
|
||||
|
@ -33,7 +33,7 @@ public class WMLConfig implements Serializable
|
|||
public String CampaignId;
|
||||
/**
|
||||
* True if there was a [campaign] tag present in the file.
|
||||
*
|
||||
*
|
||||
* However The {@link WMLConfig#CampaignId} may be null
|
||||
*/
|
||||
public boolean IsCampaign;
|
||||
|
@ -57,7 +57,7 @@ public class WMLConfig implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the parsed WML Tags from this config file
|
||||
*
|
||||
*
|
||||
* @return A list of Tags
|
||||
*/
|
||||
public Map< String, WMLTag > getWMLTags( )
|
||||
|
@ -75,7 +75,7 @@ public class WMLConfig implements Serializable
|
|||
|
||||
/**
|
||||
* Returns the list of the parsed event names
|
||||
*
|
||||
*
|
||||
* @return A set of event names
|
||||
*/
|
||||
public Set< String > getEvents( )
|
||||
|
|
Loading…
Add table
Reference in a new issue