Remove the UMC IDE plugin.

The reasons being:
* It's been unmaintained for several years now, so any bugs that might be reported against it will almost certainly not be fixed.
* Having been unmaintained for so long, even if someone wanted to create a custom Wesnoth IDE plugin, it's unlikely this would be a good foundation to continue with anymore.
* There are at this point better alternatives that people are actually using and maintaining (such as the VSCode plugin).
* Having this be present can give the impression that this IDE plugin is something UMC authors should still be using, which I think makes it actively harmful. Case in point, the current version of this available on SourceForge (2.0.1) was downloaded twice as of the current week; however the most recent version (2.0.2 in the changelog, or 2.0.3 based on some git commits) is not available on SourceForge at all, nobody apparently ever uploading it.
This commit is contained in:
Pentarctagon 2020-06-29 19:11:50 -05:00 committed by Pentarctagon
parent a666a34055
commit 96369589e6
350 changed files with 0 additions and 68843 deletions

View file

@ -1 +0,0 @@
bin/

View file

@ -1,87 +0,0 @@
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
1. DEFINITIONS
"Contribution" means:
a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
"Contributor" means any person or entity that distributes the Program.
"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
"Program" means the Contributions distributed in accordance with this Agreement.
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement; and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of the Program.
Contributors may not remove or alter any copyright notices contained within the Program.
Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

View file

@ -1,19 +0,0 @@
ECLIPSE_LOCATION=
JAVADOC_BINARY=javadoc
JAVADOC_DIR=javadoc
JAVADOC_FLAGS=-d $(JAVADOC_DIR) -sourcepath 'org.wesnoth/src;org.wesnoth/src-gen;org.wesnoth.ui/src;org.wesnoth.ui/src-gen' -classpath '.;$(ECLIPSE_LOCATION)/plugins/*' -public -source 1.6 -use -version -author -splitindex -link http://java.sun.com/javase/6/docs/api/ -link http://help.eclipse.org/helios/topic/org.eclipse.platform.doc.isv/reference/api/ -link http://download.eclipse.org/modeling/tmf/xtext/javadoc/2.0.0/ -subpackages org.wesnoth
.PHONY: manual javadoc build
manual:
# developer manual
cd manual; pdflatex dev_manual.tex; pdflatex dev_manual.tex cp dev_manual.pdf ..;
# user manual
cd manual; pdflatex user_manual.tex; pdflatex user_manual.tex; cp user_manual.pdf ..;
# cleanup non-needed files
cd manual; rm dev_manual.log; rm dev_manual.aux; rm user_manual.log; rm user_manual.aux; rm dev_manual.out; rm dev_manual.toc; rm user_manual.out; rm user_manual.toc;
javadoc:
$(JAVADOC_BINARY) $(JAVADOC_FLAGS)
build:
echo 'not implemented'

View file

@ -1 +0,0 @@
For the README execute 'make manual' in this directory, and then open the 'user_manual.pdf' or 'dev_manual.pdf' file.

View file

@ -1,4 +0,0 @@
workspace/
binaries/
updates/
keystore

View file

@ -1,123 +0,0 @@
# vi: syntax=python:et:ts=4
#
# SCons build description for the Wesnoth UMC Development IDE
#
# Prerequisites are:
# 1. Sun/Oracle Java JDK
# 2. Eclipse 3.7 environment with all required plugins
# (Can be found at: http://sourceforge.net/projects/wesnoth/files/wesnoth-umcplugin/build_utils/ )
import os, shutil, re, subprocess
# Warn user of current set of build options.
if os.path.exists('.scons-option-cache'):
optfile = file('.scons-option-cache')
print("Saved options: {}".format(optfile.read().replace("\n", ", ")[:-2]))
optfile.close()
# variables
opts = Variables( ".scons-option-cache" )
opts.AddVariables(
PathVariable( "eclipsedir", "The directory that contains the eclipse binary and all the needed plugins",
"", PathVariable.PathIsDir ),
PathVariable( "updatesdir", "The directory that should contain the updates for the plugin",
"updates", PathVariable.PathIsDirCreate ),
PathVariable( "binariesdir", "The directory that should contain the binaries for the plugin",
"binaries", PathVariable.PathIsDirCreate ),
PathVariable( "storepass", "The store pass for signing the jars", "", PathVariable.PathAccept ),
PathVariable( "keypass", "The key pass for signing the jars", "", PathVariable.PathAccept ),
PathVariable( "keystorepath", "The path to the keystore used for signing the jars", "", PathVariable.PathIsFile)
)
env = Environment( options = opts )
opts.Save( '.scons-option-cache', env )
eclipse_dir = env[ "eclipsedir" ]
updates_dir = env[ "updatesdir" ]
binaries_dir = env[ "binariesdir" ]
store_pass = env["storepass"]
if len(store_pass) == 0:
print("Please specify the 'storepass' variable")
Return()
key_pass = env["keypass"]
if len(key_pass) == 0:
print("Please specify the 'keypass' variable")
Return()
temp_build_dir = os.environ[ "TMP" ] + "/umcdev_build"
print("Clearing temporary build dir ( " + temp_build_dir + " ) ...")
if os.path.exists( temp_build_dir ):
shutil.rmtree( temp_build_dir )
os.makedirs( temp_build_dir )
# now, we need to find 2 things:
# 1) file: org.eclipse.equinox.launcher_*.jar
# 2) dir: org.eclipse.pde.build_*
equinox_launcher_path = ""
pde_build_dir = ""
for file in os.listdir( eclipse_dir + "/plugins" ):
if re.match( "org.eclipse.equinox.launcher_.*.jar", file ):
equinox_launcher_path = eclipse_dir + "/plugins/" + file
elif re.match( "org.eclipse.pde.build_.*", file ):
pde_build_dir = eclipse_dir + "/plugins/" + file
if equinox_launcher_path:
print("Found equinox launcher: " + equinox_launcher_path)
else:
print("Couldn't find equinox launcher. Aborting...")
Return( )
if pde_build_dir:
print("Found PDE Build dir: " + pde_build_dir)
else:
print("Couldn't find PDE Build dir. Aborting...")
Return( )
print("Building...")
subprocess.call( [
"java",
"-cp", equinox_launcher_path, "org.eclipse.core.launcher.Main",
"-data", "workspace",
"-application", "org.eclipse.ant.core.antRunner",
"-DbuildDirectory=" + temp_build_dir,
"-Dbase=" + eclipse_dir,
"-DbaseLocation=" + eclipse_dir,
"-DupdatesDir=" + updates_dir,
"-DbinariesDir=" + binaries_dir,
"-Ddeltapack=" + eclipse_dir,
"-Declipse.pdebuild.scripts=" + pde_build_dir + "/scripts",
"-Declipse.pdebuild.templates=" + pde_build_dir + "/templates",
"-DstorePass=" + store_pass,
"-DkeyPass=" + key_pass,
"-DkeystorePath=" + env["keystorepath"],
"-buildfile", "build.xml" ] )
# Some cleanup
print("Cleaning up...")
# Some cleanup
to_cleanup = [
"../org.wesnoth.feature/build.xml",
"../org.wesnoth.dependencies.feature/build.xml",
"../org.wesnoth/build.xml",
"../org.wesnoth.ui/build.xml",
"../org.wesnoth/javaCompiler...args",
"../org.wesnoth.ui/javaCompiler...args" ]
for cleanup_file in to_cleanup:
try: os.remove( cleanup_file )
except: pass
try: shutil.rmtree( "../org.wesnoth.feature/feature.temp.folder" )
except: pass
try: shutil.rmtree( "../org.wesnoth.dependencies.feature/feature.temp.folder" )
except: pass
# Local variables:
# mode: python
# end:

View file

@ -1,101 +0,0 @@
###############################################################################
# Copyright (c) 2003, 2009 IBM Corporation and others.
# All rights reserved. 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
# http://www.eclipse.org/legal/epl-v10.html
#
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
# http://wiki.eclipse.org/Equinox/p2/Publisher
############# PRODUCT/PACKAGING CONTROL #############
product=/org.wesnoth/org.wesnoth.product
runPackager=true
p2.gathering=true
p2.compress=true
p2.metadata.repo.name=Wesnoth Eclipse Plugins
p2.artifact.repo.name=Wesnoth Eclipse Plugins
p2.build.repo=file:${buildDirectory}/repository
p2.metadata.repo=file:${buildDirectory}/repository
p2.artifact.repo=file:${buildDirectory}/repository
p2.category.definition=file:${basedir}/../org.wesnoth.feature/category.xml
#Set the name of the archive that will result from the product build.
archiveNamePrefix=wesnoth_umc_dev
# The prefix that will be used in the generated archive.
archivePrefix=wesnoth_umc_dev
# The location underwhich all of the build output will be collected.
collectingFolder=${archivePrefix}
# The list of {os, ws, arch} configurations to build. This
# value is a '&' separated list of ',' separate triples. For example,
# configs=win32,win32,x86 & linux,motif,x86
# By default the value is *,*,*
configs=win32, win32, x86 &\
win32,win32,x86_64 & \
linux, gtk, x86 & \
linux, gtk, x86_64 & \
macosx, cocoa, x86_64
#Allow cycles involving at most one bundle that needs to be compiled with the rest being binary bundles.
allowBinaryCycles = true
#Sort bundles depenedencies across all features instead of just within a given feature.
flattenDependencies = true
#Parallel compilation, requires flattenedDependencies=true
parallelCompilation=true
parallelThreadCount=2
parallelThreadsPerProcessor=1
#Set to true if you want the output to be ready for an update jar (no site.xml generated)
outputUpdateJars = true
############## BUILD NAMING CONTROL ################
# The directory into which the build elements are fetched and where
# the build takes place.
# ID of the build. Used in naming the build output.
buildId=wesnoth_umc_dev
# Label for the build. Used in naming the build output
buildLabel=${buildId}
# Timestamp for the build. Used in naming the build output
timestamp=007
#this property indicates whether you want the set of plug-ins and features to be considered during the build to be limited to the ones reachable from the features / plugins being built
filteredDependencyCheck=false
#this property indicates whether the resolution should be done in development mode (i.e. ignore multiple bundles with singletons)
resolution.devMode=false
skipBase=true
skipMaps=true
skipFetch=true
############# JAVA COMPILER OPTIONS ##############
# we support just Java 1.6 or greater
JavaSE-1.6=${java.home}/lib/rt.jar
# Specify the output format of the compiler log when eclipse jdt is used
logExtension=.log
# Whether or not to include debug info in the output jars
javacDebugInfo=true
# Whether or not to fail the build if there are compiler errors
javacFailOnError=true
# Enable or disable verbose mode of the compiler
javacVerbose=false
# Default value for the version of the source code. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacSource in build.properties
javacSource=1.6
# Default value for the version of the byte code targeted. This value is used when compiling plug-ins that do not set the Bundle-RequiredExecutionEnvironment or set javacTarget in build.properties.
javacTarget=1.6

View file

@ -1,50 +0,0 @@
<project default="main">
<property file="build.properties"/>
<target name="main">
<available property="haveBaseLocation" file="${baseLocation}"/>
<fail unless="haveBaseLocation" message="Please set the base location for the eclipse installation." />
<available property="haveBuildDirectory" file="${buildDirectory}"/>
<fail unless="haveBuildDirectory" message="Please set the build location." />
<!-- Check that we have a deltapack -->
<available property="haveDeltaPack" file="${deltapack}"/>
<fail unless="haveDeltaPack" message="The deltapack is required to build this product. Please set the &quot;deltapack&quot; property." />
<property name="builder" value="${basedir}" />
<property name="buildDirectory" value="${basedir}/buildDirectory"/>
<property name="pluginPath" value="${basedir}/..${path.separator}${deltapack}" />
<property name="buildTempFolder" value="${buildDirectory}" />
<!-- clear previous builds -->
<delete quiet="true">
<fileset dir="${updatesDir}"/>
</delete>
<delete quiet="true">
<fileset dir="${binariesDir}/${buildLabel}"/>
</delete>
<ant antfile="${eclipse.pdebuild.scripts}/productBuild/productBuild.xml" />
<move todir="${binariesDir}/${buildLabel}">
<fileset dir="${buildDirectory}/${buildLabel}" includes="*.zip"/>
</move>
<move todir="${updatesDir}">
<fileset dir="${buildDirectory}/repository"/>
</move>
<signjar alias="wesnoth" keystore="${keystorePath}" storepass="${storePass}" keypass="${keyPass}">
<path>
<fileset dir="${updatesDir}" includes="**/org.wesnoth*.jar" />
</path>
</signjar>
<!-- remove non-wesnoth plugins -->
<delete>
<fileset dir="${updatesDir}/plugins">
<exclude name="org.wesnoth*"/>
</fileset>
</delete>
</target>
</project>

View file

@ -1,27 +0,0 @@
#!/usr/bin/env python3
import os, sys, shutil
base_path = os.path.dirname(os.path.realpath(__file__))
usage = """usage: update_version current_version new_version
e.g.: update_version 2.0.0 2.0.1"""
files = ["org.wesnoth.dependencies.feature/feature.xml",
"org.wesnoth.feature/category.xml",
"org.wesnoth.feature/feature.xml",
"org.wesnoth.ui/META-INF/MANIFEST.MF",
"org.wesnoth/META-INF/MANIFEST.MF",
"org.wesnoth/org.wesnoth.product"]
if len(sys.argv) < 3:
print(usage)
else:
print("Replacing version ", sys.argv[1], " with ", sys.argv[2], "...")
stext = sys.argv[1] + ".qualifier"
rtext = sys.argv[2] + ".qualifier"
for file in files:
sourcePath = os.path.join(os.path.join(base_path, ".."), file)
targetPath = os.path.join(os.path.join(base_path, ".."), file + ".tmp")
print("Processing: ", sourcePath)
with open(sourcePath) as infile, open(targetPath, "w") as outfile:
for line in infile:
outfile.write(line.replace(stext, rtext))
shutil.move (targetPath, sourcePath)

View file

@ -1,14 +0,0 @@
A build script should follow the following steps:
1) Comment the Test handler/button in plugin.xml
2) Build the plugin
3) Update the version string (you can run the "update_version" python script) in:
- org.wesnoth.dependencies.feature/feature.xml
- org.wesnoth.feature/category.xml
- org.wesnoth.feature/feature.xml
- org.wesnoth.ui/META-INF/MANIFEST.MF
- org.wesnoth/META-INF/MANIFEST.MF
- org.wesnoth/org.wesnoth.product
4) Uncomment the test Handler/button in plugin.xml
5) Upload files to sf.net
6) Update the html files with news about the new version

View file

@ -1,157 +0,0 @@
Eclipse plugin changelog
2.0.2
* Added the #ifver and #ifnver to the recognized WML
* Fixed the coloring of the #else keyword
2.0.1
* Fixed the ``WML Tools" menu not appearing on the projects context menu.
* Fixed the highlighting of the #endif preprocessor define.
* The projects cannot be created anymore until a default is created and selected
in the wizard.
* Changed the directory where the IDE stores its cache to: ``$home/.wesnoth_umcide".
* The path for the Wesnoth binary is now automatically set correctly when using Mac OS X.
2.0.0
* The standalone version now has all the proper save/new/undo/redo
buttons in the menus.
* Added support for multiple wesnoth installations. This
allows the user to have UMC for different wesnoth version at the
same time in the workspace.
* Added a new property page for Wesnoth projects, that allows
one to select what wesnoth install that project use.
* Added the "Wesnoth Addons" view, which allows users to browse
through the existing addons on any wesnoth addon server and
download them ( and optionally create them as projects in the workspace).
* Each wesnoth projects now has attached a folder that points to the
wesnoth ``data/core" directory.
* The required Xtext version has been raised to 2.0.0
* The required Eclipse version has been raised to 3.7 ( Indigo )
* Improved the content assist for:
- variables
- events
- tags & keys - now the lua defined tags and keys are recognized
and suggested to the user
* The wesnoth wizards are now available directly from the ``File" -> ``New" menu.
* The standalone version can be updated via the ``Help" -> ``Check for Updates".
* Eclipse update site has moved to ``http://eclipse.wesnoth.org/updates"
1.0.3
* Fixed bug #18080
* Fixed bug #18076
* Fixed bug #18025
1.0.2
* Fixed bug #17875 - Wesnoth projects is blank unless right-clicked
* Fixed bug #17882 - UTF-8 files with BOM not supported
* Fixed bug #17390 - Wesnoth menu doesn't appear
1.0.1
* The plugin has it's own webpage: http://eclipse.wesnoth.org
* Created the standalone version of the plugin. It is available on plugin's webpage.
* Fixed the file associations for .map files. Now the game editor will be the default one.
* Optimized the building by not reloading the macros cache if no config files have been modified.
* The plugin is now signed.
* Enhanced the documentation.
* Added tooltip to each preference in preferences page.
* Added marker support when checking with wmllint and wmlscope. The markers will appear
in each file, at the reported line and in the Problems Pane (usually the one under the editor)
* The user is asked at the workspace setup phase whether to create or not projects for
mainline projects
* Fixed a problem when an empty project won't open after creating it.
* Fixed bug #16602.
* Fixed bug #16984 - The path for python executable can now be set via preferences page.
1.0.0
* Fixed a problem in cases when the workbench isn't started and the
welcome message would have caused error starting the plugin
* Now it's possible to use a wesnoth project without the 'build.xml' build files.
If the build.xml file is missing the user can 'regenerate' it by using the
project's context menu. A file without 'build.xml' is considered to be
a data/campaigns/ project
* Added 'Advanced Preferences' preferences page.
* Removed the User Addons project
* The 'Setup workspace" action will create a project for each existing
data/campaigns/ campaign and for each directory in 'useraddons/data/add-ons'
* Wesnoth projects building was improved by:
- removing some unused properties
- caching of preprocessed files. Files that already have been preprocessed will be skipped.
- the project macros are read only at the end of the build
* The *.map files are opened automatically in the game map editor
* The grammar was updated so the editor will support a broader variety of wml code.
Even though, the current grammar has 2 unsupported WML Constructs:
1) Attributes with the key name as a macro: (an example: Dead Water campaign/utils/dw-utils.cfg:70)
{name}=id
2) Unterminated/unstarted tags. This is used sometimes in macro definitions.
(example: Delfadors Memoirs/scenarios/09_Houses_of_the_Undead.cfg, the first 2 macros defined)
#define macro_start
[unit]
id=myunit
#enddef
...
#define macro_end
[/unit]
#enddef
As a resolve to this issue you could write/re-write the macro so instead of having 2 macros
you would have only one + 1 extra argument that will represent the content replaced in between
* When there are tags that need to be closed, when the user types: '[/' the last
unclosed tag will be closed automatically
* The user can specify whether the new project wizard should create the files:
'_server.pbl' and 'build.xml'
* Added the 'Wesnoth project' View specialized for viewing wesnoth projects
* Added wizard for new wesnoth config file (.cfg)
** Helpers**
- pressing F2 on different wml elements, brings up the WMLDoc:
- macros - will display its name, definition and arguments
- tags - will display a description for the tag
** Navigation - Used with F3 or CTRL+CLICK **
- map location - opens the map in the editor
- macro calls - goes to macro definition
** Autocompletion **
* We now have priorities, so more important stuff is shown first. Currently
the following order is in place: key values > key names > tags > macro calls
- tag names
- mandatory tag keys are automatically added for each auto-completed tag
- key names
- macro calls
- key values: enums, scenarios
0.2.1
* The workspace setup is done automatically on plugin start (first usage of it's features)
* Faster launching of campaign/scenario due to some enhancement in the wmlparser
* The plugin will autocomplete the paths for wesnoth if it's installed on its default location
* The logs will be placed in <temp>/wesnoth_plugin/logs and will have the name based only on current time
* New preferences pages for 'Addon uploader' and 'WML Tools' were added
* Fix collision between files with the same name by preprocessing them in separate directories
0.2.0
* updated the editor to xtext 1.0.0
** Wizards **
- era
- faction
- dynamically generated wizards for every tag, based on wml schema
** Menus **
- added wmlscope, wmlindent on preprocessor menu
- open campaign/scenario in game
- open the game
0.0.1
* Misc
- created the TemplateProvider that manages the templates
for various file types
- created the Preferences page for plugin related preferences
- added the update site for the plugin (http://eclipse.wesnoth.org)
** Wizards **
- campaign
- scenario
** Menus **
- Opening the editor
- Importing wesnoth map
- Open selected map in the map editor
- Open selected scenario in game
- Run wmllint on different files and see the output
- See preprocessor output for different files

View file

@ -1,8 +0,0 @@
*.aux
*.log
*.bbl
*.synctex.gz
*.toc
*.bak
*.pdf
*.blg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

View file

@ -1,207 +0,0 @@
\documentclass[10pt]{article}
\usepackage[top=2cm, bottom=2cm, left=2cm, right=2cm]{geometry}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage[colorlinks=true]{hyperref}
\usepackage{verbatim}
\usepackage{enumerate}
\usepackage{wrapfig}
\title{Wesnoth UMC Development \\ Developer's Manual}
\author{Timotei Dolean - \href{mailto:timotei21@gmail.com}{timotei21@gmail.com}}
\begin{document}
\maketitle
\tableofcontents
\setcounter{tocdepth}{3}
\newpage
\newcounter{cnt}
\newcommand{\icnt}{ \stepcounter{cnt} \thecnt }
\section{Foreword}
\begin{multicols}{2}
\begin{center}
\includegraphics[scale=0.7]{definitions.png}
\end{center}
The plugin's homepage is: \url{http://eclipse.wesnoth.org/} \\
Throughout this readme the following terms with the specified meaning will be used:
\begin{enumerate}
\item Navigator / Project Explorer / Package Explorer - an Eclipse view that shows the projects in the workspace
\item Project - a directory on the harddrive that is represented as a top directory in the navigator.
\item Container - this is a directory or a project. Basically it can contain any file or directory children.
\end{enumerate}
The image in the left highlights the terms used: 1 - Navigator, 2 - Project, 3 - Containers, 4 - Map files, 5 - Config files that contain WML code
\end{multicols}
\section{Prerequisites}
A quick list before getting into details:
\begin{enumerate}
\item Java 6 or 7 (8 won't work yet)
\item Python 2.x
\item Eclipse 3.7 (Indigo) or newer
\item Wesnoth 1.9.x, trunk or newer
\end{enumerate}
Now for getting all those items:
\begin{enumerate}
\item The plugin runs on the following platforms: Windows 32/64 bit, Linux 32/64 bit and Mac OS X 64bit. Note that \textbf{Mac OS X 32 bit} is \textbf{not supported}. If you want to know why, please consult the Frequently Asked Questions section.
\item Download and install Oracle's Java Version 7 (Java SE7): \href{http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html}{Download JDK}
\textit{Note:} The plugin uses Java SE6/SE7, thus older versions (like 1.4 or 1.5) won't work with it.\\
\textit{Note:} Please double check the java installed on your system. On some machines there is the OpenJDK or other Java versions. Just use Oracle's so there will be no problems.
\item Download and install Python 2.x:
\begin{enumerate}
\item \textbf{Windows:} Download and install it from here: \href{http://python.org/download/}{Download Python} , selecting a 2.x version
\item \textbf{Linux:} Use the distribution's package manager for installing it.
\item \textbf{Mac:} Download and install it from here: \href{http://python.org/download/}{Download Python} , selecting a 2.x version
\item For other operating systems, check the guide over here: \href{http://wiki.python.org/moin/BeginnersGuide/Download}{Python download and install}
\end{enumerate}
\textit{Note:} Please ensure you install the 2.x version. Version 3.x is \textbf{not} yet supported by the Wesnoth's WML Tools.
\item Download ``Eclipse" (The download links are in the right. Please ensure you are downloading at least the \textbf{3.7} version, otherwise the plugin will not work. Also, \textbf{don't} download a \textbf{64 bit version} unless you are sure you have Java JDK on 64 bit. If you are unsure, select the 32 bit version): \href{http://eclipse.org/downloads/packages/eclipse-rcp-and-rap-developers/indigor}{Download Eclipse for RCP and RAP Developers}
\item Extract the downloaded archive in a known location and launch the executable (eclipse / eclipse.exe)
\item You will need to have a wesnoth version 1.9.x, trunk or newer, in order for the plugin's features to correctly work.
\end{enumerate}
\section{Setup the environment}
After you got all the prerequisites, you need to setup the eclipse installation.
\subsection{Target Platform setup}
\begin{enumerate}
\item Download the ``eclipse\_3.7.zip" archive, that contains an already existing Eclipse SDK installation and deltapack (used for building against other OSes than the native one). The link for the download is: \href{http://sourceforge.net/projects/wesnoth/files/wesnoth-umcplugin/build\_utils/eclipse\_3.7.zip/download}{Download}
\textit{Note:} You can generate the archive contents yourself by downloading the Eclipse SDK and its corresponding deltapack from \url{http://download.eclipse.org/eclipse/downloads/}.
\item Extract the archive somewhere.
\item Go to menu: Window -$>$ Preferences-$>$ Plug-in Development-$>$ Target Platform
\item Select the \textbf{Running Platform (Active)} item and press ``Edit..." in the left buttons lane.
\item A new window with tabs will be opened. Select the ``Locations" tab, and in the right buttons lane, select ``Add..."
\item Select ``Directory" in the new windows, then press Next.
\item Browse to the previous location where you have extracted the ``eclipse\_3.7.zip" archive.
\item Press Finish and OK until you exit all windows.
\end{enumerate}
\subsection{Installing Xtext}
\begin{enumerate}
\item Open up the ``Install new software" menu, and select from the list: ``Indigo - http://download.eclipse.org/releases/indigo" (if using a newer version, just select the url that starts with \emph{http://download.eclipse.org/releases})
\item In the list populated with items, select from the ``Modelling" category: ``Xtext SDK", and install it. Restart eclipse after that.
\item For the plugin's source, checkout the folder ``umc\_dev" from
the Battle for Wesnoth repository.
\item In Eclipse, right click in \textbf{Package Explorer/Navigator} and then select \textbf{Import - General - Existing projects into Workspace}
\item Select the path where you downloaded the ``umc\_dev" folder, and check all the projects: ``org.wesnoth", ``org.wesnoth.dependencies.feature", ``org.wesnoth.feature", ``org.wesnoth.ui" and ``org.wesnoth.tests". \textbf{Don't} check the "Copy projects into workspace.
\item The projects will be compiled automatically. Just to be sure, as in each Java project, verify that the ``Build automatically" entry in the ``Project" menu is checked.
\end{enumerate}
\section{Running the plugin}
After you've setup the environment you can run the plugin.
\begin{enumerate}
\item Go into the ``org.wesnoth" project.
\item Select the ``plugin.xml" file, and double-click to open it.
\item Click the ``Launch an Eclipse application" or ``Launch an Eclipse application in Debug mode" from the right part of the file, to launch the plugin.
\end{enumerate}
\centerline{\includegraphics[scale=0.6]{launch_plugin.png}}
If you want to know how you can use the plugin, please consult the User's Manual.
\section{Running the tests}
\subsection{Normal tests}
The plugin has a Test Suite based on JUnit 4, that tests some aspects of plugin's working internals. A running instance of the plugin is not necessarily. To run these tests, follow the following steps:
\begin{enumerate}
\item Go to the ``Run" menu, and select ``Run configurations..."
\item In the left pane's list, right click on the ``JUnit" item
\item Select ``New" from the opened context menu
\item Select the first radio box: ``Run a single test"
\item For the \textbf{Project}, enter: ``org.wesnoth.tests" ( or browse for it )
\item For the \textbf{Test Class}, enter: ``org.wesnoth.tests.WMLTestsSuite" ( or ``Search..." for it. Just enter ``WMLTestsSuite" in the newly opened window, and select the item )
\item For the \textbf{Test method}, let it as it is by default: ``(all methods)"
\item In the ``Test runner" Combo Box select ``Junit 4"
\item Go to the ``Arguments" tab, and in the ``VM Arguments" text box, enter: $-DwesnothWorkingDir=<path>$
\item Replace the $<path>$ token with the current path to the wesnoth working directory ( it contains the data directory )
\item Press ``Apply" and ``Run"
\end{enumerate}
\subsection{PDE Tests}
This tests involve starting the plugin, and launching the tests after it started. This is because some Eclipse's framework is used ( projects, etc ). To run these tests, follow the following steps:
\begin{enumerate}
\item Go to the ``Run" menu, and select ``Run configurations..."
\item In the left pane's list, right click on the ``JUnit Plug-in Test" item
\item Select ``New" from the opened context menu
\item Select the first radio box: ``Run a single test"
\item For the \textbf{Project}, enter: ``org.wesnoth.tests" ( or browse for it )
\item For the \textbf{Test Class}, enter: ``org.wesnoth.tests.WMLPDETestsSuite" ( or ``Search..." for it. Just enter ``WMLTestsSuite" in the newly opened window, and select the item )
\item For the \textbf{Test method}, let it as it is by default: ``(all methods)"
\item In the ``Test runner" Combo Box select ``Junit 4"
\item Go to the ``Arguments" tab, and in the ``VM Arguments" text box, add the following arguments, separated by space:
\begin{enumerate}
\item $-DisTesting=true$
\item $-DwesnothWorkingDir=<path>$ ( Replace the $<path>$ token with the current path to the wesnoth working directory ( it contains the data directory ) )
\item $-DwesnothExec=<path>$ ( Replace the $<path>$ token with the current path to the wesnoth executable )
\item $-DwesnothWMLTools=<path>$ ( Replace the $<path>$ token with the current path to the wesnoth wml tools directory )
\item $-DwesnothUserDir=<path>$ ( Replace the $<path>$ token with the current path to the user directory ( it contains the data/add-ons directory ) )
\item $-DpythonPath=<path>$ ( Replace the $<path>$ token with the current path to the python binary ( for *nix systems, 'pyhon' will suffice ) )
\end{enumerate}
\item Press ``Apply" and ``Run"
\end{enumerate}
\textit{Note:} You can always launch last run configuration with F11 - Debug / CTRL+F11 - Run. Alternatively, you can launch them by clicking near the green bug/run icon, on the little down arrow, and selecting the run configuration.
\section{Building the plugin}
The plugin can be built as a zip archive (usually) for different operating systems. The built application can be launched without any Eclipse prerequisites. This plugin's version is called \textbf{Standalone}.
You now have 2 choices: Build the plugin from within Eclipse - this way you can build, say, just for your current OS/architecture - or you can use the already existing build script - that builds the plugin for all currently supported architectures.
\subsection{Building via Eclipse}
\begin{enumerate}
\item Open Eclipse.
\item Go into the ``org.wesnoth" project, and open the file ``org.wesnoth.product".
\item In the bottom right part of the opened file, in section ``Exporting" there is a link: ``Eclipse Product export wizard". Click that.
\item In the ``destination" group, select where you want the export/build to be done.
\item Check the ``Generate metadata repository". You can also check ``Export for multiple platforms" if you want to build the plugin for other OSes/Architectures as well.
\item Press Next if you have selected ``Export for multiple platforms" and select the desired OSes/Architectures.
\item Finally press ``Finish" to do the building.
\end{enumerate}
\subsection{Building via the SCons build script}
\begin{enumerate}
\item Go to the ``build" directory in the repository checkout.
\item The build is done via Scons.
\item When launching the build first time you need to specify the ``eclipsedir" argument that specifies the path to a valid Eclipse SDK + deltapack installation. The file you have previously downloaded (``eclipse\_3.7.zip") already contains this.
\item You can invoke the build like: \textit{scons eclipsedir=/path/to/eclipse-sdk-dir}. After the first run, the path is cached and you won't need to specify it anymore.
\item The directory ``wesnoth\_umc\_dev" will contain now the built plugin as zip archives, while the ``update\_site" directory will contain the update site for the plugin.
\end{enumerate}
\section{Generating the WML Grammar}
The WML Editor uses the Xtext (\url{http://www.eclipse.org/Xtext/}) framework for getting the functionality an editor should have. The editor is based on the WML grammar defined in the ``org.wesnoth/src/org.wesnoth/WML.xtext" file.
The file is written in some EBNF variant (\url{http://www.eclipse.org/Xtext/documentation.html\#\#grammarLanguage})
To (re-)generate the wml grammar, right click the ``org.wesnoth/src/org.wesnoth/GenerateWML.mwe2", and select ``Run as" and after that ``MWE2 Workflow". If this is your first time running the MWE2 Workflow, you'll be prompted to download the ANTLR generator jar file. Press (y) and that will continue.
\section{Frequently Asked Questions}
\subsection{Where can I submit any bugs found?}
Go over to Wesnoth's bug tracker: \href{https://gna.org/bugs/?func=additem&group=wesnoth&bug_group_id=116}{Add new bug}. Please be as specific as possible. Also, if you have any logs, please attach them.
\subsection{Why Mac OS X 32 bit is not supported?}
Apple decided to manage itself the versions that can run on each Mac version. Thus the modern Java SE6 version - which is used by the plugin - is not available on 32 bit Macs but on 64 bit only. The 32 bit Macs have just Java SE5 version available. Trying to port the plugin to the ``outdated" Java version is not likely to be done, so please consider upgrading your OS.
\end{document}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

View file

@ -1,258 +0,0 @@
\documentclass[10pt]{article}
\usepackage[top=1cm, bottom=1cm, left=1cm, right=1cm]{geometry}
\usepackage{graphicx}
\usepackage{multicol}
\usepackage[colorlinks=true]{hyperref}
\usepackage{verbatim}
\usepackage{enumerate}
\usepackage{wrapfig}
\title{Wesnoth UMC Development \\ User's Manual}
\author{Timotei Dolean - \href{mailto:timotei21@gmail.com}{timotei21@gmail.com}}
\begin{document}
\maketitle
\tableofcontents
\setcounter{tocdepth}{3}
\newpage
\newcounter{cnt}
\newcommand{\icnt}{ \stepcounter{cnt} \thecnt }
\section{Foreword}
\begin{multicols}{2}
\begin{center}
\includegraphics[scale=0.6]{definitions.png}
\end{center}
The plugin has its homepage at: \url{http://eclipse.wesnoth.org/} \\
Through this readme the following terms with the specified meaning will be used:
\begin{enumerate}
\item Navigator / Project Explorer / Package Explorer - an Eclipse view that shows the projects in the workspace
\item Project - a directory on the harddrive that is represented as a top directory in the navigator.
\item Container - this is a directory or a project. Basically it can contain any file or directory children.
\end{enumerate}
The following image will highlight the terms used: 1 - Navigator, 2 - Project, 3 - Containers, 4 - Map files, 5 - Config files that contain WML code
\end{multicols}
\section{Prerequisites}
A quick list before getting into details:
\begin{enumerate}
\item Java 6
\item Python 2.x
\item Wesnoth 1.9.x, trunk or newer
\item Eclipse 3.7 ( Indigo ) or newer (Only for the Eclipse Version)
\end{enumerate}
Now for getting all those items:
\begin{enumerate}
\item The plugin runs on the following platforms: Windows 32/64 bit, Linux 32/64 bit and Mac OS X 64bit. Note that \textbf{Mac OS X 32 bit} is \textbf{not supported}. If you want to know why, please consult the Frequently Asked Questions section.
\item Download and install Oracle/Sun's Java Version 6 (Java SE6): \href{http://java.sun.com/javase/downloads/widget/jdk6.jsp}{Download JDK}
\textit{Note:} The plugin uses Java SE6, thus older versions (like 1.4 or 1.5) don't work with it.\\
\textit{Note:} Please double check the java installed on your system. On some machines there is the OpenJDK or other Java versions. Just use Oracle/Sun's so there will be no problems.
\item Download and install Python 2.x:
\begin{enumerate}
\item \textbf{Windows:} Download and install it from here: \href{http://python.org/download/}{Download Python} , selecting a 2.x version
\item \textbf{Linux:} Use the distribution's package manager for installing it.
\item \textbf{Mac:} Download and install it from here: \href{http://python.org/download/}{Download Python} , selecting a 2.x version
\item For other operating systems, check the guide over here: \href{http://wiki.python.org/moin/BeginnersGuide/Download}{Python download and install}
\end{enumerate}
\textit{Note:} Please ensure you install the 2.x version. Version 3.x is \textbf{not} yet supported by the Wesnoth's WML Tools.
\item You will need to have a wesnoth version 1.9.x, trunk or newer, in order for the plugin's features to correctly work.
\item \textit{Note:} The following 2 steps are only neccessary if you will use the Eclipse version of the plugin.
\item Download ``Eclipse" (The download links are in the right. Please ensure you are downloading at least the \textbf{3.5} version, otherwise the plugin will not work. Also, \textbf{don't} download a \textbf{64 bit version} unless you are sure you have Java JDK on 64 bit. If you are unsure, select the 32 bit version): \href{http://www.eclipse.org/downloads/packages/eclipse-classic-37/indigor}{Download Eclipse Classic}
\item Extract the downloaded archive in a known location and launch the executable (eclipse / eclipse.exe)
\end{enumerate}
\section{Installing the plugin}
\subsection{Eclipse version}
The Eclipse version, like the name says, needs a working Eclipse environment.
\begin{enumerate}
\item After launching Eclipse, go to the ``Help'' menu - Install new Software. Then, check the checkbox ``Contact all update sites during install to find required software" (it can be found in the bottom of the page).
\begin{center}
\includegraphics[scale=0.7]{install_new_software.png}
\end{center}
\item Insert the link \textbf{http://eclipse.wesnoth.org/updates} in the textbox in the top and press Enter. The list will be populated with some items.
\item Select the single item ``Wesnoth User Made Content Plugin" and press finish.
\textit{Note:} If you are prompted for any license agreements or certificates press Yes on all (if you agree).\\
\textit{Note:} After the plugin has installed, press ``Restart workbench now" when you are prompted.
\item Now the plugin is ready to be used.
\end{enumerate}
\subsection{Standalone version}
The standalone version of the plugin, does not need any Eclipse ``thingy". Just fulfil the prerequisites and you're ready to go. The standalone version is currently available as zip archives for major OSes (Windows, Mac OS X and Linux) and Architectures (x86 and x64). To use the standalone version follow the following steps:
\begin{enumerate}
\item Go to \href{http://eclipse.wesnoth.org/doc\_howto.html}{http://eclipse.wesnoth.org/doc\_howto.html}
\item Download the version appropiate to your OS and architecture.
\item Extract the downloaded archive and launch eclipse executable (Eclipse.App / Eclipse.exe / Eclipse ).
\end{enumerate}
\section{Features}
The plugin has the following list of abilities (not exhaustive):
\begin{itemize}
\item Easily creation of UMC Addons
\item Quick ``Writing" of WML code by using WML Wizards, by focusing on the content
\item Integrated launch of the Game or Map Editor
\item Integrated launch of the WML tools on individual projects/files
\item Support for multiple Wesnoth versions
\item Integrated powerful WML Editor with autocomplete, go to macro definition, etc
\end{itemize}
\section{Using the plugin}
After you have started the plugin, you can use its features.
But before of all, you must setup your environment, so it knows where your wesnoth game is located. By default, after you have launched the plugin for the first time, you will be greeted with a small assistant that will help you ``setup the workspace". The preferences page for the plugin will pop up and you must fill all fields, so the plugin will work as intended. After you completed the fields, press \textbf{OK}. Then the plugin will create for convenience (i.e. if you want) wesnoth projects for each directory in your \textbf{useraddons/data/add-ons} directory. The working directory is the directory that contains the data, images, manual, sounds directories of Wesnoth.
If there were no errors a message window will open saying: \textbf{Workspace was setup successfully}.
\subsection{Wesnoth installations}
The plugin supports working with multiple installations ( we'll call them ``installs" ). The installs can be setup from the Preferences panel. An installation is called valid if:
\begin{itemize}
\item It is defined in the Installs page
\item It has set all paths and they point to existing objects (currently the following paths can be set: wesnoth working directory, wesnoth executable path, wesnoth user addons directory and wesnoth wml tools path)
\end{itemize}
The Installs Preferences Page will list all currently saved installs. You can view, edit, remove or set as default a specific installation.( \textit{Note:} You cannot modify the name of the install after creation. For that, you need to delete and add it again with another name.) The installs have also attached a Wesnoth version to them. This is for now, just for informational purposes. It is not used effectively in others area than the Preferences page.
All installs have in common the same python path. That means, each installation points to the same, current Python path set.
A default installation, is used at times like:
\begin{itemize}
\item A new project is created
\item A project uses a previous existing install, which is no more valid
\end{itemize}
The first created install ever will become automatically default. If a default installation is deleted and there are another installs, one of them will be selected as the new default.
After the user has configured the installs, he can use them on a per-project basis. Each project has a properties page ( Right click on project -$>$ Properties -$>$ Wesnoth Project ). There the user can configure project specific settings, including the install used in the context of that project.
\subsection{Wizards}
There are some wizards available in the plugin, that will create either projects or config files, based on the specified input. This wizards are available by going to the ``File" menu - New, and from that list selecting one of the Wesnoth wizards.
There are 3 wizards categories:
\begin{enumerate}
\item Project wizards - ``Empty project" and ``Campaign" wizards create new projects in the workspace. The former will create a basic addon directory structure. The latter will create a campaign and its directory structure.
\item File wizards - ``Wesnoth config file", ``Scenario", ``Era" and ``Faction" wizards create a new file in a selected container.
\item Wizard launcher - This is a special wizard. It takes a wml tag as input, and generate subsequent needed tags and key inputs. This is generated based on the wml schema, so if the schema is incomplete some tags won't be available. This wizard can create a new file or copy the resulted WML into the current edited file.
\end{enumerate}
\subsection{Menus}
There are currently 2 types of menus: the context menus for different file/container types and the main menu. For a better distinction the menus have the wenoth icon near each item.
\begin{description}
\item{\textbf{Project context menu}} - right click on the projects created with the plugin
\textit{Wesnoth project report} - will show a simple report with the numer of maps, scenarios and units.\\
\textit{Open campaign in game} - will start the current project's campaign (if any) in wesnoth. For this to work, you must have a ``\_main.cfg" file defined, and a campaign in it.\\
\textit{Upload addon} - will upload the specified directory on the wesnoth addon server. The status will be outputed to the console.\\
\textit{Regenerate build files} - recreates the ``build.xml" file. That is used if the current project is one relative to useraddons\\
\textit{Builders} - utilities for adding/removing the wesnoth/xtext builders. Don't use them until you know what you are doing.
\item{\textbf{Container context menus}} - right click on any container
\textit{WML Tools} - provides some options for using the wmltools with the specified project.
\item{\textbf{``maps" folder context menu}} - right click on the ``maps" directory
\textit{Import map} - Shows a file selection window that will ley you select a .map file that will be copied in your maps directory.
\item{\textbf{.cfg files context menu}} - right click on any .cfg file
\textit{Open scenario in game} - opens the selected file's scenario (if it contains one) in wesnoth.\\
\textit{WML Tools} - provides some options for using the wmltools with the specified file. (e.g. run wmllint against the file and see the output in the console) \\
\textit{Preprocessor} - provides ways of preprocessing and showing the result in an editor inside eclipse.
\item{\textbf{.map files context menu}} - right click on any .map file
\textit{Open map in editor} - will open the selected map in the wesnoth map editor.
\item{\textbf{Editor context menu}} - right click in the editor
\textit{Validate} - will validate the entire file (this is an expensive action)
\item{\textbf{Main menu}} - This is a menu near the ``Window" menu bar
\textit{Open editor} - Will open the game editor with a blank map.\\
\textit{Open game} - Will open the game.\\
\textit{Import map} - It will import a map in selected container.\\
\textit{Open editor} - Open the selected map in the game editor.\\
\textit{Setup workspace} - Will setup the workspace if it's not setup. This will open the preferences page if any preferences is missing, and then it will create the wesnoth project for mainline and user addons directories if you want.\\
\textit{Open plugin's preferences} - Opens the plugin preferences page.\\
\end{description}
\section{WML Editor}
The plugin contains a full-fledged WML Editor. It recognizes the .cfg files and opens them in the WML Editor by default. The Editor supports UTF-8 files not just ASCII ones. The editor is one of the most important features of the plugin.
\textit{Note:} Albeit the editor can open external files ( that is, outside the workspace ), all the cool features that come with the editor, will not be available until the file belongs to a project.
\subsection{Content assist}
At any time, when writing WML Code, one could activate the content assist by the \textbf{CTRL + SPACE} shortcut. A small inline popup will open showing suggestions on what to complete. Currently the plugin can auto complete:
\begin{itemize}
\item Scenario ids
\item WML Tags
\item WML Keys
\item WML Macros
\end{itemize}
Each item has a little icon to help the user distinguish between suggestions types.
\subsection{WML macros}
One can view the definition of a WML macro, by hovering / going with the caret over the call, and pressing \textbf{F2}. A small popup will open showing the macros' definition. Alternatively, Pressing \textbf{F3}, will open the macro's definition file, so you can modify it or inspect related macros.
\section{Use cases}
\subsection{Import an already existing wesnoth addon into the plugin}
For this you need just 2 single steps:
\begin{enumerate}
\item Open eclipse. Click the ``New" main menu bar - Project. Select the ``Empty project" from ``Wesnoth" category.
\item Enter the name of the project. Uncheck ``Use default location", and press ``Browse...". Navigate to the addon's directory and then continue the wizard as necessary.
\end{enumerate}
\subsection{Updating the plugin}
The plugin, due to Eclipse's architecture, can be updated very simple. At any time, the user can check for new updates, by going to the menu: Help-$>$ Check for Updates. If there are any new versions released, they will get downloaded and applied. This way you'll need to download just the bits updated, not the whole eclipse or standalone version.
\section{Frequently Asked Questions}
\subsection{What is this plugin all about?}
The plugin is in fact something like a WML IDE ( \href{http://en.wikipedia.org/wiki/Integrated_development_environment}{Wikipedia - IDE}). Basically it offers you some features that greatly help anybody who makes User Made Content in WML.
\begin{description}
\item - It has wizards for new campaigns, scenarios, factions, eras, and everything else you might think of. You just complete the needed values and it generates the wml (with nice indentation).
\item - It has front-ends for launching wmltools (like wmllint, wmlscope, wmlindent on files/directories), the wesnoth game, and the map editor.
\item - It has a specialized WML editor that has syntax highlighting, tag folding and outline, autocompletion, navigation to macro definitions and so on.
\item - It has integrated addon management features that allow to upload or download arbitrary addons.
\end{description}
\subsection{The IDE doesn't start anymore after update}
If you have just used the auto-update mechanism, and after the restart the IDE doesn't start anymore, then you can use a simple script to fix it. Just go to the download page (\url{http://eclipse.wesnoth.org/download.html}) and download the "Post-Update fix" script for your Operating System and execute it. Place it on the same level with the UMC IDE binary (wesnoth\_umc\_dev), and run it. Now the IDE should start fine.
\subsection{Where can I submit any bugs found?}
Go over to Wesnoth's bug tracker: \href{https://gna.org/bugs/?func=additem&group=wesnoth&bug_group_id=116}{Add new bug}. Please be as specific as possible. Also, if you have any logs, please attach them - refer to the next FAQ Entry for ways of getting the logs.
\subsection{Where I can find the logs?}
If you encounter any errors during the usage of the plugin, the plugin logs them in the: \textbf{$<$your temporary directory$>$/wesnoth\_plugin/logs}.
That is usually on linux:\\
\indent \textbf{/tmp/wesnoth\_plugin/logs}\\
or on windows:\\
\indent \textbf{C:/Documents and settings/$<$your username$>$/Local Settings/Temp/wesnoth\_plugin/logs} \\
or\\
\indent \textbf{C:/Users/$<$your username$>$/Local Settings/Temp/wesnoth\_plugin/logs}
\subsection{Why Mac OS X 32 bit is not supported?}
Apple decided to manage itself the versions that can run on each Mac version. Thus the modern Java SE6 version - which is used by the plugin - is not available on 32 bit Macs but on 64 bit only. The 32 bit Macs have just Java SE5 version available. Trying to port the plugin to the ``outdated'' java version is not likely to be done, so please consider upgrading your OS.
\end{document}

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.wesnoth.dependencies.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View file

@ -1 +0,0 @@
bin.includes = feature.xml

View file

@ -1,193 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.wesnoth.dependencies"
label="Wesnoth UMC Dev Dependencies"
version="2.0.3.qualifier"
provider-name="www.wesnoth.org"
os="linux,macosx,win32"
arch="x86,x86_64"
license-feature="org.wesnoth"
license-feature-version="2.0.3.qualifier">
<description>
The dependencies feature for the Wesnoth UMC Dev plugin.
</description>
<license url="http://www.example.com/license">
[Enter License Description here.]
</license>
<url>
<update label="Wesnoth Eclipse Updates" url="http://eclipse.wesnoth.org/updates"/>
<discovery label="Update site" url="http://eclipse.wesnoth.org/updates"/>
</url>
<plugin
id="org.apache.commons.cli"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.apache.commons.lang"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.codegen"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.codegen.ecore"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.common"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.common.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.converter"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.ecore"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.ecore.edit"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.ecore.editor"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.ecore.xmi"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.edit"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.edit.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.mwe.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.mwe.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.mwe.utils"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.emf.mwe2.runtime"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.core"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.core.manipulation"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.debug"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.debug.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.launching"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.jdt.ui"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
<plugin
id="org.eclipse.ui.views.log"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature>

View file

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.wesnoth.feature</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>

View file

@ -1 +0,0 @@
bin.includes = feature.xml

View file

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site>
<feature url="features/org.wesnoth_2.0.3.qualifier.jar" id="org.wesnoth" version="2.0.3.qualifier" os="linux,macosx,win32">
<category name="org.wesnoth.plugins"/>
</feature>
<category-def name="org.wesnoth.plugins" label="Wesnoth Eclipse Plugins">
<description>
This category contains the Wesnoth Eclipse Plugins
</description>
</category-def>
</site>

View file

@ -1,263 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<feature
id="org.wesnoth"
label="Wesnoth User Made Content Plugin"
version="2.0.3.qualifier"
provider-name="www.wesnoth.org"
plugin="org.wesnoth"
os="linux,macosx,win32"
arch="x86,x86_64">
<description>
This is the Wesnoth Eclipse UMC Plugin developed as part of Google Summer of Code 2010 - 2012.
</description>
<license url="http://www.eclipse.org/legal/epl-v10.html">
Eclipse Public License - v 1.0
THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS
ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE, REPRODUCTION OR
DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT&apos;S ACCEPTANCE
OF THIS AGREEMENT.
1. DEFINITIONS
&quot;Contribution&quot; means:
a) in the case of the initial Contributor, the initial code and
documentation distributed under this Agreement, and
b) in the case of each subsequent Contributor:
i) changes to the Program, and
ii) additions to the Program;
where such changes and/or additions to the Program originate
from and are distributed by that particular Contributor. A Contribution
&apos;originates&apos; from a Contributor if it was added to the Program
by such Contributor itself or anyone acting on such Contributor&apos;s
behalf. Contributions do not include additions to the Program
which: (i) are separate modules of software distributed in conjunction
with the Program under their own license agreement, and (ii)
are not derivative works of the Program.
&quot;Contributor&quot; means any person or entity that distributes the
Program.
&quot;Licensed Patents&quot; mean patent claims licensable by a Contributor
which are necessarily infringed by the use or sale of its Contribution
alone or when combined with the Program.
&quot;Program&quot; means the Contributions distributed in accordance with
this Agreement.
&quot;Recipient&quot; means anyone who receives the Program under this
Agreement, including all Contributors.
2. GRANT OF RIGHTS
a) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free copyright
license to reproduce, prepare derivative works of, publicly display,
publicly perform, distribute and sublicense the Contribution
of such Contributor, if any, and such derivative works, in source
code and object code form.
b) Subject to the terms of this Agreement, each Contributor hereby
grants Recipient a non-exclusive, worldwide, royalty-free patent
license under Licensed Patents to make, use, sell, offer to sell,
import and otherwise transfer the Contribution of such Contributor,
if any, in source code and object code form. This patent license
shall apply to the combination of the Contribution and the Program
if, at the time the Contribution is added by the Contributor,
such addition of the Contribution causes such combination to
be covered by the Licensed Patents. The patent license shall
not apply to any other combinations which include the Contribution.
No hardware per se is licensed hereunder.
c) Recipient understands that although each Contributor grants
the licenses to its Contributions set forth herein, no assurances
are provided by any Contributor that the Program does not infringe
the patent or other intellectual property rights of any other
entity. Each Contributor disclaims any liability to Recipient
for claims brought by any other entity based on infringement
of intellectual property rights or otherwise. As a condition
to exercising the rights and licenses granted hereunder, each
Recipient hereby assumes sole responsibility to secure any other
intellectual property rights needed, if any. For example, if
a third party patent license is required to allow Recipient to
distribute the Program, it is Recipient&apos;s responsibility to acquire
that license before distributing the Program.
d) Each Contributor represents that to its knowledge it has sufficient
copyright rights in its Contribution, if any, to grant the copyright
license set forth in this Agreement.
3. REQUIREMENTS
A Contributor may choose to distribute the Program in object
code form under its own license agreement, provided that:
a) it complies with the terms and conditions of this Agreement;
and
b) its license agreement:
i) effectively disclaims on behalf of all Contributors all warranties
and conditions, express and implied, including warranties or
conditions of title and non-infringement, and implied warranties
or conditions of merchantability and fitness for a particular
purpose;
ii) effectively excludes on behalf of all Contributors all liability
for damages, including direct, indirect, special, incidental
and consequential damages, such as lost profits;
iii) states that any provisions which differ from this Agreement
are offered by that Contributor alone and not by any other party;
and
iv) states that source code for the Program is available from
such Contributor, and informs licensees how to obtain it in a
reasonable manner on or through a medium customarily used for
software exchange.
When the Program is made available in source code form:
a) it must be made available under this Agreement; and
b) a copy of this Agreement must be included with each copy of
the Program.
Contributors may not remove or alter any copyright notices contained
within the Program.
Each Contributor must identify itself as the originator of its
Contribution, if any, in a manner that reasonably allows subsequent
Recipients to identify the originator of the Contribution.
4. COMMERCIAL DISTRIBUTION
Commercial distributors of software may accept certain responsibilities
with respect to end users, business partners and the like. While
this license is intended to facilitate the commercial use of
the Program, the Contributor who includes the Program in a commercial
product offering should do so in a manner which does not create
potential liability for other Contributors. Therefore, if a Contributor
includes the Program in a commercial product offering, such Contributor
(&quot;Commercial Contributor&quot;) hereby agrees to defend and indemnify
every other Contributor (&quot;Indemnified Contributor&quot;) against any
losses, damages and costs (collectively &quot;Losses&quot;) arising from
claims, lawsuits and other legal actions brought by a third party
against the Indemnified Contributor to the extent caused by the
acts or omissions of such Commercial Contributor in connection
with its distribution of the Program in a commercial product
offering. The obligations in this section do not apply to any
claims or Losses relating to any actual or alleged intellectual
property infringement. In order to qualify, an Indemnified Contributor
must: a) promptly notify the Commercial Contributor in writing
of such claim, and b) allow the Commercial Contributor to control,
and cooperate with the Commercial Contributor in, the defense
and any related settlement negotiations. The Indemnified Contributor
may participate in any such claim at its own expense.
For example, a Contributor might include the Program in a commercial
product offering, Product X. That Contributor is then a Commercial
Contributor. If that Commercial Contributor then makes performance
claims, or offers warranties related to Product X, those performance
claims and warranties are such Commercial Contributor&apos;s responsibility
alone. Under this section, the Commercial Contributor would have
to defend claims against the other Contributors related to those
performance claims and warranties, and if a court requires any
other Contributor to pay any damages as a result, the Commercial
Contributor must pay those damages.
5. NO WARRANTY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM
IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION,
ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
responsible for determining the appropriateness of using and
distributing the Program and assumes all risks associated with
its exercise of rights under this Agreement , including but not
limited to the risks and costs of program errors, compliance
with applicable laws, damage to or loss of data, programs or
equipment, and unavailability or interruption of operations.
6. DISCLAIMER OF LIABILITY
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT
NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE
OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY
OF SUCH DAMAGES.
7. GENERAL
If any provision of this Agreement is invalid or unenforceable
under applicable law, it shall not affect the validity or enforceability
of the remainder of the terms of this Agreement, and without
further action by the parties hereto, such provision shall be
reformed to the minimum extent necessary to make such provision
valid and enforceable.
If Recipient institutes patent litigation against any entity
(including a cross-claim or counterclaim in a lawsuit) alleging
that the Program itself (excluding combinations of the Program
with other software or hardware) infringes such Recipient&apos;s patent(s),
then such Recipient&apos;s rights granted under Section 2(b) shall
terminate as of the date such litigation is filed.
All Recipient&apos;s rights under this Agreement shall terminate if
it fails to comply with any of the material terms or conditions
of this Agreement and does not cure such failure in a reasonable
period of time after becoming aware of such noncompliance. If
all Recipient&apos;s rights under this Agreement terminate, Recipient
agrees to cease use and distribution of the Program as soon as
reasonably practicable. However, Recipient&apos;s obligations under
this Agreement and any licenses granted by Recipient relating
to the Program shall continue and survive.
Everyone is permitted to copy and distribute copies of this Agreement,
but in order to avoid inconsistency the Agreement is copyrighted
and may only be modified in the following manner. The Agreement
Steward reserves the right to publish new versions (including
revisions) of this Agreement from time to time. No one other
than the Agreement Steward has the right to modify this Agreement.
The Eclipse Foundation is the initial Agreement Steward. The
Eclipse Foundation may assign the responsibility to serve as
the Agreement Steward to a suitable separate entity. Each new
version of the Agreement will be given a distinguishing version
number. The Program (including Contributions) may always be distributed
subject to the version of the Agreement under which it was received.
In addition, after a new version of the Agreement is published,
Contributor may elect to distribute the Program (including its
Contributions) under the new version. Except as expressly stated
in Sections 2(a) and 2(b) above, Recipient receives no rights
or licenses to the intellectual property of any Contributor under
this Agreement, whether expressly, by implication, estoppel or
otherwise. All rights in the Program not expressly granted under
this Agreement are reserved.
This Agreement is governed by the laws of the State of New York
and the intellectual property laws of the United States of America.
No party to this Agreement will bring a legal action under this
Agreement more than one year after the cause of action arose.
Each party waives its rights to a jury trial in any resulting
litigation.
</license>
<url>
<update label="Wesnoth Eclipse Updates" url="http://eclipse.wesnoth.org/updates"/>
<discovery label="Update site" url="http://eclipse.wesnoth.org/updates"/>
</url>
<requires>
<import plugin="org.eclipse.xtext"/>
<import plugin="org.eclipse.xtext.util"/>
<import plugin="org.eclipse.emf.ecore"/>
<import plugin="org.eclipse.emf.common"/>
<import plugin="org.antlr.runtime"/>
<import plugin="org.eclipse.osgi.util" version="3.2.100" match="greaterOrEqual"/>
<import plugin="org.eclipse.osgi" version="3.6.0" match="greaterOrEqual"/>
<import plugin="org.apache.log4j"/>
<import plugin="org.eclipse.xtext.ui"/>
<import plugin="org.eclipse.ui.editors" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.ide" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.xtext.ui.shared"/>
<import plugin="org.eclipse.ui"/>
<import plugin="org.eclipse.xtext.builder"/>
<import plugin="org.eclipse.core.filesystem" version="1.3.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.core.runtime"/>
<import plugin="org.eclipse.core.resources"/>
<import plugin="org.eclipse.jface.text" version="3.3.0" match="greaterOrEqual"/>
<import plugin="org.apache.ant" version="1.7.1" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.console" version="3.4.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.navigator" version="3.5.0" match="greaterOrEqual"/>
<import plugin="org.eclipse.ui.navigator.resources"/>
<import plugin="org.eclipse.ui.intro"/>
<import plugin="org.eclipse.ui.intro.universal"/>
<import plugin="org.eclipse.ui.views.log" version="1.0.100" match="greaterOrEqual"/>
</requires>
<plugin
id="org.wesnoth"
os="linux,macosx,win32"
arch="x86,x86_64"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.wesnoth.ui"
os="linux,macosx,win32"
arch="x86,x86_64"
download-size="0"
install-size="0"
version="0.0.0"/>
</feature>

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.wesnoth.tests</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

View file

@ -1,3 +0,0 @@
#Fri Aug 05 17:21:14 EEST 2011
eclipse.preferences.version=1
line.separator=\n

View file

@ -1,353 +0,0 @@
#Wed Feb 15 22:21:27 EET 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
org.eclipse.jdt.core.codeComplete.fieldSuffixes=_
org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=20
org.eclipse.jdt.core.formatter.alignment_for_assignment=4
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20
org.eclipse.jdt.core.formatter.alignment_for_compact_if=20
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=84
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=4
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=20
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=4
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=20
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=20
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=true
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=false
org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=200
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=99
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

View file

@ -1,118 +0,0 @@
#Sat Feb 11 10:23:20 EET 2012
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
cleanup.add_missing_deprecated_annotations=true
cleanup.add_missing_methods=false
cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=true
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=true
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=false
cleanup.format_source_code=false
cleanup.format_source_code_changes_only=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=false
cleanup.organize_imports=true
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=true
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=true
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
cleanup.remove_unused_private_fields=true
cleanup.remove_unused_private_members=false
cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_parentheses_in_expressions=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup_profile=_timo
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Profile
formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=\#com.google.common.base.Predicates;com;java;javax;org;org.eclipse;org.wesnoth;
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=true
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

View file

@ -1,3 +0,0 @@
#Sat Aug 06 15:24:20 EEST 2011
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

View file

@ -1,28 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Wesnoth UMC Dev tests
Bundle-SymbolicName: org.wesnoth.tests
Bundle-Version: 1.0.4
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.xtext.junit;bundle-version="2.0.0",
org.eclipse.xtext;bundle-version="2.0.0",
org.wesnoth;bundle-version="2.0.0",
org.wesnoth.ui;bundle-version="2.0.0",
org.eclipse.platform;bundle-version="3.7.0",
org.eclipse.core.filesystem;bundle-version="1.3.100",
org.eclipse.core.resources;bundle-version="3.7.100",
org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.jface;bundle-version="3.7.0",
org.eclipse.jface.text;bundle-version="3.7.0",
org.eclipse.jdt.core;bundle-version="3.7.0",
org.eclipse.jdt.ui;bundle-version="3.7.0"
Export-Package: org.wesnoth.tests;
uses:="org.eclipse.xtext,
org.wesnoth.services,
org.eclipse.xtext.parser,
org.eclipse.xtext.junit,
org.antlr.runtime,
org.eclipse.xtext.parser.antlr"
Import-Package: org.junit,
org.junit.runner;version="4.8.2",
org.junit.runners;version="4.8.2"

View file

@ -1,4 +0,0 @@
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.

View file

@ -1,21 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.wesnoth.tests.pde.ProjectDependencyListTests;
@RunWith( Suite.class )
@Suite.SuiteClasses( { ProjectDependencyListTests.class } )
public class WMLPDETestsSuite
{
}

View file

@ -1,249 +0,0 @@
package org.wesnoth.tests;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.Reader;
import java.io.StringReader;
import java.util.List;
import org.antlr.runtime.ANTLRStringStream;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.Token;
import org.junit.Ignore;
import org.eclipse.xtext.ParserRule;
import org.eclipse.xtext.junit.AbstractXtextTests;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.parser.IParseResult;
import org.eclipse.xtext.parser.IParser;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.Lexer;
import org.eclipse.xtext.parser.antlr.XtextTokenStream;
import org.wesnoth.WMLStandaloneSetup;
import org.wesnoth.services.WMLGrammarAccess;
import org.wesnoth.utils.StringUtils;
@SuppressWarnings( "all" )
public abstract class WMLTests extends AbstractXtextTests
{
protected WMLGrammarAccess grammar_;
protected String dataPath_ = "";
private Lexer lexer;
private ITokenDefProvider tokenDefProvider;
private IParser parser;
protected Lexer getLexer( )
{
return lexer;
}
protected ITokenDefProvider getTokenDefProvider( )
{
return tokenDefProvider;
}
@Override
protected IParser getParser( )
{
return parser;
}
Class getStandaloneSetupClass( )
{
return WMLStandaloneSetup.class;
}
@Override
protected void setUp( ) throws Exception
{
super.setUp( );
with( getStandaloneSetupClass( ) );
lexer = get( Lexer.class );
tokenDefProvider = get( ITokenDefProvider.class );
parser = get( IParser.class );
grammar_ = ( WMLGrammarAccess ) getGrammarAccess( );
// get the wesnoth data path from the user
dataPath_ = System.getProperty( "wesnothWorkingDir" ) + "/data/";
if( StringUtils.isNullOrEmpty( dataPath_ )
|| ! new File( dataPath_ ).exists( ) ) {
System.out
.println( "Please set the 'wesnothWorkingDir' argument before testing!." );
assertTrue( false );
}
}
@Override
protected void tearDown( ) throws Exception
{
super.tearDown( );
lexer = null;
tokenDefProvider = null;
parser = null;
grammar_ = null;
dataPath_ = null;
}
/**
* return the list of tokens created by the lexer from the given input
*/
protected List< Token > getTokens( String input )
{
CharStream stream = new ANTLRStringStream( input );
getLexer( ).setCharStream( stream );
XtextTokenStream tokenStream = new XtextTokenStream( getLexer( ),
getTokenDefProvider( ) );
List< Token > tokens = tokenStream.getTokens( );
return tokens;
}
/**
* return the name of the terminal rule for a given token
*/
protected String getTokenType( Token token )
{
return getTokenDefProvider( ).getTokenDefMap( ).get( token.getType( ) );
}
/**
* check whether an input is chopped into a list of expected token types
*/
protected void checkTokenisation( String input,
String... expectedTokenTypes )
{
List< Token > tokens = getTokens( input );
assertEquals( input, expectedTokenTypes.length, tokens.size( ) );
for( int i = 0; i < tokens.size( ); i++ ) {
Token token = tokens.get( i );
assertEquals( input, expectedTokenTypes[i], getTokenType( token ) );
}
}
protected void showTokenisation( String input )
{
List< Token > tokens = getTokens( input );
for( int i = 0; i < tokens.size( ); i++ ) {
Token token = tokens.get( i );
System.out.println( getTokenType( token ) );
}
}
/**
* check that an input is not tokenised using a particular terminal rule
*/
protected void failTokenisation( String input, String unExpectedTokenType )
{
List< Token > tokens = getTokens( input );
assertEquals( input, 1, tokens.size( ) );
Token token = tokens.get( 0 );
assertNotSame( input, unExpectedTokenType, getTokenType( token ) );
}
/**
* return the parse result for an input given a specific entry rule of the
* grammar
*/
protected IParseResult getParseResult( String input, ParserRule entryRule )
{
return getParseResult( new StringReader( input ), entryRule );
}
/**
* return the parse result for an input given a specific entry rule of the
* grammar
*/
protected IParseResult getParseResult( Reader reader, ParserRule entryRule )
{
return getParser( ).parse( entryRule, reader );
}
/**
* check that the input can be successfully parsed given a specific entry
* rule of the grammar
*/
protected void checkParsing( Reader reader )
{
IParseResult la = getParser( ).parse( reader );
;
for( INode node: la.getSyntaxErrors( ) ) {
System.out.println( node.getSyntaxErrorMessage( ).getMessage( ) );
}
assertEquals( "There shouldn't have been any syntax errors", false,
la.hasSyntaxErrors( ) );
}
/**
* check that the input can be successfully parsed given a specific entry
* rule of the grammar
*/
protected void checkParsing( String input, ParserRule entryRule )
{
IParseResult la = getParseResult( input, entryRule );
for( INode node: la.getSyntaxErrors( ) ) {
System.out.println( node.getSyntaxErrorMessage( ).getMessage( ) );
}
assertEquals( input, false, la.hasSyntaxErrors( ) );
}
/**
* check that the input cannot be successfully parsed given a specific entry
* rule of the grammar
*/
protected void failParsing( String input, ParserRule entryRule )
{
IParseResult la = getParseResult( input, entryRule );
assertNotSame( input, false, la.hasSyntaxErrors( ) );
}
/**
* check that input is treated as a keyword by the grammar
*/
protected void checkKeyword( String input )
{
// the rule name for a keyword is usually
// the keyword enclosed in single quotes
String rule = new StringBuilder( "'" ).append( input ).append( "'" ) //$NON-NLS-1$ //$NON-NLS-2$
.toString( );
checkTokenisation( input, rule );
}
/**
* check that input is not treated as a keyword by the grammar
*/
protected void failKeyword( String keyword )
{
List< Token > tokens = getTokens( keyword );
assertEquals( keyword, 1, tokens.size( ) );
String type = getTokenType( tokens.get( 0 ) );
assertFalse( keyword, type.charAt( 0 ) == '\'' );
}
@Ignore
public void testPath( String path ) throws FileNotFoundException
{
File theFile = new File( path );
if( ! theFile.exists( ) ) {
System.out.println( "Skipping non-existent path:" + path );
return;
}
if( theFile.isFile( ) ) {
testFile( path );
}
else {
for( File file: theFile.listFiles( ) ) {
testPath( file.getAbsolutePath( ) );
}
}
}
@Ignore
public void testFile( String path ) throws FileNotFoundException
{
}
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.wesnoth.tests.grammar.WMLFilesTests;
import org.wesnoth.tests.grammar.WMLGrammarTokensTests;
import org.wesnoth.tests.pde.ProjectDependencyListTests;
import org.wesnoth.tests.plugin.ParsingCampaignsConfigsTests;
@RunWith( Suite.class )
@Suite.SuiteClasses( { WMLGrammarTokensTests.class, WMLFilesTests.class,
ParsingCampaignsConfigsTests.class, ProjectDependencyListTests.class } )
public class WMLTestsSuite
{
}

View file

@ -1,138 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests.grammar;
import java.io.FileNotFoundException;
import java.io.FileReader;
import org.junit.Ignore;
import org.wesnoth.tests.WMLTests;
/**
* This tests test the data/core directory and each campaign
*/
public class WMLFilesTests extends WMLTests
{
public void testCoreFiles( ) throws FileNotFoundException
{
testPath( dataPath_ + "/core/" );
}
public void testCampaignAOI( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/An_Orcish_Incursion/" );
}
public void testCampaignDW( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Dead_Water/" );
}
public void testCampaignDM( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Delfadors_Memoirs/" );
}
public void testCampaignDID( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Descent_Into_Darkness/" );
}
public void testCampaignEI( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Eastern_Invasion/" );
}
public void testCampaignHttT( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Heir_To_The_Throne/" );
}
public void testCampaignLoW( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Legend_of_Wesmere/" );
}
public void testCampaignLiberty( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Liberty/" );
}
public void testCampaignNR( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Northern_Rebirth/" );
}
public void testCampaignSoF( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Sceptre_of_Fire/" );
}
public void testCampaignSotBT( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Son_Of_The_Black_Eye/" );
}
public void testCampaignTest( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/test_campaign/" );
}
public void testCampaignTHT( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/The_Hammer_of_Thursagan/" );
}
public void testCampaignTRoW( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/The_Rise_Of_Wesnoth/" );
}
public void testCampaignTSG( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/The_South_Guard/" );
}
public void testCampaignTutorial( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/tutorial/" );
}
public void testCampaignTB( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Two_Brothers/" );
}
public void testCampaignUtBS( ) throws FileNotFoundException
{
testPath( dataPath_ + "/campaigns/Under_the_Burning_Suns/" );
}
@Override
@Ignore
public void testFile( String path )
{
// just config files
if( ! path.endsWith( ".cfg" ) ) {
return;
}
System.out.print( "\nTesting file: " + path + "..." );
try {
checkParsing( new FileReader( path ) );
System.out.print( " OK" );
} catch( FileNotFoundException e ) {
e.printStackTrace( );
// should not reach here.
assertTrue( false );
}
}
}

View file

@ -1,42 +0,0 @@
package org.wesnoth.tests.grammar;
import org.wesnoth.tests.WMLTests;
/**
* Tests parts of the grammar
*/
public class WMLGrammarTokensTests extends WMLTests
{
// for convenience, define constants for the
// rule names in your grammar
// the names of terminal rules will be capitalised
// and "RULE_" will be appended to the front
private static final String ID = "RULE_ID";
private static final String SL_COMMENT = "RULE_SL_COMMENT";
public void testID( )
{
checkTokenisation( "1", ID );
checkTokenisation( "a", ID );
checkTokenisation( "abc", ID );
checkTokenisation( "abc123", ID );
checkTokenisation( "abc_123", ID );
}
public void testSLCOMMENT( )
{
checkTokenisation( "#comment", SL_COMMENT );
checkTokenisation( "#comment\n", SL_COMMENT );
checkTokenisation( "# comment \t\t comment\r\n", SL_COMMENT );
}
public void testTokenParsing( )
{
checkParsing( "amount=+$random\r\n", grammar_.getWMLKeyRule( ) );
checkParsing( "name={VALUE}\n", grammar_.getWMLKeyRule( ) );
checkParsing( "{NAME}={VALUE}\n", grammar_.getWMLKeyRule( ) );
failParsing( "name=value", grammar_.getWMLKeyRule( ) );
failParsing( "name=\n", grammar_.getWMLKeyRule( ) );
}
}

View file

@ -1,90 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests.pde;
import java.util.Arrays;
import junit.framework.TestCase;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.ResourcesPlugin;
import org.wesnoth.installs.WesnothInstall;
import org.wesnoth.installs.WesnothInstallsUtils;
import org.wesnoth.preferences.Preferences;
import org.wesnoth.preferences.Preferences.Paths;
import org.wesnoth.utils.StringUtils;
/**
* This class is the base PDE test. It does the following:
* 1) Turn off auto-building
* 2) Setup the wesnoth preferences ( they need to be supplied as
* test arguments ). The default install name is "default"
*/
public class PDETest extends TestCase
{
@Override
protected void setUp( ) throws Exception
{
super.setUp( );
// set the default preferences.
Paths paths = Preferences.getPaths( "default" );
paths.setWesnothExecutablePath( getPath( "wesnothExec" ) );
paths.setWorkingDir( getPath( "wesnothWorkingDir" ) );
paths.setUserDir( getPath( "wesnothUserDir" ) );
paths.setWMLToolsDir( getPath( "wesnothWMLTools" ) );
Preferences
.setString( Preferences.PYTHON_PATH, getPath( "pythonPath" ) );
Preferences.setDefaultInstallName( "default" );
WesnothInstallsUtils.setInstalls( Arrays.asList( new WesnothInstall(
"default", "trunk" ) ) );
// turn off automatic building
IWorkspace workspace = ResourcesPlugin.getWorkspace( );
IWorkspaceDescription description = workspace.getDescription( );
if( description.isAutoBuilding( ) ) {
description.setAutoBuilding( false );
workspace.setDescription( description );
}
}
private String getPath( String propertyName )
{
String result = System.getProperty( propertyName );
if( StringUtils.isNullOrEmpty( result ) ) {
System.out.println( "Please set the '" + propertyName
+ "' parameter ( -DparameterName=value ) before testing!." );
assertTrue( false );
}
return result;
}
@Override
protected void tearDown( ) throws Exception
{
super.tearDown( );
// reset Preferences
Paths paths = Preferences.getPaths( "default" );
paths.setUserDir( "" );
paths.setWesnothExecutablePath( "" );
paths.setWMLToolsDir( "" );
paths.setWorkingDir( "" );
Preferences.setDefaultInstallName( "" );
Preferences.setString( Preferences.PYTHON_PATH, "" );
WesnothInstallsUtils
.setInstalls( Arrays.asList( new WesnothInstall[0] ) );
}
}

View file

@ -1,934 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests.pde;
import java.io.FileWriter;
import java.io.IOException;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IncrementalProjectBuilder;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.wesnoth.builder.DependencyListBuilder;
import org.wesnoth.builder.DependencyListNode;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.utils.ResourceUtils;
public class ProjectDependencyListTests extends PDETest
{
private IProject createProject( String name ) throws CoreException
{
IProject project = ResourcesPlugin.getWorkspace( ).getRoot( )
.getProject( name );
if( project.exists( ) ) {
project.delete( true, true, new NullProgressMonitor( ) );
}
project = ProjectUtils.createWesnothProject( name, null,
"default", true, new NullProgressMonitor( ) );
return project;
}
private void cleanup( IProject project ) throws CoreException
{
project.delete( true, true, new NullProgressMonitor( ) );
ProjectUtils.getProjectCaches( ).clear( );
}
/**
* Tests the list for an empty project
*
* @throws CoreException
*/
public void testEmptyPDL( ) throws CoreException
{
IProject project = createProject( "test" );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 0, list.getNodesCount( ) );
cleanup( project );
}
/**
* Tests the list for a project with a single file
*
* @throws Throwable
*/
public void testSingleFile( ) throws Throwable
{
IProject project = createProject( "test" );
IFile maincfg = ResourceUtils.createFile( project, "_main.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 1, list.getNodesCount( ) );
assertEquals( maincfg,
list.getNode( DependencyListBuilder.ROOT_NODE_KEY ).getFile( ) );
cleanup( project );
}
/**
* Tests the modification of the folder includes order
*
* @throws CoreException
* @throws IOException
*/
public void testFolderIncludes_OrderChanged( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[9];
ResourceUtils.createFolder( project, "f1" );
ResourceUtils.createFolder( project, "f2" );
ResourceUtils.createFolder( project, "f3" );
files[0] = ResourceUtils
.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2}\r\n{~add-ons/test/f3}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f1/f1_file3.cfg", "" );
files[4] = ResourceUtils.createFile( project, "f2/f2_file4.cfg", "" );
files[5] = ResourceUtils.createFile( project, "f2/f2_file5.cfg", "" );
files[6] = ResourceUtils.createFile( project, "f3/f3_filea.cfg", "" );
files[7] = ResourceUtils.createFile( project, "f3/f3_fileb.cfg", "" );
files[8] = ResourceUtils.createFile( project, "f3/f3_filec.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 9, list.getNodesCount( ) );
// now reverse the include order
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f3}\r\n{~add-ons/test/f2}\r\n" +
"{~add-ons/test/f1}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the reordering
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[6], node.getFile( ) );
node = node.getNext( );
assertEquals( files[7], node.getFile( ) );
node = node.getNext( );
assertEquals( files[8], node.getFile( ) );
node = node.getNext( );
assertEquals( files[4], node.getFile( ) );
node = node.getNext( );
assertEquals( files[5], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
cleanup( project );
}
/**
* Tests the file includes
*
* @throws CoreException
* @throws IOException
*/
public void testFilesIncludes( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1.cfg}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 3, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
cleanup( project );
}
/**
* Tests the modification of the file includes order
*
* @throws CoreException
* @throws IOException
*/
public void testFileIncludes_OrderChanged( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1.cfg}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 3, list.getNodesCount( ) );
// now reverse the include order
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f2.cfg}\r\n{~add-ons/test/f1.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the reordering
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
cleanup( project );
}
/**
* New file include is added
*
* @throws CoreException
* @throws IOException
*/
public void testFileIncludes_IncludeAdded( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 2, list.getNodesCount( ) );
// now add a new file include
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1.cfg}\r\n{~add-ons/test/f2.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 3, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
cleanup( project );
}
/**
* A file include is removed
*
* @throws CoreException
* @throws IOException
*/
public void testFileIncludes_IncludeRemoved( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1.cfg}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 3, list.getNodesCount( ) );
// now remove a file include
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 2, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
cleanup( project );
}
/**
* Tests includes that contain both folder and file includes
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes( ) throws CoreException, IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[4];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 4, list.getNodesCount( ) );
// check the includes
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
cleanup( project );
}
/**
* Tests the modification of the file and folder includes order
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes_OrderChanged( ) throws CoreException,
IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[4];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 4, list.getNodesCount( ) );
// now reverse the include order
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f2.cfg}\r\n{~add-ons/test/f1}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the reordering
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
cleanup( project );
}
/**
* New file included is added
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes_FileIncludeAdded( )
throws CoreException, IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[5];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
files[4] = ResourceUtils.createFile( project, "f3.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 4, list.getNodesCount( ) );
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" +
"{~add-ons/test/f3.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
assertEquals( 5, list.getNodesCount( ) );
// check the list
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
node = node.getNext( );
assertEquals( files[4], node.getFile( ) );
cleanup( project );
}
/**
* File include removed
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes_FileIncludeRemoved( )
throws CoreException, IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[5];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" +
"{~add-ons/test/f3.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
files[4] = ResourceUtils.createFile( project, "f3.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 5, list.getNodesCount( ) );
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
assertEquals( 4, list.getNodesCount( ) );
// check the list
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
cleanup( project );
}
/**
* New folder include added
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes_FolderIncludeAdded( )
throws CoreException, IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[6];
ResourceUtils.createFolder( project, "f1" );
ResourceUtils.createFolder( project, "f3" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
files[4] = ResourceUtils.createFile( project, "f3/f3_file1.cfg", "" );
files[5] = ResourceUtils.createFile( project, "f3/f3_file2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 4, list.getNodesCount( ) );
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" +
"{~add-ons/test/f3}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
assertEquals( 6, list.getNodesCount( ) );
// check the list
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
node = node.getNext( );
assertEquals( files[4], node.getFile( ) );
node = node.getNext( );
assertEquals( files[5], node.getFile( ) );
cleanup( project );
}
/**
* Folder include removed
*
* @throws CoreException
* @throws IOException
*/
public void testFolderAndFileIncludes_FolderIncludeRemoved( )
throws CoreException, IOException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[6];
ResourceUtils.createFolder( project, "f1" );
ResourceUtils.createFolder( project, "f3" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" +
"{~add-ons/test/f3}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f2.cfg", "" );
files[4] = ResourceUtils.createFile( project, "f3/f3_file1.cfg", "" );
files[5] = ResourceUtils.createFile( project, "f3/f3_file2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 6, list.getNodesCount( ) );
FileWriter writer = new FileWriter( files[0].getLocation( )
.toOSString( ) );
writer.write( "{~add-ons/test/f1}\r\n{~add-ons/test/f2.cfg}\r\n" );
writer.close( );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
assertEquals( 4, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
cleanup( project );
}
/**
* Tests the collapsing of the files in an included folder when
* _main.cfg is added to it. The files nodes in that folder get
* replaced with _main.cfg's node.
*
* @throws CoreException
*/
public void testIncludesCollapse( ) throws CoreException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[4];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 3, list.getNodesCount( ) );
// create _main.cfg
files[1] = ResourceUtils.createFile( project, "f1/_main.cfg", "" );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 2, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[1], node.getFile( ) );
cleanup( project );
}
/**
* Removing the _main.cfg from an included folder should expand that
* _main.cfg's into the existing files from that folder.
*
* @throws CoreException
*/
public void testIncludesExpand( ) throws CoreException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[4];
ResourceUtils.createFolder( project, "f1" );
files[0] = ResourceUtils.createFile( project, "_main.cfg",
"{~add-ons/test/f1}\r\n" );
files[1] = ResourceUtils.createFile( project, "f1/_main.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f1/f1_file1.cfg", "" );
files[3] = ResourceUtils.createFile( project, "f1/f1_file2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 2, list.getNodesCount( ) );
// now remove the _main.cfg
files[1].delete( true, new NullProgressMonitor( ) );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 3, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[0], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
node = node.getNext( );
assertEquals( files[3], node.getFile( ) );
cleanup( project );
}
/**
* Test the removal of _main.cfg from the root of the project's directory
*
* @throws CoreException
* @throws IOException
*/
public void testMainCFGRemoved( ) throws CoreException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "_main.cfg", "" );
files[1] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[2] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 1, list.getNodesCount( ) );
// now remove the _main.cfg
files[0].delete( true, new NullProgressMonitor( ) );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 2, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[1], node.getFile( ) );
node = node.getNext( );
assertEquals( files[2], node.getFile( ) );
cleanup( project );
}
/**
* Test the addition of _main.cfg to the project's root directory
*
* @throws CoreException
*/
public void testMainCFGAdded( ) throws CoreException
{
IProject project = createProject( "test" );
IFile files[] = new IFile[3];
files[0] = ResourceUtils.createFile( project, "f1.cfg", "" );
files[1] = ResourceUtils.createFile( project, "f2.cfg", "" );
project.build( IncrementalProjectBuilder.FULL_BUILD,
new NullProgressMonitor( ) );
DependencyListBuilder list = ProjectUtils.getCacheForProject( project )
.getDependencyList( );
assertEquals( true, list.isCreated( ) );
assertEquals( 2, list.getNodesCount( ) );
// now add the _main.cfg
files[2] = ResourceUtils.createFile( project, "_main.cfg", "" );
project.refreshLocal( IResource.DEPTH_INFINITE,
new NullProgressMonitor( ) );
// re-build now
project.build( IncrementalProjectBuilder.INCREMENTAL_BUILD,
new NullProgressMonitor( ) );
// check the new list
assertEquals( 1, list.getNodesCount( ) );
DependencyListNode node = list
.getNode( DependencyListBuilder.ROOT_NODE_KEY );
assertEquals( files[2], node.getFile( ) );
cleanup( project );
}
}

View file

@ -1,117 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.tests.plugin;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.wesnoth.tests.WMLTests;
import org.wesnoth.utils.StringUtils;
import org.wesnoth.wml.SimpleWMLParser;
import org.wesnoth.wml.WMLConfig;
/**
* The class tests the parsed campaigns config files
*/
@RunWith( value = Parameterized.class )
public class ParsingCampaignsConfigsTests extends WMLTests
{
private String campaignDir_;
private String campaignId;
private List< String > scenarioIds_;
private List< String > parsedCampaignIds_;
private List< String > parsedScenarioIds_;
public ParsingCampaignsConfigsTests( String[] data ) throws Exception
{
setUp( );
campaignDir_ = data[0];
campaignId = data[1];
scenarioIds_ = new ArrayList< String >( );
parsedCampaignIds_ = new ArrayList< String >( );
parsedScenarioIds_ = new ArrayList< String >( );
for( int i = data.length - 1; i > 1; --i ) {
scenarioIds_.add( data[i] );
}
// gather all info
testPath( dataPath_ + "/campaigns/" + campaignDir_ + "/" );
}
@Override
@Ignore
public void testFile( String path ) throws FileNotFoundException
{
// just config files
if( ! path.endsWith( ".cfg" ) ) {
return;
}
SimpleWMLParser wmlParser = new SimpleWMLParser( new File( path ),
getParser( ) );
wmlParser.parse( );
WMLConfig config = wmlParser.getParsedConfig( );
if( ! StringUtils.isNullOrEmpty( config.ScenarioId ) ) {
parsedScenarioIds_.add( config.ScenarioId );
}
if( ! StringUtils.isNullOrEmpty( config.CampaignId ) ) {
parsedCampaignIds_.add( config.CampaignId );
}
}
@Test
public void testCampaignId( )
{
assertTrue( parsedCampaignIds_.size( ) == 1 );
assertEquals( campaignId, parsedCampaignIds_.get( 0 ) );
}
@Test
public void testScenarioIds( )
{
assertEquals( scenarioIds_.size( ), parsedScenarioIds_.size( ) );
parsedScenarioIds_.removeAll( scenarioIds_ );
// no scenario should have remained in the list
assertEquals( 0, parsedScenarioIds_.size( ) );
}
@Parameters
public static Collection< Object[] > data( )
{
return Arrays.asList( new Object[][] {
{ new String[] { "An_Orcish_Incursion", "An_Orcish_Incursion",
"01_Defend_the_Forest", "02_Assassins", "03_Wasteland",
"04_Valley_of_Trolls", "05_Linaera_the_Quick",
"06_A_Detour_through_the_Swamp", "07_Showdown" } },
{ new String[] { "Dead_Water", "Dead_Water", "01_Invasion",
"02_Flight", "03_Wolf_Coast", "04_Slavers",
"05_Tirigaz", "06_Uncharted_Islands", "07_Bilheld",
"08_Talking_to_Tyegea", "09_The_Mage",
"10_The_Flaming_Sword", "11_Getting_Help",
"12_Revenge", "13_Epilogue" } } } );
}
}

View file

@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,28 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.wesnoth.ui</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>

View file

@ -1,3 +0,0 @@
#Fri Aug 05 17:21:14 EEST 2011
eclipse.preferences.version=1
line.separator=\n

View file

@ -1,353 +0,0 @@
#Wed Feb 15 22:21:28 EET 2012
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
org.eclipse.jdt.core.codeComplete.fieldPrefixes=
org.eclipse.jdt.core.codeComplete.fieldSuffixes=_
org.eclipse.jdt.core.codeComplete.localPrefixes=
org.eclipse.jdt.core.codeComplete.localSuffixes=
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldPrefixes=
org.eclipse.jdt.core.codeComplete.staticFinalFieldSuffixes=
org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
org.eclipse.jdt.core.compiler.problem.deadCode=warning
org.eclipse.jdt.core.compiler.problem.deprecation=warning
org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
org.eclipse.jdt.core.compiler.problem.emptyStatement=warning
org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
org.eclipse.jdt.core.compiler.problem.missingSerialVersion=error
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=error
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
org.eclipse.jdt.core.compiler.problem.nullReference=warning
org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=warning
org.eclipse.jdt.core.compiler.problem.potentialNullReference=warning
org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
org.eclipse.jdt.core.compiler.problem.redundantNullCheck=warning
org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=error
org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.formatter.align_type_members_on_columns=true
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=20
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=20
org.eclipse.jdt.core.formatter.alignment_for_assignment=4
org.eclipse.jdt.core.formatter.alignment_for_binary_expression=20
org.eclipse.jdt.core.formatter.alignment_for_compact_if=20
org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=84
org.eclipse.jdt.core.formatter.alignment_for_enum_constants=4
org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=20
org.eclipse.jdt.core.formatter.alignment_for_method_declaration=4
org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=20
org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=20
org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=20
org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
org.eclipse.jdt.core.formatter.blank_lines_after_package=1
org.eclipse.jdt.core.formatter.blank_lines_before_field=0
org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
org.eclipse.jdt.core.formatter.blank_lines_before_method=1
org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
org.eclipse.jdt.core.formatter.blank_lines_before_package=0
org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=next_line
org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=next_line
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
org.eclipse.jdt.core.formatter.comment.format_block_comments=true
org.eclipse.jdt.core.formatter.comment.format_header=true
org.eclipse.jdt.core.formatter.comment.format_html=true
org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
org.eclipse.jdt.core.formatter.comment.format_line_comments=true
org.eclipse.jdt.core.formatter.comment.format_source_code=true
org.eclipse.jdt.core.formatter.comment.indent_parameter_description=false
org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
org.eclipse.jdt.core.formatter.comment.line_length=80
org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
org.eclipse.jdt.core.formatter.compact_else_if=true
org.eclipse.jdt.core.formatter.continuation_indentation=2
org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_empty_lines=false
org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=true
org.eclipse.jdt.core.formatter.indentation.size=4
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=insert
org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=insert
org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=insert
org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=insert
org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=insert
org.eclipse.jdt.core.formatter.join_lines_in_comments=false
org.eclipse.jdt.core.formatter.join_wrapped_lines=false
org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
org.eclipse.jdt.core.formatter.lineSplit=200
org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=99
org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
org.eclipse.jdt.core.formatter.tabulation.char=space
org.eclipse.jdt.core.formatter.tabulation.size=4
org.eclipse.jdt.core.formatter.use_on_off_tags=false
org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true

View file

@ -1,118 +0,0 @@
#Sat Feb 11 10:23:25 EET 2012
cleanup.add_default_serial_version_id=false
cleanup.add_generated_serial_version_id=true
cleanup.add_missing_annotations=true
cleanup.add_missing_deprecated_annotations=true
cleanup.add_missing_methods=false
cleanup.add_missing_nls_tags=false
cleanup.add_missing_override_annotations=true
cleanup.add_missing_override_annotations_interface_methods=true
cleanup.add_serial_version_id=true
cleanup.always_use_blocks=true
cleanup.always_use_parentheses_in_expressions=true
cleanup.always_use_this_for_non_static_field_access=false
cleanup.always_use_this_for_non_static_method_access=false
cleanup.convert_to_enhanced_for_loop=false
cleanup.correct_indentation=false
cleanup.format_source_code=false
cleanup.format_source_code_changes_only=false
cleanup.make_local_variable_final=true
cleanup.make_parameters_final=false
cleanup.make_private_fields_final=true
cleanup.make_type_abstract_if_missing_method=false
cleanup.make_variable_declarations_final=false
cleanup.never_use_blocks=false
cleanup.never_use_parentheses_in_expressions=false
cleanup.organize_imports=true
cleanup.qualify_static_field_accesses_with_declaring_class=false
cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
cleanup.qualify_static_member_accesses_with_declaring_class=true
cleanup.qualify_static_method_accesses_with_declaring_class=false
cleanup.remove_private_constructors=true
cleanup.remove_trailing_whitespaces=true
cleanup.remove_trailing_whitespaces_all=true
cleanup.remove_trailing_whitespaces_ignore_empty=false
cleanup.remove_unnecessary_casts=true
cleanup.remove_unnecessary_nls_tags=true
cleanup.remove_unused_imports=true
cleanup.remove_unused_local_variables=false
cleanup.remove_unused_private_fields=true
cleanup.remove_unused_private_members=false
cleanup.remove_unused_private_methods=true
cleanup.remove_unused_private_types=true
cleanup.sort_members=false
cleanup.sort_members_all=false
cleanup.use_blocks=true
cleanup.use_blocks_only_for_return_and_throw=false
cleanup.use_parentheses_in_expressions=false
cleanup.use_this_for_non_static_field_access=false
cleanup.use_this_for_non_static_field_access_only_if_necessary=true
cleanup.use_this_for_non_static_method_access=false
cleanup.use_this_for_non_static_method_access_only_if_necessary=true
cleanup_profile=_timo
cleanup_settings_version=2
eclipse.preferences.version=1
editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
formatter_profile=_Profile
formatter_settings_version=12
org.eclipse.jdt.ui.exception.name=e
org.eclipse.jdt.ui.gettersetter.use.is=true
org.eclipse.jdt.ui.ignorelowercasenames=true
org.eclipse.jdt.ui.importorder=\#com.google.common.base.Predicates;com;java;javax;org;org.eclipse;org.wesnoth;
org.eclipse.jdt.ui.keywordthis=false
org.eclipse.jdt.ui.ondemandthreshold=99
org.eclipse.jdt.ui.overrideannotation=true
org.eclipse.jdt.ui.staticondemandthreshold=99
sp_cleanup.add_default_serial_version_id=true
sp_cleanup.add_generated_serial_version_id=false
sp_cleanup.add_missing_annotations=true
sp_cleanup.add_missing_deprecated_annotations=true
sp_cleanup.add_missing_methods=false
sp_cleanup.add_missing_nls_tags=false
sp_cleanup.add_missing_override_annotations=true
sp_cleanup.add_missing_override_annotations_interface_methods=false
sp_cleanup.add_serial_version_id=false
sp_cleanup.always_use_blocks=true
sp_cleanup.always_use_parentheses_in_expressions=false
sp_cleanup.always_use_this_for_non_static_field_access=false
sp_cleanup.always_use_this_for_non_static_method_access=false
sp_cleanup.convert_to_enhanced_for_loop=false
sp_cleanup.correct_indentation=false
sp_cleanup.format_source_code=true
sp_cleanup.format_source_code_changes_only=false
sp_cleanup.make_local_variable_final=false
sp_cleanup.make_parameters_final=false
sp_cleanup.make_private_fields_final=true
sp_cleanup.make_type_abstract_if_missing_method=false
sp_cleanup.make_variable_declarations_final=false
sp_cleanup.never_use_blocks=false
sp_cleanup.never_use_parentheses_in_expressions=true
sp_cleanup.on_save_use_additional_actions=true
sp_cleanup.organize_imports=true
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_with_declaring_class=false
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.remove_private_constructors=true
sp_cleanup.remove_trailing_whitespaces=true
sp_cleanup.remove_trailing_whitespaces_all=true
sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
sp_cleanup.remove_unnecessary_casts=true
sp_cleanup.remove_unnecessary_nls_tags=true
sp_cleanup.remove_unused_imports=true
sp_cleanup.remove_unused_local_variables=false
sp_cleanup.remove_unused_private_fields=true
sp_cleanup.remove_unused_private_members=false
sp_cleanup.remove_unused_private_methods=true
sp_cleanup.remove_unused_private_types=true
sp_cleanup.sort_members=false
sp_cleanup.sort_members_all=false
sp_cleanup.use_blocks=true
sp_cleanup.use_blocks_only_for_return_and_throw=false
sp_cleanup.use_parentheses_in_expressions=false
sp_cleanup.use_this_for_non_static_field_access=false
sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
sp_cleanup.use_this_for_non_static_method_access=false
sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true

View file

@ -1,3 +0,0 @@
#Sat Aug 06 15:24:20 EEST 2011
eclipse.preferences.version=1
org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false

View file

@ -1,20 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: org.wesnoth.ui
Bundle-Vendor: www.wesnoth.org
Bundle-Version: 2.0.3.qualifier
Bundle-SymbolicName: org.wesnoth.ui;singleton:=true
Bundle-ActivationPolicy: lazy
Require-Bundle: org.wesnoth;visibility:=reexport,
org.eclipse.xtext.ui;bundle-version="2.0.0",
org.eclipse.xtext.ui.shared;bundle-version="2.0.0",
org.eclipse.ui.ide;bundle-version="3.5.0",
org.eclipse.xtext.builder,
org.eclipse.core.filesystem;bundle-version="1.3.0",
org.eclipse.ui.editors,
org.eclipse.ui,
org.antlr.runtime
Import-Package: org.apache.log4j
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: org.wesnoth.ui.contentassist.antlr
Bundle-Activator: org.wesnoth.ui.internal.WMLActivator

View file

@ -1,10 +0,0 @@
source.. = src/,\
src-gen/
bin.includes = META-INF/,\
.,\
plugin.xml,\
icons/,\
templates/
javacSource=1.6
javacTarget=1.6
src.includes = icons/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 779 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 841 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

View file

@ -1,201 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="cfg"
icon="icons/wesnoth-icon_16.png"
id="org.wesnoth.WML"
name="WML Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="org.wesnoth.WML.validate">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="org.wesnoth.WML.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="org.wesnoth.WML"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="org.wesnoth.WML"
name="Wesnoth WML">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
<page
category="org.wesnoth.WML"
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="org.wesnoth.WML.coloring"
name="Syntax Coloring">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
<page
category="org.wesnoth.WML"
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="org.wesnoth.WML.templates"
name="Templates">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="org.wesnoth.ui.keyword_WML"
label="WML"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="org.wesnoth.WML.validate"
name="Validate">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="org.wesnoth.WML.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="cfg">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="cfg">
</resourceServiceProvider>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
<command
categoryId="org.eclipse.xtext.ui.category.XtextEditor"
defaultHandler="org.wesnoth.ui.labeling.wmldoc.WMLDocHandler"
description="Shows WML Documentation for active resource"
id="org.wesnoth.wml.ui.showWMLDoc"
name="Shows WML Documentation">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="org.wesnoth.WML.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator">
</markerResolutionGenerator>
</extension>
<extension
point="org.eclipse.ui.bindings">
<key
commandId="org.wesnoth.wml.ui.showWMLDoc"
contextId="org.eclipse.xtext.ui.XtextEditorScope"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="F2">
</key>
</extension>
</plugin>

View file

@ -1,183 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="cfg"
id="org.wesnoth.WML"
name="WML Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="org.wesnoth.WML.validate">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="org.wesnoth.WML.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="org.wesnoth.WML"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="org.wesnoth.WML"
name="WML">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
<page
category="org.wesnoth.WML"
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="org.wesnoth.WML.coloring"
name="Syntax Coloring">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
<page
category="org.wesnoth.WML"
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="org.wesnoth.WML.templates"
name="Templates">
<keywordReference id="org.wesnoth.ui.keyword_WML"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="org.wesnoth.ui.keyword_WML"
label="WML"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="org.wesnoth.WML.validate"
name="Validate">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="org.wesnoth.WML.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="cfg">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="cfg">
</resourceServiceProvider>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="org.wesnoth.WML.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="org.wesnoth.WML.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="org.wesnoth.ui.WMLExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator">
</markerResolutionGenerator>
</extension>
</plugin>

View file

@ -1,122 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui;
import org.eclipse.xtext.ui.DefaultUiModule;
import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* Manual modifications go to {org.wesnoth.ui.WMLUiModule}
*/
@SuppressWarnings("all")
public abstract class AbstractWMLUiModule extends DefaultUiModule {
public AbstractWMLUiModule(AbstractUIPlugin plugin) {
super(plugin);
}
// contributed by org.eclipse.xtext.ui.generator.ImplicitUiFragment
public com.google.inject.Provider<org.eclipse.xtext.resource.containers.IAllContainersState> provideIAllContainersState() {
return org.eclipse.xtext.ui.shared.Access.getJavaProjectsState();
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper> bindIProposalConflictHelper() {
return org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
public void configureHighlightingLexer(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.wesnoth.parser.antlr.internal.InternalWMLLexer.class);
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment
public void configureHighlightingTokenDefProvider(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.parser.antlr.ITokenDefProvider.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.HIGHLIGHTING)).to(org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider.class);
}
// contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher> bindPrefixMatcher() {
return org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher.class;
}
// contributed by org.eclipse.xtext.generator.exporting.QualifiedNamesFragment
public Class<? extends org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator> bindIDependentElementsCalculator() {
return org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator.class;
}
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
public void configureIResourceDescriptionsBuilderScope(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(org.eclipse.xtext.builder.clustering.CurrentDescriptions.ResourceSetAware.class);
}
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
public Class<? extends org.eclipse.xtext.ui.editor.IXtextEditorCallback> bindIXtextEditorCallback() {
return org.eclipse.xtext.builder.nature.NatureAddingEditorCallback.class;
}
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
public void configureIResourceDescriptionsPersisted(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.resource.IResourceDescriptions.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.PERSISTED_DESCRIPTIONS)).to(org.eclipse.xtext.builder.builderState.IBuilderState.class);
}
// contributed by org.eclipse.xtext.generator.builder.BuilderIntegrationFragment
public Class<? extends org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
return org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource.class;
}
// contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
public Class<? extends org.eclipse.jface.viewers.ILabelProvider> bindILabelProvider() {
return org.wesnoth.ui.labeling.WMLLabelProvider.class;
}
// contributed by org.eclipse.xtext.ui.generator.labeling.LabelProviderFragment
public void configureResourceUIServiceLabelProvider(com.google.inject.Binder binder) {
binder.bind(org.eclipse.jface.viewers.ILabelProvider.class).annotatedWith(org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider.class).to(org.wesnoth.ui.labeling.WMLDescriptionLabelProvider.class);
}
// contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
public Class<? extends org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider> bindIOutlineTreeProvider() {
return org.wesnoth.ui.outline.WMLOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.ui.generator.outline.OutlineTreeProviderFragment
public Class<? extends org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
return org.wesnoth.ui.outline.WMLOutlineTreeProvider.class;
}
// contributed by org.eclipse.xtext.ui.generator.quickfix.QuickfixProviderFragment
public Class<? extends org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider> bindIssueResolutionProvider() {
return org.wesnoth.ui.quickfix.WMLQuickfixProvider.class;
}
// contributed by org.eclipse.xtext.ui.generator.contentAssist.JavaBasedContentAssistFragment
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider> bindIContentProposalProvider() {
return org.wesnoth.ui.contentassist.WMLProposalProvider.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext.Factory> bindContentAssistContext$Factory() {
return org.eclipse.xtext.ui.editor.contentassist.antlr.ParserBasedContentAssistContextFactory.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
public Class<? extends org.eclipse.xtext.ui.editor.contentassist.antlr.IContentAssistParser> bindIContentAssistParser() {
return org.wesnoth.ui.contentassist.antlr.WMLParser.class;
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
public void configureContentAssistLexerProvider(com.google.inject.Binder binder) {
binder.bind(org.wesnoth.ui.contentassist.antlr.internal.InternalWMLLexer.class).toProvider(org.eclipse.xtext.parser.antlr.LexerProvider.create(org.wesnoth.ui.contentassist.antlr.internal.InternalWMLLexer.class));
}
// contributed by org.eclipse.xtext.generator.parser.antlr.XtextAntlrUiGeneratorFragment
public void configureContentAssistLexer(com.google.inject.Binder binder) {
binder.bind(org.eclipse.xtext.ui.editor.contentassist.antlr.internal.Lexer.class).annotatedWith(com.google.inject.name.Names.named(org.eclipse.xtext.ui.LexerUIBindings.CONTENT_ASSIST)).to(org.wesnoth.ui.contentassist.antlr.internal.InternalWMLLexer.class);
}
}

View file

@ -1,27 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui;
import org.eclipse.xtext.ui.guice.AbstractGuiceAwareExecutableExtensionFactory;
import org.osgi.framework.Bundle;
import com.google.inject.Injector;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class WMLExecutableExtensionFactory extends AbstractGuiceAwareExecutableExtensionFactory {
@Override
protected Bundle getBundle() {
return org.wesnoth.ui.internal.WMLActivator.getInstance().getBundle();
}
@Override
protected Injector getInjector() {
return org.wesnoth.ui.internal.WMLActivator.getInstance().getInjector("org.wesnoth.WML");
}
}

View file

@ -1,224 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui.contentassist;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.*;
import org.eclipse.xtext.ui.editor.contentassist.AbstractJavaBasedContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
/**
* Represents a generated, default implementation of interface {@link IProposalProvider}.
* Methods are dynamically dispatched on the first parameter, i.e., you can override them
* with a more concrete subtype.
*/
@SuppressWarnings("all")
public class AbstractWMLProposalProvider extends AbstractJavaBasedContentProposalProvider {
public void completeWMLRoot_Expressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLTag_Plus(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeWMLTag_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLTag_Expressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLTag_EndName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLKey_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLKey_Values(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLKey_Eol(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor);
}
public void completeWMLMacroCall_Point(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeWMLMacroCall_Relative(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void completeWMLMacroCall_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroCall_Parameters(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLArrayCall_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroDefine_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroDefine_Expressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLMacroDefine_EndName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(2)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(3)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(4)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(5)), context, acceptor);
}
public void completeWMLPreprocIF_Expressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_Elses(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_ElseExpressions(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLPreprocIF_EndName(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLTextdomain_Name(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLLuaCode_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)assignment.getTerminal()), context, acceptor);
}
public void completeWMLValue_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(0)), context, acceptor);
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(1)), context, acceptor);
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
completeRuleCall(((RuleCall)((Alternatives)assignment.getTerminal()).getElements().get(10)), context, acceptor);
}
public void completeMacroTokens_Value(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
// subclasses may override
}
public void complete_WMLRoot(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLGrammarElement(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLTag(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLKey(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLKeyValue(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLMacroCall(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLMacroCallParameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLArrayCall(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLMacroDefine(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLPreprocIF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLRootExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLValuedExpression(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLTextdomain(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLLuaCode(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLMacroParameter(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WMLValue(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_MacroTokens(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_LUA_CODE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFHAVE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFNHAVE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFDEF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFVER(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFNVER(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_IFNDEF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ELSE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ENDIF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_DEFINE(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ENDDEF(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_TEXTDOMAIN(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_STRING(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_EOL(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_WS(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_ANY_OTHER(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
public void complete_SL_COMMENT(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
// subclasses may override
}
}

View file

@ -1,114 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui.contentassist.antlr;
import java.util.Collection;
import java.util.Map;
import java.util.HashMap;
import org.antlr.runtime.RecognitionException;
import org.eclipse.xtext.AbstractElement;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AbstractContentAssistParser;
import org.eclipse.xtext.ui.editor.contentassist.antlr.FollowElement;
import org.eclipse.xtext.ui.editor.contentassist.antlr.internal.AbstractInternalContentAssistParser;
import com.google.inject.Inject;
import org.wesnoth.services.WMLGrammarAccess;
public class WMLParser extends AbstractContentAssistParser {
@Inject
private WMLGrammarAccess grammarAccess;
private Map<AbstractElement, String> nameMappings;
@Override
protected org.wesnoth.ui.contentassist.antlr.internal.InternalWMLParser createParser() {
org.wesnoth.ui.contentassist.antlr.internal.InternalWMLParser result = new org.wesnoth.ui.contentassist.antlr.internal.InternalWMLParser(null);
result.setGrammarAccess(grammarAccess);
return result;
}
@Override
protected String getRuleName(AbstractElement element) {
if (nameMappings == null) {
nameMappings = new HashMap<AbstractElement, String>() {
private static final long serialVersionUID = 1L;
{
put(grammarAccess.getWMLGrammarElementAccess().getAlternatives(), "rule__WMLGrammarElement__Alternatives");
put(grammarAccess.getWMLKeyAccess().getEolAlternatives_4_0(), "rule__WMLKey__EolAlternatives_4_0");
put(grammarAccess.getWMLKeyValueAccess().getAlternatives(), "rule__WMLKeyValue__Alternatives");
put(grammarAccess.getWMLMacroCallParameterAccess().getAlternatives(), "rule__WMLMacroCallParameter__Alternatives");
put(grammarAccess.getWMLPreprocIFAccess().getNameAlternatives_0_0(), "rule__WMLPreprocIF__NameAlternatives_0_0");
put(grammarAccess.getWMLRootExpressionAccess().getAlternatives(), "rule__WMLRootExpression__Alternatives");
put(grammarAccess.getWMLExpressionAccess().getAlternatives(), "rule__WMLExpression__Alternatives");
put(grammarAccess.getWMLValuedExpressionAccess().getAlternatives(), "rule__WMLValuedExpression__Alternatives");
put(grammarAccess.getWMLMacroParameterAccess().getAlternatives(), "rule__WMLMacroParameter__Alternatives");
put(grammarAccess.getWMLValueAccess().getValueAlternatives_0(), "rule__WMLValue__ValueAlternatives_0");
put(grammarAccess.getMacroTokensAccess().getValueAlternatives_0(), "rule__MacroTokens__ValueAlternatives_0");
put(grammarAccess.getWMLTagAccess().getGroup(), "rule__WMLTag__Group__0");
put(grammarAccess.getWMLKeyAccess().getGroup(), "rule__WMLKey__Group__0");
put(grammarAccess.getWMLKeyAccess().getGroup_3(), "rule__WMLKey__Group_3__0");
put(grammarAccess.getWMLMacroCallAccess().getGroup(), "rule__WMLMacroCall__Group__0");
put(grammarAccess.getWMLArrayCallAccess().getGroup(), "rule__WMLArrayCall__Group__0");
put(grammarAccess.getWMLMacroDefineAccess().getGroup(), "rule__WMLMacroDefine__Group__0");
put(grammarAccess.getWMLPreprocIFAccess().getGroup(), "rule__WMLPreprocIF__Group__0");
put(grammarAccess.getWMLPreprocIFAccess().getGroup_2(), "rule__WMLPreprocIF__Group_2__0");
put(grammarAccess.getWMLRootAccess().getExpressionsAssignment(), "rule__WMLRoot__ExpressionsAssignment");
put(grammarAccess.getWMLTagAccess().getPlusAssignment_1(), "rule__WMLTag__PlusAssignment_1");
put(grammarAccess.getWMLTagAccess().getNameAssignment_2(), "rule__WMLTag__NameAssignment_2");
put(grammarAccess.getWMLTagAccess().getExpressionsAssignment_4(), "rule__WMLTag__ExpressionsAssignment_4");
put(grammarAccess.getWMLTagAccess().getEndNameAssignment_6(), "rule__WMLTag__EndNameAssignment_6");
put(grammarAccess.getWMLKeyAccess().getNameAssignment_0(), "rule__WMLKey__NameAssignment_0");
put(grammarAccess.getWMLKeyAccess().getValuesAssignment_2(), "rule__WMLKey__ValuesAssignment_2");
put(grammarAccess.getWMLKeyAccess().getValuesAssignment_3_3(), "rule__WMLKey__ValuesAssignment_3_3");
put(grammarAccess.getWMLKeyAccess().getEolAssignment_4(), "rule__WMLKey__EolAssignment_4");
put(grammarAccess.getWMLMacroCallAccess().getPointAssignment_1(), "rule__WMLMacroCall__PointAssignment_1");
put(grammarAccess.getWMLMacroCallAccess().getRelativeAssignment_2(), "rule__WMLMacroCall__RelativeAssignment_2");
put(grammarAccess.getWMLMacroCallAccess().getNameAssignment_3(), "rule__WMLMacroCall__NameAssignment_3");
put(grammarAccess.getWMLMacroCallAccess().getParametersAssignment_4(), "rule__WMLMacroCall__ParametersAssignment_4");
put(grammarAccess.getWMLArrayCallAccess().getValueAssignment_1(), "rule__WMLArrayCall__ValueAssignment_1");
put(grammarAccess.getWMLMacroDefineAccess().getNameAssignment_0(), "rule__WMLMacroDefine__NameAssignment_0");
put(grammarAccess.getWMLMacroDefineAccess().getExpressionsAssignment_1(), "rule__WMLMacroDefine__ExpressionsAssignment_1");
put(grammarAccess.getWMLMacroDefineAccess().getEndNameAssignment_2(), "rule__WMLMacroDefine__EndNameAssignment_2");
put(grammarAccess.getWMLPreprocIFAccess().getNameAssignment_0(), "rule__WMLPreprocIF__NameAssignment_0");
put(grammarAccess.getWMLPreprocIFAccess().getExpressionsAssignment_1(), "rule__WMLPreprocIF__ExpressionsAssignment_1");
put(grammarAccess.getWMLPreprocIFAccess().getElsesAssignment_2_0(), "rule__WMLPreprocIF__ElsesAssignment_2_0");
put(grammarAccess.getWMLPreprocIFAccess().getElseExpressionsAssignment_2_1(), "rule__WMLPreprocIF__ElseExpressionsAssignment_2_1");
put(grammarAccess.getWMLPreprocIFAccess().getEndNameAssignment_3(), "rule__WMLPreprocIF__EndNameAssignment_3");
put(grammarAccess.getWMLTextdomainAccess().getNameAssignment(), "rule__WMLTextdomain__NameAssignment");
put(grammarAccess.getWMLLuaCodeAccess().getValueAssignment(), "rule__WMLLuaCode__ValueAssignment");
put(grammarAccess.getWMLValueAccess().getValueAssignment(), "rule__WMLValue__ValueAssignment");
put(grammarAccess.getMacroTokensAccess().getValueAssignment(), "rule__MacroTokens__ValueAssignment");
}
};
}
return nameMappings.get(element);
}
@Override
protected Collection<FollowElement> getFollowElements(AbstractInternalContentAssistParser parser) {
try {
org.wesnoth.ui.contentassist.antlr.internal.InternalWMLParser typedParser = (org.wesnoth.ui.contentassist.antlr.internal.InternalWMLParser) parser;
typedParser.entryRuleWMLRoot();
return typedParser.getFollowElements();
} catch(RecognitionException ex) {
throw new RuntimeException(ex);
}
}
@Override
protected String[] getInitialHiddenTokens() {
return new String[] { "RULE_EOL", "RULE_WS", "RULE_SL_COMMENT" };
}
public WMLGrammarAccess getGrammarAccess() {
return this.grammarAccess;
}
public void setGrammarAccess(WMLGrammarAccess grammarAccess) {
this.grammarAccess = grammarAccess;
}
}

View file

@ -1,48 +0,0 @@
RULE_LUA_CODE=20
RULE_ID=12
RULE_IFDEF=6
T__29=29
T__28=28
T__27=27
T__26=26
T__25=25
T__24=24
T__23=23
T__22=22
RULE_ANY_OTHER=14
RULE_IFNDEF=7
RULE_EOL=4
RULE_TEXTDOMAIN=19
RULE_IFNHAVE=9
RULE_SL_COMMENT=5
RULE_IFNVER=11
T__30=30
T__31=31
RULE_STRING=13
T__32=32
T__33=33
RULE_ENDIF=18
T__34=34
T__35=35
T__36=36
RULE_DEFINE=15
RULE_IFVER=10
RULE_ENDDEF=16
RULE_IFHAVE=8
RULE_WS=21
RULE_ELSE=17
'$'=26
'}'=36
'~'=23
'/'=27
'{'=35
'='=30
'('=28
'['=31
'[/'=34
'+'=33
'_'=22
'.'=24
')'=29
'./'=25
']'=32

View file

@ -1,82 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui.internal;
import static com.google.inject.util.Modules.override;
import static com.google.inject.Guice.createInjector;
import org.apache.log4j.Logger;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
import com.google.inject.Injector;
import com.google.inject.Module;
import java.util.Map;
import java.util.HashMap;
/**
* This class was generated. Customizations should only happen in a newly
* introduced subclass.
*/
public class WMLActivator extends AbstractUIPlugin {
private Map<String,Injector> injectors = new HashMap<String,Injector>();
private static WMLActivator INSTANCE;
public Injector getInjector(String languageName) {
return injectors.get(languageName);
}
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
INSTANCE = this;
try {
registerInjectorFor("org.wesnoth.WML");
} catch (Exception e) {
Logger.getLogger(getClass()).error(e.getMessage(), e);
throw e;
}
}
protected void registerInjectorFor(String language) throws Exception {
injectors.put(language, createInjector(
override(override(getRuntimeModule(language)).with(getSharedStateModule())).with(getUiModule(language))));
}
@Override
public void stop(BundleContext context) throws Exception {
injectors.clear();
INSTANCE = null;
super.stop(context);
}
public static WMLActivator getInstance() {
return INSTANCE;
}
protected Module getRuntimeModule(String grammar) {
if ("org.wesnoth.WML".equals(grammar)) {
return new org.wesnoth.WMLRuntimeModule();
}
throw new IllegalArgumentException(grammar);
}
protected Module getUiModule(String grammar) {
if ("org.wesnoth.WML".equals(grammar)) {
return new org.wesnoth.ui.WMLUiModule(this);
}
throw new IllegalArgumentException(grammar);
}
protected Module getSharedStateModule() {
return new org.eclipse.xtext.ui.shared.SharedStateModule();
}
}

View file

@ -1,43 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui;
import org.eclipse.osgi.util.NLS;
@SuppressWarnings( "javadoc" )
public class Messages extends NLS
{
private static final String BUNDLE_NAME = "org.wesnoth.ui.messages"; //$NON-NLS-1$
public static String WMLDocMacro_0;
public static String WMLDocMacro_1;
public static String WMLDocMacro_2;
public static String WMLDocTag_0;
public static String WMLDocTag_1;
public static String WMLEditor_0;
public static String WMLEditor_1;
public static String WMLEditor_2;
public static String WMLEditor_3;
public static String WMLEditor_4;
public static String WMLEditor_5;
public static String WMLHighlightingConfiguration_10;
public static String WMLHighlightingConfiguration_11;
public static String WMLHighlightingConfiguration_12;
public static String WMLHighlightingConfiguration_13;
public static String WMLHighlightingConfiguration_7;
public static String WMLHighlightingConfiguration_8;
public static String WMLHighlightingConfiguration_9;
static {
// initialize resource bundle
NLS.initializeMessages( BUNDLE_NAME, Messages.class );
}
private Messages( )
{
}
}

View file

@ -1,141 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui;
import com.google.inject.Binder;
import com.google.inject.Provider;
import org.eclipse.jface.text.source.ICharacterPairMatcher;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.resource.DefaultLocationInFileProvider;
import org.eclipse.xtext.resource.ILocationInFileProvider;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.autoedit.AbstractEditStrategyProvider;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalComparator;
import org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider;
import org.eclipse.xtext.ui.editor.hover.IEObjectHoverProvider;
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper;
import org.eclipse.xtext.ui.editor.syntaxcoloring.AbstractAntlrTokenToAttributeIdMapper;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfiguration;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingHelper;
import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator;
import org.wesnoth.ui.autoedit.WMLAutoEditStrategy;
import org.wesnoth.ui.contentassist.WMLProposalComparator;
import org.wesnoth.ui.editor.WMLEditor;
import org.wesnoth.ui.editor.WMLHighlightingHelper;
import org.wesnoth.ui.folding.WMLFoldingRegionProvider;
import org.wesnoth.ui.hover.WMLEObjectHoverProvider;
import org.wesnoth.ui.labeling.WMLLabelProvider;
import org.wesnoth.ui.navigation.WMLHyperlinkHelper;
import org.wesnoth.ui.syntax.WMLAntlrTokenToAttributeIdMapper;
import org.wesnoth.ui.syntax.WMLCharacterPairMatcher;
import org.wesnoth.ui.syntax.WMLHighlightingConfiguration;
import org.wesnoth.ui.syntax.WMLSemanticHighlightingCalculator;
/**
* Use this class to register components to be used within the IDE.
*/
@SuppressWarnings( "all" )
public class WMLUiModule extends org.wesnoth.ui.AbstractWMLUiModule
{
public WMLUiModule( AbstractUIPlugin plugin )
{
super( plugin );
}
@Override
public void configure( Binder binder )
{
super.configure( binder );
binder.bind( IEObjectHoverProvider.class ).to(
WMLEObjectHoverProvider.class );
}
@Override
public Class< ? extends IHighlightingHelper > bindIHighlightingHelper( )
{
return WMLHighlightingHelper.class;
}
public Class< ? extends IHighlightingConfiguration > bindIHighlightingConfiguration( )
{
return WMLHighlightingConfiguration.class;
}
public Class< ? extends AbstractAntlrTokenToAttributeIdMapper > bindTokenToAttributeIdMapper( )
{
return WMLAntlrTokenToAttributeIdMapper.class;
}
public Class< ? extends ISemanticHighlightingCalculator > bindISemanticHighlightingCalculator( )
{
return WMLSemanticHighlightingCalculator.class;
}
@Override
public ICharacterPairMatcher bindICharacterPairMatcher( )
{
return new WMLCharacterPairMatcher( new char[] { '(', ')', '{', '}',
'[', ']' } );
}
public Class< ? extends XtextEditor > bindEditor( )
{
return WMLEditor.class;
}
public Class< ? extends ILocationInFileProvider > bindILocationInFileProvider( )
{
return DefaultLocationInFileProvider.class;
}
public Class< ? extends HyperlinkHelper > bindHyperlinkHelper( )
{
return WMLHyperlinkHelper.class;
}
public Class< ? extends ICompletionProposalComparator > bindICompletionProposalComparator( )
{
return WMLProposalComparator.class;
}
@Override
public Class< ? extends AbstractEditStrategyProvider > bindAbstractEditStrategyProvider( )
{
return WMLAutoEditStrategy.class;
}
@Override
public Class< ? extends ILabelProvider > bindILabelProvider( )
{
return WMLLabelProvider.class;
}
@Override
public Class< ? extends IXtextEditorCallback > bindIXtextEditorCallback( )
{
return null;
}
public Class< ? extends DefaultFoldingRegionProvider > bindDefaultFoldingRegionProvider( )
{
return WMLFoldingRegionProvider.class;
}
@Override
public Provider< IAllContainersState > provideIAllContainersState( )
{
return org.eclipse.xtext.ui.shared.Access.getWorkspaceProjectsState( );
}
}

View file

@ -1,82 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.autoedit;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.DocumentCommand;
import org.eclipse.jface.text.IAutoEditStrategy;
import org.eclipse.jface.text.IDocument;
import org.eclipse.xtext.nodemodel.ILeafNode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.utils.EditorUtils;
import org.eclipse.xtext.util.concurrent.IUnitOfWork;
import org.wesnoth.utils.StringUtils;
import org.wesnoth.wml.WMLTag;
/**
* Strategy that tries to close the nearest unclosed tag
*/
public class ClosingEndTagAutoEditStrategy implements IAutoEditStrategy
{
@Override
public void customizeDocumentCommand( final IDocument document,
final DocumentCommand command )
{
try {
if( command.text.equals( "/" ) && document.get( command.offset - 1, 1 ).equals( "[" ) ) //$NON-NLS-1$ //$NON-NLS-2$
{
XtextEditor editor = EditorUtils.getActiveXtextEditor( );
if( editor == null ) {
return;
}
editor.getDocument( ).readOnly(
new IUnitOfWork.Void< XtextResource >( ) {
@Override
public void process( XtextResource state )
throws Exception
{
ILeafNode currentNode = NodeModelUtils
.findLeafNodeAtOffset( state
.getParseResult( )
.getRootNode( ), command.offset );
if( currentNode == null ) {
return;
}
EObject semanticElement = currentNode
.getSemanticElement( );
if( semanticElement == null ) {
return;
}
String tagName = ""; //$NON-NLS-1$
EObject container = semanticElement
.eContainer( );
if( container instanceof WMLTag ) {
tagName = ( ( WMLTag ) container )
.getName( );
}
if( ! StringUtils.isNullOrEmpty( tagName ) ) {
command.shiftsCaret = true;
command.text = ( "/" + tagName ); //$NON-NLS-1$
}
}
} );
}
} catch( BadLocationException e ) {
}
}
}

View file

@ -1,35 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.autoedit;
import org.eclipse.jface.text.IDocument;
import org.eclipse.xtext.ui.editor.autoedit.DefaultAutoEditStrategyProvider;
/**
* The auto edit strategy for the WML Editor
*/
public class WMLAutoEditStrategy extends DefaultAutoEditStrategyProvider
{
/**
* Creates a new {@link WMLAutoEditStrategy}
*/
public WMLAutoEditStrategy( )
{
super( );
}
@Override
protected void configure( IEditStrategyAcceptor acceptor )
{
super.configure( acceptor );
configureStringLiteral( acceptor );
acceptor.accept( new ClosingEndTagAutoEditStrategy( ),
IDocument.DEFAULT_CONTENT_TYPE );
}
}

View file

@ -1,37 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.contentassist;
import java.io.Serializable;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.xtext.ui.editor.contentassist.ConfigurableCompletionProposal;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalComparator;
/**
* Comparator for content assist proposals
*/
public class WMLProposalComparator implements ICompletionProposalComparator,
Serializable
{
private static final long serialVersionUID = 2907285603328932377L;
@Override
public int compare( ICompletionProposal arg0, ICompletionProposal arg1 )
{
if( arg0 instanceof ConfigurableCompletionProposal
&& arg1 instanceof ConfigurableCompletionProposal ) {
ConfigurableCompletionProposal tmp0 = ( ConfigurableCompletionProposal ) arg0;
ConfigurableCompletionProposal tmp1 = ( ConfigurableCompletionProposal ) arg1;
return tmp0.compareTo( tmp1 );
}
return 0;
}
}

View file

@ -1,473 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.contentassist;
import com.google.common.base.Function;
import com.google.common.base.Predicates;
import com.google.common.collect.Collections2;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map.Entry;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.StyledString;
import org.eclipse.swt.graphics.Image;
import org.eclipse.xtext.Assignment;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.nodemodel.ILeafNode;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import org.wesnoth.installs.WesnothInstallsUtils;
import org.wesnoth.preprocessor.Define;
import org.wesnoth.projects.ProjectCache;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.schema.SchemaParser;
import org.wesnoth.templates.TemplateProvider;
import org.wesnoth.ui.editor.WMLEditor;
import org.wesnoth.utils.ResourceUtils;
import org.wesnoth.utils.StringUtils;
import org.wesnoth.utils.WMLUtils;
import org.wesnoth.wml.WMLConfig;
import org.wesnoth.wml.WMLKey;
import org.wesnoth.wml.WMLKeyValue;
import org.wesnoth.wml.WMLTag;
import org.wesnoth.wml.WMLVariable;
import org.wesnoth.wml.WMLVariable.Scope;
/**
* Proposal provider for WML content assist
*/
public class WMLProposalProvider extends AbstractWMLProposalProvider
{
protected SchemaParser schemaParser_;
protected ProjectCache projectCache_;
protected int dependencyIndex_;
protected static final int KEY_VALUE_PRIORITY = 1700;
protected static final int KEY_NAME_PRIORITY = 1500;
protected static final int TAG_PRIORITY = 1000;
protected static final int MACRO_CALL_PRIORITY = 100;
private static boolean IMAGES_INITED = false;
private static Image MACRO_CALL_IMAGE = null;
private static Image SCENARIO_VALUE_IMAGE = null;
private static Image WML_KEY_IMAGE = null;
private static Image WML_TAG_IMAGE = null;
/**
* For priorities, see: {@link #KEY_NAME_PRIORITY}
* {@link #KEY_VALUE_PRIORITY} {@link #TAG_PRIORITY}
* {@link #MACRO_CALL_PRIORITY}
*/
public WMLProposalProvider( )
{
super( );
}
private void initImages( )
{
if( IMAGES_INITED ) {
return;
}
ILabelProvider labelProvider = getLabelProvider( );
MACRO_CALL_IMAGE = labelProvider.getImage( "macrocall.png" );
SCENARIO_VALUE_IMAGE = labelProvider.getImage( "scenario.png" );
WML_KEY_IMAGE = labelProvider.getImage( "wmlkey.png" );
WML_TAG_IMAGE = labelProvider.getImage( "wmltag.png" );
}
/**
* Initializes the proposal provider with all needed values
*/
private void initProposalProvider( )
{
if( projectCache_ != null ) {
return;
}
IFile file = WMLEditor.getActiveEditorFile( );
projectCache_ = ProjectUtils.getCacheForProject( file.getProject( ) );
// load the schema so we know what to suggest for autocomplete
schemaParser_ = SchemaParser.getInstance( WesnothInstallsUtils
.getInstallNameForResource( file ) );
dependencyIndex_ = ResourceUtils.getDependencyIndex( file );
initImages( );
}
@Override
public void createProposals( ContentAssistContext context,
ICompletionProposalAcceptor acceptor )
{
initProposalProvider( );
super.createProposals( context, acceptor );
}
@Override
public void completeWMLKey_Name( EObject model, Assignment assignment,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
super.completeWMLKey_Name( model, assignment, context, acceptor );
if( model != null ) {
addKeyNameProposals( model, context, acceptor );
}
}
@Override
public void complete_WMLKeyValue( EObject model, RuleCall ruleCall,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
super.complete_WMLKeyValue( model, ruleCall, context, acceptor );
if( model != null ) {
addKeyValueProposals( model, context, acceptor );
}
}
@Override
public void complete_WMLTag( EObject model, RuleCall ruleCall,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
super.complete_WMLTag( model, ruleCall, context, acceptor );
if( model != null ) {
addTagProposals( model, true, context, acceptor );
}
}
@Override
public void completeWMLTag_Name( EObject model, Assignment assignment,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
super.completeWMLTag_Name( model, assignment, context, acceptor );
if( model != null ) {
addTagProposals( model, false, context, acceptor );
}
}
@Override
public void completeWMLMacroCall_Name( EObject model,
Assignment assignment, ContentAssistContext context,
ICompletionProposalAcceptor acceptor )
{
super.completeWMLMacroCall_Name( model, assignment, context, acceptor );
if( model != null ) {
addMacroCallProposals( model, false, context, acceptor );
}
}
@Override
public void complete_WMLMacroCall( EObject model, RuleCall ruleCall,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
super.complete_WMLMacroCall( model, ruleCall, context, acceptor );
if( model != null ) {
addMacroCallProposals( model, true, context, acceptor );
}
}
private void addMacroCallProposals( EObject model, boolean ruleProposal,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
INode currentNode = context.getCurrentNode( );
boolean appendEndBrace = currentNode != null && ! currentNode.getText( ).equals( "}" );
for( Entry< String, Define > define: projectCache_.getDefines( )
.entrySet( ) ) {
StringBuilder proposal = new StringBuilder( 10 );
if( ruleProposal == true ) {
proposal.append( "{" ); //$NON-NLS-1$
}
proposal.append( define.getKey( ) );
for( String arg: define.getValue( ).getArguments( ) ) {
proposal.append( " " + arg ); //$NON-NLS-1$
}
if( appendEndBrace ) {
proposal.append( "}" ); //$NON-NLS-1$
}
acceptor.accept( createCompletionProposal( proposal.toString( ),
define.getKey( ), MACRO_CALL_IMAGE, context,
MACRO_CALL_PRIORITY ) );
}
}
private void addKeyValueProposals( EObject model,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
if( model == null || ! ( model instanceof WMLKey ) ) {
return;
}
WMLKey key = ( WMLKey ) model;
String keyName = key.getName( );
// handle the next_scenario and first_scenario
if( keyName.equals( "next_scenario" ) || //$NON-NLS-1$
keyName.equals( "first_scenario" ) ) //$NON-NLS-1$
{
for( WMLConfig config: projectCache_.getWMLConfigs( ).values( ) ) {
if( StringUtils.isNullOrEmpty( config.ScenarioId ) ) {
continue;
}
acceptor.accept( createCompletionProposal( config.ScenarioId,
config.ScenarioId, SCENARIO_VALUE_IMAGE, context,
KEY_VALUE_PRIORITY ) );
}
}
else if( model.eContainer( ) != null
&& model.eContainer( ) instanceof WMLTag ) {
WMLTag parent = ( WMLTag ) model.eContainer( );
String tagName = parent.getName( );
WMLTag tag = schemaParser_.getTags( ).get( tagName );
if( tag != null ) {
WMLKey tagKey = WMLUtils.getKeyByName( tag, keyName );
if( tagKey != null && tagKey.is_Enum( ) ) {
for( WMLKeyValue val: tagKey.getValues( ) ) {
acceptor.accept( createCompletionProposal(
val.toString( ), context, KEY_VALUE_PRIORITY ) );
}
}
}
if( ( tagName.equals( "event" ) || tagName.equals( "fire_event" ) )
&& keyName.equals( "name" ) ) {
// add events
List< String > events = new ArrayList< String >( );
events.addAll( TemplateProvider.getInstance( )
.getCAC( "events" ) );
events.addAll( projectCache_.getEvents( ) );
for( String event: events ) {
acceptor
.accept( createCompletionProposal( event, context ) );
}
}
else {
final int nodeOffset = NodeModelUtils.getNode( model )
.getTotalOffset( );
List< String > variables = new ArrayList< String >( );
// add CAC variables
variables.addAll( TemplateProvider.getInstance( ).getCAC(
"variables" ) );
// filter variables by index
Collection< String > projectVariables = Collections2.transform(
projectCache_.getVariables( ).values( ),
new Function< WMLVariable, String >( ) {
@Override
public String apply( WMLVariable from )
{
for( Scope scope: from.getScopes( ) ) {
if( scope.contains( dependencyIndex_,
nodeOffset ) ) {
return from.getName( );
}
}
return null;
}
} );
variables.addAll( Collections2.filter( projectVariables,
Predicates.notNull( ) ) );
for( String variable: variables ) {
acceptor.accept( createCompletionProposal( "$" + variable,
context ) );
}
}
}
}
private void addKeyNameProposals( EObject model,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
WMLTag tag = null;
if( model instanceof WMLTag ) {
tag = ( WMLTag ) model;
}
else if( model.eContainer( ) instanceof WMLTag ) {
tag = ( WMLTag ) model.eContainer( );
}
if( tag != null ) {
WMLTag schemaTag = schemaParser_.getTags( ).get( tag.getName( ) );
// try getting the custom ones
if( schemaTag == null ) {
schemaTag = projectCache_.getWMLTags( ).get( tag.getName( ) );
}
if( schemaTag != null ) {
for( WMLKey key: schemaTag.getWMLKeys( ) ) {
// skip forbidden keys
if( key.is_Forbidden( ) ) {
continue;
}
boolean toAdd = true;
// check only non-repeatable keys
if( ! key.is_Repeatable( ) ) {
// don't suggest already completed keys
toAdd = ( WMLUtils.getKeyByName( tag, key.getName( ) ) != null );
}
if( toAdd ) {
acceptor.accept( createCompletionProposal(
key.getName( ) + "=", //$NON-NLS-1$
key.getName( ), WML_KEY_IMAGE, context,
KEY_NAME_PRIORITY ) );
}
}
}
}
}
private void addTagProposals( EObject model, boolean ruleProposal,
ContentAssistContext context, ICompletionProposalAcceptor acceptor )
{
WMLTag parentTag = null;
if( model instanceof WMLTag ) {
parentTag = ( WMLTag ) model;
}
else if( model.eContainer( ) instanceof WMLTag ) {
parentTag = ( WMLTag ) model.eContainer( );
}
INode currentNode = context.getCurrentNode( );
if( currentNode == null ) {
return;
}
boolean appendEndBracket = ! currentNode.getText( ).equals( "]" );
WMLTag sourceTag = null;
String indent = "";
// find the just previous leaf node (which contains the indent)
ILeafNode leafNode = NodeModelUtils.findLeafNodeAtOffset(
NodeModelUtils.getNode( model ),
currentNode.getTotalOffset( ) - 1 - context.getPrefix( ).length( ) );
if( leafNode != null ) {
indent = leafNode.getText( );
}
if( parentTag != null ) {
sourceTag = schemaParser_.getTags( ).get( parentTag.getName( ) );
}
else // we are at the root
{
sourceTag = schemaParser_.getTags( ).get( "root" ); //$NON-NLS-1$
}
// remove new lines from the indent
indent = indent.replaceAll( "\\r|\\n", "" ); //$NON-NLS-1$ //$NON-NLS-2$
if( sourceTag != null ) {
for( WMLTag tag: sourceTag.getWMLTags( ) ) {
// skip forbidden tags
if( tag.is_Forbidden( ) ) {
continue;
}
// check that non-repeatable tags aren't suggested again
if( ! tag.is_Repeatable( ) && parentTag != null ) {
if( WMLUtils.getTagByName( parentTag, tag.getName( ) ) != null ) {
return;
}
}
acceptor.accept( createTagProposal( tag, indent, ruleProposal,
context, appendEndBracket ) );
}
}
// parsed custom tags
for( WMLTag tag: projectCache_.getWMLTags( ).values( ) ) {
acceptor.accept( createTagProposal( tag, "", ruleProposal, context, //$NON-NLS-1$
appendEndBracket ) );
}
}
/**
* Returns the proposal for the specified tag, usign the specified indent
*
* @param tag
* The tag from which to construct the proposal
* @param indent
* The indent used to indent the tag and subsequent keys
* @param ruleProposal
* Whether this is a proposal for an entire rule or not
* @param context
* @param appendEndBracked
* @return
*/
private ICompletionProposal createTagProposal( WMLTag tag, String indent,
boolean ruleProposal, ContentAssistContext context,
boolean appendEndBracked )
{
StringBuilder proposal = new StringBuilder( );
if( ruleProposal ) {
proposal.append( "[" ); //$NON-NLS-1$
}
proposal.append( tag.getName( ) );
proposal.append( "]\n" ); //$NON-NLS-1$
for( WMLKey key: tag.getWMLKeys( ) ) {
if( key.is_Required( ) ) {
proposal.append( String.format( "\t%s%s=\n", //$NON-NLS-1$
indent, key.getName( ) ) );
}
}
proposal.append( String.format( "%s[/%s%s",//$NON-NLS-1$
indent,
tag.getName( ),
appendEndBracked ? "]": "" ) );
return createCompletionProposal( proposal.toString( ), tag.getName( ),
WML_TAG_IMAGE, context, TAG_PRIORITY );
}
private ICompletionProposal createCompletionProposal( String proposal,
ContentAssistContext context, int priority )
{
return createCompletionProposal( proposal, null, null, priority,
context.getPrefix( ), context );
}
private ICompletionProposal createCompletionProposal( String proposal,
String displayString, Image image,
ContentAssistContext contentAssistContext, int priority )
{
return createCompletionProposal( proposal, new StyledString(
displayString ), image, priority,
contentAssistContext.getPrefix( ), contentAssistContext );
}
}

View file

@ -1,58 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.editor;
import java.util.Locale;
import org.eclipse.core.resources.IFile;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.ui.part.FileEditorInput;
/**
* We use an auxiliary class just to do a 'better' equals check
*/
public class LinkedFileEditorInput extends FileEditorInput
{
/**
* Creates a new {@link LinkedFileEditorInput}
*
* @param file
* The file attached to this editor input
*/
public LinkedFileEditorInput( IFile file )
{
super( file );
}
@Override
public boolean equals( Object obj )
{
if( this == obj ) {
return true;
}
String targetUri = ""; //$NON-NLS-1$
if( ! ( obj instanceof IFileEditorInput ) ) {
if( obj instanceof FileStoreEditorInput ) {
FileStoreEditorInput other = ( FileStoreEditorInput ) obj;
targetUri = other.getURI( ).toString( );
}
}
else {
IFileEditorInput other = ( IFileEditorInput ) obj;
targetUri = other.getFile( ).getLocationURI( ).toString( );
}
if( targetUri.isEmpty( ) ) {
return false;
}
return getFile( ).getLocationURI( ).toString( )
.toLowerCase( Locale.ENGLISH )
.equals( targetUri.toLowerCase( Locale.ENGLISH ) );
}
}

View file

@ -1,424 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.editor;
import java.io.File;
import org.apache.log4j.Level;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.emf.common.ui.URIEditorInput;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.common.util.WrappedException;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IURIEditorInput;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.FileStoreEditorInput;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.texteditor.IDocumentProvider;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper;
import org.eclipse.xtext.ui.editor.utils.EditorUtils;
import org.wesnoth.Logger;
import org.wesnoth.WesnothPlugin;
import org.wesnoth.ui.Messages;
/**
* The main WML Editor
*/
public class WMLEditor extends XtextEditor
{
private final static boolean DEBUG = false;
protected static final String AUTOLINK_PROJECT_NAME = "_AutoLinked_CFGExternalFiles_"; //$NON-NLS-1$
protected static final String ENCODING_UTF8 = "utf-8"; //$NON-NLS-1$
protected HighlightingHelper highlightingHelper_;
/**
* Creates a new WML Editor
*/
public WMLEditor( )
{
super( );
if( DEBUG ) {
org.apache.log4j.Logger.getLogger( XtextEditor.class ).setLevel(
Level.DEBUG );
}
// activate the wesnoth plugin
WesnothPlugin.getDefault( );
}
/**
* @return Returns the current {@link HighlightingHelper} instance
*/
public HighlightingHelper getHighlightingHelper( )
{
return highlightingHelper_;
}
@Override
public boolean equals( Object obj )
{
if( ( obj instanceof XtextEditor ) == false ) {
return false;
}
if( getEditorInput( ) == null
|| ( ( XtextEditor ) obj ).getEditorInput( ) == null ) {
return false;
}
java.net.URI u1 = ( ( IURIEditorInput ) getEditorInput( ) ).getURI( );
java.net.URI u2 = ( ( IURIEditorInput ) ( ( XtextEditor ) obj )
.getEditorInput( ) ).getURI( );
if( u1 == null || u2 == null ) {
return false;
}
return u1.toString( ).equals( u2.toString( ) );
}
/**
* Gets current edited file.
*
* @return An IFile instance
*/
public static IFile getActiveEditorFile( )
{
return getEditorFile( EditorUtils.getActiveXtextEditor( ) );
}
/**
* Gets the edited file from the specified editor
*
* @param editor
* The editor to get the file from
* @return An IFile instance
*/
public static IFile getEditorFile( XtextEditor editor )
{
if( editor == null ) {
return null;
}
return ( IFile ) editor.getEditorInput( ).getAdapter( IFile.class );
}
/**
* Here it comes the part that handles external files
* (from outside the workspace)
*
*/
/**
* Copyright (c) 2010, Cloudsmith Inc.
* The code, documentation and other materials contained herein have been
* licensed under the Eclipse Public License - v 1.0 by the copyright holder
* listed above, as the Initial Contributor under such license. The text of
* such license is available at www.eclipse.org.
*/
private void createLink( IProject project, IFile linkFile, java.net.URI uri )
throws CoreException
{
IPath path = linkFile.getFullPath( );
IPath folders = path.removeLastSegments( 1 ).removeFirstSegments( 1 );
IPath checkPath = Path.ROOT;
int segmentCount = folders.segmentCount( );
for( int i = 0; i < segmentCount; i++ ) {
checkPath = checkPath.addTrailingSeparator( ).append(
folders.segment( i ) );
IFolder folder = project.getFolder( checkPath );
if( ! folder.exists( ) ) {
folder.create( true, true, null );
}
}
linkFile.createLink( uri, IResource.ALLOW_MISSING_LOCAL, null );
}
@Override
public void dispose( )
{
// Unlink the input if it was linked
IEditorInput input = getEditorInput( );
if( input instanceof IFileEditorInput ) {
IFile file = ( ( IFileEditorInput ) input ).getFile( );
if( file.isLinked( ) ) {
file.getProject( ).getName( ).equals( AUTOLINK_PROJECT_NAME );
try {
// if the editor is disposed because workbench is shutting
// down, it is NOT a good
// idea to delete the link
if( PlatformUI.isWorkbenchRunning( )
&& ! PlatformUI.getWorkbench( ).isClosing( ) ) {
file.delete( true, null );
}
} catch( CoreException e ) {
// Nothing to do really, it will be recreated/refreshed
// later if ever used - some garbage may stay behind...
Logger.getInstance( ).logException( e );
}
}
}
super.dispose( );
}
private IFile getWorkspaceFile( IFileStore fileStore )
{
IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace( )
.getRoot( );
IFile[] files = workspaceRoot.findFilesForLocationURI( fileStore
.toURI( ) );
if( files != null && files.length == 1 ) {
return files[0];
}
return null;
}
/**
* Translates an incoming IEditorInput being an FilestoreEditorInput, or
* IURIEditorInput
* that is not also a IFileEditorInput.
* FilestoreEditorInput is used when opening external files in an IDE
* environment.
* The result is that the regular XtextEditor gets an IEFSEditorInput which
* is also an
* IStorageEditorInput.
*/
@Override
public void init( IEditorSite site, IEditorInput input )
throws PartInitException
{
// THE ISSUE HERE:
// In the IDE, the File Open Dialog (and elsewhere) uses a
// FilestoreEditorInput class
// which is an IDE specific implementation.
// The state at this point:
// 1. When creating a file, the IEditorInput is an IURIEditorInput
// 2. The only (non IDE specific) interface implemented by
// FilestoreEditorInput is IURIEditorInput
// 3. The creation of a file is however also an IFileEditorInput
//
// Remedy:
if( input instanceof IURIEditorInput
&& ! ( input instanceof IFileEditorInput ) ) {
java.net.URI uri = ( ( IURIEditorInput ) input ).getURI( );
String name = ( ( IURIEditorInput ) input ).getName( );
// Check if this is linkable input
if( uri.getScheme( ).equals( "file" ) ) { //$NON-NLS-1$
IFile linkedFile = obtainLink( uri );
IFileEditorInput linkedInput = new LinkedFileEditorInput(
linkedFile );
super.init( site, linkedInput );
}
else {
// use EMF URI (readonly) input - will open without validation
// though...
// (Could be improved, i.e. perform a download, make readonly,
// and keep in project,
// or stored in tmp, and processed as the other linked
// resources..
URIEditorInput uriInput = new URIEditorInput(
URI.createURI( uri.toString( ) ), name );
super.init( site, uriInput );
return;
}
return;
}
super.init( site, input );
}
/**
* Throws WrappedException - the URI must refer to an existing file!
*
* @param uri
* @return
*/
private IFile obtainLink( java.net.URI uri )
{
try {
IWorkspace ws = ResourcesPlugin.getWorkspace( );
// get, or create project if non existing
IProject project = ws.getRoot( ).getProject( AUTOLINK_PROJECT_NAME );
boolean newProject = false;
if( ! project.exists( ) ) {
project.create( null );
newProject = true;
}
if( ! project.isOpen( ) ) {
project.open( null );
project.setHidden( true );
}
if( newProject ) {
project.setDefaultCharset( ENCODING_UTF8,
new NullProgressMonitor( ) );
}
// path in project that is the same as the external file's path
IFile linkFile = project.getFile( uri.getPath( ) );
if( linkFile.exists( ) ) {
linkFile.refreshLocal( 1, null ); // don't know if needed (or
}
else {
// create the link
createLink( project, linkFile, uri );
// linkFile.createLink(uri, IResource.ALLOW_MISSING_LOCAL,
// null);
}
return linkFile;
// IPath location = new Path(name);
// IFile file = project.getFile(location.lastSegment());
// file.createLink(location, IResource.NONE, null);
} catch( CoreException e ) {
throw new WrappedException( e );
}
}
// SaveAs support for linked files - saves them on local disc, not to
// workspace if file is in special
// hidden external file link project.
@Override
protected void performSaveAs( IProgressMonitor progressMonitor )
{
Shell shell = getSite( ).getShell( );
final IEditorInput input = getEditorInput( );
// Customize save as if the file is linked, and it is in the special
// external link project
//
if( input instanceof IFileEditorInput
&& ( ( IFileEditorInput ) input ).getFile( ).isLinked( )
&& ( ( IFileEditorInput ) input ).getFile( ).getProject( )
.getName( ).equals( AUTOLINK_PROJECT_NAME ) ) {
final IEditorInput newInput;
IDocumentProvider provider = getDocumentProvider( );
FileDialog dialog = new FileDialog( shell, SWT.SAVE );
IPath oldPath = URIUtil.toPath( ( ( IURIEditorInput ) input )
.getURI( ) );
if( oldPath != null ) {
dialog.setFileName( oldPath.lastSegment( ) );
dialog.setFilterPath( oldPath.toOSString( ) );
}
dialog.setFilterExtensions( new String[] { "*.b3", "*.*" } ); //$NON-NLS-1$ //$NON-NLS-2$
String path = dialog.open( );
if( path == null ) {
if( progressMonitor != null ) {
progressMonitor.setCanceled( true );
}
return;
}
// Check whether file exists and if so, confirm overwrite
final File localFile = new File( path );
if( localFile.exists( ) ) {
MessageDialog overwriteDialog = new MessageDialog( shell,
Messages.WMLEditor_0, null,
path + Messages.WMLEditor_1, MessageDialog.WARNING,
new String[] { IDialogConstants.YES_LABEL,
IDialogConstants.NO_LABEL }, 1 ); // 'No' is the
// default
if( overwriteDialog.open( ) != Window.OK ) {
if( progressMonitor != null ) {
progressMonitor.setCanceled( true );
return;
}
}
}
IFileStore fileStore;
try {
fileStore = EFS.getStore( localFile.toURI( ) );
} catch( CoreException ex ) {
Logger.getInstance( ).logException( ex );
String title = Messages.WMLEditor_2;
String msg = Messages.WMLEditor_3 + ex.getMessage( );
MessageDialog.openError( shell, title, msg );
return;
}
IFile file = getWorkspaceFile( fileStore );
if( file != null ) {
newInput = new FileEditorInput( file );
}
else {
IURIEditorInput uriInput = new FileStoreEditorInput( fileStore );
java.net.URI uri = uriInput.getURI( );
IFile linkedFile = obtainLink( uri );
newInput = new FileEditorInput( linkedFile );
}
if( provider == null ) {
// editor has programmatically been closed while the dialog was
// open
return;
}
boolean success = false;
try {
provider.aboutToChange( newInput );
provider.saveDocument( progressMonitor, newInput,
provider.getDocument( input ), true );
success = true;
} catch( CoreException x ) {
Logger.getInstance( ).logException( x );
final IStatus status = x.getStatus( );
if( status == null || status.getSeverity( ) != IStatus.CANCEL ) {
String title = Messages.WMLEditor_4;
String msg = Messages.WMLEditor_5 + x.getMessage( );
MessageDialog.openError( shell, title, msg );
}
} finally {
provider.changed( newInput );
if( success ) {
setInput( newInput );
}
}
if( progressMonitor != null ) {
progressMonitor.setCanceled( ! success );
}
return;
}
super.performSaveAs( progressMonitor );
}
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.editor;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.XtextSourceViewer;
import org.eclipse.xtext.ui.editor.syntaxcoloring.HighlightingHelper;
/**
* Custom helper for our editor, so we can get an instance attached to
* our editor
*/
public class WMLHighlightingHelper extends HighlightingHelper
{
@Override
public void install( XtextEditor editor, XtextSourceViewer sourceViewer )
{
super.install( editor, sourceViewer );
// set the highlighting helper in our editor
// so we can access the highlightingReconcilier in order
// to be able to refresh the semantic highlighting
if( editor instanceof WMLEditor ) {
( ( WMLEditor ) editor ).highlightingHelper_ = this;
}
}
}

View file

@ -1,82 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.folding;
import com.google.inject.Inject;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.xtext.resource.ILocationInFileProvider;
import org.eclipse.xtext.ui.editor.folding.DefaultFoldingRegionProvider;
import org.eclipse.xtext.ui.editor.folding.IFoldingRegionAcceptor;
import org.eclipse.xtext.util.ITextRegion;
import org.wesnoth.wml.WMLKey;
import org.wesnoth.wml.WMLMacroDefine;
import org.wesnoth.wml.WMLPreprocIF;
import org.wesnoth.wml.WMLTextdomain;
/**
* Helper for providing correct folding regions
*/
public class WMLFoldingRegionProvider extends DefaultFoldingRegionProvider
{
@Inject
private ILocationInFileProvider locationInFileProvider;
@Override
protected boolean isHandled( EObject eObject )
{
if( eObject instanceof WMLTextdomain ) {
return false;
}
else if( eObject instanceof WMLKey ) {
WMLKey key = ( WMLKey ) eObject;
if( ! key.getEol( ).isEmpty( ) ) {
return false;
}
}
return super.isHandled( eObject );
}
@Override
protected void computeObjectFolding( EObject eObject,
IFoldingRegionAcceptor< ITextRegion > foldingRegionAcceptor )
{
// copied from "DefaultFoldingRegionProvider
ITextRegion region = locationInFileProvider.getFullTextRegion( eObject );
if( region != null ) {
ITextRegion significant = locationInFileProvider
.getSignificantTextRegion( eObject );
if( significant == null ) {
throw new NullPointerException(
"significant region may not be null" );
}
int offset = region.getOffset( );
int length = region.getLength( );
String endName = "";
if( eObject instanceof WMLPreprocIF ) {
endName = ( ( WMLPreprocIF ) eObject ).getEndName( );
}
else if( eObject instanceof WMLMacroDefine ) {
endName = ( ( WMLMacroDefine ) eObject ).getEndName( );
}
if( endName.endsWith( "\r\n" ) ) {
length -= 2;
}
else if( endName.endsWith( "\n" ) ) {
--length;
}
foldingRegionAcceptor.accept( offset, length, significant );
}
}
}

View file

@ -1,28 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.hover;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.xtext.ui.editor.hover.html.DefaultEObjectHoverProvider;
/**
* Class that prevents the Quick Hover Info to be presented to the user.
* WMLDoc is enough for now
*/
public class WMLEObjectHoverProvider extends DefaultEObjectHoverProvider
{
@Override
public IInformationControlCreatorProvider getHoverInfo( EObject object,
ITextViewer viewer, IRegion region )
{
return null;
}
}

View file

@ -1,35 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling;
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
*/
public class WMLDescriptionLabelProvider extends
DefaultDescriptionLabelProvider
{
/*
* //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";
* }
*/
}

View file

@ -1,62 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling;
import com.google.inject.Inject;
import java.util.Locale;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.xtext.ui.editor.model.XtextDocument;
import org.eclipse.xtext.ui.label.DefaultEObjectLabelProvider;
/**
* Provides labels for a EObjects.
*
* see
* http://www.eclipse.org/Xtext/documentation/latest/xtext.html#labelProvider
*/
public class WMLLabelProvider extends DefaultEObjectLabelProvider
{
/**
* Creates a new {@link WMLLabelProvider}
*
* @param delegate
* An {@link AdapterFactoryLabelProvider} instance
*/
@Inject
public WMLLabelProvider( AdapterFactoryLabelProvider delegate )
{
super( delegate );
}
@Override
protected Object doGetImage( Object element )
{
if( element instanceof EClass ) {
return ( ( EClass ) element ).getName( ).toLowerCase(
Locale.ENGLISH ) + ".png"; //$NON-NLS-1$
}
else if( element instanceof String ) {
return element;
}
return super.doGetImage( element );
}
@Override
public String getText( Object element )
{
if( element instanceof XtextDocument ) {
return "Document";
}
return super.getText( element );
}
}

View file

@ -1,51 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling.wmldoc;
import org.eclipse.swt.custom.StyleRange;
/**
* An interface used to provide WML documentation
*/
public interface IWMLDocProvider
{
/**
* Gets the title of the wmldoc dialog
*
* @return
* Gets the title of the wmldoc dialog
*/
public String getTitle( );
/**
* Gets the text to be written in the info statusbar
*
* @return
* Gets the text to be written in the info statusbar
*/
public String getInfoText( );
/**
* Gets the contents to be written into the
* styledtext control of the wmldoc dialog
*
* @return
* Gets the contents to be written into the
* styledtext control of the wmldoc dialog
*/
public String getContents( );
/**
* Gets an array of StyleRange used to style the contents
*
* @return
* Gets an array of StyleRange used to style the contents
*/
public StyleRange[] getStyleRanges( );
}

View file

@ -1,101 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling.wmldoc;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.swt.graphics.Point;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.XtextEditor;
import org.eclipse.xtext.ui.editor.utils.EditorUtils;
import org.eclipse.xtext.util.concurrent.IUnitOfWork;
import org.wesnoth.Logger;
import org.wesnoth.installs.WesnothInstallsUtils;
import org.wesnoth.preprocessor.Define;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.ui.editor.WMLEditor;
import org.wesnoth.utils.WMLUtils;
import org.wesnoth.wml.WMLMacroCall;
import org.wesnoth.wml.WMLTag;
/**
* A handler that handles pressing F2 on a resource in the editor
*/
public class WMLDocHandler extends AbstractHandler
{
@Override
public Object execute( ExecutionEvent event ) throws ExecutionException
{
try {
final XtextEditor editor = EditorUtils.getActiveXtextEditor( event );
final IFile editedFile = WMLEditor.getEditorFile( editor );
final String installName = WesnothInstallsUtils
.getInstallNameForResource( editedFile );
editor.getDocument( ).readOnly(
new IUnitOfWork.Void< XtextResource >( ) {
@Override
public void process( XtextResource resource )
throws Exception
{
ITextSelection selection = ( ITextSelection ) editor
.getSelectionProvider( ).getSelection( );
Point positionRelative = editor
.getInternalSourceViewer( )
.getTextWidget( )
.getLocationAtOffset( selection.getOffset( ) );
Point positionAbsolute = editor
.getInternalSourceViewer( ).getTextWidget( )
.toDisplay( positionRelative );
positionAbsolute.y += 20;
EObject grammarElement = WMLUtils.resolveElementAt(
resource, selection.getOffset( ) );
if( grammarElement == null ) {
return;
}
if( grammarElement instanceof WMLMacroCall ) {
WMLMacroCall macro = ( WMLMacroCall ) grammarElement;
Define define = ProjectUtils
.getCacheForProject(
editedFile.getProject( ) )
.getDefines( ).get( macro.getName( ) );
if( define != null ) {
WMLDocInformationPresenter presenter = new WMLDocInformationPresenter(
editor.getSite( ).getShell( ),
new WMLDocMacro( define ),
positionAbsolute );
presenter.create( );
presenter.open( );
}
}
else if( grammarElement instanceof WMLTag ) {
WMLDocInformationPresenter presenter = new WMLDocInformationPresenter(
editor.getSite( ).getShell( ),
new WMLDocTag( editedFile, installName,
( ( WMLTag ) grammarElement )
.getName( ) ),
positionAbsolute );
presenter.create( );
presenter.open( );
}
}
} );
} catch( Exception e ) {
Logger.getInstance( ).logException( e );
}
return null;
}
}

View file

@ -1,89 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling.wmldoc;
import org.eclipse.jface.dialogs.PopupDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;
/**
* Presents WMLDoc to the user
*/
public class WMLDocInformationPresenter extends PopupDialog
{
private Point bounds_;
private IWMLDocProvider currentDocProvider_;
private Composite panel_;
/**
* Creates a new WMLDocumentation information presenter
*
* @param parent
* The parent shell
* @param docProvider
* The WMLDoc provider
* @param bounds
* The bounds of the presented dialog
*/
public WMLDocInformationPresenter( Shell parent,
IWMLDocProvider docProvider, Point bounds )
{
super( parent, PopupDialog.INFOPOPUPRESIZE_SHELLSTYLE, true, true,
true, false, false, docProvider.getTitle( ), docProvider
.getInfoText( ) );
bounds_ = bounds;
currentDocProvider_ = docProvider;
}
@Override
protected Control createDialogArea( Composite parent )
{
panel_ = new Composite( parent, SWT.None );
panel_.setBackground( parent.getDisplay( ).getSystemColor(
SWT.COLOR_INFO_BACKGROUND ) );
panel_.setForeground( parent.getDisplay( ).getSystemColor(
SWT.COLOR_INFO_FOREGROUND ) );
GridLayout grid = new GridLayout( );
grid.numColumns = 5;
panel_.setLayout( grid );
StyledText text = new StyledText( panel_, SWT.NONE );
text.setText( currentDocProvider_.getContents( ) );
text.setEditable( false );
text.setStyleRanges( currentDocProvider_.getStyleRanges( ) );
text.setLayoutData( createDefaultGridData( 4 ) );
return panel_;
}
private GridData createDefaultGridData( int columnspan )
{
GridData gd = new GridData( );
gd.horizontalSpan = columnspan;
gd.verticalAlignment = SWT.BEGINNING;
gd.verticalIndent = 0;
gd.horizontalIndent = 5;
return gd;
}
@Override
protected Point getInitialLocation( Point initialSize )
{
return bounds_;
}
}

View file

@ -1,136 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling.wmldoc;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.widgets.Display;
import org.wesnoth.preprocessor.Define;
import org.wesnoth.ui.Messages;
/**
* Provides WMLDoc info for a macro
*/
public class WMLDocMacro implements IWMLDocProvider
{
private Define macro_;
private String title_;
private String contents_;
private List< StyleRange > styleRanges_;
private boolean docGenerated_;
/**
* Creates a new {@link WMLDocMacro}
*
* @param macro
* The associated {@link Define}
*/
public WMLDocMacro( Define macro )
{
macro_ = macro;
docGenerated_ = false;
}
/**
* A method used for lazly generating the documentation
*/
private void generateDoc( )
{
if( docGenerated_ ) {
return;
}
styleRanges_ = new ArrayList< StyleRange >( );
title_ = Messages.WMLDocMacro_0 + macro_.getName( );
StringBuilder content = new StringBuilder( );
content.append( Messages.WMLDocMacro_1 );
addStyleRange( 0, content.length( ) - 1, SWT.BOLD );
content.append( macro_.getValue( ) );
content.append( '\n' );
if( macro_.getArguments( ).isEmpty( ) == false ) {
int len = content.length( ) - 1;
content.append( Messages.WMLDocMacro_2 );
addStyleRange( len, content.length( ) - len - 1, SWT.BOLD );
len = content.length( ) - 1;
for( String arg: macro_.getArguments( ) ) {
content.append( '\t' + arg + '\n' );
}
addStyleRange( len, content.length( ) - len - 1, SWT.ITALIC );
}
contents_ = content.toString( );
docGenerated_ = true;
}
/**
* Adds a style range to current list
*
* @param offset
* @param length
* @param style
*/
private void addStyleRange( int offset, int length, int style )
{
styleRanges_.add( new StyleRange( offset, length, Display.getDefault( )
.getSystemColor( SWT.COLOR_INFO_FOREGROUND ), Display
.getDefault( ).getSystemColor( SWT.COLOR_INFO_BACKGROUND ),
style ) );
}
@Override
public String getTitle( )
{
generateDoc( );
return title_;
}
@Override
public String getContents( )
{
generateDoc( );
return contents_;
}
@Override
public StyleRange[] getStyleRanges( )
{
generateDoc( );
return styleRanges_.toArray( new StyleRange[styleRanges_.size( )] );
}
/**
* Gets the associated macro
*
* @return Gets the associated macro
*/
public Define getMacro( )
{
return macro_;
}
@Override
public String getInfoText( )
{
if( macro_.getLocation( ) == null ) {
return null;
}
return "Defined in: " + macro_.getLocation( ) + " : "
+ macro_.getLineNum( );
}
}

View file

@ -1,141 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.labeling.wmldoc;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IFile;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.widgets.Display;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.schema.SchemaParser;
import org.wesnoth.ui.Messages;
import org.wesnoth.wml.WMLTag;
import org.wesnoth.wml.WmlFactory2;
/**
* Displays wml doc for a tag [tag] or [/tag]
*/
public class WMLDocTag implements IWMLDocProvider
{
private WMLTag tag_;
private String title_;
private String contents_;
private List< StyleRange > styleRanges_;
private boolean docGenerated_;
/**
* Creates a new {@link WMLDocTag}
*
* @param currentFile
* The file where to create the doc on
* @param installName
* The installname used when creating the doc
* @param name
* The name of the tag to present
*/
public WMLDocTag( IFile currentFile, String installName, String name )
{
tag_ = SchemaParser.getInstance( installName ).getTags( ).get( name );
// try to get it from the Project Cache ( lua parsed ones )
if( tag_ == null ) {
tag_ = ProjectUtils.getCacheForProject( currentFile.getProject( ) )
.getWMLTags( ).get( name );
}
// Create a default one
if( tag_ == null ) {
tag_ = WmlFactory2.eINSTANCE.createWMLTag( name );
}
docGenerated_ = false;
}
/**
* A method used for lazly generating the documentation
*/
private void generateDoc( )
{
if( docGenerated_ ) {
return;
}
styleRanges_ = new ArrayList< StyleRange >( );
title_ = Messages.WMLDocTag_0 + tag_.getName( ) + "':"; //$NON-NLS-1$
contents_ = "No information";
if( ! tag_.get_Description( ).isEmpty( ) ) {
StringBuilder content = new StringBuilder( );
content.append( Messages.WMLDocTag_1 );
addStyleRange( 0, content.length( ) - 1, SWT.BOLD );
content.append( tag_.get_Description( ) );
contents_ = content.toString( );
}
docGenerated_ = true;
}
/**
* Adds a style range to current list
*
* @param offset
* @param length
* @param style
*/
private void addStyleRange( int offset, int length, int style )
{
styleRanges_.add( new StyleRange( offset, length, Display.getDefault( )
.getSystemColor( SWT.COLOR_INFO_FOREGROUND ), Display
.getDefault( ).getSystemColor( SWT.COLOR_INFO_BACKGROUND ),
style ) );
}
@Override
public String getTitle( )
{
generateDoc( );
return title_;
}
@Override
public String getInfoText( )
{
String infoText = "";
if( tag_.is_LuaBased( ) ) {
infoText += "[Lua tag] ";
}
if( ! tag_.get_DefinitionLocation( ).isEmpty( ) ) {
infoText += "Defined in: " + tag_.get_DefinitionLocation( );
infoText += " : " + tag_.get_DefinitionOffset( );
}
return infoText.isEmpty( ) ? null: infoText;
}
@Override
public String getContents( )
{
generateDoc( );
return contents_;
}
@Override
public StyleRange[] getStyleRanges( )
{
generateDoc( );
return styleRanges_.toArray( new StyleRange[styleRanges_.size( )] );
}
}

View file

@ -1,18 +0,0 @@
WMLDocMacro_0=Macro:
WMLDocMacro_1=Definition:\n
WMLDocMacro_2=Arguments:\n
WMLDocTag_0=Tag '
WMLDocTag_1=Description:\n
WMLEditor_0=Save As
WMLEditor_1=\ already exists.\nDo you want to replace it?
WMLEditor_2=Problems During Save As...
WMLEditor_3=Save could not be completed.
WMLEditor_4=Problems During Save As...
WMLEditor_5=Save could not be completed.
WMLHighlightingConfiguration_10=WML Matching Tag Highlight
WMLHighlightingConfiguration_11=WML Macro Define
WMLHighlightingConfiguration_12=WML IF
WMLHighlightingConfiguration_13=WML Textdomain
WMLHighlightingConfiguration_7=WML Tag
WMLHighlightingConfiguration_8=WML Key
WMLHighlightingConfiguration_9=WML Macro Call

View file

@ -1,86 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.navigation;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.texteditor.ITextEditor;
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink;
import org.wesnoth.utils.EditorUtils;
/**
* This is a hyperlink that opens a specified file
* and puts the cursor to specified location
*/
public class FileLocationOpenerHyperlink extends XtextHyperlink
{
private String filePath_;
private int linenum_;
@Override
public void open( )
{
IEditorPart part = EditorUtils.openEditor( filePath_ );
if( part != null ) {
ITextEditor editor = EditorUtils.getTextEditor( part );
IDocument doc = editor.getDocumentProvider( ).getDocument(
editor.getEditorInput( ) );
int offset = 0;
try {
// compute offset based on linenum_
offset = doc.getLineOffset( linenum_ );
} catch( BadLocationException e ) {
// ignore
}
EditorUtils.getTextEditor( part ).selectAndReveal( offset, 0 );
}
}
/**
* Sets the line number
*
* @param linenum
* The new line number
*/
public void setLinenumber( int linenum )
{
linenum_ = linenum;
}
/**
* @return The line number
*/
public int getLinenumber( )
{
return linenum_;
}
/**
* Sets the file path to open
*
* @param filePath
* The new path
*/
public void setFilePath( String filePath )
{
filePath_ = filePath;
}
/**
* @return The file path to open
*/
public String getFilePath( )
{
return filePath_;
}
}

View file

@ -1,74 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.navigation;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import org.eclipse.swt.SWT;
import org.eclipse.xtext.ui.editor.hyperlinking.XtextHyperlink;
import org.wesnoth.Logger;
import org.wesnoth.templates.TemplateProvider;
import org.wesnoth.utils.GUIUtils;
import org.wesnoth.utils.GameUtils;
/**
* A link that opens map files in the Wesnoth Map Editor
*/
public class MapOpenerHyperlink extends XtextHyperlink
{
private String location_;
/**
* Sets the location of the map to open
*
* @param location
* The new location
*/
public void setLocation( String location )
{
location_ = location;
}
/**
* @return The location of the map to open
*/
public String getLocation( )
{
return location_;
}
@Override
public void open( )
{
if( ! new File( location_ ).exists( ) ) {
if( GUIUtils
.showMessageBox(
"The map doesn't exist. Do you want to create a default one and open that?",
SWT.YES | SWT.NO ) == SWT.NO ) {
return;
}
// go ahead, create the map
FileWriter writer;
try {
writer = new FileWriter( location_ );
writer.write( TemplateProvider.getInstance( ).getTemplate(
"map" ) );
writer.close( );
} catch( IOException e ) {
Logger.getInstance( ).logException( e );
}
}
GameUtils.startEditor( location_ );
}
}

View file

@ -1,181 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.navigation;
import org.eclipse.core.resources.IFile;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.Region;
import org.eclipse.xtext.nodemodel.ICompositeNode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.hyperlinking.HyperlinkHelper;
import org.eclipse.xtext.ui.editor.hyperlinking.IHyperlinkAcceptor;
import org.wesnoth.Logger;
import org.wesnoth.installs.WesnothInstallsUtils;
import org.wesnoth.preferences.Preferences;
import org.wesnoth.preferences.Preferences.Paths;
import org.wesnoth.preprocessor.Define;
import org.wesnoth.projects.ProjectUtils;
import org.wesnoth.ui.editor.WMLEditor;
import org.wesnoth.utils.WMLUtils;
import org.wesnoth.wml.WMLKey;
import org.wesnoth.wml.WMLMacroCall;
/**
* Helper that creates hyperlinks at the offset if needed
*/
public class WMLHyperlinkHelper extends HyperlinkHelper
{
@Override
public void createHyperlinksByOffset( XtextResource resource, int offset,
IHyperlinkAcceptor acceptor )
{
super.createHyperlinksByOffset( resource, offset, acceptor );
EObject object = WMLUtils.resolveElementAt( resource, offset );
if( object == null ) {
return;
}
IFile file = WMLEditor.getActiveEditorFile( );
if( file == null ) {
Logger.getInstance( ).logError(
"FATAL! file is null (and it shouldn't) " );
return;
}
Paths paths = Preferences.getPaths( WesnothInstallsUtils
.getInstallNameForResource( file ) );
ICompositeNode node = NodeModelUtils.getNode( object );
createMapHyperlink( paths, object, acceptor, node );
createMacroHyperlink( paths, file, object, acceptor, node );
}
/**
* Creates a hyperlink for opening the macro definition
*
* @param paths
* The paths variable for the current install
* @param file
* The current edited file
* @param object
* The current object
* @param acceptor
* The hyperlink acceptor
* @param node
* The node model representation of the macro
*/
private void createMacroHyperlink( Paths paths, IFile file, EObject object,
IHyperlinkAcceptor acceptor, ICompositeNode node )
{
if( object instanceof WMLMacroCall == false ) {
return;
}
WMLMacroCall macro = ( WMLMacroCall ) object;
// get the define for the macro
Define define = ProjectUtils.getCacheForProject( file.getProject( ) )
.getDefines( ).get( macro.getName( ) );
if( define == null || define.getLocation( ).length( ) <= 2 ) {
return;
}
String filePath = define.getLocation( );
if( filePath.charAt( 0 ) == '~' ) {
// expand the '~' character to user data dir
filePath = filePath.replaceFirst( "~", paths.getUserDataDir( ) );
}
else if( filePath.startsWith( "core/" ) ) {
// expand the data/core path
filePath = filePath.replaceFirst( "core/", paths.getCoreDir( ) );
}
FileLocationOpenerHyperlink macroTarget = new FileLocationOpenerHyperlink( );
macroTarget.setHyperlinkRegion( new Region( node.getOffset( ), node
.getLength( ) ) );
macroTarget.setFilePath( filePath );
macroTarget.setLinenumber( define.getLineNum( ) );
acceptor.accept( macroTarget );
}
/**
* Creates a hyperlink for opening the map ( if applying )
*
* @param paths
* The paths variable for the current install
* @param object
* The current object
* @param acceptor
* The hyperlink acceptor
* @param node
* The node model representation of the macro
*/
private void createMapHyperlink( Paths paths, EObject object,
IHyperlinkAcceptor acceptor, ICompositeNode node )
{
EObject container = object.eContainer( );
if( ! ( container instanceof WMLKey )
|| ! ( ( WMLKey ) container ).getName( ).equals( "map_data" ) ) {
return;
}
String mapLocation = node.getText( );
// too few characters
if( mapLocation.length( ) <= 2 ) {
return;
}
// trim the " and the { (if any exist)
int indexStart = 0;
int indexEnd = 0;
if( mapLocation.charAt( 0 ) == '"' ) {
indexStart = 1;
if( mapLocation.charAt( 1 ) == '{' ) {
indexStart = 2;
}
}
if( mapLocation.charAt( mapLocation.length( ) - 1 ) == '"' ) {
indexEnd = mapLocation.length( ) - 1;
if( mapLocation.charAt( mapLocation.length( ) - 2 ) == '}' ) {
indexEnd = mapLocation.length( ) - 2;
}
}
mapLocation = mapLocation.substring( indexStart, indexEnd );
if( mapLocation.charAt( 0 ) == '~' ) {
// expand the '~' character to user data dir
mapLocation = mapLocation
.replaceFirst( "~", paths.getUserDataDir( ) );
}
else if( mapLocation.startsWith( "campaigns/" ) ) {
// expand the campaigns path
mapLocation = mapLocation.replaceFirst( "campaigns/",
paths.getCampaignDir( ) );
}
MapOpenerHyperlink hyperlink = new MapOpenerHyperlink( );
hyperlink.setHyperlinkRegion( new Region( node.getOffset( ), node
.getLength( ) ) );
hyperlink.setLocation( mapLocation );
acceptor.accept( hyperlink );
}
}

View file

@ -1,24 +0,0 @@
/*
* generated by Xtext
*/
package org.wesnoth.ui.outline;
import org.eclipse.xtext.ui.editor.outline.impl.DefaultOutlineTreeProvider;
import org.wesnoth.wml.WMLRoot;
/**
* customization of the default outline structure
*
*/
public class WMLOutlineTreeProvider extends DefaultOutlineTreeProvider
{
@Override
protected Object _text( Object modelElement )
{
if( modelElement instanceof WMLRoot ) {
return "Root";
}
return super._text( modelElement );
}
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.quickfix;
import org.eclipse.xtext.ui.editor.quickfix.DefaultQuickfixProvider;
/**
*
*/
public class WMLQuickfixProvider extends DefaultQuickfixProvider
{
// @Fix(MyJavaValidator.INVALID_NAME)
// public void capitalizeName(final Issue issue, IssueResolutionAcceptor
// acceptor) {
// acceptor.accept(issue, "Capitalize name", "Capitalize the name.",
// "upcase.png", new IModification() {
// public void apply(IModificationContext context) throws
// BadLocationException {
// IXtextDocument xtextDocument = context.getXtextDocument();
// String firstLetter = xtextDocument.get(issue.getOffset(), 1);
// xtextDocument.replace(issue.getOffset(), 1, firstLetter.toUpperCase());
// }
// });
// }
}

View file

@ -1,34 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.syntax;
import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultAntlrTokenToAttributeIdMapper;
/**
*
*/
public class WMLAntlrTokenToAttributeIdMapper extends
DefaultAntlrTokenToAttributeIdMapper
{
@Override
protected String calculateId( String tokenName, int tokenType )
{
if( tokenName.equals( "'+'" ) || tokenName.equals( "'['" )
|| tokenName.equals( "'[/'" ) || tokenName.equals( "']'" ) ) //$NON-NLS-1$ //$NON-NLS-2$
{
return WMLHighlightingConfiguration.RULE_WML_TAG;
}
if( tokenName.equals( "'~'" ) || tokenName.equals( "'{'" )
|| tokenName.equals( "'}'" ) ) //$NON-NLS-1$
{
return WMLHighlightingConfiguration.RULE_WML_MACRO_CALL;
}
return super.calculateId( tokenName, tokenType );
}
}

View file

@ -1,128 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.syntax;
import java.util.Iterator;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.source.DefaultCharacterPairMatcher;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.model.XtextDocument;
import org.eclipse.xtext.ui.editor.utils.EditorUtils;
import org.eclipse.xtext.util.concurrent.IUnitOfWork;
import org.wesnoth.ui.editor.WMLEditor;
import org.wesnoth.utils.WMLUtils;
import org.wesnoth.wml.WMLTag;
/**
* The class uses the character pair matcher to implement the
* start/end tag matching
*/
public class WMLCharacterPairMatcher extends DefaultCharacterPairMatcher
{
private WMLTag currentTag_;
private int matchCnt = 0;
/**
* Creates a new {@link WMLCharacterPairMatcher}
*
* @param chars
* The chars to match
*/
public WMLCharacterPairMatcher( char[] chars )
{
super( chars );
currentTag_ = null;
}
@Override
public IRegion match( IDocument doc, final int offset )
{
++matchCnt;
IRegion region = super.match( doc, offset );
if( region == null && doc instanceof XtextDocument
&& doc.getLength( ) > 0 ) {
if( matchCnt == 2 ) {
matchCnt = 0;
}
else {
( ( XtextDocument ) doc )
.readOnly( new IUnitOfWork< Boolean, XtextResource >( ) {
@Override
public Boolean exec( XtextResource state )
throws Exception
{
computeMatchingRegion( state, offset );
return true;
}
} );
// refresh the highlighting
WMLEditor currentEditor = ( WMLEditor ) EditorUtils
.getActiveXtextEditor( );
if( currentEditor != null
&& currentEditor.getHighlightingHelper( ) != null
&& currentEditor.getHighlightingHelper( )
.getReconciler( ) != null ) {
currentEditor.getHighlightingHelper( ).getReconciler( )
.refresh( );
}
}
}
return region;
}
private synchronized void computeMatchingRegion( XtextResource state,
int offset )
{
EObject object = WMLUtils.resolveElementAt( state, offset );
// do nothing if we clicked the same tag
if( currentTag_ == object ) {
return;
}
if( object instanceof WMLTag ) {
WMLTag tag = ( WMLTag ) object;
currentTag_ = tag;
for( Adapter adapter: state.eAdapters( ) ) {
if( adapter instanceof WMLSyntaxColoringAdapter ) {
( ( WMLSyntaxColoringAdapter ) adapter ).TargetEObject = object;
return; // done here
}
}
state.eAdapters( )
.add( new WMLSyntaxColoringAdapter(
WMLHighlightingConfiguration.RULE_MATCH_TAG, object ) );
}
else {
// nothing new selected, just remove current adapter
Iterator< Adapter > itor = state.eAdapters( ).iterator( );
while( itor.hasNext( ) ) {
if( itor.next( ) instanceof WMLSyntaxColoringAdapter ) {
itor.remove( );
break;
}
}
currentTag_ = null;
}
}
}

View file

@ -1,119 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.syntax;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.RGB;
import org.eclipse.xtext.ui.editor.syntaxcoloring.DefaultHighlightingConfiguration;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightingConfigurationAcceptor;
import org.eclipse.xtext.ui.editor.utils.TextStyle;
import org.wesnoth.ui.Messages;
/**
* Configures part of the WML highlighting
*/
public class WMLHighlightingConfiguration extends
DefaultHighlightingConfiguration
{
/**
* Coloring for WML Tags
*/
public static final String RULE_WML_TAG = "wmlTag"; //$NON-NLS-1$
/**
* Coloring for WML Keys
*/
public static final String RULE_WML_KEY = "wmlKey"; //$NON-NLS-1$
/**
* Coloring for WML Macro Calls
*/
public static final String RULE_WML_MACRO_CALL = "wmlMacroCall"; //$NON-NLS-1$
/**
* Coloring for WML Macro definitions
*/
public static final String RULE_WML_MACRO_DEFINE = "wmlMacroDefine"; //$NON-NLS-1$
/**
* Coloring for WML preprocessor if
*/
public static final String RULE_WML_IF = "wmlIF"; //$NON-NLS-1$
/**
* Coloring for WML Textdomain definitions
*/
public static final String RULE_WML_TEXTDOMAIN = "wmlTextdomain"; //$NON-NLS-1$
/**
* Coloring for start/end tag match
*/
public static final String RULE_MATCH_TAG = "wmlMatchTag"; //$NON-NLS-1$
@Override
public void configure( IHighlightingConfigurationAcceptor acceptor )
{
super.configure( acceptor );
acceptor.acceptDefaultHighlighting( RULE_WML_TAG,
Messages.WMLHighlightingConfiguration_7, tagTextStyle( ) );
acceptor.acceptDefaultHighlighting( RULE_WML_KEY,
Messages.WMLHighlightingConfiguration_8, keyTextStyle( ) );
acceptor.acceptDefaultHighlighting( RULE_WML_MACRO_CALL,
Messages.WMLHighlightingConfiguration_9, macroTextStyle( ) );
acceptor.acceptDefaultHighlighting( RULE_MATCH_TAG,
Messages.WMLHighlightingConfiguration_10, startEndTextStyle( ) );
// preproc
acceptor.acceptDefaultHighlighting( RULE_WML_MACRO_DEFINE,
Messages.WMLHighlightingConfiguration_11, preprocTextStyle( ) );
acceptor.acceptDefaultHighlighting( RULE_WML_IF,
Messages.WMLHighlightingConfiguration_12, preprocTextStyle( ) );
acceptor.acceptDefaultHighlighting( RULE_WML_TEXTDOMAIN,
Messages.WMLHighlightingConfiguration_13, preprocTextStyle( ) );
}
private TextStyle preprocTextStyle( )
{
TextStyle textStyle = defaultTextStyle( ).copy( );
textStyle.setColor( new RGB( 31, 209, 241 ) );
textStyle.setStyle( SWT.BOLD );
return textStyle;
}
private TextStyle macroTextStyle( )
{
TextStyle textStyle = defaultTextStyle( ).copy( );
textStyle.setColor( new RGB( 197, 137, 23 ) );
textStyle.setStyle( SWT.ITALIC );
return textStyle;
}
private TextStyle startEndTextStyle( )
{
TextStyle textStyle = defaultTextStyle( ).copy( );
textStyle.setColor( new RGB( 128, 128, 128 ) );
textStyle.setBackgroundColor( new RGB( 128, 0, 0 ) );
textStyle.setStyle( SWT.BOLD | SWT.ITALIC );
return textStyle;
}
private TextStyle tagTextStyle( )
{
TextStyle textStyle = defaultTextStyle( ).copy( );
textStyle.setColor( new RGB( 128, 0, 0 ) );
textStyle.setStyle( SWT.BOLD );
return textStyle;
}
private TextStyle keyTextStyle( )
{
TextStyle textStyle = defaultTextStyle( ).copy( );
textStyle.setColor( new RGB( 0, 128, 128 ) );
textStyle.setStyle( SWT.BOLD );
return textStyle;
}
}

View file

@ -1,189 +0,0 @@
/*******************************************************************************
* Copyright (c) 2010 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.syntax;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.xtext.nodemodel.ILeafNode;
import org.eclipse.xtext.nodemodel.INode;
import org.eclipse.xtext.nodemodel.util.NodeModelUtils;
import org.eclipse.xtext.resource.XtextResource;
import org.eclipse.xtext.ui.editor.syntaxcoloring.IHighlightedPositionAcceptor;
import org.eclipse.xtext.ui.editor.syntaxcoloring.ISemanticHighlightingCalculator;
import org.wesnoth.utils.Pair;
import org.wesnoth.wml.WMLKey;
import org.wesnoth.wml.WMLMacroCall;
import org.wesnoth.wml.WMLMacroDefine;
import org.wesnoth.wml.WMLPreprocIF;
import org.wesnoth.wml.WMLTag;
import org.wesnoth.wml.WMLTextdomain;
import org.wesnoth.wml.WmlPackage;
/**
* Highlights the WML code semantically
*/
public class WMLSemanticHighlightingCalculator implements
ISemanticHighlightingCalculator
{
@Override
public void provideHighlightingFor( XtextResource resource,
IHighlightedPositionAcceptor acceptor )
{
if( resource == null ) {
return;
}
Iterator< EObject > iter = EcoreUtil.getAllContents( resource, true );
while( iter.hasNext( ) ) {
EObject current = iter.next( );
List< Pair< INode, String > > toColor = new ArrayList< Pair< INode, String > >( );
if( current instanceof WMLTag ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_TAG ) );
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_TAG__END_NAME ),
WMLHighlightingConfiguration.RULE_WML_TAG ) );
}
else if( current instanceof WMLKey ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_KEY ) );
}
else if( current instanceof WMLMacroCall ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_MACRO_CALL ) );
}
else if( current instanceof WMLTextdomain ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_TEXTDOMAIN ) );
}
else if( current instanceof WMLPreprocIF ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_IF ) );
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_PREPROC_IF__ELSES ),
WMLHighlightingConfiguration.RULE_WML_IF ) );
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_PREPROC_IF__END_NAME ),
WMLHighlightingConfiguration.RULE_WML_IF ) );
}
else if( current instanceof WMLMacroDefine ) {
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_EXPRESSION__NAME ),
WMLHighlightingConfiguration.RULE_WML_MACRO_DEFINE ) );
toColor.add( Pair.create(
getFirstFeatureNode( current,
WmlPackage.Literals.WML_MACRO_DEFINE__END_NAME ),
WMLHighlightingConfiguration.RULE_WML_MACRO_DEFINE ) );
}
// check if we have any information specific information for
// highlighting
for( Adapter adapter: resource.eAdapters( ) ) {
if( adapter instanceof WMLSyntaxColoringAdapter ) {
WMLSyntaxColoringAdapter wmlAdapter = ( WMLSyntaxColoringAdapter ) adapter;
if( wmlAdapter.TargetEObject == current ) {
for( Pair< INode, String > pair: toColor ) {
pair.Second = wmlAdapter.ColorId;
}
}
break;
}
}
for( Pair< INode, String > pair: toColor ) {
highlightNode( pair.First, pair.Second, acceptor );
}
}
}
/**
* Copied from org.eclipse.xtext.xtext.ui.editor.syntaxcoloring.
* SemanticHighlightingCalculator
*
* @param node
* The node to highlight
* @param id
* The id of the coloring
* @param acceptor
* The acceptor to add the node to
*/
private void highlightNode( INode node, String id,
IHighlightedPositionAcceptor acceptor )
{
if( node == null ) {
return;
}
if( node instanceof ILeafNode ) {
acceptor.addPosition( node.getOffset( ), node.getLength( ), id );
}
else {
for( ILeafNode leaf: node.getLeafNodes( ) ) {
if( ! leaf.isHidden( ) ) {
acceptor.addPosition( leaf.getOffset( ), leaf.getLength( ),
id );
}
}
}
}
/**
* Copied from org.eclipse.xtext.xtext.ui.editor.syntaxcoloring.
* SemanticHighlightingCalculator
*
* @param semantic
* The object to search in
* @param feature
* The feature to search for
* @return Null if there is no feature, or an {@link INode} node
*/
public INode getFirstFeatureNode( EObject semantic,
EStructuralFeature feature )
{
if( feature == null ) {
return NodeModelUtils.findActualNodeFor( semantic );
}
List< INode > nodes = NodeModelUtils.findNodesForFeature( semantic,
feature );
if( ! nodes.isEmpty( ) ) {
return nodes.get( 0 );
}
return null;
}
}

View file

@ -1,43 +0,0 @@
/*******************************************************************************
* Copyright (c) 2011 - 2013 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
* http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.wesnoth.ui.syntax;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.ecore.EObject;
/**
* A simple WML adapter that holds a coloring id on the specified resource
*/
public class WMLSyntaxColoringAdapter extends AdapterImpl
{
/**
* A color id from the
* {@link org.wesnoth.ui.syntax.WMLHighlightingConfiguration}
*/
public String ColorId;
/**
* The object to color
*/
public EObject TargetEObject;
/**
* Creates a new {@link WMLSyntaxColoringAdapter}
*
* @param id
* The color id defined in WMLHighlightingConfiguration
* @param target
* The {@link EObject} to color
*/
public WMLSyntaxColoringAdapter( String id, EObject target )
{
ColorId = id;
TargetEObject = target;
}
}

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<templates>
<template
id="wml.templates.author"
name="author"
description="author name"
context="WMLRoot"
enabled="true">#author ${user}</template>
</templates>

View file

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="org/eclipse/xtext/builder/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,40 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.wesnoth</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtext.ui.shared.xtextBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.xtend.shared.ui.xtendBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.xtext.ui.shared.xtextNature</nature>
<nature>org.eclipse.xtend.shared.ui.xtendXPandNature</nature>
</natures>
</projectDescription>

View file

@ -1,3 +0,0 @@
#Fri Aug 05 17:21:14 EEST 2011
eclipse.preferences.version=1
line.separator=\n

Some files were not shown because too many files have changed in this diff Show more