diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ba7400c --- /dev/null +++ b/.gitignore @@ -0,0 +1,15 @@ +/.workspace/ +/.metadata/ +/junit-workspace + +/builder/*.log + +/product/*/bin/ +/product/xFind/*/bin/ + +/tests/search/sandbox/ +/tests/parser/recognizer/reports/ + +/tests/parser/recognizer/reports/ +/tests/debugger/sandbox/ +/localization/ \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d2a90af --- /dev/null +++ b/LICENSE @@ -0,0 +1,229 @@ +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. diff --git a/builder/allElements.xml b/builder/allElements.xml new file mode 100644 index 0000000..bd5d202 --- /dev/null +++ b/builder/allElements.xml @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/builder/build-xds-ide.xml b/builder/build-xds-ide.xml new file mode 100644 index 0000000..03b2807 --- /dev/null +++ b/builder/build-xds-ide.xml @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + properties.put('repoUri', new File(properties["repo"]).toURI()); + properties.put('categoryXmlUri', new File(properties["categoryXml"]).toURI()); + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.eclipse.help/HELP_DATA=PLUGINS_ROOT/com.excelsior.xds.ide/helpData.xml + org.eclipse.help.base/help_home=/com.excelsior.xds.help.nl_ru/nl/ru/html/help_home.html + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/builder/build.config b/builder/build.config new file mode 100644 index 0000000..11c3f6d --- /dev/null +++ b/builder/build.config @@ -0,0 +1,260 @@ +############################################################################### +# Copyright (c) 2003, 2006 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 +############################################################################### +##################### +# Parameters describing how and where to execute the build. +# Typical users need only update the following properties: +# baseLocation - where things you are building against are installed +# bootclasspath - The base jars to compile against (typicaly rt.jar) +# configs - the list of {os, ws, arch} configurations to build. +# +# Of course any of the settings here can be overridden by spec'ing +# them on the command line (e.g., -DbaseLocation=d:/eclipse + +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +eclipseLocation=@EclipseLocation@ +xdsSdk=@XdsSdk@ + +pResultOutputDir=@ResultOutputDir@ +pBuildSystemBaseDir=@BuildSystemBaseDir@ + +pworkspace=${pBuildSystemBaseDir}/product +pLocalizationPluginsBase=${pBuildSystemBaseDir}/localization +pTargetPlatform=${pBuildSystemBaseDir}/target-platform +builder=${pBuildSystemBaseDir}/builder + +# equinox launcher JAR plugin version number +#org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar +equinoxLauncherPluginVersion=1.3.0.v20140415-2008 +# eclipse PDE plugin directory version number +#org.eclipse.pde.build_3.9.0.v20140415-2029 + pdeBuildPluginVersion=3.9.0.v20140415-2029 + +p2.compress=true +p2.gathering=true +p2.metadata.repo=file:${builder}/repo +p2.artifact.repo=file:${builder}/repo +p2.flavor=tooling +p2.publish.artifacts=true +p2.IU=com.excelsior.xds.ide.product + +############# PRODUCT/PACKAGING CONTROL ############# +# Location of the product configuration +product=${buildDirectory}/plugins/com.excelsior.xds.ide/${p2.IU} +runPackager=false + + +#Set the name of the archive that will result from the product build. +#archiveNamePrefix= + +# The prefix that will be used in the generated archive. +archivePrefix=xds-ide + +# 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 +#configs=win32, win32, x86 & \ +#win32, win32, x86_64 +# linux, gtk, x86 +# linux, gtk, x86 & \ +# linux, gtk, x86_64 & \ +# linux, motif, x86 & \ +# solaris, motif, sparc & \ +# solaris, gtk, sparc & \ +# aix, motif, ppc & \ +# hpux, motif, PA_RISC & \ +# macosx, carbon, ppc + +# By default PDE creates one archive (result) per entry listed in the configs property. +# Setting this value to true will cause PDE to only create one output containing all +# artifacts for all the platforms listed in the configs property. +# To control the output format for the group, add a "group, group, group - " entry to the +# archivesFormat. +#groupConfigurations=true + +#The format of the archive. By default a zip is created using antZip. +#The list can only contain the configuration for which the desired format is different than zip. +#archivesFormat=win32, win32, x86 - antZip& \ +# linux, gtk, ppc - antZip &\ +# linux, gtk, x86 - antZip& \ +# linux, gtk, x86_64 - antZip& \ +# linux, motif, x86 - antZip& \ +# solaris, motif, sparc - antZip& \ +# solaris, gtk, sparc - antZip& \ +# aix, motif, ppc - antZip& \ +# hpux, motif, PA_RISC - antZip& \ +# macosx, carbon, ppc - antZip + +#Set to true if you want the output to be ready for an update jar (no site.xml generated) +outputUpdateJars = false + +#Set to true for Jnlp generation +#codebase should be a URL that will be used as the root of all relative URLs in the output. +#generateJnlp=false +#jnlp.codebase= +#jnlp.j2se= +#jnlp.locale= +#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features +#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built + +#Set to true if you want to sign jars +#signJars=true +#sign.alias=mp3m +#sign.keystore=c:/keystore/mp3m.keystore +#sign.storepass=@storepass@ + +#Arguments to send to the zip executable +zipargs= + +#Arguments to send to the tar executable +tarargs= + +#Control the creation of a file containing the version included in each configuration - on by default +generateVersionsLists=true + +############## BUILD NAMING CONTROL ################ +# The directory into which the build elements are fetched and where +# the build takes place. +buildDirectory=${builder}/build +testDirectory=${buildDirectory}/test +testEclipse=${testDirectory}/eclipse +eclipse-home=${testDirectory}/eclipse + +# Type of build. Used in naming the build output. Typically this value is +# one of I, N, M, S, ... +buildType=I + +# ID of the build. Used in naming the build output. +buildId=xds-ide + +# Label for the build. Used in naming the build output +buildLabel=${buildType}.${buildId} + +# Timestamp for the build. Used in naming the build output +timestamp=007 + +#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. +#The value will only be applied to plugin or features indicating build.properties, qualifier = context +forceContextQualifier= + +#Enable / disable the generation of a suffix for the features that use .qualifier. +#The generated suffix is computed according to the content of the feature +generateFeatureVersionSuffix=true + +############# BASE CONTROL ############# +# Settings for the base Eclipse components and Java class libraries +# against which you are building. +# Base location for anything the build needs to compile against. For example, +# in most RCP app or a plug-in, the baseLocation should be the location of a previously +# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. + +base=${eclipseLocation} +baseLocation=${base} +#Os/Ws/Arch/nl of the eclipse specified by baseLocation +baseos=win32 +basews=win32 +basearch=x86 + +#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 + +#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) +#a location is one of: +#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo +#- a directory that contains a /plugins or /features subdirectory +#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml +pluginPath=${pTargetPlatform} + +skipBase=true +eclipseURL= +eclipseBuildId= +eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip + + +############# MAP FILE CONTROL ################ +# This section defines CVS tags to use when fetching the map files from the repository. +# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml + +skipMaps=true +mapsRepo=:pserver:anonymous@example.com/path/to/repo +mapsRoot=path/to/maps +mapsCheckoutTag=HEAD + +#tagMaps=true +mapsTagTag=v${buildId} + + +############ REPOSITORY CONTROL ############### +# This section defines properties parameterizing the repositories where plugins, fragments +# bundles and features are being obtained from. + +# The tags to use when fetching elements to build. +# By default thebuilder will use whatever is in the maps. +# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the +# overriding value +# For example fetchTag=CVS=HEAD, SVN=v20050101 +# fetchTag=HEAD +#skipFetch=true + + +############# JAVA COMPILER OPTIONS ############## +# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE +#bootclasspath=${java.home}/lib/rt.jar + +# specific JRE locations to compile against. These values are used to compile bundles specifying a +# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support +#CDC-1.0/Foundation-1.0= /path/to/rt.jar +#CDC-1.1/Foundation-1.1= +#OSGi/Minimum-1.0= +#OSGi/Minimum-1.1= +#JRE-1.1= +#J2SE-1.2= +#J2SE-1.3= +#J2SE-1.4= +#J2SE-1.5= +#JavaSE-1.6= +#PersonalJava-1.1= +#PersonalJava-1.2= +#CDC-1.0/PersonalBasis-1.0= +#CDC-1.0/PersonalJava-1.0= +#CDC-1.1/PersonalBasis-1.1= +#CDC-1.1/PersonalJava-1.1= + +# 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=false + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=true + +# Enable or disable verbose mode of the compiler +javacVerbose=false + +# Extra arguments for the compiler. These are specific to the java compiler being used. +#compilerArg=-g + +# 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.8 + +# 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.8 + + diff --git a/builder/build.xml b/builder/build.xml new file mode 100644 index 0000000..42a96b0 --- /dev/null +++ b/builder/build.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/builder/build_k26.config b/builder/build_k26.config new file mode 100644 index 0000000..6ca7c71 --- /dev/null +++ b/builder/build_k26.config @@ -0,0 +1,260 @@ +############################################################################### +# Copyright (c) 2003, 2006 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 +############################################################################### +##################### +# Parameters describing how and where to execute the build. +# Typical users need only update the following properties: +# baseLocation - where things you are building against are installed +# bootclasspath - The base jars to compile against (typicaly rt.jar) +# configs - the list of {os, ws, arch} configurations to build. +# +# Of course any of the settings here can be overridden by spec'ing +# them on the command line (e.g., -DbaseLocation=d:/eclipse + +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +eclipseLocation=@EclipseLocation@ + +pResultOutputDir=@ResultOutputDir@ +pBuildSystemBaseDir=@BuildSystemBaseDir@ + +pworkspace=${pBuildSystemBaseDir}/product +pLocalizationPluginsBase=${pBuildSystemBaseDir}/localization +pLocalizationLanguage=ru +pTargetPlatform=${pBuildSystemBaseDir}/target-platform +builder=${pBuildSystemBaseDir}/builder + +# equinox launcher JAR plugin version number +#org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar +equinoxLauncherPluginVersion=1.3.0.v20140415-2008 +# eclipse PDE plugin directory version number +#org.eclipse.pde.build_3.9.0.v20140415-2029 +pdeBuildPluginVersion=3.9.0.v20140415-2029 + +p2.compress=true +p2.gathering=true +p2.metadata.repo=file:${builder}/repo +p2.artifact.repo=file:${builder}/repo +p2.flavor=tooling +p2.publish.artifacts=true +p2.IU=com.excelsior.xds.ide.k26.product + +############# PRODUCT/PACKAGING CONTROL ############# +# Location of the product configuration +product=${buildDirectory}/plugins/com.excelsior.xds.ide/${p2.IU} +runPackager=false + + +#Set the name of the archive that will result from the product build. +#archiveNamePrefix= + +# The prefix that will be used in the generated archive. +archivePrefix=xds-ide + +# 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 +#configs=win32, win32, x86 & \ +#win32, win32, x86_64 +# linux, gtk, x86 +# linux, gtk, x86 & \ +# linux, gtk, x86_64 & \ +# linux, motif, x86 & \ +# solaris, motif, sparc & \ +# solaris, gtk, sparc & \ +# aix, motif, ppc & \ +# hpux, motif, PA_RISC & \ +# macosx, carbon, ppc + +# By default PDE creates one archive (result) per entry listed in the configs property. +# Setting this value to true will cause PDE to only create one output containing all +# artifacts for all the platforms listed in the configs property. +# To control the output format for the group, add a "group, group, group - " entry to the +# archivesFormat. +#groupConfigurations=true + +#The format of the archive. By default a zip is created using antZip. +#The list can only contain the configuration for which the desired format is different than zip. +#archivesFormat=win32, win32, x86 - antZip& \ +# linux, gtk, ppc - antZip &\ +# linux, gtk, x86 - antZip& \ +# linux, gtk, x86_64 - antZip& \ +# linux, motif, x86 - antZip& \ +# solaris, motif, sparc - antZip& \ +# solaris, gtk, sparc - antZip& \ +# aix, motif, ppc - antZip& \ +# hpux, motif, PA_RISC - antZip& \ +# macosx, carbon, ppc - antZip + +#Set to true if you want the output to be ready for an update jar (no site.xml generated) +outputUpdateJars = false + +#Set to true for Jnlp generation +#codebase should be a URL that will be used as the root of all relative URLs in the output. +#generateJnlp=false +#jnlp.codebase= +#jnlp.j2se= +#jnlp.locale= +#jnlp.generateOfflineAllowed=true or false generate attribute in the generated features +#jnlp.configs=${configs} #uncomment to filter the content of the generated jnlp files based on the configuration being built + +#Set to true if you want to sign jars +#signJars=true +#sign.alias=mp3m +#sign.keystore=c:/keystore/mp3m.keystore +#sign.storepass=@storepass@ + +#Arguments to send to the zip executable +zipargs= + +#Arguments to send to the tar executable +tarargs= + +#Control the creation of a file containing the version included in each configuration - on by default +generateVersionsLists=true + +############## BUILD NAMING CONTROL ################ +# The directory into which the build elements are fetched and where +# the build takes place. +buildDirectory=${builder}/build +testDirectory=${buildDirectory}/test +testEclipse=${testDirectory}/eclipse +eclipse-home=${testDirectory}/eclipse + +# Type of build. Used in naming the build output. Typically this value is +# one of I, N, M, S, ... +buildType=I + +# ID of the build. Used in naming the build output. +buildId=xds-ide + +# Label for the build. Used in naming the build output +buildLabel=${buildType}.${buildId} + +# Timestamp for the build. Used in naming the build output +timestamp=007 + +#The value to be used for the qualifier of a plugin or feature when you want to override the value computed by pde. +#The value will only be applied to plugin or features indicating build.properties, qualifier = context +forceContextQualifier= + +#Enable / disable the generation of a suffix for the features that use .qualifier. +#The generated suffix is computed according to the content of the feature +generateFeatureVersionSuffix=true + +############# BASE CONTROL ############# +# Settings for the base Eclipse components and Java class libraries +# against which you are building. +# Base location for anything the build needs to compile against. For example, +# in most RCP app or a plug-in, the baseLocation should be the location of a previously +# installed Eclipse against which the application or plug-in code will be compiled and the RCP delta pack. + +base=${eclipseLocation} +baseLocation=${base} +#Os/Ws/Arch/nl of the eclipse specified by baseLocation +baseos=win32 +basews=win32 +basearch=x86 + +#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 + +#pluginPath is a list of locations in which to find plugins and features. This list is separated by the platform file separator (; or :) +#a location is one of: +#- the location of the jar or folder that is the plugin or feature : /path/to/foo.jar or /path/to/foo +#- a directory that contains a /plugins or /features subdirectory +#- the location of a feature.xml, or for 2.1 style plugins, the plugin.xml or fragment.xml +pluginPath=${pTargetPlatform};${pLocalizationPluginsBase}/${pLocalizationLanguage}; + +skipBase=true +eclipseURL= +eclipseBuildId= +eclipseBaseURL=${eclipseURL}/eclipse-platform-${eclipseBuildId}-win32.zip + + +############# MAP FILE CONTROL ################ +# This section defines CVS tags to use when fetching the map files from the repository. +# If you want to fetch the map file from repository / location, change the getMapFiles target in the customTargets.xml + +skipMaps=true +mapsRepo=:pserver:anonymous@example.com/path/to/repo +mapsRoot=path/to/maps +mapsCheckoutTag=HEAD + +#tagMaps=true +mapsTagTag=v${buildId} + + +############ REPOSITORY CONTROL ############### +# This section defines properties parameterizing the repositories where plugins, fragments +# bundles and features are being obtained from. + +# The tags to use when fetching elements to build. +# By default thebuilder will use whatever is in the maps. +# This value takes the form of a comma separated list of repository identifier (like used in the map files) and the +# overriding value +# For example fetchTag=CVS=HEAD, SVN=v20050101 +# fetchTag=HEAD +#skipFetch=true + + +############# JAVA COMPILER OPTIONS ############## +# The location of the Java jars to compile against. Typically the rt.jar for your JDK/JRE +#bootclasspath=${java.home}/lib/rt.jar + +# specific JRE locations to compile against. These values are used to compile bundles specifying a +# Bundle-RequiredExecutionEnvironment. Uncomment and set values for environments that you support +#CDC-1.0/Foundation-1.0= /path/to/rt.jar +#CDC-1.1/Foundation-1.1= +#OSGi/Minimum-1.0= +#OSGi/Minimum-1.1= +#JRE-1.1= +#J2SE-1.2= +#J2SE-1.3= +#J2SE-1.4= +#J2SE-1.5= +#JavaSE-1.6= +#PersonalJava-1.1= +#PersonalJava-1.2= +#CDC-1.0/PersonalBasis-1.0= +#CDC-1.0/PersonalJava-1.0= +#CDC-1.1/PersonalBasis-1.1= +#CDC-1.1/PersonalJava-1.1= + +# 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=false + +# Whether or not to fail the build if there are compiler errors +javacFailOnError=true + +# Enable or disable verbose mode of the compiler +javacVerbose=false + +# Extra arguments for the compiler. These are specific to the java compiler being used. +#compilerArg=-g + +# 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.8 + +# 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.8 + + diff --git a/builder/build_local.bat b/builder/build_local.bat new file mode 100644 index 0000000..9436006 --- /dev/null +++ b/builder/build_local.bat @@ -0,0 +1,42 @@ +@echo off +set BUILD_K26_VERSION=OFF + +set ACTION=%1 +if "%1" == "" set ACTION=build + +set CONFIG_DIR=%~dp0config + +set GET_LOG=%~dp0get.log +set BUILD_LOG=%~dp0build.log + +set ENV_BAT=config\env_%COMPUTERNAME%.bat +if exist "%ENV_BAT%" call "%ENV_BAT%" + +echo K26 IDE local %ACTION% + +echo Cleaning ... +for %%i in (log,out) do if exist *.%%i del /F /Q *.%%i +if exist "%LOCAL_BUILD_DIR%" rmdir /S /Q "%LOCAL_BUILD_DIR%" +mkdir "%LOCAL_BUILD_DIR%" + +if "%ACTION%" == "clean" goto :lbl_Finish + +echo Getting source code ... +xcopy "%LOCAL_SOURCE_DIR%\product" "%LOCAL_BUILD_DIR%\product\" /exclude:skiplist.txt /s /e 1> "%GET_LOG%" 2>&1 +for %%i in (builder,target-platform,docs,localization,tools) do xcopy "%LOCAL_SOURCE_DIR%\%%i" "%LOCAL_BUILD_DIR%\%%i\" /s /e 1>> "%GET_LOG%" 2>>&1 +for %%i in (.rep_url) do copy "%LOCAL_SOURCE_DIR%\%%i" "%LOCAL_BUILD_DIR%\%%i" 1>> "%GET_LOG%" 2>>&1 + +echo Building ... +cd "%LOCAL_BUILD_DIR%/builder" + +ant.bat -f build-xds-ide.xml 1> "%BUILD_LOG%" 2>&1 +if errorlevel 1 goto lbl_Error + +:lbl_Finish +echo === K26 IDE local %ACTION% === OK! +goto :EOF + + +:lbl_Error +echo *** K26 IDE local %ACTION% failed *** Erorr(s)! +goto :EOF diff --git a/builder/config/Ariel.properties b/builder/config/Ariel.properties new file mode 100644 index 0000000..56c9c94 --- /dev/null +++ b/builder/config/Ariel.properties @@ -0,0 +1,6 @@ +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +@EclipseLocation@=d:/java/eclipse_3.7.2_deltapack + +@ResultOutputDir@=d:/xds-de-builds +@BuildSystemBaseDir@=d:/xds-de-builds/src/local_build diff --git a/builder/config/Hurricane.properties b/builder/config/Hurricane.properties new file mode 100644 index 0000000..be96348 --- /dev/null +++ b/builder/config/Hurricane.properties @@ -0,0 +1,7 @@ +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +@EclipseLocation@=c:/distribs/java/eclipse_4_4_2/x86_build/eclipse +@XdsSdk@=c:/Lapukhov/MyProjects/k26/branches/2015_07_17_trunk_goes_opensource/tests/sdk/XDS-x86 + +@ResultOutputDir@=c:/d/xds-de-builds/src/local_build/outcome +@BuildSystemBaseDir@=c:/d/xds-de-builds/src/local_build/trunk \ No newline at end of file diff --git a/builder/config/Whirlwind.properties b/builder/config/Whirlwind.properties new file mode 100644 index 0000000..d54dc6d --- /dev/null +++ b/builder/config/Whirlwind.properties @@ -0,0 +1,8 @@ +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +@EclipseLocation@=d:/distribs/developer/java/eclipse/standard-luna-SR2/win32/eclipse + +@ResultOutputDir@=d:/xds-de-builds/src/local_build/outcome +@BuildSystemBaseDir@=d:/xds-de-builds/src/local_build/trunk + +@XdsSdk@=d:/Lapukhov/MyPrjs/Excelsior/Modulipse/SDKs/XDS_x86/XDS \ No newline at end of file diff --git a/builder/config/env_HURRICANE.bat b/builder/config/env_HURRICANE.bat new file mode 100644 index 0000000..1fb29d6 --- /dev/null +++ b/builder/config/env_HURRICANE.bat @@ -0,0 +1,22 @@ +@echo off + +rem === Local build settings +set LOCAL_BUILD_DIR=c:\d\xds-de-builds\src\local_build\trunk +set LOCAL_SOURCE_DIR=%~dp0..\.. + +rem === JDK settings +set JAVA_HOME=c:\Program Files\Java\jdk1.8.0_45 +set PATH=%JAVA_HOME%\bin;%PATH% +set CLASSPATH=.;%JAVA_HOME%\lib\tools.jar;%CLASSPATH% + +set INCLUDE=%JAVA_HOME%\include;%JDKDIR%\include\win32;%INCLUDE% +set LIB=%JAVA_HOME%\lib;%LIB% + +rem === Ant settings +set ANT_HOME=c:\distribs\java\ant\apache-ant-1.9.2 +set PATH=%ANT_HOME%\bin;%PATH% + + +if "%1" == "" goto :EOF +call %* +goto :EOF diff --git a/builder/config/env_LION.bat b/builder/config/env_LION.bat new file mode 100644 index 0000000..9030e1d --- /dev/null +++ b/builder/config/env_LION.bat @@ -0,0 +1,22 @@ +@echo off + +rem === Local build settings +set LOCAL_BUILD_DIR=E:\K26_IDE\build-oss\local_branch +set LOCAL_SOURCE_DIR=%~dp0..\.. + +rem === JDK settings +set JAVA_HOME=C:\bin\Java\jdk1.8.0_45_x86 +set PATH=%JAVA_HOME%\bin;%PATH% +set CLASSPATH=.;%JAVA_HOME%\lib\tools.jar;%CLASSPATH% + +set INCLUDE=%JAVA_HOME%\include;%JDKDIR%\include\win32;%INCLUDE% +set LIB=%JAVA_HOME%\lib;%LIB% + +rem === Ant settings +set ANT_HOME=C:\bin\Java\ant +set PATH=%ANT_HOME%\bin;%PATH% + + +if "%1" == "" goto :EOF +call %* +goto :EOF diff --git a/builder/config/env_NHA7.bat b/builder/config/env_NHA7.bat new file mode 100644 index 0000000..a98b24e --- /dev/null +++ b/builder/config/env_NHA7.bat @@ -0,0 +1,22 @@ +@echo off + +rem === Local build settings +set LOCAL_BUILD_DIR=E:\FSA\K26_IDE\K26-IDE\trunkBuild\local_trunk +set LOCAL_SOURCE_DIR=E:\FSA\K26_IDE\K26-IDE\trunk + +rem === JDK settings +set JAVA_HOME=E:\jdk\jdk1.6.0_20 +set PATH=%JAVA_HOME%\bin;%PATH% +set CLASSPATH=.;%JAVA_HOME%\lib\tools.jar;%CLASSPATH% + +set INCLUDE=%JAVA_HOME%\include;%JDKDIR%\include\win32;%INCLUDE% +set LIB=%JAVA_HOME%\lib;%LIB% + +rem === Ant settings +set ANT_HOME=%LOCAL_SOURCE_DIR%\tools\ant +set PATH=%ANT_HOME%\bin;%PATH% + + +if "%1" == "" goto :EOF +call %* +goto :EOF diff --git a/builder/config/env_WHIRLWIND.bat b/builder/config/env_WHIRLWIND.bat new file mode 100644 index 0000000..0f2dd39 --- /dev/null +++ b/builder/config/env_WHIRLWIND.bat @@ -0,0 +1,22 @@ +@echo off + +rem === Local build settings +set LOCAL_BUILD_DIR=d:\xds-de-builds\src\local_build\trunk +set LOCAL_SOURCE_DIR=%~dp0..\.. + +rem === JDK settings +set JAVA_HOME=%JDK_HOME% +set PATH=%JAVA_HOME%\bin;%PATH% +set CLASSPATH=.;%JAVA_HOME%\lib\tools.jar;%CLASSPATH% + +set INCLUDE=%JAVA_HOME%\include;%JDKDIR%\include\win32;%INCLUDE% +set LIB=%JAVA_HOME%\lib;%LIB% + +rem === Ant settings +set ANT_HOME=d:\distribs\developer\java\ant\apache-ant-1.9.4 +set PATH=%ANT_HOME%\bin;%PATH% + + +if "%1" == "" goto :EOF +call %* +goto :EOF diff --git a/builder/config/lion.properties b/builder/config/lion.properties new file mode 100644 index 0000000..497fd59 --- /dev/null +++ b/builder/config/lion.properties @@ -0,0 +1,7 @@ +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +@EclipseLocation@=E:/K26_IDE/bin/eclipse-build +@XdsSdk@=E:/K26_IDE/bin/XDS-260 + +@ResultOutputDir@=E:/K26_IDE/build-oss/local_outcome +@BuildSystemBaseDir@=E:/K26_IDE/build-oss/local_branch diff --git a/builder/config/nha7.properties b/builder/config/nha7.properties new file mode 100644 index 0000000..7bbaac3 --- /dev/null +++ b/builder/config/nha7.properties @@ -0,0 +1,6 @@ +# Location of Eclipse SDK: Here the launcher is used from +# MUST not be the target platform (baseLocation, see below) +@EclipseLocation@=E:/FSA/K26_IDE/K26-IDE/store/eclipse-3.7.2 + +@ResultOutputDir@=E:/FSA/K26_IDE/K26-IDE/trunkBuild/local_outcome +@BuildSystemBaseDir@=E:/FSA/K26_IDE/K26-IDE/trunkBuild/local_trunk diff --git a/builder/customTargets.xml b/builder/customTargets.xml new file mode 100644 index 0000000..a8fba83 --- /dev/null +++ b/builder/customTargets.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/builder/scripts/createCategoryXml.groovy b/builder/scripts/createCategoryXml.groovy new file mode 100644 index 0000000..90c0c2d --- /dev/null +++ b/builder/scripts/createCategoryXml.groovy @@ -0,0 +1,109 @@ +import groovy.xml.* + +def cli = new CliBuilder(usage:'createUpdateSite.groovy') +cli.r(longOpt:'repo', args:1, argName:'data', 'features and plugins repository') +cli.s(longOpt:'categoryXml', args:1, argName:'data', 'result category.xml') + +def options = cli.parse(args) +def repoPath = options.repo; + +if (!new File(repoPath).exists()) +{ + println("repository dir is incorrectly specified"); + return; +} + +def categoryXml = options.categoryXml; +new File(categoryXml).getParentFile().mkdirs(); + +println("repoPath = ${repoPath}, categoryXml=${categoryXml}"); + +def featureRefs = []; +new File(repoPath + File.separator + 'features').eachFile{file -> + if(file.isFile() && file.name.matches("(.+)_(.+)[.]jar")){ + featureRefs.add(file.getParentFile().name + File.separator + file.name); + } +} + +def xmlFeatures = []; +Set xmlCategories = []; + +def categoryXds = "com.excelsior.xds"; +def categoryXdsJre = "com.excelsior.xds.jre"; +def categoryEclipse = "org.eclipse"; +def categoryOther = "other"; + +Map categoryName2Desc = [:]; +categoryName2Desc[categoryXds] = new CategoryDesc(categoryXds, "XDS Modula IDE components", "XDS Modula IDE components description"); +categoryName2Desc[categoryXdsJre] = new CategoryDesc(categoryXds, "Oracle JRE", "Oracle JRE description"); +categoryName2Desc[categoryEclipse] = new CategoryDesc(categoryEclipse, "Eclipse components", "Eclipse components description"); +categoryName2Desc[categoryOther] = new CategoryDesc(categoryOther, "Other", "Other description"); + +def closure = { + site { + featureRefs.each { ref -> + def regex = /.+[\\](.+)_(\d+[.]\d+[.]\d+).*[.]jar/; + def matcher = ref =~ regex; + if (matcher.matches()) + { + def versionVal = matcher.group(2); + def idVal = matcher.group(1); + + feature(id : idVal, version : versionVal + '.qualifier', url : ref) + { + if (idVal.startsWith(categoryXdsJre)) + { + xmlCategories.add(categoryXdsJre); + category(name : categoryXdsJre) {} + } + else if (idVal.startsWith(categoryXds)) + { + xmlCategories.add(categoryXds); + category(name : categoryXds) {} + } + else if (idVal.startsWith("org.eclipse")) + { + xmlCategories.add(categoryEclipse); + category(name : categoryEclipse) {} + } + else { + xmlCategories.add(categoryOther); + category(name : categoryOther) {} + } + } + } + } + + xmlCategories.each { categoryName -> + CategoryDesc categoryDesc = categoryName2Desc[categoryName]; + 'category-def' (name : categoryName, label : categoryDesc.label) + { + description(categoryDesc.description); + } + } + } +} + +writeFile(categoryXml, closure); + +class CategoryDesc +{ + String name; + String label; + String description; + + public CategoryDesc(String name, String label, String description) { + this.name = name; + this.label = label; + this.description = description; + } +} + +def writeFile(fileName, closure) { + def xmlFile = new File(fileName) + def writer = xmlFile.newWriter() + + def builder = new StreamingMarkupBuilder() + def Writable writable = builder.bind closure + writable.writeTo(writer) +} \ No newline at end of file diff --git a/builder/scripts/replaceBuildProperties.groovy b/builder/scripts/replaceBuildProperties.groovy new file mode 100644 index 0000000..425f155 --- /dev/null +++ b/builder/scripts/replaceBuildProperties.groovy @@ -0,0 +1,64 @@ +import java.io.File; + +class Globals { + static String svnBase; +} + +def productDir = properties["productDir"]; +Globals.svnBase = properties["svnBase"]; +def svnBase2 = Globals.svnBase; +println("productDir = ${productDir}, svnBase=${svnBase2}"); + +List pluginDirs = getPluginDirectories(productDir); +pluginDirs.each { + pluginDir -> processPluginDirectory(pluginDir) +} + +def processPluginDirectory(File pluginDir) +{ + String svnRevision = getPluginDirSvnRevision(pluginDir); + setBuildPropertiesQualifier(pluginDir, svnRevision) +} + +def setBuildPropertiesQualifier(File pluginDir, String svnRevision) +{ + def buildPropsPath = pluginDir.getAbsolutePath() + java.io.File.separator + "build.properties"; + if (new File(buildPropsPath).exists()) + { + String buildPropsText = new File(buildPropsPath).getText(); + def regex = /(?m)^\s*qualifier\s+=\s+none\s*$/; + String newBuildPropsText = buildPropsText.replaceAll(regex,'qualifier = ' + svnRevision); + new File(buildPropsPath).setText(newBuildPropsText); + } +} + +def getPluginDirSvnRevision(File pluginDir) +{ + def command = 'svn info ' + Globals.svnBase + pluginDir.getName(); + def proc = command.execute() // Call *execute* on the string + + def svnRevision = null; + proc.in.eachLine { line -> def tmp = fetchSvnRevision(line); if (tmp != null) svnRevision = tmp; } + svnRevision; +} + +def getPluginDirectories(String productDir) +{ + def pluginDirs = []; + new File(productDir).eachFile{file -> + if(file.isDirectory() && file.name.startsWith("com.excelsior" )){ + pluginDirs.add(file); + } + } + pluginDirs; +} + +def fetchSvnRevision(String line) +{ + def matcher = line =~ /^Last Changed Rev: (\d+)\s*$/; + if (matcher.matches()) + { + return matcher.group(1); + } + return null; +} \ No newline at end of file diff --git a/builder/skiplist.txt b/builder/skiplist.txt new file mode 100644 index 0000000..13b4f85 --- /dev/null +++ b/builder/skiplist.txt @@ -0,0 +1,4 @@ +.metadata +.class +.git +tests \ No newline at end of file diff --git a/builder/sourcelist.txt b/builder/sourcelist.txt new file mode 100644 index 0000000..7a39727 --- /dev/null +++ b/builder/sourcelist.txt @@ -0,0 +1,7 @@ +builder +docs +localization +product +target-platform +tools +.rep_url \ No newline at end of file diff --git a/builder/tools/updateSiteBuilder/builder.jar b/builder/tools/updateSiteBuilder/builder.jar new file mode 100644 index 0000000..8333374 Binary files /dev/null and b/builder/tools/updateSiteBuilder/builder.jar differ diff --git a/builder/tools/updateSiteBuilder/builder_lib/commons-cli-1.2.jar b/builder/tools/updateSiteBuilder/builder_lib/commons-cli-1.2.jar new file mode 100644 index 0000000..ce4b9ff Binary files /dev/null and b/builder/tools/updateSiteBuilder/builder_lib/commons-cli-1.2.jar differ diff --git a/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.collections_3.2.0.v201005080500.jar b/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.collections_3.2.0.v201005080500.jar new file mode 100644 index 0000000..bd1c526 Binary files /dev/null and b/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.collections_3.2.0.v201005080500.jar differ diff --git a/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.io_2.0.1.v201105210651.jar b/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.io_2.0.1.v201105210651.jar new file mode 100644 index 0000000..10b41b5 Binary files /dev/null and b/builder/tools/updateSiteBuilder/builder_lib/org.apache.commons.io_2.0.1.v201105210651.jar differ diff --git a/builder/tools/updateSiteBuilder/builder_lib/velocity-1.7-dep.jar b/builder/tools/updateSiteBuilder/builder_lib/velocity-1.7-dep.jar new file mode 100644 index 0000000..c99aecf Binary files /dev/null and b/builder/tools/updateSiteBuilder/builder_lib/velocity-1.7-dep.jar differ diff --git a/builder/tools/updateSiteBuilder/data/feature_template.xml b/builder/tools/updateSiteBuilder/data/feature_template.xml new file mode 100644 index 0000000..a4dcf4f --- /dev/null +++ b/builder/tools/updateSiteBuilder/data/feature_template.xml @@ -0,0 +1,18 @@ + + + + $feature.copyright + + + $feature.license + + $feature.description +#foreach( $featureEntry in $featureEntries ) + +#end + \ No newline at end of file diff --git a/docs/UserGuides/en/XDS Modula-2 IDE User Guide (en).pdf b/docs/UserGuides/en/XDS Modula-2 IDE User Guide (en).pdf new file mode 100644 index 0000000..8e9d51e Binary files /dev/null and b/docs/UserGuides/en/XDS Modula-2 IDE User Guide (en).pdf differ diff --git a/docs/UserGuides/en/XDS Modula-2 IDE User Guide (ru).pdf b/docs/UserGuides/en/XDS Modula-2 IDE User Guide (ru).pdf new file mode 100644 index 0000000..4373f62 Binary files /dev/null and b/docs/UserGuides/en/XDS Modula-2 IDE User Guide (ru).pdf differ diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/about.html b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/about.html new file mode 100644 index 0000000..c80c773 --- /dev/null +++ b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/about.html @@ -0,0 +1,22 @@ + + + +About + + + +

About This Content

+ +

January 22, 2008

+

License

+ +

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the +Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at http://www.eclipse.org/legal/epl-v10.html. +For purposes of the EPL, "Program" will mean the Content.

+ +

If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may +apply to your use of any object code in the Content. Check the Redistributor\'s license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise +indicated below, the terms and conditions of the EPL still apply to any source code in the Content.

+ + + diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/eclipse_update_120.jpg b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/eclipse_update_120.jpg new file mode 100644 index 0000000..bfdf708 Binary files /dev/null and b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/eclipse_update_120.jpg differ diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/epl-v10.html b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/epl-v10.html new file mode 100644 index 0000000..ed4b196 --- /dev/null +++ b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/epl-v10.html @@ -0,0 +1,328 @@ + + + + + + + + +Eclipse Public License - Version 1.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.

+ +

 

+ +
+ + + + \ No newline at end of file diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.properties b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.properties new file mode 100644 index 0000000..e30ac0e --- /dev/null +++ b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.properties @@ -0,0 +1,113 @@ +providerName=Eclipse.org + +copyright=\ +Copyright (c) 2000, 2008 IBM Corporation and others.\n\ +All rights reserved. This program and the accompanying materials\n\ +are made available under the terms of the Eclipse Public License v1.0\n\ +which accompanies this distribution, and is available at\n\ +http://www.eclipse.org/legal/epl-v10.html\n\ +\n\ +Contributors:\n\ + IBM Corporation - initial API and implementation\n +################ end of copyright property #################################### + +licenseURL=license.html + +license=\ +ECLIPSE FOUNDATION SOFTWARE USER AGREEMENT\n\ +March 17, 2005\n\ +\n\ +Usage Of Content\n\ +\n\ +THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\ +OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\ +USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\ +AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\ +NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\ +AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\ +AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\ +OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\ +TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\ +OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\ +BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\ +\n\ +Applicable Licenses\n\ +\n\ +Unless otherwise indicated, all Content made available by the Eclipse Foundation\n\ +is provided to you under the terms and conditions of the Eclipse Public\n\ +License Version 1.0 ("EPL"). A copy of the EPL is provided with this\n\ +Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\ +For purposes of the EPL, "Program" will mean the Content.\n\ +\n\ +Content includes, but is not limited to, source code, object code,\n\ +documentation and other files maintained in the Eclipse.org CVS\n\ +repository ("Repository") in CVS modules ("Modules") and made available\n\ +as downloadable archives ("Downloads").\n\ +\n\ + - Content may be structured and packaged into modules to facilitate delivering,\n\ + extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\ + plug-in fragments ("Fragments"), and features ("Features").\n\ + - Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java? ARchive)\n\ + in a directory named "plugins".\n\ + - A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\ + Each Feature may be packaged as a sub-directory in a directory named "features".\n\ + Within a Feature, files named "feature.xml" may contain a list of the names and version\n\ + numbers of the Plug-ins and/or Fragments associated with that Feature.\n\ + - Features may also include other Features ("Included Features"). Within a Feature, files\n\ + named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\ +\n\ +Features may also include other Features ("Included Features"). Files named\n\ +"feature.xml" may contain a list of the names and version numbers of\n\ +Included Features.\n\ +\n\ +The terms and conditions governing Plug-ins and Fragments should be\n\ +contained in files named "about.html" ("Abouts"). The terms and\n\ +conditions governing Features and Included Features should be contained\n\ +in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\ +Licenses may be located in any directory of a Download or Module\n\ +including, but not limited to the following locations:\n\ +\n\ + - The top-level (root) directory\n\ + - Plug-in and Fragment directories\n\ + - Inside Plug-ins and Fragments packaged as JARs\n\ + - Sub-directories of the directory named "src" of certain Plug-ins\n\ + - Feature directories\n\ +\n\ +Note: if a Feature made available by the Eclipse Foundation is installed using the\n\ +Eclipse Update Manager, you must agree to a license ("Feature Update\n\ +License") during the installation process. If the Feature contains\n\ +Included Features, the Feature Update License should either provide you\n\ +with the terms and conditions governing the Included Features or inform\n\ +you where you can locate them. Feature Update Licenses may be found in\n\ +the "license" property of files named "feature.properties". Such Abouts,\n\ +Feature Licenses and Feature Update Licenses contain the terms and\n\ +conditions (or references to such terms and conditions) that govern your\n\ +use of the associated Content in that directory.\n\ +\n\ +THE ABOUTS, FEATURE LICENSES AND FEATURE UPDATE LICENSES MAY REFER\n\ +TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\ +SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\ +\n\ + - Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\ + - Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\ + - Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\ + - IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)\n\ + - Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\ + - Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\ +\n\ +IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\ +TO USE OF THE CONTENT. If no About, Feature License or Feature Update License\n\ +is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\ +govern that particular Content.\n\ +\n\ +Cryptography\n\ +\n\ +Content may contain encryption software. The country in which you are\n\ +currently may have restrictions on the import, possession, and use,\n\ +and/or re-export to another country, of encryption software. BEFORE\n\ +using any encryption software, please check the country's laws,\n\ +regulations and policies concerning the import, possession, or use,\n\ +and re-export of encryption software, to see if this is permitted.\n\ +\n\ +Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.\n +########### end of license property ########################################## diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.xml b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.xml new file mode 100644 index 0000000..2e85394 --- /dev/null +++ b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/feature.xml @@ -0,0 +1,302 @@ + + + + %copyright + + + %license + + Babel Language Pack for eclipse in Russian + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/license.html b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/license.html new file mode 100644 index 0000000..c6af966 --- /dev/null +++ b/localization/ru/features/org.eclipse.babel.nls_eclipse_ru_4.4.0.v20140623020002/license.html @@ -0,0 +1,79 @@ + + + + +Eclipse.org Software User Agreement + + + +

Eclipse Foundation Software User Agreement

+

March 17, 2005

+ +

Usage Of Content

+ +

THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS + (COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND + CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE + OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR + NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND + CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.

+ +

Applicable Licenses

+ +

Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 + ("EPL"). A copy of the EPL is provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html. + For purposes of the EPL, "Program" will mean the Content.

+ +

Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository ("Repository") in CVS + modules ("Modules") and made available as downloadable archives ("Downloads").

+ +
    +
  • Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"), plug-in fragments ("Fragments"), and features ("Features").
  • +
  • Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".
  • +
  • A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named "features". Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of the Plug-ins + and/or Fragments associated with that Feature.
  • +
  • Features may also include other Features ("Included Features"). Within a Feature, files named "feature.xml" may contain a list of the names and version numbers of Included Features.
  • +
+ +

The terms and conditions governing Plug-ins and Fragments should be contained in files named "about.html" ("Abouts"). The terms and conditions governing Features and +Included Features should be contained in files named "license.html" ("Feature Licenses"). Abouts and Feature Licenses may be located in any directory of a Download or Module +including, but not limited to the following locations:

+ +
    +
  • The top-level (root) directory
  • +
  • Plug-in and Fragment directories
  • +
  • Inside Plug-ins and Fragments packaged as JARs
  • +
  • Sub-directories of the directory named "src" of certain Plug-ins
  • +
  • Feature directories
  • +
+ +

Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, you must agree to a license ("Feature Update License") during the +installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or +inform you where you can locate them. Feature Update Licenses may be found in the "license" property of files named "feature.properties" found within a Feature. +Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in +that directory.

+ +

THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE +OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):

+ + + +

IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please +contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.

+ +

Cryptography

+ +

Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to + another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import, + possession, or use, and re-export of encryption software, to see if this is permitted.

+ +Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. + + diff --git a/localization/ru/plugins/org.eclipse.ant.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ant.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cd6d1c8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ant.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ant.launching.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ant.launching.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..317c83a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ant.launching.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ant.tests.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ant.tests.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..75f53dd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ant.tests.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ant.tests.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ant.tests.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8ea0b8f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ant.tests.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ant.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ant.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f609a2a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ant.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.compare.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.compare.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..884a466 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.compare.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.compare.examples.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.compare.examples.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0014b9d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.compare.examples.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.compare.examples.xml.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.compare.examples.xml.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..eae1201 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.compare.examples.xml.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.compare.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.compare.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3372a9a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.compare.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.compare.win32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.compare.win32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f970a9a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.compare.win32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.commands.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.commands.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..60b632c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.commands.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.databinding.beans.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.databinding.beans.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fbda12e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.databinding.beans.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.databinding.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.databinding.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..95e4977 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.databinding.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.databinding.observable.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.databinding.observable.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fe89f3f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.databinding.observable.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.databinding.property.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.databinding.property.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..11f8fff Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.databinding.property.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.externaltools.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.externaltools.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..095ed79 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.externaltools.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.filebuffers.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.filebuffers.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..058f0a8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.filebuffers.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.net.linux.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.net.linux.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..719f500 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.net.linux.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.net.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.net.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cc00151 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.net.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.net.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.net.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..16a0876 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.net.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.net.win32.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.net.win32.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3809425 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.net.win32.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.net.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.net.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..91b7fff Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.net.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.core.variables.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.core.variables.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d2d59f2 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.core.variables.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4f84452 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.examples.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.examples.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4ffed55 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.examples.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.examples.memory.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.examples.memory.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..793223f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.examples.memory.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.examples.mixedmode.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.examples.mixedmode.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9a4609d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.examples.mixedmode.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.examples.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.examples.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..063d12c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.examples.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.debug.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.debug.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..bf6356a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.debug.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.core.commands.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.core.commands.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..2481520 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.core.commands.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.demo.contacts.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.demo.contacts.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..2ba27cc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.demo.contacts.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.emf.xpath.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.emf.xpath.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8a7e621 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.emf.xpath.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.bindings.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.bindings.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..168272a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.bindings.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.css.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.css.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..620bb83 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.css.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.css.swt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.css.swt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ea7ca36 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.css.swt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.css.swt.theme.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.css.swt.theme.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c09e14b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.css.swt.theme.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.di.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.di.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7d9074d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.di.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.menu.tests.p3.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.menu.tests.p3.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..bc2d8a8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.menu.tests.p3.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.model.workbench.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.model.workbench.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6e605dc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.model.workbench.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.progress.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.progress.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..120b3da Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.progress.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.services.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.services.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..2c448bb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.services.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.widgets.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.widgets.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f05b19f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.widgets.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench.addons.swt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench.addons.swt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e878e6a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench.addons.swt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..66b8280 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6c2bd6d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.cocoa.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f13bba8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench.renderers.swt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench.swt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench.swt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e5dac22 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench.swt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.e4.ui.workbench3.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.e4.ui.workbench3.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..de2348f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.e4.ui.workbench3.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.equinox.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.equinox.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..850e32b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.equinox.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c4af0e4 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.frameworkadmin.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d06b028 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..dab6048 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e316de5 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..63af6fb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6ed6d8f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f87f6f0 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e0fcf8b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..47be93b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4aeb11a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b7d330e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..eeb09fb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..779cf19 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..01949ac Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..964b856 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9a7a877 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..1c64ef5 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..48162b8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e2f901a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5ad59ee Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8b4b7a2 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..59bbbf6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3adaa3c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c282723 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..1546a16 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.launcher.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.launcher.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6ca350a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.launcher.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.artifact.optimizers.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.optimizers.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d0e94d2 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.optimizers.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.artifact.processors.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.processors.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6bb0092 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.processors.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.artifact.repository.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.repository.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..17f39bd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.artifact.repository.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.console.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.console.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ae7a386 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.console.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d41c0c4 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.director.app.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.director.app.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3cafa61 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.director.app.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.director.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.director.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..efc1baf Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.director.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.directorywatcher.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.directorywatcher.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ba8efc3 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.directorywatcher.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.discovery.compatibility.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.discovery.compatibility.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..521352e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.discovery.compatibility.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.discovery.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.discovery.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d58fde5 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.discovery.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.engine.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.engine.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e674564 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.engine.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.cloud.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.cloud.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9258154 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.cloud.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.discovery.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.discovery.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b8c369b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.discovery.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..eea4c6d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.examples.rcp.sdkbundlevisibility.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.extensionlocation.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.extensionlocation.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..469bdca Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.extensionlocation.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.garbagecollector.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.garbagecollector.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..35cb3d8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.garbagecollector.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.installer.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.installer.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b327286 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.installer.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.jarprocessor.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.jarprocessor.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..64e7946 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.jarprocessor.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.metadata.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.metadata.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..95e7188 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.metadata.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.metadata.repository.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.metadata.repository.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a37fc54 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.metadata.repository.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.operations.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.operations.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..2980735 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.operations.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.publisher.eclipse.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.publisher.eclipse.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9d5a361 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.publisher.eclipse.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.publisher.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.publisher.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..89dd377 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.publisher.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ql.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ql.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b7cb519 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ql.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.reconciler.dropins.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.reconciler.dropins.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f348ce7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.reconciler.dropins.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.repository.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.repository.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fcc7520 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.repository.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.repository.tools.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.repository.tools.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7ee643e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.repository.tools.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.tests.discovery.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.tests.discovery.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..27e619c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.tests.discovery.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.tests.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.tests.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e2a38b9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.tests.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.tests.verifier.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.tests.verifier.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8fbe899 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.tests.verifier.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.eclipse.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.eclipse.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8de0832 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.eclipse.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.natives.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.natives.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ecf2360 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.touchpoint.natives.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.transport.ecf.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.transport.ecf.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d1b91ef Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.transport.ecf.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3941cb1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.rcp.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.rcp.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c28a7ec Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.admin.rcp.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.discovery.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.discovery.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..043698d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.discovery.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.importexport.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.importexport.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b762eb8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.importexport.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f1e3c09 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8d7b324 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..aabf131 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.ui.sdk.scheduler.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.updatechecker.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.updatechecker.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0fe7629 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.updatechecker.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.p2.updatesite.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.p2.updatesite.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..1e4fb47 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.p2.updatesite.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.manipulator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.manipulator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c89d93b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.manipulator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..29fc2fa Binary files /dev/null and b/localization/ru/plugins/org.eclipse.equinox.simpleconfigurator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.help.base.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.help.base.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..86de9e4 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.help.base.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.help.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.help.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e43b64e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.help.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.help.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.help.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..20bf585 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.help.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.help.webapp.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.help.webapp.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a3ed49e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.help.webapp.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.annotation.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.annotation.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f2a8121 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.annotation.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.annotation_v1.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.annotation_v1.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ad1b1a6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.annotation_v1.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.apt.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.apt.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f950d53 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.apt.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.apt.pluggable.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.apt.pluggable.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fdd0fc1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.apt.pluggable.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.apt.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.apt.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..51486bd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.apt.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.astview.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.astview.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..00a13f1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.astview.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.compiler.apt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.compiler.apt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..eb051af Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.compiler.apt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.compiler.tool.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.compiler.tool.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c465e3b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.compiler.tool.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.manipulation.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.manipulation.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..208ae51 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.manipulation.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0475a57 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.tests.builder.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.tests.builder.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0f4e484 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.tests.builder.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.tests.compiler.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.tests.compiler.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7288fe7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.tests.compiler.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.tests.model.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.tests.model.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5e35b04 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.tests.model.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.core.tests.performance.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.core.tests.performance.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..408fa1a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.core.tests.performance.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.debug.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.debug.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d6fab02 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.debug.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.debug.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.debug.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..22ead25 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.debug.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.jeview.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.jeview.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..2d3ca68 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.jeview.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.junit.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.junit.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..da26bda Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.junit.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.junit.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.junit.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c1a0bda Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.junit.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.junit.runtime.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.junit.runtime.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..dffc4bc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.junit.runtime.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.junit4.runtime.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.junit4.runtime.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6f2ec4d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.junit4.runtime.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.launching.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.launching.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3ba0ef9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.launching.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.launching.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.launching.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..311dc7a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.launching.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.launching.ui.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.launching.ui.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ca74880 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.launching.ui.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a04bf6b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.ui.examples.javafamily.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.ui.examples.javafamily.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fa5845d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.ui.examples.javafamily.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.ui.examples.projects.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.ui.examples.projects.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3c2513a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.ui.examples.projects.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4cc017d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jdt.ui.tests.refactoring.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jdt.ui.tests.refactoring.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6fb52c6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jdt.ui.tests.refactoring.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.databinding.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.databinding.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..bc34571 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.databinding.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.examples.databinding.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.examples.databinding.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..76b97d8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.examples.databinding.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8a9335e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.tests.databinding.conformance.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.tests.databinding.conformance.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8268c4b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.tests.databinding.conformance.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.tests.databinding.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.tests.databinding.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9b991d0 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.tests.databinding.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jface.text.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jface.text.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7903a2c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jface.text.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jsch.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jsch.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b6ce4a3 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jsch.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.jsch.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.jsch.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cc3db45 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.jsch.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ltk.core.refactoring.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ltk.core.refactoring.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..70dbf50 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ltk.core.refactoring.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ltk.ui.refactoring.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ltk.ui.refactoring.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0a28ed2 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ltk.ui.refactoring.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.osgi.compatibility.plugins.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.osgi.compatibility.plugins.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6d223ad Binary files /dev/null and b/localization/ru/plugins/org.eclipse.osgi.compatibility.plugins.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.osgi.compatibility.state.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.osgi.compatibility.state.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..12d8cc9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.osgi.compatibility.state.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.osgi.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.osgi.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..1babc03 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.osgi.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.osgi.services.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.osgi.services.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c6dedfe Binary files /dev/null and b/localization/ru/plugins/org.eclipse.osgi.services.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.osgi.util.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.osgi.util.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cc67f97 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.osgi.util.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.annotations.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.annotations.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6d75fd8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.annotations.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..005f5b0 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation10.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6844538 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.cdcfoundation11.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se12.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se12.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0d205cf Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se12.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se13.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se13.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..dc1f847 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se13.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se14.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se14.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a26c195 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se14.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se15.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se15.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..101a6e1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.j2se15.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase16.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase16.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4d4fd46 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase16.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase17.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase17.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5cc4790 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase17.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase18.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase18.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d478f0c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.javase18.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.jre11.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.jre11.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a7ea97d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.jre11.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..10291cb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum10.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c2228f0 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum11.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ce66af7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ee.osgiminimum12.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.generator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.generator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d51422b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.generator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d731874 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.api.tools.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.api.tools.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d04a60d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.api.tools.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..aab588f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ds.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ds.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d2172b1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ds.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ds.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ds.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..200fd02 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ds.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.junit.runtime.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.junit.runtime.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..28d6468 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.junit.runtime.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.launching.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.launching.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..46d5d4e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.launching.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d470889 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.runtime.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.runtime.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..904ef11 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.runtime.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ua.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ua.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ca3a08a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ua.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ua.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ua.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e9bdb27 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ua.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5057962 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.pde.ui.templates.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.pde.ui.templates.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..315b5cc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.pde.ui.templates.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.platform.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.platform.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9086779 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.platform.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.sdk.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.sdk.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0c49351 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.sdk.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.search.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.search.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..74fd046 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.search.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d86e74e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.carbon.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..17a2e99 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5d4bf12 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.cocoa.macosx.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.examples.browser.demos.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.examples.browser.demos.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..11185d6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.examples.browser.demos.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.examples.launcher.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.examples.launcher.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cf674d8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.examples.launcher.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.examples.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.examples.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..73b4638 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.examples.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.examples.ole.win32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.examples.ole.win32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9c696dd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.examples.ole.win32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.examples.views.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.examples.views.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c6743bd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.examples.views.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b967846 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e9d5a25 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.aix.ppc64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e030e6a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..86d1c18 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.ia64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ia64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4853027 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ia64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..029e7ca Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5c98156 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..488c78e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.ppc64le.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5f01b8c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d166a70 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.s390x.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..12e1341 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6f1b89d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.linux.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8caa53f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3ce34f9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.gtk.solaris.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..965c9c1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.motif.aix.ppc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.motif.hpux.PA_RISC.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.motif.hpux.PA_RISC.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7aa4948 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.motif.hpux.PA_RISC.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8d10fcd Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.motif.hpux.ia64_32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..db999c6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.motif.linux.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7dc7fd3 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.motif.solaris.sparc.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4a16762 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.opengl.examples.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.opengl.examples.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0a579d2 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.opengl.examples.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.photon.qnx.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.photon.qnx.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c7cea94 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.photon.qnx.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.snippets.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.snippets.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..408fdfc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.snippets.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.tools.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.tools.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8fe5cbb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.tools.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.win32.wce_ppc.arm.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.win32.wce_ppc.arm.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4873b2e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.win32.wce_ppc.arm.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d4d15e7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.win32.win32.ia64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..7c8f26d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.win32.win32.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..46e592b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.win32.win32.x86_64.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.swt.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.swt.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..bc6e7e1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.swt.wpf.win32.x86.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..fc08664 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.cvs.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.cvs.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..cf19f19 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.cvs.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.cvs.ssh.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.cvs.ssh.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..189918e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.cvs.ssh.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.cvs.ssh2.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.cvs.ssh2.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5d11757 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.cvs.ssh2.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.cvs.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.cvs.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e9add64 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.cvs.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.examples.filesystem.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.examples.filesystem.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..33fdade Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.examples.filesystem.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.tests.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.tests.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..974f7e9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.tests.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.tests.cvs.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.tests.cvs.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a9622ff Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.tests.cvs.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.team.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.team.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..79a463a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.team.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.text.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.text.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3769afb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.text.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.browser.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.browser.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..81d9cf7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.browser.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.cheatsheets.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.cheatsheets.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9576030 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.cheatsheets.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.cocoa.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.cocoa.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..e40eef9 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.cocoa.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.console.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.console.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..c303d14 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.console.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.editors.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.editors.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0710efc Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.editors.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.contributions.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.contributions.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d0075e7 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.contributions.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.fieldassist.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.fieldassist.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..37da80a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.fieldassist.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.javaeditor.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.javaeditor.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..31e24eb Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.javaeditor.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.job.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.job.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..073a458 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.job.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.multipageeditor.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.multipageeditor.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6b25b49 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.multipageeditor.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.propertysheet.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.propertysheet.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8febf8d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.propertysheet.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.rcp.browser.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.rcp.browser.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..0e9191d Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.rcp.browser.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.readmetool.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.readmetool.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..356a0c1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.readmetool.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.undo.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.undo.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..95f907b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.undo.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.article.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.article.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..6730f19 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.article.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3f719f5 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.hockeyleague.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.logic.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.logic.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..572b744 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.examples.views.properties.tabbed.logic.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.externaltools.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.externaltools.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..4d20735 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.externaltools.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.forms.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.forms.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..381f152 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.forms.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.ide.application.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.ide.application.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..794f2db Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.ide.application.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.ide.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.ide.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..b6b5216 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.ide.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.images.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.images.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d446d2e Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.images.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.intro.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.intro.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..8c4e6b1 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.intro.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.intro.universal.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.intro.universal.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..10140e5 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.intro.universal.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.navigator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.navigator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d34c885 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.navigator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.navigator.resources.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.navigator.resources.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..3f1046b Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.navigator.resources.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.net.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.net.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..ef6722c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.net.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..5fd2209 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.tests.navigator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.tests.navigator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..f70a37a Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.tests.navigator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.tests.rcp.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.tests.rcp.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..dcdc356 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.tests.rcp.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.tests.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.tests.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..d26c2a6 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.tests.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.themes.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.themes.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..957ff68 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.themes.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.trace.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.trace.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..65e8972 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.trace.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.views.log.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.views.log.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..62b4972 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.views.log.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.views.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.views.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..53bdc40 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.views.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..a08fe0c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.views.properties.tabbed.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.win32.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.win32.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..85fac7f Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.win32.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.workbench.compatibility.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.workbench.compatibility.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..95ca1f8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.workbench.compatibility.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.workbench.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.workbench.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..9e7dd38 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.workbench.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.ui.workbench.texteditor.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.ui.workbench.texteditor.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..af1913c Binary files /dev/null and b/localization/ru/plugins/org.eclipse.ui.workbench.texteditor.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.update.configurator.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.update.configurator.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..47e35c0 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.update.configurator.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/localization/ru/plugins/org.eclipse.update.core.nl_ru_4.4.0.v20140623020002.jar b/localization/ru/plugins/org.eclipse.update.core.nl_ru_4.4.0.v20140623020002.jar new file mode 100644 index 0000000..96cced8 Binary files /dev/null and b/localization/ru/plugins/org.eclipse.update.core.nl_ru_4.4.0.v20140623020002.jar differ diff --git a/product/com.excelsior.xds.builder.nl_ru/.classpath b/product/com.excelsior.xds.builder.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.builder.nl_ru/.project b/product/com.excelsior.xds.builder.nl_ru/.project new file mode 100644 index 0000000..46f731f --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.builder.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.builder.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.builder.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..1b56cba --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/com/excelsior/xds/builder/internal/nls/messages_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.builder.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.builder.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..ba40218 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.builder.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.builder;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.builder.nl_ru/build.properties b/product/com.excelsior.xds.builder.nl_ru/build.properties new file mode 100644 index 0000000..80d1fc6 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment_ru.properties,\ + fragment.properties + diff --git a/product/com.excelsior.xds.builder.nl_ru/fragment.properties b/product/com.excelsior.xds.builder.nl_ru/fragment.properties new file mode 100644 index 0000000..8cf7db0 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.builder Russian NLS Support diff --git a/product/com.excelsior.xds.builder.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.builder.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..cdb1501 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/fragment_ru.properties @@ -0,0 +1,2 @@ +providerName=\u041e\u041e\u041e "\u042d\u043a\u0441\u0435\u043b\u044c\u0441\u0438\u043e\u0440" +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.builder diff --git a/product/com.excelsior.xds.builder.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.builder.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..d7bf715 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.builder diff --git a/product/com.excelsior.xds.builder.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.builder.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..48cf089 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/plugin_ru.properties @@ -0,0 +1,4 @@ +pluginName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0441\u0431\u043e\u0440\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c + +xds.resources.modulaBuilderName=\u041a\u043e\u043c\u043f\u043e\u043d\u043e\u0432\u0449\u0438\u043a XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 +xds.resources.modulaNatureName=XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 diff --git a/product/com.excelsior.xds.builder.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.builder.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..159e063 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,4 @@ +pluginName=Ïîääåðæêà ñáîðêè XDS Ìîäóëà-2 ïðîãðàìì + +xds.resources.modulaBuilderName=Êîìïîíîâùèê XDS Ìîäóëà-2 +xds.resources.modulaNatureName=XDS Ìîäóëà-2 diff --git a/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru.properties b/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru.properties new file mode 100644 index 0000000..9e13826 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru.properties @@ -0,0 +1,25 @@ +CompileDriver_CompilerExitCode=XDS \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 +CompileDriver_CompilerWasTerminated=\u0420\u0430\u0431\u043e\u0442\u0430 XDS \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430 + +Modula2SourceProjectNature_BuildingSources=\u0421\u0431\u043e\u0440\u043a\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430... + +XdsSourceBuilder_BadXcExePath=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430: "%s" +XdsSourceBuilder_BuildComplete=\u0421\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 +XdsSourceBuilder_BuildFailed=\u0421\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0430 \u043d\u0435\u0443\u0434\u0430\u0447\u043d\u043e +XdsSourceBuilder_BuildPrj=\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 %s +XdsSourceBuilder_BuildTerminated=\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430 +XdsSourceBuilder_CompilerError=\u041e\u0448\u0438\u0431\u043a\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 (\u043a\u043e\u0434 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f %d) +XdsSourceBuilder_CompilerWorkDir=\u0420\u0430\u0431\u043e\u0447\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430: %s +XdsSourceBuilder_InvalidWorkDir=\u0412 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0434\u043b\u044f XDS \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0447\u0430\u044f \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044f "%s" +XdsSourceBuilder_ModListComplete=\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +XdsSourceBuilder_NoMainModule=: \u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c - \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u044f \u043d\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u0430 +XdsSourceBuilder_NoPrjFile=\u041f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b (*.prj) \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +XdsSourceBuilder_PleaseSpecifySdk=\u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f +XdsSourceBuilder_PrjBuildStarted=\u041f\u0440\u043e\u0435\u043a\u0442 %s : \u0441\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 +XdsSourceBuilder_PrjGettingModuleList=\u041f\u0440\u043e\u0435\u043a\u0442 %s : \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u043f\u0438\u0441\u043a\u0430 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +XdsSourceBuilder_PrjMakeInvoked=\u041f\u0440\u043e\u0435\u043a\u0442 %s : \u0441\u0431\u043e\u0440\u043a\u0430 \u0437\u0430\u043f\u0443\u0449\u0435\u043d\u0430 \u0434\u043b\u044f %s, \u0442\u0438\u043f %s, \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b %s +XdsSourceBuilder_ProjectSummary=\u041f\u0440\u043e\u0435\u043a\u0442 %s : %s +XdsSourceBuilder_ConsoleName=XDS \u041a\u043e\u043d\u0441\u043e\u043b\u044c +XdsSourceBuilder_ConsoleOfProject=%s [\u041f\u0440\u043e\u0435\u043a\u0442: %s] + +TodoMarkerBuilder_JobName=\u041f\u043e\u0438\u0441\u043a \u0437\u0430\u0434\u0430\u0447 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 diff --git a/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..d099c88 --- /dev/null +++ b/product/com.excelsior.xds.builder.nl_ru/src/com/excelsior/xds/builder/internal/nls/messages_ru_1251.properties @@ -0,0 +1,25 @@ +CompileDriver_CompilerExitCode=XDS êîìïèëÿòîð çàâåðøèë ðàáîòó ñ êîäîì âîçâðàòà +CompileDriver_CompilerWasTerminated=Ðàáîòà XDS êîìïèëÿòîðà áûëà ïðåêðàùåíà + +Modula2SourceProjectNature_BuildingSources=Ñáîðêà èñõîäíîãî êîäà... + +XdsSourceBuilder_BadXcExePath=Íåêîððåêòíûé ïóòü äî êîìïèëÿòîðà: "%s" +XdsSourceBuilder_BuildComplete=Ñáîðêà çàâåðøåíà +XdsSourceBuilder_BuildFailed=Ñáîðêà çàâåðøåíà íåóäà÷íî +XdsSourceBuilder_BuildPrj=Ñáîðêà ïðîåêòà %s +XdsSourceBuilder_BuildTerminated=Ñáîðêà ïðåêðàùåíà +XdsSourceBuilder_CompilerError=Îøèáêà êîìïèëÿöèè (êîä çàâåðøåíèÿ %d) +XdsSourceBuilder_CompilerWorkDir=Ðàáî÷àÿ äèðåêòîðèÿ êîìïèëÿòîðà: %s +XdsSourceBuilder_InvalidWorkDir= ñâîéñòâàõ ïðîåêòà äëÿ XDS êîìïèëÿòîðà óêàçàíà íåêîððåêòíàÿ ðàáî÷àÿ äèðåêòîðèÿ "%s" +XdsSourceBuilder_ModListComplete=Çàâåðøåíî ïîëó÷åíèå ñïèñêà ìîäóëåé ïðîåêòà +XdsSourceBuilder_NoMainModule=: Íå óêàçàí ãëàâíûé ìîäóëü - êîìïèëÿöèÿ íå âîçìîæíà +XdsSourceBuilder_NoPrjFile=Ïðîåêòíûé ôàéë (*.prj) íå óêàçàí â ñâîéñòâàõ ïðîåêòà +XdsSourceBuilder_PleaseSpecifySdk=Óêàæèòå ñèñòåìó ïðîãðàììèðîâàíèÿ +XdsSourceBuilder_PrjBuildStarted=Ïðîåêò %s : ñáîðêà çàïóùåíà +XdsSourceBuilder_PrjGettingModuleList=Ïðîåêò %s : ïîëó÷åíèå ñïèñêà ìîäóëåé ïðîåêòà +XdsSourceBuilder_PrjMakeInvoked=Ïðîåêò %s : ñáîðêà çàïóùåíà äëÿ %s, òèï %s, ïàðàìåòðû %s +XdsSourceBuilder_ProjectSummary=Ïðîåêò %s : %s +XdsSourceBuilder_ConsoleName=XDS Êîíñîëü +XdsSourceBuilder_ConsoleOfProject=%s [Ïðîåêò: %s] + +TodoMarkerBuilder_JobName=Ïîèñê çàäà÷ â êîììåíòàðèÿõ diff --git a/product/com.excelsior.xds.builder/.classpath b/product/com.excelsior.xds.builder/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.builder/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.builder/.project b/product/com.excelsior.xds.builder/.project new file mode 100644 index 0000000..9f033a9 --- /dev/null +++ b/product/com.excelsior.xds.builder/.project @@ -0,0 +1,33 @@ + + + com.excelsior.xds.builder + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.builder/META-INF/MANIFEST.MF b/product/com.excelsior.xds.builder/META-INF/MANIFEST.MF new file mode 100644 index 0000000..3bff425 --- /dev/null +++ b/product/com.excelsior.xds.builder/META-INF/MANIFEST.MF @@ -0,0 +1,30 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.builder;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.builder.BuilderPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.core.resources, + org.apache.commons.io, + org.apache.commons.lang, + org.eclipse.ui.console, + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.ui, + com.google.guava, + org.apache.commons.collections, + org.eclipse.e4.core.di, + org.eclipse.e4.core.contexts, + org.eclipse.core.filesystem;bundle-version="1.4.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.builder.buildsettings, + com.excelsior.xds.builder.console, + com.excelsior.xds.builder.listener +Import-Package: com.excelsior.xds.parser.commons, + com.excelsior.xds.parser.modula.ast, + org.eclipse.core.variables, + org.eclipse.jface.text diff --git a/product/com.excelsior.xds.builder/build.properties b/product/com.excelsior.xds.builder/build.properties new file mode 100644 index 0000000..efe5dfd --- /dev/null +++ b/product/com.excelsior.xds.builder/build.properties @@ -0,0 +1,7 @@ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties + +source.. = src/ diff --git a/product/com.excelsior.xds.builder/plugin.properties b/product/com.excelsior.xds.builder/plugin.properties new file mode 100644 index 0000000..461e11c --- /dev/null +++ b/product/com.excelsior.xds.builder/plugin.properties @@ -0,0 +1,4 @@ +pluginName=XDS Modula-2 Build Support + +xds.resources.modulaBuilderName=XDS Modula-2 Builder +xds.resources.modulaNatureName=XDS Modula-2 \ No newline at end of file diff --git a/product/com.excelsior.xds.builder/plugin.xml b/product/com.excelsior.xds.builder/plugin.xml new file mode 100644 index 0000000..e282389 --- /dev/null +++ b/product/com.excelsior.xds.builder/plugin.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.builder/schema/listener.exsd b/product/com.excelsior.xds.builder/schema/listener.exsd new file mode 100644 index 0000000..b3e0d07 --- /dev/null +++ b/product/com.excelsior.xds.builder/schema/listener.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/BuilderPlugin.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/BuilderPlugin.java new file mode 100644 index 0000000..3d77447 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/BuilderPlugin.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.builder; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.builder.internal.resource.EncodingUpdater; + +public class BuilderPlugin implements BundleActivator { + + public static final String PLUGIN_ID = "com.excelsior.xds.builder"; //$NON-NLS-1$ + + private static BundleContext context; + + public static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + BuilderPlugin.context = bundleContext; + EncodingUpdater.install(); + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + EncodingUpdater.uninstall(); + BuilderPlugin.context = null; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/BuildSettingsCache.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/BuildSettingsCache.java new file mode 100644 index 0000000..a20cb47 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/BuildSettingsCache.java @@ -0,0 +1,443 @@ +package com.excelsior.xds.builder.buildsettings; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.builder.internal.buildsettings.parser.AbstractBuildSettingsParser; +import com.excelsior.xds.builder.internal.buildsettings.parser.EquationParser; +import com.excelsior.xds.builder.internal.buildsettings.parser.OptionParser; +import com.excelsior.xds.builder.listener.BuildListenerManager; +import com.excelsior.xds.builder.listener.IBuilderListener; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.BuildSettingsKey; +import com.excelsior.xds.core.builders.BuildSettingsKeyFactory; +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.builders.XdsBuildResult; +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.compiler.driver.CompileDriver.CompilationMode; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.process.InputStreamListener; +import com.excelsior.xds.core.process.ProcessLauncher; +import com.excelsior.xds.core.progress.DelegatingProgressMonitor; +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.resource.XdsResourceChangeListener; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.SdkManager; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.core.utils.time.ModificationStamp; + +public final class BuildSettingsCache extends XdsResourceChangeListener{ + /** + * options from xc larger than this will be truncated to this + */ + private static final int OPTION_TRUNCATION_LENGTH = 14; + /** + * equations from xc larger than this will be truncated to this + */ + private static final int EQUATION_TRUNCATION_LENGTH = 13; + + private static final String ERROR_OCCURED_WHILE_GETTING_BUILD_SETTINGS_MESSAGE = "Error occured while getting build settings"; + private static final String XDS_COMPILER_PROCESS_FINISHED_WITH_ERROR_MESSAGE = "Xds compiler process finished with error"; + + private final ReadWriteLock buildSettingsCacheLock = new ReentrantReadWriteLock(); + /** + * Holds instances of {@link BuildSettings} (aggregated in the {@link BuildSettingsData}).
+ * Guarded by {@link #buildSettingsCacheLock}. + */ + private final Map buildSettingsCache = new HashMap(); + + private Set buildSettingsCacheListeners = CollectionsUtils.newConcurentHashSet(3); + + private IBuilderListener builderListener = new BuilderListener(); + + private BuildSettingsCache() { + super(); + try { + BuildListenerManager.getInstance().addListener(builderListener); + } + catch(IllegalStateException e) { + // can happen when launched from the unit test in the standalone mode + } + } + + public static void addListener(IBuildSettingsCacheListener l) { + BuildSettingsFactoryHolder.INSTANCE.internalAddListener(l); + } + + public static void removeListener(IBuildSettingsCacheListener l) { + BuildSettingsFactoryHolder.INSTANCE.internalRemoveListener(l); + } + + public static BuildSettings createBuildSettings(IFile sourceIFile ) { + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(sourceIFile); + } + + public static BuildSettings createBuildSettings(IProject iProject ) { + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(iProject); + } + + public static BuildSettings createBuildSettings(IProject iproject, File sourceFile) { + return BuildSettingsCache.internalCreateBuildSettings(iproject, sourceFile); + } + + public static BuildSettings createBuildSettings(Sdk sdk, File workingDir, File prjFile) { + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(new BuildSettingsKey(sdk, workingDir, prjFile)); + } + + /** + * Invalidates build settings cache for the given xds project + * @param p + */ + public static void invalidateBuildSettingsCache(IProject p) { + BuildSettingsFactoryHolder.INSTANCE.internalInvalidateBuildSettingsCache(p); + } + + /** + * Invalidates build settings cache for the all xds projects + */ + public static void invalidateBuildSettingsCache() { + BuildSettingsFactoryHolder.INSTANCE.internalInvalidateBuildSettingsCache(); + } + + private void internalInvalidateBuildSettingsCache() { + List xdsProjects = ProjectUtils.getXdsProjects(); + for (IProject p : xdsProjects) { + internalInvalidateBuildSettingsCache(p); + } + } + + private void internalInvalidateBuildSettingsCache(IProject p) { + if (ProjectUtils.isXdsProject(p)) { + XdsProjectSettings projectSettings = XdsProjectSettingsManager.getXdsProjectSettings(p); + + File projectFile; + + { + IFile projectFileResource = ProjectUtils.getPrjFile(projectSettings); + if (projectFileResource != null) { + projectFile = ResourceUtils.getAbsoluteFile(projectFileResource); + } + else { + projectFile = null; + } + } + + Lock writeLock = buildSettingsCacheLock.writeLock(); + try{ + writeLock.lock(); + for (Iterator keyIterator = buildSettingsCache.keySet().iterator(); keyIterator.hasNext();) { + BuildSettingsKey key = (BuildSettingsKey) keyIterator.next(); + boolean isDelete = false; + if (projectFile == null && key.prjFile == null) { + isDelete = true; + } + else{ + if ((projectFile != null && key.prjFile != null) && + ResourceUtils.equalsPathesAsInFS(projectFile, key.prjFile)) { + isDelete = true; + } + } + if (isDelete){ + keyIterator.remove(); + } + } + } + finally { + writeLock.unlock(); + } + internalNotifyReload(p); + } + } + + private BuildSettings internalCreateBuildSettings(IFile sourceIFile ) { + BuildSettingsKey buildSettingsKey; + if (sourceIFile == null) { + buildSettingsKey = DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + } + else { + buildSettingsKey = BuildSettingsKeyFactory.createBuildSettingsKey(sourceIFile.getProject()); + } + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(buildSettingsKey); + } + + private BuildSettings internalCreateBuildSettings(IProject project) { + BuildSettingsKey buildSettingsKey = BuildSettingsKeyFactory.createBuildSettingsKey(project); + if (buildSettingsKey == null){ + buildSettingsKey = DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + } + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(buildSettingsKey); + } + + private static BuildSettings internalCreateBuildSettings(IProject project, + File sourceFile) { + BuildSettingsKey buildSettingsKey = BuildSettingsKeyFactory.createBuildSettingsKey(project, sourceFile); + if (buildSettingsKey == null){ + buildSettingsKey = DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + } + return BuildSettingsFactoryHolder.INSTANCE.internalCreateBuildSettings(buildSettingsKey); + } + + private BuildSettings internalCreateBuildSettings(BuildSettingsKey key) { + Sdk sdk = key.sdk; + File workingDir = key.workingDir; + File prjFile = key.prjFile; + + if (sdk == null) { + if (prjFile == null) { + return DefaultBuildSettingsHolder.DefaultBuildSettings; + } + try { + sdk = SdkManager.getInstance().getSdkSimulator(); + } catch (IOException e) { + LogHelper.logError("Build settings creation error", e); //$NON-NLS-1$ + return DefaultBuildSettingsHolder.DefaultBuildSettings; + } + } + + { + Lock readLock = buildSettingsCacheLock.readLock(); + try{ + readLock.lock(); + BuildSettingsData buildSettingsData = buildSettingsCache.get(key); + if (buildSettingsData != null && buildSettingsData.buildSettings != null){ + return buildSettingsData.buildSettings; + } + } + finally{ + readLock.unlock(); + } + } + + BuildSettings buildSettings = new BuildSettings(sdk, workingDir, prjFile); + + String compilerExe = sdk.getCompilerExecutablePath(); + List args = new ArrayList(3); + + if (prjFile != null) { + args = Arrays.asList("-prj=" + prjFile.getAbsolutePath()); //$NON-NLS-1$ + } + + try { + String options = getCompilerOutput(sdk, "=options", args, workingDir, compilerExe); //$NON-NLS-1$ + if (options == null) { + return DefaultBuildSettingsHolder.DefaultBuildSettings; + } + parseOptions(buildSettings, options); + + String equations = getCompilerOutput(sdk, "=equations", args, workingDir, compilerExe); //$NON-NLS-1$ + if (equations != null) { + parseEquations(buildSettings, equations); + } + String lookupEquations = getLookupEquations(sdk, workingDir, prjFile); + if (lookupEquations != null) { + buildSettings.setLookupEquations(lookupEquations); + } + } catch (CoreException e) { + LogHelper.logError(e); + } catch (IOException e) { + LogHelper.logError(ERROR_OCCURED_WHILE_GETTING_BUILD_SETTINGS_MESSAGE, e); + } + + Lock writeLock = buildSettingsCacheLock.writeLock(); + try{ + writeLock.lock(); + BuildSettingsData oldBuildSettingsData = buildSettingsCache.get(key); + ModificationStamp modificationStamp = new ModificationStamp(); + if (oldBuildSettingsData == null || modificationStamp.isGreaterThan(oldBuildSettingsData.modificationStamp)) { + buildSettingsCache.put(key, new BuildSettingsData(buildSettings, modificationStamp)); + } + } + finally{ + writeLock.unlock(); + } + + return buildSettings; + } + + /** + * SUMMARY : Parses {@code options}, add them to buildSettings

+ * + * For the options (from xc) with the name longer then {@link #OPTION_TRUNCATION_LENGTH} the following algorithm is used:
+ * Note that name from xc name longer then {@link #OPTION_TRUNCATION_LENGTH} can only have the following form : {@code (14-symbol prefix)'...'}

+ * + * Common prefix of length {@link #OPTION_TRUNCATION_LENGTH} is substringed, number of names for each such common prefix is computed.
+ * 1) if this number equals 1 - corresponding name (with this prefix) from parsed from xn is used + * 2) if this number greater than 1 - corresponding (optionName, optionValue) from parsed from xn is used

+ * + * Please see KIDE-329 for more
+ * @param buildSettings + * @param options options from xc - raw + * @throws IOException + */ + private static void parseOptions( final BuildSettings buildSettings + , String options ) throws IOException { + AbstractBuildSettingsParser optionParser = new AbstractBuildSettingsParser( + buildSettings.getSdk(), buildSettings.getPrjFile(), + buildSettings.getWorkDir(), OPTION_TRUNCATION_LENGTH, + new OptionParser(), CompilationMode.SHOW_OPTIONS) { + @Override + protected void settingParsed(String name, Boolean value) { + buildSettings.addOption(name, value); + } + }; + optionParser.parse(options); + } + + private static void parseEquations(final BuildSettings buildSettings, + String equations) throws IOException { + AbstractBuildSettingsParser equationParser = new AbstractBuildSettingsParser( + buildSettings.getSdk(), buildSettings.getPrjFile(), + buildSettings.getWorkDir(), EQUATION_TRUNCATION_LENGTH, + new EquationParser(), CompilationMode.SHOW_EQUATIONS) { + @Override + protected void settingParsed(String name, String value) { + buildSettings.addEquation(name, value); + } + }; + equationParser.parse(equations); + } + + private static String getCompilerOutput( Sdk sdk, String compilerMode + , List compilerArgs + , File workingDir, String compilerExe ) throws CoreException + { + ProcessLauncher procLauncher = new ProcessLauncher(); + procLauncher.addEnvironment(sdk.getEnvironmentVariables()); + procLauncher.setWorkingDirectory(workingDir); + + final StringBuilder sbXdsOutput = new StringBuilder(); + procLauncher.addProcessStdoutListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + sbXdsOutput.append(new String(buffer, 0, length)); + } + + @Override + public void onEndOfStreamReached() { + } + }); + + List args = new ArrayList(); + args.add(compilerExe); + args.addAll(compilerArgs); + + args.add(compilerMode); + procLauncher.setCommandline(args); + procLauncher.launch(); + if (procLauncher.exitValue() != 0) { + LogHelper.logError(XDS_COMPILER_PROCESS_FINISHED_WITH_ERROR_MESSAGE); + return null; + } + return sbXdsOutput.toString(); + } + + + private static String getLookupEquations(Sdk sdk, File workingDir, File prjFile) { + CompileDriver cd = new CompileDriver(sdk, null, DelegatingProgressMonitor.nullProgressMonitor()); + String prjFileLocation = (prjFile != null) ? prjFile.getAbsolutePath() : null; + String lookups = cd.getLookupEquations(prjFileLocation, workingDir); + return lookups; + } + + + final Set affectedProjects = new HashSet(); + + @Override + protected void endDeltaProcessing(IResourceDelta delta) { + for (IProject p : affectedProjects) { + invalidateBuildSettingsCache(p); + } + affectedProjects.clear(); + } + + @Override + protected boolean handleResourceChanged(IResourceDelta rootDelta, IResourceDelta delta, + IResource r) { + rememberAffectedProject(r); + return super.handleResourceChanged(rootDelta, delta, r); + } + + @Override + protected boolean handleResourceRemoved(IResourceDelta rootDelta, IResourceDelta delta, + IResource r) { + rememberAffectedProject(r); + return super.handleResourceRemoved(rootDelta, delta, r); + } + + private void rememberAffectedProject(IResource r) { + if (r instanceof IFile) { + IFile ifile = (IFile)r; + // if this ifile is xds project file - we will invalidate + // build settings cache for its project (since this project file is changed) + String path = ResourceUtils.getAbsolutePath(ifile); + if (XdsFileUtils.isXdsProjectFile(path)){ + affectedProjects.add(ifile.getProject()); + } + } + } + + private void internalAddListener(IBuildSettingsCacheListener l) { + buildSettingsCacheListeners.add(l); + } + + private void internalRemoveListener(IBuildSettingsCacheListener l) { + buildSettingsCacheListeners.remove(l); + } + + private void internalNotifyReload(IProject p) { + for (IBuildSettingsCacheListener l : buildSettingsCacheListeners) { + l.buildSettingsReload(p); + } + } + + private final class BuilderListener implements IBuilderListener { + @Override + public void onBuildStarted(IProject p) { + internalInvalidateBuildSettingsCache(p); + } + + @Override + public void onBuildFinished(IProject p, XdsBuildResult buildRes) { + } + } + + private static class BuildSettingsFactoryHolder{ + static BuildSettingsCache INSTANCE = new BuildSettingsCache(); + } + + /** + * Holds {@link BuildSettings} and {@link ModificationStamp} when instance of {@link BuildSettings} was put in to the {@link BuildSettingsCache#buildSettingsCache} + * @author lsa80 + */ + private static class BuildSettingsData { + final BuildSettings buildSettings; + final ModificationStamp modificationStamp; + + public BuildSettingsData(BuildSettings buildSettings, + ModificationStamp modificationStamp) { + this.buildSettings = buildSettings; + this.modificationStamp = modificationStamp; + } + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/IBuildSettingsCacheListener.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/IBuildSettingsCacheListener.java new file mode 100644 index 0000000..7d4d386 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/buildsettings/IBuildSettingsCacheListener.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.builder.buildsettings; + +import org.eclipse.core.resources.IProject; + +public interface IBuildSettingsCacheListener { + void buildSettingsReload(IProject p); +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/MarkerMaker.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/MarkerMaker.java new file mode 100644 index 0000000..4ed2cde --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/MarkerMaker.java @@ -0,0 +1,125 @@ +package com.excelsior.xds.builder.compile; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.Document; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.XdsMarkerConstants; + +public class MarkerMaker { + + public static class Location { + public IResource resource; + public int lineNumber; + public int posInLine; + public int length; + public int severity; + public int violation; + public String message; + } + + + public IMarker makeMarker(Location loc) throws CoreException { + IMarker marker = loc.resource.createMarker(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE); + marker.setAttribute(IMarker.MESSAGE, loc.message); + marker.setAttribute(IMarker.SEVERITY, loc.severity); + if (loc.resource instanceof IFile) { + marker.setAttribute(IMarker.LINE_NUMBER, loc.lineNumber); + try { + Document doc = getDoc((IFile)loc.resource); + int lineOffs = doc.getLineOffset(loc.lineNumber-1); + int lineLen = doc.getLineLength(loc.lineNumber-1); + int markOffs = lineOffs + loc.posInLine-1; + int markEnd = markOffs + getLexemLen(doc, markOffs); + if (markEnd <= lineOffs + lineLen) { // hbz + marker.setAttribute(IMarker.CHAR_START, markOffs); + marker.setAttribute(IMarker.CHAR_END, markEnd); + } + } catch (Exception e) {} + } + marker.setAttribute(XdsMarkerConstants.VIOLATION_ATTR, loc.violation); + return marker; + } + + private int getLexemLen(Document doc, int offs) throws Exception { + char ch, beg = Character.toLowerCase(doc.getChar(offs)); + boolean isName = isAlpha(beg); + boolean isNum = isDigit(beg); + boolean isString = beg == '"' || beg == '\''; + + if (!isString && !isName && !isNum) { + return 1; + } + + int len = 1; + for (; (ch = getch(doc, offs, len)) != 0; ++len) { + ch = getch(doc, offs, len); + if (isString && ch == beg) { + break; + } else if (isName && !isAlpha(ch) && !isDigit(ch)) { + break; + } else if (isNum && !isDigit(ch)) { + break; + } + } + return len; + } + + private boolean isDigit(char ch) { + return ch >= '0' && ch <= '9'; + } + + private boolean isAlpha(char ch) { + return (ch >= 'a' && ch <= 'z') || ch == '_'; + } + + private char getch(Document doc, int offset, int offs2) { + try { + char ch = Character.toLowerCase(doc.getChar(offset + offs2)); + if (ch == 0xd || ch == 0xa) { + ch = 0; + } + return ch; + } catch (Exception e) { + return 0; + } + } + + private Document getDoc(IFile file) throws Exception { + if (cachedFile != null && cachedFile.getFullPath().equals(file.getFullPath())) { + return cachedDoc; + } else { + return new Document(getText(file)); + } + } + + + public static String getText(IFile file) { + try (InputStream in = file.getContents()) { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + byte[] buf = new byte[1024]; + int read = in.read(buf); + while (read > 0) { + out.write(buf, 0, read); + read = in.read(buf); + } + return out.toString(); + } + catch (CoreException | IOException e) { + LogHelper.logError(e); + } + return StringUtils.EMPTY; + } + + private IFile cachedFile; + private Document cachedDoc; + +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/XdsSourceBuilder.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/XdsSourceBuilder.java new file mode 100644 index 0000000..4463bfa --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/compile/XdsSourceBuilder.java @@ -0,0 +1,746 @@ +package com.excelsior.xds.builder.compile; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.resources.IncrementalProjectBuilder; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.jobs.IJobManager; +import org.eclipse.core.runtime.jobs.Job; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.builder.compile.MarkerMaker.Location; +import com.excelsior.xds.builder.console.BuildConsoleManager; +import com.excelsior.xds.builder.internal.nls.Messages; +import com.excelsior.xds.builder.listener.BuildListenerManager; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.XdsBuildResult; +import com.excelsior.xds.core.builders.XdsSourceBuilderConstants; +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.compiler.compset.ExternalResourceManager; +import com.excelsior.xds.core.compiler.driver.CompilationTarget; +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.compiler.driver.XShellListener; +import com.excelsior.xds.core.console.ColorStreamType; +import com.excelsior.xds.core.console.IXdsConsole; +import com.excelsior.xds.core.console.XdsConsoleLink; +import com.excelsior.xds.core.jobs.IJobListener; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.MarkerUtils; +import com.excelsior.xds.core.marker.XdsMarkerConstants; +import com.excelsior.xds.core.progress.DelegatingProgressMonitor; +import com.excelsior.xds.core.progress.IListenableProgressMonitor; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.project.XdsProjectType; +import com.excelsior.xds.core.resource.EncodingUtils; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.resource.visitor.InterruptResourceVisitorException; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.text.TextEncoding; +import com.excelsior.xds.core.utils.BuildJob; +import com.excelsior.xds.core.utils.BuilderUtils; +import com.excelsior.xds.core.utils.EclipseCommandLineUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; + +public class XdsSourceBuilder extends IncrementalProjectBuilder { + + private static final String XDS_SOURCE_BUILDER_DEBUG_OPTION_NAME = "-XdsSourceBuilderDebug"; //$NON-NLS-1$ + private static final String IDE_INFO_MAGIC = "IDE_INFO_MAGIC_2128506--"; //$NON-NLS-1$ + + private boolean isCleanRebuild; + private MarkerMaker markerMaker = new MarkerMaker(); + private HashSetproblemSet = new HashSet(); + + public XdsSourceBuilder() { + } + + @Override + protected IProject[] build( final int kind, final Map args + , IProgressMonitor monitor ) throws CoreException + { + IProject project = getProject(); + ResourceUtils.refreshLocalSync(project); + final XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + final IResourceDelta delta = getDelta(project); + String buildItemId = args.get(BuilderUtils.MULTIPLE_BUILD_ITEM_ID); + boolean isRealMultipleBuild = BuilderUtils.isInRealMultipleBuild(buildItemId); + final IXdsConsole console = isRealMultipleBuild ? BuildConsoleManager.getConsole(null) : BuildConsoleManager.getConsole(xdsProjectSettings.getProject()); + + if (shouldBuild(kind, delta, xdsProjectSettings)) { + final Sdk currentSdk = xdsProjectSettings.getProjectSdk(); + if (currentSdk != null) { + ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() { + public void run(IProgressMonitor monitor) throws CoreException { + performBuild(xdsProjectSettings, kind, args, delta, currentSdk, console, monitor); + } + }, monitor); + } + else{ + deleteXdsMarkers(xdsProjectSettings.getProject(), false); + reportNoSdkDefinedProblem(Messages.XdsSourceBuilder_PleaseSpecifySdk); + console.println(Messages.XdsSourceBuilder_PleaseSpecifySdk, ColorStreamType.ERROR); + BuildListenerManager.getInstance().notifyBuildStarted(getProject()); + BuildListenerManager.getInstance().notifyBuildFinished(getProject(), XdsBuildResult.ERROR); + monitor.done(); + } + } + return null; + } + + @Override + protected void clean(IProgressMonitor monitor) throws CoreException { + // TODO : should remove compilation artifacts (obj, exe, ... etc) here, if it is possible + isCleanRebuild = true; + } + + private void performBuild ( final XdsProjectSettings xdsProjectSettings + , int kind, Map args + , IResourceDelta delta, Sdk currentSdk + , IXdsConsole console + , final IProgressMonitor monitor ) + { + + IListenableProgressMonitor delegatingMonitor; + if (monitor instanceof IListenableProgressMonitor) { + delegatingMonitor = (IListenableProgressMonitor) monitor; + } + else { + delegatingMonitor = DelegatingProgressMonitor.wrap(monitor); + } + problemSet.clear(); + BuildListenerManager.getInstance().notifyBuildStarted(getProject()); + + + XdsBuildResult buildRes = XdsBuildResult.ERROR; + String buildItemId = args.get(BuilderUtils.MULTIPLE_BUILD_ITEM_ID); + + try{ + if (checkCancel(delegatingMonitor)) return; + + if (BuilderUtils.isNotFirstInMultipleBuild(buildItemId)) { + console.println(""); //$NON-NLS-1$ + console.println(""); //$NON-NLS-1$ + console.println(""); //$NON-NLS-1$ + } else { + console = BuildConsoleManager.reinitializeConsole(console); + } + if (!isSkipMakeAndBuildInvocation(args)) { + console.printlnFiltered(String.format(Messages.XdsSourceBuilder_PrjBuildStarted, xdsProjectSettings.getProject().getName()), ColorStreamType.SYSTEM); + } else { + if (EclipseCommandLineUtils.isApplicationArgSet(XDS_SOURCE_BUILDER_DEBUG_OPTION_NAME)) { + console.printlnFiltered(String.format(Messages.XdsSourceBuilder_PrjGettingModuleList, xdsProjectSettings.getProject().getName()), ColorStreamType.SYSTEM); + } + } + + if (xdsProjectSettings.getProjectType() == null) { + return; + } + CompilationTarget compilationTarget = new CompilationTarget(xdsProjectSettings); + if (!compilationTarget.isValid()) { + if (XdsProjectType.MAIN_MODULE.equals(compilationTarget.getXdsProjectType())) { + console.println(xdsProjectSettings.getProject().getName() + Messages.XdsSourceBuilder_NoMainModule, ColorStreamType.ERROR); + return; + } + else if (XdsProjectType.PROJECT_FILE.equals(compilationTarget.getXdsProjectType())) { + console.println(Messages.XdsSourceBuilder_NoPrjFile, ColorStreamType.ERROR); + LogHelper.logError("XDS prj file is not set at project properties, though it should be", new IllegalAccessException()); //$NON-NLS-1$ + return; + } + } + + File compileDir = null; + try{ + compileDir = xdsProjectSettings.getXdsWorkingDir(); + } + catch(CoreException e) { + console.println(e.getMessage(), ColorStreamType.ERROR); + return; + } + if (!compileDir.isDirectory()) { + String s = String.format(Messages.XdsSourceBuilder_InvalidWorkDir, compileDir.getAbsolutePath()); + console.println(s, ColorStreamType.ERROR); + return; + } + + { + File xc = new File(currentSdk.getCompilerExecutablePath()); + if (!xc.isFile()) { + String s = String.format(Messages.XdsSourceBuilder_BadXcExePath, currentSdk.getCompilerExecutablePath()); + console.println(s, ColorStreamType.ERROR); + return; + } + } + cancelMonitorOnJobCancel(delegatingMonitor); + + CompileDriver compileDriver = new CompileDriver(currentSdk, console, delegatingMonitor); + // TODO : get rid of compilation set retrieval from here + List compilationSetFiles = compilationTarget.getCompilationSetFiles(compileDriver); + + CompilationSetManager.getInstance().replaceCompilationSet(xdsProjectSettings.getProject(), compilationSetFiles); + + try { + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(xdsProjectSettings.getProject()); + ExternalResourceManager.linkExternals( + xdsProjectSettings.getProject(), + buildSettings.getLookupDirs(), true, + true, delegatingMonitor); + // TODO : 2016 : isGetLibraryFileSetRequired(args) - seems like we can remove these params + // TODO : 2016 : isGetCompilationSetRequired(args) - seems like we can remove these params + } catch (CoreException e) { + LogHelper.logError(e); + } + + // Init progressbar in the monitor: + final int filesProgress[] = new int[1]; + guessJobSize(compilationSetFiles, filesProgress); + + String jobName = String.format(Messages.XdsSourceBuilder_BuildPrj, xdsProjectSettings.getProject().getName()); + delegatingMonitor.beginTask(jobName, filesProgress[0]); + + String absolutePath = ResourceUtils.getAbsolutePath(compilationTarget.getCompilationTargetFile()); + final String workingDirectory = FilenameUtils.getFullPath(absolutePath); + + XShellListener xShellListener = createXShellListener(xdsProjectSettings, delegatingMonitor, xdsProjectSettings.getProject(), workingDirectory, + compilationSetFiles, console, filesProgress); + + BuildParamaters buildParameters = new BuildParamaters(args); + if (isSkipMakeAndBuildInvocation(args)) { + buildRes = XdsBuildResult.SUCCESS; + } else { + console.printlnFiltered(String.format(Messages.XdsSourceBuilder_PrjMakeInvoked, + xdsProjectSettings.getProject().getName(), absolutePath, kind, args), ColorStreamType.SYSTEM); + console.printlnFiltered(String.format(Messages.XdsSourceBuilder_CompilerWorkDir, compileDir.getAbsolutePath()), ColorStreamType.SYSTEM); + + if (!buildParameters.sourcesForCompilation.isEmpty()) { // Builder is invoked programatically - no delta + // Compile one file (may be more than one?): + boolean isMake = ! args.containsKey(XdsSourceBuilderConstants.COMPILE_FILE_KEY); + boolean isRebuild = ! isMake || isCleanRebuild || FULL_BUILD == kind; + deleteXdsMarkers(xdsProjectSettings.getProject(), true); + for (String sourcePath : buildParameters.sourcesForCompilation) { + IResource resource = ResourceUtils.getResource(xdsProjectSettings.getProject(), new File(sourcePath).toURI()); + if (resource != null) { + try { + resource.deleteMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, true, IResource.DEPTH_ZERO); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + String prjFile = null; + if (XdsProjectType.PROJECT_FILE.equals(compilationTarget.getXdsProjectType())) { + prjFile = ResourceUtils.getAbsolutePath(compilationTarget.getCompilationTargetFile()); + } + buildRes = compileDriver.compileModule(sourcePath, prjFile, compileDir, isRebuild, isMake, xShellListener); + } + } + else { + // Make or rebuild the project: + boolean isRebuild = isCleanRebuild || args.containsKey(XdsSourceBuilderConstants.REBUILD_PROJECT_KEY); + deleteXdsMarkers(xdsProjectSettings.getProject(), !isRebuild); + + if (XdsProjectType.MAIN_MODULE.equals(compilationTarget.getXdsProjectType())) { + removeMarkersFromDeltaFiles(xdsProjectSettings); + buildRes = compileDriver.compileModule(absolutePath, compileDir, isRebuild, true, xShellListener); + } + else if (XdsProjectType.PROJECT_FILE.equals(compilationTarget.getXdsProjectType())) { + removeMarkersFromDeltaFiles(xdsProjectSettings); + buildRes = compileDriver.compileProject(absolutePath, compileDir, isRebuild, xShellListener); + } + } + } + + ResourceUtils.refreshLocalSync(getProject()); + + if (filesProgress[0] > 0) { + delegatingMonitor.worked(filesProgress[0]); + } + + } + finally{ + String summary; + ColorStreamType cs; + XdsConsoleLink link; + boolean filtered; + if (buildRes == XdsBuildResult.SUCCESS) { + if (!isSkipMakeAndBuildInvocation(args)) { + summary = Messages.XdsSourceBuilder_BuildComplete; + } else { + summary = Messages.XdsSourceBuilder_ModListComplete; + } + cs = ColorStreamType.SYSTEM; + link = null; + filtered = true; + } else { + if (buildRes == XdsBuildResult.TERMINATED) { + summary = Messages.XdsSourceBuilder_BuildTerminated; + } else { + summary = Messages.XdsSourceBuilder_BuildFailed; + } + cs = ColorStreamType.ERROR; + link = XdsConsoleLink.mkLinkToProblemsView(); + filtered = false; + } + String fullSummary = String.format(Messages.XdsSourceBuilder_ProjectSummary, xdsProjectSettings.getProject().getName(), summary); + if (filtered) { + console.printlnFiltered(fullSummary, cs); + } else { + console.println(fullSummary, cs, link); + } + console.println(""); + + if (buildItemId != null) { + BuilderUtils.multipleBuildItemFinished(buildItemId, buildRes, summary); + } + isCleanRebuild = false; + BuildListenerManager.getInstance().notifyBuildFinished(getProject(), buildRes); + delegatingMonitor.done(); + } + } + + /** + * Observes the state of the job and cancels the monitor on job cancelation + * @param monitor + */ + private void cancelMonitorOnJobCancel(final IProgressMonitor monitor) { + IJobManager jobMan = Job.getJobManager(); + Job[] build = jobMan.find(BuilderUtils.BUILD_JOB_FAMILY); + BuildJob buildJob = null; + if (build.length == 1) { + if (build[0] instanceof BuildJob) { + buildJob = (BuildJob) build[0]; + buildJob.addListener(new IJobListener() { + @Override + public void canceled() { + monitor.setCanceled(true); + } + }); + } + } + } + + protected void guessJobSize(List compilationSetFiles, + final int[] filesProgress) { + filesProgress[0] = 1; // ~= job size to show projressbar + for (String s: compilationSetFiles) { + s = s.toLowerCase(); + if (s.endsWith("mod") || s.endsWith("ob2")) { //$NON-NLS-1$ //$NON-NLS-2$ + ++ filesProgress[0]; + } + } + } + + protected XShellListener createXShellListener( + final XdsProjectSettings xdsProjectSettings, + final IProgressMonitor monitor, final IProject project, final String workingDirectory, + final List compilationSetFiles, + final IXdsConsole console, + final int[] filesProgress) + { + return new XShellListener(){ + Set cleanedResources = new HashSet(); + boolean errorsFound = false; + + @Override + public void onJobCaption(String caption){ + monitor.subTask(caption); + // seems that onJobProgress called 1 time for each module: + monitor.worked(1); + --filesProgress[0]; + + // 'caption' ~= 'Compiling zzz.def' or 'Compiling "c:\dir\zzz.def"' + // Search zzz.def resource in the compilation set and clear markers in it: + String fname = caption.trim(); + if (fname.contains(" ")) { //$NON-NLS-1$ + fname = fname.substring(fname.lastIndexOf(' ')+1); + } + if (fname.length()>2 && fname.startsWith("\"") && fname.endsWith("\"")) { //$NON-NLS-1$ //$NON-NLS-2$ + fname = fname.substring(1, fname.length()-1); + } + File fabs = new File(fname); + if (!fabs.isAbsolute()) { + fabs = null; + if (fname.contains("\\")) { //$NON-NLS-1$ + fname = fname.substring(fname.lastIndexOf('\\')+1); + } + if (fname.contains("/")) { //$NON-NLS-1$ + fname = fname.substring(fname.lastIndexOf('/')+1); + } + } + for (String s : compilationSetFiles) { + File f = new File(s); + if ((fabs == null && f.getName().equals(fname)) || + (fabs != null && FilenameUtils.equalsNormalizedOnSystem(fabs.getAbsolutePath(), f.getAbsolutePath()))) { + // This file is going to be compiled. Clear all markers in it: + String relativeFilePath = ResourceUtils.getRelativePath(xdsProjectSettings.getProject(), f.getAbsolutePath()); + if (relativeFilePath != null) { // this file is inside project + IResource res = xdsProjectSettings.getProject().getFile(relativeFilePath); + if (!cleanedResources.contains(res)) { + cleanedResources.add(res); + try { + res.deleteMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, false, IResource.DEPTH_ZERO); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + break; + } + } + } + + + @Override + public void onJobStart(int progressLimit, String comment) { + //monitor.beginTask("Building sources...", progressLimit); + } + + @Override + public void onJobProgress(int commentProgress, int progress) { + //monitor.worked(progress); + } + + @Override + public void onJobComment(String comment) { + + // New compilers may send some info to IDE via env.errors.SendIdeInfo(name, value) + // using JobComments with the magic string: + if (comment.startsWith(IDE_INFO_MAGIC)) { + comment = comment.substring(IDE_INFO_MAGIC.length()); + int eqpos = comment.indexOf('='); + if (eqpos > 0) { + String name = comment.substring(0, eqpos).trim(); + String value = comment.substring(eqpos+1).trim(); + + // OutputEncoding=OEM or OutputEncoding=Windows: + if ("OutputEncoding".equals(name)) { + if ("OEM".equals(value)) { + // Linkers uses OEM encoding, old compilers with __XDS_SHELL_ uses 1251. + // But new compiler understands __XDS_SHELL__=[Eclipse],[UseOEM] and + // sends us its encoding. Turn to OEM if this functionality is supported and turned ON: + this.setStreamCharset(TextEncoding.whatCharsetToUse(EncodingUtils.DOS_ENCODING)); + } + } + + } + } + } + + + @Override + public void onMessage( MessageType messageType, int messageCode, String message + , String fileName, int line, int pos ) + { + if (!new File(fileName).isAbsolute()) { + fileName = FilenameUtils.concat(workingDirectory, fileName); + } + + int severity; + char chMode; + ColorStreamType clrStream; + switch(messageType){ + case COMPILE_ERROR: + case COMPILE_FATAL_ERROR: + severity = IMarker.SEVERITY_ERROR; + chMode = 'E'; + clrStream = ColorStreamType.XDS_LOG_ERROR; + break; + case COMPILE_WARNING: + severity = IMarker.SEVERITY_WARNING; + chMode = 'W'; + clrStream = ColorStreamType.XDS_LOG_WARNING; + break; + default: + severity = IMarker.SEVERITY_INFO; + chMode = ' '; + clrStream = ColorStreamType.NORMAL; + } + + String consoleErr = String.format("* [%s %d.%02d %c%03d]\n* %s", //$NON-NLS-1$ + fileName, + line, + pos, + chMode, + messageCode, + message); + + IMarker marker = null; + + String relativeFilePath = ResourceUtils.getRelativePath(xdsProjectSettings.getProject(), fileName); + Location loc = new Location(); + if (relativeFilePath != null) { // this file is inside project + loc.resource = xdsProjectSettings.getProject().getFile(relativeFilePath); + loc.lineNumber = line; + loc.posInLine = pos; + } + else { + loc.resource = xdsProjectSettings.getProject(); + } + + if (loc.resource.exists()) { + if (!(loc.resource instanceof IProject) && !cleanedResources.contains(loc.resource)) { + // 1st marker in the file: remove previous markers if any: + cleanedResources.add(loc.resource); + try { + loc.resource.deleteMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, false, IResource.DEPTH_ZERO); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + loc.severity = severity; + loc.message = message; + marker = reportProblem(loc); // null when message duplicates previously reported + + errorsFound |= (severity == IMarker.SEVERITY_ERROR); + } + + if (marker != null) { + if (marker.getResource() instanceof IFile) { + console.println(consoleErr, clrStream, new XdsConsoleLink(marker)); + } else { + // marker w/o file position, links not works (marker.getResource() may be project here) + console.println(consoleErr, clrStream); + } + } + + } + + @Override + public void onConsoleString(String str) { + if (str.startsWith("VLINK (D)") && str.contains("Linker")) { //$NON-NLS-1$ //$NON-NLS-2$ + // Seems that linker may output in cp1251 with '-w' key and we can + // change 'xv.tem' file and turn off this dirty patch, but ..... + this.setStreamCharset(TextEncoding.whatCharsetToUse(EncodingUtils.DOS_ENCODING)); // The VAX linker will print in cp866 after XDS compiler's cp1251... //$NON-NLS-1$ + } + console.println(str); + } + + @Override + public void onParsingError(String message) { + CompilationSetManager.getInstance().removeFromCompilationSet(project); + console.println(message, ColorStreamType.ERROR); + } + + @Override + public void onCompilerExit(int exitCode) { + if (exitCode != 0 && !errorsFound) { + Location loc = new Location(); + loc.resource = xdsProjectSettings.getProject(); + loc.message = String.format(Messages.XdsSourceBuilder_CompilerError, exitCode); + loc.severity = IMarker.SEVERITY_ERROR; + loc.violation = XdsMarkerConstants.NO_SDK_ERROR; + reportProblem(loc); + } + } + + }; + } + + private static boolean isSkipMakeAndBuildInvocation(Map args) { + return args != null && ( + args.containsKey(XdsSourceBuilderConstants.GET_COMPILATION_SET_ONLY_KEY) || + args.containsKey(XdsSourceBuilderConstants.GET_LIBRARY_FILE_SET_ONLY_KEY)); + } + + private class BuildParamaters{ + List sourcesForCompilation = new ArrayList(); + + BuildParamaters(Map buildParamaters) { + if (buildParamaters != null) { + for (Map.Entry keyValuePair : buildParamaters.entrySet()) { + if (keyValuePair.getKey() != null && keyValuePair.getKey().startsWith(XdsSourceBuilderConstants.SOURCE_FILE_PATH_KEY_PREFIX)) { + sourcesForCompilation.add(keyValuePair.getValue()); + } + } + } + } + } + + private void removeMarkersFromDeltaFiles(final XdsProjectSettings xdsProjectSettings) { + IResourceDelta delta = getDelta(xdsProjectSettings.getProject()); + if (delta == null) { // full build case - nothing to do + return; + } + try { + delta.accept(new IResourceDeltaVisitor() { + @Override + public boolean visit(IResourceDelta delta) throws CoreException { + if (isDeltaResourceTargetForXdsProject(xdsProjectSettings, delta)) { + MarkerUtils.deleteBuildProblemMarkers(delta.getResource(), true, IResource.DEPTH_ZERO); + } + + IResourceDelta[] affectedChildren = delta.getAffectedChildren(); + for (int i = 0; i < affectedChildren.length; i++) { + affectedChildren[i].accept(this); + } + + return true; + } + }); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + private void reportNoSdkDefinedProblem(String message) { + Location loc = new Location(); + loc.resource = getProject(); + loc.message = message; + loc.severity = IMarker.SEVERITY_ERROR; + loc.violation = XdsMarkerConstants.NO_SDK_ERROR; + reportProblem(loc); + } + + /** + * Report the specified problem to the user. + * Returns null when this message si duplicated so no need to create new marker and it may be + * reason to don't print it again to the console + */ + private IMarker reportProblem(Location loc) { + loc.message = filterChars(loc.message); // KIDE-294 + IMarker marker = null; + String toString = String.format("%s [%d:%d]: %s", loc.resource.toString(), loc.lineNumber, loc.posInLine, loc.message); //$NON-NLS-1$ + if (problemSet.add(toString)) { // KIDE-155: inline may cause duplicated messages, reject them + try { + marker = markerMaker.makeMarker(loc); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + return marker; + } + + private String filterChars(String s) { + StringBuilder sb = null; + for (int i=0; i projectNameToXdsConsole = new HashMap(); // IProject name -> consoleProxy + + public static IXdsConsole getConsole(IProject project){ + return instance().internalGetConsole(project); + } + + public IXdsConsole getAndConfigureConsole(String id) { + final IXdsConsole console = consoleFactory.getXdsConsole(id); + // default encoding required to print text with println(String) to ConsoleProxy.getInstance() + console.setEncoding(null); + if (XdsConsoleSettings.getShowOnBuild()) { + ConsolePlugin.getDefault().getConsoleManager().showConsoleView((IConsole)console); + } + if (XdsConsoleSettings.getClearBeforeBuild()) { + console.clearConsole(); + } + + // Console.setBackground is ignored in console constructor (console has no view at that time) so set it here: + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + console.setBackground(ColorStreamType.BACKGROUND.getRgb()); + } + }); + return console; + } + + public static IXdsConsole reinitializeConsole(IXdsConsole console) { + return instance().getAndConfigureConsole(console.getName()); + } + + private IXdsConsole internalGetConsole(IProject project){ + String projectName = getProjectName(project); + IXdsConsole console = projectNameToXdsConsole.get(projectName); + if (console == null) { + console = getAndConfigureConsole(createConsoleName(project)); + projectNameToXdsConsole.put(projectName, console); + } + return console; + } + + private BuildConsoleManager() { + if (consoleFactory == null) { + consoleFactory = ServiceHolder.getInstance().getConsoleFactory(); + } + } + + private static BuildConsoleManager instance() { + return ConsoleProxyHolder.INSTANCE; + } + + private String getProjectName(IProject p) { + return p == null ? "" : p.getName(); + } + + private static String createConsoleName(IProject p) { + String title = Messages.XdsSourceBuilder_ConsoleName; + if (p != null) { + title = String.format(Messages.XdsSourceBuilder_ConsoleOfProject, Messages.XdsSourceBuilder_ConsoleName, p.getName()); + } + return title; + } + + private static final class ConsoleProxyHolder { + final static BuildConsoleManager INSTANCE = new BuildConsoleManager(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/AbstractBuildSettingsParser.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/AbstractBuildSettingsParser.java new file mode 100644 index 0000000..c3a75bc --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/AbstractBuildSettingsParser.java @@ -0,0 +1,154 @@ +package com.excelsior.xds.builder.internal.buildsettings.parser; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.compiler.driver.CompileDriver.CompilationMode; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.google.common.collect.ArrayListMultimap; + +/** + * Calls settings parser (setting is either option or equation), may call xn.exe to resolve conflicts related to option truncation. + * + * @param - type of the option value + */ +public abstract class AbstractBuildSettingsParser { + private final Sdk sdk; + private final File prjFile; + private final File workDir; + private final int truncationNameLength; + private final ISettingsParser settingsParser; + private final CompilationMode compilationMode; + + private final String[] longXcOptionNames = new String[]{"CODENAMEPREFIXED", "PRESERVENAMECASE","SUPPRESS_UNDEFINED_FLOAT"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private Set truncatedLongXcOptionNames; // used as 'last resort', when recovery using xn fails. + + protected AbstractBuildSettingsParser(Sdk sdk, File prjFile, File workDir, int truncationNameLength, + ISettingsParser settingsParser, CompilationMode compilationMode) { + this.sdk = sdk; + this.prjFile = prjFile; + this.workDir = workDir; + this.truncationNameLength = truncationNameLength; + this.settingsParser = settingsParser; + this.compilationMode = compilationMode; + this.truncatedLongXcOptionNames = new HashSet(); + for(String optionName : longXcOptionNames) { + truncatedLongXcOptionNames.add(truncateName(optionName)); + } + } + + public void parse(String settings) throws IOException { + class XcSettings implements ISettingsParserListener{ + Map> truncatedSettingName2Values = new HashMap>(); // truncatedOptionName -> optionValues mapping + ArrayListMultimap truncatedSettingName2Names = ArrayListMultimap.create(); // commonSettingPrefix -> settingNames mapping + + @Override + public void settingParsed(String settingName, T value) { + String truncatedSettingName = truncateName(settingName); + if (truncatedSettingName.equals(settingName)) { + AbstractBuildSettingsParser.this.settingParsed(settingName, value); + } + else{ + List values = truncatedSettingName2Values.get(truncatedSettingName); + if (values == null) { + values = new ArrayList(); + truncatedSettingName2Values.put(truncatedSettingName, values); + } + values.add(value); + truncatedSettingName2Names.put(truncatedSettingName, settingName); + } + } + } + + XcSettings xcSettings = new XcSettings(); // settings parsed from xc.exe + settingsParser.addListener(xcSettings); + settingsParser.parse(settings); + settingsParser.removeListener(xcSettings); + + if (xcSettings.truncatedSettingName2Values.size() > 0) { + class XnSettings implements ISettingsParserListener{ + Map settingName2Value = new HashMap(); // settingName -> settingValue mapping + ArrayListMultimap truncatedSettingName2Names = ArrayListMultimap.create(); // commonSettingPrefix -> settingNames mapping + + @Override + public void settingParsed(String settingName, T value) { + String truncatedSettingName = truncateName(settingName); + if (!truncatedSettingName.equals(settingName)) { + settingName2Value.put(settingName, value); + truncatedSettingName2Names.put(truncatedSettingName, settingName); + } + } + } + + List args = Collections.emptyList(); + CompileDriver compileDriver = new CompileDriver(sdk); + String xnOutput = compileDriver.getCompilerSimulatorOutput( + compilationMode, prjFile, args, workDir + ); + if (xnOutput != null) { + XnSettings xnSettings = new XnSettings(); // settings parsed from xn.exe + settingsParser.addListener(xnSettings); + settingsParser.parse(xnOutput); + settingsParser.removeListener(xnSettings); + + for ( Map.Entry> keyValue : xcSettings.truncatedSettingName2Values.entrySet()) { + String truncateSettingName = keyValue.getKey(); + List settingValues = keyValue.getValue(); + List conflictingSettingNames = xnSettings.truncatedSettingName2Names.get(truncateSettingName); + if (conflictingSettingNames != null) { + if (settingValues.size() > 1) { + for (String conflictingSettingName : conflictingSettingNames) { + AbstractBuildSettingsParser.this.settingParsed(conflictingSettingName, xnSettings.settingName2Value.get(conflictingSettingName)); + } + } + else { // keyValue.getValue().size() == 1 + if (conflictingSettingNames.size() == 1) { + String fullSettingName = conflictingSettingNames.get(0); + AbstractBuildSettingsParser.this.settingParsed(fullSettingName, settingValues.get(0)); + } + } + } + else{ + boolean isResolved = false; + if (truncatedLongXcOptionNames.contains(truncateSettingName)) { + List conflictingSettingNamesOfXc = xcSettings.truncatedSettingName2Names.get(truncateSettingName); + List conflictingSettingValuesOfXc = xcSettings.truncatedSettingName2Values.get(truncateSettingName); + if (CollectionsUtils.size(conflictingSettingNamesOfXc) == 1 && CollectionsUtils.size(conflictingSettingValuesOfXc) == 1) { + isResolved = true; + AbstractBuildSettingsParser.this.settingParsed(conflictingSettingNamesOfXc.get(0), conflictingSettingValuesOfXc.get(0)); + } + } + + + if (!isResolved){ + // TODO : localize + LogHelper.logError(String.format("Failed to resolve conflicts for the truncated option '%s'. xn doesnot know about this option.", truncateSettingName)); + } + } + } + } + } + } + + private String truncateName(String name) { + if (name.length() > truncationNameLength) { + name = name.substring(0, truncationNameLength); + } + return name; + } + + /** + * Setting was parsed, conflicts are resolved. + */ + protected abstract void settingParsed(String name, T value); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/EquationParser.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/EquationParser.java new file mode 100644 index 0000000..6289195 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/EquationParser.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.builder.internal.buildsettings.parser; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.util.Collection; +import java.util.HashSet; + + +public class EquationParser implements ISettingsParser{ + private Collection> listeners = new HashSet>(2); + + public void addListener(ISettingsParserListener listener) { + listeners.add(listener); + } + + public void removeListener(ISettingsParserListener listener) { + listeners.remove(listener); + } + + public void parse(String equations) throws IOException { + String line; + BufferedReader br = new BufferedReader(new StringReader(equations)); + while ((line = br.readLine()) != null) { + line = line.trim(); + if (line.startsWith("-")) { //$NON-NLS-1$ + int eqpos = line.indexOf('='); //$NON-NLS-1$ + if (eqpos > 1) { + String name = line.substring(1, eqpos).trim(); + String val = line.substring(eqpos+1).trim(); + notifyListeners(name, val); + } + } + } + } + + private void notifyListeners(String optionName, String value) { + for (ISettingsParserListener listener : listeners) { + listener.settingParsed(optionName, value); + } + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParser.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParser.java new file mode 100644 index 0000000..ab40872 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParser.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.builder.internal.buildsettings.parser; + +import java.io.IOException; + +/** + * Simple streaming parser of the options. Each (settingName,settingValue) is reported to listeners + * @author lsa80 + */ +public interface ISettingsParser { + void addListener(ISettingsParserListener listener); + void removeListener(ISettingsParserListener listener); + void parse(String equations) throws IOException; +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParserListener.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParserListener.java new file mode 100644 index 0000000..cd1a78c --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/ISettingsParserListener.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.builder.internal.buildsettings.parser; + +/** + * Notification about was parsed + * + * @author lsa80 + * @param - type of the option value + */ +public interface ISettingsParserListener { + void settingParsed(String settingName, T settingValue); +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/OptionParser.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/OptionParser.java new file mode 100644 index 0000000..6359aa7 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/buildsettings/parser/OptionParser.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.builder.internal.buildsettings.parser; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.StringReader; +import java.util.Collection; +import java.util.HashSet; + + +public final class OptionParser implements ISettingsParser +{ + private Collection> listeners = new HashSet>(2); + + public void addListener(ISettingsParserListener listener) { + listeners.add(listener); + } + + public void removeListener(ISettingsParserListener listener) { + listeners.remove(listener); + } + + public void parse(String options) throws IOException { + String line; + StringBuilder optionNameBuf = new StringBuilder(); + BufferedReader br = new BufferedReader(new StringReader(options)); + while ((line = br.readLine()) != null) { + line = line.trim(); + boolean val; + while ((val = line.startsWith("+")) || line.startsWith("-")) { //$NON-NLS-1$ //$NON-NLS-2$ + optionNameBuf.setLength(0); + int i; + for (i=1; i 0) { + String optionName = optionNameBuf.toString(); + notifyListeners(optionName, val); + } + } + } + } + + private void notifyListeners(String optionName, Boolean value) { + for (ISettingsParserListener listener : listeners) { + listener.settingParsed(optionName, value); + } + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/Messages.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/Messages.java new file mode 100644 index 0000000..f646d56 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/Messages.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.builder.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.builder.internal.nls.messages"; //$NON-NLS-1$ + + public static String CompileDriver_CompilerExitCode; + public static String CompileDriver_CompilerWasTerminated; + + public static String Modula2SourceProjectNature_BuildingSources; + + public static String XdsSourceBuilder_BadXcExePath; + public static String XdsSourceBuilder_BuildComplete; + public static String XdsSourceBuilder_BuildFailed; + public static String XdsSourceBuilder_BuildPrj; + public static String XdsSourceBuilder_BuildTerminated; + public static String XdsSourceBuilder_CompilerError; + + public static String XdsSourceBuilder_CompilerWorkDir; + public static String XdsSourceBuilder_InvalidWorkDir; + public static String XdsSourceBuilder_ModListComplete; + public static String XdsSourceBuilder_NoMainModule; + public static String XdsSourceBuilder_NoPrjFile; + public static String XdsSourceBuilder_PleaseSpecifySdk; + public static String XdsSourceBuilder_PrjBuildStarted; + public static String XdsSourceBuilder_PrjGettingModuleList; + public static String XdsSourceBuilder_PrjMakeInvoked; + public static String XdsSourceBuilder_ProjectSummary; + public static String XdsSourceBuilder_ConsoleName; + public static String XdsSourceBuilder_ConsoleOfProject; + + public static String TodoMarkerBuilder_JobName; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/messages.properties b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/messages.properties new file mode 100644 index 0000000..dea9899 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/nls/messages.properties @@ -0,0 +1,25 @@ +CompileDriver_CompilerExitCode=XDS compiler finished with exit code +CompileDriver_CompilerWasTerminated=XDS compiler was terminated + +Modula2SourceProjectNature_BuildingSources=Building sources... + +XdsSourceBuilder_BadXcExePath=Bad compiler executable path: "%s" +XdsSourceBuilder_BuildComplete=Build complete +XdsSourceBuilder_BuildFailed=Build failed +XdsSourceBuilder_BuildPrj=Build project %s +XdsSourceBuilder_BuildTerminated=Build terminated +XdsSourceBuilder_CompilerError=Compilation error (exit code %d) +XdsSourceBuilder_CompilerWorkDir=Compiler working directory: %s +XdsSourceBuilder_InvalidWorkDir=Invalid XDS compiler working directory "%s" specified in the Project properties +XdsSourceBuilder_ModListComplete=Getting project modules list complete +XdsSourceBuilder_NoMainModule=: Main module is not specified - compilation will not be performed +XdsSourceBuilder_NoPrjFile=XDS prj-file is not specified in project properties +XdsSourceBuilder_PleaseSpecifySdk=Please specify SDK +XdsSourceBuilder_PrjBuildStarted=Project %s : build started +XdsSourceBuilder_PrjGettingModuleList=Project %s : getting project modules list +XdsSourceBuilder_PrjMakeInvoked=Project %s : make invoked on %s, kind %s, args %s +XdsSourceBuilder_ProjectSummary=Project %s : %s +XdsSourceBuilder_ConsoleName=XDS Build Console +XdsSourceBuilder_ConsoleOfProject=%s [Project: %s] + +TodoMarkerBuilder_JobName=Searching tasks in comments diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/resource/EncodingUpdater.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/resource/EncodingUpdater.java new file mode 100644 index 0000000..e0c0367 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/resource/EncodingUpdater.java @@ -0,0 +1,118 @@ +package com.excelsior.xds.builder.internal.resource; + +import java.io.IOException; +import java.util.Arrays; +import java.util.Set; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.jobs.ISchedulingRule; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.EncodingUtils; +import com.excelsior.xds.core.resource.IResourceAttributes; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.resource.XdsResourceChangeListener; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +/** + * Sets charset property of the changed {@link IFile}`s if resource extension doesnot belongs to {@link BuildSettings#getDerivedResourcesExtensions()} + * @author lsa80 + * @see {@link IResourceChangeListener} + * @see {@link IWorkspace#addResourceChangeListener(IResourceChangeListener)} + * @see {@link IFile#setCharset(String)} + */ +public final class EncodingUpdater extends XdsResourceChangeListener { + private final Set resourcesToUpdateEncoding = CollectionsUtils.newConcurentHashSet(); + + @Override + protected void beginDeltaProcessing(IResourceDelta delta) { + resourcesToUpdateEncoding.clear(); + } + + @Override + protected boolean handleResourceAdded(IResourceDelta rootDelta, IResourceDelta delta, IResource affectedResource) { + resourcesToUpdateEncoding.add(affectedResource); + return super.handleResourceAdded(rootDelta, delta, affectedResource); + } + + @Override + protected boolean handleResourceChanged(IResourceDelta rootDelta, IResourceDelta delta, IResource affectedResource) { + resourcesToUpdateEncoding.add(affectedResource); + return super.handleResourceChanged(rootDelta, delta, affectedResource); + } + + @Override + protected void endDeltaProcessing(IResourceDelta delta) { + // TODO : 2016.01.11 fix it + scheduleUpdateResourcesEncodings(); + } + + private void scheduleUpdateResourcesEncodings() { + final IResource[] resources = resourcesToUpdateEncoding.toArray(new IResource[0]); + resourcesToUpdateEncoding.clear(); + ISchedulingRule rule = ResourceUtils.createRule(Arrays.asList(resources)); + ResourceUtils.scheduleWorkspaceRunnable(new IWorkspaceRunnable(){ + @Override + public void run(IProgressMonitor monitor) throws CoreException { + monitor.beginTask("Fix encoding job", resources.length); //$NON-NLS-1$ + for (IResource r : resources) { + if (monitor.isCanceled()) { + break; + } + if (r instanceof IFile && r.exists()) { + BuildSettings settings = BuildSettingsCache.createBuildSettings(r.getProject()); + boolean isDetermineEncoding = false; + if (settings != null && !settings.getDerivedResourcesExtensions().contains(r.getFileExtension())){ + isDetermineEncoding = true; + } + else if (settings == null){ + isDetermineEncoding = true; // if SDK is not set for the project - unconditionally determine encoding + } + if (isDetermineEncoding) { + try { + if (!Boolean.TRUE.toString().equals(r.getPersistentProperty(IResourceAttributes.ENCODING_DETERMINED))) { + EncodingUtils.determineAndSetEncoding((IFile) r, monitor); + r.setPersistentProperty(IResourceAttributes.ENCODING_DETERMINED, Boolean.TRUE.toString()); + } + } + catch (IOException e) { + // just ignore. See KIDE-394 + } + catch (CoreException e) { + LogHelper.logError(e); + } + } + } + monitor.internalWorked(1); + } + monitor.done(); + } + + }, rule, "Fix encoding job", false); //$NON-NLS-1$ + } + + public static void install(){ + instance(); // instantiates the EncodingUpdater - this adds resource change listener in the super`s constructor + } + + public static void uninstall(){ + instance().stop(); + } + + private static EncodingUpdater instance(){ + return EncodingUpdaterHolder.INSTANCE; + } + + private static class EncodingUpdaterHolder { + static EncodingUpdater INSTANCE = new EncodingUpdater(); + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/services/ServiceHolder.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/services/ServiceHolder.java new file mode 100644 index 0000000..fb7fe50 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/internal/services/ServiceHolder.java @@ -0,0 +1,28 @@ +package com.excelsior.xds.builder.internal.services; + +import javax.inject.Inject; + +import com.excelsior.xds.builder.BuilderPlugin; +import com.excelsior.xds.core.console.IXdsConsoleFactory; +import com.excelsior.xds.core.dependency.injection.DependencyInjectionHelper; + +public final class ServiceHolder { + @Inject + private IXdsConsoleFactory consoleFactory; + + private ServiceHolder() { + DependencyInjectionHelper.inject(this, BuilderPlugin.getContext()); + } + + public static ServiceHolder getInstance() { + return ServiceHolderHolder.instance; + } + + public IXdsConsoleFactory getConsoleFactory() { + return consoleFactory; + } + + private static class ServiceHolderHolder { + static ServiceHolder instance = new ServiceHolder(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/BuildListenerManager.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/BuildListenerManager.java new file mode 100644 index 0000000..d311740 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/BuildListenerManager.java @@ -0,0 +1,70 @@ +package com.excelsior.xds.builder.listener; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.Platform; + +import com.excelsior.xds.builder.BuilderPlugin; +import com.excelsior.xds.core.builders.XdsBuildResult; +import com.excelsior.xds.core.log.LogHelper; + +public class BuildListenerManager { + private List buildListeners = new ArrayList(); + private boolean isInitialized = false; + + public void notifyBuildStarted(IProject p) { + initializeBuildListeners(); + for (IBuilderListener listener : buildListeners) { + listener.onBuildStarted(p); + } + } + + public void notifyBuildFinished(IProject p, XdsBuildResult buildRes) { + initializeBuildListeners(); + for (IBuilderListener listener : buildListeners) { + listener.onBuildFinished(p, buildRes); + } + } + + public void addListener(IBuilderListener buildListener) { + buildListeners.add(buildListener); + } + + private void initializeBuildListeners() { + if (!isInitialized) { + IExtension[] extensions = Platform.getExtensionRegistry() + .getExtensionPoint(BuilderPlugin.PLUGIN_ID, "listener") //$NON-NLS-1$ + .getExtensions(); + for (int i = 0; i < extensions.length; i++) { + IConfigurationElement[] configElements = extensions[i].getConfigurationElements(); + for (int j = 0; j < configElements.length; j++) { + parse(configElements[j], buildListeners); + } + } + isInitialized = true; + } + } + + private static void parse(IConfigurationElement configurationElement, + List buildListeners) { + try { + IBuilderListener listener = (IBuilderListener)configurationElement.createExecutableExtension("class"); //$NON-NLS-1$ + buildListeners.add(listener); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static BuildListenerManager getInstance(){ + return BuildListenerManagerHolder.INSTANCE; + } + + private static class BuildListenerManagerHolder{ + static BuildListenerManager INSTANCE = new BuildListenerManager(); + } +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/IBuilderListener.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/IBuilderListener.java new file mode 100644 index 0000000..8339d04 --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/listener/IBuilderListener.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.builder.listener; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.builders.XdsBuildResult; + +public interface IBuilderListener { + void onBuildStarted(IProject p); + void onBuildFinished(IProject p, XdsBuildResult buildRes); +} diff --git a/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/natures/Modula2SourceProjectNature.java b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/natures/Modula2SourceProjectNature.java new file mode 100644 index 0000000..2a392cc --- /dev/null +++ b/product/com.excelsior.xds.builder/src/com/excelsior/xds/builder/natures/Modula2SourceProjectNature.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.builder.natures; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectNature; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; + +import com.excelsior.xds.builder.internal.nls.Messages; +import com.excelsior.xds.core.builders.XdsSourceBuilderConstants; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.utils.BuilderUtils; + +public class Modula2SourceProjectNature implements IProjectNature { + + public static final String ID = NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID; //$NON-NLS-1$ + + private IProject project; + + @Override + public IProject getProject() { + return project; + } + + @Override + public void setProject(IProject project) { + this.project = project; + } + + @Override + public void configure() throws CoreException { + BuilderUtils.addBuilderToProject(project, XdsSourceBuilderConstants.BUILDER_ID); + new Job(Messages.Modula2SourceProjectNature_BuildingSources) { + protected IStatus run(IProgressMonitor monitor) { + try { + BuilderUtils.applySdkToProject(project, false, monitor); + } catch (CoreException e) { + LogHelper.logError(e); + } + return Status.OK_STATUS; + } + }.schedule(); + } + + @Override + public void deconfigure() throws CoreException { + } +} diff --git a/product/com.excelsior.xds.ce.feature/.project b/product/com.excelsior.xds.ce.feature/.project new file mode 100644 index 0000000..c7e14f2 --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.ce.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.ce.feature/build.properties b/product/com.excelsior.xds.ce.feature/build.properties new file mode 100644 index 0000000..be41d6f --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/build.properties @@ -0,0 +1,4 @@ +root=rootfiles/ +bin.includes = feature.xml,\ + feature_ru.properties,\ + feature.properties diff --git a/product/com.excelsior.xds.ce.feature/feature.properties b/product/com.excelsior.xds.ce.feature/feature.properties new file mode 100644 index 0000000..72157ca --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/feature.properties @@ -0,0 +1 @@ +featureDesription=Excelsior XDS Modula-2 development environment. Contains no XDS Development System. \ No newline at end of file diff --git a/product/com.excelsior.xds.ce.feature/feature.xml b/product/com.excelsior.xds.ce.feature/feature.xml new file mode 100644 index 0000000..6415ccc --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/feature.xml @@ -0,0 +1,71 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + Excelsior Freeware License Agreement + +This License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and Excelsior, LLC ("Excelsior") for the Excelsior software product identified above, which includes computer software, electronic documentation, and the associated printed materials ("Software"). By installing, copying or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, you may not install or use the Software. + +LICENSE GRANT + +Excelsior hereby grants to you a non-exclusive, transferable limited license to use the accompanying Software on the following terms: + +You may: a. install and use the Software on any computer in your possession or under your control; and b. copy and redistribute the Software provided it is not modified in any way and you do not charge for its distribution without explicit prior written permission. + +You may not: a. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), or create derivative works based on the Software; b. sell, rent, lease, or charge for access to the Software; c. remove any proprietary notices or labels on the Software. or d. distribute the Software for a fee, whether as a stand-alone product, or as part of a compilation or anthology, without Excelsior's prior written consent; + +TITLE + +Title, ownership rights, and intellectual property rights in and to the Software, and any copies of the Software shall at all times remain with Excelsior and/or its suppliers. The Software is protected by the copyright laws of the Russian Federation and international copyright treaties. + +TECHNICAL SUPPORT AND UPDATES + +This Agreement does not entitle you to receive from Excelsior printed manuals, technical support, phone support, updates, or enhancements to the Software. Excelsior may at its own discretion offer fee-based support, consulting and custom engineering services for the Software. + +NO FAIL-SAFE USES + +The Software has been created using technologies that are not fault tolerant and thus the Software is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, including, but without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the technologies employed in the Software could lead directly to death, personal injury, or severe physical or environmental damage. + +DISCLAIMER OF WARRANTY + +THE SOFTWARE IS PROVIDED TO YOU "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EXCELSIOR AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY NATURE WHATSOEVER, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE. EXCELSIOR DOES NOT WARRANT THAT ANY OR ALL FAILURES OR ERRORS IN THE SOFTWARE WILL BE CORRECTED OR WARRANT THAT THE SOFTWARE'S FUNCTIONALITY WILL MEET YOUR REQUIREMENTS OR THAT THE SOFTWARE WILL OPERATE IN COMBINATIONS YOU SELECT. NO EXCELSIOR DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS DISCLAIMER. + +LIMITATION OF LIABILITY + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL EXCELSIOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF EXCELSIOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. + +TERMINATION + +You may terminate this license at any time by destroying all copies of the Software you received or made under this Agreement. This Agreement shall terminate automatically if you fail to comply with any of its terms and conditions. On such termination, you must destroy all copies of the Software you received or made under this Agreement. The Disclaimer of Warranty and Limitation of Liability sections above shall survive termination of this Agreement. + +This Agreement is the entire Agreement between us and supersedes any other communications, advertisements, or understandings with respect to the Software. + + + + + + + + diff --git a/product/com.excelsior.xds.ce.feature/feature_ru.properties b/product/com.excelsior.xds.ce.feature/feature_ru.properties new file mode 100644 index 0000000..781750a --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/feature_ru.properties @@ -0,0 +1 @@ +featureDesription=\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u041d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 XDS \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \ No newline at end of file diff --git a/product/com.excelsior.xds.ce.feature/feature_ru_1251.properties b/product/com.excelsior.xds.ce.feature/feature_ru_1251.properties new file mode 100644 index 0000000..8f253a4 --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/feature_ru_1251.properties @@ -0,0 +1 @@ +featureDesription=Ñðåäà ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì. Íå ñîäåðæèò XDS ñèñòåìû ïðîãðàììèðîâàíèÿ. \ No newline at end of file diff --git a/product/com.excelsior.xds.ce.feature/rootfiles/xdsplugin.ini b/product/com.excelsior.xds.ce.feature/rootfiles/xdsplugin.ini new file mode 100644 index 0000000..6234a06 --- /dev/null +++ b/product/com.excelsior.xds.ce.feature/rootfiles/xdsplugin.ini @@ -0,0 +1,2 @@ +[SDKLIST] +xds.home = sdks/XDS-x86 \ No newline at end of file diff --git a/product/com.excelsior.xds.ce.nl_ru.feature/.project b/product/com.excelsior.xds.ce.nl_ru.feature/.project new file mode 100644 index 0000000..fcde617 --- /dev/null +++ b/product/com.excelsior.xds.ce.nl_ru.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.ce.nl_ru.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.ce.nl_ru.feature/build.properties b/product/com.excelsior.xds.ce.nl_ru.feature/build.properties new file mode 100644 index 0000000..64f93a9 --- /dev/null +++ b/product/com.excelsior.xds.ce.nl_ru.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/product/com.excelsior.xds.ce.nl_ru.feature/feature.xml b/product/com.excelsior.xds.ce.nl_ru.feature/feature.xml new file mode 100644 index 0000000..24484d8 --- /dev/null +++ b/product/com.excelsior.xds.ce.nl_ru.feature/feature.xml @@ -0,0 +1,210 @@ + + + + + "%featureDesription + + + + (c) 2014 Excelsior LLC + + + + Excelsior Freeware License Agreement + +This License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and Excelsior, LLC ("Excelsior") for the Excelsior software product identified above, which includes computer software, electronic documentation, and the associated printed materials ("Software"). By installing, copying or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, you may not install or use the Software. + +LICENSE GRANT + +Excelsior hereby grants to you a non-exclusive, transferable limited license to use the accompanying Software on the following terms: + +You may: a. install and use the Software on any computer in your possession or under your control; and b. copy and redistribute the Software provided it is not modified in any way and you do not charge for its distribution without explicit prior written permission. + +You may not: a. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), or create derivative works based on the Software; b. sell, rent, lease, or charge for access to the Software; c. remove any proprietary notices or labels on the Software. or d. distribute the Software for a fee, whether as a stand-alone product, or as part of a compilation or anthology, without Excelsior's prior written consent; + +TITLE + +Title, ownership rights, and intellectual property rights in and to the Software, and any copies of the Software shall at all times remain with Excelsior and/or its suppliers. The Software is protected by the copyright laws of the Russian Federation and international copyright treaties. + +TECHNICAL SUPPORT AND UPDATES + +This Agreement does not entitle you to receive from Excelsior printed manuals, technical support, phone support, updates, or enhancements to the Software. Excelsior may at its own discretion offer fee-based support, consulting and custom engineering services for the Software. + +NO FAIL-SAFE USES + +The Software has been created using technologies that are not fault tolerant and thus the Software is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, including, but without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the technologies employed in the Software could lead directly to death, personal injury, or severe physical or environmental damage. + +DISCLAIMER OF WARRANTY + +THE SOFTWARE IS PROVIDED TO YOU "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EXCELSIOR AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY NATURE WHATSOEVER, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE. EXCELSIOR DOES NOT WARRANT THAT ANY OR ALL FAILURES OR ERRORS IN THE SOFTWARE WILL BE CORRECTED OR WARRANT THAT THE SOFTWARE'S FUNCTIONALITY WILL MEET YOUR REQUIREMENTS OR THAT THE SOFTWARE WILL OPERATE IN COMBINATIONS YOU SELECT. NO EXCELSIOR DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS DISCLAIMER. + +LIMITATION OF LIABILITY + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL EXCELSIOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF EXCELSIOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. + +TERMINATION + +You may terminate this license at any time by destroying all copies of the Software you received or made under this Agreement. This Agreement shall terminate automatically if you fail to comply with any of its terms and conditions. On such termination, you must destroy all copies of the Software you received or made under this Agreement. The Disclaimer of Warranty and Limitation of Liability sections above shall survive termination of this Agreement. + +This Agreement is the entire Agreement between us and supersedes any other communications, advertisements, or understandings with respect to the Software. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.core.ide.nl_ru/.classpath b/product/com.excelsior.xds.core.ide.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.ide.nl_ru/.project b/product/com.excelsior.xds.core.ide.nl_ru/.project new file mode 100644 index 0000000..0390da5 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.ide.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.ide.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.core.ide.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..e747599 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/com/excelsior/xds/core/ide/internal/nls/messages_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.core.ide.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.ide.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..29e9e0d --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.core.ide.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.core.ide;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.core.ide.nl_ru/build.properties b/product/com.excelsior.xds.core.ide.nl_ru/build.properties new file mode 100644 index 0000000..192c037 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + fragment_ru.properties,\ + plugin_ru.properties + diff --git a/product/com.excelsior.xds.core.ide.nl_ru/fragment.properties b/product/com.excelsior.xds.core.ide.nl_ru/fragment.properties new file mode 100644 index 0000000..7a10b1a --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.core.ide Russian NLS Support diff --git a/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..a84c339 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.core.ide diff --git a/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..1acf572 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.core.ide diff --git a/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..0c3eeb3 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0424\u0430\u0441\u0430\u0434 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u044f\u0434\u0440\u0430 \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..e3d9e11 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ôàñàä ñåðâèñîâ ÿäðà ñðåäû ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru.properties b/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru.properties new file mode 100644 index 0000000..7a2e377 --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru.properties @@ -0,0 +1,2 @@ +SaveEditorsDialog_Title=\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \u0438 \u0441\u043e\u0431\u0440\u0430\u0442\u044c +SaveEditorsDialog_Message=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u043a\u0438\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..399209e --- /dev/null +++ b/product/com.excelsior.xds.core.ide.nl_ru/src/com/excelsior/xds/core/ide/internal/nls/messages_ru_1251.properties @@ -0,0 +1,2 @@ +SaveEditorsDialog_Title=Ñîõðàíèòü è ñîáðàòü +SaveEditorsDialog_Message=Âûáåðèòå êàêèå ðåñóðñû ñîõðàíèòü \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide/.classpath b/product/com.excelsior.xds.core.ide/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.ide/.project b/product/com.excelsior.xds.core.ide/.project new file mode 100644 index 0000000..cfd3bde --- /dev/null +++ b/product/com.excelsior.xds.core.ide/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.ide + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.ide/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.ide/META-INF/MANIFEST.MF new file mode 100644 index 0000000..dbe5ca4 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/META-INF/MANIFEST.MF @@ -0,0 +1,35 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.core.ide +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.core.ide.plugin.IdeCorePlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + com.excelsior.xds.builder;bundle-version="1.7.0", + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.core.resources, + com.google.guava, + org.apache.commons.io, + org.eclipse.jface.text, + org.apache.commons.collections, + com.excelsior.xds.core.model;bundle-version="1.7.0", + org.eclipse.ui.ide, + org.eclipse.jface, + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + org.eclipse.core.filesystem, + org.eclipse.ui.workbench, + org.eclipse.debug.ui, + org.eclipse.compare, + org.eclipse.team.core;bundle-version="3.7.0", + org.eclipse.team.ui;bundle-version="3.7.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.core.ide.editor.input, + com.excelsior.xds.core.ide.facade, + com.excelsior.xds.core.ide.symbol, + com.excelsior.xds.core.ide.symbol.utils, + com.excelsior.xds.core.ide.ui.consts, + com.excelsior.xds.core.ide.utils diff --git a/product/com.excelsior.xds.core.ide/build.properties b/product/com.excelsior.xds.core.ide/build.properties new file mode 100644 index 0000000..af52e22 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties + diff --git a/product/com.excelsior.xds.core.ide/plugin.properties b/product/com.excelsior.xds.core.ide/plugin.properties new file mode 100644 index 0000000..f42998c --- /dev/null +++ b/product/com.excelsior.xds.core.ide/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Core Facade diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/XdsEditorConstants.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/XdsEditorConstants.java new file mode 100644 index 0000000..32cc8e6 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/XdsEditorConstants.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.ide.editor; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +public final class XdsEditorConstants { + public static final String OBERON_DEFINITION_MODULE_EDITOR_ID = "com.excelsior.xds.ui.editor.oberon.DefinitionModuleEditor"; + public static final String OBERON_MODULE_EDITOR_ID = "com.excelsior.xds.ui.editor.oberon.ModuleEditor"; + public static final String MODULA_DEFINITION_MODULE_EDITOR_ID = "com.excelsior.xds.ui.editor.modula.DefinitionModuleEditor"; + public static final String MODULA_PROGRAM_MODULE_EDITOR_ID = "com.excelsior.xds.ui.editor.modula.ProgramModuleEditor"; + + public static final Set XDS_EDITOR_IDS = new HashSet(Arrays.asList(OBERON_DEFINITION_MODULE_EDITOR_ID, OBERON_MODULE_EDITOR_ID, MODULA_DEFINITION_MODULE_EDITOR_ID, MODULA_PROGRAM_MODULE_EDITOR_ID)); + public static final Set XDS_PROGRAM_MODULE_EDITOR_IDS = new HashSet(Arrays.asList(OBERON_MODULE_EDITOR_ID, MODULA_PROGRAM_MODULE_EDITOR_ID)); + + private XdsEditorConstants() { + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/input/StorageEditorInput.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/input/StorageEditorInput.java new file mode 100644 index 0000000..f44cee4 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/editor/input/StorageEditorInput.java @@ -0,0 +1,92 @@ +package com.excelsior.xds.core.ide.editor.input; + +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IPersistableElement; +import org.eclipse.ui.IStorageEditorInput; + +public abstract class StorageEditorInput extends PlatformObject implements IStorageEditorInput { + + /** + * Storage associated with this editor input + */ + private IStorage fStorage; + + /** + * Constructs an editor input on the given storage + */ + public StorageEditorInput(IStorage storage) { + fStorage = storage; + } + + /** + * @see IStorageEditorInput#getStorage() + */ + public IStorage getStorage() { + return fStorage; + } + + /** + * @see IEditorInput#getImageDescriptor() + */ + public ImageDescriptor getImageDescriptor() { +// return JavaUI.getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_CUNIT); + return null; + } + + /** + * @see IEditorInput#getName() + */ + public String getName() { + return getStorage().getName(); + } + + /** + * @see IEditorInput#getPersistable() + */ + public IPersistableElement getPersistable() { + return null; + } + + /** + * @see IEditorInput#getToolTipText() + */ + public String getToolTipText() { + return getStorage().getFullPath().toOSString(); + } + + /** + * @see java.lang.Object#equals(java.lang.Object) + */ + public boolean equals(Object object) { + return object instanceof StorageEditorInput && + getStorage().equals(((StorageEditorInput)object).getStorage()); + } + + @Override + public boolean exists() { + return false; + } + + @SuppressWarnings("rawtypes") + @Override + public Object getAdapter(Class adapter) { + Object adapted = super.getAdapter(adapter); + if (adapted == null) { + if (IStorage.class.equals(adapter)) { + return fStorage; + } + } + return adapted; + } + + /** + * @see java.lang.Object#hashCode() + */ + public int hashCode() { + return getStorage().hashCode(); + } + +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/CompilationSetUpdater.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/CompilationSetUpdater.java new file mode 100644 index 0000000..1a0d88e --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/CompilationSetUpdater.java @@ -0,0 +1,159 @@ +package com.excelsior.xds.core.ide.facade; + +import java.util.HashSet; +import java.util.Objects; +import java.util.Set; +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.jobs.IJobListener; +import com.excelsior.xds.core.jobs.ListenableJob; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.progress.DelegatingProgressMonitor; +import com.excelsior.xds.core.progress.IListenableProgressMonitor; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.IModulaSymbolCacheListener; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.google.common.collect.Lists; + +public class CompilationSetUpdater { + private final AtomicBoolean updateRequested = new AtomicBoolean(false); + private final Set projectsToUpdate = new HashSet<>(); + + private final ModulaSymbolCacheListener modulaSymbolCacheListener = new ModulaSymbolCacheListener(updateRequested, projectsToUpdate); + + private final UpdaterJob updaterJob = new UpdaterJob(updateRequested, projectsToUpdate); + + public void install() { + ModulaSymbolCache.instance().addListener(modulaSymbolCacheListener); + updaterJob.schedule(); + } + + public void uninstall() { + ModulaSymbolCache.instance().removeListener(modulaSymbolCacheListener); + updaterJob.setActive(false); + } + + public static CompilationSetUpdater instance() { + return CompilationSetUpdaterHolder.INSTANCE; + } + + private static class ModulaSymbolCacheListener implements IModulaSymbolCacheListener { + private final AtomicBoolean updateRequested; + private final Set projectsToUpdate; + + public ModulaSymbolCacheListener(AtomicBoolean updateRequested, + Set projectsToUpdate) { + this.updateRequested = updateRequested; + this.projectsToUpdate = projectsToUpdate; + } + + @Override + public void moduleSymbolAdded(IModuleSymbol oldSymbol, + IModuleSymbol newSymbol) { + if (!areImportsSame(oldSymbol, newSymbol)) { + invokeGetCompilationSet(newSymbol); + } + } + + private boolean areImportsSame(IModuleSymbol oldSymbol, + IModuleSymbol newSymbol) { + if (oldSymbol == null) { + return newSymbol == null; + } + else if (newSymbol == null) { + return false; + } + + // TODO : simplify this after getImports converted to Collection instead of Iterable + return Objects.equals(Lists.newArrayList(oldSymbol.getImports()), Lists.newArrayList(newSymbol.getImports())); + } + + private void invokeGetCompilationSet(IModuleSymbol symbol) { + if (symbol == null) { + return; + } + IWorkspaceRoot root = ResourceUtils.getWorkspaceRoot(); + IFileStore sourceFile = symbol.getSourceFile(); + if (sourceFile != null && root != null) { + IResource[] fileResources = root.findFilesForLocationURI(sourceFile.toURI()); + Set projects = new HashSet<>(); + for (IResource r : fileResources) { + projects.add(r.getProject()); + } + synchronized (projectsToUpdate) { + projectsToUpdate.addAll(projects); + } + updateRequested.set(true); + } + } + + @Override + public void moduleSymbolRemoved(IModuleSymbol symbol) { + invokeGetCompilationSet(symbol); + } + } + + private static class UpdaterJob extends ListenableJob { + private static final int RESCHEDULE_RATE = 1000; // reschedule after this amount of ms + private final AtomicBoolean updateRequested; + private final Set projectsToUpdate; + + private volatile boolean isActive = true; + + public UpdaterJob(AtomicBoolean updateRequested, Set projectsToUpdate) { + super("Update compilation set"); + this.updateRequested = updateRequested; + this.projectsToUpdate = projectsToUpdate; + } + + public void setActive(boolean isActive) { + this.isActive = isActive; + } + + @Override + protected IStatus run(IProgressMonitor monitor) { + if (updateRequested.compareAndSet(true, false)) { + DelegatingProgressMonitor listenableMonitor = DelegatingProgressMonitor.wrap(monitor); + addListener(new IJobListener() { + @Override + public void canceled() { + listenableMonitor.setCanceled(true); + } + }); + IProject[] projects; + synchronized (projectsToUpdate) { + projects = new IProject[projectsToUpdate.size()]; + projects = projectsToUpdate.toArray(projects); + projectsToUpdate.clear(); + } + for (IProject p : projects) { + replaceCompilationSet(p, listenableMonitor); + } + } + if (isActive) { + schedule(RESCHEDULE_RATE); + } + return Status.OK_STATUS; + } + + private void replaceCompilationSet(IProject p, IListenableProgressMonitor monitor) { + if (CompilationSetManager.getInstance().updateCompilationSet(p, null, monitor)) { + XdsModelManager.getInstance().enqueProjectForDecoratorRefresh(p); + } + } + } + + private static class CompilationSetUpdaterHolder { + static CompilationSetUpdater INSTANCE = new CompilationSetUpdater(); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/IdeCore.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/IdeCore.java new file mode 100644 index 0000000..fd364c9 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/facade/IdeCore.java @@ -0,0 +1,169 @@ +package com.excelsior.xds.core.ide.facade; + +import static com.excelsior.xds.core.utils.Lambdas.nonnull; +import static com.excelsior.xds.core.utils.collections.CollectionsUtils.array; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.EnumSet; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.function.Consumer; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.MarkerUtils; +import com.excelsior.xds.core.project.IXdsProjectSettingsListener; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.sdk.ISdkListener; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.Sdk.Property; +import com.excelsior.xds.core.sdk.SdkChangeEvent; +import com.excelsior.xds.core.sdk.SdkEvent; +import com.excelsior.xds.core.sdk.SdkManager; +import com.excelsior.xds.core.sdk.SdkRemovedEvent; +import com.excelsior.xds.core.sdk.SdkUtils; +import com.excelsior.xds.core.utils.BuilderUtils; +import com.excelsior.xds.core.utils.BuilderUtils.BuildAction; +import com.excelsior.xds.core.utils.Lambdas; +import com.excelsior.xds.core.utils.collections.XMapUtils; + +/** + *
+ * Facade for operations requiring interactions between components - like changing SDK of the project.
+ *
+ * It requires actions like:
+ * 1) Invalidating of the BuildSettingsCache
+ * 2) Invalidating of the ModulaSymbolCache
+ * 3) Rebuilding of the CompilationSet and refreshing of the UI
+ *
+ * @author lsa80 + *
+ */ +public final class IdeCore { + private IdeCore(){ + SdkManager.getInstance().addListener(new SdkListener()); + XdsProjectSettingsManager.addListener(new XdsProjectSettingsListener()); + } + + private final class XdsProjectSettingsListener implements + IXdsProjectSettingsListener { + @Override + public void projectSdkChanged(IProject project, Sdk oldSdk, Sdk currentSdk) { + try { + MarkerUtils.scheduleDeleteMarkers(project); + BuilderUtils.invokeBuilder(project, EnumSet.of( + BuildAction.REBUILD_LIBRARY_FILESET, + BuildAction.GET_COMPILATION_SET), new NullProgressMonitor()); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + + private static class SdkListener implements ISdkListener{ + private static final Map mapper = XMapUtils.newHashMap( + array(Property.XDS_COMPILER, Property.XDS_LIB_DEFS_PATH, Property.XDS_PRIM_EXTENSIONS), + array(BuildAction.REBUILD_PROJECT, BuildAction.REBUILD_LIBRARY_FILESET, BuildAction.REFRESH_PROJECT)); + + @Override + public void sdkChanged(SdkChangeEvent e) { + EnumSet buildActions = EnumSet.noneOf(BuildAction.class); + Consumer sdkRenamedAction = createRenameAction(e, buildActions); + if (sdkRenamedAction != null) { + SdkUtils.getProjectsWithGivenSdkName(getSdkName(e)).forEach(sdkRenamedAction); + } + List> projectActions = new ArrayList<>(); + addProjectBuilderAction(e, buildActions, projectActions); + + executeProjectActions(e, projectActions); + } + + /** + * @param e + * @return Name of the SDK if it is not default or null otherwise + */ + private static String getSdkName(SdkChangeEvent e) { + return e.getSource().isDefault()? null : e.getOldValue(Property.XDS_NAME); + } + + @Override + public void sdkRemoved(SdkRemovedEvent e) { + Consumer action = p -> { + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(p); + xdsProjectSettings.setProjectSdk(null); // use default SDK + xdsProjectSettings.flush(); + createProjectBuilderAction(EnumSet.of(BuildAction.REBUILD_PROJECT)).accept(p); + }; + executeProjectActions(e, Arrays.asList(action)); + } + + private void executeProjectActions(SdkEvent e, + List> projectActions) { + if (!projectActions.isEmpty()) { + List projectsWithGivenSdk = SdkUtils.getProjectsWithGivenSdk(e.getSource()); + projectActions.stream().forEachOrdered(a -> { + projectsWithGivenSdk.forEach(a); + }); + } + } + + private Consumer createRenameAction(SdkChangeEvent e, EnumSet buildActions) { + Sdk sdk = e.getSource(); + Consumer sdkRenamedAction = null; + if (e.isChanged(Property.XDS_NAME)) { + sdkRenamedAction = new Consumer() { + @Override + public void accept(IProject p) { + XdsProjectSettings settings = XdsProjectSettingsManager.getXdsProjectSettings(p); + if (Objects.equals(settings.getProjectSpecificSdkName(), getSdkName(e))) { + settings.setProjectSdk(sdk); + settings.flush(); + buildActions.add(BuildAction.GET_COMPILATION_SET); + buildActions.add(BuildAction.REBUILD_LIBRARY_FILESET); + } + } + }; + } + return sdkRenamedAction; + } + + private void addProjectBuilderAction(SdkChangeEvent e, EnumSet buildActions, List> projectActions) { + e.getChangedProperties().stream().map(Lambdas.func(mapper)).filter(nonnull()).forEach(buildActions::add); + if (!buildActions.isEmpty()) { + projectActions.add(createProjectBuilderAction(buildActions)); + } + } + + private Consumer createProjectBuilderAction( + EnumSet buildActions) { + return p -> { + try { + if (buildActions.contains(BuildAction.REBUILD_PROJECT)) { + BuildSettingsCache.invalidateBuildSettingsCache(p); + SymbolModelManager.instance().scheduleRemove(p); + MarkerUtils.scheduleDeleteMarkers(p); + } + BuilderUtils.invokeBuilder(p, buildActions, new NullProgressMonitor()); + } catch (CoreException e1) { + LogHelper.logError(e1); + } + }; + } + } + + public static IdeCore instance() { + return IdeCoreHolder.INSTANCE; + } + + private static final class IdeCoreHolder{ + static IdeCore INSTANCE = new IdeCore(); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/Messages.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/Messages.java new file mode 100644 index 0000000..4dee201 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/Messages.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.ide.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + public static String IdeCore_ApplySDKToProjectJob; + public static String SaveEditorsDialog_Title; + public static String SaveEditorsDialog_Message; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/messages.properties b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/messages.properties new file mode 100644 index 0000000..5ed2b44 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/internal/nls/messages.properties @@ -0,0 +1,3 @@ +IdeCore_ApplySDKToProjectJob=Apply SDK to project job +SaveEditorsDialog_Title=Save and Build +SaveEditorsDialog_Message=Select resources to save \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/plugin/IdeCorePlugin.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/plugin/IdeCorePlugin.java new file mode 100644 index 0000000..4749aa1 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/plugin/IdeCorePlugin.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.core.ide.plugin; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.core.ide.facade.CompilationSetUpdater; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.parser.modula.XdsParserManager; + +public class IdeCorePlugin implements BundleActivator { + public static final String PLUGIN_ID = "com.excelsior.xds.core.ide"; //$NON-NLS-1$ + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + IdeCorePlugin.context = bundleContext; + SymbolModelManager.instance().startup(); + CompilationSetUpdater.instance().install(); + XdsParserManager.turnOnDebugPrint(SymbolModelManager.IS_DEBUG_MODEL_MODIFICATIONS); + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + IdeCorePlugin.context = null; + CompilationSetUpdater.instance().uninstall(); + SymbolModelManager.instance().shutdown(); + } + +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/AbstractRequest.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/AbstractRequest.java new file mode 100644 index 0000000..cddb999 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/AbstractRequest.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.ide.symbol; + +import com.excelsior.xds.core.ide.symbol.SymbolModelManager.INotifier; + +abstract class AbstractRequest implements IModificationRequest{ + protected final INotifier notifier; + + AbstractRequest(INotifier notifier) { + this.notifier = notifier; + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IModificationRequest.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IModificationRequest.java new file mode 100644 index 0000000..0256462 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IModificationRequest.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.ide.symbol; + + +public interface IModificationRequest { + /** + * @return collection of affected source files + */ + Iterable apply(); + void completed(); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IParseTask.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IParseTask.java new file mode 100644 index 0000000..95a4ea8 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IParseTask.java @@ -0,0 +1,55 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.util.Collection; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.builders.BuildSettings; + +/** + * Each parse task + * @author lsa80 + */ +public interface IParseTask { + /** + * Project under which these modules were discovered and will be parsed + */ + IProject project(); + + /** + * Absolute pathes of modules to parse + */ + Collection files(); + + /** + * Build settings that will be used to parse + */ + BuildSettings buildSettings(); + + /** + * Parse even if it was parsed before and exists in model. Typically set to true. + * Set to false when it is OK to use cached symbol or AST if any + */ + boolean isForce(); + + /** + * if true - parse errors will be reported as markers on workspace resources + */ + boolean isReportParseErrors(); + + /** + * if true - AST will be reported back to the ISymbolModelListener + */ + boolean isNeedModulaAst(); + + /** + * if true - def corresponding to mod or mod corresponding to def will be scheduled for parse (please note it will not be necessarily parsed after completion of this parse task!) + */ + boolean isParseDualModule(); + + /** + * if true - mod files corresponding to modules from import section will be scheduled to parse + */ + boolean isParseImportSection(); +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ISymbolModelListener.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ISymbolModelListener.java new file mode 100644 index 0000000..38a6ad0 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ISymbolModelListener.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.core.ide.symbol; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +/** + * Listener of the Symbol Model Modifications + * @author lsa80 + */ +public interface ISymbolModelListener { + /** + * @return Which source file modifications should be reported to listener + */ + Iterable getModulesOfInterest(); + + /** + * if true - {@link #modelUpToDate()} will be called + */ + boolean isInterestedInModelUpToDateEvent(); + + /** + * Callback when file was parsed, results are ready + */ + void parsed(ParsedModuleKey key, IModuleSymbol moduleSymbol, ModulaAst ast); + + /** + * Callback when symbol for the given source file was removed + * @param sourceFile + */ + void removed(ParsedModuleKey key); + + /** + * Callback for unchecked exceptions occured during the processing of the listener + */ + void error(Throwable error); + + /** + * Called when model modification queue is empty - i.e. model as complete as possible + */ + void modelUpToDate(); +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IdeImportResolver.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IdeImportResolver.java new file mode 100644 index 0000000..5e5a7c3 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/IdeImportResolver.java @@ -0,0 +1,80 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.io.File; +import java.util.Iterator; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.IXdsParserMonitor; +import com.excelsior.xds.parser.modula.XdsParser; +import com.excelsior.xds.parser.modula.XdsSettings; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.parser.modula.symbol.binding.BaseImportResolver; + +public class IdeImportResolver extends BaseImportResolver { + private final BuildSettings buildSettings; + + public IdeImportResolver(BuildSettings buildSettings, IParserEventListener reporter, IXdsParserMonitor monitor) { + super(reporter, monitor); + this.buildSettings = buildSettings; + } + + @Override + protected IFileStore lookupModule(String moduleName) { + File moduleFile = null; + if (buildSettings != null) { + moduleFile = buildSettings.lookup(moduleName); + } + if (moduleFile == null || XdsFileUtils.isSymbolFile(moduleFile.getName())) { + // TODO : Release activities : BEGIN turn-off lookup in the SDK definitions + File tempModuleFile = lookupModuleInSdkDefinitions(buildSettings.getSdk(), moduleName); + if (tempModuleFile != null) { + moduleFile = tempModuleFile; + } + // TODO : Release activities : END turn-off lookup in the SDK definitions + } + return ResourceUtils.toFileStore(moduleFile); + } + + @Override + public ParsedModuleKey createModuleKey(IFileStore sourceFile) { + return new ParsedModuleKey(buildSettings, sourceFile); + } + + @Override + protected XdsParser createXdsParser(IFileStore moduleFile, String fileContents, + XdsSourceType sourceType) { + XdsParser parser = new XdsParser( moduleFile, fileContents + , new XdsSettings(buildSettings, sourceType), this, reporter, monitor ); + return parser; + } + + private File lookupModuleInSdkDefinitions(Sdk sdk, String moduleName) { + if (sdk == null || sdk.getLibraryDefinitionsPath() == null || !new File(sdk.getLibraryDefinitionsPath()).exists()) { + return null; + } + + File moduleFile = null; + Iterator dirIterator = ResourceUtils.listDirectories(new File(sdk.getLibraryDefinitionsPath())).iterator(); +outer: + while(dirIterator.hasNext()){ + File dir = dirIterator.next(); + String[] extensions = new String[] {XdsFileUtils.MODULA_DEFINITION_MODULE_FILE_EXTENSION, XdsFileUtils.OBERON_DEFINITION_MODULE_FILE_EXTENSION}; + for (String ext : extensions) { + File tempModuleFile = new File(FilenameUtils.concat(dir.getAbsolutePath(), moduleName + "." + ext)); //$NON-NLS-1$ + if (tempModuleFile.exists()) { + moduleFile = tempModuleFile; + break outer; + } + } + } + return moduleFile; + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationStatus.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationStatus.java new file mode 100644 index 0000000..847568f --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationStatus.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.core.ide.symbol; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; + +public final class ModificationStatus { + private final ModificationType modificationType; + private final IProject project; + private final ParsedModuleKey key; + + public ModificationStatus(ModificationType modificationType, + IProject project, ParsedModuleKey key) { + this.modificationType = modificationType; + this.project = project; + this.key = key; + } + + public ParsedModuleKey getKey() { + return key; + } + + public ModificationType getModificationType() { + return modificationType; + } + + public IProject getProject() { + return project; + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationType.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationType.java new file mode 100644 index 0000000..2401ad4 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ModificationType.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.ide.symbol; + +public enum ModificationType { + PARSED, + REMOVED, + ERROR +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseRequest.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseRequest.java new file mode 100644 index 0000000..5d77a86 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseRequest.java @@ -0,0 +1,157 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.io.IOException; +import java.util.Arrays; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.jface.text.IDocument; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager.INotifier; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.MarkerManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.MarkerCollectorParserEventListener; +import com.excelsior.xds.parser.commons.ParserEventListenerAdapter; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.editor.model.EditorDocumentCache; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.google.common.base.Function; +import com.google.common.collect.Iterables; + +class ParseRequest extends AbstractRequest { + private IParserEventListener reporter; + private final IParseTask parseTask; + + public ParseRequest(IParseTask parseTask, INotifier notifier) { + super(notifier); + this.parseTask = parseTask; + } + + public IParseTask getParseTask() { + return parseTask; + } + + @Override + public Iterable apply() { + if (parseTask.project() != null && !parseTask.project().isOpen()) { + return Arrays.asList(); + } + return Iterables.transform(parseTask.files(), new Function() { + @Override + public ModificationStatus apply(IFileStore sourceFile) { + initializeParserEventListener(parseTask); + +// if (SymbolModelManager.IS_DEBUG_MODEL_MODIFICATIONS) { +// System.out.println("dequed " + sourceFile + " " + super.toString() + " " + parseTask + " "); +// } + BuildSettings buildSettings = parseTask.buildSettings(); + if (buildSettings == null) { + return createErrorStatus(null); + } + final ParsedModuleKey key = new ParsedModuleKey(parseTask.buildSettings(), sourceFile); + if (!sourceFile.fetchInfo().exists()) { + return createErrorStatus(key); + } + + ModificationStatus modificationStatus = new ModificationStatus(ModificationType.PARSED, parseTask.project(), key); + try { + if (!parseTask.isForce()) { + boolean isParsed = ModulaSymbolCache.instance().getModuleSymbol(key) != null; + if (isParsed && parseTask.isNeedModulaAst()) { + isParsed = XdsParserManager.getModulaAst(key) != null; + } + if (isParsed) { + return modificationStatus; + } + } + + IDocument doc = EditorDocumentCache.instance().getDocument(key); + + String sourceText = doc != null? doc.get() : readSourceFileText(sourceFile); + IImportResolver importResolver = new IdeImportResolver(parseTask.buildSettings(), reporter, null); + XdsParserManager.parseModule(sourceFile, sourceText, importResolver, buildSettings, reporter, parseTask.isNeedModulaAst()); + return modificationStatus; + } catch (IOException | CoreException e) { + LogHelper.logError(e); + return createErrorStatus(key); + } + } + }); + } + + protected String readSourceFileText(IFileStore sourceFile) + throws IOException, CoreException { + String sourceText = null; + if (!XdsFileUtils.isSymbolFile(sourceFile.fetchInfo().getName())) { + sourceText = ResourceUtils.toString(sourceFile); + } + else { + // TODO : for now, sym file can only have file form. + String absolutePath = ResourceUtils.getAbsolutePath(sourceFile); + if (absolutePath != null) { + sourceText = CompileDriver.decodeSymFile(absolutePath); + } + } + + return sourceText; + } + + protected ModificationStatus createErrorStatus(ParsedModuleKey key) { + return new ModificationStatus(ModificationType.ERROR, parseTask.project(), key); + } + + @Override + public void completed() { + if (reporter instanceof MarkerCollectorParserEventListener) { + MarkerCollectorParserEventListener markerCollector = (MarkerCollectorParserEventListener)reporter; + MarkerManager.commitParserMarkers(markerCollector.getFileToMarkerInfo(), new NullProgressMonitor()); + } + } + + protected void notifyParsed(IFileStore file) { + ParsedModuleKey key = new ParsedModuleKey(parseTask.buildSettings(), file); + notifier.notifyParsed(key, true); + } + + private void initializeParserEventListener(IParseTask parseTask) { + if (reporter == null) { + if (parseTask.isReportParseErrors() && parseTask.project() != null) { + reporter = new MarkerCollectorListener(parseTask.project()); + } + else{ + reporter = new ParserListener(); + } + } + } + + private class MarkerCollectorListener extends MarkerCollectorParserEventListener{ + public MarkerCollectorListener(IProject iproject) { + super(iproject); + } + + @Override + public void endFileParsing(IFileStore file) { + super.endFileParsing(file); + notifyParsed(file); + } + } + + private class ParserListener extends ParserEventListenerAdapter { + public ParserListener() { + } + + @Override + public void endFileParsing(IFileStore file) { + notifyParsed(file); + } + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTask.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTask.java new file mode 100644 index 0000000..51e012a --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTask.java @@ -0,0 +1,158 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.io.File; +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * @author lsa80 + */ +public class ParseTask implements IParseTask { + private IProject project; + private Collection files; + private BuildSettings buildSettings; + private boolean isReportParseErrors = true; + private boolean isNeedModulaAst = true; + private boolean isParseDualModule = true; + private boolean isForce = true; + private boolean isParseImportSection = true; + + public ParseTask(File file) { + files = Collections.singletonList(ResourceUtils.toFileStore(file)); + } + + public ParseTask(Collection files, + boolean isReportParseErrors, + boolean isNeedModulaAst, boolean isParseDualModule, + boolean isForce, boolean isParseImportSection) { + IFile firstIFile = files.iterator().next(); + this.buildSettings = BuildSettingsCache.createBuildSettings(firstIFile); + this.project = firstIFile.getProject(); + this.files = ResourceUtils.convertIFilesToFileStores(files); + this.isReportParseErrors = isReportParseErrors; + this.isNeedModulaAst = isNeedModulaAst; + this.isParseDualModule = isParseDualModule; + this.isForce = isForce; + this.isParseImportSection = isParseImportSection; + } + + public ParseTask(IProject project, Collection files, + BuildSettings buildSettings, boolean isReportParseErrors, + boolean isNeedModulaAst, boolean isParseDualModule, + boolean isForce, boolean isParseImportSection) { + this.project = project; + this.files = files; + this.buildSettings = buildSettings; + this.isReportParseErrors = isReportParseErrors; + this.isNeedModulaAst = isNeedModulaAst; + this.isParseDualModule = isParseDualModule; + this.isForce = isForce; + this.isParseImportSection = isParseImportSection; + } + + public ParseTask(IParseTask parseTask) { + this.project = parseTask.project(); + this.files = parseTask.files(); + this.buildSettings = parseTask.buildSettings(); + this.isReportParseErrors = parseTask.isReportParseErrors(); + this.isNeedModulaAst = parseTask.isNeedModulaAst(); + this.isParseDualModule = parseTask.isParseDualModule(); + this.isForce = parseTask.isForce(); + this.isParseImportSection = parseTask.isForce(); + } + + @Override + public IProject project() { + return project; + } + + public void setProject(IProject project) { + this.project = project; + } + + @Override + public Collection files() { + return files; + } + + public void setFiles(Collection files) { + this.files = files; + } + + @Override + public BuildSettings buildSettings() { + return buildSettings; + } + + public void setBuildSettings(BuildSettings buildSettings) { + this.buildSettings = buildSettings; + } + + @Override + public boolean isReportParseErrors() { + return isReportParseErrors; + } + + /** + * @param isReportParseErrors + */ + public void setReportParseErrors(boolean isReportParseErrors) { + this.isReportParseErrors = isReportParseErrors; + } + + /* (non-Javadoc) + * @see com.excelsior.xds.builder.symbol.IParseTask#isNeedModulaAst() + */ + @Override + public boolean isNeedModulaAst() { + return isNeedModulaAst; + } + + public void setNeedModulaAst(boolean isNeedModulaAst) { + this.isNeedModulaAst = isNeedModulaAst; + } + + @Override + public boolean isParseDualModule() { + return isParseDualModule; + } + + public void setParseDualModule(boolean isParseDualModule) { + this.isParseDualModule = isParseDualModule; + } + + @Override + public boolean isForce() { + return isForce; + } + + public void setForce(boolean isForce) { + this.isForce = isForce; + } + + @Override + public boolean isParseImportSection() { + return isParseImportSection; + } + + public void setParseImportSection(boolean isParseImportSection) { + this.isParseImportSection = isParseImportSection; + } + + @Override + public String toString() { + return String + .format("ParseTask [project=%s, files=%s, buildSettings=%s, isReportParseErrors=%s, isNeedModulaAst=%s, isParseDualModule=%s, isForce=%s, isParseImportSection=%s]", + project, files, buildSettings, isReportParseErrors, + isNeedModulaAst, isParseDualModule, isForce, + isParseImportSection); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTaskFactory.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTaskFactory.java new file mode 100644 index 0000000..a72b468 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ParseTaskFactory.java @@ -0,0 +1,99 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.io.File; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; + +import org.apache.commons.collections.CollectionUtils; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.ui.IEditorInput; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.resource.ResourceUtils; + +public final class ParseTaskFactory { + public ParseTaskFactory(){ + } + + public static ParseTask create(IEditorInput editorInput) { + IFile ifile = CoreEditorUtils.editorInputToIFile(editorInput); + if (ifile != null) { + return create(ifile); + } + else { + return create(CoreEditorUtils.editorInputToFileStore(editorInput)); + } + } + + /** + * Create task to parse single workspace compilation unit with typical settings. + * @param ifile + * @return + */ + public static ParseTask create(IFile ifile) { + return createWorkspaceTask(Arrays.asList(ifile)); + } + + /** + * Create task to parse single NON-workspace compilation unit with typical settings. + * + * @param file + * @return + */ + public static ParseTask create(File file) { + return createNonWorkspaceTask(Collections.singletonList(ResourceUtils.toFileStore(file))); + } + + public static ParseTask create(IFileStore fileStore) { + return createNonWorkspaceTask(Collections.singletonList(fileStore)); + } + + /** + * Create task to parse workspace compilation units with typical settings.
+ * Assumes that all IFile`s are from the same project. + * @param files - compilation modules to parse + * @return + */ + public static ParseTask createWorkspaceTask(Collection files) { + return createWorkspaceTask(files, false, true, true, true, true); + } + + /** + * Create task to parse NON-workspace compilation units with typical settings. + * @param files - compilation modules to parse + * @return + */ + public static ParseTask createNonWorkspaceTask(Collection files) { + return createNonWorkspaceTask(files, false, true, true, true); + } + + public static ParseTask createTask(IProject project, Collection files) { + if (project == null) { + return createNonWorkspaceTask(ResourceUtils.convertFilesToFileStores(files)); + } + else { + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(project, files.iterator().next()); + return new ParseTask(project, ResourceUtils.convertFilesToFileStores(files), buildSettings, true, false, true, true, true); + } + } + + private static ParseTask createNonWorkspaceTask(Collection files, boolean isNeedModulaAst, boolean isParseDualModule, boolean isForce, boolean isParseImportSection) { + if (CollectionUtils.isEmpty(files)) { + return null; + } + return new ParseTask(null, files, DefaultBuildSettingsHolder.DefaultBuildSettings, false, isNeedModulaAst, isParseDualModule, isForce, isParseImportSection); + } + + private static ParseTask createWorkspaceTask(Collection files, boolean isNeedModulaAst, boolean isReportParseErrors, boolean isParseDualModule, boolean isForce, boolean isParseImportSection) { + if (CollectionUtils.isEmpty(files)) { + return null; + } + return new ParseTask(files, isReportParseErrors, isNeedModulaAst, isParseDualModule, isForce, isParseImportSection); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/PoisonRequest.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/PoisonRequest.java new file mode 100644 index 0000000..f6fd6fc --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/PoisonRequest.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.util.ArrayList; + +/** + * Special request to stop processing + * + * @author lsa80 + */ +public final class PoisonRequest implements IModificationRequest { + + public final static PoisonRequest INSTANCE = new PoisonRequest(); + + @Override + public Iterable apply() { + return new ArrayList(); + } + + @Override + public void completed() { + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ProjectSymbolModelListener.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ProjectSymbolModelListener.java new file mode 100644 index 0000000..70c87f3 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/ProjectSymbolModelListener.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.core.ide.symbol; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.project.IXdsProjectSettingsListener; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; + +/** + * {@link ISymbolModelListener} which listens to the project settings changes as {@link IXdsProjectSettingsListener} + * + * @author lsa80 + */ +public abstract class ProjectSymbolModelListener extends SymbolModelListenerAdapter implements IXdsProjectSettingsListener { + private final IProject project; + private boolean isReportOnExistingModule; + private boolean isNeedModulaAst; + + public ProjectSymbolModelListener(IProject project, ParsedModuleKey targetModuleKey, boolean isReportOnExistingModule, boolean isNeedModulaAst) { + super(targetModuleKey); + this.project = project; + this.isReportOnExistingModule = isReportOnExistingModule; + this.isNeedModulaAst = isNeedModulaAst; + } + + public void install() { + if (project != null) { + XdsProjectSettingsManager.addListener(project, this); + } + SymbolModelManager.instance().addListener(this, isReportOnExistingModule, isNeedModulaAst); + } + + public void uninstall() { + SymbolModelManager.instance().removeListener(this); + if (project != null) { + XdsProjectSettingsManager.removeListener(project, this); + } + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/RemoveRequest.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/RemoveRequest.java new file mode 100644 index 0000000..9cd6e3b --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/RemoveRequest.java @@ -0,0 +1,46 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.util.Arrays; +import java.util.Collection; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.ide.symbol.SymbolModelManager.INotifier; +import com.excelsior.xds.core.ide.utils.ParsedModuleKeyUtils; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.google.common.base.Function; +import com.google.common.collect.Iterables; + +class RemoveRequest extends AbstractRequest { + private final IProject project; + private final Collection filesToRemove; + + public RemoveRequest(IProject project, Collection filesToRemove, INotifier notifier) { + super(notifier); + this.project = project; + this.filesToRemove = filesToRemove; + } + + @Override + public Iterable apply() { + if (project != null && !project.isOpen()) { + return Arrays.asList(); + } + return Iterables.transform(filesToRemove, new Function() { + @Override + public ModificationStatus apply(IFileStore sourceFile) { + ParsedModuleKey moduleKey = ParsedModuleKeyUtils.create(project, sourceFile); + if (ModulaSymbolCache.instance().removeModule(moduleKey)) { + notifier.notifyRemoved(moduleKey); + } + return new ModificationStatus(ModificationType.REMOVED, project, moduleKey); + } + }); + } + + @Override + public void completed() { + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelListenerAdapter.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelListenerAdapter.java new file mode 100644 index 0000000..6a294a2 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelListenerAdapter.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public class SymbolModelListenerAdapter implements ISymbolModelListener { + private final Iterable targetModuleKeys; + + public SymbolModelListenerAdapter(ParsedModuleKey targetModuleKey) { + this.targetModuleKeys = Arrays.asList(targetModuleKey); + } + + public SymbolModelListenerAdapter(Iterable targetModuleKeys) { + this.targetModuleKeys = targetModuleKeys; + } + + @Override + public Iterable getModulesOfInterest() { + List emptyList = Collections.emptyList(); + return targetModuleKeys != null ? targetModuleKeys : emptyList; + } + + @Override + public void parsed(ParsedModuleKey key, IModuleSymbol moduleSymbol, + ModulaAst ast) { + } + + @Override + public void removed(ParsedModuleKey key) { + } + + @Override + public void error(Throwable error) { + } + + @Override + public void modelUpToDate() { + } + + @Override + public boolean isInterestedInModelUpToDateEvent() { + return false; + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelManager.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelManager.java new file mode 100644 index 0000000..479764a --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/SymbolModelManager.java @@ -0,0 +1,660 @@ +package com.excelsior.xds.core.ide.symbol; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.locks.ReentrantLock; +import java.util.stream.Collectors; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceVisitor; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.ide.utils.ParsedModuleKeyUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.resource.XdsResourceChangeListener; +import com.excelsior.xds.core.resource.XdsSourceIFilePredicate; +import com.excelsior.xds.core.utils.Lambdas; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.core.utils.collections.Pair; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.XdsStandardNames; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.google.common.base.Predicate; +import com.google.common.collect.Iterables; + +public final class SymbolModelManager extends XdsResourceChangeListener{ + public static final boolean IS_DEBUG_MODEL_MODIFICATIONS = false; + /** + * Main queue through which modification requests are dispatched. + */ + private final LinkedBlockingQueue modelModificationQueue = new LinkedBlockingQueue(); + + private final Map> file2symbolModelListeners = new ConcurrentHashMap>(); + private final Set modelUpToDateListeners = CollectionsUtils.newConcurentHashSet(); + + private volatile boolean stop = false; + + private final ReentrantLock notificationLock = new ReentrantLock(); + + private final Notifier notifier = new Notifier(); + + private SymbolModelManager(){ + } + + /** + * Only takes first symbol produced by the {@link #syncParseSymbols(IParseTask, boolean)}. Useful when parseTask contains only one file to parse. + */ + public IModuleSymbol syncParseFirstSymbol(IParseTask parseTask) { + Collection> result = syncParse(parseTask); + if (result == null) { + return null; + } + + Collection symbols = CollectionsUtils.bindFirst(result); + if (symbols != null && !symbols.isEmpty()) { + return symbols.iterator().next(); + } + return null; + } + + /** + * Only takes first symbol produced by the {@link #syncParseSymbols(IParseTask, boolean)}. Useful when parseTask contains only one file to parse. + */ + public ModulaAst syncParseFirstAst(IParseTask parseTask) { + Collection> result = syncParse(parseTask); + if (result == null) { + return null; + } + + Collection symbols = CollectionsUtils.bindSecond(result); + if (symbols != null && !symbols.isEmpty()) { + return symbols.iterator().next(); + } + return null; + } + + /** + * Blocks calling thread until results are available. + * + * Warning! Deadlock is possible, be really sure that you need this method. Try use async scheduling instead. + * + */ + public Collection syncParseSymbols(IParseTask parseTask) { + Collection> result = syncParse(parseTask); + if (result == null) { + return null; + } + + return CollectionsUtils.bindFirst(result); + } + + /** + * Blocks calling thread until results are available. + * + * Warning! Deadlock is possible, be really sure that you need this method. Try use async scheduling instead. + * + * @return + */ + public Collection> syncParse(IParseTask parseTask) { + final boolean[] isReady = {false}; + + Iterable moduleKeys = ParsedModuleKeyUtils.transform(parseTask.buildSettings(), parseTask.files()); + + class SymbolModelListener extends SymbolModelListenerAdapter{ + private Set modules2Parse = new HashSet(); + final Collection> parseResults = new ArrayList>(); + + public SymbolModelListener(Iterable targetModuleKeys) { + super(targetModuleKeys); + Iterables.addAll(modules2Parse, targetModuleKeys); + } + + @Override + public void parsed(ParsedModuleKey key, IModuleSymbol moduleSymbol, ModulaAst ast) { + synchronized(this){ + boolean contained = modules2Parse.remove(key); + if (contained) { + parseResults.add(Pair.create(moduleSymbol, ast)); + } + doNotify(); + } + } + + @Override + public void removed(ParsedModuleKey key) { + synchronized(this){ + modules2Parse.remove(key); + doNotify(); + } + } + + @Override + public void error(Throwable e) { + LogHelper.logError(e); + synchronized(this){ + modules2Parse.clear(); + doNotify(); + } + } + + void doNotify() { + if (modules2Parse.isEmpty()) { + isReady[0] = true; + this.notify(); + } + } + } + SymbolModelListener listener = new SymbolModelListener(moduleKeys); + scheduleParse(parseTask, listener); + try { + synchronized(listener) { + while (!isReady[0]) { + listener.wait(); + } + } + } catch (InterruptedException e) { + LogHelper.logError(e); + } + finally{ + removeListener(listener); + } + return listener.parseResults; + } + + /** + * Blocks calling thread until the moment {@link SymbolModelManager#modelModificationQueue} is empty. If it is already empty - returns immediately. + */ + public void waitUntilModelIsUpToDate() { + class SymbolModelListener extends SymbolModelListenerAdapter{ + volatile boolean isUpToDate = false; + public SymbolModelListener() { + super((Iterable)null); + } + + @Override + public void modelUpToDate() { + synchronized (this) { + isUpToDate = true; + notify(); + } + } + + @Override + public boolean isInterestedInModelUpToDateEvent() { + return true; + } + }; + SymbolModelListener listener = new SymbolModelListener(); + addListener(listener, false, false); + try{ + synchronized (listener) { + try { + while (!listener.isUpToDate) { + listener.wait(); + } + } catch (InterruptedException e) { + } + } + } + finally{ + removeListener(listener); + } + } + + /** + * Schedules parse job and registers an optional listener, which will be notified on parse completion.
+ * + * @param parseTask - description of parse job to perform. + * @param listener - if not null, already existing parsed modules of interest will be reported + */ + public void scheduleParse(IParseTask parseTask, ISymbolModelListener listener) { + addListener(listener, listener != null, parseTask.isNeedModulaAst()); + + scheduleModification(new ParseRequest(parseTask, notifier)); + } + + /** + * Removes parsed modules of the {@link IFile}`s from the {@link ModulaSymbolCache}
+ * Assumes that all {@link IFile}`s are from the same {@link IProject}. + * @param ifiles + */ + private void scheduleRemove(Collection ifiles) { + if (ifiles.isEmpty()) { + return; + } + + IFile firstIFile = ifiles.iterator().next(); + IProject project = firstIFile.getProject(); + + Collection files = ResourceUtils.convertIFilesToFileStores(ifiles); + scheduleModification(new RemoveRequest(project, files, notifier)); + } + + /** + * Removes all parsed module of the project, if any + */ + public void scheduleRemove(IProject p) { + if (!ProjectUtils.isXdsProject(p)) { + return; + } + List projectIFiles = ResourceUtils.getProjectResources(p, new XdsSourceIFilePredicate()); + scheduleRemove(projectIFiles); + } + + /** + * Removes symbols and re-parses file to create the new symbols + */ + public void scheduleRemoveReparse(Collection ifiles) { + if (ifiles.isEmpty()) { + return; + } + + synchronized (modelModificationQueue) { // to introduce tasks in atomic manner + final Map> project2IFiles = groupByProject(ifiles); + scheduleRemove(project2IFiles); + scheduleParse(project2IFiles); + } + } + + /** + * @param listener + * @param isReportOnExistingModule - event will be raised if module of interest is already compiled + */ + public void addListener(ISymbolModelListener listener, boolean isReportOnExistingModule, boolean isNeedModulaAst) { + if (listener == null) { + return; + } + + if (listener.isInterestedInModelUpToDateEvent()) { + modelUpToDateListeners.add(listener); + notifyModelUpToDate(listener); + } + + if (!Iterables.isEmpty(listener.getModulesOfInterest())) { + Iterable keys = listener.getModulesOfInterest(); + for (ParsedModuleKey key : keys) { + Set listeners = file2symbolModelListeners.get(key); + if (listeners == null) { + listeners = CollectionsUtils.newConcurentHashSet(); + file2symbolModelListeners.put(key, listeners); + } + listeners.add(listener); + } + + if (isReportOnExistingModule) { + for (ParsedModuleKey key : listener.getModulesOfInterest()) { + notifyParsed(listener, key, isNeedModulaAst); + } + } + } + } + + public void removeListener(ISymbolModelListener listener) { + if (listener == null) { + return; + } + Iterable keys = listener.getModulesOfInterest(); + for (ParsedModuleKey key : keys) { + Set listeners = file2symbolModelListeners.get(key); + listeners.remove(listener); + } + + modelUpToDateListeners.remove(listener); + } + + public void startup(){ + new Thread(new ModelUpdater(), "Symbol Model Manager").start(); //$NON-NLS-1$ + } + + public void shutdown(){ + stop = true; + modelModificationQueue.add(PoisonRequest.INSTANCE); // poison + } + + public static SymbolModelManager instance() { + return SymbolModelManagerHolder.INSTANCE; + } + + protected void notifyParsed(ISymbolModelListener listener, + ParsedModuleKey key, boolean isNeedModulaAst) { + IModuleSymbol moduleSymbol = ModulaSymbolCache.instance().getModuleSymbol(key); + ModulaAst ast = null; + if (isNeedModulaAst) { + ast = XdsParserManager.getModulaAst(key); + } + + if (moduleSymbol != null || ast != null) { + try{ + notificationLock.lock(); + try { + listener.parsed(key, moduleSymbol, ast); + } + catch(RuntimeException e) { + LogHelper.logError(e); + } + } + finally{ + notificationLock.unlock(); + } + } + } + + protected void notifyRemoved(ISymbolModelListener listener, ParsedModuleKey parsedModuleKey) { + try{ + notificationLock.lock(); + try { + listener.removed(parsedModuleKey); + } + catch(RuntimeException e) { + LogHelper.logError(e); + } + } + finally{ + notificationLock.unlock(); + } + } + + protected void notifyParsed(ParsedModuleKey key, boolean isNeedModulaAst) { + Set listeners = getSymbolModelListeners(key); + for (ISymbolModelListener l : listeners) { + notifyParsed(l, key, isNeedModulaAst); + + } + } + + protected void notifyRemoved(ParsedModuleKey key) { + Set listeners = getSymbolModelListeners(key); + for (ISymbolModelListener l : listeners) { + notifyRemoved(l, key); + + } + } + + protected void notifyModelUpToDate(ISymbolModelListener listener) { + synchronized (modelModificationQueue) { // use synchronized here because condition isEmpty() is checked here + if (modelModificationQueue.isEmpty()) { + if (listener != null) { + try { + listener.modelUpToDate(); + } + catch(RuntimeException e) { + listener.error(e); + throw e; + } + } + else { + for (ISymbolModelListener l : modelUpToDateListeners) { + l.modelUpToDate(); + } + } + } + } + } + + protected Set getSymbolModelListeners(ParsedModuleKey key) { + Set listeners = file2symbolModelListeners.get(key); + if (listeners == null) { + listeners = Collections.emptySet(); + } + return listeners; + } + + private static class SymbolModelManagerHolder{ + public static SymbolModelManager INSTANCE = new SymbolModelManager(); + } + + private final class ModelUpdater implements Runnable { + @Override + public void run() { + while(!stop) { + try { + notifyModelUpToDate(null); + IModificationRequest req = modelModificationQueue.take(); + if (req == PoisonRequest.INSTANCE) { // poison - stop processing + return; + } + Iterable statuses = req.apply(); + for (ModificationStatus status : statuses) { + req.completed(); + + if (status.getModificationType() == ModificationType.PARSED) { + ParseRequest parseReq = (ParseRequest) req; + if (parseReq.getParseTask().isParseDualModule()) { + scheduleParseDualModule(parseReq, status); + } + if (parseReq.getParseTask().isParseImportSection()) { + scheduleResolveImportSection(parseReq, status); + } + } + + } + } + catch(InterruptedException e) { + } + catch (Throwable e) { // brutally catch all errors, since nothing should stop SymbolModelManager from processing, especially bugs in listeners. + LogHelper.logError(e); + } + } + } + + private void scheduleParseDualModule(ParseRequest parseReq, ModificationStatus status) { + if (!parseReq.getParseTask().isParseDualModule()) { + return; + } + ParsedModuleKey key = status.getKey(); + IFileStore sourceFile = key.moduleFile; + if (XdsFileUtils.isDefinitionModuleFile(sourceFile.fetchInfo().getName())) { + ParseTask task = new ParseTask(parseReq.getParseTask()); + + task.setNeedModulaAst(false); + task.setParseDualModule(false); + task.setForce(true); + task.setParseImportSection(false); + + String moduleName = FilenameUtils.getBaseName(sourceFile.fetchInfo().getName()); + if (XdsStandardNames.STANDART_MODULE_SET.contains(moduleName)) { + return; + } + + IFileStore moduleFile = null; + String moduleFileName = XdsFileUtils.getProgramModuleFileName(moduleName); + if (parseReq.getParseTask().buildSettings() != null) { + moduleFile = ResourceUtils.toFileStore(parseReq.getParseTask().buildSettings().lookup(moduleFileName)); + } + else { + IFileStore parent = sourceFile.getParent(); + moduleFile = parent != null? parent.getChild(moduleFileName) : null; + } + + if (moduleFile != null && moduleFile.fetchInfo().exists()) { + task.setFiles(Arrays.asList(moduleFile)); + + ParseRequest parseDualReq = new ParseRequest(task, notifier); + scheduleModification(parseDualReq); + } + } + } + + private void scheduleResolveImportSection(ParseRequest parseReq, ModificationStatus status) { + ParsedModuleKey key = status.getKey(); + final BuildSettings buildSettings = parseReq.getParseTask().buildSettings(); + + IModuleSymbol hostModuleSymbol = ModulaSymbolCache.instance().getModuleSymbol(key); + if (hostModuleSymbol == null) + return; + + Set importModuleFiles = new HashSet(); + + for (IModulaSymbol modulaSymbol : hostModuleSymbol.getImports()) { + IModuleSymbol importedModuleSymbol = null; + if (modulaSymbol instanceof IModuleSymbol) { + importedModuleSymbol = (IModuleSymbol)modulaSymbol; + } + else if (modulaSymbol instanceof IModuleAliasSymbol) { + importedModuleSymbol = ((IModuleAliasSymbol)modulaSymbol).getReference(); + } + else { + importedModuleSymbol = ModulaSymbolUtils.getParentModule(modulaSymbol); + } + + if (importedModuleSymbol != null) { + String moduleFileName = importedModuleSymbol.getName() + "." + + XdsFileUtils.MODULA_PROGRAM_MODULE_FILE_EXTENSION; + File moduleFile = buildSettings.lookup(moduleFileName); + if (moduleFile != null && moduleFile.exists()) { + moduleFile = ResourceUtils.getAbsolutePathAsInFS(moduleFile); + importModuleFiles.add(ResourceUtils.toFileStore(moduleFile)); + } + } + + } + + ParseTask task = new ParseTask(parseReq.getParseTask()); + + task.setParseDualModule(false); + task.setForce(false); + task.setParseImportSection(false); + task.setFiles(importModuleFiles); + task.setNeedModulaAst(false); + + ParseRequest parseImportReq = new ParseRequest(task, notifier); + scheduleModification(parseImportReq); + } + } + + @Override + protected void handleProjectRemoved(IResourceDelta delta, + IProject affectedProject, boolean isPreDeleteEvent) { + try { + affectedProject.accept(new IResourceVisitor() { + @Override + public boolean visit(IResource r) throws CoreException { + if (isCompilationUnitFile(r)) { + SymbolModelManager.instance().scheduleRemove(Arrays.asList((IFile)r)); + } + return true; + } + }); + } catch (CoreException e) { + LogHelper.logError(e); + } + super.handleProjectRemoved(delta, affectedProject, isPreDeleteEvent); + } + + @Override + protected VisitResult doVisit(IResourceChangeEvent event) { + VisitResult result = super.doVisit(event); + + List removedCompUnits = getCompilationUnits(result.removedResourceDeltas, null); + scheduleRemove(groupByProject(removedCompUnits)); + + List addedCompUnits = getCompilationUnits(result.addedResourceDeltas, null); + scheduleParse(groupByProject(addedCompUnits)); + + List changedResourceDeltas = result.changedResourceDeltas; + List ifiles = getCompilationUnits(changedResourceDeltas, rd -> isContentChanged(rd)); + scheduleRemoveReparse(ifiles); // bulk-update the model to overcome the dependency issues between the modules. + return result; + } + + private void scheduleParse(Map> project2IFiles) { + List tasks = createParseTasks(project2IFiles); + tasks.stream().filter(Lambdas.nonnull()) + .forEach(t -> scheduleParse(t, null)); + } + + private void scheduleRemove(Map> project2IFiles) { + project2IFiles.entrySet().stream().forEach(e -> scheduleRemove(e.getValue())); + } + + private static List createParseTasks(Map> project2IFiles) { + // for each IFile`s list (grouped by IProject), convert it to the ParseTask + return project2IFiles.entrySet().stream() + .map(e -> ParseTaskFactory.createWorkspaceTask(e.getValue())) + .collect(Collectors.toList()); + } + + /** + * groups {@link IFile} by their {@link IProject}. + * @param compUnits + * @return + */ + private static Map> groupByProject( + Collection compUnits) { + Map> project2IFiles = compUnits.stream() + .collect( + Collectors.groupingBy(f -> f.getProject(), + Collectors.toList())); + return project2IFiles; + } + + private List getCompilationUnits(List resourceDeltas, Predicate pred) { + List compUnits = new ArrayList(); + for (IResourceDelta rd : resourceDeltas) { + if (rd == null) continue; + IResource r = rd.getResource(); + if (isCompilationUnitFile(r)) { + IFile f = (IFile)r; + if (pred != null && !pred.apply(rd)) { + continue; + } + compUnits.add(f); + } + } + return compUnits; + } + + private void scheduleModification(IModificationRequest modification) { + synchronized (modelModificationQueue) { // use synchronized here because condition isEmpty() can be checked in other methods (also from other methods) + modelModificationQueue.add(modification); + } + } + + private class Notifier implements INotifier { + /* (non-Javadoc) + * @see com.excelsior.xds.builder.symbol.INotifier#notifyParsed(com.excelsior.xds.builder.symbol.ISymbolModelListener, com.excelsior.xds.parser.commons.symbol.ParsedModuleKey, boolean) + */ + @Override + public void notifyParsed(ParsedModuleKey key, boolean isNeedModulaAst) { + SymbolModelManager.this.notifyParsed(key, isNeedModulaAst); + } + + /* (non-Javadoc) + * @see com.excelsior.xds.builder.symbol.INotifier#notifyRemoved(com.excelsior.xds.builder.symbol.ISymbolModelListener, com.excelsior.xds.parser.commons.symbol.ParsedModuleKey) + */ + @Override + public void notifyRemoved(ParsedModuleKey parsedModuleKey) { + SymbolModelManager.this.notifyRemoved(parsedModuleKey); + } + } + + interface INotifier { + void notifyParsed(ParsedModuleKey key, boolean isNeedModulaAst); + void notifyRemoved(ParsedModuleKey parsedModuleKey); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/utils/EntityUtils.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/utils/EntityUtils.java new file mode 100644 index 0000000..79bcf41 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/symbol/utils/EntityUtils.java @@ -0,0 +1,215 @@ +package com.excelsior.xds.core.ide.symbol.utils; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import java.util.Set; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.ide.symbol.ParseTask; +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.google.common.collect.Iterables; +import com.google.common.collect.Lists; + +public final class EntityUtils { + private EntityUtils() { + } + + /** + * Get all symbols related to the given symbol. For the procedure, for example, this + * will be both IProcedureDefinitionSymbol, IProcedureDeclarationSymbol and all forward declarations to this procedure. + * Actually, this method find 'parts' of meta-entity. For example, procedure definition 'add_solution' and procedure declaration 'add_solution' are + * parts of 'add_solution' Procedure meta-entity. + * + * PLEASE NOTE : Method can take a while for execute. This because this method can result in synchronous call to the SymbolModelManager. Use with caution + * + * @param project - project setting compilation set context for the symbols. Can be null if isExact false. + * @param isExact - search only in compilation set, so all symbols found (except startingSymbol) will be in the compilation set + * @param startingSymbol - symbol to start search from + * @return + */ + public static Collection syncGetRelatedSymbols(IProject project, boolean isExact, IModulaSymbol startingSymbol) { + Set> refs = new HashSet>(); + + Queue symbolsToVisit = new LinkedList(); + symbolsToVisit.add(startingSymbol); + + while(!symbolsToVisit.isEmpty()) { + IModulaSymbol symbol = symbolsToVisit.poll(); + if (symbol != null && addToResult(refs, project, isExact, startingSymbol, symbol)) { + if (symbol instanceof IProcedureDefinitionSymbol) { + IProcedureDefinitionSymbol procDefinition = (IProcedureDefinitionSymbol)symbol; + IProcedureDeclarationSymbol declarationSymbol = procDefinition.getDeclarationSymbol(); + symbolsToVisit.add(declarationSymbol); + } + else if (symbol instanceof IProcedureDeclarationSymbol) { + IProcedureDeclarationSymbol procDeclaration = (IProcedureDeclarationSymbol)symbol; + symbolsToVisit.addAll(Lists.newArrayList(procDeclaration.getForwardDeclarations())); + + IProcedureDefinitionSymbol definitionSymbol = procDeclaration.getDefinitionSymbol(); + symbolsToVisit.add(definitionSymbol); + }else if (symbol instanceof IDefinitionModuleSymbol) { + IDefinitionModuleSymbol definitionModuleSymbol = (IDefinitionModuleSymbol) symbol; + IImplemantationModuleSymbol implemantationModuleSymbol = syncGetImplementationModuleSymbol(project, isExact, definitionModuleSymbol); + symbolsToVisit.add(implemantationModuleSymbol); + }else if (symbol instanceof IImplemantationModuleSymbol) { + IImplemantationModuleSymbol implemantationModuleSymbol = (IImplemantationModuleSymbol) symbol; + IDefinitionModuleSymbol definitionModule = syncGetDefinitionModuleSymbol(project, isExact, implemantationModuleSymbol); + symbolsToVisit.add(definitionModule); + } + else if (symbol instanceof IForwardTypeSymbol) { + IForwardTypeSymbol forwardTypeSymbol = (IForwardTypeSymbol) symbol; + symbolsToVisit.add(forwardTypeSymbol.getActualTypeSymbol()); + } + } + } + + List symbols = new ArrayList(); + Iterables.addAll(symbols, ReferenceUtils.transformToSymbols(refs)); + return symbols; + } + + private static boolean addToResult(Set> refs, + IProject project, boolean isExact, + IModulaSymbol startingSymbol, IModulaSymbol symbol) { + IModulaSymbolReference ref = ReferenceUtils.createRef(symbol); + if (refs.contains(ref)) { + return false; + } + + if (isExact && symbol != startingSymbol){ + File sourceFile = ModulaSymbolUtils.getSourceFile(symbol); + if (sourceFile != null) { + if (!isInCompilationSet(project, symbol)) { + symbol = null; + } + } + else{ + symbol = null; + } + } + + if (symbol != null) { + return refs.add(ref); + } + + return false; + } + + public static boolean isInCompilationSet(IProject project, IModulaSymbol symbol) { + if (project == null) { + return false; + } + File sourceFile = ModulaSymbolUtils.getSourceFile(symbol); + if (sourceFile != null) { + String compilationSetFile = CompilationSetManager.getInstance().lookup(project.getName(), sourceFile.getName()); + return ResourceUtils.equalsPathesAsInFS(compilationSetFile, sourceFile.getAbsolutePath()); + } + else { + return symbol instanceof IStandardModuleSymbol; + } + } + + /** + * Looks for the IImplemantationModuleSymbol corresponding to the IDefinitionModuleSymbol. + * PLEASE NOTE : Method can take a while for execute, use with caution. + * + * @param isExact + * @param project + * + * @param moduleSymbol + * @return + */ + public static IImplemantationModuleSymbol syncGetImplementationModuleSymbol(IProject project, boolean isExact, IDefinitionModuleSymbol moduleSymbol) { + return JavaUtils.as(IImplemantationModuleSymbol.class, syncGetCoupledModuleSymbol(project, isExact, moduleSymbol)); + } + + /** + * Looks for the IDefinitionModuleSymbol corresponding to the IImplemantationModuleSymbol. + * PLEASE NOTE : Method can take a while for execute, use with caution. + * @param isExact + * @param projectName + * + * @param moduleSymbol + * @return + */ + public static IDefinitionModuleSymbol syncGetDefinitionModuleSymbol(IProject project, boolean isExact, IImplemantationModuleSymbol moduleSymbol) { + return JavaUtils.as(IDefinitionModuleSymbol.class, syncGetCoupledModuleSymbol(project, isExact, moduleSymbol)); + } + + /** + * Looks for the IDefinitionModuleSymbol corresponding to the IImplemantationModuleSymbol (or vice versa). + * + * PLEASE NOTE : Method can take a while for execute, use with caution. + * @param isExact - this parameter constrains search to the compilation set. if {@link false}, then lookups will be used to search. + * @param project + * + * @param moduleSymbol + * @return + */ + public static IModuleSymbol syncGetCoupledModuleSymbol(IProject project, boolean isExact, IModuleSymbol moduleSymbol) { + String name = moduleSymbol.getName(); + if (name == null) { + return null; + } + + if (isExact && !isInCompilationSet(project, moduleSymbol)) { + return null; + } + + String moduleName = moduleSymbol.getName(); + String coupledModulePath = null; + String coupledModuleFileName = null; + if (moduleName != null) { + if (JavaUtils.isOneOf(moduleSymbol, IDefinitionModuleSymbol.class)){ + coupledModuleFileName = XdsFileUtils.getProgramModuleFileName(moduleName); + } + else { + coupledModuleFileName = XdsFileUtils.getDefinitionModuleFileName(moduleName); + } + coupledModulePath = CompilationSetManager.getInstance().lookup(project, coupledModuleFileName); + } + + BuildSettings buildSettings = moduleSymbol.getBuildSettings(); + if (coupledModulePath == null && !isExact) { + if (coupledModuleFileName != null) { + coupledModulePath = ResourceUtils.getAbsolutePath(buildSettings.lookup(coupledModuleFileName)); + } + } + + if (coupledModulePath != null) { + File coupledModuleFile = new File(coupledModulePath); + if (coupledModuleFile.exists()) { + ParseTask parseTask = ParseTaskFactory.createTask(project, Arrays.asList(coupledModuleFile)); + parseTask.setBuildSettings(buildSettings); + parseTask.setForce(false); + return SymbolModelManager.instance().syncParseFirstSymbol(parseTask); + } + } + + return null; + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/ui/consts/IUiConstants.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/ui/consts/IUiConstants.java new file mode 100644 index 0000000..9f01127 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/ui/consts/IUiConstants.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.core.ide.ui.consts; + +/** + * Global identifiers for the XDS IDE UI + * @author lsa80 + */ +public interface IUiConstants { + /** + * Id of the main perspective + */ + static final String DEVELOPMENT_PERSPECTIVE_ID = "com.excelsior.xds.DevelopmentPerspective"; //$NON-NLS-1$ +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/CoreEditorUtils.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/CoreEditorUtils.java new file mode 100644 index 0000000..9087458 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/CoreEditorUtils.java @@ -0,0 +1,692 @@ +package com.excelsior.xds.core.ide.utils; + +import java.io.File; +import java.lang.reflect.InvocationTargetException; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.compare.CompareEditorInput; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.SubProgressMonitor; +import org.eclipse.debug.ui.sourcelookup.CommonSourceNotFoundEditorInput; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.operation.IRunnableWithProgress; +import org.eclipse.jface.text.TextSelection; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.swt.SWT; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.team.core.history.IFileRevision; +import org.eclipse.ui.IEditorDescriptor; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IStorageEditorInput; +import org.eclipse.ui.IURIEditorInput; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.dialogs.ListSelectionDialog; +import org.eclipse.ui.ide.IDE; +import org.eclipse.ui.model.WorkbenchPartLabelProvider; +import org.eclipse.ui.part.FileEditorInput; +import org.eclipse.ui.part.MultiEditorInput; + +import com.excelsior.xds.core.exceptions.ExceptionHelper; +import com.excelsior.xds.core.filesystems.history.HistoryFs; +import com.excelsior.xds.core.help.IXdsHelpContextIds; +import com.excelsior.xds.core.ide.editor.XdsEditorConstants; +import com.excelsior.xds.core.ide.editor.input.StorageEditorInput; +import com.excelsior.xds.core.ide.internal.nls.Messages; +import com.excelsior.xds.core.ide.plugin.IdeCorePlugin; +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.AdapterUtilities; +import com.excelsior.xds.core.utils.BuilderUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.commons.utils.HelpUtils; +import com.excelsior.xds.ui.commons.utils.SwtUtils; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; + +public final class CoreEditorUtils +{ + /** + * This class can contain only static methods + */ + private CoreEditorUtils(){ + } + + public static IFileStore editorInputToFileStore(IEditorInput input) { + if (input == null) + return null; + + IFileStore result = null; + + if (input instanceof IFileEditorInput) { + IFile file = editorInputToIFile(input); + if (file != null) { + result = ResourceUtils.toFileStore(file); + } + } + else if (input instanceof IURIEditorInput) { + IURIEditorInput uriEditorInput = (IURIEditorInput) input; + result = ResourceUtils.toFileStore(uriEditorInput.getURI()); + } + else if (input instanceof CommonSourceNotFoundEditorInput || input instanceof CompareEditorInput) { + // do nothing + return null; + } + else if (input instanceof IStorageEditorInput) { + IStorageEditorInput storageEditorInput = (IStorageEditorInput)input; + IFileRevision state = AdapterUtilities.getAdapter(storageEditorInput, IFileRevision.class); + if (state != null) { + result = ResourceUtils.toFileStore(HistoryFs.toURI(state)); + } + } + + if (result == null){ + LogHelper.logError("Unknown editor input"); + } + + return result; + } + + /** + * Returns File underlying this editor input. + * + * This method should be modified, whenever new editor input is supported + * for some editor requiring access to File. + * + * @param input the editor input to operate on. + * + * @return file underlying given editor input. + */ + public static File editorInputToFile(IEditorInput input) { + if (input == null) + return null; + + if (input instanceof IFileEditorInput) { + IFile file = editorInputToIFile(input); + if (file != null) { + return ResourceUtils.getAbsoluteFile(file); + } + } + else if (input instanceof IURIEditorInput) { + IURIEditorInput uriEditorInput = (IURIEditorInput) input; + return new File(uriEditorInput.getURI()); + } + else if (input instanceof CommonSourceNotFoundEditorInput || input instanceof CompareEditorInput || input instanceof IStorageEditorInput) { + // do nothing + } + else{ + LogHelper.logError("Unknown editor input"); + } + + return null; + } + + public static ParsedModuleKey editorInputToParsedModuleKey(IEditorInput input) { + if (input == null) + return null; + + ParsedModuleKey key = null; + + if (input instanceof IFileEditorInput) { + IFile file = editorInputToIFile(input); + if (file != null) { + key = ParsedModuleKeyUtils.create(file); + } + } + else { + IFileStore fileStore = editorInputToFileStore(input); + if (fileStore != null) { + key = new ParsedModuleKey(fileStore); + } + } + + if (key == null) { + LogHelper.logError("Unknown editor input"); + } + + return key; + } + + public static IFile editorInputToIFile(IEditorInput input) { + return AdapterUtilities.getAdapter(input, IFile.class); + } + + public static IProject getIProjectFrom(IEditorInput input) { + IProject project = null; + IFile file = editorInputToIFile(input); + if (file != null) { + project = file.getProject(); + } + return project; + } + + public static String getAssociatedEditorId(String resourceName) { + String id = null; + if (XdsFileUtils.isModulaProgramModuleFile(resourceName)) { + id = XdsEditorConstants.MODULA_PROGRAM_MODULE_EDITOR_ID; + } + else if (XdsFileUtils.isModulaDefinitionModuleFile(resourceName)) { + id = XdsEditorConstants.MODULA_DEFINITION_MODULE_EDITOR_ID; + } + else if (XdsFileUtils.isOberonModuleFile(resourceName)) { + id = XdsEditorConstants.OBERON_MODULE_EDITOR_ID; + } + else if (XdsFileUtils.isOberonDefinitionModuleFile(resourceName)) { + id = XdsEditorConstants.OBERON_DEFINITION_MODULE_EDITOR_ID; + } + return id; + } + + public static final boolean isXdsEditor(String id) { + return XdsEditorConstants.XDS_EDITOR_IDS.contains(id); + } + + public static final boolean isXdsProgramEditor(String id) { + return XdsEditorConstants.XDS_PROGRAM_MODULE_EDITOR_IDS.contains(id); + } + + /** + * Returns the given editor's input as XDS element. + * + * @param editor the editor + * + * @return the given editor's input as IXdsElement or null if none + */ + public static IXdsElement getEditorInputXdsElement(IEditorPart editor) + { + Assert.isNotNull(editor); + return getEditorInputXdsElement(editor.getEditorInput()); + } + + public static IXdsElement getEditorInputXdsElement(IEditorInput editorInput) + { + if (editorInput != null) { + if (editorInput instanceof IFileEditorInput) { + IFile file = ((IFileEditorInput)editorInput).getFile(); + return XdsModelManager.getModel().getXdsElement(file); + } + } + return null; + } + + /** + * TODO : we will need to implement this is if Project Exlplorer will have elements like procedures under + * file node. In this case, we would need to find out what file this particular procedure corresponds to. + */ + public static IEditorPart findEditor(Object inputElement, boolean activate) { + if (inputElement instanceof IXdsElement) { + + } + + return null; + } + + public static String getEditorID(IEditorInput input) throws PartInitException { + Assert.isNotNull(input); + IEditorDescriptor editorDescriptor; + if (input instanceof IFileEditorInput) + editorDescriptor= IDE.getEditorDescriptor(((IFileEditorInput)input).getFile()); + else { + editorDescriptor= IDE.getEditorDescriptor(input.getName()); + } + return editorDescriptor.getId(); + } + + /** + * Saves all editors if "save automatically before build" is set in preferences + * + * @return true if save was successful and refactoring can proceed; + * false if the refactoring must be cancelled + */ + public static boolean saveEditors(boolean isPrompt) { + if (Display.getCurrent() == null) { + // If it is not UI thread - run us in UI thread + final boolean res[] = {false}; + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + res[0] = saveEditors(isPrompt); + } + }); + return res[0]; + } + Shell shell = SwtUtils.getDefaultShell(); + + List dirtyEditors = getDirtyEditors(true); + if (dirtyEditors.isEmpty()) { + return true; + } + + if (isPrompt) { + dirtyEditors = askSaveAllDirtyEditors(shell, dirtyEditors); + } + + final List listToSave = dirtyEditors; + if (listToSave == null) { + return false; // Cancelled + } + try { + // Save + boolean autoBuild= BuilderUtils.setAutoBuilding(false); + try { + IRunnableWithProgress runnable= new IRunnableWithProgress() { + public void run(IProgressMonitor pm) throws InterruptedException { + int count= listToSave.size(); + pm.beginTask("", count); //$NON-NLS-1$ + for (int i= 0; i < count; i++) { + listToSave.get(i).doSave(new SubProgressMonitor(pm, 1)); + if (pm.isCanceled()) + throw new InterruptedException(); + } + pm.done(); + } + + }; + try { + PlatformUI.getWorkbench().getProgressService().runInUI(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), runnable, null); + } catch (InterruptedException e) { + return false; + } catch (InvocationTargetException e) { + return false; + } + } finally { + BuilderUtils.setAutoBuilding(autoBuild); + } + return true; + } catch (CoreException e) { + return false; + } + } + + /** + * Opens a resizable dialog listing possible files to save, the user can select none, + * some or all of the files before pressing OK. + * + * @param shell + * @param dirtyEditors + * @return + */ + private static List askSaveAllDirtyEditors(Shell shell, List dirtyEditors) { + + ListSelectionDialog dlg = new ListSelectionDialog( + shell, dirtyEditors, + new ArrayContentProvider(), + new WorkbenchPartLabelProvider(), Messages.SaveEditorsDialog_Message+':') + { + protected int getShellStyle() { + return super.getShellStyle() | SWT.SHEET; + } + protected void configureShell(Shell shell) { + super.configureShell(shell); + HelpUtils.setHelp(shell, IXdsHelpContextIds.SAVE_AND_BUILD_DIALOG); + } + }; + dlg.setInitialSelections(dirtyEditors.toArray()); + dlg.setTitle(Messages.SaveEditorsDialog_Title); + int result = dlg.open(); + + List res = null; + if (result != IDialogConstants.CANCEL_ID) { + Object[] objs = dlg.getResult(); + res = new ArrayList(objs.length); + for (Object o : objs) { + res.add((IEditorPart)o); + } + } + return res; + } + + public static List getDirtyEditors(boolean skipNonResourceEditors) { + Set inputs= new HashSet(); + List result= new ArrayList(0); + IWorkbench workbench= PlatformUI.getWorkbench(); + IWorkbenchWindow[] windows= workbench.getWorkbenchWindows(); + for (int i= 0; i < windows.length; i++) { + IWorkbenchPage[] pages= windows[i].getPages(); + for (int x= 0; x < pages.length; x++) { + IEditorPart[] editors= pages[x].getDirtyEditors(); + for (int z= 0; z < editors.length; z++) { + IEditorPart ep= editors[z]; + IEditorInput input= ep.getEditorInput(); + if (inputs.add(input)) { + if (!skipNonResourceEditors || isResourceEditorInput(input)) { + result.add(ep); + } + } + } + } + } + return result; + } + + /** + * @param input either {@link IFile},{@link IAdaptable},{@link IStorage} + * @return + */ + public static IEditorInput getEditorInput(Object input) { + if (input instanceof IFile) { + return new FileEditorInput((IFile) input); + } + else if (input instanceof IAdaptable) { + IAdaptable adaptable = (IAdaptable)input; + IFile adapted = (IFile) adaptable.getAdapter(IFile.class); + if (adapted != null) { + return new FileEditorInput((IFile)adapted); + } + } + else if (input instanceof IStorage) { + return new StorageEditorInput((IStorage)input){ + @Override + public boolean exists() { + return true; // TODO fix it + }}; + } + + return null; + } + + /** + * Tests if a element is currently shown in an editor + * + * @param inputElement the input element + * @return the IEditorPart if shown, null if element is not open in an editor + */ + public static IEditorPart isOpenInEditor(Object inputElement) { + IEditorPart editor= CoreEditorUtils.findEditor(inputElement, false); + if (editor != null) + return editor; + + IEditorInput input= getEditorInput(inputElement); + + if (input != null) { + IWorkbenchPage p= WorkbenchUtils.getActivePage(); + if (p != null) { + return p.findEditor(input); + } + } + + return null; + } + + private static IEditorPart openInEditor(IEditorInput input, + String editorID, boolean activate) throws CoreException { + Assert.isNotNull(input); + Assert.isNotNull(editorID); + + IWorkbenchPage p = WorkbenchUtils.getActivePage(); + if (p == null) + ExceptionHelper.throwCoreException(IdeCorePlugin.PLUGIN_ID, "JavaEditorMessages.EditorUtility_no_active_WorkbenchPage"); //$NON-NLS-1$ + + return p.openEditor(input, editorID, activate); + } + + /** + * Opens the editor currently associated with the given element (IFile, IStorage...) + * + * @param inputElement the input element + * @param activate true if the editor should be activated + * + * @return an open editor or null if an external editor was opened + * + * @throws PartInitException if the editor could not be opened or the input element is not valid + * Status code {@link IJavaStatusConstants#EDITOR_NO_EDITOR_INPUT} if opening the editor failed as + * no editor input could be created for the given element. + */ + public static IEditorPart openInEditor( Object inputElement, boolean activate + ) throws CoreException + { + if (inputElement instanceof IFile){ + return openInEditor((IFile) inputElement, activate); + } + + IEditorInput input = getEditorInput(inputElement); + if (input == null) + ExceptionHelper.throwCoreException(IdeCorePlugin.PLUGIN_ID, "Could not get an editor input for the given element", -1); //$NON-NLS-1$ + + return openInEditor(input, CoreEditorUtils.getEditorID(input), activate); + } + + /** + * Opens {@code symbol} in the editor and selects its position (obtained via {@link IModulaSymbol#getPosition()}); + * + * @param project - which project should be considered for the given symbol + * @param symbol + * + */ + public static IEditorPart openInEditor(IProject project, IModulaSymbol symbol) { + IEditorPart editorPart = null; + if ((symbol != null) && (symbol.getPosition() != null)) { + IFile[] symbolFiles = ModulaSymbolUtils.findIFilesForSymbol(project, symbol); + if (symbolFiles.length > 0) { + IFile file = symbolFiles[0]; + try { + editorPart = openInEditor(file, true, symbol.getPosition().getOffset(), symbol.getName().length()); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + else{ + IFileStore fileStore = ModulaSymbolUtils.getSourceFileStore(symbol); + try { + editorPart = openInEditor(fileStore, true, symbol.getPosition().getOffset(), symbol.getName().length()); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + return editorPart; + } + + + /** + * Opens an editor on the given File object. + *

+ * Unlike the other openEditor methods, this one + * can be used to open files that reside outside the workspace + * resource set. + *

+ *

+ * If the page already has an editor open on the target object then that + * editor is brought to front; otherwise, a new editor is opened. + *

+ * + * @param file the file to be opened + * @param activate if true the editor will be activated + * + * @return an open editor or null if an external editor was opened + * or file does not exist. + */ + public static IEditorPart openInEditor(File file) { + if (file != null && file.exists() && file.isFile()) { + return openInEditor(file.toURI()); + } + return null; + } + + public static IEditorPart openInEditor(URI uri) { + return openInEditor(ResourceUtils.toFileStore(uri)); + } + + public static IEditorPart openInEditor(IFileStore fileStore) { + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + try { + return IDE.openEditorOnFileStore(page, fileStore); + } catch (PartInitException e) { + } + return null; + } + + /** + * Opens an editor on the given File object and sets the current selection + * for the given range. + * + *

+ * Unlike the other openEditor methods, this one + * can be used to open files that reside outside the workspace + * resource set. + *

+ *

+ * If the page already has an editor open on the target object then that + * editor is brought to front; otherwise, a new editor is opened. + *

+ * + * @param file the file to be opened + * @param offset the offset of the range, must not be negative + * @param length the length of the range, must not be negative + * + * @return an open editor or null if an external editor was opened + * or file does not exist. + */ + public static IEditorPart openInEditor(File file, int offset, int length) { + IEditorPart editorPart = openInEditor(file); + if (editorPart != null) { + setSelection(editorPart, offset, length); + } + return editorPart; + } + + + /** + * Opens an editor on the given IFile resource. + * + * @param file the file to be opened + * @param activate if true the editor will be activated + * + * @return an open editor or null if an external editor was opened + */ + public static IEditorPart openInEditor( IFile file, boolean activate + ) throws CoreException + { + if (file == null) + ExceptionHelper.throwCoreException(IdeCorePlugin.PLUGIN_ID, "File must not be null"); //$NON-NLS-1$ + + IWorkbenchPage p = WorkbenchUtils.getActivePage(); + if (p == null) + ExceptionHelper.throwCoreException(IdeCorePlugin.PLUGIN_ID, "Cannot get active page"); //$NON-NLS-1$ + + if (ResourceUtils.isOpen(file)){ + return IDE.openEditor(p, file, activate); + } + else{ + return openInEditor(ResourceUtils.getAbsoluteFile(file)); + } + } + + /** + * Opens an editor on the given IFile resource and sets the current selection + * for the given range. + * + * @param file the file to be opened + * @param offset the offset of the range, must not be negative + * @param length the length of the range, must not be negative + * + * @return an open editor or null if an external editor was opened. + */ + public static IEditorPart openInEditor( IFile file, boolean activate + , int offset, int length + ) throws CoreException + { + IEditorPart editorPart = openInEditor(file, activate); + if (editorPart != null) { + setSelection(editorPart, offset, length); + } + return editorPart; + } + + public static IEditorPart openInEditor(IFileStore fileStore, + boolean activate, int offset, int length) throws CoreException { + IEditorPart editorPart = openInEditor(fileStore.toURI()); + if (editorPart != null) { + setSelection(editorPart, offset, length); + } + return editorPart; + } + /** + * Sets the current selection for the given range. + * + * @param editor the editor to be operated on + * @param offset the offset of the range, must not be negative + * @param length the length of the range, must not be negative + */ + public static void setSelection(IEditorPart editor, int offset, int length) + { + ISelectionProvider provider = editor.getEditorSite().getSelectionProvider(); + if (provider != null) { + IWorkbenchPart activePart = WorkbenchUtils.getActivePart(); + if (activePart instanceof IEditorPart) { + IWorkbenchPage page = WorkbenchUtils.getActivePage(); + page.getNavigationHistory().markLocation((IEditorPart) activePart); + } + provider.setSelection(new TextSelection(offset, length)); + } + } + + public static IEditorInput getActiveEditorInput() { + IEditorPart part = WorkbenchUtils.getActiveEditor(false); + if (part != null) { + return part.getEditorInput(); + } + return null; + } + + public static IResource getActiveEditorInputAsResource() { + IEditorInput editorInput = getActiveEditorInput(); + if (editorInput == null) return null; + return (IResource) editorInput.getAdapter(IResource.class); + } + + public static IFile getActiveEditorInputAsIFile() { + IEditorInput editorInput = getActiveEditorInput(); + if (editorInput == null) return null; + return (IFile) editorInput.getAdapter(IFile.class); + } + + private static boolean isResourceEditorInput(IEditorInput input) { + if (input instanceof MultiEditorInput) { + IEditorInput[] inputs= ((MultiEditorInput) input).getInput(); + for (int i= 0; i < inputs.length; i++) { + if (inputs[i].getAdapter(IResource.class) != null) { + return true; + } + } + } else if (input.getAdapter(IResource.class) != null) { + return true; + } + return false; + } + + public static String syncGetSymbolName(IFile ifile) { + IModuleSymbol moduleSymbol = SymbolModelManager.instance().syncParseFirstSymbol(ParseTaskFactory.create(ifile)); + if (moduleSymbol == null) { + return null; + } + return moduleSymbol.getName(); + } +} diff --git a/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/ParsedModuleKeyUtils.java b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/ParsedModuleKeyUtils.java new file mode 100644 index 0000000..0e399c3 --- /dev/null +++ b/product/com.excelsior.xds.core.ide/src/com/excelsior/xds/core/ide/utils/ParsedModuleKeyUtils.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.core.ide.utils; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.google.common.collect.Iterables; + +public final class ParsedModuleKeyUtils { + public static ParsedModuleKey create(IFile ifile) { + IProject project = ifile != null? ifile.getProject() : null; + return new ParsedModuleKey(project, ResourceUtils.toFileStore(ifile)); + } + + public static ParsedModuleKey create(final IProject project, IFileStore moduleFile) { + return new ParsedModuleKey(project, moduleFile); + } + + public static Iterable transform(final IProject project, Iterable files) { + return Iterables.transform(files, f -> new ParsedModuleKey(project, f)); + } + + public static Iterable transform(final BuildSettings buildSettings, Iterable files) { + return Iterables.transform(files, f -> new ParsedModuleKey(buildSettings, f)); + } + + public static Iterable create(Iterable ifiles) { + return Iterables.transform(ifiles, iFile -> create(iFile)); + } +} diff --git a/product/com.excelsior.xds.core.model.nl_ru/.classpath b/product/com.excelsior.xds.core.model.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.model.nl_ru/.project b/product/com.excelsior.xds.core.model.nl_ru/.project new file mode 100644 index 0000000..e16bd89 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.model.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.model.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.model.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..52bf5b7 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.core.model.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.core.model;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.core.model.nl_ru/build.properties b/product/com.excelsior.xds.core.model.nl_ru/build.properties new file mode 100644 index 0000000..192c037 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + fragment_ru.properties,\ + plugin_ru.properties + diff --git a/product/com.excelsior.xds.core.model.nl_ru/fragment.properties b/product/com.excelsior.xds.core.model.nl_ru/fragment.properties new file mode 100644 index 0000000..f7ffc95 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.core.model Russian NLS Support diff --git a/product/com.excelsior.xds.core.model.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.core.model.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..3ca93a9 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.core.model diff --git a/product/com.excelsior.xds.core.model.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.core.model.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..245b7ca --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.core.model diff --git a/product/com.excelsior.xds.core.model.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.core.model.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..ac779ce --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.core.model.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..9e7b067 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Áàçîâàÿ ïîääåðæêà ìîäåëè XDS Ìîäóëà-2 ïðîãðàìì \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru.properties b/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru.properties new file mode 100644 index 0000000..cd5c9f5 --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru.properties @@ -0,0 +1,84 @@ +ConsoleType_XDS_Tool=XDS \u0423\u0442\u0438\u043b\u0438\u0442\u0430 + +Activator_LinkingExtFilesToResources=\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +ExternalResourceManager_LinkingSdkFilesToResources=\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 XDS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +NewProjectCreator_BuildingProject=\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +NewProjectCreator_CantCreateDir=\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +NewProjectCreator_CantNoSdk=\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. +NewProjectCreator_CreatePrjFromScratch=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 +NewProjectCreator_DoYouWantToContinue=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c? +NewProjectCreator_ErrReadingTpl=\u041e\u0448\u0438\u0431\u043a\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 %s.\n\u0424\u0430\u0439\u043b %s \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d.\n +NewProjectCreator_ErrWritingFile=\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0430\u0439\u043b\u0430 ' +NewProjectCreator_ProjDirEmpty=\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u0443\u0441\u0442.\n\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435? +NewProjectCreator_ProjectWord=\u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 +NewProjectCreator_RedirectionWord=\u0444\u0430\u0439\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 +NewProjectCreator_TheDirIsFile=\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 +NewProjectCreator_TheFollowingProblems=\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:\n\n + +SdkIniFileWriter_ComentSdkName=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f + +SdkIniFileWriter_ComentMainComponents=\# \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f +SdkIniFileWriter_ComentXcPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +SdkIniFileWriter_ComentXdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 +SdkIniFileWriter_ComentSimulatorPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 + +SdkIniFileWriter_ComentLibPath0=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0444\u0430\u0439\u043b\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 +SdkIniFileWriter_ComentPrimExts0=\# \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 Project Explorer +SdkIniFileWriter_ComentPrimExts1= +SdkIniFileWriter_ComentManifestPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 + +SdkIniFileWriter_ComentTemptates=\# \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 +SdkIniFileWriter_ComentMainTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u043c\u0432\u043e\u043b ";", \u043a\u043e\u0442\u043e\u0440\u044b\u0435 +SdkIniFileWriter_ComentDirsList1=\# \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +SdkIniFileWriter_ComentTrdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 (*.trd) +SdkIniFileWriter_ComentTprPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (*.tpr) + +SdkIniFileWriter_ComentTools=\# \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b +SdkIniFileWriter_ComentToolName=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +SdkIniFileWriter_ComentToolLocation=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 + +SdkIniFileWriter_ComentToolMenuOn0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +SdkIniFileWriter_ComentToolMenuOn1= +SdkIniFileWriter_ComentToolMenuOff0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c ";", +SdkIniFileWriter_ComentToolFileExtList1=\# \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. + +SdkIniFileWriter_ComentToolSourceRoot1=\# \u0422\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. +SdkIniFileWriter_ComentToolSourceRoot2=\# \u0422\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0438\u043f\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: + +SdkIniFileWriter_ComentToolArgs=\# \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 +SdkIniFileWriter_ComentToolFor=\# \u0434\u043b\u044f +SdkIniFileWriter_ComentToolWorkDir=\# \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 + +SdkIniFileWriter_ComentToolEnvNars0=\# \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. +SdkIniFileWriter_ComentToolEnvVars1=\# \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438. +SdkIniFileWriter_ComentToolEnvVars2= +SdkIniFileWriter_CommentToolGroup0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043f\u043e\u0434\u043c\u0435\u043d\u044e), \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u0438\u043b\u0438 \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +Tool_InvalidToolName=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +Tool_InvalidToolWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 - \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +Tool_InvalidToolWorkDir_BadVars=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f +XdsProject_ExternalDependencies=\u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 +XdsProject_SdkLibrary=\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 +XdsProjectSettings_CantDetermineDefaultDir=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +XdsProjectSettings_CantDetermineWorkDir=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. +XdsProjectSettings_InvalidWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 " +XdsProjectSettings_InvalidWorkDir2=" \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +XdsProjectSettings_WrongWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +XTool_BadWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433: ' +XTool_ToolFileNotFound=\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d: ' +XTool_ToolTerminated=[\u0420\u0430\u0431\u043e\u0442\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430] + +XdsImportSection_Name=\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u043f\u043e\u0440\u0442\u0430 +XdsRecordVariantSelector_Name=\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c +XdsRecordVariant_Name=\u0432\u0430\u0440\u0438\u0430\u043d\u0442 diff --git a/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..7822abd --- /dev/null +++ b/product/com.excelsior.xds.core.model.nl_ru/src/com/excelsior/xds/core/model/internal/nls/messages_ru_1251.properties @@ -0,0 +1,84 @@ +ConsoleType_XDS_Tool=XDS Óòèëèòà + +Activator_LinkingExtFilesToResources=Ñâÿçûâàíèå âíåøíèõ ôàéëîâ ñ ðåñóðñàìè ïðîåêòà +ExternalResourceManager_LinkingSdkFilesToResources=Ñâÿçûâàíèå XDS áèáëèîòåêè ñ ðåñóðñàìè ïðîåêòà +NewProjectCreator_BuildingProject=Ñáîðêà ïðîåêòà +NewProjectCreator_CantCreateDir=Îøèáêà ñîçäàíèÿ êàòàëîãà +NewProjectCreator_CantNoSdk=Îøèáêà ñîçäàíèÿ ïðîåêòà: íå óêàçàíà ñèñòåìà ïðîãðàììèðîâàíèÿ. +NewProjectCreator_CreatePrjFromScratch=Ñîçäàòü ïðîåêò +NewProjectCreator_DoYouWantToContinue=Âû äåéñòâèòåëüíî õîòèòå ïðîäîëæèòü? +NewProjectCreator_ErrReadingTpl=Îøèáêà ÷òåíèÿ øàáëîíà %s.\nÔàéë %s íå ñîçäàí.\n +NewProjectCreator_ErrWritingFile=Îøèáêà çàïèñè ôàéëà ' +NewProjectCreator_ProjDirEmpty=Êàòàëîã ïðîåêòà íå ïóñò.\nÂû õîòèòå ñîçäàòü íîâûé ïðîåêò â ýòîì êàòàëîãå? +NewProjectCreator_ProjectWord=ïðîåêòíîãî ôàéëà +NewProjectCreator_RedirectionWord=ôàéëà ïåðåíàïðàâëåíèé +NewProjectCreator_TheDirIsFile=Óêàçàííîå èìÿ êàòàëîãà ñîâïàäàåò ñ èìåíåì óæå ñóùåñòâóþùåãî ôàéëà +NewProjectCreator_TheFollowingProblems=Îáíàðóæåíû ñëåäóþùèå ïðîáëåìû:\n\n + +SdkIniFileWriter_ComentSdkName=\# Íàçâàíèå ñèñòåìû ïðîãðàììèðîâàíèÿ + +SdkIniFileWriter_ComentMainComponents=\# Îñíîâíûå êîìïîíåíòû ñèñòåìû ïðîãðàììèðîâàíèÿ +SdkIniFileWriter_ComentXcPath=\# Ïóòü äî êîìïèëÿòîðà +SdkIniFileWriter_ComentXdPath=\# Ïóòü äî îòëàä÷èêà +SdkIniFileWriter_ComentSimulatorPath=\# Ïóòü äî èíòåðïðåòàòîðà + +SdkIniFileWriter_ComentLibPath0=\# Ïóòü äî äèðåêòîðèè, ñîäåðæàùåé ôàéëû îïðåäåëåíèé ñòàíäàðòíîé áèáëèîòåêè +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# Ðàñøèðåíèå äëÿ èñïîëíÿåìûõ ôàéëîâ +SdkIniFileWriter_ComentPrimExts0=\# Ðàñøèðåíèÿ ôàéëîâ, êîòîðûå ñëåäóåò ïîêàçûâàòü â Project Explorer +SdkIniFileWriter_ComentPrimExts1= +SdkIniFileWriter_ComentManifestPath=\# Ïóòü äî ôàéëà c ìàíèôåñòîì îáíîâëåíèé + +SdkIniFileWriter_ComentTemptates=\# Øàáëîíû ñîçäàíèÿ íîâûõ ìîäóëåé è ïðîåêòîâ +SdkIniFileWriter_ComentMainTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ãëàâíîãî ìîäóëÿ ðåàëèçàöèè (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ìîäóëåé îïðåäåëåíèé (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ìîäóëåé ðåàëèçàöèè (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# Ñïèñîê äèðåêòîðèé, ïåðå÷èñëåííûõ ÷åðåç ñèìâîë ";", êîòîðûå +SdkIniFileWriter_ComentDirsList1=\# áóäóò àâòîìàòè÷åñêè ñîçäàíû äëÿ íîâîãî ïðîåêòà +SdkIniFileWriter_ComentTrdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ íîâîãî ôàéëà ïåðåíàïðàâëåíèé (*.trd) +SdkIniFileWriter_ComentTprPath=\# Ïóòü äî øàáëîíà ïðîåêòíîãî ôàéëà (*.tpr) + +SdkIniFileWriter_ComentTools=\# Äîïîëíèòåëüíûå èíñòðóìåíòû +SdkIniFileWriter_ComentToolName=\# Íàçâàíèå èíñòðóìåíòà +SdkIniFileWriter_ComentToolLocation=\# Ïóòü äî èíñòðóìåíòà + +SdkIniFileWriter_ComentToolMenuOn0=\# Íàçâàíèå ïóíêòà ìåíþ äëÿ çàïóñêà èíñòðóìåíòà +SdkIniFileWriter_ComentToolMenuOn1= +SdkIniFileWriter_ComentToolMenuOff0=\# Íàçâàíèå ïóíêòà ìåíþ, êîãäà èíñòðóìåíò íåäîñòóïåí äëÿ èñïîëüçîâàíèÿ +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# Ñïèñîê ðàñøèðåíèé ôàéëîâ, ðàçäåëåííûõ ñèìâîëîì ";", +SdkIniFileWriter_ComentToolFileExtList1=\# äëÿ êîòîðûõ ïðèìåíèì èíñòðóìåíò. + +SdkIniFileWriter_ComentToolSourceRoot1=\# Òèï ïðîåêòîâ äëÿ êîòîðûõ ïðèìåíèì èíñòðóìåíò. +SdkIniFileWriter_ComentToolSourceRoot2=\# Òèï ïðîåêòà îïðåäåëÿåòñÿ ïî òèïó êîðíåâîãî ýëåìåíòà èñõîäíîãî êîäà: + +SdkIniFileWriter_ComentToolArgs=\# Àðãóìåíòû êîìàíäíîé ñòðîêè +SdkIniFileWriter_ComentToolFor=\# äëÿ +SdkIniFileWriter_ComentToolWorkDir=\# Ðàáî÷èé êàòàëîã èíñòðóìåíòà + +SdkIniFileWriter_ComentToolEnvNars0=\# Äîïîëíèòåëüíûå ïåðåìåííûå îêðóæåíèÿ. +SdkIniFileWriter_ComentToolEnvVars1=\# Äàííûå ïåðåìåííûå ïîëíîñòüþ çàìåíÿò ïåðåìåííûìè îêðóæåíèÿ ñ òàêèìè æå èìåíàìè. +SdkIniFileWriter_ComentToolEnvVars2= +SdkIniFileWriter_CommentToolGroup0=\# Íàçâàíèå ãðóïïû (ïîäìåíþ), ãäå ðàñïîëîæåí èíñòðóìåíò (èëè ïóñòàÿ ñòðîêà) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=Íåêîððåêòíûé ïóòü äî èíñòðóìåíòà +Tool_InvalidToolName=Íåêîððåêòíîå íàçâàíèå èíñòðóìåíòà +Tool_InvalidToolWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã - óêàçàí íåêîððåêòíûé ïóòü äî êàòàëîãà +Tool_InvalidToolWorkDir_BadVars=Íåêîððåêòíûé ðàáî÷èé êàòàëîã - èñïîëüçîâàíà íåèçâåñòíàÿ ïåðåìåííàÿ +XdsProject_ExternalDependencies=Âíåøíèå çàâèñèìîñòè +XdsProject_SdkLibrary=Ñèñòåìíàÿ áèáëèîòåêà +XdsProjectSettings_CantDetermineDefaultDir=Íå óäàåòñÿ àâòîìàòè÷åñêè îïðåäåëèòü, èñïîëüçóåìûé ïî óìîë÷àíèþ, ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà +XdsProjectSettings_CantDetermineWorkDir=Íå óäàåòñÿ îïðåäåëèòü ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà. Óêàæèòå åãî â ñâîéñòâàõ ïðîåêòà. +XdsProjectSettings_InvalidWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà " +XdsProjectSettings_InvalidWorkDir2=" óêàçàí â ñâîéñòâàõ ïðîåêòà +XdsProjectSettings_WrongWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà +XTool_BadWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã: ' +XTool_ToolFileNotFound=Èíñòðóìåíò íå íàéäåí: ' +XTool_ToolTerminated=[Ðàáîòà èíñòðóìåíòà ïðåêðàùåíà] + +XdsImportSection_Name=ñïèñîê èìïîðòà +XdsRecordVariantSelector_Name=âàðèàíòíàÿ çàïèñü +XdsRecordVariant_Name=âàðèàíò diff --git a/product/com.excelsior.xds.core.model/.classpath b/product/com.excelsior.xds.core.model/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.model/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.model/.project b/product/com.excelsior.xds.core.model/.project new file mode 100644 index 0000000..e0b2224 --- /dev/null +++ b/product/com.excelsior.xds.core.model/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.model + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.model/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.model/META-INF/MANIFEST.MF new file mode 100644 index 0000000..dc75cf6 --- /dev/null +++ b/product/com.excelsior.xds.core.model/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.core.model;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.core.model.plugin.ModelPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.core.resources, + org.apache.commons.collections, + org.apache.commons.io, + org.apache.commons.lang, + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.core.filebuffers, + org.eclipse.ui.ide, + org.eclipse.core.filesystem, + com.excelsior.xds.builder;bundle-version="1.7.0", + org.eclipse.team.core +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.core.model, + com.excelsior.xds.core.model.utils diff --git a/product/com.excelsior.xds.core.model/build.properties b/product/com.excelsior.xds.core.model/build.properties new file mode 100644 index 0000000..308ebe6 --- /dev/null +++ b/product/com.excelsior.xds.core.model/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties + diff --git a/product/com.excelsior.xds.core.model/plugin.properties b/product/com.excelsior.xds.core.model/plugin.properties new file mode 100644 index 0000000..89185ee --- /dev/null +++ b/product/com.excelsior.xds.core.model/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Core UI Model diff --git a/product/com.excelsior.xds.core.model/plugin.xml b/product/com.excelsior.xds.core.model/plugin.xml new file mode 100644 index 0000000..e54aa18 --- /dev/null +++ b/product/com.excelsior.xds.core.model/plugin.xml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/CompilationUnitType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/CompilationUnitType.java new file mode 100644 index 0000000..3bc3629 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/CompilationUnitType.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.model; + +public enum CompilationUnitType +{ + /** Modula-2/Oberon-2 program module: *.mod, *.ob2 */ + PROGRAM_MODULE, + + /** Modula-2/Oberon-2 definition module: *.def, *.odf */ + DEFINITION_MODULE, + + /** XDS symbol file: *.sym */ + SYMBOL_FILE +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IEditableXdsModel.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IEditableXdsModel.java new file mode 100644 index 0000000..d452e0b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IEditableXdsModel.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; + + +public interface IEditableXdsModel extends IXdsModel +{ + void handleAddResource(IResourceDelta rootDelta, IResource affectedResource); + void handleChangeResource(IResourceDelta rootDelta, IResource affectedResource, boolean isContentChanged); + void handleRemoveResource(IResourceDelta rootDelta, IResource affectedResource); + + void notifyChanged(); + + void editElement(IXdsElement element, IXdsElementOperation operation); + + IXdsNonWorkspaceCompilationUnit createNonWorkspaceXdsElement(IFileStore sourceFile); + void removeNonWorkspaceXdsElement(IXdsNonWorkspaceCompilationUnit xdsElement); + void endDeltaProcessing(IResourceDelta rootDelta); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IElementChangedListener.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IElementChangedListener.java new file mode 100644 index 0000000..34cb22d --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IElementChangedListener.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IElementChangedListener { + void elementChanged(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ISourceBound.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ISourceBound.java new file mode 100644 index 0000000..2411f71 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ISourceBound.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.model; + +public interface ISourceBound +{ + public SourceBinding getSourceBinding(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAliasQualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAliasQualifiedImportElement.java new file mode 100644 index 0000000..a94e992 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAliasQualifiedImportElement.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; + +public interface IXdsAliasQualifiedImportElement extends IXdsQualifiedImportElement +{ + public IModuleAliasSymbol getAliasSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAnonymousRecordVariantSelector.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAnonymousRecordVariantSelector.java new file mode 100644 index 0000000..e396c90 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsAnonymousRecordVariantSelector.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.model; + +public interface IXdsAnonymousRecordVariantSelector extends IXdsRecordVariantSelector + , IXdsSyntheticElement +{ + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompilationUnit.java new file mode 100644 index 0000000..54c47aa --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompilationUnit.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public interface IXdsCompilationUnit extends IXdsElement + , IXdsElementWithSymbol + , IXdsContainer +{ + CompilationUnitType getCompilationUnitType(); + + IXdsModule getModuleElement(); + + @Override + IModuleSymbol getSymbol(); + + boolean isInCompilationSet(); + + ModulaAst getModulaAst(); + + public IFileStore getAbsoluteFile(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompositeType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompositeType.java new file mode 100644 index 0000000..695547f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsCompositeType.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsCompositeType extends IXdsType, IXdsContainer +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsConstant.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsConstant.java new file mode 100644 index 0000000..0c0190c --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsConstant.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; + +public interface IXdsConstant extends IXdsElement, IXdsElementWithSymbol { + @Override + public IConstantSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsContainer.java new file mode 100644 index 0000000..4644051 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsContainer.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +public interface IXdsContainer extends IXdsElement +{ + public Collection getChildren(); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDbgScriptBundleFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDbgScriptBundleFile.java new file mode 100644 index 0000000..4650adc --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDbgScriptBundleFile.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsDbgScriptBundleFile extends IXdsResource { + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDdgScriptUnitFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDdgScriptUnitFile.java new file mode 100644 index 0000000..b026cf3 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsDdgScriptUnitFile.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsDdgScriptUnitFile extends IXdsResource { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElement.java new file mode 100644 index 0000000..fa209a8 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElement.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +public interface IXdsElement +{ + IXdsProject getXdsProject(); + + String getElementName(); + IXdsContainer getParent(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementOperation.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementOperation.java new file mode 100644 index 0000000..9fec26a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementOperation.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.model; + + +public interface IXdsElementOperation { + void invoke(IXdsElement element); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithDefinitions.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithDefinitions.java new file mode 100644 index 0000000..a80b33e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithDefinitions.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +public interface IXdsElementWithDefinitions extends IXdsElementWithSymbol + , IXdsContainer +{ + public IXdsCompilationUnit getCompilationUnit(); + public Collection getModules(); + public Collection getProcedures(); + public Collection getVariables(); + public Collection getConstants(); + public Collection getTypes(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithSymbol.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithSymbol.java new file mode 100644 index 0000000..3696806 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsElementWithSymbol.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public interface IXdsElementWithSymbol extends IXdsElement, ISourceBound { + public IModulaSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumElement.java new file mode 100644 index 0000000..779d1c3 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumElement.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; + +public interface IXdsEnumElement extends IXdsConstant { + @Override + public IEnumElementSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumType.java new file mode 100644 index 0000000..f5d60c4 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsEnumType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; + +public interface IXdsEnumType extends IXdsCompositeType +{ + @Override + public IEnumTypeSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnit.java new file mode 100644 index 0000000..4028a62 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnit.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.resources.IStorage; +import org.eclipse.core.runtime.IPath; + +public interface IXdsExternalCompilationUnit extends IXdsCompilationUnit + , IStorage +{ + IPath getFullPath(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnitContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnitContainer.java new file mode 100644 index 0000000..43d701c --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalCompilationUnitContainer.java @@ -0,0 +1,4 @@ +package com.excelsior.xds.core.model; + +public interface IXdsExternalCompilationUnitContainer extends IXdsContainer{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalDependenciesContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalDependenciesContainer.java new file mode 100644 index 0000000..ceecc15 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsExternalDependenciesContainer.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsExternalDependenciesContainer extends IXdsContainer { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFolderContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFolderContainer.java new file mode 100644 index 0000000..7ef1df0 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFolderContainer.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +import org.eclipse.core.resources.IResource; + +/** + * Container which is actually folder on the file system + * + * @author lsa80 + */ +public interface IXdsFolderContainer extends IXdsContainer { + /** + * Gets all resources corresponding to immediate children + */ + Collection getChildResources(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFormalParameter.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFormalParameter.java new file mode 100644 index 0000000..1e1e8c1 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsFormalParameter.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; + +public interface IXdsFormalParameter extends IXdsElementWithSymbol +{ + @Override + public IFormalParameterSymbol getSymbol(); + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportElement.java new file mode 100644 index 0000000..c9e4d8f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportElement.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsImportElement extends IXdsElement +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportSection.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportSection.java new file mode 100644 index 0000000..12fdc1d --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsImportSection.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +public interface IXdsImportSection extends IXdsSyntheticElement + , IXdsImportElement + , IXdsContainer + , ISourceBound +{ + public Collection getImportElements(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModel.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModel.java new file mode 100644 index 0000000..9d5347f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModel.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.core.model; + +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.ui.IEditorInput; + +import com.excelsior.xds.core.resource.PathWithLocationType; + +public interface IXdsModel extends IXdsResource +{ + List getXdsProjects(); + IXdsProject getXdsProjectBy(IProject p); + IXdsProject getXdsProjectBy(IResource r); + + /** + * Returns IXdsElement by given IEditorInput. + * + * This method should be modified, whenever new editor input is supported + * for some editor requiring access to IXdsElement. + * + * @param editorInput + * @return IXdsElement corresponding to the give IEditorInput. + */ + IXdsElement getXdsElement(IEditorInput editorInput); + + + /** + * Returns IXdsElement by the given location. + * + * @param location a path to the XDS element + * + * @return IXdsElement corresponding to the give location. + */ + IXdsElement getXdsElement(PathWithLocationType location); + + IXdsResource getXdsElement(IResource r); + IXdsElement getNonWorkspaceXdsElement(IFileStore absoluteFile); + IXdsElement getParentXdsElement(IResource r); + + void addElementChangedListener(IElementChangedListener listener); + void removeElementChangedListener(IElementChangedListener listener); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModule.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModule.java new file mode 100644 index 0000000..625171a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsModule.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public interface IXdsModule extends IXdsElementWithDefinitions, IXdsElementWithSymbol +{ + @Override + public IModuleSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsNonWorkspaceCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsNonWorkspaceCompilationUnit.java new file mode 100644 index 0000000..c573e05 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsNonWorkspaceCompilationUnit.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsNonWorkspaceCompilationUnit extends IXdsCompilationUnit { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsOberonMethodReceiver.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsOberonMethodReceiver.java new file mode 100644 index 0000000..bf24f37 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsOberonMethodReceiver.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; + +public interface IXdsOberonMethodReceiver extends IXdsFormalParameter +{ + @Override + public IOberonMethodReceiverSymbol getSymbol(); + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProcedure.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProcedure.java new file mode 100644 index 0000000..4258c92 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProcedure.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; + +public interface IXdsProcedure extends IXdsElementWithDefinitions +{ + @Override + public IProcedureSymbol getSymbol(); + + public ProcedureType getProcedureType(); + + public Collection getParameters(); + + boolean isForwardDeclaration(); + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProject.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProject.java new file mode 100644 index 0000000..030876f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProject.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.project.XdsProjectSettings; + +public interface IXdsProject extends IXdsContainer, IXdsResource +{ + IProject getProject(); + IXdsModel getModel(); + XdsProjectSettings getXdsProjectSettings(); + XdsProjectConfiguration getProjectConfiguration(); + + void refreshExternalDependencies(); + void refreshSdkLibrary(); + + IXdsExternalDependenciesContainer getXdsExternalDependenciesContainer(); + IXdsSdkLibraryContainer getXdsSdkLibraryContainer(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProjectFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProjectFile.java new file mode 100644 index 0000000..92e73e0 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsProjectFile.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsProjectFile extends IXdsResource { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsQualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsQualifiedImportElement.java new file mode 100644 index 0000000..335e2fe --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsQualifiedImportElement.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public interface IXdsQualifiedImportElement extends IXdsImportElement + , IXdsElementWithSymbol +{ + @Override + public IModuleSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordField.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordField.java new file mode 100644 index 0000000..e910cf5 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordField.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; + +public interface IXdsRecordField extends IXdsElementWithSymbol +{ + @Override + public IRecordFieldSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordType.java new file mode 100644 index 0000000..659c45a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordType.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +public interface IXdsRecordType extends IXdsCompositeType +{ + @Override + public IRecordTypeSymbol getSymbol(); + + public Collection getFields(); + public Collection getProcedures(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariant.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariant.java new file mode 100644 index 0000000..a25b215 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariant.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.model; + +import java.util.Collection; + +public interface IXdsRecordVariant extends IXdsSyntheticElement + , IXdsContainer + , ISourceBound +{ + public boolean isElseVariant(); + + public Collection getLabels(); + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantLabel.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantLabel.java new file mode 100644 index 0000000..4c963d8 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantLabel.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.model; + +public interface IXdsRecordVariantLabel extends IXdsElement + , ISourceBound +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantSelector.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantSelector.java new file mode 100644 index 0000000..4c2c645 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsRecordVariantSelector.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; + +public interface IXdsRecordVariantSelector extends IXdsRecordField, IXdsContainer +{ + @Override + public IRecordVariantSelectorSymbol getSymbol(); + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsResource.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsResource.java new file mode 100644 index 0000000..31c7f85 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsResource.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.resource.IResourceAccess; + +public interface IXdsResource extends IXdsElement, IResourceAccess +{ + IResource getResource(); + void resourceChanged(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSdkLibraryContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSdkLibraryContainer.java new file mode 100644 index 0000000..94b91de --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSdkLibraryContainer.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsSdkLibraryContainer extends IXdsContainer +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetElement.java new file mode 100644 index 0000000..9859ba5 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetElement.java @@ -0,0 +1,4 @@ +package com.excelsior.xds.core.model; + +public interface IXdsSetElement extends IXdsElementWithSymbol{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetType.java new file mode 100644 index 0000000..1c38579 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSetType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; + +public interface IXdsSetType extends IXdsCompositeType{ + @Override + public ISetTypeSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSymbolFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSymbolFile.java new file mode 100644 index 0000000..e1ee074 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSymbolFile.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsSymbolFile extends IXdsWorkspaceCompilationUnit +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSyntheticElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSyntheticElement.java new file mode 100644 index 0000000..0787fa3 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsSyntheticElement.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +/** + * Tag interface for synthetic elements of Modula-2 source code model. + */ +public interface IXdsSyntheticElement +{ + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsType.java new file mode 100644 index 0000000..88c662f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public interface IXdsType extends IXdsElement, IXdsElementWithSymbol { + @Override + public ITypeSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportContainer.java new file mode 100644 index 0000000..d1e86aa --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportContainer.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +public interface IXdsUnqualifiedImportContainer extends IXdsSyntheticElement + , IXdsImportElement + , IXdsContainer + , ISourceBound +{ +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportElement.java new file mode 100644 index 0000000..b76d6d7 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsUnqualifiedImportElement.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.core.model; + +public interface IXdsUnqualifiedImportElement extends IXdsImportElement, IXdsElementWithSymbol { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsVariable.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsVariable.java new file mode 100644 index 0000000..d8892e1 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsVariable.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; + +public interface IXdsVariable extends IXdsElementWithSymbol +{ + @Override + public IVariableSymbol getSymbol(); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsWorkspaceCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsWorkspaceCompilationUnit.java new file mode 100644 index 0000000..ee9d3cc --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/IXdsWorkspaceCompilationUnit.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.model; + +public interface IXdsWorkspaceCompilationUnit extends IXdsCompilationUnit, + IXdsResource { + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/LoadingXdsElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/LoadingXdsElement.java new file mode 100644 index 0000000..14d4934 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/LoadingXdsElement.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.model; + +import com.excelsior.xds.core.model.internal.SimpleXdsElement; + +/** + * XDS element being loaded + */ +public class LoadingXdsElement extends SimpleXdsElement +{ + public LoadingXdsElement(String name, IXdsProject project, IXdsContainer parent) + { + super(name, project, parent); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ProcedureType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ProcedureType.java new file mode 100644 index 0000000..7210d5b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/ProcedureType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.model; + +public enum ProcedureType { + MODULA, + OBERON, + FINALLY_BODY, + BEGIN_BODY +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/SourceBinding.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/SourceBinding.java new file mode 100644 index 0000000..842f4cf --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/SourceBinding.java @@ -0,0 +1,84 @@ +package com.excelsior.xds.core.model; + +import java.util.Arrays; +import java.util.Collection; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.commons.symbol.ITextBinding; + +public class SourceBinding implements ITextBinding +{ + /** + * The collection of source text intervals covered by element + */ + private final Collection elementRegions; + + /** + * The location of element's main identifier in the source text + */ + private final ITextRegion nameTextRegion; + + /** + * The source text interval, where element is declared + */ + private final ITextRegion declarationTextRegion; + + public SourceBinding(ITextRegion elementRegion, ITextRegion identifierRegion) { + this(Arrays.asList(elementRegion), identifierRegion, elementRegion); + } + + public SourceBinding(Collection elementRegions, ITextRegion nameTextRegion, ITextRegion declarationTextRegion) + { + this.elementRegions = elementRegions; + this.nameTextRegion = nameTextRegion; + this.declarationTextRegion = declarationTextRegion; + } + + public Collection getElementRegions() { + return elementRegions; + } + + /** + * @return Cumulative continuous region, containing all of the elementRegions + */ + public ITextRegion getElementRegion() { + if (elementRegions.isEmpty()){ + return new TextRegion(0, 0); + } + else if (elementRegions.size() == 1) { + return elementRegions.iterator().next(); + } + + int minOffset = Integer.MAX_VALUE; + int maxOffset = 0; + for (ITextRegion textRegion : elementRegions) { + if (textRegion.getOffset() < minOffset) { + minOffset = textRegion.getOffset(); + } + + int offset = textRegion.getOffset() + textRegion.getLength(); + if (offset > maxOffset) { + maxOffset = offset; + } + } + return new TextRegion(minOffset, maxOffset - minOffset); + } + + + /* (non-Javadoc) + * @see com.excelsior.xds.core.model.ISourceBinding#getDeclarationTextRegion() + */ + @Override + public ITextRegion getDeclarationTextRegion() { + return declarationTextRegion; + } + + /* (non-Javadoc) + * @see com.excelsior.xds.core.model.ISourceBinding#getNameTextRegion() + */ + @Override + public ITextRegion getNameTextRegion() { + return nameTextRegion; + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsModelManager.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsModelManager.java new file mode 100644 index 0000000..51a402a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsModelManager.java @@ -0,0 +1,231 @@ +package com.excelsior.xds.core.model; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Queue; +import java.util.concurrent.LinkedBlockingQueue; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; + +import com.excelsior.xds.core.model.internal.XdsDbgScriptBundleFile; +import com.excelsior.xds.core.model.internal.XdsDdgScriptUnitFile; +import com.excelsior.xds.core.model.internal.XdsFolderContainer; +import com.excelsior.xds.core.model.internal.XdsModel; +import com.excelsior.xds.core.model.internal.XdsProject; +import com.excelsior.xds.core.model.internal.XdsProjectDescriptor; +import com.excelsior.xds.core.model.internal.XdsSymbolFile; +import com.excelsior.xds.core.model.internal.XdsTextFile; +import com.excelsior.xds.core.model.internal.XdsWorkspaceCompilationUnit; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.project.NatureUtils; +import com.excelsior.xds.core.project.launcher.LaunchConfigurationsRemover; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.resource.XdsResourceChangeListener; +import com.excelsior.xds.core.utils.XdsFileUtils; + +public class XdsModelManager extends XdsResourceChangeListener +{ + private List xdsProjects; + private final ReadWriteLock modelLock = new ReentrantReadWriteLock(); + private XdsModel model; + + // TODO : rewrite using subscriber/publisher pattern + private final Queue refreshDecoratorProjectsQueue = new LinkedBlockingQueue(); + + private XdsModelManager() { + super(); + } + + private static class XdsModelManagerHolder{ + static XdsModelManager INSTANCE = new XdsModelManager(); + } + + public static XdsModelManager getInstance(){ + return XdsModelManagerHolder.INSTANCE; + } + + public static IXdsModel getModel() { + return XdsModelManager.getInstance().doGetModel(); + } + + public static IEditableXdsModel getEditableModel() { + return (IEditableXdsModel)XdsModelManager.getModel(); + } + + public static IXdsProject refreshProject(IProject p) { + IEditableXdsModel model = (IEditableXdsModel)XdsModelManager.getModel(); + try{ + return XdsModelManager.getInstance().doRefreshProject(p); + } + finally{ + model.notifyChanged(); + } + + } + + /** + * Refreshes 'External dependencies' and 'SDK Libraries' nodes. + * @param p + */ + public static void refreshExternals(IProject p) { + IEditableXdsModel model = (IEditableXdsModel)XdsModelManager.getModel(); + try{ + XdsModelManager.getInstance().doRefreshExternalDependencies(p); + XdsModelManager.getInstance().doRefreshSdkLibrary(p); + } + finally{ + model.notifyChanged(); + } + } + + private IXdsProject doRefreshProject(IProject p) { + XdsModel model = doGetModel(); + model.refreshProject(p); + return model.getXdsProjectBy(p); + } + + private void doRefreshExternalDependencies(IProject p) { + XdsModel model = doGetModel(); + model.refreshExternalDependencies(p); + } + + private void doRefreshSdkLibrary(IProject p) { + XdsModel model = doGetModel(); + model.refreshSdkLibrary(p); + } + + private XdsModel doGetModel() { + Lock readLock = modelLock.readLock(); + try{ + readLock.lock(); + if (model != null) { + return model; + } + } + finally{ + readLock.unlock(); + } + + Lock writeLock = modelLock.writeLock(); + try{ + writeLock.lock(); + if (model != null) { + return model; + } + + xdsProjects = new ArrayList(); + Map name2XdsProject = new HashMap(); + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject p : allProjects) { + if (NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + XdsProject xdsProject = new XdsProject(p, null); + xdsProjects.add(xdsProject); + name2XdsProject.put(p.getName(), xdsProject); + } + } + model = new XdsModel(xdsProjects, name2XdsProject); + for (IXdsProject xdsProject : xdsProjects) { + ((XdsProject)xdsProject).setModel(model); + } + model.expandModelNodes(); + } + finally{ + writeLock.unlock(); + } + + return model; + } + + @Override + protected void beginDeltaProcessing(IResourceDelta delta) { + doGetModel(); + } + + @Override + protected boolean handleResourceAdded(IResourceDelta rootDelta, IResourceDelta delta, IResource affectedResource) { + XdsModel model = doGetModel(); + model.handleAddResource(rootDelta, affectedResource); + return super.handleResourceAdded(rootDelta, delta, affectedResource); + } + + @Override + protected boolean handleResourceChanged(IResourceDelta rootDelta, IResourceDelta delta, IResource affectedResource) { + XdsModel model = doGetModel(); + boolean isContentChanged = isContentChanged(delta); + model.handleChangeResource(rootDelta, affectedResource, isContentChanged); + return super.handleResourceChanged(rootDelta, delta, affectedResource); + } + + @Override + protected boolean handleResourceRemoved(IResourceDelta rootDelta, IResourceDelta delta, IResource affectedResource) { + XdsModel model = doGetModel(); + model.handleRemoveResource(rootDelta, affectedResource); + return super.handleResourceRemoved(rootDelta,delta, affectedResource); + } + + @Override + protected void handleProjectRemoved(IResourceDelta delta, IProject project, boolean isPreDeleteEvent) { + if (isPreDeleteEvent) { + LaunchConfigurationsRemover.removeAll(project); + } + XdsModel model = doGetModel(); + model.handleRemoveResource(delta, project); + } + + @Override + protected void endDeltaProcessing(IResourceDelta rootDelta) { + final IEditableXdsModel model = (IEditableXdsModel) doGetModel(); + model.endDeltaProcessing(rootDelta); + model.notifyChanged(); + } + + public void enqueProjectForDecoratorRefresh(IProject p) { + refreshDecoratorProjectsQueue.add(p); + } + + public IProject getNextProjectForDecoratorRefresh() { + return refreshDecoratorProjectsQueue.remove(); + } + + public static IXdsElement createFrom( XdsModel model, XdsProject xdsProject + , IResource resource, IXdsContainer parent ) + { + String absolutePath = ResourceUtils.getAbsolutePath(resource); + IProject project = resource.getProject(); + Assert.isTrue(NatureUtils.hasNature(project, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID), "Xds model elements could only be created inside project with XDS nature"); //$NON-NLS-1$ + if (resource instanceof IProject) { + return new XdsProject(project, model); + } + else if (resource instanceof IContainer) { + return new XdsFolderContainer(xdsProject, resource, parent); + } + else if (XdsFileUtils.isCompilationUnitFile(absolutePath)) { + return new XdsWorkspaceCompilationUnit(xdsProject, resource, parent); + } + else if (XdsFileUtils.isSymbolFile(absolutePath)) { + return new XdsSymbolFile(xdsProject, resource, parent); + } + else if (XdsFileUtils.isXdsProjectFile(absolutePath)) { + return new XdsProjectDescriptor(xdsProject, resource, parent); + } + else if (XdsFileUtils.isDbgScriptFile(absolutePath)) { + return new XdsDdgScriptUnitFile(xdsProject, resource, parent); + } + else if (XdsFileUtils.isDbgScriptBundleFile(absolutePath)) { + return new XdsDbgScriptBundleFile(xdsProject, resource, parent); + } + else { + return new XdsTextFile(xdsProject, resource, parent); + } + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsProjectConfiguration.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsProjectConfiguration.java new file mode 100644 index 0000000..f9e0a1b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/XdsProjectConfiguration.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.core.model; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; + +public class XdsProjectConfiguration { + private IProject project; + + public XdsProjectConfiguration(IProject project) { + this.project = project; + } + + public String getExePath() { + if (!ProjectUtils.isXdsProject(project)) { + return null; + } + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + IFile file = ProjectUtils.getApplicationExecutableFile(xdsProjectSettings); + return (file == null) ? null : ResourceUtils.getAbsolutePath(file); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/IEditableXdsFolderContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/IEditableXdsFolderContainer.java new file mode 100644 index 0000000..5232044 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/IEditableXdsFolderContainer.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsFolderContainer; +import com.excelsior.xds.core.model.IXdsResource; + +public interface IEditableXdsFolderContainer extends IXdsFolderContainer { + void addChild(IXdsResource e); + void removeChild(IXdsResource e); +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElement.java new file mode 100644 index 0000000..5334ec6 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElement.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; + +public abstract class SimpleXdsElement implements IXdsElement +{ + private final String name; + private final IXdsProject project; + private final IXdsContainer parent; + + public SimpleXdsElement(String name, IXdsProject project, IXdsContainer parent) { + this.name = name; + this.project = project; + this.parent = parent; + } + + @Override + public String getElementName() { + return name; + } + + @Override + public IXdsProject getXdsProject() { + return project; + } + + @Override + public IXdsContainer getParent() { + return parent; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElementWithSymbol.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElementWithSymbol.java new file mode 100644 index 0000000..cf9b507 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SimpleXdsElementWithSymbol.java @@ -0,0 +1,66 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElementWithSymbol; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public abstract class SimpleXdsElementWithSymbol + extends SourceBoundXdsElement + implements IXdsElementWithSymbol +{ + private final IModulaSymbolReference symbolRef; + private final XdsCompilationUnit compilationUnit; + + /** + * Whether getElementName should be calculated from the symbol + */ + private final boolean isUseNameFromSymbol; + + public SimpleXdsElementWithSymbol( String name, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding){ + this(name, true, project, compilationUnit, parent, symbolRef, sourceBinding); + } + + public SimpleXdsElementWithSymbol( String name, boolean isUseNameFromSymbol, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, parent, sourceBinding); + this.compilationUnit = compilationUnit; + this.symbolRef = symbolRef; + + @SuppressWarnings("unchecked") + IModulaSymbolReference modulaSymbolRef = (IModulaSymbolReference) symbolRef; + compilationUnit.mapSymbol2XdsElement(modulaSymbolRef, this); + this.isUseNameFromSymbol = isUseNameFromSymbol; + } + + @Override + public T getSymbol() { + return ReferenceUtils.resolve(symbolRef); + } + + @Override + public String getElementName() { + T symbol = getSymbol(); + if (!isUseNameFromSymbol || symbol == null) { + return super.getElementName(); + } + return symbol.getName(); + } + + public IXdsCompilationUnit getCompilationUnit() { + return compilationUnit; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SourceBoundXdsElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SourceBoundXdsElement.java new file mode 100644 index 0000000..bcaa9d9 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/SourceBoundXdsElement.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.ISourceBound; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; + +public class SourceBoundXdsElement extends SimpleXdsElement + implements ISourceBound +{ + private final SourceBinding sourceBinding; + + public SourceBoundXdsElement( String name + , IXdsProject project + , IXdsContainer parent + , SourceBinding sourceBinding ) + { + super(name, project, parent); + this.sourceBinding = sourceBinding; + } + + /** + * {@inheritDoc} + */ + @Override + public SourceBinding getSourceBinding() { + return sourceBinding; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAliasQualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAliasQualifiedImportElement.java new file mode 100644 index 0000000..8ac3cee --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAliasQualifiedImportElement.java @@ -0,0 +1,36 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsAliasQualifiedImportElement; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +/** + * TODO: XdsAliasQualifiedImportElement should extend IModuleAliasSymbol + */ +public class XdsAliasQualifiedImportElement extends SimpleXdsElementWithSymbol + implements IXdsAliasQualifiedImportElement +{ + private final IModulaSymbolReference moduleAliasSymbolRef; + + public XdsAliasQualifiedImportElement( String name, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference moduleSymbolRef + , IModulaSymbolReference moduleAliasSymbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, moduleSymbolRef, sourceBinding); + this.moduleAliasSymbolRef = moduleAliasSymbolRef; + } + + @Override + public IModuleAliasSymbol getAliasSymbol() { + return ReferenceUtils.resolve(moduleAliasSymbolRef); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAnonymousRecordVariantSelector.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAnonymousRecordVariantSelector.java new file mode 100644 index 0000000..b8e8b81 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsAnonymousRecordVariantSelector.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsAnonymousRecordVariantSelector; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.model.internal.nls.Messages; +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsAnonymousRecordVariantSelector extends XdsRecordVariantSelector + implements IXdsAnonymousRecordVariantSelector +{ + public XdsAnonymousRecordVariantSelector( IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super( Messages.XdsRecordVariantSelector_Name + , project, compilationUnit, parent + , symbolRef, sourceBinding ); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnit.java new file mode 100644 index 0000000..9c63e7c --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnit.java @@ -0,0 +1,152 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.CompilationUnitType; +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsElementWithSymbol; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.core.utils.time.ModificationStamp; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public abstract class XdsCompilationUnit implements IXdsCompilationUnit +{ + private IXdsContainer parent; + + private final IXdsProject xdsProject; + + private ModificationStamp astModificationStamp = new ModificationStamp(); + + private XdsModule moduleElement; + + private final Map, IXdsElementWithSymbol> symbolRef2XdsElement = new HashMap, IXdsElementWithSymbol>(); + + public XdsCompilationUnit( IXdsProject xdsProject + , IXdsContainer parent) + { + this.parent = parent; + this.xdsProject = xdsProject; + } + + @Override + public IXdsProject getXdsProject() { + return xdsProject; + } + + @Override + public synchronized IXdsContainer getParent() { + return parent; + } + + public synchronized void setParent(IXdsContainer parent) { + this.parent = parent; + } + + protected static CompilationUnitType determineCompilationUnitType(String fileName) { + CompilationUnitType compilationUnitType = null; + if (XdsFileUtils.isProgramModuleFile(fileName)) + compilationUnitType = CompilationUnitType.PROGRAM_MODULE; + else if (XdsFileUtils.isDefinitionModuleFile(fileName)) + compilationUnitType = CompilationUnitType.DEFINITION_MODULE; + else if (XdsFileUtils.isSymbolFile(fileName)) + compilationUnitType = CompilationUnitType.SYMBOL_FILE; + else + LogHelper.logError("Unknown compilation unit type of [" + fileName + "]"); //$NON-NLS-1$ //$NON-NLS-2$ + + return compilationUnitType; + } + + /** + * Method is synchronized because two different request to re-build compilation unit structure + * (coming from competing threads) must not corrupt data structures. + */ + private synchronized void buildUnitStructure(ModulaAst ast) { + symbolRef2XdsElement.clear(); + XdsCompilationUnitBuilder compilationUnitBuilder = new XdsCompilationUnitBuilder( + convertToConcreteSymbols(symbolRef2XdsElement), this, ast); + compilationUnitBuilder.buildUnitStructure(); + astModificationStamp = ast.getModificationStamp(); + } + + private Map convertToConcreteSymbols(Map, IXdsElementWithSymbol> symbolRef2XdsElement) { + Map symbol2XdsElement = new HashMap(); + for (Map.Entry, IXdsElementWithSymbol> pair : symbolRef2XdsElement.entrySet()) { + IModulaSymbol symbol = ReferenceUtils.resolve(pair.getKey()); + if (symbol != null) { + symbol2XdsElement.put(symbol, pair.getValue()); + } + } + + return symbol2XdsElement; + } + + @Override + public synchronized Collection getChildren() { + return Collections.singletonList(moduleElement); + } + + @Override + public synchronized IXdsModule getModuleElement() { + ModulaAst ast = getModulaAst(); + if (ast != null && !astModificationStamp.equals(ast.getModificationStamp())) { + buildUnitStructure(ast); + } + return moduleElement; + } + + synchronized void mapSymbol2XdsElement(IModulaSymbolReference symbolRef, IXdsElementWithSymbol element) { + symbolRef2XdsElement.put(symbolRef, element); + } + + @Override + public IModuleSymbol getSymbol() { + IXdsModule moduleElement = getModuleElement(); + IModuleSymbol symbol = null; + if (moduleElement != null) { + symbol = moduleElement.getSymbol(); + } + return symbol; + } + + @Override + public SourceBinding getSourceBinding() { + return null; + } + + public synchronized void setModuleElement(XdsModule moduleElement) { + this.moduleElement = moduleElement; + } + + /* (non-Javadoc) + * @see com.excelsior.xds.core.model.IXdsCompilationUnit#getModulaAst() + */ + public ModulaAst getModulaAst() { + // Not synchronized since it only access final fields + IFileStore fileStore = getAbsoluteFile(); + IProject project = null; + if (xdsProject != null) { + project = xdsProject.getProject(); + } + + return XdsParserManager.getModulaAst(new ParsedModuleKey(project, fileStore)); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnitBuilder.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnitBuilder.java new file mode 100644 index 0000000..51a94fa --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsCompilationUnitBuilder.java @@ -0,0 +1,826 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.core.model.IXdsCompositeType; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElementWithSymbol; +import com.excelsior.xds.core.model.IXdsRecordField; +import com.excelsior.xds.core.model.IXdsRecordType; +import com.excelsior.xds.core.model.IXdsRecordVariant; +import com.excelsior.xds.core.model.IXdsType; +import com.excelsior.xds.core.model.ProcedureType; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.commons.ast.AstNode; +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstDeclarations; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.AstQualifiedName; +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstImportAliasDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstFinallyBody; +import com.excelsior.xds.parser.modula.ast.modules.AstLocalModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameter; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterBlock; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethod; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodReceiver; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedure; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstEnumElement; +import com.excelsior.xds.parser.modula.ast.types.AstRecordField; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariant; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantElsePart; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabel; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantSelector; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDef; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; +import com.excelsior.xds.parser.modula.ast.variables.AstVariable; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IFinallyBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class XdsCompilationUnitBuilder +{ + private static final String UNKNOWN_NAME_CAPTION = "<>"; + + private final Map symbol2XdsElement; + private XdsModule moduleElement; + private final XdsCompilationUnit compilationUnit; + private final ModulaAst ast; + + public XdsCompilationUnitBuilder( Map symbol2XdsElement + , XdsCompilationUnit compilationUnit + , ModulaAst ast ) + { + this.symbol2XdsElement = symbol2XdsElement; + this.compilationUnit = compilationUnit; + this.ast = ast; + } + + public void buildUnitStructure() { + buildUnitStructure(ast); + } + + private void buildUnitStructure(ModulaAst ast) { + ast.accept(new DeclarationAstVisitor()); + } + + private SourceBinding createSourceBinding(AstNode astNode) { + ITextRegion elementRegion = null; + ITextRegion identifierRegion = null; + + if ((astNode instanceof AstSymbolRef) && !(astNode instanceof AstImportFragment)) + { + IModulaSymbol symbol = ((AstSymbolRef)astNode).getSymbol(); + if (symbol != null) { + identifierRegion = symbol.getNameTextRegion(); + } + } + + if (elementRegion == null) { + elementRegion = new TextRegion(astNode.getOffset(), astNode.getLength()); + } + + if (identifierRegion == null) { + if (astNode instanceof IAstNodeWithIdentifier) { + PstNode identifier = ((IAstNodeWithIdentifier)astNode).getIdentifier(); + identifierRegion = identifier != null + ? new TextRegion(identifier.getOffset(), identifier.getLength()) + : elementRegion; + } + + } + return new SourceBinding(elementRegion, identifierRegion); + } + + private String getName(AstSymbolRef astSymbolRef) { + if (astSymbolRef == null) { + return UNKNOWN_NAME_CAPTION; + } + String name = astSymbolRef.getName(); + if (StringUtils.isEmpty(name)) { + if (astSymbolRef instanceof IAstNodeWithIdentifier) { + IAstNodeWithIdentifier astIdentifier = (IAstNodeWithIdentifier) astSymbolRef; + PstNode identifier = astIdentifier.getIdentifier(); + if (identifier != null) { + int offset = identifier.getOffset(); + int length = identifier.getLength(); + name = ""+ast.getChars().subSequence(offset, offset + length); + } + } + } + return name; + } + + public String getName(IModulaSymbol symbol) { + return symbol != null? symbol.getName() : UNKNOWN_NAME_CAPTION; + } + + private final class DeclarationAstVisitor extends ModulaAstVisitor + { + Map unqualifiedImportStatement2ImportStatementSection = new HashMap(); + + @Override + public boolean visit(AstModule astNode) { + addModuleElement(astNode); + return true; + } + + @Override + public boolean visit(AstLocalModule astNode) { + addModuleElement(astNode); + return true; + } + + @Override + public boolean visit(AstProcedureDefinition astNode) { + addProcedureElement(astNode); + return false; + } + + @Override + public boolean visit(AstProcedureExternalSpecification astNode) { + addProcedureElement(astNode); + return false; + } + + @Override + public boolean visit(AstProcedureForwardDeclaration astNode) { + addProcedureElement(astNode, true); + return true; + } + + @Override + public boolean visit(AstProcedureDeclaration astNode) { + addProcedureElement(astNode); + return true; + } + + @Override + public boolean visit(AstModuleBody astNode) { + addModuleBodyElement(astNode); + return true; + } + + @Override + public boolean visit(AstFinallyBody astNode) { + addFinallyBodyElement(astNode); + return true; + } + + @Override + public boolean visit(AstOberonMethodDeclaration astNode) { + addOberonMethodElement(astNode, false); + return true; + } + + @Override + public boolean visit(AstOberonMethodForwardDeclaration astNode) { + addOberonMethodElement(astNode, true); + return true; + } + + @Override + public boolean visit(AstVariable node) { + addVariableElement(node); + return true; + } + + @Override + public boolean visit(AstConstantDeclaration astNode) { + addConstantElement(astNode); + return true; + } + + @Override + public boolean visit(AstSimpleImportFragment astNode) { + SourceBinding sourceBinding = createSourceBinding(astNode); + if (moduleElement == null) { // AST completely messed-up + return false; + } + + XdsImportSection importSection = moduleElement.getOrCreateImportSection(createSourceBinding(astNode.getImports())); + AstModuleName astModuleName = astNode.getAstModuleName(); + if (astModuleName != null) { + IModuleSymbol symbol = astModuleName.getSymbol(); + String name = getName(astNode); + + XdsQualifiedImportElement qualifiedImportElement = new XdsQualifiedImportElement( + name, compilationUnit.getXdsProject(), compilationUnit, + importSection, ReferenceUtils.createRef(symbol), sourceBinding); + importSection.addImportElement(qualifiedImportElement); + + } + else { + AstImportAliasDeclaration importAliasDeclaration = astNode.getImportAliasDeclaration(); + + astModuleName = importAliasDeclaration.getAstModuleName(); + + IModuleSymbol symbol = null; + if (astModuleName != null) { + symbol = astModuleName.getSymbol(); + } + AstModuleAlias moduleAlias = importAliasDeclaration.getModuleAlias(); + IModuleAliasSymbol aliasSymbol = null; + + String name = ""; + if (moduleAlias != null && moduleAlias.getSymbol() != null) { + aliasSymbol = moduleAlias.getSymbol(); + name = getName(aliasSymbol); + } + + sourceBinding = createSourceBinding(importAliasDeclaration); + + XdsAliasQualifiedImportElement qualifiedImportElement = new XdsAliasQualifiedImportElement( + name, compilationUnit.getXdsProject(), compilationUnit, + importSection, ReferenceUtils.createRef(symbol), ReferenceUtils.createRef(aliasSymbol), sourceBinding); + importSection.addImportElement(qualifiedImportElement); + } + + return true; + } + + @Override + public boolean visit(AstUnqualifiedImportFragment astNode) { + if (moduleElement == null) { // AST completely messed-up + return false; + } + + XdsImportSection importSection = moduleElement.getOrCreateImportSection(createSourceBinding(astNode.getImports())); + + AstUnqualifiedImportStatement unqualifiedImportStatement = astNode.getUnqualifiedImportStatement(); + if (unqualifiedImportStatement != null) { + XdsUnqualifiedImportContainer importStatementSection = unqualifiedImportStatement2ImportStatementSection.get(unqualifiedImportStatement); + if (importStatementSection == null) { + String name = getName(unqualifiedImportStatement.getModuleIdentifier()); + SourceBinding sourceBinding = createSourceBinding(unqualifiedImportStatement); + importStatementSection = new XdsUnqualifiedImportContainer(name, compilationUnit.getXdsProject(), importSection, sourceBinding); + importSection.addImportElement(importStatementSection); + unqualifiedImportStatement2ImportStatementSection.put(unqualifiedImportStatement, importStatementSection); + } + + String name = getName(astNode); + SourceBinding sourceBinding = createSourceBinding(astNode); + + XdsUnqualifiedImportElement unqualifiedImportElement = new XdsUnqualifiedImportElement(name, compilationUnit.getXdsProject(), compilationUnit, importStatementSection, ReferenceUtils.createRef(astNode.getSymbol()), sourceBinding); + importStatementSection.addImportedElement(unqualifiedImportElement); + } + + return true; + } + + @Override + public boolean visit(AstTypeDeclaration astNode) { + ITypeSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(symbol.getParentScope()); + String typeElementName = getName(astNode); + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsType xdsType = processCompositeType( parentXdsElement + , astNode.getAstTypeElement() + , typeElementName, sourceBinding ); + if (xdsType == null) { + xdsType = new XdsType( compilationUnit.getXdsProject() + , compilationUnit, parentXdsElement + , typeElementName, ReferenceUtils.createRef(symbol), sourceBinding ); + } + symbol2XdsElement.put(xdsType.getSymbol(), xdsType); + if (parentXdsElement instanceof XdsElementWithDefinitions) { + ((XdsElementWithDefinitions)parentXdsElement).addType(xdsType); + } + } + return true; + } + + private void addModuleElement(AstModule astNode) { + IModuleSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(symbol.getParentScope()); + XdsModule moduleElement = new XdsModule(compilationUnit.getXdsProject(), compilationUnit, parentXdsElement, getName(astNode), ReferenceUtils.createRef(symbol), sourceBinding); + if (parentXdsElement != null ) { + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addLocalModule(moduleElement); + } + else { + XdsCompilationUnitBuilder.this.moduleElement = moduleElement; + compilationUnit.setModuleElement(moduleElement); + } + symbol2XdsElement.put(symbol, moduleElement); + } + } + + private void addModuleBodyElement(AstModuleBody astNode) { + IModuleBodySymbol symbol = astNode.getSymbol(); + SourceBinding sourceBinding = createSourceBinding(astNode); + if (symbol != null) { + ISymbolWithScope parentScope = symbol.getParentScope(); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(parentScope); + if (parentXdsElement != null && parentScope != null) { + XdsProcedure procedureElement = new XdsProcedure( + ProcedureType.BEGIN_BODY, + compilationUnit.getXdsProject(), + compilationUnit, + parentXdsElement, + getName(symbol) + " " + getName(parentScope), + ReferenceUtils.createRef((IProcedureSymbol)symbol), sourceBinding, false); + + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addProcedure(procedureElement); + symbol2XdsElement.put(symbol, procedureElement); + } + } + } + + private void addFinallyBodyElement(AstFinallyBody astNode) { + IFinallyBodySymbol symbol = astNode.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(symbol.getParentScope()); + + if (parentXdsElement != null ) { + XdsProcedure procedureElement = new XdsProcedure( + ProcedureType.FINALLY_BODY, + compilationUnit.getXdsProject(), + compilationUnit, + parentXdsElement, + symbol.getName() + " " + symbol.getParentScope().getName(), + ReferenceUtils.createRef((IProcedureSymbol)symbol), sourceBinding, false); + + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addProcedure(procedureElement); + symbol2XdsElement.put(symbol, procedureElement); + } + } + } + + private void addProcedureElement(AstProcedure astNode) { + addProcedureElement(astNode, false); + } + + private void addProcedureElement(AstProcedure astNode, boolean isForwardDeclaration) { + IProcedureSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(symbol.getParentScope()); + + if (parentXdsElement != null ) { + XdsProcedure procedureElement = new XdsProcedure( + ProcedureType.MODULA, + compilationUnit.getXdsProject(), + compilationUnit, + parentXdsElement, + getName(astNode), + ReferenceUtils.createRef(symbol), sourceBinding, isForwardDeclaration ); + + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addProcedure(procedureElement); + + symbol2XdsElement.put(symbol, procedureElement); + AstFormalParameterBlock astFormalParameterBlock = astNode.getProcedureParameters(); + if (astFormalParameterBlock != null) { + astFormalParameterBlock.accept(new FormalParameterVisitor(procedureElement)); + } + } + } + } + + private void addOberonMethodElement(AstOberonMethod astNode, boolean isForwardDeclaration) { + IOberonMethodSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + IOberonMethodReceiverSymbol receiverSymbol = symbol.getReceiverSymbol(); + IRecordTypeSymbol boundTypeSymbol; + if (receiverSymbol != null && (boundTypeSymbol = receiverSymbol.getBoundTypeSymbol()) != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(boundTypeSymbol); + if (parentXdsElement != null ) { + XdsProcedure procedureElement = new XdsProcedure( + ProcedureType.OBERON, + compilationUnit.getXdsProject(), + compilationUnit, + parentXdsElement, + getName(astNode), + ReferenceUtils.createRef((IProcedureSymbol)symbol), sourceBinding, isForwardDeclaration); + + XdsRecordType xdsRecordType = (XdsRecordType) parentXdsElement; + xdsRecordType.addProcedure(procedureElement); + symbol2XdsElement.put(symbol, procedureElement); + + astNode.accept(new FormalParameterVisitor(procedureElement)); + } + } + } + } + + private void addVariableElement(AstVariable node) { + IVariableSymbol symbol = node.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(node); + + ISymbolWithScope parentScope = symbol.getParentScope(); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(parentScope); + if (parentXdsElement != null && parentScope != null) { + XdsVariable xdsVarElem = new XdsVariable(compilationUnit.getXdsProject(), + compilationUnit, getName(node), parentXdsElement, ReferenceUtils.createRef(symbol), + sourceBinding); + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addVariable(xdsVarElem); + + processAnonymousCompositeType(xdsVarElem, node.getAstTypeElement()); + } + } + } + + private void addConstantElement(AstConstantDeclaration astNode) { + IConstantSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + IXdsContainer parentXdsElement = (IXdsContainer)symbol2XdsElement.get(symbol.getParentScope()); + if (parentXdsElement != null ) { + XdsConstant xdsCosntElem = new XdsConstant(compilationUnit.getXdsProject(), compilationUnit, getName(astNode), parentXdsElement, ReferenceUtils.createRef(symbol), sourceBinding); + XdsElementWithDefinitions xdsElemWithDefinitions = (XdsElementWithDefinitions) parentXdsElement; + xdsElemWithDefinitions.addConstant(xdsCosntElem); + } + } + } + + } + + + private + void processAnonymousCompositeType( XdsElementWithAnonymusCompositeType parentXdsElement + , AstTypeElement astTypeElement ) + { + IXdsCompositeType xdsAnonymousType = processCompositeType( parentXdsElement + , astTypeElement + , null, null ); + if (xdsAnonymousType != null) { + parentXdsElement.setAnonymousType(xdsAnonymousType); + } + } + + private IXdsCompositeType processCompositeType( IXdsContainer parentXdsElement + , AstTypeElement astTypeElement + , String typeElementName + , SourceBinding sourceBinding ) + { + IXdsCompositeType xdsCompositeType = null; + if (astTypeElement != null) { + AstTypeDef astTypeDefinition = astTypeElement.getTypeDefinition(); + if (astTypeDefinition != null) { + ITypeSymbol typeSymbol = astTypeDefinition.getSymbol(); + if (sourceBinding == null) { + sourceBinding = createSourceBinding(astTypeDefinition); + } + if (typeElementName == null) { + typeElementName = getName(astTypeDefinition); + } + + IElementType elementType = astTypeDefinition.getElementType(); + if (elementType == ModulaElementTypes.RECORD_TYPE_DEFINITION) { + xdsCompositeType = createXdsRecordType(parentXdsElement, astTypeDefinition, typeElementName, true, (IRecordTypeSymbol)typeSymbol, sourceBinding); + } + else if (elementType == ModulaElementTypes.POINTER_TYPE_DEFINITION) { + IPointerTypeSymbol pointerTypeSymbol = (IPointerTypeSymbol)typeSymbol; + ITypeSymbol boundTypeSymbol = pointerTypeSymbol.getBoundTypeSymbol(); + if (boundTypeSymbol instanceof IRecordTypeSymbol) { + IRecordTypeSymbol recordTypeSymbol = (IRecordTypeSymbol) boundTypeSymbol; + xdsCompositeType = createXdsRecordType(parentXdsElement, astTypeDefinition, typeElementName, false, recordTypeSymbol, sourceBinding); + } + } + else if (elementType == ModulaElementTypes.ENUMERATION_TYPE_DEFINITION){ + IEnumTypeSymbol enumTypeSymbol = (IEnumTypeSymbol) typeSymbol; + XdsEnum enumType = new XdsEnum(compilationUnit.getXdsProject(), + compilationUnit, parentXdsElement, + typeElementName, ReferenceUtils.createRef(enumTypeSymbol), + sourceBinding); + astTypeDefinition.accept(new EnumerationElementVisitor(enumType)); + xdsCompositeType = enumType; + } + else if (elementType == ModulaElementTypes.SET_TYPE_DEFINITION){ + ISetTypeSymbol setTypeSymbol = (ISetTypeSymbol) typeSymbol; + XdsSet setType = new XdsSet(getName(setTypeSymbol), compilationUnit.getXdsProject(), + compilationUnit, parentXdsElement, ReferenceUtils.createRef(setTypeSymbol), + sourceBinding); + astTypeDefinition.accept(new SetElementVisitor(setType)); + xdsCompositeType = setType; + } + } + } + return xdsCompositeType; + } + + private XdsRecordType createXdsRecordType(IXdsContainer parentXdsElement, + AstTypeDef astTypeDefinition, + String typeElementName, boolean isUseNameFromSymbol, IRecordTypeSymbol typeSymbol, + SourceBinding sourceBinding) { + XdsRecordType recordType = new XdsRecordType( + compilationUnit.getXdsProject(), compilationUnit, + parentXdsElement, typeElementName, isUseNameFromSymbol, + ReferenceUtils.createRef((IRecordTypeSymbol) typeSymbol), + sourceBinding); + astTypeDefinition.accept(new RecordFieldVisitor(recordType)); + return recordType; + } + + private final class FormalParameterVisitor extends ModulaAstVisitor + { + private final XdsProcedure xdsProcedure; + + private FormalParameterVisitor(XdsProcedure xdsProcedure) { + this.xdsProcedure = xdsProcedure; + } + + @Override + public boolean visit(AstFormalParameter astNode) { + IFormalParameterSymbol symbol = astNode.getSymbol(); + SourceBinding sourceBinding = createSourceBinding(astNode); + XdsFormalParameter xdsFormalParameter = new XdsFormalParameter( + compilationUnit.getXdsProject(), compilationUnit, + xdsProcedure, getName(astNode), ReferenceUtils.createRef(symbol), sourceBinding ); + xdsProcedure.addParameter(xdsFormalParameter); + symbol2XdsElement.put(symbol, xdsFormalParameter); + return false; + } + + @Override + public boolean visit(AstOberonMethodReceiver astNode) { + IOberonMethodReceiverSymbol symbol = astNode.getSymbol(); + SourceBinding sourceBinding = createSourceBinding(astNode); + XdsOberonMethodReceiver xdsOberonMethodReceiver = new XdsOberonMethodReceiver( + compilationUnit.getXdsProject(), compilationUnit, xdsProcedure, + getName(astNode), ReferenceUtils.createRef(symbol), sourceBinding ); + xdsProcedure.addParameter(xdsOberonMethodReceiver); + symbol2XdsElement.put(symbol, xdsOberonMethodReceiver); + return false; + } + + @Override + public boolean visit(AstDeclarations astNode) { + return false; + } + + @Override + public boolean visit(AstProcedureBody astNode) { + return false; + } + } + + + private final class EnumerationElementVisitor extends ModulaAstVisitor + { + private final XdsEnum enumType; + + private EnumerationElementVisitor(XdsEnum enumType) { + this.enumType = enumType; + } + + @Override + public boolean visit(AstEnumElement astNode) { + IEnumElementSymbol symbol = astNode.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + + XdsEnumElement enumElement = new XdsEnumElement(compilationUnit.getXdsProject(), + compilationUnit, getName(astNode), enumType, ReferenceUtils.createRef(symbol), + sourceBinding); + enumType.addEnumElement(enumElement); + symbol2XdsElement.put(symbol, enumElement); + } + return true; + } + } + + private final class SetElementVisitor extends ModulaAstVisitor + { + private final XdsSet setType; + + private SetElementVisitor(XdsSet setType) { + this.setType = setType; + } + + @Override + public boolean visit(AstEnumElement astNode) { + IEnumElementSymbol symbol = astNode.getSymbol(); + SourceBinding sourceBinding = createSourceBinding(astNode); + XdsSetElement enumElement = new XdsSetElement(getName(astNode), compilationUnit.getXdsProject(), + compilationUnit, setType, ReferenceUtils.createRef((IModulaSymbol)symbol), + sourceBinding); + setType.addSetElement(enumElement); + symbol2XdsElement.put(symbol, enumElement); + return true; + } + } + + + private class RecordFieldVisitor extends AbstractRecordFieldVisitor + { + private final XdsRecordType xdsRecordType; + + public RecordFieldVisitor(XdsRecordType recordType) { + this.xdsRecordType = recordType; + } + + @Override + protected void addField(IXdsRecordField recordField) { + xdsRecordType.addField(recordField); + } + + @Override + protected IXdsRecordType getParent() { + return xdsRecordType; + + } + } + + + private class RecordVariantFieldVisitor extends AbstractRecordFieldVisitor + { + private final XdsRecordVariant xdsRecordVariant; + + public RecordVariantFieldVisitor(XdsRecordVariant recordVariant) { + this.xdsRecordVariant = recordVariant; + } + + @Override + protected void addField(IXdsRecordField recordField) { + xdsRecordVariant.addField(recordField); + } + + @Override + protected IXdsRecordVariant getParent() { + return xdsRecordVariant; + } + + @Override + public boolean visit(AstRecordVariantLabel astNode) { + SourceBinding sourceBinding = createSourceBinding(astNode); + XdsRecordVariantLabel xdsRecordVariantLabel = new XdsRecordVariantLabel( + astNode.getText(), compilationUnit.getXdsProject(), + xdsRecordVariant, sourceBinding ); + xdsRecordVariant.addLabel(xdsRecordVariantLabel); + return false; + } + } + + + private abstract class AbstractRecordFieldVisitor extends ModulaAstVisitor + { + protected abstract IXdsContainer getParent(); + protected abstract void addField(IXdsRecordField field); + + private XdsRecordField newRecordField(AstRecordField astNode) { + IRecordFieldSymbol symbol = astNode.getSymbol(); + XdsRecordField xdsRecordField = null; + if (symbol != null) { + SourceBinding sourceBinding = createSourceBinding(astNode); + xdsRecordField = new XdsRecordField( + astNode.getName(), compilationUnit.getXdsProject(), + compilationUnit, getParent(), ReferenceUtils.createRef(symbol), + sourceBinding); + symbol2XdsElement.put(symbol, xdsRecordField); + } + return xdsRecordField; + } + + @Override + public boolean visit(AstRecordField astNode) { + XdsRecordField xdsRecordField = newRecordField(astNode); + if (xdsRecordField != null) { + addField(xdsRecordField); + + processAnonymousCompositeType(xdsRecordField, astNode.getAstTypeElement()); + return true; + } + else{ // cannot resolve corresponding symbol - cannot go deeper. + return false; + } + } + + @Override + public boolean visit(AstRecordVariantFieldBlock astNode) { + AstRecordVariantSelector selectorAst = astNode.getAstRecordVariantSelector(); + if (selectorAst != null) { + IRecordVariantSelectorSymbol symbol = selectorAst.getSymbol(); + if (symbol != null) { + SourceBinding sourceBinding; + if (selectorAst.getIdentifier() != null) { + sourceBinding = createSourceBinding(selectorAst); + } + else { + AstQualifiedName astQualident = selectorAst.getAstQualident(); + if (astQualident != null) { + sourceBinding = createSourceBinding(astQualident); + } + else { + sourceBinding = createSourceBinding(selectorAst); + } + } + XdsRecordVariantSelector xdsRecordVariantSelector; + if (symbol.isAnonymous()) { + xdsRecordVariantSelector = new XdsAnonymousRecordVariantSelector( + compilationUnit.getXdsProject(), compilationUnit, getParent(), + ReferenceUtils.createRef(symbol), sourceBinding ); + } + else { + xdsRecordVariantSelector = new XdsRecordVariantSelector( + symbol.getName(), + compilationUnit.getXdsProject(), compilationUnit, getParent(), + ReferenceUtils.createRef(symbol), sourceBinding ); + } + addField(xdsRecordVariantSelector); + symbol2XdsElement.put(symbol, xdsRecordVariantSelector); + astNode.accept(new RecordVariantVisitor(xdsRecordVariantSelector)); + } + } + return false; + } + + } + + + private class RecordVariantVisitor extends ModulaAstVisitor + { + final XdsRecordVariantSelector xdsVariantSelector; + + public RecordVariantVisitor(XdsRecordVariantSelector variantSelector) { + this.xdsVariantSelector = variantSelector; + } + + private XdsRecordVariant newXdsRecordVariant(AstNode sourceBoundAst, boolean isElseVariant) { + SourceBinding sourceBinding = createSourceBinding(sourceBoundAst); + XdsRecordVariant xdsRecordVariant = new XdsRecordVariant( + compilationUnit.getXdsProject(), + xdsVariantSelector, sourceBinding, isElseVariant); + return xdsRecordVariant; + } + + @Override + public boolean visit(AstRecordVariant astNode) { + AstNode labelListAst = astNode.getAstRecordVariantLabelList(); + if (labelListAst == null) { + labelListAst = astNode; + } + XdsRecordVariant xdsRecordVariant = newXdsRecordVariant(labelListAst, false); + xdsVariantSelector.addVariant(xdsRecordVariant); + + astNode.accept(new RecordVariantFieldVisitor(xdsRecordVariant)); + return false; + } + + @Override + public boolean visit(AstRecordVariantElsePart astNode) { + XdsRecordVariant xdsRecordVariant = newXdsRecordVariant(astNode, true); + xdsVariantSelector.addVariant(xdsRecordVariant); + + astNode.accept(new RecordVariantFieldVisitor(xdsRecordVariant)); + return false; + } + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsConstant.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsConstant.java new file mode 100644 index 0000000..5f0965b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsConstant.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsConstant; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsConstant extends SimpleXdsElementWithSymbol implements IXdsConstant { + public XdsConstant(IXdsProject project, XdsCompilationUnit compilationUnit, String name, IXdsContainer parent, IModulaSymbolReference symbolRef, SourceBinding sourceBinding) { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDbgScriptBundleFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDbgScriptBundleFile.java new file mode 100644 index 0000000..400917e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDbgScriptBundleFile.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsDbgScriptBundleFile; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsDbgScriptBundleFile extends XdsTextFile implements + IXdsDbgScriptBundleFile { + + public XdsDbgScriptBundleFile(IXdsProject xdsProject, IResource resource, + IXdsContainer parent) { + super(xdsProject, resource, parent); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDdgScriptUnitFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDdgScriptUnitFile.java new file mode 100644 index 0000000..63c9e95 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsDdgScriptUnitFile.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsDdgScriptUnitFile; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsDdgScriptUnitFile extends XdsTextFile implements + IXdsDdgScriptUnitFile { + + public XdsDdgScriptUnitFile(IXdsProject xdsProject, IResource resource, + IXdsContainer parent) { + super(xdsProject, resource, parent); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementCommons.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementCommons.java new file mode 100644 index 0000000..1119228 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementCommons.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.IResourceAccess; + +public final class XdsElementCommons { + public static IResource adaptToResource(IResourceAccess resourceAccess, Class adapter) { + IResource resource = null; + if (IResource.class.isAssignableFrom(adapter)) { + try { + resource = resourceAccess.getResource(); + } catch (CoreException e) { + LogHelper.logError(e); + } + + if (resource != null && adapter == IProject.class) { + resource = resource.getProject(); + } + } + if (resource != null && adapter.isAssignableFrom(resource.getClass())) { + return resource; + } + else { + return null; + } + } + + /** + * Static methods only + */ + private XdsElementCommons(){ + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithAnonymusCompositeType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithAnonymusCompositeType.java new file mode 100644 index 0000000..12abf0b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithAnonymusCompositeType.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.Collection; +import java.util.Collections; + +import com.excelsior.xds.core.model.IXdsCompositeType; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsElementWithAnonymusCompositeType + extends SimpleXdsElementWithSymbol + implements IXdsContainer +{ + private IXdsCompositeType anonymousType; + + public XdsElementWithAnonymusCompositeType( String name, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + + synchronized void setAnonymousType(IXdsCompositeType anonymousType) { + this.anonymousType = anonymousType; + } + + @Override + public synchronized Collection getChildren() { + if (anonymousType != null) { + return anonymousType.getChildren(); + } + return Collections.emptyList(); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithDefinitions.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithDefinitions.java new file mode 100644 index 0000000..2d28714 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsElementWithDefinitions.java @@ -0,0 +1,117 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.apache.commons.collections.collection.CompositeCollection; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsConstant; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsElementWithDefinitions; +import com.excelsior.xds.core.model.IXdsImportSection; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsType; +import com.excelsior.xds.core.model.IXdsVariable; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public abstract class XdsElementWithDefinitions extends SourceBoundXdsElement + implements IXdsElementWithDefinitions +{ + protected final List importSections = new ArrayList(); + private final List xdsLocalModules = new ArrayList(); + private final List xdsProcedures = new ArrayList(); + private final List xdsVariables = new ArrayList(); + private final List xdsConstants = new ArrayList(); + private final List xdsTypes = new ArrayList(); + + protected final CompositeCollection allChildren = new CompositeCollection(); + + private final IXdsCompilationUnit compilationUnit; + + public XdsElementWithDefinitions( IXdsProject xdsProject + , IXdsCompilationUnit compilationUnit + , IXdsContainer parent + , String elementName + , SourceBinding sourceBinding ) + { + super(elementName, xdsProject, parent, sourceBinding); + this.compilationUnit = compilationUnit; + + allChildren.addComposited(importSections); + allChildren.addComposited(xdsLocalModules); + allChildren.addComposited(xdsProcedures); + allChildren.addComposited(xdsVariables); + allChildren.addComposited(xdsConstants); + allChildren.addComposited(xdsTypes); + } + + @Override + public String getElementName() { + IModulaSymbol symbol = getSymbol(); + return symbol != null? symbol.getName() : super.getElementName(); + } + + @Override + public IXdsCompilationUnit getCompilationUnit() { + return compilationUnit; + } + + @Override + @SuppressWarnings("unchecked") + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(allChildren); + } + + @Override + public synchronized Collection getModules() { + return CollectionsUtils.unmodifiableArrayList(xdsLocalModules); + } + + public synchronized void addLocalModule(IXdsModule module) { + xdsLocalModules.add(module); + } + + @Override + public synchronized Collection getProcedures() { + return CollectionsUtils.unmodifiableArrayList(xdsProcedures); + } + + public synchronized void addProcedure(IXdsProcedure procedure) { + xdsProcedures.add(procedure); + } + + @Override + public synchronized Collection getVariables() { + return CollectionsUtils.unmodifiableArrayList(xdsVariables); + } + + public synchronized void addVariable(IXdsVariable variable) { + xdsVariables.add(variable); + } + + @Override + public synchronized Collection getConstants() { + return CollectionsUtils.unmodifiableArrayList(xdsConstants); + } + + public synchronized void addConstant(IXdsConstant constant) { + xdsConstants.add(constant); + } + + @Override + public synchronized Collection getTypes() { + return CollectionsUtils.unmodifiableArrayList(xdsTypes); + } + + public synchronized void addType(IXdsType type) { + xdsTypes.add(type); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnum.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnum.java new file mode 100644 index 0000000..21ca343 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnum.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsEnumElement; +import com.excelsior.xds.core.model.IXdsEnumType; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; + +public class XdsEnum extends SimpleXdsElementWithSymbol + implements IXdsEnumType +{ + private final List enumElements = new ArrayList(); + + public XdsEnum( IXdsProject xdsProject, XdsCompilationUnit compilationUnit + , IXdsContainer parent + , String enumName, IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(enumName, xdsProject, compilationUnit, parent, symbolRef, sourceBinding); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(enumElements, IXdsElement.class); + } + + public synchronized void addEnumElement(IXdsEnumElement enumElement) { + enumElements.add(enumElement); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnumElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnumElement.java new file mode 100644 index 0000000..56189a3 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsEnumElement.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsEnumElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsEnumElement extends XdsConstant implements IXdsEnumElement { + + public XdsEnumElement(IXdsProject project, XdsCompilationUnit compilationUnit, String name, IXdsContainer parent, IModulaSymbolReference symbolRef, SourceBinding sourceBinding) { + super(project, compilationUnit, name, parent, symbolRef, sourceBinding); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnit.java new file mode 100644 index 0000000..9b30b69 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnit.java @@ -0,0 +1,92 @@ +package com.excelsior.xds.core.model.internal; + +import java.io.BufferedInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.InputStream; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Path; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsExternalCompilationUnit; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsExternalCompilationUnit extends XdsWorkspaceCompilationUnit + implements IXdsExternalCompilationUnit +{ + private final String absolutePath; + private final String name; + + /** + * Relative path from the mount point + */ + private String mountPointRelativePath; + + public XdsExternalCompilationUnit( IXdsProject xdsProject, IXdsContainer parent + , String absolutePath, String name ) + { + super(xdsProject, null, parent); + this.absolutePath = absolutePath; + determineCompilationUnitType(absolutePath); + this.name = name; + } + + @Override + public String getElementName() { + return name; + } + + public void setParent(IXdsContainer parent) { + super.setParent(parent); + } + + public void setResource(IResource resource) { + super.setResource(resource); + } + + /** + * Relative path from the mount point + */ + public synchronized String getMountPointRelativePath() { + return mountPointRelativePath; + } + + /** + * Relative path from the mount point + */ + public synchronized void setMountPointRelativePath(String mountPointRelativePath) { + this.mountPointRelativePath = mountPointRelativePath; + } + + @Override + public InputStream getContents() throws CoreException { + try { + return new BufferedInputStream(new FileInputStream(new File(absolutePath))); + } catch (FileNotFoundException e) { + LogHelper.logError(e); + throw new CoreException(LogHelper.createStatus(IStatus.ERROR, 0, "File Not Found", e)); //$NON-NLS-1$ + } + } + + @Override + public IPath getFullPath() { + return new Path(absolutePath); + } + + @Override + public String getName() { + return FilenameUtils.getName(absolutePath); + } + + @Override + public boolean isReadOnly() { + return !new File(absolutePath).canWrite(); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnitContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnitContainer.java new file mode 100644 index 0000000..25cb310 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalCompilationUnitContainer.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsExternalCompilationUnitContainer; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsExternalCompilationUnitContainer extends XdsVirtualContainer implements IXdsExternalCompilationUnitContainer { + public XdsExternalCompilationUnitContainer(IXdsProject xdsProject, + String name, String path, IXdsContainer parent, + List children) { + super(xdsProject, name, path, parent, children); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalDependenciesContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalDependenciesContainer.java new file mode 100644 index 0000000..c32522b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsExternalDependenciesContainer.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsExternalDependenciesContainer; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsExternalDependenciesContainer extends XdsVirtualContainer + implements IXdsExternalDependenciesContainer { + + public XdsExternalDependenciesContainer(IXdsProject xdsProject, String name, String path, + IXdsContainer parent, List children) { + super(xdsProject, name, path, parent, children); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFolderContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFolderContainer.java new file mode 100644 index 0000000..efef97c --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFolderContainer.java @@ -0,0 +1,239 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceVisitor; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.PlatformObject; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsResource; +import com.excelsior.xds.core.model.IXdsSymbolFile; +import com.excelsior.xds.core.model.IXdsWorkspaceCompilationUnit; +import com.excelsior.xds.core.project.SpecialFileNames; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class XdsFolderContainer extends PlatformObject + implements IXdsResource + , IEditableXdsFolderContainer +{ + protected List children; + protected final Set childResources = new HashSet(); + + private final IResource resource; + private final XdsProject xdsProject; + private final IXdsContainer parent; + + public XdsFolderContainer(XdsProject xdsProject, IResource resource, IXdsContainer parent) + { + this.xdsProject = xdsProject; + this.resource = resource; + this.parent = parent; + } + + @Override + public String getElementName() { + return resource.getName(); + } + + @Override + public XdsProject getXdsProject() { + return xdsProject; + } + + @Override + public IResource getResource() { + return resource; + } + + @Override + public synchronized Collection getChildren() { + buildChildren(resource, getResourceFilter()); + return CollectionsUtils.unmodifiableArrayList(children, IXdsElement.class); + } + + /** + * Specifies resources that will be used as this folder`s children. + * @return + */ + protected Predicate getResourceFilter() { + return getXdsProject().getResourceFilter(); + } + + /** + * TODO : remove, modify and use {@link #getResourceFilter()} instead. + * @return + */ + protected Collection getRelativeFolderPathesToSkip() { + return Collections.emptyList(); + } + + protected Predicate debugPrintPredicate(Predicate wrapped, String fmt) { + return r -> { + boolean result = wrapped.test(r); + return result; + }; + } + + protected synchronized void buildChildren(final IResource root, Predicate resourceFilter) { + if (children == null) { + makeChildrenContainer(); + try { + root.accept(new IResourceVisitor() { + @Override + public boolean visit(IResource resource) throws CoreException { + if (root == resource) return true; + + // skip resources if they are inside specified skip folders + for (String relativeFolderPath : getRelativeFolderPathesToSkip()) { + if (ResourceUtils.isInsideFolder(relativeFolderPath, resource)) { + return false; + } + } + + if (!resourceFilter.test(resource)) { + return false; + } + + if (resource instanceof IContainer) { + XdsFolderContainer container = new XdsFolderContainer(getXdsProject(), resource, XdsFolderContainer.this); + addChild(container); + } + else if (XdsFileUtils.isCompilationUnitFile(resource.getFullPath().lastSegment())) { + IXdsWorkspaceCompilationUnit xdsCompilationUnit = new XdsWorkspaceCompilationUnit(getXdsProject(), resource, XdsFolderContainer.this); + addChild(xdsCompilationUnit); + } + else if (XdsFileUtils.isSymbolFile(resource.getFullPath().lastSegment())) { + IXdsSymbolFile xdsSymFile = new XdsSymbolFile(getXdsProject(), resource, XdsFolderContainer.this); + addChild(xdsSymFile); + } + else if (XdsFileUtils.isXdsProjectFile(resource.getFullPath() + .lastSegment())) { + addChild(new XdsProjectDescriptor(getXdsProject(), resource, XdsFolderContainer.this)); + } + else if (XdsFileUtils.isDbgScriptFile(resource.getFullPath().lastSegment())) { + addChild(new XdsDdgScriptUnitFile(getXdsProject(), resource, XdsFolderContainer.this)); + } + else if (XdsFileUtils.isDbgScriptBundleFile(resource.getFullPath().lastSegment())) { + addChild(new XdsDbgScriptBundleFile(getXdsProject(), resource, XdsFolderContainer.this)); + } + else { + String fileName = FilenameUtils.getName(ResourceUtils.getAbsolutePath(resource)); + if (!SpecialFileNames.getSpecialFileNames().contains(fileName)) { + addChild(new XdsTextFile(getXdsProject(), resource, XdsFolderContainer.this)); + } + } + return true; + } + }, IResource.DEPTH_ONE, true); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + + @Override + public IXdsContainer getParent() { + return parent; + } + + @Override + public String toString() { + return resource.toString(); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((getWorkspaceRelativePath() == null) ? 0 : getWorkspaceRelativePath().hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + XdsFolderContainer other = (XdsFolderContainer) obj; + if (getWorkspaceRelativePath() == null) { + if (other.getWorkspaceRelativePath() != null) + return false; + } else if (!getWorkspaceRelativePath().equals(other.getWorkspaceRelativePath())) + return false; + return true; + } + + private String getWorkspaceRelativePath() { + return ResourceUtils.getWorkspaceRelativePath(getResource()); + } + + @Override + public synchronized void addChild(IXdsResource e) { + if (children == null) { + makeChildrenContainer(); + } + children.add(e); + IResource childResource = e.getResource(); + if (childResource != null) { + childResources.add(childResource); + } + getXdsProject().getModel().putWorkspaceXdsElement(childResource, e); + } + + @Override + public synchronized void removeChild(IXdsResource e) { + children.remove(e); + + IResource childResource = e.getResource(); + if (childResource != null) { + childResources.remove(childResource); + } + + getXdsProject().getModel().removeWorkspaceXdsElement(childResource); + } + + @Override + public synchronized Collection getChildResources() { + return CollectionsUtils.unmodifiableArrayList(childResources, IResource.class); + } + + private void makeChildrenContainer() { + children = new ArrayList(); + } + + @Override + public void resourceChanged() { + } + + /** + * {@inheritDoc} + */ + @Override + @SuppressWarnings("rawtypes") + public Object getAdapter(Class adapter) { + IResource r = XdsElementCommons.adaptToResource(this, adapter); + if (r == null){ + return super.getAdapter(adapter); + } + else { + return r; + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFormalParameter.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFormalParameter.java new file mode 100644 index 0000000..5cfc59e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsFormalParameter.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsFormalParameter; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsFormalParameter extends SimpleXdsElementWithSymbol + implements IXdsFormalParameter +{ + public XdsFormalParameter( IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsProcedure parent + , String name + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsImportSection.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsImportSection.java new file mode 100644 index 0000000..3bca551 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsImportSection.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsImportElement; +import com.excelsior.xds.core.model.IXdsImportSection; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.model.internal.nls.Messages; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class XdsImportSection extends SourceBoundXdsElement + implements IXdsImportSection +{ + private final List importElements = new ArrayList(); + + public XdsImportSection( IXdsProject project, IXdsContainer parent + , SourceBinding sourceBinding ) + { + super(Messages.XdsImportSection_Name, project, parent, sourceBinding); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(importElements, IXdsElement.class); + } + + @Override + public synchronized Collection getImportElements() { + return CollectionsUtils.unmodifiableArrayList(importElements, IXdsImportElement.class); + } + + public synchronized void addImportElement(IXdsImportElement e) { + importElements.add(e); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModel.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModel.java new file mode 100644 index 0000000..f2ca886 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModel.java @@ -0,0 +1,609 @@ +package com.excelsior.xds.core.model.internal; + +import java.net.URI; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; +import java.util.stream.Collectors; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectNature; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.team.core.history.IFileRevision; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IStorageEditorInput; +import org.eclipse.ui.IURIEditorInput; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.filesystems.history.HistoryFs; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IEditableXdsModel; +import com.excelsior.xds.core.model.IElementChangedListener; +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsElementOperation; +import com.excelsior.xds.core.model.IXdsNonWorkspaceCompilationUnit; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsResource; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.model.utils.TraverseUtils; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.resource.PathWithLocationType; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.AdapterUtilities; +import com.excelsior.xds.core.utils.BuilderUtils; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +/** + * @author lsa80 + */ +public class XdsModel implements IEditableXdsModel +{ + private static boolean DEBUG_PRINT_OF_THE_CHANGE_NOTIFICATIONS = false; + + private final ReadWriteLock instanceLock = new ReentrantReadWriteLock(); + + private List xdsProjects; + private Map name2XdsProject; + + private final Map location2XdsElement = new HashMap(); + + private final Set elementChangedListeners = CollectionsUtils.newConcurentHashSet(); + private final IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); + + /** + * These projects will be rebuilt on the appropriate time. + */ + private final Set projectsScheduledForRebuild = CollectionsUtils.newConcurentHashSet(); + + public XdsModel(List xdsProjects, Map name2XdsProject){ + this.xdsProjects = xdsProjects; + for (IXdsProject p : xdsProjects) { + putWorkspaceXdsElement(p.getProject(), p); + } + + this.name2XdsProject = name2XdsProject; + } + + /** + * Walks every node and asks for the children - make them cash it - thus fully building the model + */ + public XdsModel expandModelNodes() { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + for (IXdsProject xdsProject : xdsProjects) { + expandNodes(xdsProject); + } + } + finally { + writeLock.unlock(); + } + return this; + } + + @Override + public String getElementName() { + return "The Model"; //$NON-NLS-1$ + } + + @Override + public List getXdsProjects() { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return CollectionsUtils.unmodifiableArrayList(xdsProjects); + } + finally { + readLock.unlock(); + } + } + + @Override + public IResource getResource() { + return ResourcesPlugin.getWorkspace().getRoot(); + } + + @Override + public XdsProject getXdsProjectBy(IProject p) { + IProjectNature nature; + try { + nature = p.isOpen() ? p.getNature(NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID) : null; + if (nature == null){ + return null; + } + } catch (CoreException e) { + LogHelper.logError(e); + return null; + } + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return name2XdsProject.get(p.getName()); + } + finally { + readLock.unlock(); + } + } + + @Override + public IXdsProject getXdsProjectBy(IResource r) { + IProject project = r.getProject(); + if (project == null) { + return null; + } + return getXdsProjectBy(project); + } + + @Override + public IXdsResource getXdsElement(final IResource resource) { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + PathWithLocationType pathWithLocationType = new PathWithLocationType(resource); + return (IXdsResource)location2XdsElement.get(pathWithLocationType); + } + finally { + readLock.unlock(); + } + } + + + /** + * {@inheritDoc} + */ + @Override + public IXdsElement getXdsElement(IEditorInput input) { + IXdsElement xdsElement = null; + if (input instanceof IFileEditorInput) { + IFileEditorInput fileEditorInput = (IFileEditorInput)input; + IFile file = fileEditorInput.getFile(); + if (file != null) { + xdsElement = XdsModelManager.getModel().getXdsElement(file); + } + } + else { + URI uri = toURI(input); + IFileStore fileStore = ResourceUtils.toFileStore(uri); + xdsElement = XdsModelManager.getModel().getNonWorkspaceXdsElement(fileStore); + } + + return xdsElement; + } + + /** + * TODO : common with CoreEditorUtils + * @param input + * @return + */ + private static URI toURI(IEditorInput input) { + URI uri = null; + if (input instanceof IStorageEditorInput) { + IStorageEditorInput storageEditorInput = (IStorageEditorInput)input; + IFileRevision state = AdapterUtilities.getAdapter(storageEditorInput, IFileRevision.class); + if (state != null) { + uri = HistoryFs.toURI(state); + } + } + else if (input instanceof IURIEditorInput) { + + IURIEditorInput uriEditorInput = (IURIEditorInput) input; + uri = uriEditorInput.getURI(); + } + + return uri; + } + + /** + * {@inheritDoc} + */ + @Override + public IXdsElement getXdsElement(PathWithLocationType location) { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return location2XdsElement.get(location); + } + finally { + readLock.unlock(); + } + } + + @Override + public IXdsElement getNonWorkspaceXdsElement(IFileStore absoluteFile) { + return getXdsElement(new PathWithLocationType(absoluteFile)); + } + + @Override + public IXdsElement getParentXdsElement(IResource r) { + IXdsResource xdsElement = getXdsElement(r); + return xdsElement != null ? xdsElement.getParent() : null; + } + + public void refreshProject(final IProject p) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + XdsProject xdsProject = getXdsProjectBy(p); + if (xdsProject != null) { + removeProjectFromModel(xdsProject); + } + xdsProject = new XdsProject(p, this); + if (xdsProject != null) { + addProjectToModel(xdsProject); + expandNodes(xdsProject); + } + } + finally { + writeLock.unlock(); + } + } + + public void refreshExternalDependencies(IProject p) { + IXdsProject xdsProject = getXdsProjectBy(p); + Assert.isNotNull(xdsProject); + xdsProject.refreshExternalDependencies(); + } + + public void refreshSdkLibrary(IProject p) { + IXdsProject xdsProject = getXdsProjectBy(p); + Assert.isNotNull(xdsProject); + xdsProject.refreshSdkLibrary(); + } + + @Override + public void endDeltaProcessing(IResourceDelta rootDelta) { + rebuildPostponedProjects(rootDelta); + } + + /** + * @param rootDelta - current delta being processed. + */ + private void rebuildPostponedProjects(IResourceDelta rootDelta) { + Set forRebuildScheduled; + + // Idea is the following : process add-project delta in the next change-delta (it always comes after the add-project delta). + synchronized (projectsScheduledForRebuild) { + forRebuildScheduled= projectsScheduledForRebuild + .stream() + .filter(e -> e.rootDelta != rootDelta + || e.rootDelta == null).collect(Collectors.toSet()); + projectsScheduledForRebuild.removeAll(forRebuildScheduled); + } + + forRebuildScheduled.forEach(e -> rebuild(e.project)); + } + + /** + * Will postpone re-building of the project until the next delta. + * @param rootDelta - when non-null, this {@link project} will be scheduled for rebuild on next delta. If null, will be scheduled during the processing of the current delta. + * @param project - project to be scheduled for rebuild. + */ + private void postponeProjectForRebuild(IResourceDelta rootDelta, IProject project) { + synchronized (projectsScheduledForRebuild) { + projectsScheduledForRebuild.add(new ProjectAndResourceDelta(project, rootDelta)); + } + } + + /** + * @param project + */ + private void postponeProjectForRebuild(IProject project) { + postponeProjectForRebuild(null, project); + } + + @Override + public void handleAddResource(IResourceDelta rootDelta, final IResource affectedResource) { + if (DEBUG_PRINT_OF_THE_CHANGE_NOTIFICATIONS) System.out.println("Add resource : " + affectedResource); //$NON-NLS-1$ + + if (affectedResource instanceof IProject) { + refreshProject(affectedResource.getProject()); + postponeProjectForRebuild(rootDelta, affectedResource.getProject()); + } + else { + if (affectedResource.isVirtual()) { + return; + } + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + + IXdsElement tmpElement = location2XdsElement.get(new PathWithLocationType(affectedResource.getParent())); + // TODO : sometimes we will have null here (say for some descendant of .externals folder). + if (tmpElement instanceof IEditableXdsFolderContainer) { + IEditableXdsFolderContainer xdsElementParent = (IEditableXdsFolderContainer) tmpElement; + if (!xdsElementParent.getChildResources().contains(affectedResource)) { + XdsProject xdsProject = getXdsProjectBy(affectedResource.getProject()); + IXdsElement xdsElement = XdsModelManager.createFrom(this, xdsProject, affectedResource, xdsElementParent); + if (xdsElement != null ) { // it can be null for say .project + xdsElementParent.addChild((IXdsResource)xdsElement); // it can only be instanceof IXdsResource + } + } + } + } + finally { + writeLock.unlock(); + } + } + } + + private IXdsElement addProjectToModel(XdsProject xdsProject) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + + IProject project = (IProject) xdsProject.getResource(); + xdsProjects.add(xdsProject); + putWorkspaceXdsElement(project, xdsProject); + return name2XdsProject.put(xdsProject.getResource().getName(), xdsProject); + } + finally { + writeLock.unlock(); + } + } + + private IXdsElement removeProjectFromModel(IXdsProject xdsProject) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + + IProject project = (IProject) xdsProject.getResource(); + xdsProjects.remove(xdsProject); + removeWorkspaceXdsElement(project); + return name2XdsProject.remove(xdsProject.getResource().getName()); + } + finally { + writeLock.unlock(); + } + } + + @Override + public void handleChangeResource(IResourceDelta rootDelta, IResource affectedResource, boolean isContentChanged) { + if (DEBUG_PRINT_OF_THE_CHANGE_NOTIFICATIONS) System.out.println("Change resource : " + affectedResource); //$NON-NLS-1$ + if (workspaceRoot == affectedResource) { // ignore plain workspace changes + return; + } + + if (affectedResource instanceof IProject) { + IProject p = (IProject)affectedResource; + IXdsProject xdsProject = getXdsProjectBy(p); + if (xdsProject == null) { // this will be the case when the project is re-opened + refreshProject(p); + postponeProjectForRebuild(affectedResource.getProject()); + } + } + else if (affectedResource instanceof IFile) { + IXdsResource xdsElement = getWorkspaceXdsElement(affectedResource); + if (xdsElement != null) { + xdsElement.resourceChanged(); + } + } + } + + private void rebuild(IProject p) { + try { + BuilderUtils.invokeRebuild(p, new NullProgressMonitor()); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + @Override + public void handleRemoveResource(IResourceDelta rootDelta, IResource affectedResource) { + if (DEBUG_PRINT_OF_THE_CHANGE_NOTIFICATIONS) System.out.println("Remove resource : " + affectedResource); //$NON-NLS-1$ + + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + + IXdsResource xdsElement = getWorkspaceXdsElement(affectedResource); + if (xdsElement instanceof IXdsProject) { // just remove project + removeProjectFromModel((IXdsProject)xdsElement); + CompilationSetManager.getInstance().removeFromCompilationSet(affectedResource.getProject()); + } + else if (xdsElement != null) { // it can be null for say .project resource + IXdsResource tmpElement = getWorkspaceXdsElement(affectedResource.getParent()); + if (tmpElement instanceof IEditableXdsFolderContainer) { + IEditableXdsFolderContainer xdsElementParent = (IEditableXdsFolderContainer) tmpElement; + Assert.isNotNull(xdsElementParent, "Non-project element should always has parent"); //$NON-NLS-1$ + if (xdsElementParent.getChildResources().contains(affectedResource)) { + xdsElementParent.removeChild(xdsElement); + } + } + + if (xdsElement instanceof IXdsCompilationUnit) { + String path = ResourceUtils.getAbsolutePath(affectedResource); + CompilationSetManager.getInstance().removeFromCompilationSet(affectedResource.getProject(), path); + } + } + } + finally { + writeLock.unlock(); + } + } + + @Override + public IXdsContainer getParent() { + return null; + } + + public void addElementChangedListener(IElementChangedListener listener) { + elementChangedListeners.add(listener); + } + + public void removeElementChangedListener(IElementChangedListener listener) { + elementChangedListeners.remove(listener); + } + + private void expandNodes(IXdsResource xdsElement) { + TraverseUtils.walk(xdsElement, e -> {}); + } + + private void notifyElementChangedListeners() { + for (IElementChangedListener listener : elementChangedListeners) { + listener.elementChanged(); + } + } + + @Override + public void notifyChanged() { + if (DEBUG_PRINT_OF_THE_CHANGE_NOTIFICATIONS) System.out.println("END handle event:"+System.currentTimeMillis()); //$NON-NLS-1$ + notifyElementChangedListeners(); + } + +//XXX @Override +// public String toString() { +// return "The Model"; //$NON-NLS-1$ +// } + + @Override + public void resourceChanged() { + } + + /* + * TODO : refactor model hierarchy to remove this method from here + */ + @Override + public IXdsProject getXdsProject() { + throw new RuntimeException("Should never be called"); //$NON-NLS-1$ + } + + @Override + public void editElement(IXdsElement element, IXdsElementOperation operation) { + operation.invoke(element); + notifyChanged(); + } + + void putWorkspaceXdsElement(IResource r, IXdsResource xdsElement) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + location2XdsElement.put(new PathWithLocationType(r) , xdsElement); + } + finally { + writeLock.unlock(); + } + } + + public void putNonWorkspaceXdsElement(IFileStore sourceFile, + IXdsElement xdsElement) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + location2XdsElement.put(new PathWithLocationType(sourceFile) , xdsElement); + } + finally { + writeLock.unlock(); + } + } + + private IXdsResource getWorkspaceXdsElement(IResource r) { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return (IXdsResource)location2XdsElement.get(new PathWithLocationType(r)); + } + finally { + readLock.unlock(); + } + } + + void removeWorkspaceXdsElement(IResource r) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + location2XdsElement.remove(new PathWithLocationType(r)); + } + finally { + writeLock.unlock(); + } + } + + @Override + public IXdsNonWorkspaceCompilationUnit createNonWorkspaceXdsElement(IFileStore sourceFile) { + IXdsNonWorkspaceCompilationUnit nonWorkspaceXdsElement = new XdsNonWorkspaceCompilationUnit(sourceFile, null, + null); + putNonWorkspaceXdsElement( + sourceFile, nonWorkspaceXdsElement); + return nonWorkspaceXdsElement; + } + + @Override + public void removeNonWorkspaceXdsElement( + IXdsNonWorkspaceCompilationUnit compilationUnit) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + location2XdsElement.remove(new PathWithLocationType(compilationUnit.getAbsoluteFile())); + } + finally { + writeLock.unlock(); + } + } + + /** + * {@link #rootDelta} - represents moment of time (processing of the appropriate ResourceDelta), associated with this project.
+ * @author lsa80 + */ + private static class ProjectAndResourceDelta { + final IProject project; + final IResourceDelta rootDelta; + + ProjectAndResourceDelta(IProject project, + IResourceDelta rootDelta) { + this.project = project; + this.rootDelta = rootDelta; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((project == null) ? 0 : project.hashCode()); + result = prime * result + + ((rootDelta == null) ? 0 : rootDelta.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ProjectAndResourceDelta other = (ProjectAndResourceDelta) obj; + if (project == null) { + if (other.project != null) + return false; + } else if (!project.equals(other.project)) + return false; + if (rootDelta == null) { + if (other.rootDelta != null) + return false; + } else if (!rootDelta.equals(other.rootDelta)) + return false; + return true; + } + + @Override + public String toString() { + return "<>"; + } + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModule.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModule.java new file mode 100644 index 0000000..143d742 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsModule.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class XdsModule extends XdsElementWithDefinitions implements IXdsModule +{ + private final IModulaSymbolReference symbolRef; + private XdsImportSection importSection; + + public XdsModule( IXdsProject xdsProject, IXdsCompilationUnit compilationUnit + , IXdsContainer parent, String moduleName, IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(xdsProject, compilationUnit, parent, moduleName, sourceBinding); + + this.symbolRef = symbolRef; + } + + @Override + public IModuleSymbol getSymbol() { + return ReferenceUtils.resolve(symbolRef); + } + + public synchronized XdsImportSection getOrCreateImportSection(SourceBinding sourceBinding) { + if (importSection == null) { + importSection = new XdsImportSection(getXdsProject(), this, sourceBinding); + importSections.add(importSection); + } + return importSection; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsNonWorkspaceCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsNonWorkspaceCompilationUnit.java new file mode 100644 index 0000000..8afec82 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsNonWorkspaceCompilationUnit.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.model.CompilationUnitType; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsNonWorkspaceCompilationUnit; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsNonWorkspaceCompilationUnit extends XdsCompilationUnit + implements IXdsNonWorkspaceCompilationUnit { + + private final IFileStore absoluteFile; + private final String name; + + public XdsNonWorkspaceCompilationUnit(IFileStore absoluteFile, IXdsProject xdsProject, IXdsContainer parent) { + super(xdsProject, parent); + this.absoluteFile = absoluteFile; + this.name = absoluteFile.getName(); + } + + @Override + public CompilationUnitType getCompilationUnitType() { + return determineCompilationUnitType(getAbsoluteFile().fetchInfo().getName()); + } + + @Override + public boolean isInCompilationSet() { + return false; + } + + @Override + public String getElementName() { + return name; + } + + @Override + public IFileStore getAbsoluteFile() { + return absoluteFile; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsOberonMethodReceiver.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsOberonMethodReceiver.java new file mode 100644 index 0000000..8013002 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsOberonMethodReceiver.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsOberonMethodReceiver; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsOberonMethodReceiver extends SimpleXdsElementWithSymbol + implements IXdsOberonMethodReceiver +{ + public XdsOberonMethodReceiver( IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsProcedure parent + , String name + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProcedure.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProcedure.java new file mode 100644 index 0000000..797a068 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProcedure.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsFormalParameter; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.ProcedureType; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class XdsProcedure extends XdsElementWithDefinitions + implements IXdsProcedure +{ + private final IModulaSymbolReference symbolRef; + private final ProcedureType procedureType; + + private final List xdsParameters = new ArrayList(4); + private final boolean isForwardDeclaration; + + public XdsProcedure( ProcedureType procedureType + , IXdsProject xdsProject + , IXdsCompilationUnit compilationUnit + , IXdsContainer parent + , String procedureName + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding, boolean isForwardDeclaration ) + { + super(xdsProject, compilationUnit, parent, procedureName, sourceBinding); + + this.symbolRef = symbolRef; + this.procedureType = procedureType; + this.isForwardDeclaration = isForwardDeclaration; + + allChildren.addComposited(xdsParameters); + } + + @Override + public IProcedureSymbol getSymbol() { + return ReferenceUtils.resolve(symbolRef); + } + + @Override + public ProcedureType getProcedureType() { + return procedureType; + } + + @Override + public Collection getParameters() { + return xdsParameters; + } + + public void addParameter(IXdsFormalParameter parameter) { + xdsParameters.add(parameter); + } + + @Override + public boolean isForwardDeclaration() { + return isForwardDeclaration; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProject.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProject.java new file mode 100644 index 0000000..d96313e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProject.java @@ -0,0 +1,417 @@ +package com.excelsior.xds.core.model.internal; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeMap; +import java.util.concurrent.CountDownLatch; +import java.util.function.Predicate; +import java.util.stream.Collectors; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.mapping.ResourceMapping; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsExternalDependenciesContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsSdkLibraryContainer; +import com.excelsior.xds.core.model.XdsProjectConfiguration; +import com.excelsior.xds.core.model.internal.nls.Messages; +import com.excelsior.xds.core.model.utils.XdsElementUtils; +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.core.utils.Lambdas; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class XdsProject extends XdsFolderContainer implements IXdsProject { + private IXdsExternalDependenciesContainer externalSourcesFolder; + private IXdsSdkLibraryContainer sdkLibraryContainer; + + private XdsModel model; + public XdsProject(IProject project, XdsModel model) { + super(null, project, null); + this.model = model; + } + + @Override + protected Collection getRelativeFolderPathesToSkip() { + return SpecialFolderNames.getIgnoredSpecialFolderNames(); + } + + @Override + public XdsProject getXdsProject() { + return this; + } + + public synchronized void setModel(XdsModel model) { + this.model = model; + } + + + @Override + public XdsModel getModel() { + return model; + } + + @Override + public XdsProjectSettings getXdsProjectSettings() { + return XdsProjectSettingsManager.getXdsProjectSettings(getProject()); + } + + @Override + public XdsProjectConfiguration getProjectConfiguration() { + return new XdsProjectConfiguration(this.getProject()); + } + + public IProject getProject() { + return (IProject)getResource(); + } + + public void syncRefreshLocal() { + try { + final CountDownLatch latch = new CountDownLatch(1); + getProject().refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor() { + @Override + public void done() { + latch.countDown(); + } + }); + latch.await(); + } catch (CoreException e) { + LogHelper.logError(e); + } catch (InterruptedException e) { + LogHelper.logError(e); + } + } + + @Override + public String getElementName() { + return getProject().getName(); + } + + @Override + public synchronized List getChildren() { + if (children == null) { + // TODO : commented out code is used when project location is used as Linked Folder. +// final String projectRootDir = getXdsProjectSettings().getProjectRootDir(); +// String relativeProjectRootDir = ResourceUtils.getRelativePath(getProject(), projectRootDir); +// final IResource root = getProject().getFolder(relativeProjectRootDir); +// buildChildren(root); + buildChildren(getProject(), getResourceFilter() ); + buildExternalDependenciesChildren(); + buildSdkLibraryChildren(); + } + return CollectionsUtils.unmodifiableArrayList(children); + } + + /* (non-Javadoc) + * @see com.excelsior.xds.core.model.internal.XdsFolderContainer#getResourceFilter() + */ + protected Predicate getResourceFilter() { + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(getProject()); + Predicate pred = newExternalDependencyDirectoryPredicate(buildSettings); + Sdk sdk = buildSettings.getSdk(); + + // TODO : modify this predicate to remove getRelativeFolderPathesToSkip methods + return r -> { + // accept all resources outside SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME + if (!ResourceUtils.isInsideFolder(SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME, r)) { + return true; + } + + if (!JavaUtils.isOneOf(r, IContainer.class) || r.isVirtual()) { // accept all virtual folders and leaf resources + return true; + } + + // at this point we are testing non-virtual folder under the .mnt directory. + + File resourceFile = ResourceUtils.getAbsoluteFile(r); + // skip external dependencies directories - they will be handled by the buildExternalDependenciesChildren + if (pred.test(resourceFile)) { + return false; + } + + // skip library definition path directory - this will be handled by buildSdkLibraryChildren method + if (sdk != null && sdk.getLibraryDefinitionsPath() != null) { + Path libDefPath = new Path(sdk.getLibraryDefinitionsPath()); + if (libDefPath.isPrefixOf(new Path(resourceFile.getAbsolutePath()))) { + return false; + } + } + + return true; + }; + } + + private synchronized void buildExternalDependenciesChildren() { + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(getProject()); + Predicate pred = newExternalDependencyDirectoryPredicate(buildSettings); + Set lookupDirs = buildSettings.getLookupDirs().stream().filter(pred).collect(Collectors.toSet()); + if (!lookupDirs.isEmpty()) { + boolean isHasChildren = false; + XdsExternalDependenciesContainer externalSourcesFolder = new XdsExternalDependenciesContainer(this, Messages.XdsProject_ExternalDependencies, null, this, new ArrayList()); + Map parentPathToContainer = createDirectoryTree(externalSourcesFolder, lookupDirs); + for (File lookupDir : lookupDirs) { + IResource r = ResourceUtils.getResource(getProject(), lookupDir.toURI()); + if (r != null){ + XdsVirtualContainer lookupDirContainer = parentPathToContainer.get(lookupDir.getParent()); + XdsFolderContainer folder = new XdsFolderContainer(getXdsProject(), r, lookupDirContainer) { + @Override + protected Predicate getResourceFilter() { + return Lambdas.TRUE(); + } + }; + lookupDirContainer.addChild(folder); + model.putWorkspaceXdsElement(r, folder); + isHasChildren = true; + } + } + if (isHasChildren) { + this.externalSourcesFolder = externalSourcesFolder; + children.add(externalSourcesFolder); + } + } + } + + /** + * Tests whether the given {@link File} denotes the valid external directory. + * @param buildSettings + * @return + */ + private Predicate newExternalDependencyDirectoryPredicate(BuildSettings buildSettings) { + Path sdkHomePath = getSdkHomePath(buildSettings); + Path projectPath = new Path(ResourceUtils.getAbsolutePath(getProject())); + return d -> { + if (d == null) { + return true; // accept virtual folders + } + Path dirPath = new Path(d.getAbsolutePath()); + boolean passes = d.isDirectory() && !projectPath.isPrefixOf(dirPath) && !dirPath.isPrefixOf(projectPath); + if (passes && sdkHomePath != null){ // it is OK for sdkHomePath to be null, when it is not specified in settings + passes &= !sdkHomePath.isPrefixOf(dirPath); + } + return passes; + }; + } + + Path getSdkHomePath(BuildSettings buildSettings) { + Sdk sdk = buildSettings.getSdk(); + if (sdk == null){ + return null; + } + String sdkHomePath = sdk.getSdkHomePath(); + if (sdkHomePath == null) { + return null; + } + return new Path(sdkHomePath); + } + + private synchronized void buildSdkLibraryChildren() { + XdsSdkLibraryContainer sdkLibraryContrainer = new XdsSdkLibraryContainer(this, Messages.XdsProject_SdkLibrary, null, this, new ArrayList()); + + XdsProjectSettings projectSettings = XdsProjectSettingsManager.getXdsProjectSettings(getProject()); + Sdk sdk = projectSettings.getProjectSdk(); + if (sdk != null && sdk.getLibraryDefinitionsPath() != null && sdk.getSdkHomePath() != null) { + File libDefFile = new File(sdk.getLibraryDefinitionsPath()); + File sdkHomeDir = new File(sdk.getSdkHomePath()); + if (libDefFile.isDirectory() && sdkHomeDir.isDirectory()) { + IResource r = ResourceUtils.getResource(getProject(), libDefFile.toURI()); + if (r != null){ + XdsVirtualContainer sdkContainer = new XdsVirtualContainer(getXdsProject(), sdkHomeDir.getAbsolutePath(), sdkHomeDir.getAbsolutePath(), sdkLibraryContrainer, new ArrayList()); + XdsFolderContainer folder = new XdsFolderContainer(getXdsProject(), r, sdkContainer) { + @Override + protected Predicate getResourceFilter() { + return Lambdas.TRUE(); + } + }; + sdkContainer.addChild(folder); + model.putWorkspaceXdsElement(r, folder); + sdkLibraryContrainer.addChild(sdkContainer); + } + } + } + + this.sdkLibraryContainer = sdkLibraryContrainer; + children.add(sdkLibraryContrainer); + } + + private Map createDirectoryTree(XdsVirtualContainer externalSourcesFolder, Set dirs) { + Map parentPathToContainer = new HashMap(); + // 1) iterate over all given pathes (they are absolute pathes of Modula sources), create their parent and grand-parent container + for (File dir : dirs) { + String parentPath = dir.getAbsolutePath(); + + String granParentPath = ResourceUtils.getAbsoluteParentPathAsInFS(parentPath); + if (granParentPath != null) { + XdsVirtualContainer grandParentContainer = parentPathToContainer.get(granParentPath); + if (grandParentContainer == null) { + grandParentContainer = new XdsVirtualContainer(this, getGoodLookingPath(granParentPath), granParentPath, this, new ArrayList()); + parentPathToContainer.put(granParentPath, grandParentContainer); + } + } + } + + // 2) create array of parentPathes, sorted by length. This gives an list with order like C:\, C:\Dir1, C:\Dir2\Dir2 + // So the parents go first, children last. + List parentPathes = new ArrayList(parentPathToContainer.keySet()); + Collections.sort(parentPathes, new Comparator() { + @Override + public int compare(String o1, String o2) { + return o1.length() - o2.length(); + } + }); + + // roots are topmost containers + TreeMap roots = new TreeMap(); + + // 3) if container have no parent above him, it is root + // otherwise - create all intermediate containers between container and its grandparent + for (String parentPath : parentPathes) { + XdsVirtualContainer container = parentPathToContainer.get(parentPath); + XdsVirtualContainer potentialRoot = getTopmostParentAndAddChildren(container, parentPathToContainer); + if (!isHasGrandParent(potentialRoot, parentPathToContainer)) { // it is root indeed + roots.put(potentialRoot.getPath(), potentialRoot); + } + else { + String tempParentPath = getParent(potentialRoot.getPath()); + XdsVirtualContainer tempContainer = potentialRoot; + while(!parentPathToContainer.containsKey(tempParentPath)) { + XdsVirtualContainer tempParentContainer = new XdsVirtualContainer(this, getGoodLookingPath(tempParentPath), tempParentPath, this, new ArrayList()); + tempParentContainer.addChild(tempContainer); + tempContainer = tempParentContainer; + tempParentPath = getParent(tempParentPath); + } + + XdsVirtualContainer tempParentContainer = parentPathToContainer.get(tempParentPath); + tempParentContainer.addChild(tempContainer); + } + } + + for (Entry entry : roots.entrySet()) { + XdsVirtualContainer rootContainer = entry.getValue(); + rootContainer.setElementName(rootContainer.getPath()); // roots must expose full path as caption + externalSourcesFolder.addChild(rootContainer); + rootContainer.setParent(externalSourcesFolder); + } + + return parentPathToContainer; + } + + + private static XdsVirtualContainer getTopmostParentAndAddChildren(XdsVirtualContainer container, Map parentPathToContainer ) { + String path = container.getPath(); + String parentPath = ResourceUtils.getAbsoluteParentPathAsInFS(path); + XdsVirtualContainer parent = container; + while(parentPath != null && parentPathToContainer.containsKey(parentPath)) { + parent = parentPathToContainer.get(parentPath); + if (!foundInChildren(parent, container)) { + parent.addChild(container); + } + + parentPath = ResourceUtils.getAbsoluteParentPathAsInFS(parentPath); + container = parent; + } + return parent; + } + + private static boolean isHasGrandParent(XdsVirtualContainer container, Map parentPathToContainer) { + String parentPath = getParent(container.getPath()); + while(parentPath != null){ + if (parentPathToContainer.containsKey(parentPath)) { + break; + } + parentPath = getParent(parentPath); + } + + return parentPath != null; + } + + private static String getParent(String path) { + return ResourceUtils.getAbsoluteParentPathAsInFS(path); + } + + private static boolean foundInChildren(XdsVirtualContainer parent, XdsVirtualContainer expectedChild) { + Collection children = parent.getChildren(); + for (IXdsElement xdsElement : children) { + if (xdsElement instanceof XdsVirtualContainer) { + XdsVirtualContainer container = (XdsVirtualContainer) xdsElement; + if (ResourceUtils.equalsPathesAsInFS(expectedChild.getPath(), container.getPath())) { + return true; + } + } + } + return false; + } + + private static String getGoodLookingPath(String absolutePath) { + return FilenameUtils.getName(absolutePath); + } + + @Override + public synchronized void refreshExternalDependencies() { + Assert.isNotNull(children); + + removeExternalDependenciesNode(); + buildExternalDependenciesChildren(); + } + + @Override + public synchronized void refreshSdkLibrary() { + Assert.isNotNull(children); + + removeSdkLibraryNode(); + buildSdkLibraryChildren(); + } + + private synchronized void removeExternalDependenciesNode() { + if (externalSourcesFolder != null) { + children.remove(externalSourcesFolder); + } + } + + private synchronized void removeSdkLibraryNode() { + if (sdkLibraryContainer != null) { + children.remove(sdkLibraryContainer); + } + } + + @Override + public synchronized IXdsExternalDependenciesContainer getXdsExternalDependenciesContainer() { + return externalSourcesFolder; + } + + @Override + public synchronized IXdsSdkLibraryContainer getXdsSdkLibraryContainer() { + return sdkLibraryContainer; + } + + @Override + public synchronized Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + if (ResourceMapping.class.equals(adapter)) { + return XdsElementUtils.createResourceMappingFrom(children, this); + } + + return super.getAdapter(adapter); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProjectDescriptor.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProjectDescriptor.java new file mode 100644 index 0000000..809f240 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsProjectDescriptor.java @@ -0,0 +1,54 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsProjectFile; + +public class XdsProjectDescriptor implements IXdsProjectFile, IAdaptable { + private final IXdsProject xdsProject; + private final IResource resource; + private final IXdsContainer parent; + + public XdsProjectDescriptor(IXdsProject xdsProject, IResource resource, IXdsContainer parent) { + this.xdsProject = xdsProject; + this.resource = resource; + this.parent = parent; + } + + @Override + public IXdsProject getXdsProject() { + return xdsProject; + } + + @Override + public String getElementName() { + return resource.getName(); + } + + @Override + public IResource getResource() { + return resource; + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + return XdsElementCommons.adaptToResource(this, adapter); + } + + @Override + public IXdsContainer getParent() { + return parent; + } + + @Override + public String toString() { + return resource.toString(); + } + + @Override + public void resourceChanged() { + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsQualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsQualifiedImportElement.java new file mode 100644 index 0000000..f29d8f5 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsQualifiedImportElement.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsQualifiedImportElement; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsQualifiedImportElement extends SimpleXdsElementWithSymbol implements + IXdsQualifiedImportElement { + + public XdsQualifiedImportElement(String name, IXdsProject project, XdsCompilationUnit compilationUnit, IXdsContainer parent, IModulaSymbolReference moduleSymbolRef, SourceBinding sourceBinding ) { + super(name, project, compilationUnit, parent, moduleSymbolRef, sourceBinding); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordField.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordField.java new file mode 100644 index 0000000..0ba135f --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordField.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsRecordField; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsRecordField extends XdsElementWithAnonymusCompositeType + implements IXdsRecordField +{ + public XdsRecordField( String name, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordType.java new file mode 100644 index 0000000..7009efa --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordType.java @@ -0,0 +1,88 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsRecordField; +import com.excelsior.xds.core.model.IXdsRecordType; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +public class XdsRecordType extends SimpleXdsElementWithSymbol + implements IXdsRecordType +{ + private final List fields = new ArrayList(); + private final List methods = new ArrayList(); + + public XdsRecordType( IXdsProject project, XdsCompilationUnit compilationUnit + , IXdsContainer parent + , String name, IModulaSymbolReference symbolRef + , SourceBinding sourceBinding) { + this(project, compilationUnit, parent, name, true, symbolRef, sourceBinding); + } + + public XdsRecordType( IXdsProject project, XdsCompilationUnit compilationUnit + , IXdsContainer parent + , String name, boolean isUseNameFromSymbol, IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, isUseNameFromSymbol, project, compilationUnit, parent, symbolRef, sourceBinding); + } + + @Override + public synchronized Collection getChildren() { + Collection children = new ArrayList(); + children.addAll(getFields()); + children.addAll(getProcedures()); + return children; + } + + + public synchronized void addField(IXdsRecordField field) { + fields.add(field); + } + + @Override + public synchronized Collection getFields() { + return CollectionsUtils.unmodifiableArrayList(fields); + } + + + public synchronized void addProcedure(XdsProcedure procedureElement) { + methods.add(procedureElement); + } + + @Override + public synchronized Collection getProcedures() { + return CollectionsUtils.unmodifiableArrayList(methods); + } + + @Override + public SourceBinding getSourceBinding() { + SourceBinding sourceBinding = super.getSourceBinding(); + if (sourceBinding == null) { + return null; + } + + List elementRegions = new ArrayList(); + Collection procedures = getProcedures(); + for (IXdsProcedure proc : procedures) { + SourceBinding procSourceBinding = proc.getSourceBinding(); + if (procSourceBinding != null) { + elementRegions.addAll(procSourceBinding.getElementRegions()); + } + } + + elementRegions.addAll(sourceBinding.getElementRegions()); + + return new SourceBinding(elementRegions, sourceBinding.getNameTextRegion(), sourceBinding.getDeclarationTextRegion()); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariant.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariant.java new file mode 100644 index 0000000..b300101 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariant.java @@ -0,0 +1,58 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsRecordField; +import com.excelsior.xds.core.model.IXdsRecordVariant; +import com.excelsior.xds.core.model.IXdsRecordVariantLabel; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.model.internal.nls.Messages; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class XdsRecordVariant extends SourceBoundXdsElement + implements IXdsRecordVariant +{ + private final List fields = new ArrayList(); + private final List labels = new ArrayList(2); + private final boolean isElseVariant; + + public XdsRecordVariant( IXdsProject project + , IXdsContainer parent + , SourceBinding sourceBinding + , boolean isElseVariant ) + { + super(Messages.XdsRecordVariant_Name, project, parent, sourceBinding); + this.isElseVariant = isElseVariant; + } + + public synchronized void addField(IXdsRecordField field) { + fields.add(field); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(fields, IXdsElement.class); + } + + + @Override + public boolean isElseVariant() { + return isElseVariant; + } + + + public synchronized void addLabel(IXdsRecordVariantLabel label) { + labels.add(label); + } + + @Override + public synchronized Collection getLabels() { + return CollectionsUtils.unmodifiableArrayList(labels, IXdsRecordVariantLabel.class); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantLabel.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantLabel.java new file mode 100644 index 0000000..8522efa --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantLabel.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsRecordVariantLabel; +import com.excelsior.xds.core.model.SourceBinding; + +public class XdsRecordVariantLabel extends SourceBoundXdsElement + implements IXdsRecordVariantLabel +{ + public XdsRecordVariantLabel( String name + , IXdsProject project + , IXdsContainer parent + , SourceBinding sourceBinding ) + { + super(name, project, parent, sourceBinding); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantSelector.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantSelector.java new file mode 100644 index 0000000..5ecea19 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsRecordVariantSelector.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsRecordVariant; +import com.excelsior.xds.core.model.IXdsRecordVariantSelector; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsRecordVariantSelector extends SimpleXdsElementWithSymbol + implements IXdsRecordVariantSelector +{ + private final List variants = new ArrayList(); + + + public XdsRecordVariantSelector( String name, IXdsProject project + , XdsCompilationUnit compilationUnit + , IXdsContainer parent + , IModulaSymbolReference symbolRef + , SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + + public synchronized void addVariant(IXdsRecordVariant variant) { + variants.add(variant); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(variants); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsResource.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsResource.java new file mode 100644 index 0000000..43b357b --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsResource.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IAdaptable; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsResource; + +public abstract class XdsResource implements IXdsResource, IAdaptable { + private final IXdsProject xdsProject; + private final IXdsContainer parent; + private final IResource resource; + + public XdsResource(IXdsProject xdsProject, IXdsContainer parent, IResource resource) { + this.xdsProject = xdsProject; + this.parent = parent; + this.resource = resource; + } + + @Override + public IXdsProject getXdsProject() { + return xdsProject; + } + + @Override + public String getElementName() { + return resource.getName(); + } + + @Override + public IXdsContainer getParent() { + return parent; + } + + @Override + public IResource getResource() { + return resource; + } + + @Override + public void resourceChanged() { + } + + @Override + public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + return XdsElementCommons.adaptToResource(this, adapter); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSdkLibraryContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSdkLibraryContainer.java new file mode 100644 index 0000000..5dbfd09 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSdkLibraryContainer.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsSdkLibraryContainer; + +public class XdsSdkLibraryContainer extends XdsVirtualContainer + implements IXdsSdkLibraryContainer +{ + public XdsSdkLibraryContainer( IXdsProject xdsProject + , String name, String path + , IXdsContainer parent + , List children ) + { + super(xdsProject, name, path, parent, children); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSet.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSet.java new file mode 100644 index 0000000..37c5bf9 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSet.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsSetElement; +import com.excelsior.xds.core.model.IXdsSetType; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; + +public class XdsSet extends SimpleXdsElementWithSymbol implements + IXdsSetType { + + private final List setElements = new ArrayList(); + + public XdsSet(String name, IXdsProject project, + XdsCompilationUnit compilationUnit, IXdsContainer parent, + IModulaSymbolReference symbolRef, + SourceBinding sourceBinding) { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(setElements, IXdsElement.class); + } + + public synchronized void addSetElement(IXdsSetElement e) { + setElements.add(e); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSetElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSetElement.java new file mode 100644 index 0000000..027bb70 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSetElement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsSetElement; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsSetElement extends SimpleXdsElementWithSymbol implements + IXdsSetElement { + + public XdsSetElement(String name, IXdsProject project, + XdsCompilationUnit compilationUnit, IXdsContainer parent, + IModulaSymbolReference symbolRef, + SourceBinding sourceBinding) { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSymbolFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSymbolFile.java new file mode 100644 index 0000000..e6dfc1a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsSymbolFile.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsSymbolFile; + +public class XdsSymbolFile extends XdsWorkspaceCompilationUnit + implements IXdsSymbolFile +{ + public XdsSymbolFile( IXdsProject xdsProject, IResource resource + , IXdsContainer parent ) + { + super(xdsProject, resource, parent); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsTextFile.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsTextFile.java new file mode 100644 index 0000000..2ea19cb --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsTextFile.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; + +public class XdsTextFile extends XdsResource { + + public XdsTextFile(IXdsProject xdsProject, IResource resource, IXdsContainer parent) { + super(xdsProject, parent, resource); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsType.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsType.java new file mode 100644 index 0000000..5deac7e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsType.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsType; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class XdsType extends XdsElementWithDefinitions implements IXdsType { + private final IModulaSymbolReference symbolRef; + + public XdsType(IXdsProject xdsProject, IXdsCompilationUnit compilationUnit, IXdsContainer parent, String elementName, IModulaSymbolReference symbolRef, SourceBinding sourceBinding) { + super(xdsProject, compilationUnit, parent, elementName, sourceBinding); + + this.symbolRef = symbolRef; + } + + @Override + public ITypeSymbol getSymbol() { + return ReferenceUtils.resolve(symbolRef); + } + + @Override + public String getElementName() { + ITypeSymbol symbol = getSymbol(); + return symbol != null? symbol.getName() : super.getElementName(); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportContainer.java new file mode 100644 index 0000000..f7134d9 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportContainer.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.core.model.internal; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsImportElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsUnqualifiedImportContainer; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class XdsUnqualifiedImportContainer extends SourceBoundXdsElement + implements IXdsUnqualifiedImportContainer +{ + private final List importedElements = new ArrayList(); + + public XdsUnqualifiedImportContainer(String name, IXdsProject project, IXdsContainer parent, SourceBinding sourceBinding) { + super(name, project, parent, sourceBinding); + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(importedElements, IXdsElement.class); + } + + public synchronized void addImportedElement(IXdsImportElement e) { + importedElements.add(e); + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportElement.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportElement.java new file mode 100644 index 0000000..8b8befc --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsUnqualifiedImportElement.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsUnqualifiedImportElement; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsUnqualifiedImportElement extends SimpleXdsElementWithSymbol implements + IXdsUnqualifiedImportElement { + public XdsUnqualifiedImportElement(String name, IXdsProject project, XdsCompilationUnit compilationUnit, IXdsContainer parent, IModulaSymbolReference symbolRef, SourceBinding sourceBinding) { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVariable.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVariable.java new file mode 100644 index 0000000..e26a8b9 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVariable.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.core.model.internal; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsVariable; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class XdsVariable extends XdsElementWithAnonymusCompositeType + implements IXdsVariable +{ + public XdsVariable( IXdsProject project, XdsCompilationUnit compilationUnit + , String name, IXdsContainer parent + , IModulaSymbolReference symbolRef, SourceBinding sourceBinding ) + { + super(name, project, compilationUnit, parent, symbolRef, sourceBinding); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVirtualContainer.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVirtualContainer.java new file mode 100644 index 0000000..4af4462 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsVirtualContainer.java @@ -0,0 +1,142 @@ +package com.excelsior.xds.core.model.internal; + +import java.io.File; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.mapping.ResourceMapping; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.utils.XdsElementUtils; +import com.excelsior.xds.core.resource.IResourceAccess; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +/** + * Logical grouping of xds elements - doesnot corresponds to any physical folder + * @author lsa80 + */ +public class XdsVirtualContainer implements IXdsContainer, IAdaptable { + private final IXdsProject xdsProject; + private String name; + private IXdsContainer parent; + private List children; + private final String path; + private IResource resource; + + public XdsVirtualContainer(IXdsProject xdsProject, String name, String path, IXdsContainer parent, List children) { + this.xdsProject = xdsProject; + this.name = name; + this.path = path; + this.parent = parent; + this.children = children; + } + + @Override + public IXdsProject getXdsProject() { + return xdsProject; + } + + @Override + public String getElementName() { + return name; + } + + public void setElementName(String name) { + this.name = name; + } + + public String getPath() { + return path; + } + + @Override + public synchronized IXdsContainer getParent() { + return parent; + } + + public synchronized void setParent(IXdsContainer parent) { + this.parent = parent; + } + + public synchronized void setResource(IResource resource) { + this.resource = resource; + } + + @Override + public synchronized Collection getChildren() { + return CollectionsUtils.unmodifiableArrayList(children); + } + + public synchronized void addChild(IXdsElement child) { + children.add(child); + } + + public synchronized void removeChild(IXdsElement child) { + children.remove(child); + } + + @Override + public String toString() { + return "XdsVirtualContainer [path=" + path + ", resource=" + resource //$NON-NLS-1$ //$NON-NLS-2$ + + "]"; //$NON-NLS-1$ + } + + @Override + public synchronized Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) { + Object adapted = XdsElementCommons.adaptToResource(new IResourceAccess() { + @Override + public IResource getResource() throws CoreException { + return resource; + } + }, adapter); + if (adapted != null){ + return adapted; + } + + if (ResourceMapping.class.equals(adapter)) { + return XdsElementUtils.createResourceMappingFrom(children, this); + } + else if (File.class.equals(adapter)) { + return new File(getPath()); // TODO : convert path to java.io.File + } + + return null; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((name == null) ? 0 : name.hashCode()); + result = prime * result + + ((xdsProject == null) ? 0 : xdsProject.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + XdsVirtualContainer other = (XdsVirtualContainer) obj; + if (name == null) { + if (other.name != null) + return false; + } else if (!name.equals(other.name)) + return false; + if (xdsProject == null) { + if (other.xdsProject != null) + return false; + } else if (!xdsProject.equals(other.xdsProject)) + return false; + return true; + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsWorkspaceCompilationUnit.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsWorkspaceCompilationUnit.java new file mode 100644 index 0000000..787a11c --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/XdsWorkspaceCompilationUnit.java @@ -0,0 +1,116 @@ +package com.excelsior.xds.core.model.internal; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.CompilationUnitType; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsWorkspaceCompilationUnit; +import com.excelsior.xds.core.resource.ResourceUtils; + +public class XdsWorkspaceCompilationUnit extends XdsCompilationUnit implements + IXdsWorkspaceCompilationUnit, IAdaptable { + + protected IResource resource; + + public XdsWorkspaceCompilationUnit(IXdsProject xdsProject, IResource resource, IXdsContainer parent) { + super(xdsProject, parent); + this.resource = resource; + } + + @Override + public synchronized boolean isInCompilationSet() { + String projectName = resource.getProject().getName(); + String path = null; + try { + path = ResourceUtils.getAbsolutePath(getAbsoluteFile()); + } catch (CoreException e) { + LogHelper.logError(e); + } + return CompilationSetManager.getInstance().isInCompilationSet(projectName, path); + } + + @Override + public synchronized String getElementName() { + return resource.getName(); + } + + @Override + public synchronized IResource getResource() { + return resource; + } + + public synchronized void setResource(IResource resource) { + this.resource = resource; + } + + @Override + public void resourceChanged() { + } + + @Override + public IFileStore getAbsoluteFile() { + return ResourceUtils.toFileStore(getResource()); + } + + @Override + public CompilationUnitType getCompilationUnitType() { + return determineCompilationUnitType(getResource().getName()); + } + + /** + * {@inheritDoc} + */ + @Override + @SuppressWarnings("rawtypes") + public Object getAdapter(Class adapter) { + return XdsElementCommons.adaptToResource(this, adapter); + } + + /* + * Debug only + */ + @Override + public synchronized String toString() { + return "XdsWorkspaceCompilationUnit:" + resource; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((resource == null) ? 0 : resource.hashCode()); + result = prime * result + + ((getXdsProject() == null) ? 0 : getXdsProject().hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + XdsWorkspaceCompilationUnit other = (XdsWorkspaceCompilationUnit) obj; + if (resource == null) { + if (other.resource != null) + return false; + } else if (!resource.equals(other.resource)) + return false; + if (getXdsProject() == null) { + if (other.getXdsProject() != null) + return false; + } else if (!getXdsProject().equals(other.getXdsProject())) + return false; + return true; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/buildlistener/BuildListener.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/buildlistener/BuildListener.java new file mode 100644 index 0000000..bd0c515 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/buildlistener/BuildListener.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.core.model.internal.buildlistener; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.builder.listener.IBuilderListener; +import com.excelsior.xds.core.builders.XdsBuildResult; +import com.excelsior.xds.core.model.XdsModelManager; + +public class BuildListener implements IBuilderListener { + public BuildListener() { + } + + @Override + public void onBuildStarted(IProject p) { + } + + @Override + public void onBuildFinished(IProject p, XdsBuildResult buildRes) { + XdsModelManager.refreshProject(p); + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/Messages.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/Messages.java new file mode 100644 index 0000000..14b671a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/Messages.java @@ -0,0 +1,102 @@ +package com.excelsior.xds.core.model.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.core.model.internal.nls.messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object }); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + public static String ConsoleType_XDS_Tool; + public static String Activator_LinkingExtFilesToResources; + public static String ExternalResourceManager_LinkingSdkFilesToResources; + public static String NewProjectCreator_BuildingProject; + public static String NewProjectCreator_CantCreateDir; + public static String NewProjectCreator_CantNoSdk; + public static String NewProjectCreator_CreatePrjFromScratch; + public static String NewProjectCreator_DoYouWantToContinue; + public static String NewProjectCreator_ErrReadingTpl; + public static String NewProjectCreator_ErrWritingFile; + public static String NewProjectCreator_ProjDirEmpty; + public static String NewProjectCreator_ProjectWord; + public static String NewProjectCreator_RedirectionWord; + public static String NewProjectCreator_TheDirIsFile; + public static String NewProjectCreator_TheFollowingProblems; + public static String SdkIniFileWriter_ComentDefTmdPath; + public static String SdkIniFileWriter_ComentDirsList0; + public static String SdkIniFileWriter_ComentDirsList1; + public static String SdkIniFileWriter_ComentPrimExts0; + public static String SdkIniFileWriter_ComentPrimExts1; + public static String SdkIniFileWriter_ComentExeExt; + public static String SdkIniFileWriter_ComentLibPath0; + public static String SdkIniFileWriter_ComentLibPath1; + public static String SdkIniFileWriter_ComentMainComponents; + public static String SdkIniFileWriter_ComentMainTmdPath; + public static String SdkIniFileWriter_ComentManifestPath; + public static String SdkIniFileWriter_ComentModulesTmdPath; + public static String SdkIniFileWriter_ComentSdkName; + public static String SdkIniFileWriter_ComentSimulatorPath; + public static String SdkIniFileWriter_ComentTemptates; + public static String SdkIniFileWriter_ComentToolArgs; + public static String SdkIniFileWriter_ComentToolEnvNars0; + public static String SdkIniFileWriter_ComentToolEnvVars1; + public static String SdkIniFileWriter_ComentToolEnvVars2; + public static String SdkIniFileWriter_ComentToolFileExtList0; + public static String SdkIniFileWriter_ComentToolFileExtList1; + public static String SdkIniFileWriter_ComentToolFor; + public static String SdkIniFileWriter_ComentToolLocation; + public static String SdkIniFileWriter_ComentToolMenuOff0; + public static String SdkIniFileWriter_ComentToolMenuOff1; + public static String SdkIniFileWriter_ComentToolMenuOn0; + public static String SdkIniFileWriter_ComentToolMenuOn1; + public static String SdkIniFileWriter_ComentToolName; + public static String SdkIniFileWriter_ComentToolSourceRoot1; + public static String SdkIniFileWriter_ComentToolSourceRoot2; + public static String SdkIniFileWriter_ComentTools; + public static String SdkIniFileWriter_ComentToolWorkDir; + public static String SdkIniFileWriter_ComentTprPath; + public static String SdkIniFileWriter_ComentTrdPath; + public static String SdkIniFileWriter_ComentXcPath; + public static String SdkIniFileWriter_ComentXdPath; + public static String SdkIniFileWriter_CommentToolGroup0; + public static String SdkIniFileWriter_CommentToolGroup1; + public static String SdkIniFileWriter_SeparatorLine; + public static String Tool_InvalidToolLocation; + public static String Tool_InvalidToolName; + public static String Tool_InvalidToolWorkDir; + public static String Tool_InvalidToolWorkDir_BadVars; + public static String XdsProject_ExternalDependencies; + public static String XdsProject_SdkLibrary; + public static String XdsProjectSettings_CantDetermineDefaultDir; + public static String XdsProjectSettings_CantDetermineWorkDir; + public static String XdsProjectSettings_InvalidWorkDir; + public static String XdsProjectSettings_InvalidWorkDir2; + public static String XdsProjectSettings_WrongWorkDir; + public static String XTool_BadWorkDir; + public static String XTool_ToolFileNotFound; + public static String XTool_ToolTerminated; + + public static String XdsImportSection_Name; + public static String XdsRecordVariantSelector_Name; + public static String XdsRecordVariant_Name; + + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + // Not for instantiation + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/messages.properties b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/messages.properties new file mode 100644 index 0000000..85d7d5e --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/nls/messages.properties @@ -0,0 +1,84 @@ +ConsoleType_XDS_Tool=XDS Tool + +Activator_LinkingExtFilesToResources=Linking external files to resources +ExternalResourceManager_LinkingSdkFilesToResources=Linking SDK Library files to resources +NewProjectCreator_BuildingProject=Building project +NewProjectCreator_CantCreateDir=Can't create directory +NewProjectCreator_CantNoSdk=Can't create project: SDK is not specified and no active SDK selected. +NewProjectCreator_CreatePrjFromScratch=Create project from scratch +NewProjectCreator_DoYouWantToContinue=Do you want to continue? +NewProjectCreator_ErrReadingTpl=Error reading %s template file resource.\nThe %s will not be created.\n +NewProjectCreator_ErrWritingFile=Error writing file ' +NewProjectCreator_ProjDirEmpty=Project directory is not empty. Do you want to create new project files in this directory? +NewProjectCreator_ProjectWord=project +NewProjectCreator_RedirectionWord=redirection +NewProjectCreator_TheDirIsFile=The specified project directory name matches a name of already existing file +NewProjectCreator_TheFollowingProblems=The following problem(s) occurred:\n\n + +SdkIniFileWriter_ComentSdkName=\# SDK name + +SdkIniFileWriter_ComentMainComponents=\# Primary components of development system +SdkIniFileWriter_ComentXcPath=\# Part to the compiler +SdkIniFileWriter_ComentXdPath=\# Part to the debugger +SdkIniFileWriter_ComentSimulatorPath=\# Part to the simulator + +SdkIniFileWriter_ComentLibPath0=\# Path to the directory with definitions files of SDK libraries +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# The executable files extension +SdkIniFileWriter_ComentPrimExts0=\# The list of files extensions separated by semicolon (;), +SdkIniFileWriter_ComentPrimExts1=\# which will be shown in the Project Explorer by default +SdkIniFileWriter_ComentManifestPath=\# Path to the update manifest file + +SdkIniFileWriter_ComentTemptates=\# Templates of new modules and projects +SdkIniFileWriter_ComentMainTmdPath=\# Path to a template of main modules (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# Path to a template of definition modules (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# Path to a template of implementation modules (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# The list of directories names separated by semicolon (;), +SdkIniFileWriter_ComentDirsList1=\# which will be automatically created for new projects +SdkIniFileWriter_ComentTrdPath=\# Path to a template of redirection file (*.trd) +SdkIniFileWriter_ComentTprPath=\# Path to a template of XDS project file (*.tpr) + +SdkIniFileWriter_ComentTools=\# SDK Tools Definition +SdkIniFileWriter_ComentToolName=\# SDK tool name +SdkIniFileWriter_ComentToolLocation=\# Path to the SDK tool + +SdkIniFileWriter_ComentToolMenuOn0=\# Tools menu item caption to invoke the SDK tool +SdkIniFileWriter_ComentToolMenuOn1=\# +SdkIniFileWriter_ComentToolMenuOff0=\# Tools menu item caption when the SDK tool is unavailable +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# The list of files extensions separated by semicolon (;), +SdkIniFileWriter_ComentToolFileExtList1=\# for which the SDK tool is available + +SdkIniFileWriter_ComentToolSourceRoot1=\# The type of source code roots, for which the SDK tool is available +SdkIniFileWriter_ComentToolSourceRoot2= + +SdkIniFileWriter_ComentToolArgs=\# SDK tool command line arguments +SdkIniFileWriter_ComentToolFor=\# when +SdkIniFileWriter_ComentToolWorkDir=\# SDK tool working directory + +SdkIniFileWriter_ComentToolEnvNars0=\# Additional Environment Variables. +SdkIniFileWriter_ComentToolEnvVars1=\# These variables will completely replace native environment variables +SdkIniFileWriter_ComentToolEnvVars2=\# which have the same names. +SdkIniFileWriter_CommentToolGroup0=\# Tool menu item group (or an empty string) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=Invalid tool location +Tool_InvalidToolName=Invalid tool name +Tool_InvalidToolWorkDir=Invalid working directory - incorrect concrete working dir path +Tool_InvalidToolWorkDir_BadVars=Invalid working directory - unknown substitution variables +XdsProject_ExternalDependencies=External Dependencies +XdsProject_SdkLibrary=SDK Library +XdsProjectSettings_CantDetermineDefaultDir=Can't determine default Modula-2 compiler working directory +XdsProjectSettings_CantDetermineWorkDir=Can't determine Modula-2 compiler working directory, it should be specified in the Project properties +XdsProjectSettings_InvalidWorkDir=Invalid Modula-2 compiler working directory " +XdsProjectSettings_InvalidWorkDir2=" specified in the Project properties +XdsProjectSettings_WrongWorkDir=Wrong Modula-2 compiler working directory specified in the Project properties +XTool_BadWorkDir=Incorrect working directory: ' +XTool_ToolFileNotFound=Tool file not found: ' +XTool_ToolTerminated=[Tool execution terminated] + +XdsImportSection_Name=import list +XdsRecordVariantSelector_Name=variant record +XdsRecordVariant_Name=variant diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/resources/mapping/SimpleResourceMapping.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/resources/mapping/SimpleResourceMapping.java new file mode 100644 index 0000000..7e35b62 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/internal/resources/mapping/SimpleResourceMapping.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.core.model.internal.resources.mapping; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.mapping.ResourceMapping; +import org.eclipse.core.resources.mapping.ResourceMappingContext; +import org.eclipse.core.resources.mapping.ResourceTraversal; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; + +import com.excelsior.xds.core.model.plugin.ModelPlugin; + +public class SimpleResourceMapping extends ResourceMapping { + private final Object element; + private final IResource r; + + public SimpleResourceMapping(Object element, IResource r) { + this.element = element; + this.r = r; + } + + @Override + public Object getModelObject() { + return element; + } + + @Override + public String getModelProviderId() { + return ModelPlugin.PLUGIN_ID; + } + + @Override + public IProject[] getProjects() { + return new IProject[]{r.getProject()}; + } + + @Override + public ResourceTraversal[] getTraversals( + ResourceMappingContext context, + IProgressMonitor monitor) throws CoreException { + return new ResourceTraversal[]{new ResourceTraversal(new IResource[]{r}, IResource.DEPTH_ONE, IResource.NONE)}; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/plugin/ModelPlugin.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/plugin/ModelPlugin.java new file mode 100644 index 0000000..efcb0e1 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/plugin/ModelPlugin.java @@ -0,0 +1,120 @@ +package com.excelsior.xds.core.model.plugin; + +import java.io.File; +import java.util.List; +import java.util.concurrent.CountDownLatch; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.compiler.compset.ExternalResourceManager; +import com.excelsior.xds.core.jobs.IJobListener; +import com.excelsior.xds.core.jobs.ListenableJob; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.model.internal.nls.Messages; +import com.excelsior.xds.core.progress.DelegatingProgressMonitor; +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * The activator class controls the plug-in life cycle + */ +public class ModelPlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.core.model"; //$NON-NLS-1$ + + // The shared instance + private static ModelPlugin plugin; + + /** + * The constructor + */ + public ModelPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + + List projects = ProjectUtils.getXdsProjects(); + final CountDownLatch latch = new CountDownLatch(projects.size()); + + for (final IProject p : projects) { + ResourceUtils.scheduleWorkspaceRunnable(new IWorkspaceRunnable() { + @Override + public void run(IProgressMonitor monitor) throws CoreException { + try{ + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(p); + List lookupDirs = buildSettings.getLookupDirs(); + ExternalResourceManager.linkExternals(p, lookupDirs, true, true, monitor); + } + finally{ + latch.countDown(); + } + } + }, p, Messages.Activator_LinkingExtFilesToResources, null, false); + } + + new ListenableJob("Refreshing model") { + @Override + protected IStatus run(IProgressMonitor monitor) { + try { + latch.await(); + DelegatingProgressMonitor listenableMonitor = DelegatingProgressMonitor.wrap(monitor); + // add cancelation listener to explicitly cancel the listenable monitor. + addListener(new IJobListener() { + @Override + public void canceled() { + listenableMonitor.setCanceled(true); + } + }); + + for (IProject p : projects) { + XdsModelManager.refreshExternals(p); + + if (CompilationSetManager.getInstance().updateCompilationSet(p, null, listenableMonitor)) { + XdsModelManager.getInstance().enqueProjectForDecoratorRefresh(p); + } + } + } catch (InterruptedException e1) { + LogHelper.logError(e1); + } + return Status.OK_STATUS; + } + }.schedule(); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static ModelPlugin getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/IVisitOperation.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/IVisitOperation.java new file mode 100644 index 0000000..368308a --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/IVisitOperation.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.model.utils; + +import com.excelsior.xds.core.model.IXdsElement; + +public interface IVisitOperation { + void execute(IXdsElement xdsElement); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/TraverseUtils.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/TraverseUtils.java new file mode 100644 index 0000000..40ff8d1 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/TraverseUtils.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.model.utils; + +import java.util.Collection; + +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; + +public abstract class TraverseUtils +{ + public static void walk(IXdsElement xdsElement, IVisitOperation operation) { + operation.execute(xdsElement); + if (xdsElement instanceof IXdsContainer) { + Collection children = ((IXdsContainer) xdsElement).getChildren(); + for (IXdsElement child : children) { + walk(child, operation); + } + } + } +} diff --git a/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/XdsElementUtils.java b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/XdsElementUtils.java new file mode 100644 index 0000000..e9e39f2 --- /dev/null +++ b/product/com.excelsior.xds.core.model/src/com/excelsior/xds/core/model/utils/XdsElementUtils.java @@ -0,0 +1,181 @@ +package com.excelsior.xds.core.model.utils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.mapping.CompositeResourceMapping; +import org.eclipse.core.resources.mapping.ResourceMapping; +import org.eclipse.ui.ide.ResourceUtil; + +import com.excelsior.xds.core.model.ISourceBound; +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsExternalDependenciesContainer; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsResource; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.model.internal.XdsElementCommons; +import com.excelsior.xds.core.model.internal.resources.mapping.SimpleResourceMapping; +import com.excelsior.xds.core.model.plugin.ModelPlugin; +import com.excelsior.xds.core.resource.IResourceAccess; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.parser.modula.ast.ModulaAst; + +public final class XdsElementUtils +{ + public static ResourceMapping createResourceMappingFrom(Collection elements, IXdsElement modelObject) { + List resourceMappings = new ArrayList(); + for (final Object element : elements) { + final IResource r = (IResource) ResourceUtil.getAdapter(element, IResource.class, false); + ResourceMapping resourceMapping; + if (r != null) { + resourceMapping = new SimpleResourceMapping(element, r); + } + else{ + resourceMapping = (ResourceMapping) ResourceUtil.getAdapter(element, ResourceMapping.class, false); + } + + if (resourceMapping != null) { + resourceMappings.add(resourceMapping); + } + } + return new CompositeResourceMapping(ModelPlugin.PLUGIN_ID, modelObject, resourceMappings.toArray(new ResourceMapping[]{})); + } + + public static IXdsElement findBottomostChildCoveringPosition( IXdsElement xdsElement + , int pos ) + { + if (!(xdsElement instanceof ISourceBound)) { + return null; + } + ISourceBound sourceBound = (ISourceBound) xdsElement; + if (!isContainsPosition(sourceBound, pos)) + return null; + + IXdsElement thinnestChild = null; + int thinnestRangeSize = Integer.MAX_VALUE; + + Collection children = new ArrayList(); + if (xdsElement instanceof IXdsContainer) { + IXdsContainer xdsContainer = (IXdsContainer) xdsElement; + children = xdsContainer.getChildren(); + } + + for (IXdsElement child : children) { + if (child instanceof ISourceBound) { + ISourceBound childSourceBound = (ISourceBound) child; + ITextRegion elementRegion = childSourceBound.getSourceBinding().getElementRegion(); + if (elementRegion != null) { + int length = elementRegion.getLength(); + if (isContainsPosition(childSourceBound, pos) && length < thinnestRangeSize) + { + thinnestChild = child; + thinnestRangeSize = length; + } + } + } + } + + IXdsElement result = null; + if (thinnestChild != null) { + result = findBottomostChildCoveringPosition(thinnestChild, pos); + if (result == null) + result = thinnestChild; + } + + return result; + } + + private static boolean isContainsPosition(ISourceBound sourceBound, int pos) + { + SourceBinding sourceBinding = sourceBound.getSourceBinding(); + Collection elementRegions = sourceBinding.getElementRegions(); + for (ITextRegion textRegion : elementRegions) { + if ((textRegion != null) && textRegion.contains(pos)) { + return true; + } + } + return false; + } + + public static ModulaAst getModulaAst(IXdsElement xdsElement) { + if (xdsElement instanceof IXdsCompilationUnit) { + IXdsCompilationUnit compilationUnit = (IXdsCompilationUnit) xdsElement; + return compilationUnit.getModulaAst(); + } + return null; + } + + /** + * Checks whether there is a corresponding IXdsElement for the targetResource + * @param targetResource + * @param elements + * @return + */ + public static boolean isTargetResourceAffected(IResource targetResource, Collection elements) { + if (targetResource == null) { + return false; + } + + if (getElementWithResource(targetResource, elements) != null){ + return true; + } + + return false; + } + + /** + * Gets the corresponding IXdsElement for the targetResource + * @return + */ + public static IXdsElement getElementWithResource(IResource targetResource, Collection elements) { + if (targetResource != null) { + for (IXdsElement e : elements) { + if (e instanceof IXdsResource) { + IXdsResource er = (IXdsResource)e; + if (targetResource.equals(er.getResource())) { + return er; + } + } + } + } + return null; + } + + /** + * Returns all IXdsContainer`s which can contain user-editable source + * + */ + public static Collection getSourceRoots(IXdsProject xdsProject) { + Collection roots = new ArrayList(); + roots.add(xdsProject); + IXdsExternalDependenciesContainer externalDependenciesContainer = xdsProject.getXdsExternalDependenciesContainer(); + if (externalDependenciesContainer != null) { + Collection children = externalDependenciesContainer.getChildren(); + for (IXdsElement child : children) { + if (child instanceof IXdsContainer) { + IXdsContainer c = (IXdsContainer) child; + roots.add(c); + } + } + } + + return roots; + } + + public static IResource adaptToResource(IXdsElement e, Class adapter) { + if (e instanceof IResourceAccess) { + return XdsElementCommons.adaptToResource((IResourceAccess) e, adapter); + } + return null; + } + + /** + * Static methods only + */ + private XdsElementUtils(){ + } +} diff --git a/product/com.excelsior.xds.core.nl_ru/.classpath b/product/com.excelsior.xds.core.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.nl_ru/.project b/product/com.excelsior.xds.core.nl_ru/.project new file mode 100644 index 0000000..e8b10e3 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.core.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..c9ab2d7 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//src/com/excelsior/xds/core/internal/nls/messages_ru_1251.properties=CP1251 +encoding/plugin_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.core.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..e4bd50b --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.core.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.core;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.core.nl_ru/build.properties b/product/com.excelsior.xds.core.nl_ru/build.properties new file mode 100644 index 0000000..0bd483e --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment.properties,\ + fragment_ru.properties + diff --git a/product/com.excelsior.xds.core.nl_ru/fragment.properties b/product/com.excelsior.xds.core.nl_ru/fragment.properties new file mode 100644 index 0000000..7f698a8 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.core Russian NLS Support diff --git a/product/com.excelsior.xds.core.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.core.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..fdd2d3f --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.core diff --git a/product/com.excelsior.xds.core.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.core.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..28215ea --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.core diff --git a/product/com.excelsior.xds.core.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.core.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..1155e93 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/plugin_ru.properties @@ -0,0 +1,20 @@ +pluginName=\u042f\u0434\u0440\u043e \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c + +contentTypeName.xds=XDS +contentTypeName.xdsSource=\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypeName.mod=\u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c +contentTypeName.def=\u041c\u043e\u0434\u0443\u043b\u0430-2 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +contentTypeName.ob2=\u041e\u0431\u0435\u0440\u043e\u043d-2 \u043c\u043e\u0434\u0443\u043b\u044c +contentTypeName.odf=\u041e\u0431\u0435\u0440\u043e\u043d-2 \u043f\u0441\u0435\u0432\u0434\u043e-\u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +contentTypeName.sym=\u0421\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS + +contentTypeName.pkt=\u041f\u0430\u043a\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypeName.ldp=\u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypeName.res=\u0412\u044b\u0432\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS + +contentTypeName.prj=\u041f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypeName.text=\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypeName.html=HTML \u0444\u0430\u0439\u043b + +marker.build_problem.name = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 +marker.parser_problem.name = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 diff --git a/product/com.excelsior.xds.core.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.core.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..6d4228c --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,20 @@ +pluginName=ßäðî ñðåäû ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì + +contentTypeName.xds=XDS +contentTypeName.xdsSource=Èñõîäíûé ôàéë ñèñòåìû XDS +contentTypeName.mod=Ìîäóëà-2 ïðîãðàììíûé ìîäóëü +contentTypeName.def=Ìîäóëà-2 ìîäóëü îïðåäåëåíèé +contentTypeName.ob2=Îáåðîí-2 ìîäóëü +contentTypeName.odf=Îáåðîí-2 ïñåâäî-ìîäóëü îïðåäåëåíèé +contentTypeName.sym=Ñèìâîëüíûé ôàéë ñèñòåìû XDS + +contentTypeName.pkt=Ïàêåò îòëàäêè ñèñòåìû XDS +contentTypeName.ldp=Ãðóïïà ïàêåòîâ îòëàäêè ñèñòåìû XDS +contentTypeName.res=Âûâîä ïàêåòà îòëàäêè ñèñòåìû XDS + +contentTypeName.prj=Ïðîåêòíûé ôàéë ñèñòåìû XDS +contentTypeName.text=Òåêñòîâûé ôàéë ñèñòåìû XDS +contentTypeName.html=HTML ôàéë + +marker.build_problem.name = XDS Ìîäóëà-2 ïðîáëåìà êîìïèëÿöèè +marker.parser_problem.name = XDS Ìîäóëà-2 ïðîáëåìà èñõîäíîãî êîäà diff --git a/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru.properties b/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru.properties new file mode 100644 index 0000000..3d525d5 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru.properties @@ -0,0 +1,95 @@ +ConsoleType_XDS_Tool=XDS \u0423\u0442\u0438\u043b\u0438\u0442\u0430 + +Activator_LinkingExtFilesToResources=\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +CompileDriver_CompilerExitCode=XDS \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 +CompileDriver_CompilerWasTerminated=\u0420\u0430\u0431\u043e\u0442\u0430 XDS \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430 +ExternalResourceManager_LinkingSdkFilesToResources=\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 XDS \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +ExternalResourceManager_LinkingExternalFiles=\u0421\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +ExternalResourceManager_ErrorWhenLinkingExternalDirectory=\u041e\u0448\u0438\u0431\u043a\u0430 \u043f\u0440\u0438 \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u043d\u0438\u0438 \u0432\u043d\u0435\u0448\u043d\u0435\u0439 \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438 \u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430\u043c\u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u0430: %s +ExternalResourceManager_UpdateOfProblemMarkers=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 +NewProjectCreator_BuildingProject=\u0421\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +NewProjectCreator_CantCreateDir=\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +NewProjectCreator_CantNoSdk=\u041e\u0448\u0438\u0431\u043a\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043f\u0440\u043e\u0435\u043a\u0442\u0430: \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. +NewProjectCreator_CreatePrjFromScratch=\u0421\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u0440\u043e\u0435\u043a\u0442 +NewProjectCreator_DoYouWantToContinue=\u0412\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0445\u043e\u0442\u0438\u0442\u0435 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c? +NewProjectCreator_ErrReadingTpl=\u041e\u0448\u0438\u0431\u043a\u0430 \u0447\u0442\u0435\u043d\u0438\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 %s.\n\u0424\u0430\u0439\u043b %s \u043d\u0435 \u0441\u043e\u0437\u0434\u0430\u043d.\n +NewProjectCreator_ErrWritingFile=\u041e\u0448\u0438\u0431\u043a\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \u0444\u0430\u0439\u043b\u0430 ' +NewProjectCreator_ProjDirEmpty=\u041a\u0430\u0442\u0430\u043b\u043e\u0433 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043d\u0435 \u043f\u0443\u0441\u0442.\n\u0412\u044b \u0445\u043e\u0442\u0438\u0442\u0435 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0432 \u044d\u0442\u043e\u043c \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435? +NewProjectCreator_ProjectWord=\u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 +NewProjectCreator_RedirectionWord=\u0444\u0430\u0439\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 +NewProjectCreator_TheDirIsFile=\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0435 \u0438\u043c\u044f \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0444\u0430\u0439\u043b\u0430 +NewProjectCreator_TheFollowingProblems=\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b:\n\n + +SdkIniFileWriter_ComentSdkName=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f + +SdkIniFileWriter_ComentMainComponents=\# \u041e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f +SdkIniFileWriter_ComentXcPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +SdkIniFileWriter_ComentXdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 +SdkIniFileWriter_ComentProfilerPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 +SdkIniFileWriter_ComentSimulatorPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0430\u0442\u043e\u0440\u0430 + +SdkIniFileWriter_ComentLibPath0=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0438, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439 \u0444\u0430\u0439\u043b\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 +SdkIniFileWriter_ComentPrimExts0=\# \u0420\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432 Project Explorer +SdkIniFileWriter_ComentPrimExts1= +SdkIniFileWriter_ComentManifestPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 c \u043c\u0430\u043d\u0438\u0444\u0435\u0441\u0442\u043e\u043c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439 + +SdkIniFileWriter_ComentTemptates=\# \u0428\u0430\u0431\u043b\u043e\u043d\u044b \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0438 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 +SdkIniFileWriter_ComentMainTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# \u0421\u043f\u0438\u0441\u043e\u043a \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u0439, \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u0447\u0435\u0440\u0435\u0437 \u0441\u0438\u043c\u0432\u043e\u043b ";", \u043a\u043e\u0442\u043e\u0440\u044b\u0435 +SdkIniFileWriter_ComentDirsList1=\# \u0431\u0443\u0434\u0443\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u044b \u0434\u043b\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +SdkIniFileWriter_ComentPrjFolder=\# \u041f\u0430\u043f\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 +SdkIniFileWriter_ComentMainFolder=\# \u041f\u0430\u043f\u043a\u0430 \u0433\u043b\u0430\u0432\u043d\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f +SdkIniFileWriter_ComentTrdPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043d\u043e\u0432\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u043f\u0435\u0440\u0435\u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 (*.trd) +SdkIniFileWriter_ComentTprPath=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 (*.tpr) + +SdkIniFileWriter_ComentTools=\# \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b +SdkIniFileWriter_ComentToolName=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +SdkIniFileWriter_ComentToolLocation=\# \u041f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 + +SdkIniFileWriter_ComentToolMenuOn0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +SdkIniFileWriter_ComentToolMenuOn1= +SdkIniFileWriter_ComentToolMenuOff0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043f\u0443\u043d\u043a\u0442\u0430 \u043c\u0435\u043d\u044e, \u043a\u043e\u0433\u0434\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# \u0421\u043f\u0438\u0441\u043e\u043a \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432, \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c ";", +SdkIniFileWriter_ComentToolFileExtList1=\# \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. + +SdkIniFileWriter_ComentToolSourceRoot1=\# \u0422\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432 \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442. +SdkIniFileWriter_ComentToolSourceRoot2=\# \u0422\u0438\u043f \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u043e \u0442\u0438\u043f\u0443 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430: + +SdkIniFileWriter_ComentToolArgs=\# \u0410\u0440\u0433\u0443\u043c\u0435\u043d\u0442\u044b \u043a\u043e\u043c\u0430\u043d\u0434\u043d\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438 +SdkIniFileWriter_ComentToolFor=\# \u0434\u043b\u044f +SdkIniFileWriter_ComentToolWorkDir=\# \u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 + +SdkIniFileWriter_ComentToolEnvNars0=\# \u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f. +SdkIniFileWriter_ComentToolEnvVars1=\# \u0414\u0430\u043d\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0437\u0430\u043c\u0435\u043d\u044f\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0436\u0435 \u0438\u043c\u0435\u043d\u0430\u043c\u0438. +SdkIniFileWriter_ComentToolEnvVars2= +SdkIniFileWriter_CommentToolCodepage0=\# \u041a\u043e\u0434\u043e\u0432\u0430\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0434\u043b\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 (Cp866, Cp1251, ...) +SdkIniFileWriter_CommentToolCodepage1=\# +SdkIniFileWriter_CommentToolGroup0=\# \u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0433\u0440\u0443\u043f\u043f\u044b (\u043f\u043e\u0434\u043c\u0435\u043d\u044e), \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 (\u0438\u043b\u0438 \u043f\u0443\u0441\u0442\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +Tool_InvalidToolName=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 +Tool_InvalidToolWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 - \u0443\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +Tool_InvalidToolWorkDir_BadVars=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 - \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f +XdsProject_ExternalDependencies=\u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0417\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 +XdsProject_SdkLibrary=\u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0421\u0438\u0441\u0442\u0435\u043c\u044b \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f +XdsProjectSettings_CantDetermineDefaultDir=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e, \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +XdsProjectSettings_CantDetermineWorkDir=\u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u0423\u043a\u0430\u0436\u0438\u0442\u0435 \u0435\u0433\u043e \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430. +XdsProjectSettings_InvalidWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 " +XdsProjectSettings_InvalidWorkDir2=" \u0443\u043a\u0430\u0437\u0430\u043d \u0432 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u0430\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 +XdsProjectSettings_WrongWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +XTool_BadWorkDir=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433: ' +XTool_ToolFileNotFound=\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d: ' +XTool_ToolTerminated=[\u0420\u0430\u0431\u043e\u0442\u0430 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u0430 \u043f\u0440\u0435\u043a\u0440\u0430\u0449\u0435\u043d\u0430] +BuilderUtils_DeleteMarkers=\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432... +BuilderUtils_BuildingProject=\u041f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430... +BuilderUtils_RefreshingCompilationSet=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432... +BuilderUtils_ReBuildingProjectAndRefreshingLibrary==\u041f\u0435\u0440\u0435\u0441\u0431\u043e\u0440\u043a\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0430 \u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438... +BuilderUtils_RefreshingCompilationSetAndRefreshingLibrary=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438... \ No newline at end of file diff --git a/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..eafa982 --- /dev/null +++ b/product/com.excelsior.xds.core.nl_ru/src/com/excelsior/xds/core/internal/nls/messages_ru_1251.properties @@ -0,0 +1,95 @@ +ConsoleType_XDS_Tool=XDS Óòèëèòà + +Activator_LinkingExtFilesToResources=Ñâÿçûâàíèå âíåøíèõ ôàéëîâ ñ ðåñóðñàìè ïðîåêòà +CompileDriver_CompilerExitCode=XDS êîìïèëÿòîð çàâåðøèë ðàáîòó ñ êîäîì âîçâðàòà +CompileDriver_CompilerWasTerminated=Ðàáîòà XDS êîìïèëÿòîðà áûëà ïðåêðàùåíà +ExternalResourceManager_LinkingSdkFilesToResources=Ñâÿçûâàíèå XDS áèáëèîòåêè ñ ðåñóðñàìè ïðîåêòà +ExternalResourceManager_LinkingExternalFiles=Ñâÿçûâàíèå âíåøíèõ ôàéëîâ ñ ðåñóðñàìè ïðîåêòà +ExternalResourceManager_ErrorWhenLinkingExternalDirectory=Îøèáêà ïðè ñâÿçûâàíèè âíåøíåé äèðåêòîðèè ñ ðåñóðñàìè ïðîåêòà: %s +ExternalResourceManager_UpdateOfProblemMarkers=Îáíîâëåíèå ìàðêåðîâ +NewProjectCreator_BuildingProject=Ñáîðêà ïðîåêòà +NewProjectCreator_CantCreateDir=Îøèáêà ñîçäàíèÿ êàòàëîãà +NewProjectCreator_CantNoSdk=Îøèáêà ñîçäàíèÿ ïðîåêòà: íå óêàçàíà ñèñòåìà ïðîãðàììèðîâàíèÿ. +NewProjectCreator_CreatePrjFromScratch=Ñîçäàòü ïðîåêò +NewProjectCreator_DoYouWantToContinue=Âû äåéñòâèòåëüíî õîòèòå ïðîäîëæèòü? +NewProjectCreator_ErrReadingTpl=Îøèáêà ÷òåíèÿ øàáëîíà %s.\nÔàéë %s íå ñîçäàí.\n +NewProjectCreator_ErrWritingFile=Îøèáêà çàïèñè ôàéëà ' +NewProjectCreator_ProjDirEmpty=Êàòàëîã ïðîåêòà íå ïóñò.\nÂû õîòèòå ñîçäàòü íîâûé ïðîåêò â ýòîì êàòàëîãå? +NewProjectCreator_ProjectWord=ïðîåêòíîãî ôàéëà +NewProjectCreator_RedirectionWord=ôàéëà ïåðåíàïðàâëåíèé +NewProjectCreator_TheDirIsFile=Óêàçàííîå èìÿ êàòàëîãà ñîâïàäàåò ñ èìåíåì óæå ñóùåñòâóþùåãî ôàéëà +NewProjectCreator_TheFollowingProblems=Îáíàðóæåíû ñëåäóþùèå ïðîáëåìû:\n\n + +SdkIniFileWriter_ComentSdkName=\# Íàçâàíèå ñèñòåìû ïðîãðàììèðîâàíèÿ + +SdkIniFileWriter_ComentMainComponents=\# Îñíîâíûå êîìïîíåíòû ñèñòåìû ïðîãðàììèðîâàíèÿ +SdkIniFileWriter_ComentXcPath=\# Ïóòü äî êîìïèëÿòîðà +SdkIniFileWriter_ComentXdPath=\# Ïóòü äî îòëàä÷èêà +SdkIniFileWriter_ComentProfilerPath=\# Ïóòü äî ïðîôèëèðîâùèêà +SdkIniFileWriter_ComentSimulatorPath=\# Ïóòü äî èíòåðïðåòàòîðà + +SdkIniFileWriter_ComentLibPath0=\# Ïóòü äî äèðåêòîðèè, ñîäåðæàùåé ôàéëû îïðåäåëåíèé ñòàíäàðòíîé áèáëèîòåêè +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# Ðàñøèðåíèå äëÿ èñïîëíÿåìûõ ôàéëîâ +SdkIniFileWriter_ComentPrimExts0=\# Ðàñøèðåíèÿ ôàéëîâ, êîòîðûå ñëåäóåò ïîêàçûâàòü â Project Explorer +SdkIniFileWriter_ComentPrimExts1= +SdkIniFileWriter_ComentManifestPath=\# Ïóòü äî ôàéëà c ìàíèôåñòîì îáíîâëåíèé + +SdkIniFileWriter_ComentTemptates=\# Øàáëîíû ñîçäàíèÿ íîâûõ ìîäóëåé è ïðîåêòîâ +SdkIniFileWriter_ComentMainTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ãëàâíîãî ìîäóëÿ ðåàëèçàöèè (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ìîäóëåé îïðåäåëåíèé (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ ìîäóëåé ðåàëèçàöèè (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# Ñïèñîê äèðåêòîðèé, ïåðå÷èñëåííûõ ÷åðåç ñèìâîë ";", êîòîðûå +SdkIniFileWriter_ComentDirsList1=\# áóäóò àâòîìàòè÷åñêè ñîçäàíû äëÿ íîâîãî ïðîåêòà +SdkIniFileWriter_ComentPrjFolder=\# Ïàïêà ïðîåêòíîãî ôàéëà +SdkIniFileWriter_ComentMainFolder=\# Ïàïêà ãëàâíîãî ìîäóëÿ +SdkIniFileWriter_ComentTrdPath=\# Ïóòü äî øàáëîíà ñîçäàíèÿ íîâîãî ôàéëà ïåðåíàïðàâëåíèé (*.trd) +SdkIniFileWriter_ComentTprPath=\# Ïóòü äî øàáëîíà ïðîåêòíîãî ôàéëà (*.tpr) + +SdkIniFileWriter_ComentTools=\# Äîïîëíèòåëüíûå èíñòðóìåíòû +SdkIniFileWriter_ComentToolName=\# Íàçâàíèå èíñòðóìåíòà +SdkIniFileWriter_ComentToolLocation=\# Ïóòü äî èíñòðóìåíòà + +SdkIniFileWriter_ComentToolMenuOn0=\# Íàçâàíèå ïóíêòà ìåíþ äëÿ çàïóñêà èíñòðóìåíòà +SdkIniFileWriter_ComentToolMenuOn1= +SdkIniFileWriter_ComentToolMenuOff0=\# Íàçâàíèå ïóíêòà ìåíþ, êîãäà èíñòðóìåíò íåäîñòóïåí äëÿ èñïîëüçîâàíèÿ +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# Ñïèñîê ðàñøèðåíèé ôàéëîâ, ðàçäåëåííûõ ñèìâîëîì ";", +SdkIniFileWriter_ComentToolFileExtList1=\# äëÿ êîòîðûõ ïðèìåíèì èíñòðóìåíò. + +SdkIniFileWriter_ComentToolSourceRoot1=\# Òèï ïðîåêòîâ äëÿ êîòîðûõ ïðèìåíèì èíñòðóìåíò. +SdkIniFileWriter_ComentToolSourceRoot2=\# Òèï ïðîåêòà îïðåäåëÿåòñÿ ïî òèïó êîðíåâîãî ýëåìåíòà èñõîäíîãî êîäà: + +SdkIniFileWriter_ComentToolArgs=\# Àðãóìåíòû êîìàíäíîé ñòðîêè +SdkIniFileWriter_ComentToolFor=\# äëÿ +SdkIniFileWriter_ComentToolWorkDir=\# Ðàáî÷èé êàòàëîã èíñòðóìåíòà + +SdkIniFileWriter_ComentToolEnvNars0=\# Äîïîëíèòåëüíûå ïåðåìåííûå îêðóæåíèÿ. +SdkIniFileWriter_ComentToolEnvVars1=\# Äàííûå ïåðåìåííûå ïîëíîñòüþ çàìåíÿò ïåðåìåííûìè îêðóæåíèÿ ñ òàêèìè æå èìåíàìè. +SdkIniFileWriter_ComentToolEnvVars2= +SdkIniFileWriter_CommentToolCodepage0=\# Êîäîâàÿ ñòðàíèöà êîíñîëè äëÿ èíñòðóìåíòà (Cp866, Cp1251, ...) +SdkIniFileWriter_CommentToolCodepage1=\# +SdkIniFileWriter_CommentToolGroup0=\# Íàçâàíèå ãðóïïû (ïîäìåíþ), ãäå ðàñïîëîæåí èíñòðóìåíò (èëè ïóñòàÿ ñòðîêà) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=Íåêîððåêòíûé ïóòü äî èíñòðóìåíòà +Tool_InvalidToolName=Íåêîððåêòíîå íàçâàíèå èíñòðóìåíòà +Tool_InvalidToolWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã - óêàçàí íåêîððåêòíûé ïóòü äî êàòàëîãà +Tool_InvalidToolWorkDir_BadVars=Íåêîððåêòíûé ðàáî÷èé êàòàëîã - èñïîëüçîâàíà íåèçâåñòíàÿ ïåðåìåííàÿ +XdsProject_ExternalDependencies=Âíåøíèå Çàâèñèìîñòè +XdsProject_SdkLibrary=Áèáëèîòåêà Ñèñòåìû Ïðîãðàììèðîâàíèÿ +XdsProjectSettings_CantDetermineDefaultDir=Íå óäàåòñÿ àâòîìàòè÷åñêè îïðåäåëèòü, èñïîëüçóåìûé ïî óìîë÷àíèþ, ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà +XdsProjectSettings_CantDetermineWorkDir=Íå óäàåòñÿ îïðåäåëèòü ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà. Óêàæèòå åãî â ñâîéñòâàõ ïðîåêòà. +XdsProjectSettings_InvalidWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà " +XdsProjectSettings_InvalidWorkDir2=" óêàçàí â ñâîéñòâàõ ïðîåêòà +XdsProjectSettings_WrongWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã Ìîäóëà-2 êîìïèëÿòîðà +XTool_BadWorkDir=Íåêîððåêòíûé ðàáî÷èé êàòàëîã: ' +XTool_ToolFileNotFound=Èíñòðóìåíò íå íàéäåí: ' +XTool_ToolTerminated=[Ðàáîòà èíñòðóìåíòà ïðåêðàùåíà] +BuilderUtils_DeleteMarkers=Óäàëåíèå ìàðêåðîâ... +BuilderUtils_BuildingProject=Ïåðåñáîðêà ïðîåêòà... +BuilderUtils_RefreshingCompilationSet=Îáíîâëåíèå ðååñòðà êîìïèëèðóåìûõ ôàéëîâ... +BuilderUtils_ReBuildingProjectAndRefreshingLibrary==Ïåðåñáîðêà ïðîåêòà è îáíîâëåíèå áèáëèîòåêè... +BuilderUtils_RefreshingCompilationSetAndRefreshingLibrary=Îáíîâëåíèå ðååñòðà êîìïèëèðóåìûõ ôàéëîâ è áèáëèîòåêè... \ No newline at end of file diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/.classpath b/product/com.excelsior.xds.core.refactoring.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/.project b/product/com.excelsior.xds.core.refactoring.nl_ru/.project new file mode 100644 index 0000000..9d8a7b6 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.refactoring.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.core.refactoring.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..274af79 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding//src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru_1251.properties=CP1251 diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.refactoring.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..3ca9179 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.core.refactoring.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.core.refactoring;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/build.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/build.properties new file mode 100644 index 0000000..e494b2c --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + plugin_ru.properties,\ + fragment_ru.properties + diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/fragment.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment.properties new file mode 100644 index 0000000..305e832 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.core.refactoring Russian NLS Support diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..5e3010a --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.core.refactoring diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..5d9c043 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.core.refactoring diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..ba96147 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0418\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..cb632eb --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Èíòåëëåêòóàëüíîå ðåäàêòèðîâàíèå XDS Ìîäóëà-2 ïðîãðàìì diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru.properties new file mode 100644 index 0000000..c1fb8fc --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru.properties @@ -0,0 +1,5 @@ +RenameRefactoringProcessor_Creatingchanges=\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 +RenameRefactoringProcessor_ErrorWhileComputingLocationsToRename=\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u043e \u0432\u0440\u0435\u043c\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0446\u0438\u0439 \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u044f +RenameRefactoringProcessor_Name=\u0420\u0435\u0444\u0430\u043a\u0442\u043e\u0440\u0438\u043d\u0433/\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 +RenameRefactoringProcessor_RenameModule=\u041f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c +RenameRefactoringProcessor_SymbolCannotBeRenamed=\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 diff --git a/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..1c2de66 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring.nl_ru/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages_ru_1251.properties @@ -0,0 +1,5 @@ +RenameRefactoringProcessor_Creatingchanges=Ñîçäàíèå èçìåíåíèé +RenameRefactoringProcessor_ErrorWhileComputingLocationsToRename=Îøèáêà âî âðåìÿ îïðåäåëåíèÿ ïîçèöèé äëÿ ïåðåèìåíîâàíèÿ +RenameRefactoringProcessor_Name=Ðåôàêòîðèíã/Ïåðåèìåíîâàíèå +RenameRefactoringProcessor_RenameModule=Ïåðåèìåíîâàòü ìîäóëü +RenameRefactoringProcessor_SymbolCannotBeRenamed=Íåâîçìîæíî ïåðåèìåíîâàòü ýòîò ýëåìåíò diff --git a/product/com.excelsior.xds.core.refactoring/.classpath b/product/com.excelsior.xds.core.refactoring/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.refactoring/.project b/product/com.excelsior.xds.core.refactoring/.project new file mode 100644 index 0000000..57bd567 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.refactoring + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.refactoring/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.refactoring/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c0baa35 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/META-INF/MANIFEST.MF @@ -0,0 +1,25 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.core.refactoring;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.core.refactoring.CoreRefactoringPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + com.excelsior.xds.core.search;bundle-version="1.7.0", + org.eclipse.ltk.core.refactoring, + com.excelsior.xds.core.model;bundle-version="1.7.0", + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.search, + org.eclipse.core.resources, + org.eclipse.ui.workbench, + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.jface.text, + org.apache.commons.io, + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + com.excelsior.xds.core.ide;bundle-version="1.7.0", + org.eclipse.core.filesystem;bundle-version="1.4.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.core.refactoring.rename diff --git a/product/com.excelsior.xds.core.refactoring/build.properties b/product/com.excelsior.xds.core.refactoring/build.properties new file mode 100644 index 0000000..af52e22 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties + diff --git a/product/com.excelsior.xds.core.refactoring/plugin.properties b/product/com.excelsior.xds.core.refactoring/plugin.properties new file mode 100644 index 0000000..d96b8e1 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Refactoring \ No newline at end of file diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/CoreRefactoringPlugin.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/CoreRefactoringPlugin.java new file mode 100644 index 0000000..1787277 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/CoreRefactoringPlugin.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.core.refactoring; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class CoreRefactoringPlugin implements BundleActivator { + + public static final String PLUGIN_ID = "com.excelsior.xds.core.refactoring"; + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + CoreRefactoringPlugin.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + CoreRefactoringPlugin.context = null; + } + +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoring.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoring.java new file mode 100644 index 0000000..19b2ef7 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoring.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.core.refactoring.rename; + +import org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring; + +public class RenameRefactoring extends ProcessorBasedRefactoring { + + private RenameRefactoringProcessor processor; + + public RenameRefactoring(RenameRefactoringProcessor processor) { + super(processor); + this.processor = processor; + } + + public RenameRefactoringProcessor getProcessor() { + return processor; + } +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringInfo.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringInfo.java new file mode 100644 index 0000000..ef6e747 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringInfo.java @@ -0,0 +1,54 @@ +package com.excelsior.xds.core.refactoring.rename; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public final class RenameRefactoringInfo { + private IProject project; // project being refactored + private String selectedIdentifier; + private IModulaSymbol symbolFromSelection; + private String newName; + private IFile activeIFile; + + public RenameRefactoringInfo(IFile activeIFile, String selectedIdentifier, + IModulaSymbol symbolFromSelection) { + this.activeIFile = activeIFile; + this.project = activeIFile.getProject(); + this.selectedIdentifier = selectedIdentifier; + this.symbolFromSelection = symbolFromSelection; + } + + public IProject getProject() { + return project; + } + + public IFile getActiveIFile() { + return activeIFile; + } + + public String getSelectedIdentifier() { + return selectedIdentifier; + } + + public IModulaSymbol getSymbolFromSelection() { + return symbolFromSelection; + } + + public void setSelectedIdentifier(String selectedIdentifier) { + this.selectedIdentifier = selectedIdentifier; + } + + public void setSymbolFromSelection(IModulaSymbol symbolFromSelection) { + this.symbolFromSelection = symbolFromSelection; + } + + public String getNewName() { + return newName; + } + + public void setNewName(String newName) { + this.newName = newName; + } +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringProcessor.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringProcessor.java new file mode 100644 index 0000000..0e8d099 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/RenameRefactoringProcessor.java @@ -0,0 +1,447 @@ +package com.excelsior.xds.core.refactoring.rename; + +import java.io.File; +import java.util.Collection; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.TreeSet; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +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.MultiStatus; +import org.eclipse.core.runtime.OperationCanceledException; +import org.eclipse.core.runtime.Path; +import org.eclipse.ltk.core.refactoring.Change; +import org.eclipse.ltk.core.refactoring.CompositeChange; +import org.eclipse.ltk.core.refactoring.NullChange; +import org.eclipse.ltk.core.refactoring.RefactoringChangeDescriptor; +import org.eclipse.ltk.core.refactoring.RefactoringCore; +import org.eclipse.ltk.core.refactoring.RefactoringDescriptor; +import org.eclipse.ltk.core.refactoring.RefactoringStatus; +import org.eclipse.ltk.core.refactoring.TextFileChange; +import org.eclipse.ltk.core.refactoring.participants.CheckConditionsContext; +import org.eclipse.ltk.core.refactoring.participants.IConditionChecker; +import org.eclipse.ltk.core.refactoring.participants.RefactoringParticipant; +import org.eclipse.ltk.core.refactoring.participants.RefactoringProcessor; +import org.eclipse.ltk.core.refactoring.participants.SharableParticipants; +import org.eclipse.ltk.core.refactoring.participants.ValidateEditChecker; +import org.eclipse.ltk.core.refactoring.resource.RenameResourceDescriptor; +import org.eclipse.search.ui.text.FileTextSearchScope; +import org.eclipse.text.edits.MultiTextEdit; +import org.eclipse.text.edits.ReplaceEdit; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.refactoring.CoreRefactoringPlugin; +import com.excelsior.xds.core.refactoring.rename.internal.nls.Messages; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.core.search.modula.ModulaSearchOperation; +import com.excelsior.xds.core.search.modula.ModulaSearchOperation.ISearchResultCollector; +import com.excelsior.xds.core.search.modula.ModulaSymbolMatch; +import com.excelsior.xds.core.search.modula.utils.ModulaSearchUtils; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.utils.BuilderUtils; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.parser.commons.symbol.IBlockSymbolTextBinding; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; + +public class RenameRefactoringProcessor extends RefactoringProcessor { + private final RenameRefactoringInfo renameRefactoringInfo; + private Map> ifile2SymbolMatches = new HashMap>(); + + public RenameRefactoringProcessor( + RenameRefactoringInfo renameRefactoringInfo) { + this.renameRefactoringInfo = renameRefactoringInfo; + } + + @Override + public Object[] getElements() { + return new Object[]{renameRefactoringInfo.getSymbolFromSelection().getName()}; + } + + @Override + public String getIdentifier() { + return getClass().getName(); + } + + @Override + public String getProcessorName() { + return Messages.RenameRefactoringProcessor_Name; + } + + @Override + public boolean isApplicable() throws CoreException { + return true; + } + + @Override + public RefactoringStatus checkInitialConditions(IProgressMonitor pm) + throws CoreException, OperationCanceledException { + RefactoringStatus result = new RefactoringStatus(); + IModulaSymbol symbol = renameRefactoringInfo.getSymbolFromSelection(); + if (symbol.isAttributeSet(SymbolAttribute.PERVASIVE) || symbol.isAttributeSet(SymbolAttribute.RECONSTRUCTED)) { + result.addFatalError(Messages.RenameRefactoringProcessor_SymbolCannotBeRenamed); + } + return result; + } + + @Override + public RefactoringStatus checkFinalConditions(IProgressMonitor monitor, + CheckConditionsContext context) throws CoreException, + OperationCanceledException { + RefactoringStatus refactoringStatus = findMatches(monitor, context); + return refactoringStatus; + } + + protected RefactoringStatus findMatches(IProgressMonitor monitor, + CheckConditionsContext context) { + ifile2SymbolMatches.clear(); + + + IModulaSymbol symbol = renameRefactoringInfo.getSymbolFromSelection(); + IFile activeIFile = renameRefactoringInfo.getActiveIFile(); + + if (symbol.isAttributeSet(SymbolAttribute.ALREADY_DEFINED)) { + if (symbol instanceof IBlockSymbolTextBinding) { + IBlockSymbolTextBinding binding = (IBlockSymbolTextBinding) symbol; + Collection nameTextRegions = binding.getNameTextRegions(); + for (ITextRegion textRegion : nameTextRegions) { + putMatchIfAbsent(new ModulaSymbolMatch(activeIFile, symbol, new TextPosition(-1, -1, textRegion.getOffset()))); + } + } + else { + putMatchIfAbsent(new ModulaSymbolMatch(activeIFile, symbol, symbol.getPosition())); + } + } + else { + SymbolModelManager.instance().waitUntilModelIsUpToDate(); + ModulaSearchInput m2SearchInput = new ModulaSearchInput(ResourceUtils.getProject(activeIFile)); + m2SearchInput.setLimitTo(ModulaSearchInput.LIMIT_TO_USAGES | ModulaSearchInput.LIMIT_TO_DECLARATIONS); + m2SearchInput.setSearchFor(ModulaSearchInput.SEARCH_FOR_ANY_ELEMENT); + m2SearchInput.setSearchInFlags(ModulaSearchInput.SEARCH_IN_ALL_SOURCES); + m2SearchInput.setSearchModifiers(ModulaSearchInput.MODIFIER_ALL_NAME_OCCURENCES); + IProject project = renameRefactoringInfo.getProject(); + m2SearchInput.setSearchScope(FileTextSearchScope.newSearchScope(new IResource[]{project}, new String[]{"*"}, false)); //$NON-NLS-1$ + m2SearchInput.setSearchFor(ModulaSearchUtils.getSearchForConstant(symbol)); + Set symbolQualifiedNames = ModulaSearchUtils.getSymbolQualifiedNames(symbol); + m2SearchInput.setSymbolQualifiedNames(symbolQualifiedNames); + + ISearchResultCollector searchResultCollector = new ISearchResultCollector() { + @Override + public void accept(Object objMatch) { + if (objMatch instanceof ModulaSymbolMatch) { + ModulaSymbolMatch match = (ModulaSymbolMatch)objMatch; + putMatchIfAbsent(match); + } + } + }; + ModulaSearchOperation op = new ModulaSearchOperation(m2SearchInput, searchResultCollector); + MultiStatus status = new MultiStatus(CoreRefactoringPlugin.PLUGIN_ID, IStatus.OK, Messages.RenameRefactoringProcessor_ErrorWhileComputingLocationsToRename, null); + op.execute(monitor, status); + + SymbolModelManager.instance().waitUntilModelIsUpToDate(); + + if (ifile2SymbolMatches.keySet().size() > 0) { + IConditionChecker checker = context.getChecker( ValidateEditChecker.class ); + ValidateEditChecker editChecker = ( ValidateEditChecker )checker; + editChecker.addFiles( ifile2SymbolMatches.keySet().toArray(new IFile[0]) ); + } + + monitor.done(); + } + + return new RefactoringStatus(); + } + + private void putMatchIfAbsent(ModulaSymbolMatch match) { + IFile matchIFile = match.getFile(); + try { + if (!ResourceUtils.getFileSystem(matchIFile.getLocationURI()).canWrite()) { + return; + } + } catch (CoreException e) { + LogHelper.logError(e); + return; + } + Set matches = ifile2SymbolMatches.get(matchIFile); + if (matches == null) { + matches = new TreeSet(new ModulaSymbolMatchPositionComparator()); + ifile2SymbolMatches.put(matchIFile, matches); + } + matches.add(match); + } + + @Override + public Change createChange(IProgressMonitor monitor) throws CoreException, + OperationCanceledException { + Change resultChange = null; + try + { + if (!ifile2SymbolMatches.isEmpty()) { + monitor.beginTask(Messages.RenameRefactoringProcessor_Creatingchanges, countMatches()); + + IModuleSymbol definingModule = ModulaSymbolUtils.getHostModule(renameRefactoringInfo.getSymbolFromSelection()); + resultChange = new RenameCompositeChange( getProcessorName(), definingModule ); + + RefactoringChangeContext refactoringChangeContext = new RefactoringChangeContext(); + for (Entry> entry : ifile2SymbolMatches.entrySet()) { + IFile ifileWithOccurrence = entry.getKey(); + processIFile((RenameCompositeChange)resultChange, refactoringChangeContext, ifileWithOccurrence, entry.getValue(), monitor); + } + } + } + finally{ + monitor.done(); + } + + if (resultChange == null) { + resultChange = new NullChange(); + } + + return resultChange; + } + + /** + * Compares {@link ModulaSymbolMatch} only by file and position information, disregarding symbol, context line etc + * + * @author lsa80 + */ + private final class ModulaSymbolMatchPositionComparator implements + Comparator { + @Override + public int compare(ModulaSymbolMatch o1, ModulaSymbolMatch o2) { + String absolutePath1 = ResourceUtils.getAbsolutePath(o1.getFile()); + String absolutePath2 = ResourceUtils.getAbsolutePath(o2.getFile()); + int result = JavaUtils.compare(absolutePath1, absolutePath2); + if (result == 0) { + result = JavaUtils.compare(o1.getOffset(), o2.getOffset()); + if (result == 0) { + result = JavaUtils.compare(o1.getLength(), o2.getLength()); + } + } + return result; + } + } + + /** + * Internal class for storing information about refactorings to be performed. + * + * @author lsa80 + */ + private static class RefactoringChangeContext { + private Map change2Parent = new HashMap(); + private Map file2RenameResourceChange = new HashMap(); + private Map file2TextFileChange = new HashMap(); + + private Set filesForDelete = new HashSet(); + + public boolean isRenameFileChangeRegistered(File file) { + return file2RenameResourceChange.containsKey(file); + } + + public void registerRenameFileChange(File file, CompositeChange parentChange, Change renameChange) { + file2RenameResourceChange.put(file, renameChange); + registerParent(parentChange, renameChange); + } + + /** + * @return true if was successfully registered, false if it is overridden by the delete change + */ + public boolean registerTextFileChange(File file, CompositeChange parentChange, TextFileChange textFileChange) { + if (!isFileWillBeDeleted(file)) { + file2TextFileChange.put(file, textFileChange); + registerParent(parentChange, textFileChange); + return true; + } + + return false; + } + + public void registerFileDelete(File file) { + filesForDelete.add(file); + TextFileChange textFileChange = file2TextFileChange.remove(file); + unregisterChangeAtParent(textFileChange); + } + + private boolean isFileWillBeDeleted(File file) { + return filesForDelete.contains(file); + } + + private void unregisterChangeAtParent(Change change) { + if (change != null) { + CompositeChange parent = change2Parent.remove(change); + parent.remove(change); + } + } + + private void registerParent(CompositeChange parentChange, Change change) { + change2Parent.put(change, parentChange); + } + } + + private void processIFile(RenameCompositeChange resultChange, + RefactoringChangeContext refactoringChangeContext, + IFile ifileWithOccurrence, + Set fileMatches, + IProgressMonitor monitor) { + File fileWithOccurrence = ResourceUtils.getAbsoluteFile(ifileWithOccurrence); + Change renameFileChange = null; + + resultChange.moduleFileDamaged(ifileWithOccurrence); + resultChange.setProject(ifileWithOccurrence.getProject()); + + boolean isRefactoringEnabled = isRefactoringEnabledByDefaultOn(ifileWithOccurrence); + TextFileChange textFileChange = new TextFileChange( ifileWithOccurrence.getName(), ifileWithOccurrence ); + // a file change contains a tree of edits, first add the root of them + MultiTextEdit fileChangeRootEdit = new MultiTextEdit(); + textFileChange.setEdit( fileChangeRootEdit ); + String ext = FilenameUtils.getExtension(ifileWithOccurrence.getName()); + textFileChange.setTextType(ext); + + for (ModulaSymbolMatch symbolMatch : fileMatches) { + IModulaSymbol symbol = symbolMatch.getSymbol(); + boolean isTopLevelModuleSymbol = symbol == ModulaSymbolUtils.getHostModule(symbol); + // this automatically implies that TRUE(symbol instanceof IModuleSymbol) + if (isTopLevelModuleSymbol) { + File sourceFile = ModulaSymbolUtils.getSourceFile(symbol); + if (sourceFile != null && !refactoringChangeContext.isRenameFileChangeRegistered(sourceFile)) { + boolean areFileSame = ResourceUtils.equalsPathesAsInFS(sourceFile, fileWithOccurrence); + if (areFileSame) { + String newModuleName = createNewModuleName(ifileWithOccurrence, renameRefactoringInfo.getNewName()); + renameFileChange = createRenameModuleFileChange(ifileWithOccurrence, newModuleName, refactoringChangeContext); + if (renameFileChange != null) { + renameFileChange.setEnabled(isRefactoringEnabled); + refactoringChangeContext.registerRenameFileChange(fileWithOccurrence, resultChange, renameFileChange); + } + } + } + } + ReplaceEdit edit = new ReplaceEdit( symbolMatch.getOffset(), + symbolMatch.getLength(), + renameRefactoringInfo.getNewName() ); + fileChangeRootEdit.addChild(edit); + + monitor.worked(1); + } + + if (refactoringChangeContext.registerTextFileChange(fileWithOccurrence, resultChange, textFileChange)) { + textFileChange.setEnabled(isRefactoringEnabled); + resultChange.add(textFileChange); + } + + if (renameFileChange != null) { + resultChange.add(renameFileChange); + } + } + + /** + * Whether refactoring should suggest modify resources only in compilation set or, otherwise, + * only not in compilation set + * + * @param ifileWithOccurrence - file on which refactoring will possibly operate + * @return + */ + private boolean isRefactoringEnabledByDefaultOn(IFile ifileWithOccurrence) { + IFile activeIFile = renameRefactoringInfo.getActiveIFile(); + boolean isActiveInCompilationSet = CompilationSetManager.getInstance().isInCompilationSet(activeIFile); + boolean isFileWithOccurrenceInCompilationSet = CompilationSetManager.getInstance().isInCompilationSet(ifileWithOccurrence); + return isActiveInCompilationSet == isFileWithOccurrenceInCompilationSet; + } + + private static class RenameCompositeChange extends CompositeChange{ + private Set damagedModuleFiles = new HashSet(); + private IProject project; + + public RenameCompositeChange(String name, IModuleSymbol definingModule) { + super(name); + } + + public void setProject(IProject project) { + this.project = project; + } + + public void moduleFileDamaged(IFile moduleFile) { + damagedModuleFiles.add(moduleFile); + } + + public Change perform(IProgressMonitor pm) throws CoreException { + super.perform(pm); + SymbolModelManager.instance().scheduleRemoveReparse(damagedModuleFiles); + + BuilderUtils.invokeGetCompilationSet(project, pm); + return null; + } + } + + private String createNewModuleName(IFile moduleIFile, String newName) { + String modulePath = ResourceUtils.getAbsolutePath(moduleIFile); + String moduleFileExt = FilenameUtils.getExtension(modulePath); + StringBuilder sb = new StringBuilder(newName); + return sb.append('.').append(moduleFileExt).toString(); + } + + private Change createRenameModuleFileChange(IFile ifile, String newName, RefactoringChangeContext refactoringChangeContext) { + IFile renamedIFile = getRenamedAbsoluteFile(ifile, newName); + if (ResourceUtils.equals(renamedIFile, ifile)) { + return null; + } + + final RenameResourceDescriptor descriptor= (RenameResourceDescriptor) RefactoringCore.getRefactoringContribution(RenameResourceDescriptor.ID).createDescriptor(); + descriptor.setProject(ifile.getProject().getName()); + descriptor.setDescription(Messages.RenameRefactoringProcessor_RenameModule); + descriptor.setComment(""); //$NON-NLS-1$ + descriptor.setFlags(RefactoringDescriptor.STRUCTURAL_CHANGE | RefactoringDescriptor.MULTI_CHANGE | RefactoringDescriptor.BREAKING_CHANGE); + descriptor.setResourcePath(ifile.getFullPath()); + descriptor.setNewName(newName); + descriptor.setUpdateReferences(true); + + IPath conflictingResourcePath = null; + if (renamedIFile.exists()) { + conflictingResourcePath = renamedIFile.getFullPath(); + refactoringChangeContext.registerFileDelete(ResourceUtils.getAbsoluteFile(renamedIFile)); + } + XdsRenameResourceChange resourceChange = new XdsRenameResourceChange(ifile.getFullPath(), conflictingResourcePath, newName); + resourceChange.setDescriptor(new RefactoringChangeDescriptor(descriptor)); + + return resourceChange; + } + + private IFile getRenamedAbsoluteFile(IFile iFile, String newName) { + IContainer container = iFile.getParent(); + IFile renamedIFile = container.getFile(new Path(newName)); + return renamedIFile; + } + + private int countMatches() { + int count = 0; + + for (Entry> entry : ifile2SymbolMatches.entrySet()) { + count += entry.getValue().size(); + } + + return count; + } + + @Override + public RefactoringParticipant[] loadParticipants(RefactoringStatus status, + SharableParticipants sharedParticipants) throws CoreException { + return new RefactoringParticipant[0]; + } +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/XdsRenameResourceChange.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/XdsRenameResourceChange.java new file mode 100644 index 0000000..33ce70f --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/XdsRenameResourceChange.java @@ -0,0 +1,177 @@ +package com.excelsior.xds.core.refactoring.rename; + +import java.io.File; + +import org.apache.commons.io.FileUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +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.NullProgressMonitor; +import org.eclipse.ltk.core.refactoring.Change; +import org.eclipse.ltk.core.refactoring.ChangeDescriptor; +import org.eclipse.ltk.core.refactoring.CompositeChange; +import org.eclipse.ltk.core.refactoring.resource.DeleteResourceChange; +import org.eclipse.ltk.core.refactoring.resource.ResourceChange; +import org.eclipse.ltk.internal.core.refactoring.BasicElementLabels; +import org.eclipse.ltk.internal.core.refactoring.Messages; +import org.eclipse.ltk.internal.core.refactoring.RefactoringCoreMessages; + +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * {@link Change} that renames a resource. Takes special care of linked file, renaming underlying file too. + * + * @since 3.4 + */ +@SuppressWarnings("restriction") +public class XdsRenameResourceChange extends ResourceChange { + + private final String fNewName; + private final IPath fResourcePath; + private final long fStampToRestore; + + private ChangeDescriptor fDescriptor; + + private IPath fConflictingResourcePath; // file already existing at destination + /** + * Creates the change. + * + * @param resourcePath the path of the resource to rename + * @param newName the new name. Must not be empty. + */ + public XdsRenameResourceChange(IPath resourcePath, IPath conflictingResourcePath, String newName) { + this(resourcePath, newName, IResource.NULL_STAMP); + fConflictingResourcePath = conflictingResourcePath; + } + + /** + * Creates the change with a time stamp to restore. + * + * @param resourcePath the path of the resource to rename + * @param newName the new name. Must not be empty. + * @param stampToRestore the time stamp to restore or {@link IResource#NULL_STAMP} to not restore the + * time stamp. + */ + protected XdsRenameResourceChange(IPath resourcePath, String newName, long stampToRestore) { + if (resourcePath == null || newName == null || newName.length() == 0) { + throw new IllegalArgumentException(); + } + + fResourcePath= resourcePath; + fNewName= newName; + fStampToRestore= stampToRestore; + fDescriptor= null; + setValidationMethod(VALIDATE_NOT_DIRTY); + } + + /* (non-Javadoc) + * @see org.eclipse.ltk.core.refactoring.Change#getDescriptor() + */ + public ChangeDescriptor getDescriptor() { + return fDescriptor; + } + + /** + * Sets the change descriptor to be returned by {@link Change#getDescriptor()}. + * + * @param descriptor the change descriptor + */ + public void setDescriptor(ChangeDescriptor descriptor) { + fDescriptor= descriptor; + } + + + /* (non-Javadoc) + * @see org.eclipse.ltk.core.refactoring.resource.ResourceChange#getModifiedResource() + */ + protected IResource getModifiedResource() { + return getResource(); + } + + /* (non-Javadoc) + * @see org.eclipse.ltk.core.refactoring.Change#getName() + */ + public String getName() { + String renameResourceMsg = Messages.format(RefactoringCoreMessages.RenameResourceChange_name, new String[] { BasicElementLabels.getPathLabel(fResourcePath, false), BasicElementLabels.getResourceName(fNewName) }); + if (fConflictingResourcePath == null) { + return renameResourceMsg; + } + else { + String deleteResourceMsg = Messages.format(RefactoringCoreMessages.DeleteResourceChange_name, BasicElementLabels.getPathLabel(fConflictingResourcePath.makeRelative(), false)); + return deleteResourceMsg + " AND " + renameResourceMsg; + } + } + + /** + * Returns the new name. + * + * @return return the new name + */ + public String getNewName() { + return fNewName; + } + + private IResource getResource() { + return ResourcesPlugin.getWorkspace().getRoot().findMember(fResourcePath); + } + + /* (non-Javadoc) + * @see org.eclipse.ltk.core.refactoring.Change#perform(org.eclipse.core.runtime.IProgressMonitor) + */ + public Change perform(IProgressMonitor pm) throws CoreException { + try { + pm.beginTask(RefactoringCoreMessages.RenameResourceChange_progress_description, 1); + + IResource resource= getResource(); + File absoluteFile = ResourceUtils.getAbsoluteFile(resource); + IPath destPath = renamedResourcePath(resource.getRawLocation(), fNewName); + + boolean isLinked = resource.isLinked(); + + long currentStamp= resource.getModificationStamp(); + IPath newPath= renamedResourcePath(fResourcePath, fNewName); + IFile destIFile = ResourceUtils.getWorkspaceRoot().getFile(newPath); + Change undoDeleteChange = null; + if (destIFile.exists()) { // handle rename conflict + DeleteResourceChange deleteChange = new DeleteResourceChange(destIFile.getFullPath(), true); + undoDeleteChange = deleteChange.perform(pm); + } + + resource.move(newPath, IResource.SHALLOW, pm); + + if (isLinked) { + File dest = destPath.toFile(); + FileUtils.deleteQuietly(dest); + absoluteFile.renameTo(dest); + + // get the resource again since after move resource can be inadequate + IWorkspaceRoot workspaceRoot = ResourceUtils.getWorkspaceRoot(); + resource = workspaceRoot.getFile(newPath); + ((IFile)resource).createLink(destPath, IResource.REPLACE, new NullProgressMonitor()); + } + if (fStampToRestore != IResource.NULL_STAMP) { + IResource newResource= ResourcesPlugin.getWorkspace().getRoot().findMember(newPath); + newResource.revertModificationStamp(fStampToRestore); + } + String oldName= fResourcePath.lastSegment(); + XdsRenameResourceChange undoRenameChange = new XdsRenameResourceChange(newPath, oldName, currentStamp); + if (undoDeleteChange == null) { + return undoRenameChange; + } + else { + return new CompositeChange(getName(), new Change[]{undoRenameChange, undoDeleteChange}); // constructing undo changes + } + } finally { + pm.done(); + } + } + + private static IPath renamedResourcePath(IPath path, String newName) { + return path.removeLastSegments(1).append(newName); + } + +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/Messages.java b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/Messages.java new file mode 100644 index 0000000..09b1411 --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/Messages.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.core.refactoring.rename.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS { + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + + public static String RenameRefactoringProcessor_Creatingchanges; + public static String RenameRefactoringProcessor_ErrorWhileComputingLocationsToRename; + public static String RenameRefactoringProcessor_Name; + public static String RenameRefactoringProcessor_RenameModule; + public static String RenameRefactoringProcessor_SymbolCannotBeRenamed; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages.properties b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages.properties new file mode 100644 index 0000000..f6180fb --- /dev/null +++ b/product/com.excelsior.xds.core.refactoring/src/com/excelsior/xds/core/refactoring/rename/internal/nls/messages.properties @@ -0,0 +1,5 @@ +RenameRefactoringProcessor_Creatingchanges=Creating changes +RenameRefactoringProcessor_ErrorWhileComputingLocationsToRename=Problems with determining locations to rename +RenameRefactoringProcessor_Name=Rename refactoring +RenameRefactoringProcessor_RenameModule=Rename module +RenameRefactoringProcessor_SymbolCannotBeRenamed=This element cannot be renamed diff --git a/product/com.excelsior.xds.core.search.nl_ru/.classpath b/product/com.excelsior.xds.core.search.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.search.nl_ru/.project b/product/com.excelsior.xds.core.search.nl_ru/.project new file mode 100644 index 0000000..ca6b523 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.search.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.search.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.core.search.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..dbfb8a8 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/fragment_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.core.search.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.search.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d5abdb2 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.core.search.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.core.search;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.core.search.nl_ru/build.properties b/product/com.excelsior.xds.core.search.nl_ru/build.properties new file mode 100644 index 0000000..192c037 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + fragment_ru.properties,\ + plugin_ru.properties + diff --git a/product/com.excelsior.xds.core.search.nl_ru/fragment.properties b/product/com.excelsior.xds.core.search.nl_ru/fragment.properties new file mode 100644 index 0000000..0f49bd3 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/fragment.properties @@ -0,0 +1,2 @@ +providerName=Excelsior LLC +fragmentName=com.excelsior.xds.core.search Russian NLS Support diff --git a/product/com.excelsior.xds.core.search.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.core.search.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..b589b36 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.core.search diff --git a/product/com.excelsior.xds.core.search.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.core.search.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..3d832e4 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.core.search diff --git a/product/com.excelsior.xds.core.search.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.core.search.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..0f6dda7 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0411\u0430\u0437\u043e\u0432\u0430\u044f \u043f\u043e\u0434\u0434\u0435\u0436\u043a\u0430 \u043f\u043e\u0438\u0441\u043a\u0430 \u0432 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0445 diff --git a/product/com.excelsior.xds.core.search.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.core.search.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..90b51c8 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Áàçîâàÿ ïîääåæêà ïîèñêà â XDS Ìîäóëà-2 ïðîãðàììàõ diff --git a/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru.properties b/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru.properties new file mode 100644 index 0000000..1f3e60e --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru.properties @@ -0,0 +1,11 @@ +ModulaSearchInput_AllOccurencies=\u0412\u0441\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f +ModulaSearchInput_Constants=\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 +ModulaSearchInput_Declarations=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f +ModulaSearchInput_Fields=\u043f\u043e\u043b\u0435\u0439 +ModulaSearchInput_Modules=\u043c\u043e\u0434\u0443\u043b\u0435\u0439 +ModulaSearchInput_Names=\u0438\u043c\u0435\u043d +ModulaSearchInput_Procedures=\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +ModulaSearchInput_Types=\u0442\u0438\u043f\u043e\u0432 +ModulaSearchInput_Usages=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f +ModulaSearchInput_Variables=\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 +ModulaSearchInput_Workspace=\u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \ No newline at end of file diff --git a/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..ca25b54 --- /dev/null +++ b/product/com.excelsior.xds.core.search.nl_ru/src/com/excelsior/xds/core/search/internal/nls/messages_ru_1251.properties @@ -0,0 +1,11 @@ +ModulaSearchInput_AllOccurencies=Âñå âõîæäåíèÿ +ModulaSearchInput_Constants=êîíñòàíò +ModulaSearchInput_Declarations=Îáúÿâëåíèÿ +ModulaSearchInput_Fields=ïîëåé +ModulaSearchInput_Modules=ìîäóëåé +ModulaSearchInput_Names=èìåí +ModulaSearchInput_Procedures=ïðîöåäóð +ModulaSearchInput_Types=òèïîâ +ModulaSearchInput_Usages=Èñïîëüçîâàíèÿ +ModulaSearchInput_Variables=ïåðåìåííûõ +ModulaSearchInput_Workspace=ðàáî÷åé îáëàñòè \ No newline at end of file diff --git a/product/com.excelsior.xds.core.search/.classpath b/product/com.excelsior.xds.core.search/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core.search/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core.search/.project b/product/com.excelsior.xds.core.search/.project new file mode 100644 index 0000000..6d3515a --- /dev/null +++ b/product/com.excelsior.xds.core.search/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core.search + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core.search/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core.search/META-INF/MANIFEST.MF new file mode 100644 index 0000000..91cbd95 --- /dev/null +++ b/product/com.excelsior.xds.core.search/META-INF/MANIFEST.MF @@ -0,0 +1,27 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.core.search;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.core.search.SearchCorePlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.core.resources, + org.eclipse.search, + com.excelsior.xds.parser;bundle-version="1.7.0", + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.core.model;bundle-version="1.7.0", + org.eclipse.jface.text, + org.eclipse.ui, + org.eclipse.core.filebuffers, + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + org.eclipse.ui.workbench.texteditor, + org.eclipse.ui.ide, + org.apache.commons.lang, + com.excelsior.xds.core.ide;bundle-version="1.7.0", + org.eclipse.core.filesystem;bundle-version="1.4.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.core.search.modula, + com.excelsior.xds.core.search.modula.utils diff --git a/product/com.excelsior.xds.core.search/build.properties b/product/com.excelsior.xds.core.search/build.properties new file mode 100644 index 0000000..af52e22 --- /dev/null +++ b/product/com.excelsior.xds.core.search/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties + diff --git a/product/com.excelsior.xds.core.search/plugin.properties b/product/com.excelsior.xds.core.search/plugin.properties new file mode 100644 index 0000000..fa32489 --- /dev/null +++ b/product/com.excelsior.xds.core.search/plugin.properties @@ -0,0 +1,2 @@ +pluginName=XDS Modula-2 Search Support Core + diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/SearchCorePlugin.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/SearchCorePlugin.java new file mode 100644 index 0000000..a857553 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/SearchCorePlugin.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.core.search; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +public class SearchCorePlugin extends AbstractUIPlugin { + + public static final String PLUGIN_ID = "com.excelsior.xds.core.search"; + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + private static SearchCorePlugin plugin; + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + plugin = this; + SearchCorePlugin.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + SearchCorePlugin.context = null; + plugin = null; + } + + public static SearchCorePlugin getDefault() { + return plugin; + } +} diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/Messages.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/Messages.java new file mode 100644 index 0000000..72bba81 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/Messages.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.core.search.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object}); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + public static String ModulaSearchInput_AllOccurencies; + public static String ModulaSearchInput_Constants; + public static String ModulaSearchInput_Declarations; + public static String ModulaSearchInput_Fields; + public static String ModulaSearchInput_Modules; + public static String ModulaSearchInput_Names; + public static String ModulaSearchInput_Procedures; + public static String ModulaSearchInput_Types; + public static String ModulaSearchInput_Usages; + public static String ModulaSearchInput_Variables; + public static String ModulaSearchInput_Workspace; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + // Not for instantiation +} + + +} diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/messages.properties b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/messages.properties new file mode 100644 index 0000000..7d41649 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/internal/nls/messages.properties @@ -0,0 +1,11 @@ +ModulaSearchInput_AllOccurencies=All occurences +ModulaSearchInput_Constants=constants +ModulaSearchInput_Declarations=declarations +ModulaSearchInput_Fields=fields +ModulaSearchInput_Modules=modules +ModulaSearchInput_Names=names +ModulaSearchInput_Procedures=procedures +ModulaSearchInput_Types=types +ModulaSearchInput_Usages=Usages +ModulaSearchInput_Variables=variables +ModulaSearchInput_Workspace=workspace \ No newline at end of file diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchInput.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchInput.java new file mode 100644 index 0000000..6b85ac2 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchInput.java @@ -0,0 +1,199 @@ +/** + * see org.eclipse.pde.internal.core.search.PluginSearchInput. + */ +package com.excelsior.xds.core.search.modula; + +import java.util.Set; + +import org.eclipse.core.resources.IProject; +import org.eclipse.search.ui.ISearchPageContainer; +import org.eclipse.search.ui.text.FileTextSearchScope; + +import com.excelsior.xds.core.search.internal.nls.Messages; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; + +public class ModulaSearchInput +{ + public static final int SEARCH_FOR_TYPE = 1; + public static final int SEARCH_FOR_VARIABLE = 2; + public static final int SEARCH_FOR_PROCEDURE = 3; + public static final int SEARCH_FOR_FIELD = 4; + public static final int SEARCH_FOR_CONSTANT = 5; + public static final int SEARCH_FOR_MODULE = 6; + public static final int SEARCH_FOR_ANY_ELEMENT = 0; + + public static final int LIMIT_TO_DECLARATIONS = 0x0001; + public static final int LIMIT_TO_USAGES = 0x0002; + public static final int LIMIT_TO_ALL_OCCURENCES = 0xFFFF; + + public static final int MODIFIER_ALL_NAME_OCCURENCES = 0x0001; // search for all name occurences, like << $PROCEDURE_NAME$ END. >> for the procedure, beside usual << PROCEDURE $PROCEDURE_NAME$ >> + + public static final int SEARCH_IN_COMP_SET = 0x0001; + public static final int SEARCH_IN_ALL_SOURCES = 0x0002; + public static final int SEARCH_IN_SDK_LIBRARIES = 0x0004; + + private IProject project; // project giving the scope of search, if any + private String searchString = null; + private Set qualifiedNames; + private boolean caseSensitive = true; + private int searchFor = 0; + private int limitTo = 0; + private int searchModifiers = 0; + private int searchInFlags = 0; + private FileTextSearchScope searchScope; + private int searchScopeId; + private IModulaSymbol symbolToSearchFor; + + public ModulaSearchInput(IProject project) { + this.project = project; + } + + /** + * project giving the scope of search, if any + */ + public IProject getProject() { + return project; + } + + /** + * project giving the scope of search, if any + */ + public void setProject(IProject project) { + this.project = project; + } + + /** + * Qualified symbol names to find + */ + public Set getQualifiedNames() { + return qualifiedNames; + } + + /** + * Qualified symbol names to find + */ + public void setSymbolQualifiedNames(Set qualifiedNames) { + this.searchString = null; + this.qualifiedNames = qualifiedNames; + } + + public String getSearchString() { + return searchString; + } + + public boolean isCaseSensitive() { + return caseSensitive; + } + + public void setCaseSensitive(boolean value) { + caseSensitive = value; + } + + public void setSearchString(String name) { + searchString = name; + qualifiedNames = null; + } + + public int getSearchFor() { + return searchFor; + } + + public void setSearchFor(int element) { + searchFor = element; + } + + public int getLimitTo() { + return limitTo; + } + + public void setLimitTo(int limit) { + limitTo = limit; + } + + public int getSearchInFlags() { + return searchInFlags; + } + + public void setSearchInFlags(int bits) { + searchInFlags = bits; + } + + public int getSearchModifiers() { + return searchModifiers; + } + + public void setSearchModifiers(int searchModifiers) { + this.searchModifiers = searchModifiers; + } + + public FileTextSearchScope getSearchScope() { + return searchScope; + } + + public void setSearchScope(FileTextSearchScope scope) { + searchScope = scope; + } + + public int getSearchScopeId() { + return searchScopeId; + } + + public void setSearchScopeId(int scopeId) { + searchScopeId = scopeId; + } + + public IModulaSymbol getSymbolToSearchFor() { + return symbolToSearchFor; + } + + public boolean isSearchOnlyInCompilationSet() { + return (searchInFlags & ModulaSearchInput.SEARCH_IN_COMP_SET) != 0; + } + + public void setSymbolToSearchFor(IModulaSymbol symbolToSearchFor) { + while (symbolToSearchFor instanceof IForwardTypeSymbol) { + IModulaSymbol actualTypeSymbol = ((IForwardTypeSymbol)symbolToSearchFor).getActualTypeSymbol(); + if (actualTypeSymbol == null) + break; + symbolToSearchFor = actualTypeSymbol; + } + this.symbolToSearchFor = symbolToSearchFor; + } + + + /** + * Constructs something like: + * "Declarations of variables 'abc*' in project 'zz.prj'" + * "Èñïîëüçîâàíèå ïðîöåäóðû 'my_proc' in file 'foo.mod'" + */ + public String getSearchDescription() { + String what = Messages.ModulaSearchInput_AllOccurencies; + if (getLimitTo() == LIMIT_TO_DECLARATIONS) { + what = Messages.ModulaSearchInput_Declarations; + } else if (getLimitTo() == LIMIT_TO_USAGES) { + what = Messages.ModulaSearchInput_Usages; + } + + String ofWhat = Messages.ModulaSearchInput_Names; + switch (getSearchFor()) { + case SEARCH_FOR_TYPE: ofWhat = Messages.ModulaSearchInput_Types; break; + case SEARCH_FOR_VARIABLE: ofWhat = Messages.ModulaSearchInput_Variables; break; + case SEARCH_FOR_PROCEDURE:ofWhat = Messages.ModulaSearchInput_Procedures; break; + case SEARCH_FOR_FIELD: ofWhat = Messages.ModulaSearchInput_Fields; break; + case SEARCH_FOR_CONSTANT: ofWhat = Messages.ModulaSearchInput_Constants; break; + case SEARCH_FOR_MODULE: ofWhat = Messages.ModulaSearchInput_Modules; break; + default: ofWhat = ""; break; //$NON-NLS-1$ + } + if (!ofWhat.isEmpty()) ofWhat += ' '; + + String where = ""; //$NON-NLS-1$ + if (getSearchScopeId() == ISearchPageContainer.WORKSPACE_SCOPE) { + where = Messages.ModulaSearchInput_Workspace; + } else { + where = getSearchScope().getDescription(); + } + + return String.format("%s %s'%s' â %s", what, ofWhat, getSearchString(), where); //$NON-NLS-1$ + } +} diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchOperation.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchOperation.java new file mode 100644 index 0000000..4888b3f --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSearchOperation.java @@ -0,0 +1,567 @@ +// see org.eclipse.pde.internal.core.search.PluginSearchOperation +package com.excelsior.xds.core.search.modula; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.regex.Pattern; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.MultiStatus; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.search.ui.text.Match; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.ide.symbol.ParseTask; +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.ide.symbol.utils.EntityUtils; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsSdkLibraryContainer; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.search.modula.utils.ModulaSearchUtils; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.text.TextUtils; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.symbol.IBlockSymbolTextBinding; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IMainModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.IProgramModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDefinitions; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; + +public class ModulaSearchOperation +{ + public interface ISearchResultCollector + { + void accept(Object match); + } + + protected ModulaSearchInput fInput; + private ISearchResultCollector fCollector; + + /** + * Either fSymbolNamePattern or fSymbolQualifiedName should be null + */ + private Pattern fSymbolNamePattern; + private Set fSymbolQualifiedNames; + + public ModulaSearchOperation(ModulaSearchInput input, ISearchResultCollector collector) { + this.fInput = input; + this.fCollector = collector; + if (!StringUtils.isEmpty(input.getSearchString())) { + this.fSymbolNamePattern = TextUtils.createPattern(input.getSearchString(), + input.isCaseSensitive()); + } + else if (input.getQualifiedNames() != null) { + this.fSymbolQualifiedNames = input.getQualifiedNames(); + } + } + + public void execute(IProgressMonitor monitor, MultiStatus status) { + Map documentsCache = ModulaSearchUtils.evalNonFileBufferDocument(); + + searchForSymbolDeclaration(documentsCache, monitor); + + searchForDeclarationsAndReferencesInScope(documentsCache, monitor, status); + } + + + private boolean isSearchForAnyElement() { + return ModulaSearchInput.SEARCH_FOR_ANY_ELEMENT == fInput.getSearchFor(); + } + + private boolean isSearchFor(int searchForFlag) { + return searchForFlag == fInput.getSearchFor(); + } + + + private boolean isSymbolNameMatches(IModulaSymbol symbol) { + if (symbol == null || symbol.getName() == null) { + return false; + } + if (fSymbolNamePattern != null) { + return fSymbolNamePattern.matcher(symbol.getName()).matches(); + } + else if (fSymbolQualifiedNames != null) { + return fSymbolQualifiedNames.contains(symbol.getQualifiedName()); + } + + return false; + } + + + private ModulaSymbolMatch createMatchFromTokenPosition( IFile iFile + , IModulaSymbol symbol + , TextPosition position ) + { + if (position == null) { + return null; + } + return new ModulaSymbolMatch(iFile, symbol, position); + } + + private ModulaSymbolMatch createMatchFromSymbol(IFile f, IModulaSymbol symbol) { + return createMatchFromTokenPosition(f, symbol, symbol.getPosition()); + } + + private Collection createMatchesFromSymbol(IFile f, IModulaSymbol symbol) { + Collection matches = new ArrayList(); + + boolean isSearchForAllNameOccurrences = JavaUtils.areFlagsSet(fInput.getSearchModifiers(), ModulaSearchInput.MODIFIER_ALL_NAME_OCCURENCES); + if (isSearchForAllNameOccurrences && (symbol instanceof IBlockSymbolTextBinding)) { + IBlockSymbolTextBinding textBinding = (IBlockSymbolTextBinding)symbol; + Collection nameTextRegions = textBinding.getNameTextRegions(); + for (ITextRegion textRegion : nameTextRegions) { + Match match = createMatchFromTokenPosition(f, symbol, new TextPosition(-1, -1, textRegion.getOffset())); + matches.add(match); + } + } + else { + Match match = createMatchFromSymbol(f, symbol); + matches.add(match); + } + + return matches; + } + + private void createMatchesFromUsages( IModuleSymbol moduleSymbol + , IModulaSymbol modulaSymbol + , IFile iFile + , List matches ) + { + Collection symbolUsages = moduleSymbol.getSymbolUsages(modulaSymbol); + if (symbolUsages != null) { + for (TextPosition tokenPosition : symbolUsages) { + matches.add(createMatchFromTokenPosition(iFile, modulaSymbol, tokenPosition)); + } + } + } + + + private void searchForDeclarationsAndReferencesInScope( Map documentsCache, IProgressMonitor monitor + , MultiStatus status ) + { + IFile farr[] = fInput.getSearchScope().evaluateFilesInScope(status); + monitor.beginTask("", farr.length); //$NON-NLS-1$ + + try { + for (IFile f : farr) { + try{ + if (monitor.isCanceled()) { + break; + } + + if (!XdsFileUtils.isCompilationUnitFile(f.getName())) { + continue; + } + + IXdsElement xdsEl = XdsModelManager.getModel().getXdsElement(f); + if (xdsEl == null) { + continue; + } + + // Search in: + boolean searchInOk = false; + { + int searchIn = fInput.getSearchInFlags(); + + boolean isInSdk = false; + // TODO : remove isInSdk calculation using IXdsSdkLibraryContainer. Try using LibraryFileSetManager instead. + IXdsContainer xCont = xdsEl.getParent(); + while (xCont != null) { + if (xCont instanceof IXdsSdkLibraryContainer) { + isInSdk = true; + break; + } + xCont = xCont.getParent(); + } + + if (isInSdk) { + searchInOk = (searchIn & ModulaSearchInput.SEARCH_IN_SDK_LIBRARIES) != 0; + } + else { + if ((searchIn & ModulaSearchInput.SEARCH_IN_ALL_SOURCES) != 0) { + searchInOk = true; + } + else if ((searchIn & ModulaSearchInput.SEARCH_IN_COMP_SET) != 0) { + searchInOk = CompilationSetManager.getInstance() + .isInCompilationSet(f.getProject().getName(), + ResourceUtils.getAbsolutePath(f)); + } + } + } + if (!searchInOk) { + continue; + } + + // Do search: + ArrayList matches = findMatchesInFile(f, documentsCache); + for (Match m : matches) { + acceptMatch(documentsCache, m); + } + } + finally{ + monitor.worked(1); + } + } + } finally { + monitor.done(); + } + } + + private void searchForSymbolDeclaration(Map documentsCache2, IProgressMonitor monitor) { + if (JavaUtils.areFlagsSet(fInput.getLimitTo(), ModulaSearchInput.LIMIT_TO_DECLARATIONS)) { + Map documentsCache = ModulaSearchUtils.evalNonFileBufferDocument(); + IModulaSymbol symbolToSearchFor = fInput.getSymbolToSearchFor(); + if (symbolToSearchFor != null) { + monitor.beginTask("", 1); //$NON-NLS-1$ + try { + IFile symbolFile = ModulaSymbolUtils.findFirstFileForSymbol(fInput.getProject(), symbolToSearchFor); + if (symbolFile != null) { + Collection sameEntitySymbols = EntityUtils.syncGetRelatedSymbols(symbolFile.getProject(), fInput.isSearchOnlyInCompilationSet(), symbolToSearchFor); + for (IModulaSymbol sameEntitySymbol : sameEntitySymbols) { + symbolFile = ModulaSymbolUtils.findFirstFileForSymbol(fInput.getProject(), sameEntitySymbol); + if (symbolFile != null) { + Collection matches = createMatchesFromSymbol(symbolFile, sameEntitySymbol); + for (Match match : matches) { + acceptMatch(documentsCache, match); + } + } + } + } + } finally { + monitor.done(); + } + } + } + } + + private ArrayList findMatchesInFile( IFile f + , Map documentsCache ) + { + final ArrayList matches = new ArrayList(); + if (f.getProject().isOpen()) { + ParseTask task = ParseTaskFactory.create(f); + task.setForce(false); + IModuleSymbol moduleSymbol = SymbolModelManager.instance().syncParseFirstSymbol(task); + if (moduleSymbol != null) { + IModulaSymbol symbolToSearchFor = fInput.getSymbolToSearchFor(); + if (symbolToSearchFor != null) { + boolean isInputAccepted = JavaUtils.areFlagsSet(fInput.getLimitTo(), ModulaSearchInput.LIMIT_TO_USAGES); + if (isInputAccepted) { + Collection sameEntitySymbols = EntityUtils.syncGetRelatedSymbols(f.getProject(), fInput.isSearchOnlyInCompilationSet(), symbolToSearchFor); + for (IModulaSymbol sameEntitySymbol : sameEntitySymbols) { + createMatchesFromUsages(moduleSymbol, sameEntitySymbol, f, matches); + } + } + } + else { + findMatchesInFileWithPattern(f, matches, moduleSymbol); + } + } + } + return matches; + } + + private void findMatchesInFileWithPattern( final IFile iFile + , final ArrayList matches + , IModuleSymbol moduleSymbol ) + { + boolean isDeclarationRequired = JavaUtils.areFlagsSet(fInput.getLimitTo(), ModulaSearchInput.LIMIT_TO_DECLARATIONS); + if (isDeclarationRequired) { + moduleSymbol.accept(new DeclarationVisitor(iFile, matches)); + } + + boolean isUsageRequired = JavaUtils.areFlagsSet(fInput.getLimitTo(), ModulaSearchInput.LIMIT_TO_USAGES); + if (isUsageRequired) { + @SuppressWarnings("rawtypes")List expectedSymbolClasses; + switch (fInput.getSearchFor()) { + case ModulaSearchInput.SEARCH_FOR_TYPE: + expectedSymbolClasses = classList(ITypeSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_VARIABLE: + expectedSymbolClasses = classList(IVariableSymbol.class, IFormalParameterSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_PROCEDURE: + expectedSymbolClasses = classList(IProcedureSymbol.class, IStandardProcedureSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_FIELD: + expectedSymbolClasses = classList(IRecordFieldSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_CONSTANT: + expectedSymbolClasses = classList(IConstantSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_MODULE: + expectedSymbolClasses = classList(IModuleSymbol.class); + break; + case ModulaSearchInput.SEARCH_FOR_ANY_ELEMENT: + expectedSymbolClasses = null; + break; + default: + return; + } + + Iterable usedSymbols = moduleSymbol.getUsedSymbols(); + for (IModulaSymbol modulaSymbol : usedSymbols) { + matchSymbolReferences( moduleSymbol, modulaSymbol, expectedSymbolClasses + , iFile, matches ); + } + } + } + + @SuppressWarnings("rawtypes") + private List classList(Class... classes) { + List classesList = new ArrayList(); + classesList.addAll(Arrays.asList(classes)); + return classesList; + } + + private void matchSymbolReferences( IModuleSymbol moduleSymbol + , IModulaSymbol modulaSymbol + , @SuppressWarnings("rawtypes") List expectedSymbolClasses + , IFile f + , List matches ) + { + boolean isOneOfTheExpected = expectedSymbolClasses == null; + if (!isOneOfTheExpected) { + for (Class expectedSymbolClass : expectedSymbolClasses) { + if (expectedSymbolClass.isAssignableFrom(modulaSymbol.getClass())) { + isOneOfTheExpected = true; + break; + } + } + } + if (isOneOfTheExpected && isSymbolNameMatches(modulaSymbol)) { + createMatchesFromUsages(moduleSymbol, modulaSymbol, f, matches); + } + } + + private void setMatchContextLine(ModulaSymbolMatch match, Map documentsCache) + { + IDocument document = ModulaSearchUtils.getDocumentForIFile(match.getFile(), documentsCache); + if (document == null) + return; + + IRegion contextLineRegion; + try { + contextLineRegion = document.getLineInformationOfOffset(match.getOffset()); + String contextLine = document.get(contextLineRegion.getOffset(), contextLineRegion.getLength()); + match.setContextLine(contextLine); + } catch (BadLocationException e) { + } + } + + + private class DeclarationVisitor extends ModulaSymbolVisitor + { + private final IFile iDeclarationFile; + private final File iDeclarationFilePath; + private final ArrayList matches; + + public DeclarationVisitor(IFile iDeclarationFile, ArrayList matches) { + this.iDeclarationFile = iDeclarationFile; + this.iDeclarationFilePath = ResourceUtils.getAbsoluteFile(iDeclarationFile); + this.matches = matches; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean preVisit(IModulaSymbol symbol) { + return super.preVisit(symbol) && isSameFileAsDeclarationFile(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IProcedureDefinitionSymbol symbol) { + searchFor(symbol.getParameters(), ModulaSearchInput.SEARCH_FOR_VARIABLE); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IProcedureDeclarationSymbol symbol) { + searchFor(symbol.getParameters(), ModulaSearchInput.SEARCH_FOR_VARIABLE); + searchFor(symbol.getLocalModules(), ModulaSearchInput.SEARCH_FOR_MODULE); + searchInSymbolWithDefinitions(symbol); + return true; + } + + @Override + public boolean visit(IOberonMethodDeclarationSymbol symbol) { + searchFor(symbol.getParameters(), ModulaSearchInput.SEARCH_FOR_VARIABLE); + matchSymbol(symbol.getReceiverSymbol(), ModulaSearchInput.SEARCH_FOR_VARIABLE); + searchFor(symbol.getLocalModules(), ModulaSearchInput.SEARCH_FOR_MODULE); + searchInSymbolWithDefinitions(symbol); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IRecordTypeSymbol symbol) { + searchFor(symbol.getFields(), ModulaSearchInput.SEARCH_FOR_FIELD); + searchFor(symbol.getProcedures(), ModulaSearchInput.SEARCH_FOR_PROCEDURE); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IEnumTypeSymbol symbol) { + searchFor(symbol.getElements(), ModulaSearchInput.SEARCH_FOR_CONSTANT); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IDefinitionModuleSymbol symbol) { + searchForAliases(symbol.getImports()); + searchInSymbolWithDefinitions(symbol); + + matchSymbol(symbol, ModulaSearchInput.SEARCH_FOR_MODULE); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IImplemantationModuleSymbol symbol) { + searchInProgramModuleSymbol(symbol); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(ILocalModuleSymbol symbol) { + searchInProgramModuleSymbol(symbol); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IMainModuleSymbol symbol) { + searchInProgramModuleSymbol(symbol); + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean visit(IProgramModuleSymbol symbol) { + searchInProgramModuleSymbol(symbol); + return true; + } + + + private void searchFor( Iterable symbols + , int searchForFlag ) + { + if (isSearchForAnyElement() || isSearchFor(searchForFlag)) { + for (IModulaSymbol symbol : symbols) { + if (isSymbolMatches(symbol)) { + matches.addAll(createMatchesFromSymbol(iDeclarationFile, symbol)); + } + } + } + } + + private void searchForAliases(Iterable symbols) + { + if (isSearchForAnyElement() || isSearchFor(ModulaSearchInput.SEARCH_FOR_MODULE)) { + for (IModulaSymbol symbol : symbols) { + if (symbol instanceof IModuleAliasSymbol && isSymbolMatches(symbol)) { + matches.addAll(createMatchesFromSymbol(iDeclarationFile, symbol)); + } + } + } + } + + + private void searchInSymbolWithDefinitions(ISymbolWithDefinitions symbolWithDefinitions) + { + searchFor(symbolWithDefinitions.getProcedures(), ModulaSearchInput.SEARCH_FOR_PROCEDURE); + searchFor(symbolWithDefinitions.getConstants(), ModulaSearchInput.SEARCH_FOR_CONSTANT); + searchFor(symbolWithDefinitions.getTypes(), ModulaSearchInput.SEARCH_FOR_TYPE); + searchFor(symbolWithDefinitions.getVariables(), ModulaSearchInput.SEARCH_FOR_VARIABLE); + } + + private void searchInProgramModuleSymbol(IProgramModuleSymbol symbol) { + searchForAliases(symbol.getImports()); + searchInSymbolWithDefinitions(symbol); + searchFor(symbol.getLocalModules(), ModulaSearchInput.SEARCH_FOR_MODULE ); + + matchSymbol(symbol, ModulaSearchInput.SEARCH_FOR_MODULE); + } + + + private void matchSymbol(IModulaSymbol symbol, int searchForFlag) { + if (isSearchForAnyElement() || isSearchFor(searchForFlag)) { + if (isSymbolMatches(symbol)) { + matches.addAll(createMatchesFromSymbol(iDeclarationFile, symbol)); + } + } + } + + private boolean isSymbolMatches(IModulaSymbol symbol) { + return isSameFileAsDeclarationFile(symbol) && isSymbolNameMatches(symbol); + } + + private boolean isSameFileAsDeclarationFile(IModulaSymbol symbol) { + return ResourceUtils.equalsPathesAsInFS(iDeclarationFilePath, ModulaSymbolUtils.getSourceFile(symbol)); + } + } + + private void acceptMatch(Map documentsCache, Match match) { + if (match != null) { + setMatchContextLine((ModulaSymbolMatch)match, documentsCache); + fCollector.accept(match); + } + } +} diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSymbolMatch.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSymbolMatch.java new file mode 100644 index 0000000..7c5a6d5 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/ModulaSymbolMatch.java @@ -0,0 +1,95 @@ +package com.excelsior.xds.core.search.modula; + +import org.eclipse.core.resources.IFile; +import org.eclipse.search.ui.text.Match; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +/** + * A search match with additional Modula-2 specific info. + */ +public class ModulaSymbolMatch extends Match +{ + private final IModulaSymbol symbol; + private final int line; + private final int column; + private String contextLine; + + public ModulaSymbolMatch(IFile iFile, IModulaSymbol symbol, TextPosition position ) + { + super(iFile, Match.UNIT_CHARACTER, position.getOffset(), symbol.getName().length()); + this.symbol = symbol; + this.line = position.getLine(); + this.column = position.getColumn(); + } + + public void setContextLine(String contextLine) { + this.contextLine = contextLine; + } + + + public IFile getFile() { + return (IFile)getElement(); + } + + public IModulaSymbol getSymbol() { + return symbol; + } + + public int getLine() { + return line; + } + + public int getColumn() { + return column; + } + + public String getContextLine() { + return contextLine; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + column; + result = prime * result + ((getFile() == null) ? 0 : getFile().hashCode()); + result = prime * result + line; + result = prime * result + ((symbol == null) ? 0 : symbol.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModulaSymbolMatch other = (ModulaSymbolMatch) obj; + if (column != other.column) + return false; + if (getFile() == null) { + if (other.getFile() != null) + return false; + } else if (!getFile().equals(other.getFile())) + return false; + if (line != other.line) + return false; + if (symbol == null) { + if (other.symbol != null) + return false; + } else if (!symbol.equals(other.symbol)) + return false; + return true; + } + + @Override + public String toString() { + return String + .format("ModulaSymbolMatch [iFile=%s, symbol=%s, line=%s, column=%s, contextLine=%s]", + getFile(), symbol, line, column, contextLine); + } +} diff --git a/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/utils/ModulaSearchUtils.java b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/utils/ModulaSearchUtils.java new file mode 100644 index 0000000..aa12f74 --- /dev/null +++ b/product/com.excelsior.xds.core.search/src/com/excelsior/xds/core/search/modula/utils/ModulaSearchUtils.java @@ -0,0 +1,203 @@ +package com.excelsior.xds.core.search.modula.utils; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.filebuffers.FileBuffers; +import org.eclipse.core.filebuffers.ITextFileBuffer; +import org.eclipse.core.filebuffers.ITextFileBufferManager; +import org.eclipse.core.filebuffers.LocationKind; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.Document; +import org.eclipse.jface.text.IDocument; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.search.SearchCorePlugin; +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.core.text.TextEncoding; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public final class ModulaSearchUtils +{ + private ModulaSearchUtils(){ + } + + /** + * @return IDocument for IFile if it is opened in editor and it is dirty + * or null + */ + public static IDocument evalNonFileBufferDocument(IFile ifile) { + Map map = evalDirtyDocs(ifile); + return map.get(ifile); + } + + /** + * @return returns a map from IFile to IDocument for all open, dirty editors + */ + public static Map evalNonFileBufferDocument() { + return evalDirtyDocs(null); + } + + + /** + * @param iFile file to get IDocument for + * @param documentsCache null or contains known file documents (f.ex. see evalNonFileBufferDocument()) + * Out: newly found will be added here if any + * @return AST or null + */ + public static IDocument getDocumentForIFile(IFile iFile, Map documentsCache) + { + IDocument document = null; + if (documentsCache != null) { + document = documentsCache.get(iFile); + } + if (document == null) { + if (iFile.exists()) { + StringBuilder sb = new StringBuilder(); + try { + if (XdsFileUtils.isSymbolFile(iFile.getName()) && iFile.getLocation() != null) { + String symFileText = CompileDriver.decodeSymFile(ResourceUtils.getAbsolutePath(iFile)); + if (symFileText == null){ + return null; + } + sb.append(symFileText); + } + else { + try(InputStream stream = iFile.getContents()){ + TextEncoding.readFileAndCodepage(stream, sb, null); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + document = new Document(sb.toString()); + if (documentsCache != null) { + documentsCache.put(iFile, document); + } + } catch (IOException e) { + LogHelper.logError(e); + } + } + } + return document; + } + + + public static Map evalDirtyDocs(IFile filter) { + Map result = new HashMap(); + IWorkbench workbench = SearchCorePlugin.getDefault().getWorkbench(); + IWorkbenchWindow[] windows = workbench.getWorkbenchWindows(); + for (int i = 0; i < windows.length; i++) { + IWorkbenchPage[] pages = windows[i].getPages(); + for (int x = 0; x < pages.length; x++) { + IEditorReference[] editorRefs = pages[x].getEditorReferences(); + for (int z = 0; z < editorRefs.length; z++) { + IEditorPart ep = editorRefs[z].getEditor(false); + if (ep instanceof ITextEditor && ep.isDirty()) { // only + // dirty + // editors + evaluateTextEditor(result, ep, filter); + } + } + } + } + return result; + } + + /** + * @param symbol + * @return names of the symbols related to given symbol (now only forward declaration), including itself + */ + public static Set getSymbolQualifiedNames(IModulaSymbol symbol) { + List qualifiedNames = new ArrayList(); + qualifiedNames.add(symbol.getQualifiedName()); + if (symbol instanceof IForwardTypeSymbol) { + IForwardTypeSymbol forwardTypeSymbol = (IForwardTypeSymbol)symbol; + ITypeSymbol actualTypeSymbol = forwardTypeSymbol.getActualTypeSymbol(); + if (actualTypeSymbol != null) { + qualifiedNames.add(actualTypeSymbol.getQualifiedName()); + } + } + else{ + String forwardDeclQualifiedName = QualifiedNameFactory.getQualifiedName(symbol.getQualifiedName(), SymbolAttribute.FORWARD_DECLARATION); + qualifiedNames.add(forwardDeclQualifiedName); + } + return new HashSet(qualifiedNames); + } + + public static int getSearchForConstant(IModulaSymbol symbol) { + int searchForConstant = ModulaSearchInput.SEARCH_FOR_ANY_ELEMENT; + if (symbol instanceof ITypeSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_TYPE; + } + else if (symbol instanceof IVariableSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_VARIABLE; + } + else if (symbol instanceof IProcedureSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_PROCEDURE; + } + else if (symbol instanceof IRecordFieldSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_FIELD; + } + else if (symbol instanceof IConstantSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_CONSTANT; + } + else if (symbol instanceof IModuleSymbol) { + searchForConstant = ModulaSearchInput.SEARCH_FOR_MODULE; + } + return searchForConstant; + } + + private static void evaluateTextEditor(Map result, IEditorPart ep, IFile filter) { + IEditorInput input = ep.getEditorInput(); + if (input instanceof IFileEditorInput) { + IFile file = ((IFileEditorInput) input).getFile(); + if (filter == null || filter.equals(file)) { + if (!result.containsKey(file)) { // take the first editor found + ITextFileBufferManager bufferManager = FileBuffers.getTextFileBufferManager(); + ITextFileBuffer textFileBuffer = bufferManager + .getTextFileBuffer(file.getFullPath(), LocationKind.IFILE); + if (textFileBuffer != null) { + // file buffer has precedence + result.put(file, textFileBuffer.getDocument()); + } + else { + // use document provider + IDocument document = ((ITextEditor) ep).getDocumentProvider().getDocument(input); + if (document != null) { + result.put(file, document); + } + } + } + } + } + } + + +} diff --git a/product/com.excelsior.xds.core/.classpath b/product/com.excelsior.xds.core/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.core/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.core/.project b/product/com.excelsior.xds.core/.project new file mode 100644 index 0000000..0bed8c8 --- /dev/null +++ b/product/com.excelsior.xds.core/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.core + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.core/META-INF/MANIFEST.MF b/product/com.excelsior.xds.core/META-INF/MANIFEST.MF new file mode 100644 index 0000000..2e0d82b --- /dev/null +++ b/product/com.excelsior.xds.core/META-INF/MANIFEST.MF @@ -0,0 +1,77 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.core;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.core.XdsCorePlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.core.resources, + org.apache.commons.io, + org.codehaus.jackson.core, + org.codehaus.jackson.mapper, + org.apache.commons.lang, + org.apache.commons.collections, + org.eclipse.core.expressions, + org.ini4j, + org.eclipse.equinox.p2.core, + org.eclipse.equinox.p2.metadata, + org.eclipse.equinox.p2.repository, + org.apache.commons.beanutils, + org.eclipse.core.variables, + org.eclipse.help, + org.eclipse.core.filebuffers, + com.google.guava, + org.eclipse.ui.ide, + org.eclipse.e4.core.contexts, + org.eclipse.e4.core.di, + org.json, + org.eclipse.core.filesystem, + org.eclipse.team.core +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.core, + com.excelsior.xds.core.builders, + com.excelsior.xds.core.compiler.compset, + com.excelsior.xds.core.compiler.driver, + com.excelsior.xds.core.compiler.libset, + com.excelsior.xds.core.console, + com.excelsior.xds.core.dependency.injection, + com.excelsior.xds.core.exceptions, + com.excelsior.xds.core.expressions, + com.excelsior.xds.core.extensionpoint, + com.excelsior.xds.core.fileset, + com.excelsior.xds.core.filesystems.history, + com.excelsior.xds.core.help, + com.excelsior.xds.core.jobs, + com.excelsior.xds.core.ldp, + com.excelsior.xds.core.log, + com.excelsior.xds.core.marker, + com.excelsior.xds.core.natures, + com.excelsior.xds.core.preferences, + com.excelsior.xds.core.process, + com.excelsior.xds.core.progress, + com.excelsior.xds.core.project, + com.excelsior.xds.core.project.launcher, + com.excelsior.xds.core.resource, + com.excelsior.xds.core.resource.visitor, + com.excelsior.xds.core.sdk, + com.excelsior.xds.core.templates, + com.excelsior.xds.core.text, + com.excelsior.xds.core.todotask, + com.excelsior.xds.core.tool, + com.excelsior.xds.core.updates.descriptor, + com.excelsior.xds.core.updates.dropins, + com.excelsior.xds.core.updates.resources, + com.excelsior.xds.core.utils, + com.excelsior.xds.core.utils.collections, + com.excelsior.xds.core.utils.io, + com.excelsior.xds.core.utils.json, + com.excelsior.xds.core.utils.launch, + com.excelsior.xds.core.utils.time, + com.excelsior.xds.core.variables +Import-Package: org.eclipse.core.variables, + org.eclipse.debug.core, + org.eclipse.ui.ide diff --git a/product/com.excelsior.xds.core/build.properties b/product/com.excelsior.xds.core/build.properties new file mode 100644 index 0000000..0dc34f7 --- /dev/null +++ b/product/com.excelsior.xds.core/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties diff --git a/product/com.excelsior.xds.core/plugin.properties b/product/com.excelsior.xds.core/plugin.properties new file mode 100644 index 0000000..c03c527 --- /dev/null +++ b/product/com.excelsior.xds.core/plugin.properties @@ -0,0 +1,20 @@ +pluginName=XDS Modula-2 Core + +contentTypeName.xds=XDS +contentTypeName.xdsSource=XDS Source +contentTypeName.mod=Modula-2 Program Module +contentTypeName.def=Modula-2 Definition Module +contentTypeName.ob2=Oberon-2 Module +contentTypeName.odf=Oberon-2 Pseudo Definition Module +contentTypeName.sym=XDS Symbol file + +contentTypeName.pkt=XDS Debug Script +contentTypeName.ldp=XDS Debug Scripts Bundle +contentTypeName.res=XDS Debug Script Output + +contentTypeName.prj=XDS Project File +contentTypeName.text=XDS Text File +contentTypeName.html=HTML File + +marker.build_problem.name=XDS Modula-2 Build Problem +marker.parser_problem.name=XDS Modula-2 Source Code Problem \ No newline at end of file diff --git a/product/com.excelsior.xds.core/plugin.xml b/product/com.excelsior.xds.core/plugin.xml new file mode 100644 index 0000000..6ea2b5f --- /dev/null +++ b/product/com.excelsior.xds.core/plugin.xml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/XdsCorePlugin.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/XdsCorePlugin.java new file mode 100644 index 0000000..cfc532e --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/XdsCorePlugin.java @@ -0,0 +1,48 @@ +package com.excelsior.xds.core; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class XdsCorePlugin extends AbstractUIPlugin implements BundleActivator { + + /** + * The plug-in identifier of the XDS Modula-2 core support + */ + public static final String PLUGIN_ID = "com.excelsior.xds.core"; //$NON-NLS-1$ + + /** + * IContentType id for XDS File + */ + public final static String CONTENT_TYPE_XDS_FILE = "com.excelsior.xds.contenttype.xdsFile"; //$NON-NLS-1$ + + /** + * IContentType id for XDS Source Unit + */ + public final static String CONTENT_TYPE_XDS_SOURCE = "com.excelsior.xds.contenttype.xdsSource"; //$NON-NLS-1$ + + private static BundleContext context; + private static AbstractUIPlugin plugin; + + public static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + super.start(bundleContext); + XdsCorePlugin.context = bundleContext; + plugin = this; + } + + public void stop(BundleContext bundleContext) throws Exception { + XdsCorePlugin.context = null; + } + + public static AbstractUIPlugin getDefault() { + return plugin; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettings.java new file mode 100644 index 0000000..be81ab9 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettings.java @@ -0,0 +1,220 @@ +package com.excelsior.xds.core.builders; + +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Instances of this class represent a XDS compiler settings. + * A rich set of XDS compiler settings allows you to control the source language, + * the generated code, and the internal limits and settings. We distinguish + * between boolean options (or just options) and equations. An option can be + * set ON (TRUE) or OFF (FALSE), while an equation value is a string. + */ +public class BuildSettings { + + private final File prjFile; + private final Sdk sdk; + private final File workDir; + + private final LookupSettings lookups = new LookupSettings(); + + /** + * These equations sets the extensions of the binary artifacts files produced by build. + */ + private static final Set DERIVED_RESOURCE_EXTENSION_EQUATIONS = new HashSet<>(Arrays.asList("OBJEXT", "EXEEXT", + "LIBEXT", "SYM")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + /** + * Extensions discovered from compiler. + */ + private final Set derivedResourcesExtensions = new HashSet<>(); + + /** + * XDS compiler options. An option is a pair (name,value), where value + * can be set ON (true) or OFF (false). + */ + private final Map options = new HashMap(); + + /** + * XDS compiler equations. An equation is a pair (name,value), where value + * is in general case an arbitrary string. + * + */ + private final Map equations = new HashMap(); + + + + public BuildSettings() { + this(null, null, null); + } + + public BuildSettings(Sdk sdk, File workDir) { + this(sdk, workDir, null); + } + + public BuildSettings(Sdk sdk, File workDir, File prjFile) { + this.prjFile = prjFile; + this.sdk = sdk; + this.workDir = workDir; + } + + public BuildSettingsKey createKey() { + return new BuildSettingsKey(getSdk(), getWorkDir(), getPrjFile()); + } + + public File getPrjFile() { + return prjFile; + } + + public Sdk getSdk() { + return sdk; + } + + public File getWorkDir() { + return workDir; + } + + + public void setLookupEquations(String lookupEquations) throws IOException { + lookups.setLookupEquations(lookupEquations, getWorkDir()); + } + + public File lookup(String name) { + return lookups.lookup(name); + } + + /** + * Returns all lookup directories to search for files with given file name pattern. + * + * @param fileName - file name to search for (something like "zz.def") + * @return - list of all lookup directories for the given file name pattern. + */ + public List getLookupDirs(String fileName) { + return lookups.getLookupDirs(fileName); + } + + public List getLookupDirs() { + return lookups.getLookupDirs(); + } + + /** + * Adds the specified option to this compiler settings. If the settings + * previously contained the option, the old value is replaced by + * the specified value. + * + * @param name the unique option name + * @param enabled the initial enabled state + * + * @return the previous value associated with the option, or + * {@code null} if there was no this option in the settings. + */ + public Boolean addOption(String name, boolean enabled) { + return options.put(name.trim().toUpperCase(), enabled); + } + + /** + * Returns the enabled state of the specified option, + * or {@code false} if this settings contains no such option. + * + * @param name the option name whose value is to be returned + * + * @return the enabled sate of the specified option, or + * {@code false} if this settings contains no such option + */ + public boolean getOption(String name) { + Boolean value = options.get(name.trim().toUpperCase()); + return (value != null) && value; + } + + + /** + * Returns true if this compiler settings contains the specified option. + * + * @param name the option name whose presence in this settings is to be tested + * + * @return true if this settings contains the specified option + */ + public boolean isOptionDefined(String name) { + return options.containsKey(name.trim().toUpperCase()); + } + + + /** + * Adds the specified option to this compiler settings if it is not already + * present. If this settings already contains the option, the call leaves + * the settings unchanged and returns false. + * + * @param name the unique equation name + * @param value the initial value of equation. + * + * @return the previous value associated with the equation, or + * null if there was no this equation in the settings. + */ + public String addEquation(String name, String value) { + if (value != null) + value = value.trim(); + String equationName = name.trim().toUpperCase(); + if (DERIVED_RESOURCE_EXTENSION_EQUATIONS.contains(equationName)) { + derivedResourcesExtensions.add(value); + } + return equations.put(equationName, value); + } + + public Set getDerivedResourcesExtensions(){ + return derivedResourcesExtensions; + } + + /** + * Returns the value of the specified equation, + * or {@code false} if this settings contains no such equation. + * + * @param name the equation name whose value is to be returned + * + * @return the value of the specified equation, or + * {@code false} if this settings contains no such equation + */ + public String getEquation(String name) { + return equations.get(name.trim().toUpperCase()); + } + + /** + * Returns true if this compiler settings contains the specified equation. + * + * @param name the equation name whose presence in this settings is to be tested + * + * @return true if this settings contains the specified equation + */ + public boolean isEquationDefined(String name) { + return equations.containsKey(name.trim().toUpperCase()); + } + + + /** + * Creates and returns a copy of this compiler settings. + */ + @Override + public BuildSettings clone() { + BuildSettings newInstance = new BuildSettings(sdk, workDir, prjFile); + newInstance.options.putAll(options); + newInstance.equations.putAll(equations); + newInstance.lookups.copy(lookups); + return newInstance; + } + + /* + * For the debug purposes + */ + @Override + public String toString() { + return "BuildSettings [options=" + options + ", equations=" + equations //$NON-NLS-1$ //$NON-NLS-2$ + + "]"; //$NON-NLS-1$ + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKey.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKey.java new file mode 100644 index 0000000..1cef8d8 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKey.java @@ -0,0 +1,85 @@ +package com.excelsior.xds.core.builders; + +import java.io.File; + +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Helper class to obtain the {@link BuildSettings}. + * Also used as the utility class to store BuildSettings in hash tables.
+ * + * @author lsa80 + */ +/** + * @author lsa + * + */ +public class BuildSettingsKey{ + public final Sdk sdk; + public final File workingDir; + public final File prjFile; + + public BuildSettingsKey(Sdk sdk, File workingDir, File prjFile) { + this.sdk = sdk; + this.workingDir = workingDir; + this.prjFile = prjFile; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((prjFile == null) ? 0 : prjFile.hashCode()); + result = prime * result + ((sdk == null) ? 0 : sdk.hashCode()); + result = prime * result + + ((workingDir == null) ? 0 : workingDir.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + BuildSettingsKey other = (BuildSettingsKey) obj; + if (prjFile == null) { + if (other.prjFile != null) + return false; + } else if (!prjFile.equals(other.prjFile)) + return false; + if (sdk == null) { + if (other.sdk != null) + return false; + } else if (!equals(sdk, other.sdk)) + return false; + if (workingDir == null) { + if (other.workingDir != null) + return false; + } else if (!workingDir.equals(other.workingDir)) + return false; + return true; + } + + private static boolean equals(Sdk sdk1, Sdk sdk2) { + if (!StringUtils.equals(sdk1.getCompilerExecutablePath(), sdk2.getCompilerExecutablePath())) { + return false; + } + + if (!StringUtils.equals(sdk1.getSdkHomePath(), sdk2.getSdkHomePath())) { + return false; + } + return true; + } + + @Override + public String toString() { + return "BuildSettingsKey [sdk=" + sdk + ", workingDir=" + workingDir + + ", prjFile=" + prjFile + "]"; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKeyFactory.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKeyFactory.java new file mode 100644 index 0000000..9834c72 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/BuildSettingsKeyFactory.java @@ -0,0 +1,110 @@ +package com.excelsior.xds.core.builders; + +import java.io.File; +import java.io.IOException; + +import org.eclipse.core.filesystem.EFS; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.SdkManager; +import com.excelsior.xds.core.sdk.SdkUtils; + +public class BuildSettingsKeyFactory { + private static final BuildSettingsKey DEFAULT_KEY = DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + + public static BuildSettingsKey createBuildSettingsKey(IProject p) { + return createBuildSettingsKey(p, (File)null); + } + + public static BuildSettingsKey createBuildSettingsKey(IFile sourceIFile) { + if (sourceIFile == null) { + return DEFAULT_KEY; + } + IProject project = sourceIFile.getProject(); + return createBuildSettingsKey(project, ResourceUtils.getAbsoluteFile(sourceIFile)); + } + + public static BuildSettingsKey createBuildSettingsKey(IProject project, File sourceFile) { + if (project != null){ + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + return createBuildSettingsKey(xdsProjectSettings, sourceFile); + } + else { + return DEFAULT_KEY; // use default key + } + } + + public static BuildSettingsKey createBuildSettingsKey(IProject project, IFileStore sourceFile) { + return createBuildSettingsKey(project, toFile(sourceFile)); + } + + private static File toFile(IFileStore moduleFileStore) { + if (moduleFileStore == null) { + return null; + } + + try { + return EFS.SCHEME_FILE.equals(moduleFileStore.toURI().getScheme()) ? ResourceUtils.getAbsoluteFile(moduleFileStore) : null; + } catch (CoreException e) { + return null; + } + } + + private static BuildSettingsKey createBuildSettingsKey(XdsProjectSettings xdsProjectSettings, File sourceFile) { + Sdk sdk = xdsProjectSettings.getProjectSdk(); + if (SdkUtils.isInsideSdkLibraryDefinitions(sdk, ResourceUtils.toFileStore(sourceFile))) { + return DEFAULT_KEY; + } + + IFile prjIFile = ProjectUtils.getPrjFile(xdsProjectSettings); + + File prjFile = prjIFile != null ? ResourceUtils.getAbsoluteFile(prjIFile) : null; + File workDir = getWorkingDir(xdsProjectSettings, sourceFile, prjFile); + return createBuildSettingsKey(sdk, prjFile, workDir); + } + + private static BuildSettingsKey createBuildSettingsKey(Sdk sdk, + File prjFile, File workDir) { + if (sdk == null) { + if (prjFile != null) { + try { + sdk = SdkManager.getInstance().getSdkSimulator(); + } catch (IOException e) { + LogHelper.logError("Build settings creation error", e); //$NON-NLS-1$ + return DEFAULT_KEY; + } + } + } + return new BuildSettingsKey(sdk, workDir, prjFile); + } + + private static File getWorkingDir(XdsProjectSettings xdsProjectSettings, File sourceFile, File prjFile) + { + File workingDir = null; + try { + workingDir = xdsProjectSettings.getXdsWorkingDir(); + } catch (CoreException e) { + // ignore + } + if (workingDir != null) { + return workingDir; + } + else if (prjFile != null) { + return prjFile.getParentFile(); + } + else if (sourceFile != null) { + return ResourceUtils.getAbsolutePathAsInFS(sourceFile).getParentFile(); + } + + return null; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/DefaultBuildSettingsHolder.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/DefaultBuildSettingsHolder.java new file mode 100644 index 0000000..5fd376e --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/DefaultBuildSettingsHolder.java @@ -0,0 +1,54 @@ +package com.excelsior.xds.core.builders; + +import com.excelsior.xds.core.sdk.XdsOptions; + +public class DefaultBuildSettingsHolder { + public static final BuildSettings DefaultBuildSettings; + public static final BuildSettingsKey DefaultBuildSettingsKey; + + static { + DefaultBuildSettings = new BuildSettings(); + + DefaultBuildSettings.addOption(XdsOptions.O2ISOPRAGMA, true); + DefaultBuildSettings.addOption(XdsOptions.M2EXTENSIONS, false); + DefaultBuildSettings.addOption(XdsOptions.CPPCOMMENTS, false); + + DefaultBuildSettings.addOption(XdsOptions.ASSERT, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKDINDEX, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKDIV, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKINDEX, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKNIL, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKPROC, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKRANGE, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKSET, true); + DefaultBuildSettings.addOption(XdsOptions.CHECKTYPE, true); + DefaultBuildSettings.addOption(XdsOptions.COVERFLOW, true); + DefaultBuildSettings.addOption(XdsOptions.IOVERFLOW, true); + DefaultBuildSettings.addOption(XdsOptions.FOVERFLOW, true); + + DefaultBuildSettings.addOption(XdsOptions.STORAGE, false); + DefaultBuildSettings.addOption(XdsOptions.M2ADDTYPES, false); + DefaultBuildSettings.addOption(XdsOptions.M2BASE16, false); + DefaultBuildSettings.addOption(XdsOptions.M2CMPSYM, false); + DefaultBuildSettings.addOption(XdsOptions.M2EXTENSIONS, false); + DefaultBuildSettings.addOption(XdsOptions.O2EXTENSIONS, false); + DefaultBuildSettings.addOption(XdsOptions.O2ISOPRAGMA, false); + DefaultBuildSettings.addOption(XdsOptions.O2NUMEXT, false); + DefaultBuildSettings.addOption(XdsOptions.O2ADDKWD, false); + + DefaultBuildSettings.addOption(XdsOptions.TOPSPEED, false); + + DefaultBuildSettings.addOption(XdsOptions.MAKEDEF, false); + DefaultBuildSettings.addOption(XdsOptions.BSCLOSURE, false); + DefaultBuildSettings.addOption(XdsOptions.BSREDEFINE, false); + DefaultBuildSettings.addOption(XdsOptions.BSALPHA, false); + + DefaultBuildSettings.addOption(XdsOptions.CHANGESYM, false); + DefaultBuildSettings.addOption(XdsOptions.MAIN, false); + DefaultBuildSettings.addOption(XdsOptions.XCOMMENTS, false); + + DefaultBuildSettings.addOption(XdsOptions.CHECKDZ, true); + + DefaultBuildSettingsKey = DefaultBuildSettings.createKey(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/LookupSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/LookupSettings.java new file mode 100644 index 0000000..21b9a70 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/LookupSettings.java @@ -0,0 +1,132 @@ +package com.excelsior.xds.core.builders; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.StringReader; +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +import org.apache.commons.lang.StringUtils; + +public final class LookupSettings { + + private final List lookups = new ArrayList(); + + /** + * @param name - file or module name ("zz.def" or "zz" to search "zz.def" | "zz.ob2" | "zz.sym") + * @return + */ + public File lookup(String name) { + File res; + if (name.contains(".")) { + res = lookupFile(name); + } else { + res = lookupFile(name + ".def"); //$NON-NLS-1$ + if (res == null) { + res = lookupFile(name + ".ob2"); //$NON-NLS-1$ + } + if (res == null) { + res = lookupFile(name + ".sym"); //$NON-NLS-1$ + } + } + return res; + } + + + public void setLookupEquations(String lookupEquations, File workDirectory) throws IOException { + String line; + BufferedReader br = new BufferedReader(new StringReader(lookupEquations)); + while ((line = br.readLine()) != null) { + line = line.trim(); + if (line.isEmpty()) { + continue; + } + + int eqpos = line.indexOf("="); + String patt = line.substring(0, eqpos); + String sdirs = line.substring(eqpos+1).trim(); + if (sdirs.isEmpty()) { + continue; + } + + Lookup lookup = new Lookup(patt); + + String[] dirs = StringUtils.split(sdirs, File.pathSeparatorChar); + for (String dir : dirs) { + File f = new File(dir.trim()); + if (!f.isAbsolute()) { + f = new File(workDirectory, dir); + } + try { + String s = f.getCanonicalPath(); + f = new File(s); + lookup.dirs.add(f); + } catch (IOException e) { + } + } + + if (!lookup.dirs.isEmpty()) { + lookups.add(lookup); + } + } + } + + /** + * Returns all lookup directories to search for files with given file name pattern. + * + * @param fileName - file name to search for (something like "zz.def") + * @return - list of all lookup directories for the given file name pattern. + */ + public List getLookupDirs(String fileName) { + List res = new ArrayList(); + for (Lookup lookup : lookups) { + try { + if (lookup.regComp.match(fileName, 0)) { + for (File dir : lookup.dirs) { + res.add(dir); + } + } + } catch (IllegalStateException e) { + } + } + return res; + } + + public List getLookupDirs(){ + return lookups.stream().flatMap(l -> l.dirs.stream()).distinct().collect(Collectors.toList()); + } + + private File lookupFile(String name) { + for (Lookup lookup : lookups) { + try { + if (lookup.regComp.match(name, 0)) { + for (File dir : lookup.dirs) { + File f = new File(dir, name); + if (f.isFile()) { + return f; + } + } + } + } catch (IllegalStateException e) { + } + } + return null; + } + + private final static class Lookup { + RegComp regComp; + List dirs; + + public Lookup(String regExpr) { + regComp = new RegComp(regExpr, File.pathSeparatorChar != ';'); + dirs = new ArrayList(3); + } + } + + void copy(LookupSettings that) { + lookups.clear(); + lookups.addAll(that.lookups); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/RegComp.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/RegComp.java new file mode 100644 index 0000000..e2cd56f --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/RegComp.java @@ -0,0 +1,588 @@ +package com.excelsior.xds.core.builders; + +/** Copyright (c) 1993 xTech Ltd, Russia. All Rights Reserved. */ +/** Utility library: regular expressions */ +/* Leo 07-Oct-89 */ +/* O2: Ned 10-Sep-92/01-Mar-93 */ +/* Translated to Java *FSA 14-Mar-13 */ + +public class RegComp { + + public RegComp(String expr, boolean caseSensitive) { + this.caseSensitive = caseSensitive; + errPos = -1; + parsePos = 0; // global + + if (!caseSensitive) { + this.expr = expr.toUpperCase(); + } + else { + this.expr = expr; + } + + // check that all chars are in 0..255 range: + for (int i=0; i 255) { + errPos = i; + return; + } + } + + try { + regExpr = re(); + regExpr.res = new Result(); + } catch (ArgException e) { + // e.printStackTrace(); + errPos = parsePos; + } + } + + /** + * @return -1 when Ok or error position in the expression string + */ + public int getErrPos() { + return errPos; + } + + /** + * Returns TRUE, iff expression matches with string "s" starting from position "pos". + * @throws Exception + * + */ + public boolean match(String s, int pos) throws IllegalStateException { + if (!caseSensitive) { + s = s.toUpperCase(); + } + for (int i = 0; i < regExpr.res.len.length; ++i) { + regExpr.res.len[i] = 0; + regExpr.res.pos[i] = 0; + } + if (errPos < 0) { + return match0(regExpr, s, pos, new VarInt(0), regExpr.res); + } else { + return false; // bad idea to match with bad regExpr + } + } + + /** + * Returns the length of the substring matched to "$n" at last + * call of match() + * + * @param n 0..9 + * @return + */ + public int len(int n) { + try { + return regExpr.res.len[n]; + } catch (Exception e) { + return 0; + } + } + + /** + * Returns the position of the beginning of the substring + * matched to "$n" at last call of match() + * + * @param n 0..9 + * @return + */ + public int pos(int n) { + try { + return regExpr.res.pos[n]; + } catch (Exception e) { + return 0; + } + } + + /** + * @return TRUE if expression does not contain wildcards + */ + public boolean isConst() { + Expr re = regExpr; + while (re.kind==par) { + re = re.next; + } + return re.kind==str && re.next==null; + } + + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + ////////////////////////////////////////////////////////////////////////////// + + private final String expr; + private final boolean caseSensitive; + private int parsePos; + private int errPos; // -1 or err position + + private Expr regExpr; + + + private static final int str = 0; + private static final int any = 1; // "?" + private static final int set = 2; // "[]" + private static final int bra = 3; // "{}" + private static final int seq = 4; // "*" + private static final int and = 5; // "&" + private static final int or = 6; // "|" + private static final int not = 7; // "^" + private static final int par = 8; // "()" + + private static class Expr { + Expr next; + int nres; + Result res; + int kind; + Expr left; // right=next + String pat; + boolean leg[]; //[256] + + public Expr(int kind) { + this.kind = kind; + nres = -1; + } + } + + private static class Result { + final int pos[]; // [10] + final int len[]; // [10] + + public Result() { + pos = new int[10]; + len = new int[10]; + } + } + + private static class VarInt { + public int val; + public VarInt(int i) {val=i;} + } + + + /** + * @param offset = 0 - next char (expr[i] in oberon prototype) + * @return char ot 0C when out of range + */ + private char peekChar(int offset) { + return parsePos+offset < expr.length() ? expr.charAt(parsePos+offset) : 0; + } + + /** + * @param num drop this number of chars + * @return 1st dropped char or 0C when EOL + */ + private char dropChars(int num) { + char ch = peekChar(0); + parsePos = Math.min(parsePos+num, expr.length()); + return ch; + } + + + private Expr app_new(Expr reg[], int kind) throws ArgException { + Expr n = new Expr(kind); + if (reg[0] == null) { + reg[0] = n; + } else { + Expr t = reg[0]; + while (t.next != null) { + t = t.next; + } + if (kind == seq && t.kind == seq) { + throw new ArgException(); + } else { + t.next = n; + } + } + return n; + } + + private void dollar(Expr n) throws ArgException { + if (peekChar(0) == '$') { + char ch = peekChar(1); + if ('0' <= ch && ch <= '9') { + n.nres = ch - '0'; + dropChars(2); + } else { + throw new ArgException(); + } + } + } + + private char esc() throws ArgException { + char c = dropChars(1); + if (c == 0) { + throw new ArgException(); + } + if ('0'<=c && c<='7') { + c -= '0'; + for (int n=0; n<=1; ++n) { + char cc = dropChars(1); + if ('0'<=cc && cc<='7') { + c = (char)(c*8 + cc - '0'); + } else { + throw new ArgException(); + } + } + } + return c; + } + + private void fill_set_incl(char ch, Expr n, char from, boolean range) throws ArgException { + if (!range) { + n.leg[ch] = true; + } else { + if (from>ch) { + throw new ArgException(); + } else { + for (int i=from; i<=ch; ++i) { + n.leg[i] = true; + } + } + } + } + + + private void fill_set(Expr n) throws ArgException { + n.leg = new boolean[256]; + for (int j=0; j<256; ++j) n.leg[j] = false; + boolean range = false; + char from = 0; + char q; + if (dropChars(1) == '[') { + q = ']'; + } else { + q = '}'; + n.kind = bra; + } + boolean inv = (peekChar(0) == '^'); + if (inv) dropChars(1); + if (peekChar(0) == q) { + throw new ArgException(); + } + while (true) { + char ch = peekChar(0); + if (ch == 0 || ch == q) { + break; + } else if (ch=='\\' && peekChar(1)!=0) { + dropChars(1); + ch = esc(); + fill_set_incl(ch, n, from, range); + range = false; + } else if (ch=='-' && peekChar(1) != q) { + range = true; // next char will be right bound of the range + dropChars(1); + } else { + // btw: "[1-5-7]" seems equal to "[1-7]" :) (in RegComp.ob2 too) + fill_set_incl(ch, n, from, range); + from = ch; // save prev char + range = false; + dropChars(1); + } + } + if (dropChars(1) !=q || range) { + throw new ArgException(); + } else { + if (inv) { + for (int j=0; j= 0) { + break; + } + if (ch=='\\' && peekChar(1)!=0) { + dropChars(1); + ch = esc(); + sb.append(ch); + } else { + sb.append(ch); + dropChars(1); + } + } + n.pat = sb.toString(); + } + + + private Expr simple() throws ArgException { + if (peekChar(0) == 0) { + throw new ArgException(); + } + Expr reg[] = new Expr[1]; + while(true) { + char ch = peekChar(0); + if (ch == 0) { + break; + } + if (("()|&^").indexOf(ch) >= 0) break; + Expr n; + if (ch == '*') { n = app_new(reg, seq); dropChars(1); } + else if (ch == '?') { n = app_new(reg, any); dropChars(1); } + else if (ch == '{') { n = app_new(reg, set); fill_set(n); } + else if (ch == '[') { n = app_new(reg, set); fill_set(n); } + else { n = app_new(reg, str); fill_str(n); } + dollar(n); + } + return reg[0]; + } + + private Expr factor() throws ArgException { + Expr reg; + char ch = peekChar(0); + if (ch == 0) { + throw new ArgException(); + } else if (ch == '(') { + dropChars(1); + reg = new Expr(par); + reg.next = re(); + if (peekChar(0) == ')') { + dropChars(1); + dollar(reg); + } else { + throw new ArgException(); + } + } else if (ch == '^') { + dropChars(1); + reg = new Expr(not); + reg.next = factor(); + if (reg.next.nres>=0) { + reg.nres = reg.next.nres; + reg.next.nres = -1; + } + } else { + reg = simple(); + char cc = peekChar(0); + if (cc=='^' || cc=='(') { + Expr last = reg; + while (last.next != null && (last.kind==str || last.kind==any || last.kind==set || last.kind==bra)) { + last = last.next; + } + last.next = factor(); + } + } + return reg; + } + + private Expr term() throws ArgException { + Expr reg = factor(); + if (peekChar(0)=='&') { + dropChars(1); + Expr t = new Expr(and); + t.left = reg; + reg = t; + reg.next = term(); + } + return reg; + } + + private Expr re() throws ArgException { + Expr reg = term(); + if (peekChar(0)=='|') { + dropChars(1); + Expr t = new Expr(or); + t.left = reg; + reg = t; + reg.next = re(); + } + return reg; + } + + + // matcher //////////////////////////////////////////////////////////// + + private boolean bra_seq_end(Expr reg, int n, Result rs, int p, VarInt stop) { + while (reg != null && (reg.kind==bra || reg.kind==seq)) { + reg=reg.next; + } + if (reg != null) { + return false; + } else { + if (n>=0) { + rs.len[n] = p - rs.pos[n]; + } + stop.val = p; + return true; + } + } + + private boolean match0(Expr reg, String s, int p, VarInt stop, Result rs) throws IllegalStateException { + stop.val = p; + if (reg == null) { + return p >= s.length(); + } + int n = reg.nres; + if (p >= s.length()) { + return (reg.kind == seq || reg.kind == bra) && reg.next == null; + } + if (reg.kind == any) { + if (n >= 0) { + rs.pos[n] = p; + rs.len[n] = 1; + } + return match0(reg.next, s, p+1, stop, rs); + } else if (reg.kind == seq) { + if (n >= 0) { + rs.pos[n] = p; + } + while (p < s.length()) { + if (match0(reg.next, s, p, stop, rs)) { + if (n >= 0) { + rs.len[n] = p-rs.pos[n]; + } + return true; + } + ++p; + } + return bra_seq_end(reg, n, rs, p, stop); + } else if (reg.kind == set) { + char ch = s.charAt(p); + if (!reg.leg[ch]) { + return false; + } + if (n >= 0) { + rs.pos[n] = p; + rs.len[n] = 1; + } + return match0(reg.next, s, p+1, stop, rs); + } else if (reg.kind == bra) { + if (n >= 0) { + rs.pos[n] = p; + } + while (p < s.length()) { + if (match0(reg.next, s, p, stop, rs)) { + if (n >= 0) { + rs.len[n] = p - rs.pos[n]; + } + return true; + } + char ch = s.charAt(p); + if (!reg.leg[ch]) { + return false; + } + ++p; + } + return bra_seq_end(reg, n, rs, p, stop); + } else if (reg.kind == str) { + if (n >= 0) { + rs.pos[n] = p; + } + for (int i=0; i < reg.pat.length(); ++i) { + if (s.charAt(p) != reg.pat.charAt(i)) { + return false; + } + ++p; + } + if (n >= 0) { + rs.len[n] = p - rs.pos[n]; + } + return match0(reg.next, s, p, stop, rs); + } else if (reg.kind == and) { + return match0(reg.left, s, p, stop, rs) && match0(reg.next, s, p, stop, rs); + } else if (reg.kind == or) { + return match0(reg.left, s, p, stop, rs) || match0(reg.next, s, p, stop, rs); + } else if (reg.kind == not) { + if (n >= 0) { + rs.pos[n] = p; + } + if (match0(reg.next, s, p, stop, rs)) { + return false; + } else { + p = s.length(); + stop.val = p; + } + if (n >= 0) { + rs.len[n] = p - rs.pos[n]; + } + return true; + } else if (reg.kind == par) { + if (n >= 0) { + rs.pos[n] = p; + } + if (match0(reg.next, s, p, stop, rs)) { + if (n >= 0) { + rs.len[n] = stop.val - rs.pos[n]; + } + return true; + } else { + return false; + } + } else { + throw new IllegalStateException("match0(): Internal error"); + } + } + +// // Not translated to java yet: +// +// PROCEDURE Substitute*(re: Expr; s-,m: ARRAY OF CHAR; VAR d: ARRAY OF CHAR); +// (** Substitutes the substrings of "s" matched with "re" instead +// of "$digit" in the "m" and copies the resulting string into "d". +// *) +// (* NB: 'm' cant be VAL because 'm' & 'd' may be the same variable *) +// VAR i,j,k,n,l: LONGINT; +// BEGIN +// i:=0; j:=0; +// IF LEN(d)=0 THEN RETURN END; +// WHILE (iLEN(d)-1 THEN l:=LEN(d)-j-1 END; +// IF k+l>LEN(s) THEN l:=LEN(s)-k END; +// WHILE (l>0) DO d[j]:=s[k]; INC(k); INC(j); DEC(l); END; +// INC(i,2) +// ELSE +// d[j]:=m[i]; INC(i); INC(j) +// END +// END; +// IF j= 0) { +// System.out.println("ErrPos = " + ep); +// return; +// } +// +// String tsts[] = { +// "azz", +// "a23.xx", +// "azzc", +// "zzc", +// "bzzc", +// "" +// }; +// for (String s : tsts) { +// boolean b = rc.match(s, 0); +// System.out.println("s=\"" + s + "\" res=" + b); +// for (int i=0; i<=9; ++i) { +// System.out.print(String.format("%d:[%d,%d] ", i, rc.pos(i), rc.len(i))); +// } +// System.out.println("\n---------------------------------------------"); +// } +// +// } +} + + diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsBuildResult.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsBuildResult.java new file mode 100644 index 0000000..0c02ed4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsBuildResult.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.builders; + +/** + * Compiler driver results + */ + +public enum XdsBuildResult { + SUCCESS, + ERROR, + TERMINATED +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsSourceBuilderConstants.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsSourceBuilderConstants.java new file mode 100644 index 0000000..86cef37 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/builders/XdsSourceBuilderConstants.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.core.builders; + +public abstract class XdsSourceBuilderConstants { + public static final String BUILDER_ID = "com.excelsior.xds.builder.compile.XdsSourceBuilder"; //$NON-NLS-1$ + + /** + * SKIP build/rebuild steps and perform update of the compilation file set + */ + public static final String GET_COMPILATION_SET_ONLY_KEY = "GET_COMPILATION_SET_ONLY_KEY"; //$NON-NLS-1$ + + /** + * SKIP build/rebuild steps and perform update of the library file set + */ + public static final String GET_LIBRARY_FILE_SET_ONLY_KEY = "GET_LIBRARY_FILE_SET_ONLY_KEY"; //$NON-NLS-1$ + + /** + * Include update of the library file set but dont skip another build steps + */ + public static final String GET_LIBRARY_FILE_SET_KEY = "GET_LIBRARY_FILE_SET"; //$NON-NLS-1$ + public static final String SOURCE_FILE_PATH_KEY_PREFIX = "SRC"; //$NON-NLS-1$ + + public static final String COMPILE_FILE_KEY = "COMPILE"; //$NON-NLS-1$ + public static final String BUILD_PROJECT_KEY = "BUILD_PROJECT"; //$NON-NLS-1$ + public static final String REBUILD_PROJECT_KEY = "REBUILD_PROJECT"; //$NON-NLS-1$ + +} + diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/CompilationSetManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/CompilationSetManager.java new file mode 100644 index 0000000..0ef913a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/CompilationSetManager.java @@ -0,0 +1,309 @@ +package com.excelsior.xds.core.compiler.compset; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.locks.Lock; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.compiler.driver.CompilationTarget; +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.console.IXdsConsole; +import com.excelsior.xds.core.fileset.FileSetManager; +import com.excelsior.xds.core.progress.IListenableProgressMonitor; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public class CompilationSetManager extends FileSetManager { + protected final Map> project2AbsolutePathesOfParents = new ConcurrentHashMap>(); + + /** + * Mapping of project name to name lookup. Name lookup is a map of file name to absolute path, if it is in the compilation set. + */ + protected final Map> projectName2NameLookup = new ConcurrentHashMap>(); + + protected final List compilationSetListeners = new CopyOnWriteArrayList(); + + public Set getCompilationSet(String projectName) { + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try { + return get(projectName); + } finally { + readLock.unlock(); + } + } + + /** + * TODO : get rid of console parameter + * @param project + * @param console + * @param monitor + * @return true if compilation set was updated, false if no action was taken + */ + public boolean updateCompilationSet(IProject project, IXdsConsole console, IListenableProgressMonitor monitor) { + if (!project.exists()) { + return false; + } + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + Sdk projectSdk = xdsProjectSettings.getProjectSdk(); + if (projectSdk != null) { + CompileDriver compileDriver = new CompileDriver(projectSdk, console, monitor); + CompilationTarget compilationTarget = new CompilationTarget(xdsProjectSettings); + List compilationSetFiles = compilationTarget.getCompilationSetFiles(compileDriver); + replaceCompilationSet(xdsProjectSettings.getProject(), compilationSetFiles); + } + return projectSdk != null; + } + + public void replaceCompilationSet(IProject project, Collection absolutePathes){ + Lock writeLock = readWriteLock.writeLock(); + writeLock.lock(); + try { + removeFromCompilationSet(project); + addToCompilationSet(project, absolutePathes); + } finally { + writeLock.unlock(); + } + } + + public void addToCompilationSet(IProject project, Collection absolutePathes){ + Lock writeLock = readWriteLock.writeLock(); + writeLock.lock(); + try{ + add(project.getName(), absolutePathes); + fillParents(project, absolutePathes); + fillNameLookup(project.getName(), absolutePathes); + } + finally{ + writeLock.unlock(); + } + notifyListenersAboutAdded(project, absolutePathes); + } + + public void removeFromCompilationSet(IProject project) { + Set absolutePathes; + String projectName = project.getName(); + Lock writeLock = readWriteLock.writeLock(); + writeLock.lock(); + + try{ + absolutePathes = projectName2AbsolutePathes + .get(projectName); + remove(projectName); + removeParents(project); + removeNameLookups(projectName); + } + finally{ + writeLock.unlock(); + } + + if (absolutePathes == null){ + absolutePathes = Collections.emptySet(); + } + + notifyListenersAboutRemoval(projectName, absolutePathes); + } + + public void removeFromCompilationSet(IProject project, String absolutePath) { + Lock writeLock = readWriteLock.writeLock(); + writeLock.lock(); + String projectName = project.getName(); + try{ + if (isInCompilationSet(projectName, absolutePath)) { + remove(projectName, absolutePath); + Set parents = getParents(project); + if (parents == null) { + parents = Collections.emptySet(); + } + Set allAncestorsInsideProject = getAllAncestorsInsideProject(project, absolutePath); + parents.removeAll(allAncestorsInsideProject); + removeSingleLookup(projectName, absolutePath); + } + } + finally{ + writeLock.unlock(); + } + notifyListenersAboutRemoval(projectName, Collections.singleton(absolutePath)); + } + + public boolean isInCompilationSet(IFile ifile) { + return isInCompilationSet(ifile.getProject().getName(), ResourceUtils.getAbsolutePath(ifile)); + } + + public boolean isInCompilationSet(String projectName, String absolutePath) { + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try { + return contained(projectName, absolutePath); + } finally { + readLock.unlock(); + + } + } + + public boolean isHasCompilationSetChildren(IProject project, String absolutePath) { + if (absolutePath == null) { + return false; + } + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try{ + Set parents = getParents(project); + if (parents == null) { + parents = Collections.emptySet(); + } + return parents.contains(absolutePath); + } + finally{ + readLock.unlock(); + } + } + + public String lookup(IProject project, String moduleFileName) { + if (project == null) { + return null; + } + return lookup(project.getName(), moduleFileName); + } + + /** + * Searches for the module in the compilation set. + * @return + * + * @param projectName - project name to search in + * @param moduleFileName - module file name (with extension) to search + * @return + */ + public String lookup(String projectName, String moduleFileName) { + if (moduleFileName == null) { + return null; + } + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try{ + Map lookup = getNameLookup(projectName); + if (lookup == null) { + return null; + } + return lookup.get(moduleFileName); + } + finally{ + readLock.unlock(); + } + } + + public void addCompilationSetListener(ICompilationSetListener csListener) { + compilationSetListeners.add(csListener); + } + + public void removeCompilationSetListener(ICompilationSetListener csListener) { + compilationSetListeners.remove(csListener); + } + + private static class CompilationSetManagerHolder{ + static CompilationSetManager INSTANCE = new CompilationSetManager(); + } + + public static CompilationSetManager getInstance(){ + return CompilationSetManagerHolder.INSTANCE; + } + + private Set getParents(IProject project) { + return project2AbsolutePathesOfParents + .get(project); + } + + private void fillParents(IProject project, + Collection absolutePathes) { + Set parents = getParents(project); + if (parents == null) { + parents = CollectionsUtils.newConcurentHashSet(); + project2AbsolutePathesOfParents.put(project, parents); + } + String absoluteProjectPath = ResourceUtils.getAbsolutePath(project); + for (String path : absolutePathes) { + if (!path.startsWith(absoluteProjectPath)) continue; + + Set allAncestorsInsideProject = getAllAncestorsInsideProject(project, path); + parents.addAll(allAncestorsInsideProject); + } + } + + private Set removeParents(IProject project) { + return project2AbsolutePathesOfParents.remove(project); + } + + private void fillNameLookup(String projectName, Collection absolutePathes) { + Map nameLookup = getNameLookup(projectName); + if (nameLookup == null) { + nameLookup = new ConcurrentHashMap(); + projectName2NameLookup.put(projectName, nameLookup); + } + + for (String path : absolutePathes) { + nameLookup.put(FilenameUtils.getName(path), path); + } + } + + private Map getNameLookup(String projectName) { + return projectName2NameLookup.get(projectName); + } + + private void removeNameLookups(String projectName) { + projectName2NameLookup.remove(projectName); + } + + private void removeSingleLookup(String projectName, String absolutePath) { + Map lookup = getNameLookup(projectName); + if (lookup == null) { + return; + } + String fileName = FilenameUtils.getName(absolutePath); + String filePath = lookup.get(fileName); + if (ResourceUtils.equalsPathesAsInFS(absolutePath, filePath)) { + lookup.remove(fileName); + } + } + + private static Set getAllAncestorsInsideProject(IProject project, String path) { + String absoluteProjectPath = ResourceUtils.getAbsolutePath(project); + Set allParentsInsideProject = new HashSet(); + String absoluteParentPath = ResourceUtils.getAbsoluteParentPathAsInFS(path); + do{ + allParentsInsideProject.add(absoluteParentPath); + if (absoluteProjectPath.equals(absoluteParentPath)) break; + absoluteParentPath = ResourceUtils.getAbsoluteParentPathAsInFS(absoluteParentPath); + if (absoluteParentPath == null) { // it is external compilation unit, so it is not inside the project + allParentsInsideProject.clear(); + break; + } + }while(absoluteParentPath != null); + return allParentsInsideProject; + } + + private void notifyListenersAboutRemoval(String projectName, + Set compilationSet) { + for (ICompilationSetListener listener : compilationSetListeners) { + listener.removed(projectName, compilationSet); + } + } + + private void notifyListenersAboutAdded(IProject project, + Collection absolutePathes) { + for (ICompilationSetListener listener : compilationSetListeners) { + listener.added(project.getName(), absolutePathes); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ExternalResourceManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ExternalResourceManager.java new file mode 100644 index 0000000..e8a0e3f --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ExternalResourceManager.java @@ -0,0 +1,277 @@ +package com.excelsior.xds.core.compiler.compset; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceFilterDescription; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.WorkspaceJob; +import org.eclipse.core.runtime.CoreException; +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.core.runtime.Status; +import org.eclipse.core.runtime.SubMonitor; + +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.XdsMarkerConstants; +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.JavaUtils; +import com.google.common.collect.Iterables; +import com.google.common.collect.Sets; + +public final class ExternalResourceManager { + private static final String LINK_DIRECTORY_PROBLEM_MARKER_TYPE = XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE; + + public static final void linkExternals(IProject p, Collection externalDirectories, boolean isLinkSdkDirectory, + boolean isLinkExternalDirectories, IProgressMonitor monitor) + throws CoreException { + Collection linkStatuses = new ArrayList<>(); + if (isLinkExternalDirectories) { + linkStatuses.addAll(ExternalResourceManager.linkExternalDirectories(p, externalDirectories, SubMonitor.convert(monitor))); + } + + if (isLinkSdkDirectory) { + linkStatuses.add(ExternalResourceManager.linkSdkDirectory(p, SubMonitor.convert(monitor))); + } + if (isLinkExternalDirectories || isLinkSdkDirectory) { + WorkspaceJob markersJob = new WorkspaceJob(Messages.ExternalResourceManager_UpdateOfProblemMarkers) { + @Override + public IStatus runInWorkspace(IProgressMonitor monitor) + throws CoreException { + p.deleteMarkers(LINK_DIRECTORY_PROBLEM_MARKER_TYPE, true, 1); + createLinkProblemMarkers(p, linkStatuses); + return Status.OK_STATUS; + } + }; + markersJob.setRule(p); + markersJob.schedule(); + ExternalResourceManager.cleanUnusedLinkedDirectories(p, externalDirectories); + } + } + + private static void createLinkProblemMarkers(IProject p, Collection linkStatuses) throws CoreException { + for (IStatus status : linkStatuses) { + if (!status.isOK()) { + int statusSeverity = status.getSeverity(); + int markerSeverity; + if (statusSeverity == IStatus.ERROR) { + markerSeverity = IMarker.SEVERITY_ERROR; + } + else if (statusSeverity == IStatus.WARNING) { + markerSeverity = IMarker.SEVERITY_WARNING; + } + else { + markerSeverity = IMarker.SEVERITY_INFO; + } + + IMarker marker = p.createMarker(LINK_DIRECTORY_PROBLEM_MARKER_TYPE); + marker.setAttribute(IMarker.MESSAGE, String.format(Messages.ExternalResourceManager_ErrorWhenLinkingExternalDirectory, status.getMessage())); + marker.setAttribute(IMarker.SEVERITY, markerSeverity); + } + } + } + + private static final Collection linkExternalDirectories(IProject p, Collection externalDirectories, IProgressMonitor monitor) throws CoreException { + monitor.beginTask(Messages.ExternalResourceManager_LinkingExternalFiles, externalDirectories.size()); + + Collection linkStatuses = new ArrayList<>(); + + recreateExternalsFolder(p.getName(), monitor); + IFolder externalsFolder = p.getFolder(SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME); + Path projectPath = new Path(ResourceUtils.getAbsolutePath(p)); + + try{ + for (File dir : externalDirectories) { + boolean isInsideProject = projectPath.isPrefixOf(new Path(dir.getAbsolutePath())); + if (dir.isDirectory() && !isInsideProject) { + linkStatuses.add(linkDirectory(p, externalsFolder, dir, monitor, true)); + monitor.worked(1); + } + } + } + finally{ + monitor.done(); + } + + return linkStatuses; + } + + private static final IStatus linkSdkDirectory(IProject p, IProgressMonitor monitor) throws CoreException { + monitor.beginTask(Messages.ExternalResourceManager_LinkingSdkFilesToResources, 1); + + IStatus status = Status.OK_STATUS; + + recreateExternalsFolder(p.getName(), monitor); + IFolder externalsFolder = p.getFolder(SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME); + + try{ + File libDefFile = getLibraryDefinitionsPath(p); + if (libDefFile != null){ + status = linkDirectory(p, externalsFolder, libDefFile, monitor, false); + } + } + finally{ + monitor.done(); + } + + return status; + } + + private static File getLibraryDefinitionsPath(IProject p) { + XdsProjectSettings projectSettings = XdsProjectSettingsManager.getXdsProjectSettings(p); + Sdk sdk = projectSettings.getProjectSdk(); + if (sdk != null && sdk.getLibraryDefinitionsPath() != null) { + File libDefFile = new File(sdk.getLibraryDefinitionsPath()); + if (libDefFile.isDirectory()) { + return libDefFile; + } + } + return null; + } + + private static final IStatus linkDirectory(IProject p, final IFolder externalsFolder, File directory, IProgressMonitor monitor, boolean filterOutSubfolders) throws CoreException { + IWorkspace workspace = ResourceUtils.getWorkspace(); + if (workspace == null){ + return Status.OK_STATUS; + } + List parts = ResourceUtils.getParts(directory); + IFolder folder = externalsFolder; + for (int i = 0; i < parts.size() - 1; i++) { + File part = parts.get(i); + folder = folder.getFolder(getName(part)); + if (!folder.exists()) { + folder.create(IResource.FORCE | IResource.VIRTUAL, true, monitor); + ResourceUtils.setAbsolutePathOfLinkedResourceAttribute(folder, part.getAbsolutePath()); + ResourceUtils.setSyntheticResourceAttribute(folder); + } + } + + IFolder linkedFolder = folder.getFolder(directory.getName()); + + if (linkedFolder.exists() && (linkedFolder.isVirtual() || linkedFolder.getLocation() == null)) { + // linkedFolder can be only linked or virtual folder (by the precondition of this method). + // It can be virtual folder (linkedFolder.getLocation() === null) if lookup directory was added and it was not linked before. + + linkedFolder.delete(true, monitor); + } + if (!linkedFolder.exists()){ + Path path = new Path(directory.getAbsolutePath()); + IStatus validateLinkLocationStatus = workspace.validateLinkLocation(linkedFolder, path); + if (!JavaUtils.areFlagsSet(validateLinkLocationStatus.getSeverity(), IStatus.ERROR | IStatus.CANCEL)){ + linkedFolder.createLink(path, IResource.NONE, monitor); + if (filterOutSubfolders) { + ResourceUtils.applyRegexFilter(linkedFolder, IResourceFilterDescription.EXCLUDE_ALL | IResourceFilterDescription.FOLDERS, ".*", monitor); //$NON-NLS-1$ + } + ResourceUtils.setAbsolutePathOfLinkedResourceAttribute(linkedFolder, directory.getAbsolutePath()); + ResourceUtils.refreshLocalSync(folder); + } + + return validateLinkLocationStatus; + } + + return Status.OK_STATUS; + } + + /** + * Deletes unused linked folders.
+ * TODO : 2016: this method should devise list of directories from the passed IProject. + * TODO : 2016: use progressMonitor + * @param p + * @param lookupDirectories + * @throws CoreException + */ + public static void cleanUnusedLinkedDirectories(IProject p, Collection lookupDirectories ) throws CoreException { + File libDefFile = getLibraryDefinitionsPath(p); + Iterable libDefFileIter = libDefFile != null? Arrays.asList(libDefFile) : Collections.emptyList(); + + Set expectedLinkedFolders = Sets.newHashSet(Iterables.concat(lookupDirectories, libDefFileIter)); + + IFolder externalsFolder = p.getFolder(SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME); + doCheckLinks(externalsFolder, expectedLinkedFolders); + } + + private static boolean doCheckLinks(IFolder f, Collection expectedFolders) throws CoreException { + boolean checkResult = false; + if (f.isLinked() && !f.isVirtual()) { + checkResult = expectedFolders.contains(ResourceUtils.getAbsoluteFile(f)); + } + else { + for (IResource child : f.members()) { + if (child instanceof IFolder) { + if (doCheckLinks((IFolder)child, expectedFolders)) { + checkResult = true; + } + } + } + } + + if (!checkResult) { + f.delete(true, new NullProgressMonitor()); + } + + return checkResult; + } + + private static String getName(File f){ + String name = f.getName(); + if (name.isEmpty()) { // file system root + name = f.getAbsolutePath().replaceAll("[:\\\\/]", StringUtils.EMPTY); //$NON-NLS-1$ + if (name.isEmpty()) { + return "ROOT"; //$NON-NLS-1$ + } + else { + return name; + } + } + else { + return name; + } + } + + /** + * This method changes resources; these changes will be reported + * in a subsequent resource change event. + * @param progressMonitor + * + */ + private static void recreateExternalsFolder(String projectName, IProgressMonitor monitor) { + recreateExternalsFolder(getProject(projectName), monitor); + } + + /** + * This method changes resources; these changes will be reported + * in a subsequent resource change event. + * + */ + public static void recreateExternalsFolder(IProject project, IProgressMonitor monitor) { + final IFolder externalsFolder = project.getFolder(SpecialFolderNames.VIRTUAL_MOUNT_ROOT_DIR_NAME); + try { + if (!externalsFolder.exists()) { + externalsFolder.create(IResource.FORCE | IResource.VIRTUAL, true, monitor); + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + private static IProject getProject(String projectName) { + return ResourceUtils.getProject(projectName); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ICompilationSetListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ICompilationSetListener.java new file mode 100644 index 0000000..29755f2 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/compset/ICompilationSetListener.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.core.compiler.compset; + +import java.util.Collection; + +/** + * Notifies about the changes in Compilation Set. If file in compilation set, but external its addition or removal from compilation + * set will generate appropriate event, but it is possible that external resource will not be mapped to workspace at the moment. + * Thus, listeners who need corresponding workspace resource, must also listen to workspace deltas. + * TODO : fix this, so + * + * @author lsa80 + */ +public interface ICompilationSetListener { + /** + * @param projectName + * @param pathes - the following paths were added to the compilationSet of the project + */ + public void added(String projectName, Collection pathes); + + /** + * @param projectName + * @param pathes - the following paths were removed from the compilationSet of the project + */ + public void removed(String projectName, Collection compilationSet); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompilationTarget.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompilationTarget.java new file mode 100644 index 0000000..d147854 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompilationTarget.java @@ -0,0 +1,57 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.util.List; + +import org.eclipse.core.resources.IFile; + +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectType; +import com.excelsior.xds.core.resource.ResourceUtils; + +/* + * Either main module or XDS prj file + */ +public class CompilationTarget{ + private XdsProjectType xdsProjectType; + private IFile compilationTargetFile; + + public CompilationTarget(XdsProjectSettings xdsProjectSettings) { + this.xdsProjectType = xdsProjectSettings.getProjectType(); + switch (xdsProjectType) { + case MAIN_MODULE: + this.compilationTargetFile = ProjectUtils.getMainModuleFile(xdsProjectSettings); + break; + case PROJECT_FILE: + this.compilationTargetFile = ProjectUtils.getPrjFile(xdsProjectSettings); + break; + default: + throw new IllegalArgumentException("Unexpected xdsProjectType"); //$NON-NLS-1$ + } + } + + public boolean isValid(){ + return compilationTargetFile != null; + } + + public List getCompilationSetFiles(CompileDriver compileDriver){ + switch (xdsProjectType) { + case MAIN_MODULE: + return compileDriver.getModuleList(ResourceUtils.getAbsolutePath(compilationTargetFile)); + case PROJECT_FILE: + List compilationSetList = compileDriver.getProjectModuleList(ResourceUtils.getAbsolutePath(compilationTargetFile)); + compilationSetList.add(ResourceUtils.getAbsolutePath(compilationTargetFile)); + return compilationSetList; + default: + throw new IllegalArgumentException("Unexpected xdsProjectType"); //$NON-NLS-1$ + } + } + + public XdsProjectType getXdsProjectType() { + return xdsProjectType; + } + + public IFile getCompilationTargetFile() { + return compilationTargetFile; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompileDriver.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompileDriver.java new file mode 100644 index 0000000..a3cd4c2 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/CompileDriver.java @@ -0,0 +1,666 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; + +import com.excelsior.xds.core.builders.XdsBuildResult; +import com.excelsior.xds.core.console.ColorStreamType; +import com.excelsior.xds.core.console.IXdsConsole; +import com.excelsior.xds.core.console.XdsConsoleLink; +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.process.InputStreamListener; +import com.excelsior.xds.core.process.ProcessInputStream; +import com.excelsior.xds.core.process.ProcessLauncher; +import com.excelsior.xds.core.progress.DelegatingProgressMonitor; +import com.excelsior.xds.core.progress.IListenableProgressMonitor; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.Sdk.XShellFormat; +import com.excelsior.xds.core.sdk.SdkManager; + +/** + * TODO : Replace Thread-sleep busy waiting with CountdownLatch + * TODO : remove IXdsConsole dependency + */ +public class CompileDriver +{ + public static enum CompilationMode { + /** Compile single module */ + COMPILE_MODULE ("=compile"), //$NON-NLS-1$ + + /** Check dependencies and compile module */ + BUILD_MODULE ("=make"), //$NON-NLS-1$ + + /** Check dependencies and recompile module */ + REBUILD_MODULE ("=make", "=all"), //$NON-NLS-1$ //$NON-NLS-2$ + + + /** Check dependencies and compile project */ + BUILD_PROJECT ("=project"), //$NON-NLS-1$ + + /** Check dependencies and recompile project */ + REBUILD_PROJECT ("=project", "=all"), //$NON-NLS-1$ //$NON-NLS-2$ + + + /** Show module list */ + MAKE_MODULE_LIST ("=make", "-__XDS_LIST__:+"), //$NON-NLS-1$ //$NON-NLS-2$ + + /** Show project's module list */ + MAKE_PROJECT_MODULE_LIST ("=project", "-__XDS_LIST__:+"), //$NON-NLS-1$ //$NON-NLS-2$ + + + /** Extract definition from symbol file */ + BROWSE_SYM ("=browse"), //$NON-NLS-1$ + + + /** Show compiler options */ + SHOW_OPTIONS ("=options"), //$NON-NLS-1$ + + /** Show compiler equations */ + SHOW_EQUATIONS ("=equations"); //$NON-NLS-1$ + + public final String[] options; + + CompilationMode (final String... options) { + this.options = options; + } + }; + + private static final String ODF_TO_STDOUT_MAGIC_BEGIN = "*** BEGIN ODF ***"; //$NON-NLS-1$ + private static final String ODF_TO_STDOUT_MAGIC_END = "*** END ODF ***"; //$NON-NLS-1$ + private static final String LOOKUP_TO_STDOUT_MAGIC = "*** Lookup *** = "; //$NON-NLS-1$ + private static final String LOOKUP_NOT_FOUND_TO_STDOUT_MAGIC = "*** Lookup not found ***"; //$NON-NLS-1$ + private static final String LOOKUPLIST_TO_STDOUT_MAGIC = "*** Lookup list ***"; //$NON-NLS-1$ + private static final String LOOKUPLIST_TO_STDOUT_MAGIC_END = "*** Lookup list end ***"; //$NON-NLS-1$ + + + private final Sdk sdk; + private final IXdsConsole console; + private final IListenableProgressMonitor monitor; + + private volatile boolean isStdoutEof; + + + public CompileDriver (Sdk sdk, IXdsConsole console, IListenableProgressMonitor monitor) { + this.sdk = sdk; + this.console = console; + this.monitor = monitor; + } + + public CompileDriver (Sdk sdk) { + this(sdk, null, DelegatingProgressMonitor.nullProgressMonitor()); + } + + public List getModuleList(String srcFile) { + return getModuleList(srcFile, null); + } + + public List getModuleList(String srcFile, String prjFile) { + final List moduleList = new ArrayList(); + if (prjFile == null) { + doCompile( sdk, CompilationMode.MAKE_MODULE_LIST + , srcFile, null + , new ModuleListListener(moduleList, FilenameUtils.getFullPath(srcFile)) ); + } else { + File workDirectory = (new File(prjFile)).getParentFile(); + String arguments = "-prj=" + prjFile; //$NON-NLS-1$ + doCompile( sdk, CompilationMode.MAKE_MODULE_LIST + , srcFile, workDirectory + , new ModuleListListener(moduleList, FilenameUtils.getFullPath(srcFile)) + , arguments ); + } + return moduleList; + } + + public List getProjectModuleList(String prjFile) { + final List moduleList = new ArrayList(); + doCompile( sdk, CompilationMode.MAKE_PROJECT_MODULE_LIST + , prjFile, null + , new ModuleListListener(moduleList, FilenameUtils.getFullPath(prjFile)) ); + return moduleList; + } + + + public XdsBuildResult compileModule ( String srcFile, File compileDir + , boolean isRebuild, boolean isMake + , IXShellListener listener ) + { + return compileModule(srcFile, null, compileDir, isRebuild, isMake, listener); + } + + public XdsBuildResult compileModule ( String srcFile, String prjFile, File compileDir + , boolean isRebuild, boolean isMake + , IXShellListener listener ) + { + CompilationMode mode = CompilationMode.COMPILE_MODULE; + if (isMake) { + mode = isRebuild ? CompilationMode.REBUILD_MODULE + : CompilationMode.BUILD_MODULE; + } + + if (prjFile == null) { + return doCompile(sdk, mode, srcFile, compileDir, listener); + } else { + if (compileDir == null) { + compileDir = (new File(prjFile)).getParentFile(); + } + String arguments = "-prj=" + prjFile; //$NON-NLS-1$ + return doCompile(sdk, mode, srcFile, compileDir, listener, arguments); + } + } + + + public XdsBuildResult compileProject ( String prjFile, File compileDir, boolean isRebuild + , IXShellListener listener ) + { + CompilationMode mode = isRebuild ? CompilationMode.REBUILD_PROJECT + : CompilationMode.BUILD_PROJECT; + return doCompile(sdk, mode, prjFile, compileDir, listener); + } + + + private XdsBuildResult doCompile ( Sdk sdk, CompilationMode mode + , String fileName + , File workDirectory + , IXShellListener listener + , String... arguments ) + { + XdsBuildResult rc = XdsBuildResult.ERROR; + if (fileName == null) { + return rc; + } + File file = new File(fileName); + if (workDirectory == null) { + workDirectory = file.getParentFile(); + } + + List args = new ArrayList(); + args.add(sdk.getCompilerExecutablePath()); + for (String option : mode.options) + args.add(option); + args.add(file.getAbsolutePath()); + for (String arg : arguments) { + if (arg != null) + args.add(arg); + } + + + ProcessLauncher procLauncher = new ProcessLauncher(); + procLauncher.setCommandline(args); + procLauncher.addEnvironment(sdk.getEnvironmentVariables()); + // turn on extended compiler output mode: + procLauncher.addEnvironment("__XDS_SHELL__", "[Eclipse],[UseOEM]"); //$NON-NLS-1$ //$NON-NLS-2$ + procLauncher.setWorkingDirectory(workDirectory); + procLauncher.setMonitor(monitor); + if (console != null) { + procLauncher.setConsole(console, true); + } + + + { + StringBuilder sb = new StringBuilder(); + for (String s : args) { + if (s.indexOf(' ') >=0) { + sb.append('"').append(s).append("\" "); //$NON-NLS-1$ + } else { + sb.append(s).append(' '); + } + } + if (console != null) { + console.printlnFiltered(sb.toString(), ColorStreamType.SYSTEM); + } + } + + XShellFormat xShellFormat = sdk.getXShellFormat(); + + @SuppressWarnings("resource") + final ProcessInputStream queueStdoutStream = new ProcessInputStream(); + final XShell xShellOut = new XShell(listener, xShellFormat); + procLauncher.addProcessStdoutListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + queueStdoutStream.pushData(buffer, 0, length); + xShellOut.onHasData(buffer, length); + } + + @Override + public void onEndOfStreamReached() { + queueStdoutStream.setEOF(); + xShellOut.onEndOfStreamReached(); + } + }); + + @SuppressWarnings("resource") + final ProcessInputStream queueStderrStream = new ProcessInputStream(); + final XShell xShellErr = new XShell(listener, xShellFormat); + procLauncher.addProcessStderrListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + queueStderrStream.pushData(buffer, 0, length); + xShellErr.onHasData(buffer, length); + } + + @Override + public void onEndOfStreamReached() { + queueStderrStream.setEOF(); + xShellErr.onEndOfStreamReached(); + } + }); + + + // RUN: + boolean ok = false; + try { + ok = procLauncher.launch(); + } catch (Exception e) { + listener.onParsingError("Compiler execution error : " + e.getMessage()); //$NON-NLS-1$ + LogHelper.logError(e); + } + + if (console != null) { + console.setEncoding(null); // reset to default (to print Strings from java) + console.println(""); + } + + if (ok) { + int rescode = procLauncher.exitValue(); + if (console != null) { + if (rescode == 0) { + console.printlnFiltered(Messages.CompileDriver_CompilerExitCode + rescode, ColorStreamType.SYSTEM); + } else { + console.println(Messages.CompileDriver_CompilerExitCode + rescode, + ColorStreamType.ERROR, XdsConsoleLink.mkLinkToProblemsView()); + } + } + if (rescode == 0) { + rc = XdsBuildResult.SUCCESS; + } + listener.onCompilerExit(rescode); + } else { + if (console != null) { + console.println(Messages.CompileDriver_CompilerWasTerminated, + ColorStreamType.ERROR, XdsConsoleLink.mkLinkToProblemsView()); + } + rc = XdsBuildResult.TERMINATED; + } + return rc; + } + + + static class ModuleListListener extends XShellListener { + private final List moduleList; + private final String workingDirectory; + + public ModuleListListener(List moduleList, String workingDirectory) { + this.moduleList = moduleList; + this.workingDirectory = workingDirectory; + } + + @Override + public void onModuleListStart() { + synchronized (moduleList) { + moduleList.clear(); + } + } + + @Override + public void onModuleListAppend(String fileName) { + File file = new File(fileName); + + if (!file.isAbsolute()) { + fileName = FilenameUtils.concat(workingDirectory, fileName); + } + + synchronized (moduleList) { + moduleList.add(fileName); + } + } + + /* Notify that file list is complete. If compiling is terminated + * before this point, and therefore this function is never called, + * then received file list is incomplete. + */ + @Override + public void onModuleListCommit() { + } + + @Override + public void onParsingError(String message) { + synchronized (moduleList) { + moduleList.clear(); + } + } + + } + + + /** + * Runs compiler simulator (xn.exe) + * + * @param args - compiler arguments + * @param workDirectory - compiler working directory + * + * @return output of compiler simulator + * @throws CoreException + */ + private String runCompNull (List args, File workDirectory) throws CoreException + { + String xnExe = null; + Sdk xn_sdk = null; + try { + xn_sdk = SdkManager.getInstance().getSdkSimulator(); + } catch (IOException e1) { + IStatus status = LogHelper.createStatus(IStatus.ERROR, IStatus.ERROR, "Unexpected Exception",e1); + throw new CoreException(status); + } + xnExe = xn_sdk.getCompilerExecutablePath(); + + List allArgs = new ArrayList(); + allArgs.add(xnExe); + allArgs.addAll(args); + + ProcessLauncher procLauncher = new ProcessLauncher(); + procLauncher.setCommandline(allArgs); + if (sdk != null) { + procLauncher.addEnvironment(sdk.getEnvironmentVariables()); + } + procLauncher.setWorkingDirectory(workDirectory); + procLauncher.setMonitor(monitor); + + if (console != null) { + procLauncher.setConsole(console, true); + { // Print xn.exe cmdline to console: + StringBuilder sb = new StringBuilder(); + for (String s : allArgs) { + if (s.indexOf(' ') >=0) { + sb.append('"').append(s).append("\" "); //$NON-NLS-1$ + } else { + sb.append(s).append(' '); + } + } + console.printlnFiltered(sb.toString(), ColorStreamType.SYSTEM); + } + } + + final StringBuilder sbStdout = new StringBuilder(); + isStdoutEof = false; + + procLauncher.addProcessStdoutListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + for (int i = 0; i < length; ++i) { + sbStdout.append((char)buffer[i]); + } + } + + @Override + public void onEndOfStreamReached() { + isStdoutEof = true; + } + }); + + // RUN: + boolean ok = procLauncher.launch(); // may throw error + + if (console != null) { + console.setEncoding(null); // reset to default (to print Strings from java) + int rescode = 1; + if (ok) { + rescode = procLauncher.exitValue(); + console.println(Messages.CompileDriver_CompilerExitCode + rescode, + rescode == 0 ? ColorStreamType.SYSTEM : ColorStreamType.ERROR); + } else { + console.println(Messages.CompileDriver_CompilerWasTerminated, ColorStreamType.ERROR); + } + } + + // wait for EOF of xn.exe stdout: + while (!isStdoutEof) { + try { + Thread.sleep(10); + } catch (InterruptedException e) { + LogHelper.logError(e); + break; + } + } + return sbStdout.toString(); + } + + + /** + * Runs compiler simulator (xn.exe) and returns its output. + * + * @param mode - compilation mode + * @param prjFile - XDS project file name (*.prj) or null + * @param compilerArgs - compiler arguments + * @param workDirectory - compiler working directory + * + * @return compiler simulator output or null + */ + public String getCompilerSimulatorOutput( CompilationMode mode, File prjFile + , List compilerArgs, File workDirectory) + { + List args = new ArrayList(); + args.addAll(compilerArgs); + if (prjFile != null) { + args.add("-prj=" + prjFile.getAbsolutePath()); //$NON-NLS-1$ + } + args.addAll(Arrays.asList(mode.options)); + if (sdk != null) { + args.add("-run_as_alias=" + sdk.getCompilerExecutablePath()); //$NON-NLS-1$ + } + + try { + return runCompNull(args, workDirectory); + } catch (CoreException e) { + LogHelper.logError(e); + } + + return null; + } + + + + /** + * Converts the given XDS symbol file into source text in the odf-format. + * odf - oberon pseudo-definition file. + * + * @param symFile - absolute path to the XDS symbol file name (*.sym) to be processed + * + * @return source text in the odf-format, or + * null when cannot be processed + * + * TODO : check every call of this method, whether this can be worked around by creating a temporary *.sym file for the fileStore. + */ + public static String decodeSymFile(String symFile) + { + if (symFile == null){ + return null; + } + CompileDriver compileDriver = new CompileDriver( + null, null, DelegatingProgressMonitor.nullProgressMonitor() + ); + + return compileDriver.decodeSymFile(symFile, null, null); + } + + /** + * Converts the given XDS symbol file into source text in the odf-format. + * odf - oberon pseudo-definition file. + * + * @param symFile - XDS symbol file name (*.sym) (with or without path) to be processed + * @param buildSettings - XDS compiler settings + * + * @return source text in the odf-format, or + * null when cannot be processed + */ + // Not used: it seems that =browse works ok w/o any .prj and lookups from it. + // But when .prj is specified and project source modules are found by xn.exe + // it may begin to try to format output .odf file and change its contents. So to have + // exactly same text for one .sym file - use static String decodeSymFile(String symFile) only. + // +// public static String decodeSymFile(String symFile, BuildSettings buildSettings) +// { +// String prjFile = buildSettings.getPrjFile() != null +// ? buildSettings.getPrjFile().getAbsolutePath() +// : null; +// CompileDriver compileDriver = new CompileDriver( +// buildSettings.getSdk(), null, new NullProgressMonitor() +// ); +// +// return compileDriver.decodeSymFile(symFile, prjFile, buildSettings.getWorkDir()); +// } + + /** + * Converts the given XDS symbol file into source text in the odf-format. + * odf - oberon pseudo-definition file. + * + * @param fileName - XDS symbol file name (*.sym) (with or without path) to be processed + * @param prjFile - XDS project file name (*.prj) or null + * @param workDirectory - the working directory for xn.exe (or null to use directory of symFile) + * + * @return source text in the odf-format, or + * null when cannot be processed + */ + private String decodeSymFile(String fileName, String prjFile, File workDirectory) + { + try { + File file = new File(fileName); + if (workDirectory == null) { + workDirectory = file.getParentFile(); + } + + List args = new ArrayList(); + args.add("=browse"); //$NON-NLS-1$ + if (sdk != null) { + args.add("-run_as_alias=" + sdk.getCompilerExecutablePath()); //$NON-NLS-1$ + } + if (prjFile != null) { + args.add("-prj=" + prjFile); //$NON-NLS-1$ + } + args.add("+odf_to_stdout"); //$NON-NLS-1$ + args.add(fileName); + + String res = runCompNull(args, workDirectory); + + int pos = res.indexOf(ODF_TO_STDOUT_MAGIC_BEGIN); + if (pos > 0) { + res = res.substring(pos + ODF_TO_STDOUT_MAGIC_BEGIN.length()); + pos = res.indexOf(ODF_TO_STDOUT_MAGIC_END); + if (pos > 0) { + res = res.substring(0, pos); + return res.trim(); + } + } + throw new Exception("decodeSymFile internal error: no .odf body found in xn.exe stdout for " + fileName); //$NON-NLS-1$ + } catch (Exception e) { + LogHelper.logError(e); + } + return null; + } + + /** + * @param fileName - (without extension => searches .def, .ob2 and .sym in this order) + * @param prjFile - .prj file name or null + * @param workDirectory - compiler working directory (required!) + * @return file or null + */ + public File lookupFile(String fileName, String prjFile, File workDirectory) + { + try { + if (workDirectory == null) { + throw new IllegalArgumentException("workDirectory is null"); //$NON-NLS-1$ + } + + List args = new ArrayList(); + args.add("=lookup"); //$NON-NLS-1$ + if (sdk != null) { + args.add("-run_as_alias=" + sdk.getCompilerExecutablePath()); //$NON-NLS-1$ + } + if (prjFile != null) { + args.add("-prj=" + prjFile); //$NON-NLS-1$ + } + args.add(fileName); + + String res = runCompNull(args, workDirectory); + + if (res.contains(LOOKUP_NOT_FOUND_TO_STDOUT_MAGIC)) { + return null; // no errors, not found + } else { + int pos = res.indexOf(LOOKUP_TO_STDOUT_MAGIC); + if (pos > 0) { + res = res.substring(pos + LOOKUP_TO_STDOUT_MAGIC.length()); + pos = res.indexOf('\r'); + if (pos > 0) { + res = res.substring(0, pos); + } + pos = res.indexOf('\n'); + if (pos > 0) { + res = res.substring(0, pos); + } + res = res.trim(); + File f = new File(res); + if (!f.isAbsolute()) { + f = new File(workDirectory, res); + } + if (!f.exists()) { + throw new Exception("lookupFile: file '" + f.getAbsolutePath() + "' not found"); //$NON-NLS-1$ //$NON-NLS-2$ + } + return f; + } + } + throw new Exception("lookupFile internal error: no lookup magic found in xn.exe stdout"); //$NON-NLS-1$ + } catch (Exception e) { + LogHelper.logError(e); + } + return null; + } + + + /** + * @param prjFile - .prj file name or null + * @param workDirectory - compiler working directory (required!) + * @return lines like "*.sym=./sym;c:/zz" delimited with newline or null when smth is wrong + */ + public String getLookupEquations(String prjFile, File workDirectory) + { + try { + if (workDirectory == null) { + throw new IllegalArgumentException("workDirectory is null"); //$NON-NLS-1$ + } + + List args = new ArrayList(); + args.add("=lookup"); //$NON-NLS-1$ + if (sdk != null) { + args.add("-run_as_alias=" + sdk.getCompilerExecutablePath()); //$NON-NLS-1$ + } + if (prjFile != null) { + args.add("-prj=" + prjFile); //$NON-NLS-1$ + } + + String res = runCompNull(args, workDirectory); + + int pos = res.indexOf(LOOKUPLIST_TO_STDOUT_MAGIC); + if (pos > 0) { + res = res.substring(pos + LOOKUPLIST_TO_STDOUT_MAGIC.length()); + pos = res.indexOf(LOOKUPLIST_TO_STDOUT_MAGIC_END); + if (pos > 0) { + res = res.substring(0, pos); + return res; + } + } + throw new Exception("getAllLookups internal error: no lookup list magic(s) found in xn.exe stdout"); //$NON-NLS-1$ + } catch (Exception e) { + LogHelper.logError(e); + } + return null; + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/IXShellListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/IXShellListener.java new file mode 100644 index 0000000..f73b95c --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/IXShellListener.java @@ -0,0 +1,57 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.nio.charset.Charset; + +/** + * The xShell interface to handle XDS compiler output. + */ +public interface IXShellListener { + + public static enum MessageType { + COMPILE_ERROR, // general error + COMPILE_FATAL_ERROR, // fatal error, further compilation is impossible + + COMPILE_WARNING, // warning, it does not affect results of compiling + + COMPILE_NOTICE, // to display line/column and jump, but do not count as error + COMPILE_TEXT // do not display line/column and do not jump to it + }; + + // Compiler messages + public void onMessage( MessageType messageType, int messageCode, String message + , String fileName, int line, int pos ); + + + // Compiler unformatted string to console window + public void onConsoleString(String str); + + + // Compiler job progress + public void onJobCaption(String caption); + public void onJobStart(int progressLimit, String comment); + public void onJobComment(String comment); // used for env.errors.SendIdeInfo(name, value) too (23.05.14, m2sparc compiler) + public void onJobProgress(int commentProgress, int progress); + + + // Module list + public void onModuleListStart(); + public void onModuleListAppend(String fileName); + public void onModuleListCommit(); + + /** + * Invokes in case of parsing error of compiler output. + * @param message - diagnostic message + */ + public void onParsingError(String message); + + public void onCompilerExit(int exitCode); + + /** + * Listener must know what stream encoding used now. + * This encoding may be switched 'on the fly' + * + * @return Charser (cp1251 or cp866 now) + */ + public Charset getStreamCharset(); + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShell.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShell.java new file mode 100644 index 0000000..95a5544 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShell.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.core.compiler.driver; + +import com.excelsior.xds.core.process.InputStreamListener; +import com.excelsior.xds.core.sdk.Sdk; + +public class XShell implements InputStreamListener { + private InputStreamListener xShellImpl; + + public XShell(IXShellListener listener, Sdk.XShellFormat xShellFormat) { + switch (xShellFormat) { + case BINARY: + xShellImpl = new XShellBinary(listener); + break; + default: + xShellImpl = new XShellText(listener); + } + } + + @Override + public void onHasData(byte[] buffer, int length) { + xShellImpl.onHasData(buffer, length); + } + + @Override + public void onEndOfStreamReached() { + xShellImpl.onEndOfStreamReached(); + } + + + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellBinary.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellBinary.java new file mode 100644 index 0000000..0588ae0 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellBinary.java @@ -0,0 +1,362 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.nio.charset.Charset; +import java.util.ArrayList; + +import com.excelsior.xds.core.compiler.driver.IXShellListener.MessageType; +import com.excelsior.xds.core.process.InputStreamListener; + +public class XShellBinary implements InputStreamListener { + + // String lengths are passed in some previous arguments of the command + // so type ARG_STRING_ means that the string with len from argument N is expected + private enum ArgType { + ARG_INT2 (2, -1), + ARG_INT4 (4, -1), + ARG_STRING_0 (-1, 0), + ARG_STRING_1 (-1, 1), + ARG_STRING_3 (-1, 3), + ARG_STRING_4 (-1, 4), + ARG_CHAR (-1, -1); + + ArgType(int argLen, int lenFromArg) { + this.argLen = argLen; + this.lenFromArg = lenFromArg; + } + private int argLen; // len of this arg (or -1) + private int lenFromArg; // get len for this string from 'lenFromArg' argument (or -1) + + public int getArgLen() { + return argLen; + } + public int getLenFromArg() { + return lenFromArg; + } + } + + private enum CmdState { + EOF_STATE ((char)0, null), + NO_COMMAND ((char)0, null), // raw stream + WAIT_COMMAND ((char)0, null), // after char(1) in the stream + + // len[2] + string[len]: + CMD_ConsoleString ('S', new ArgType[]{ArgType.ARG_INT2, ArgType.ARG_STRING_0}), + CMD_JobCaption ('C', new ArgType[]{ArgType.ARG_INT2, ArgType.ARG_STRING_0}), + CMD_JobComment ('M', new ArgType[]{ArgType.ARG_INT2, ArgType.ARG_STRING_0}), + + // 0 err_no[4] + // 1 line[4] + // 2 pos[4] + // 3 fileNameLen[2] + // 4 msgLen[2] + // 5 errClass[1] + // 6 fName[fNameLen] + // 7 message[msgLen]: + CMD_Message ('E', new ArgType[]{ArgType.ARG_INT4, + ArgType.ARG_INT4, + ArgType.ARG_INT4, + ArgType.ARG_INT2, + ArgType.ARG_INT2, + ArgType.ARG_CHAR, + ArgType.ARG_STRING_3, + ArgType.ARG_STRING_4 }), + + // progressLimit[4], len[2] + string[len]: + CMD_JobStart ('J', new ArgType[]{ArgType.ARG_INT4, ArgType.ARG_INT2, ArgType.ARG_STRING_1}), + + // commentProgress[4], progress[4]: + CMD_JobProgress ('P', new ArgType[]{ArgType.ARG_INT4, ArgType.ARG_INT4}), + + // + CMD_ModuleListStart ('F', new ArgType[]{}), + + // len[2] + string[len]: + CMD_ModuleListAppend ('f', new ArgType[]{ArgType.ARG_INT2, ArgType.ARG_STRING_0}), + + // + CMD_ModuleListCommit ('X', new ArgType[]{}), + + // 'S' or 's' - ignored: + CMD_SetMessagesSort ('m', new ArgType[]{ArgType.ARG_CHAR}); + + CmdState(char cmdChar, ArgType[] argTypes) { + this.cmdChar = cmdChar; + this.argTypes = argTypes; + } + public ArgType[] getArgTypes() { + return argTypes; + } + + public char getCmdChar() { + return cmdChar; + } + + private char cmdChar; + private ArgType[] argTypes; + } + + private IXShellListener listener; + + // Parser state (+ see argNum): + private CmdState cmdState; + private ArgType argType; + + // List of args filled while parsting: + private ArrayList argsList; // elements types may be Integer/String/Character + // Currently parsing args (not added to argsList yet): + private int argNum; // arg number + private ByteBuffer argString; // arg buffer (for ARG_STRING_x) + private char argChar; // arg buffer (for ARG_CHAR) + private int argInt; // arg buffer (for ARG_INTx) + private int argIntShift; // used to read ARG_INTx + private int argLenCnt; // bytes in arg: downcount to 0 + + + // Buffer to collect raw strings for transmitting to console: + private ByteBuffer rawStrBuilder; + + + public XShellBinary(IXShellListener listener) { + this.listener = listener; + cmdState = CmdState.NO_COMMAND; + argType = null; + argsList = new ArrayList(); + argNum = 0; + argString = new ByteBuffer(); + rawStrBuilder = new ByteBuffer(); + } + + @Override + public void onHasData(byte[] buffer, int length) { + for (int i=0; i 0) { + listener.onConsoleString(rawStrBuilder.bytesToString(listener.getStreamCharset())); + rawStrBuilder.clear(); + } + } + + // Set state to read 'argNum'-th argument + private void initArgReadState() { + // Clear argument values (for all types) + argString.clear(); + argInt = 0; + argIntShift = 0; + + // This is the argument type to read: + argType = cmdState.getArgTypes()[argNum]; + + // Determine length in bytes to read (argLenCnt): + if (argType.getArgLen() >= 0) { + argLenCnt = argType.getArgLen(); + } else if (argType.getLenFromArg() >= 0) { + // It is string and its length is given in some already readen argument: + argLenCnt = (Integer)(argsList.get(argType.getLenFromArg())); + + // 0-len string: it is already finished: + if (argLenCnt == 0) { + argComplete(); + } + } // else - it is ARG_CHAR + } + + private void argComplete() { + switch(argType) { + case ARG_INT2: + case ARG_INT4: + argsList.add(argInt); + break; + case ARG_STRING_0: + case ARG_STRING_1: + case ARG_STRING_3: + case ARG_STRING_4: + argsList.add(argString.bytesToString(listener.getStreamCharset())); + break; + case ARG_CHAR: argsList.add(argChar); break; + } + ++argNum; + if (cmdState.getArgTypes().length == argNum) { + cmdComplete(); + } else { + initArgReadState(); // start read next arg + } + } + + private void cmdComplete() { + switch (cmdState) { + case CMD_ConsoleString: + // len[2] + string[len]: + listener.onConsoleString((String)argsList.get(1)); + break; + case CMD_JobCaption: + // len[2] + string[len]: + listener.onJobCaption((String)argsList.get(1)); + break; + case CMD_JobComment: + // len[2] + string[len]: + listener.onJobComment((String)argsList.get(1)); + break; + case CMD_Message: + // 0 err_no[4] + // 1 line[4] + // 2 pos[4] + // 3 fileNameLen[2] + // 4 msgLen[2] + // 5 errClass[1] + // 6 fName[fNameLen] + // 7 message[msgLen]: + MessageType msgType; + String message = (String)argsList.get(7); + switch ((Character)argsList.get(5)) { + case 'T': msgType = MessageType.COMPILE_TEXT; break; + case 'N': msgType = MessageType.COMPILE_NOTICE; break; + case 'W': msgType = MessageType.COMPILE_WARNING; break; + case 'E': msgType = MessageType.COMPILE_ERROR; break; + case 'S': msgType = MessageType.COMPILE_FATAL_ERROR; break; + default: + msgType = MessageType.COMPILE_ERROR; + message = "*** Unknown error type: bad compiler log format? -- " + message; //$NON-NLS-1$ + } + listener.onMessage(msgType, (Integer)argsList.get(0), message, (String)argsList.get(6), + (Integer)argsList.get(1), (Integer)argsList.get(2)); + break; + case CMD_JobStart: + // progressLimit[4], len[2] + string[len]: + listener.onJobStart((Integer)argsList.get(0), (String)argsList.get(2)); + break; + case CMD_JobProgress: + // commentProgress[4], progress[4]: + listener.onJobProgress((Integer)argsList.get(0), (Integer)argsList.get(1)); + break; + case CMD_ModuleListStart: + // + listener.onModuleListStart(); + break; + case CMD_ModuleListAppend: + // len[2] + string[len]: + listener.onModuleListAppend((String)argsList.get(1)); + break; + case CMD_ModuleListCommit: + // + listener.onModuleListCommit(); + break; + case CMD_SetMessagesSort: + // char: expected 'S' or 's' ==> turn ON/OFF messages sorting by line numbers. Ignore it. + break; + default: + break; + } + cmdState = CmdState.NO_COMMAND; + } + + private void onByte(int b) { + switch (cmdState) { + case EOF_STATE: + return; + case NO_COMMAND: + if (b == 1) { + flushRawString(); + cmdState = CmdState.WAIT_COMMAND; + } else if (b == 0x0a) { + flushRawString(); + } else if (b != 0x0d) { + rawStrBuilder.addByte(b); + } + return; + case WAIT_COMMAND: + for (CmdState cs : CmdState.values()) { + if (cs.getCmdChar() == (char)b) { + cmdState = cs; + if (cs.getArgTypes() == null) { + break; + } else if (cs.getArgTypes().length==0) { + cmdComplete(); + } else { + argsList.clear(); + argNum = 0; + initArgReadState(); // start read args + } + return; + } + } + cmdState = CmdState.NO_COMMAND; // error in the stream + return; + default: + break; + } + + switch(argType) { + case ARG_INT2: + case ARG_INT4: + argInt |= (b & 0xff) << 8 * argIntShift++; + if (--argLenCnt <= 0) { + argComplete(); + } + break; + case ARG_STRING_0: + case ARG_STRING_1: + case ARG_STRING_3: + case ARG_STRING_4: + argString.addByte(b); + if (--argLenCnt <= 0) { + argComplete(); + } + break; + case ARG_CHAR: + argChar = (char)b; + argComplete(); + break; + } + } + + static final class ByteBuffer { + private byte[] lineBuf; + private int lineBufLen; + + public ByteBuffer() { + lineBuf = new byte[4]; + lineBufLen = 0; + } + + public void addByte(int ch) { + if (lineBufLen == lineBuf.length) { + byte[] newBuf = new byte[lineBufLen * 2]; + System.arraycopy(lineBuf, 0, newBuf, 0, lineBufLen); + lineBuf = newBuf; + } + lineBuf[lineBufLen++] = (byte)ch; + } + + public String bytesToString(Charset cs) { + String res = new String(lineBuf, 0, lineBufLen, cs); + // Strings may come with zeroes and garbage after it in the tail. + // So cut the string up to char(0) if any + int eos = res.indexOf(0); + if (eos>=0) { + res = res.substring(0, eos); + } + return res; + } + + public void clear() { + lineBufLen = 0; + } + + public int length() { + return lineBufLen; + } + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellListener.java new file mode 100644 index 0000000..649db0d --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellListener.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.nio.charset.Charset; + +import com.excelsior.xds.core.text.TextEncoding; + +/** + * Default implementation of xShell interface. + */ +public class XShellListener implements IXShellListener { + + private Charset charset = TextEncoding.whatCharsetToUse("Cp1251"); //$NON-NLS-1$ + + @Override + public void onMessage( MessageType messageType, int messageCode, String message + , String fileName, int line, int pos ) { + } + + @Override + public void onConsoleString(String str) { + } + + @Override + public void onJobCaption(String caption) { + } + + @Override + public void onJobStart(int progressLimit, String comment) { + } + + @Override + public void onJobComment(String comment) { + } + + @Override + public void onJobProgress(int commentProgress, int progress) { + } + + @Override + public void onModuleListStart() { + } + + @Override + public void onModuleListAppend(String fileName) { + } + + @Override + public void onModuleListCommit() { + } + + @Override + public void onParsingError(String message) { + } + + @Override + public void onCompilerExit(int exitCode) { + } + + @Override + public Charset getStreamCharset() { + return charset; + } + + protected void setStreamCharset(Charset cs) { + charset = cs; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellText.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellText.java new file mode 100644 index 0000000..0bc2ea3 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/driver/XShellText.java @@ -0,0 +1,223 @@ +package com.excelsior.xds.core.compiler.driver; + +import java.util.ArrayList; + +import com.excelsior.xds.core.compiler.driver.IXShellListener.MessageType; +import com.excelsior.xds.core.process.InputStreamListener; + +public class XShellText implements InputStreamListener { + private enum ArgType { + ARG_INT, + ARG_STRING, + ARG_CHAR + } + + private enum CmdState { + EOF_STATE ((char)0, null), + NO_COMMAND ((char)0, null), // raw stream + WAIT_COMMAND ((char)0, null), // after char(1) in the stream + CMD_ConsoleString ('S', new ArgType[]{ArgType.ARG_STRING}), + CMD_JobCaption ('C', new ArgType[]{ArgType.ARG_STRING}), + CMD_JobComment ('M', new ArgType[]{ArgType.ARG_STRING}), + CMD_Message ('E', new ArgType[]{ArgType.ARG_INT, ArgType.ARG_INT, ArgType.ARG_INT, + ArgType.ARG_CHAR, ArgType.ARG_STRING, ArgType.ARG_STRING }), + CMD_JobStart ('J', new ArgType[]{ArgType.ARG_INT, ArgType.ARG_STRING}), + CMD_JobProgress ('P', new ArgType[]{ArgType.ARG_INT, ArgType.ARG_INT}), + CMD_ModuleListStart ('F', new ArgType[]{}), + CMD_ModuleListAppend ('f', new ArgType[]{ArgType.ARG_STRING}), + CMD_ModuleListCommit ('X', new ArgType[]{}), + CMD_SetMessagesSort ('m', new ArgType[]{ArgType.ARG_CHAR}); + + CmdState(char cmdChar, ArgType[] argTypes) { + this.cmdChar = cmdChar; + this.argTypes = argTypes; + } + public ArgType[] getArgTypes() { + return argTypes; + } + + public char getCmdChar() { + return cmdChar; + } + + private char cmdChar; + private ArgType[] argTypes; + } + + private IXShellListener listener; + + // Parser state (+ see argNum): + private CmdState cmdState; + private ArgType argType; + + // List of args filled while parsting: + private ArrayList argsList; // elements types may be Integer/String/Character + // Currently parsing args (not added to argsList yet): + private int argNum; // arg number + private int argInt; // arg buffer (for int) + private char argChar; // arg buffer (for char) + private XShellBinary.ByteBuffer argString; // arg buffer (for string) + + // Buffer to collect raw strings for transmitting to console: + private XShellBinary.ByteBuffer rawStrBuilder; + + + public XShellText(IXShellListener listener) { + this.listener = listener; + cmdState = CmdState.NO_COMMAND; + argType = null; + argsList = new ArrayList(); + argNum = 0; + argString = new XShellBinary.ByteBuffer(); + rawStrBuilder = new XShellBinary.ByteBuffer(); + } + + @Override + public void onHasData(byte[] buffer, int length) { + for (int i=0; i 0) { + listener.onConsoleString(rawStrBuilder.bytesToString(listener.getStreamCharset())); + rawStrBuilder.clear(); + } + } + + private void argComplete() { + switch(argType) { + case ARG_INT: argsList.add(argInt); break; + case ARG_STRING: argsList.add(argString.bytesToString(listener.getStreamCharset())); break; + case ARG_CHAR: argsList.add(argChar); break; + } + ++argNum; + if (cmdState.getArgTypes().length == argNum) { + cmdComplete(); + } else { + argInt = 0; + argString.clear(); + argType = cmdState.getArgTypes()[argNum]; + } + } + + private void cmdComplete() { + switch (cmdState) { + case CMD_ConsoleString: + listener.onConsoleString((String)argsList.get(0)); + break; + case CMD_JobCaption: + listener.onJobCaption((String)argsList.get(0)); + break; + case CMD_JobComment: + listener.onJobComment((String)argsList.get(0)); + break; + case CMD_Message: + MessageType msgType; + String message = (String)argsList.get(5); + switch ((Character)argsList.get(3)) { + case 'T': msgType = MessageType.COMPILE_TEXT; break; + case 'N': msgType = MessageType.COMPILE_NOTICE; break; + case 'W': msgType = MessageType.COMPILE_WARNING; break; + case 'E': msgType = MessageType.COMPILE_ERROR; break; + case 'S': msgType = MessageType.COMPILE_FATAL_ERROR; break; + default: + msgType = MessageType.COMPILE_ERROR; + message = "*** Unknown error type: bad compiler log format? -- " + message; //$NON-NLS-1$ + } + listener.onMessage(msgType, (Integer)argsList.get(0), message, (String)argsList.get(4), + (Integer)argsList.get(1), (Integer)argsList.get(2)); + break; + case CMD_JobStart: + listener.onJobStart((Integer)argsList.get(0), (String)argsList.get(1)); + break; + case CMD_JobProgress: + listener.onJobProgress((Integer)argsList.get(0), (Integer)argsList.get(1)); + break; + case CMD_ModuleListStart: + listener.onModuleListStart(); + break; + case CMD_ModuleListAppend: + listener.onModuleListAppend((String)argsList.get(0)); + break; + case CMD_ModuleListCommit: + listener.onModuleListCommit(); + break; + case CMD_SetMessagesSort: + // expected 'S' or 's' ==> turn ON/OFF messages sorting by line numbers. Ignore it. + break; + default: + break; + } + cmdState = CmdState.NO_COMMAND; + } + + private void onByte(int b) { + switch (cmdState) { + case EOF_STATE: + return; + case NO_COMMAND: + if (b == 1) { + flushRawString(); + cmdState = CmdState.WAIT_COMMAND; + } else if (b == 0x0a) { + flushRawString(); + } else if (b != 0x0d) { + rawStrBuilder.addByte(b); + } + return; + case WAIT_COMMAND: + for (CmdState cs : CmdState.values()) { + if (cs.getCmdChar() == (char)b) { + cmdState = cs; + if (cs.getArgTypes() == null) { + break; + } else if (cs.getArgTypes().length==0) { + cmdComplete(); + } else { + argsList.clear(); + argNum = 0; + argInt = 0; + argString.clear(); + argType = cs.getArgTypes()[0]; + } + return; + } + } + cmdState = CmdState.NO_COMMAND; // error in the stream + return; + default: + break; + } + + switch(argType) { + case ARG_INT: + if (b<'0' || b>'9') { // '_' expected. + argComplete(); + } else { + argInt = argInt*10 + b-'0'; + } + break; + case ARG_STRING: + if (b == 0) { + argComplete(); + } else { + argString.addByte(b); + } + break; + case ARG_CHAR: + argChar = (char)b; + argComplete(); + break; + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/libset/LibraryFileSetManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/libset/LibraryFileSetManager.java new file mode 100644 index 0000000..1a9380b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/compiler/libset/LibraryFileSetManager.java @@ -0,0 +1,107 @@ +package com.excelsior.xds.core.compiler.libset; + +import java.io.File; +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.concurrent.locks.Lock; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.filefilter.IOFileFilter; +import org.apache.commons.io.filefilter.TrueFileFilter; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.fileset.FileSetManager; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.XdsFileUtils; + +public class LibraryFileSetManager extends FileSetManager{ + private static class LibrarySetManagerManagerHolder{ + static LibraryFileSetManager INSTANCE = new LibraryFileSetManager(); + } + + public static LibraryFileSetManager getInstance(){ + return LibrarySetManagerManagerHolder.INSTANCE; + } + + public Set getLibraryFileSet(IProject project) { + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try{ + return get(project.getName()); + } + finally{ + readLock.unlock(); + } + } + + public Set getLibraryFileSet(String projectName) { + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try{ + return get(projectName); + } + finally{ + readLock.unlock(); + } + } + + public boolean isInLibraryFileSet(IFile sourceIFile) { + Lock readLock = readWriteLock.readLock(); + readLock.lock(); + try{ + return contained(sourceIFile.getProject().getName(), ResourceUtils.getAbsolutePath(sourceIFile)); + } + finally{ + readLock.unlock(); + } + } + + public Set updateFrom(IProject project) { + Lock writeLock = readWriteLock.writeLock(); + writeLock.lock(); + try{ + remove(project.getName()); + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + final Set absolutePathes = new HashSet(); + Sdk sdk = xdsProjectSettings.getProjectSdk(); + if (sdk == null) { + return absolutePathes; + } + String sdkLibraryDir = sdk.getLibraryDefinitionsPath(); + if (StringUtils.isBlank(sdkLibraryDir) || !new File(sdkLibraryDir).exists()) { + return absolutePathes; + } + Iterator files = FileUtils.iterateFiles(new File(sdkLibraryDir), DefinitionFileFilter.INSTANCE, TrueFileFilter.INSTANCE); + for (; files.hasNext();) { + File file = files.next(); + absolutePathes.add(ResourceUtils.getAbsolutePathAsInFS(file.getAbsolutePath())); + } + add(project.getName(), absolutePathes); + return Collections.unmodifiableSet(absolutePathes); + } + finally{ + writeLock.unlock(); + } + } + + private static class DefinitionFileFilter implements IOFileFilter { + public static DefinitionFileFilter INSTANCE = new DefinitionFileFilter(); + + @Override + public boolean accept(File file) { + return XdsFileUtils.isDefinitionModuleFile(file.getName()); + } + + @Override + public boolean accept(File dir, String name) { + return XdsFileUtils.isDefinitionModuleFile(name); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/ColorStreamType.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/ColorStreamType.java new file mode 100644 index 0000000..4d73ebf --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/ColorStreamType.java @@ -0,0 +1,114 @@ +package com.excelsior.xds.core.console; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.graphics.RGB; + +import com.excelsior.xds.core.XdsCorePlugin; + +public enum ColorStreamType { + NORMAL ("Normal", new RGB(0x00, 0x00, 0x00)), //$NON-NLS-1$ + ERROR ("Error", new RGB(0xff, 0x00, 0x00)), //$NON-NLS-1$ + SYSTEM ("System", new RGB(0x80, 0x80, 0x80)), //$NON-NLS-1$ + USER_INPUT ("UserInput", new RGB(0x00, 0xa0, 0x40)), //$NON-NLS-1$ + XDS_LOG_ERROR ("XdsLogError", new RGB(0xd0, 0x00, 0x00)), //$NON-NLS-1$ + XDS_LOG_WARNING ("XdsLogWarning", new RGB(0x00, 0x00, 0xff)), // 0xfb, 0x73, 0x00 //$NON-NLS-1$ + BACKGROUND ("Background", new RGB(0xff, 0xff, 0xff)); //$NON-NLS-1$ + + public RGB getRgb() { + initColors(); + return rgb; + } + + public RGB getDefaultRgb() { + return defaultRgb; + } + + public RGB getRgb(boolean getDefault) { + return getDefault ? getDefaultRgb() : getRgb(); + } + + public void setRgb(RGB rgb) { + initColors(); + this.rgb = rgb; + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + PreferenceConverter.setValue(store, colorId, rgb); + } + + + // --- Private ----------------------------------------------------- + private final String colorId; + private final RGB defaultRgb; + private RGB rgb; + private static boolean firstCall = true; + + private ColorStreamType (String name, RGB rgb) { + // colorId is used in "org.eclipse.ui.preferenceTransfer" extension point: + this.colorId = XdsCorePlugin.PLUGIN_ID + ".XdsConsoleColor." + name + ".COLOR"; //$NON-NLS-1$ //$NON-NLS-2$ + this.rgb = rgb; + this.defaultRgb = rgb; + final IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + store.addPropertyChangeListener(new IPropertyChangeListener() { + // required to import settings via "org.eclipse.ui.preferenceTransfer" extension point + @Override + public void propertyChange(PropertyChangeEvent event) { + if (colorId.equals(event.getProperty())) { + updateFromStore(store); + } + } + }); + } + + private void updateFromStore(IPreferenceStore store) { + // see Note in initStore() below + if (store.contains(colorId)) { + rgb = PreferenceConverter.getColor(store, colorId); + } else { + rgb = defaultRgb; + } + } + + private void initStore(IPreferenceStore store) { + // Note: stupid PreferenceConverter may not create keys in store for items with 'default' values. + // So we can't expect that store.contains(id) for RGB(0,0,0) will be TRUE and so on. + if (!store.contains(colorId)) { + PreferenceConverter.setValue(store, colorId, rgb); + } + } + + /** + * Init highlight colors in store if they are absent in it + * + * @param store + */ + private static void initColorsInStore(IPreferenceStore store) { + for (ColorStreamType cs : ColorStreamType.values()) { + cs.initStore(store); + } + } + + /** + * Get colors from store, + * + * @param store + */ + private static void updateColorsFromStore(IPreferenceStore store) { + for (ColorStreamType cs : ColorStreamType.values()) { + cs.updateFromStore(store); + } + } + + + private static void initColors() { + if (firstCall) { + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + ColorStreamType.initColorsInStore(store); + ColorStreamType.updateColorsFromStore(store); + firstCall = false; + } + } + +}; + diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsole.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsole.java new file mode 100644 index 0000000..a527616 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsole.java @@ -0,0 +1,63 @@ + +package com.excelsior.xds.core.console; + +import java.io.InputStream; +import java.io.OutputStream; + +import org.eclipse.swt.graphics.RGB; + + + +public interface IXdsConsole { + public String getName(); + public void clearConsole(); + /** + * Opens the console in the UI + */ + public void show(); + + public OutputStream getConsoleStream(ColorStreamType cs); + public InputStream getInputStream(); + + /** + * Set action to perform when Terminate button will be clicked in console window + * @param al + */ + public void setTerminateCallback(IXdsConsoleTerminateCallback terminateCallback); + public void enableTerminateButton(boolean enable); + + /** + * If console is opened prints the line + * @param line - line to print + * @param cs - color stream to use + * @param link - link to goto on click (may be null) + */ + public void println(final String line, final ColorStreamType cs, final XdsConsoleLink link); + + + /** + * It is println(line, cs, null); + */ + public void println(String line, ColorStreamType cs); + + /** + * If console is opened prints the line (with the NORMAL color stream) + * @param line - line to print + */ + public void println(String line); + + /** + * If console is opened prints the line + * This line will be hidden when console filter is turned on + * + * @param line - line to print + * @param cs - color stream to use + */ + public void printlnFiltered(final String line, final ColorStreamType cs); + + public void setEncoding(String encoding); + + public void setFilteredLog(Boolean isFiltered); + public void goPrevNextMessage(boolean b); + public void setBackground(RGB rgb); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleFactory.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleFactory.java new file mode 100644 index 0000000..9dbd9b8 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleFactory.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.console; + +/** + * @author lsa80 + */ +public interface IXdsConsoleFactory { + IXdsConsole getXdsConsole(String id); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleTerminateCallback.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleTerminateCallback.java new file mode 100644 index 0000000..287efaa --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/IXdsConsoleTerminateCallback.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.console; + +/** + * Callback to terminate the process writing to this console + */ +public interface IXdsConsoleTerminateCallback { + void terminate(); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleLink.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleLink.java new file mode 100644 index 0000000..c9adc3d --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleLink.java @@ -0,0 +1,53 @@ +package com.excelsior.xds.core.console; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.ide.IDE; + +public class XdsConsoleLink { + + private IMarker marker; // null => open Problems view + + /** + * Link from XdsConsole to open Problems view + * @return + */ + public static XdsConsoleLink mkLinkToProblemsView() { + return new XdsConsoleLink(); + } + + /** + * Link from XdsConsole to some marker (with error in source file etc.) + * @param marker + */ + public XdsConsoleLink(IMarker marker) { + this.marker = marker; + } + + public void gotoLink(boolean activateEditor) { + try { + IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); + if (marker != null) { + if (marker.exists()) { + IDE.openEditor(page, marker, activateEditor); + } + } else { + // LSA80 : ïî÷åìó õàðäêîä? Íàéäè è çàìåíè íà êîíñòàíòó îäíîãî èç core-íûõ êëàññîâ ýêëèïñà, + // òàêîé â ïðèðîäå òî÷íî ñóùåñòâóåò, íå ïîìíþ êàê íàçûâàåòñÿ. + page.showView("org.eclipse.ui.views.ProblemView", null, IWorkbenchPage.VIEW_ACTIVATE); + } + } + catch (Exception e) { // hz (NPE, PartInitException...) + e.printStackTrace(); + } + } + + public boolean isEditorLink() { + return marker != null; + } + + private XdsConsoleLink() { + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleSettings.java new file mode 100644 index 0000000..3223386 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/console/XdsConsoleSettings.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.core.console; + +import org.eclipse.jface.preference.IPreferenceStore; +import com.excelsior.xds.core.XdsCorePlugin; + +public class XdsConsoleSettings { + + public static void setShowOnBuild(boolean val) { + setKey("ShowOnBuild", true, val); //$NON-NLS-1$ + } + + public static boolean getShowOnBuild() { + return getKey("ShowOnBuild", true); //$NON-NLS-1$ + } + + public static void setClearBeforeBuild(boolean val) { + setKey("ClearBeforeBuild", true, val); //$NON-NLS-1$ + } + + public static boolean getClearBeforeBuild() { + return getKey("ClearBeforeBuild", true); //$NON-NLS-1$ + } + + + private static void setKey(String name, boolean defVal, boolean val) { + String key = KEYPREFIX + name; + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + store.putValue(key, val ? STR_TRUE : STR_FALSE); + } + + private static boolean getKey(String name, boolean defVal) { + String key = KEYPREFIX + name; + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + boolean res; + if (!store.contains(key)) { + store.putValue(key, defVal ? STR_TRUE : STR_FALSE); + res = defVal; + } else { + res = STR_TRUE.equals(store.getString(key)); + } + return res; + } + + private static final String KEYPREFIX = XdsCorePlugin.PLUGIN_ID + ".ConsoleSetting."; //$NON-NLS-1$ + private static final String STR_TRUE = ".T."; //$NON-NLS-1$ + private static final String STR_FALSE = ".F."; //$NON-NLS-1$ +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/dependency/injection/DependencyInjectionHelper.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/dependency/injection/DependencyInjectionHelper.java new file mode 100644 index 0000000..c01cb13 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/dependency/injection/DependencyInjectionHelper.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.core.dependency.injection; + +import org.eclipse.e4.core.contexts.ContextInjectionFactory; +import org.eclipse.e4.core.contexts.EclipseContextFactory; +import org.eclipse.e4.core.contexts.IEclipseContext; +import org.eclipse.e4.core.di.InjectionException; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.core.log.LogHelper; + +@SuppressWarnings("restriction") +public final class DependencyInjectionHelper { + public static void inject(Object object, BundleContext context) { + IEclipseContext serviceContext = EclipseContextFactory.getServiceContext(context); + if (serviceContext != null) { + try{ + ContextInjectionFactory.inject(object, serviceContext); + } + catch(InjectionException e) { + LogHelper.logError(e); + } + } + } + + private DependencyInjectionHelper(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/exceptions/ExceptionHelper.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/exceptions/ExceptionHelper.java new file mode 100644 index 0000000..be10223 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/exceptions/ExceptionHelper.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.core.exceptions; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.log.LogHelper; + +public final class ExceptionHelper { + private ExceptionHelper(){ + } + + public static void rethrowAsCoreException(Exception e) throws CoreException { + throw new CoreException(LogHelper.createExceptionStatus(e)); + } + + public static void throwCoreException(String pluginId, String message, int code) throws CoreException + { + IStatus status= new Status(IStatus.ERROR, pluginId, code, message, null); + throw new CoreException(status); + } + + public static void throwCoreException(String pluginId, String message) throws CoreException{ + throwCoreException(pluginId, message, IStatus.ERROR); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/expressions/PropertyTester.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/expressions/PropertyTester.java new file mode 100644 index 0000000..480fd3c --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/expressions/PropertyTester.java @@ -0,0 +1,78 @@ +package com.excelsior.xds.core.expressions; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.project.XdsProjectType; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.AdapterUtilities; +import com.excelsior.xds.core.utils.XdsFileUtils; + +public class PropertyTester extends org.eclipse.core.expressions.PropertyTester { + + private static final String IS_MODULA_FILE_PROPERTY = "isModulaFile"; //$NON-NLS-1$ + private static final String IS_OBERON_FILE_PROPERTY = "isOberonFile"; //$NON-NLS-1$ + private static final String IS_SYM_FILE_PROPERTY = "isSymFile"; //$NON-NLS-1$ + private static final String IS_DBGSCRIP_FILE_PROPERTY = "isDbgScriptFile"; //$NON-NLS-1$ + private static final String IS_DBGSCRIP_SOURCE_PROPERTY = "isDbgScriptSource"; //$NON-NLS-1$ + private static final String XDS_PROJECT_TYPE_PROPERTY = "xdsProjectType"; //$NON-NLS-1$ + private static final String IS_IN_COMPILATION_SET_PROPERTY = "isInCompilationSet"; //$NON-NLS-1$ + + public PropertyTester() { + } + + @Override + public boolean test(Object receiver, String property, Object[] args, + Object expectedValue) { + IResource resource = AdapterUtilities.getAdapter(receiver, IResource.class); + + //TODO: replace with functional method table + + if (IS_MODULA_FILE_PROPERTY.equals(property)) { + String path = ResourceUtils.getAbsolutePath(resource); + return XdsFileUtils.isModulaFile(path); + } + else if (IS_OBERON_FILE_PROPERTY.equals(property)) { + String path = ResourceUtils.getAbsolutePath(resource); + return XdsFileUtils.isOberonFile(path); + } + else if (IS_SYM_FILE_PROPERTY.equals(property)) { + String path = ResourceUtils.getAbsolutePath(resource); + return XdsFileUtils.isSymbolFile(path); + } + else if (IS_DBGSCRIP_SOURCE_PROPERTY.equals(property)) { + String path = ResourceUtils.getAbsolutePath(resource); + return XdsFileUtils.isAnyOfDbgScriptSourceFiles(path); + } + else if (IS_DBGSCRIP_FILE_PROPERTY.equals(property)) { + String path = ResourceUtils.getAbsolutePath(resource); + return XdsFileUtils.isDbgScriptFile(path); + } + else if (XDS_PROJECT_TYPE_PROPERTY.equals(property)) { + IProject project = resource.getProject(); + if (project != null) { + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + try{ + XdsProjectType expectedXdsProjectType = XdsProjectType.valueOf(expectedValue.toString()); + XdsProjectType xdsProjectType = xdsProjectSettings.getProjectType(); + return expectedXdsProjectType.equals(xdsProjectType); + } + catch (IllegalArgumentException e){ + return false; + } + } + } + else if (IS_IN_COMPILATION_SET_PROPERTY.equals(property)) { + IFile ifile = AdapterUtilities.getAdapter(receiver, IFile.class); + if (ifile != null) { + return CompilationSetManager.getInstance().isInCompilationSet(ifile); + } + } + + return false; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/extensionpoint/ExtensionRegistry.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/extensionpoint/ExtensionRegistry.java new file mode 100644 index 0000000..d13f606 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/extensionpoint/ExtensionRegistry.java @@ -0,0 +1,73 @@ +package com.excelsior.xds.core.extensionpoint; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IConfigurationElement; +import org.eclipse.core.runtime.IExtension; +import org.eclipse.core.runtime.Platform; + +import com.excelsior.xds.core.log.LogHelper; + +/** + * Simple registry for extension point contributions. + * @author lsa80 + * @param extension class + */ +public abstract class ExtensionRegistry { + private final String pluginId; + private final String extensionPointName; + private final String executableExtensionPropertyName; + private volatile List contributions; + + /** + * @param pluginId plugin id of the plugin defining extension point + * @param extensionPointName + * @param executableExtensionPropertyName name of the property specifying java class of the executable extension + */ + protected ExtensionRegistry(String pluginId, String extensionPointName, + String executableExtensionPropertyName) { + this.pluginId = pluginId; + this.extensionPointName = extensionPointName; + this.executableExtensionPropertyName = executableExtensionPropertyName; + } + + /** + * Instantiates contributions and caches them to internal variable + * First access to this method should be serialized (synchronized). Usual practice - call this method in the static{} section of the singleton holder class to load all extensions. For examples, see classes derived from the ExtensionRegistry. + * @return list of the contributed extension points. + */ + public List contributions() { + if (contributions == null) { + contributions = new CopyOnWriteArrayList(); // use CopyOnWriteArrayList because multithreaded read access is possible + init(contributions); + } + return contributions; + } + + private void init(List allContributions) { + IExtension[] extensions = Platform.getExtensionRegistry() + .getExtensionPoint(pluginId, extensionPointName) + .getExtensions(); + List contributions = new ArrayList<>(); + for (int i = 0; i < extensions.length; i++) { + IConfigurationElement[] configElements = extensions[i].getConfigurationElements(); + for (int j = 0; j < configElements.length; j++) { + parse(configElements[j], contributions); + } + } + allContributions.addAll(contributions); + } + + private void parse(IConfigurationElement configurationElement, List contributions) { + try { + @SuppressWarnings("unchecked") + T contribution = (T)configurationElement.createExecutableExtension(executableExtensionPropertyName); + contributions.add(contribution); + } catch (CoreException e) { + LogHelper.logError(e); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/fileset/FileSetManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/fileset/FileSetManager.java new file mode 100644 index 0000000..cdef3f5 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/fileset/FileSetManager.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.core.fileset; + +import java.util.Collection; +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +public abstract class FileSetManager { + protected final Map> projectName2AbsolutePathes = new ConcurrentHashMap>(); + protected final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); + + protected void add(String projectName, Collection absolutePathes) { + Set fileSet = projectName2AbsolutePathes.get(projectName); + if (fileSet == null) { + fileSet = CollectionsUtils.newConcurentHashSet(); + projectName2AbsolutePathes.put(projectName, fileSet); + } + for (String path : absolutePathes) { + fileSet.add(ResourceUtils + .getAbsolutePathAsInFS(path)); + } + } + + protected Set get(String projectName) { + Set fileSet = projectName2AbsolutePathes.get(projectName); + if (fileSet == null) { + fileSet = Collections.emptySet(); + } + // create full copy in order to allow parallel modifications + return Collections.unmodifiableSet(fileSet); + } + + protected void remove(String projectName) { + Set absolutePathes = projectName2AbsolutePathes + .get(projectName); + if (absolutePathes != null) { + absolutePathes.clear(); + } + } + + protected void remove(String projectName, String absolutePath) { + Set absolutePathes = projectName2AbsolutePathes + .get(projectName); + if (absolutePathes != null && absolutePath != null) { + absolutePathes.remove(absolutePath); + } + } + + protected boolean contained(String projectName, String absolutePath) { + Set absolutePathes = projectName2AbsolutePathes + .get(projectName); + if (absolutePathes != null && absolutePath != null) { + return absolutePathes.contains(absolutePath); + } + return false; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFileStore.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFileStore.java new file mode 100644 index 0000000..c097d02 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFileStore.java @@ -0,0 +1,102 @@ +package com.excelsior.xds.core.filesystems.history; + +import java.io.File; +import java.io.InputStream; +import java.net.URI; + +import org.eclipse.core.filesystem.EFS; +import org.eclipse.core.filesystem.IFileInfo; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.filesystem.provider.FileInfo; +import org.eclipse.core.filesystem.provider.FileStore; +import org.eclipse.core.resources.IFileState; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.IProgressMonitor; + +public class HistoryFileStore extends FileStore implements IFileStore { + private final URI uri; + private final IFileState fileState; + + public HistoryFileStore(URI uri, IFileState fileState) { + this.fileState = fileState; + this.uri = uri; + } + + @Override + public IFileInfo[] childInfos(int options, IProgressMonitor monitor) + throws CoreException { + return new IFileInfo[0]; + } + + @Override + public String[] childNames(int options, IProgressMonitor monitor) + throws CoreException { + return new String[0]; + } + + @Override + public IFileStore[] childStores(int options, IProgressMonitor monitor) + throws CoreException { + return new IFileStore[0]; + } + + @Override + public IFileInfo fetchInfo(int options, IProgressMonitor monitor) + throws CoreException { + FileInfo fileInfo = new FileInfo(getName()); + fileInfo.setDirectory(false); + fileInfo.setLastModified(fileState.getModificationTime()); + fileInfo.setExists(true); + fileInfo.setAttribute(EFS.ATTRIBUTE_READ_ONLY, true); + return fileInfo; + } + + @Override + public IFileStore getChild(IPath path) { + return null; + } + + @Override + public IFileStore getFileStore(IPath path) { + return null; + } + + @Override + public IFileStore getChild(String name) { + return null; + } + + @Override + public String getName() { + return org.eclipse.core.runtime.URIUtil.lastSegment(uri); + } + + @Override + public IFileStore getParent() { + return null; + } + + @Override + public boolean isParentOf(IFileStore other) { + return false; + } + + @Override + public InputStream openInputStream(int options, IProgressMonitor monitor) + throws CoreException { + return fileState.getContents(); + } + + @Override + public File toLocalFile(int options, IProgressMonitor monitor) + throws CoreException { + return null; + } + + @Override + public URI toURI() { + return uri; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFs.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFs.java new file mode 100644 index 0000000..bf14550 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/filesystems/history/HistoryFs.java @@ -0,0 +1,71 @@ +package com.excelsior.xds.core.filesystems.history; + +import java.net.URI; +import java.net.URISyntaxException; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.filesystem.provider.FileSystem; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFileState; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Path; +import org.eclipse.team.core.history.IFileRevision; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; + +public class HistoryFs extends FileSystem { + + public static final String SCHEME_HISTORY = "history"; //$NON-NLS-1$ + + public HistoryFs() { + } + + @Override + public boolean canWrite() { + return false; + } + + @Override + public boolean canDelete() { + return false; + } + + @Override + public IFileStore getStore(URI uri) { + IFile f = ResourceUtils.getWorkspaceRoot().getFile(new Path(uri.getPath())); + long time = getTime(uri.getQuery()); + IFileState[] history = null; + try { + history = f.getHistory(new NullProgressMonitor()); + } catch (CoreException e) { + LogHelper.logError(e); + } + IFileState fileState = findFileState(history, time); + HistoryFileStore s = new HistoryFileStore(uri, fileState); + return s; + } + + public static URI toURI(IFileRevision r) { + try { + return new URI(String.format("%s://%s?time=%s", SCHEME_HISTORY, r.getURI().getPath(), r.getTimestamp())); + } catch (URISyntaxException e) { + LogHelper.logError(e); + return null; + } + } + + private IFileState findFileState(IFileState[] history, long time) { + for (IFileState s : history) { + if (s.getModificationTime() == time) { + return s; + } + } + return null; + } + + private static long getTime(String query) { + return Long.parseLong(query.split("=")[1]); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/help/IXdsHelpContextIds.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/help/IXdsHelpContextIds.java new file mode 100644 index 0000000..b1b4dc4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/help/IXdsHelpContextIds.java @@ -0,0 +1,90 @@ +package com.excelsior.xds.core.help; + +/** + * Help context ids for the XDS Modula-2 IDE. + *

+ * This interface contains constants only; it is not intended to be implemented. + *

+ */ +public interface IXdsHelpContextIds { + + public static final String XDS_HELP_PLUGIN = "com.excelsior.xds.help"; //$NON-NLS-1$ + + //-- Dialogs --------------------------------------------------------------- + public static final String SAVE_AND_BUILD_DIALOG = XDS_HELP_PLUGIN + + ".save_and_build_dialog"; //$NON-NLS-1$ + + // New module: + public static final String NEW_MODULE_DLG = XDS_HELP_PLUGIN + + ".new_module_dlg"; //$NON-NLS-1$ + + + // Edit SDK: + public static final String EDIT_SDK_DLG = XDS_HELP_PLUGIN + + ".edit_sdk_dlg"; //$NON-NLS-1$ + + // Edit SDK Tool: + public static final String EDIT_SDK_TOOL_DLG = XDS_HELP_PLUGIN + + ".edit_sdk_tool_dlg"; //$NON-NLS-1$ + + // New project from scratch + public static final String NEW_PROJECT_FROM_SCRATCH_DLG = XDS_HELP_PLUGIN + + ".new_project_from_scratch_dlg"; //$NON-NLS-1$ + + + // New project from sources + public static final String NEW_PROJECT_FROM_SOURCES_DLG = XDS_HELP_PLUGIN + + ".new_project_from_sources_dlg"; //$NON-NLS-1$ + + + //-- Launch configuration editor: + // Help IDs for launch configuration editor are specified in plugin.xml: + // + // helpContextId="com.excelsior.xds.help.launch_configuration_editor" + // helpContextId="com.excelsior.xds.help.launch_configuration_editor_pkt" + + + //-- Preference Pages ------------------------------------------------------ + public static final String MODULA2_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2"; //$NON-NLS-1$ + + public static final String MODULA2_CONSOLE_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_console"; //$NON-NLS-1$ + + public static final String MODULA2_EDITOR_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_editor"; //$NON-NLS-1$ + + public static final String MODULA2_SYNTAX_COLORING_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_syntax_coloring"; //$NON-NLS-1$ + + public static final String MODULA2_TEMPLATES_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_templates"; //$NON-NLS-1$ + + + // Edit SDKs preferences: + public static final String MODULA2_SDKS_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_sdks"; //$NON-NLS-1$ + + // Formatter + public static final String MODULA2_FORMATTER_PREFERENCE_PAGE = XDS_HELP_PLUGIN + + ".preferences_modula2_codestyle_formatter"; + + // xFind panel + // NOTE: xFind is separate package and it hardcodes this constant + // public static final String XFIND_PREFERENCE_PAGE = XDS_HELP_PLUGIN + // + ".preferences_xfind_panel"; + + //-- Properties Pages ------------------------------------------------------ + public static final String MODULA2_PROPERTY_PAGE = XDS_HELP_PLUGIN + + ".properties_modula2"; //$NON-NLS-1$ + + + //-- Views ----------------------------------------------------------------- + public static final String PROJECT_EXPLORER_VIEW = XDS_HELP_PLUGIN + + ".ui_view_ProjectExplorer"; //$NON-NLS-1$ + + + + + public static final String MODULA2_GENERAL_SPELLING_PREFERENCE_BLOCK = MODULA2_PROPERTY_PAGE; //XXX +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/Messages.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/Messages.java new file mode 100644 index 0000000..8c355d0 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/Messages.java @@ -0,0 +1,112 @@ +package com.excelsior.xds.core.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.core.internal.nls.messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object }); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + public static String ConsoleType_XDS_Tool; + public static String CompileDriver_CompilerExitCode; + public static String CompileDriver_CompilerWasTerminated; + public static String Activator_LinkingExtFilesToResources; + public static String ExternalResourceManager_LinkingSdkFilesToResources; + public static String ExternalResourceManager_LinkingExternalFiles; + public static String ExternalResourceManager_ErrorWhenLinkingExternalDirectory; + public static String ExternalResourceManager_UpdateOfProblemMarkers; + public static String NewProjectCreator_BuildingProject; + public static String NewProjectCreator_CantCreateDir; + public static String NewProjectCreator_CantNoSdk; + public static String NewProjectCreator_CreatePrjFromScratch; + public static String NewProjectCreator_DoYouWantToContinue; + public static String NewProjectCreator_ErrReadingTpl; + public static String NewProjectCreator_ErrWritingFile; + public static String NewProjectCreator_ProjDirEmpty; + public static String NewProjectCreator_ProjectWord; + public static String NewProjectCreator_RedirectionWord; + public static String NewProjectCreator_TheDirIsFile; + public static String NewProjectCreator_TheFollowingProblems; + public static String SdkIniFileWriter_ComentDefTmdPath; + public static String SdkIniFileWriter_ComentDirsList0; + public static String SdkIniFileWriter_ComentDirsList1; + public static String SdkIniFileWriter_ComentPrjFolder; + public static String SdkIniFileWriter_ComentMainFolder; + public static String SdkIniFileWriter_ComentPrimExts0; + public static String SdkIniFileWriter_ComentPrimExts1; + public static String SdkIniFileWriter_ComentExeExt; + public static String SdkIniFileWriter_ComentLibPath0; + public static String SdkIniFileWriter_ComentLibPath1; + public static String SdkIniFileWriter_ComentMainComponents; + public static String SdkIniFileWriter_ComentMainTmdPath; + public static String SdkIniFileWriter_ComentManifestPath; + public static String SdkIniFileWriter_ComentModulesTmdPath; + public static String SdkIniFileWriter_ComentProfilerPath; + public static String SdkIniFileWriter_ComentSdkName; + public static String SdkIniFileWriter_ComentSimulatorPath; + public static String SdkIniFileWriter_ComentTemptates; + public static String SdkIniFileWriter_ComentToolArgs; + public static String SdkIniFileWriter_ComentToolEnvNars0; + public static String SdkIniFileWriter_ComentToolEnvVars1; + public static String SdkIniFileWriter_ComentToolEnvVars2; + public static String SdkIniFileWriter_ComentToolFileExtList0; + public static String SdkIniFileWriter_ComentToolFileExtList1; + public static String SdkIniFileWriter_ComentToolFor; + public static String SdkIniFileWriter_ComentToolLocation; + public static String SdkIniFileWriter_ComentToolMenuOff0; + public static String SdkIniFileWriter_ComentToolMenuOff1; + public static String SdkIniFileWriter_ComentToolMenuOn0; + public static String SdkIniFileWriter_ComentToolMenuOn1; + public static String SdkIniFileWriter_ComentToolName; + public static String SdkIniFileWriter_ComentToolSourceRoot1; + public static String SdkIniFileWriter_ComentToolSourceRoot2; + public static String SdkIniFileWriter_ComentTools; + public static String SdkIniFileWriter_ComentToolWorkDir; + public static String SdkIniFileWriter_ComentTprPath; + public static String SdkIniFileWriter_ComentTrdPath; + public static String SdkIniFileWriter_ComentXcPath; + public static String SdkIniFileWriter_ComentXdPath; + public static String SdkIniFileWriter_CommentToolCodepage0; + public static String SdkIniFileWriter_CommentToolCodepage1; + public static String SdkIniFileWriter_CommentToolGroup0; + public static String SdkIniFileWriter_CommentToolGroup1; + public static String SdkIniFileWriter_SeparatorLine; + public static String Tool_InvalidToolLocation; + public static String Tool_InvalidToolName; + public static String Tool_InvalidToolWorkDir; + public static String Tool_InvalidToolWorkDir_BadVars; + public static String XdsProject_ExternalDependencies; + public static String XdsProject_SdkLibrary; + public static String XdsProjectSettings_CantDetermineDefaultDir; + public static String XdsProjectSettings_CantDetermineWorkDir; + public static String XdsProjectSettings_InvalidWorkDir; + public static String XdsProjectSettings_InvalidWorkDir2; + public static String XdsProjectSettings_WrongWorkDir; + public static String XTool_BadWorkDir; + public static String XTool_ToolFileNotFound; + public static String XTool_ToolTerminated; + public static String BuilderUtils_DeleteMarkers; + public static String BuilderUtils_BuildingProject; + public static String BuilderUtils_ReBuildingProjectAndRefreshingLibrary; + public static String BuilderUtils_RefreshingCompilationSet; + public static String BuilderUtils_RefreshingCompilationSetAndRefreshingLibrary; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + // Not for instantiation + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/messages.properties b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/messages.properties new file mode 100644 index 0000000..d28d4a8 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/internal/nls/messages.properties @@ -0,0 +1,95 @@ +ConsoleType_XDS_Tool=XDS Tool + +Activator_LinkingExtFilesToResources=Linking external files to resources +CompileDriver_CompilerExitCode=XDS compiler finished with exit code +CompileDriver_CompilerWasTerminated=XDS compiler was terminated +ExternalResourceManager_LinkingSdkFilesToResources=Linking SDK Library files to resources +ExternalResourceManager_LinkingExternalFiles=Linking external dependencies files to resources +ExternalResourceManager_ErrorWhenLinkingExternalDirectory=Error when linking external directory: %s +ExternalResourceManager_UpdateOfProblemMarkers=Marker update +NewProjectCreator_BuildingProject=Building project +NewProjectCreator_CantCreateDir=Can't create directory +NewProjectCreator_CantNoSdk=Can't create project: SDK is not specified and no active SDK selected. +NewProjectCreator_CreatePrjFromScratch=Create project from scratch +NewProjectCreator_DoYouWantToContinue=Do you want to continue? +NewProjectCreator_ErrReadingTpl=Error reading %s template file resource.\nThe %s will not be created.\n +NewProjectCreator_ErrWritingFile=Error writing file ' +NewProjectCreator_ProjDirEmpty=Project directory is not empty. Do you want to create new project files in this directory? +NewProjectCreator_ProjectWord=project +NewProjectCreator_RedirectionWord=redirection +NewProjectCreator_TheDirIsFile=The specified project directory name matches a name of already existing file +NewProjectCreator_TheFollowingProblems=The following problem(s) occurred:\n\n + +SdkIniFileWriter_ComentSdkName=\# SDK name + +SdkIniFileWriter_ComentMainComponents=\# Primary components of development system +SdkIniFileWriter_ComentXcPath=\# Path to the compiler +SdkIniFileWriter_ComentXdPath=\# Path to the debugger +SdkIniFileWriter_ComentProfilerPath=\# Path to the profiler +SdkIniFileWriter_ComentSimulatorPath=\# Path to the simulator + +SdkIniFileWriter_ComentLibPath0=\# Path to the directory with definitions files of SDK libraries +SdkIniFileWriter_ComentLibPath1= +SdkIniFileWriter_ComentExeExt=\# The executable files extension +SdkIniFileWriter_ComentPrimExts0=\# The list of files extensions separated by semicolon (;), +SdkIniFileWriter_ComentPrimExts1=\# which will be shown in the Project Explorer by default +SdkIniFileWriter_ComentManifestPath=\# Path to the update manifest file + +SdkIniFileWriter_ComentTemptates=\# Templates of new modules and projects +SdkIniFileWriter_ComentMainTmdPath=\# Path to a template of main modules (*.tmd) +SdkIniFileWriter_ComentDefTmdPath=\# Path to a template of definition modules (*.tmd) +SdkIniFileWriter_ComentModulesTmdPath=\# Path to a template of implementation modules (*.tmd) +SdkIniFileWriter_ComentDirsList0=\# The list of directories names separated by semicolon (;), +SdkIniFileWriter_ComentDirsList1=\# which will be automatically created for new projects +SdkIniFileWriter_ComentPrjFolder=\# Project file folder +SdkIniFileWriter_ComentMainFolder=\# Main module folder +SdkIniFileWriter_ComentTrdPath=\# Path to a template of redirection file (*.trd) +SdkIniFileWriter_ComentTprPath=\# Path to a template of XDS project file (*.tpr) + +SdkIniFileWriter_ComentTools=\# SDK Tools Definition +SdkIniFileWriter_ComentToolName=\# SDK tool name +SdkIniFileWriter_ComentToolLocation=\# Path to the SDK tool + +SdkIniFileWriter_ComentToolMenuOn0=\# Tools menu item caption to invoke the SDK tool +SdkIniFileWriter_ComentToolMenuOn1=\# +SdkIniFileWriter_ComentToolMenuOff0=\# Tools menu item caption when the SDK tool is unavailable +SdkIniFileWriter_ComentToolMenuOff1= +SdkIniFileWriter_ComentToolFileExtList0=\# The list of files extensions separated by semicolon (;), +SdkIniFileWriter_ComentToolFileExtList1=\# for which the SDK tool is available + +SdkIniFileWriter_ComentToolSourceRoot1=\# The type of source code roots, for which the SDK tool is available +SdkIniFileWriter_ComentToolSourceRoot2= + +SdkIniFileWriter_ComentToolArgs=\# SDK tool command line arguments +SdkIniFileWriter_ComentToolFor=\# when +SdkIniFileWriter_ComentToolWorkDir=\# SDK tool working directory + +SdkIniFileWriter_ComentToolEnvNars0=\# Additional Environment Variables. +SdkIniFileWriter_ComentToolEnvVars1=\# These variables will completely replace native environment variables +SdkIniFileWriter_ComentToolEnvVars2=\# which have the same names. +SdkIniFileWriter_CommentToolCodepage0=\# Tools output encoding (Cp866, Cp1251, ...) +SdkIniFileWriter_CommentToolCodepage1=\# +SdkIniFileWriter_CommentToolGroup0=\# Tool menu item group (or an empty string) +SdkIniFileWriter_CommentToolGroup1=\# + +SdkIniFileWriter_SeparatorLine=\#------------------------------------------------------------------------------ + +Tool_InvalidToolLocation=Invalid tool location +Tool_InvalidToolName=Invalid tool name +Tool_InvalidToolWorkDir=Invalid working directory - incorrect concrete working dir path +Tool_InvalidToolWorkDir_BadVars=Invalid working directory - unknown substitution variables +XdsProject_ExternalDependencies=External Dependencies +XdsProject_SdkLibrary=SDK Library +XdsProjectSettings_CantDetermineDefaultDir=Can't determine default Modula-2 compiler working directory +XdsProjectSettings_CantDetermineWorkDir=Can't determine Modula-2 compiler working directory, it should be specified in the Project properties +XdsProjectSettings_InvalidWorkDir=Invalid Modula-2 compiler working directory " +XdsProjectSettings_InvalidWorkDir2=" specified in the Project properties +XdsProjectSettings_WrongWorkDir=Wrong Modula-2 compiler working directory specified in the Project properties +XTool_BadWorkDir=Incorrect working directory: ' +XTool_ToolFileNotFound=Tool file not found: ' +XTool_ToolTerminated=[Tool execution terminated] +BuilderUtils_DeleteMarkers=Delete markers... +BuilderUtils_BuildingProject=Building project... +BuilderUtils_ReBuildingProjectAndRefreshingLibrary=Rebuilding and refreshing library... +BuilderUtils_RefreshingCompilationSet=Refreshing compilation set... +BuilderUtils_RefreshingCompilationSetAndRefreshingLibrary=Refreshing compilation set and refreshinh library... \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/IJobListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/IJobListener.java new file mode 100644 index 0000000..edcec03 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/IJobListener.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.jobs; + +/** + * Listener of the {@link org.eclipse.core.runtime.jobs.Job}.
+ *
+ * @author lsa + */ +public interface IJobListener { + /** + * Job was canceled event. + */ + void canceled(); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/ListenableJob.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/ListenableJob.java new file mode 100644 index 0000000..98da264 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/jobs/ListenableJob.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.core.jobs; + +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +import org.eclipse.core.runtime.jobs.Job; + +public abstract class ListenableJob extends Job { + private final List listeners = new CopyOnWriteArrayList<>(); + + public ListenableJob(String name) { + super(name); + } + + public void addListener(IJobListener l) { + listeners.add(l); + } + + public void removeListener(IJobListener l) { + listeners.remove(l); + } + + @Override + protected void canceling() { + super.canceling(); + for (IJobListener l : listeners) { + l.canceled(); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/ldp/LdpFileUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/ldp/LdpFileUtils.java new file mode 100644 index 0000000..49fb121 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/ldp/LdpFileUtils.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.core.ldp; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.exceptions.ExceptionHelper; +import com.excelsior.xds.core.log.LogHelper; + +public final class LdpFileUtils { + public static List parseLdp(File fLdp) throws CoreException { + List pktList = new ArrayList<>(); + try(BufferedReader reader = new BufferedReader(new FileReader(fLdp))) { + String str; + while((str = reader.readLine()) != null) { + str = str.trim(); + if (str.isEmpty() || str.startsWith("#") || str.startsWith(";")) { //$NON-NLS-1$ //$NON-NLS-2$ + continue; + } + File f = new File(str); + if (!f.isFile()) { + if (!f.isAbsolute()) { + f = new File(fLdp.getParent(), f.getPath()); // try .ldp's directory + } + if (!f.isFile()) { +// abortLaunch(String.format(Messages.LaunchDelegatePkt_LdpRefersToUnexistentPkt, +// fLdp.getAbsolutePath(), str)); + throw new PktFileNotFound(f); + } + } + pktList.add(f); + } + } catch(IOException e) { + ExceptionHelper.rethrowAsCoreException(e); + } + return pktList; + } + + /** + * Thrown when LDP file refers to the PKT file which doesnot exist. + * @author lsa80 + */ + public static class PktFileNotFound extends CoreException { + private static final long serialVersionUID = 1L; + private final File pktFile; + public PktFileNotFound(File pktFile) { + super(LogHelper.createErrorStatus(String.format("Ldp file not found %s", pktFile.getAbsoluteFile()))); + this.pktFile = pktFile; + } + + public File getPktFile() { + return pktFile; + } + } + + private LdpFileUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/LogHelper.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/LogHelper.java new file mode 100644 index 0000000..693f49c --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/LogHelper.java @@ -0,0 +1,175 @@ +package com.excelsior.xds.core.log; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.XdsCorePlugin; + +/** + * The logger of convenience for the Excelsior XDS plug-in. + */ +public final class LogHelper { + + private static final String XDS_LOG_RUNTIME_PROPERTY = "XDS_IDE_LOGGING"; //$NON-NLS-1$ + + private LogHelper(){ + } + + public static boolean isLogModeON() { + return "on".equals(System.getProperty(XDS_LOG_RUNTIME_PROPERTY)); //$NON-NLS-1$ + } + + public static void logInfoInLogMode(String message) { + if (isLogModeON()) { + logInfo(message); + } + } + + /** + * Log the specified information. + * + * @param message, a human-readable message, localized to the + * current locale. + */ + public static void logInfo(String message) { + log(IStatus.INFO, IStatus.OK, message, null); + } + + + /** + * Log the specified error. + * + * @param message, a human-readable message, localized to the + * current locale. + * @param exception, a low-level exception, or null + * if not applicable. + */ + public static void logError(String message, Throwable exception) { + log(IStatus.ERROR, IStatus.ERROR, message, exception); + } + + public static IStatus createExceptionStatus(Throwable exception) { + return createStatus(IStatus.ERROR, IStatus.ERROR, "Unexpected Exception", exception); + } + + public static IStatus createErrorStatus(String errorMessage) { + return createStatus(IStatus.ERROR, IStatus.ERROR, errorMessage, null); + } + + public static IStatus createWarningStatus(String message) { + return createStatus(IStatus.WARNING, IStatus.WARNING, message, null); + } + + public static IStatus createInfoStatus(String message) { + return createStatus(IStatus.INFO, IStatus.INFO, message, null); + } + + /** + * Log the specified error. + * + * @param message, a human-readable message, localized to the + * current locale. + */ + public static void logError(String message) { + logError(message, null); + } + + /** + * Log the specified error. + * + * @param exception, a low-level exception. + */ + public static void logError(Throwable exception) { + logError("Unexpected Exception", exception); //$NON-NLS-1$ + } + + + + /** + * Log the specified warning. + * + * @param message, a human-readable message, localized to the + * current locale. + * @param exception, a low-level exception, or null + * if not applicable. + */ + public static void logWarning(String message, Throwable exception) { + log(IStatus.WARNING, IStatus.WARNING, message, exception); + } + + /** + * Log the specified warning. + * + * @param message, a human-readable message, localized to the + * current locale. + */ + public static void logWarning(String message) { + logWarning(message, null); + } + + /** + * Log the specified warning. + * + * @param exception, a low-level exception. + */ + public static void logWarning(Throwable exception) { + logWarning("Unexpected Exception", exception); //$NON-NLS-1$ + } + + + + /** + * Log the specified information. + * + * @param severity, the severity; one of the following: + * IStatus.OK, + * IStatus.ERROR, + * IStatus.INFO, or + * IStatus.WARNING. + * @param pluginId. the unique identifier of the relevant + * plug-in. + * @param code, the plug-in-specific status code, or + * OK. + * @param message, a human-readable message, localized to the + * current locale. + * @param exception, a low-level exception, or null + * if not applicable. + */ + public static void log(int severity, int code, String message, Throwable exception) { + log(createStatus(severity, code, message, exception)); + } + + + /** + * Create a status object representing the specified information. + * + * @param severity, the severity; one of the following: + * IStatus.OK, + * IStatus.ERROR, + * IStatus.INFO, or + * IStatus.WARNING. + * @param pluginId, the unique identifier of the relevant + * plug-in. + * @param code, the plug-in-specific status code, or + * OK. + * @param message, a human-readable message, localized to the + * current locale. + * @param exception, a low-level exception, or null + * if not applicable. + * @return, the status object (not null). + */ + public static IStatus createStatus(int severity, int code, String message, Throwable exception) { + return new Status(severity, XdsCorePlugin.PLUGIN_ID, code, message, exception); + } + + + /** + * Log the given status. + * + * @param status, the status to log. + */ + public static void log(IStatus status) { + XdsCorePlugin.getDefault().getLog().log(status); + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/StatusUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/StatusUtils.java new file mode 100644 index 0000000..dda7cd8 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/log/StatusUtils.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.core.log; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; + +public abstract class StatusUtils { + public static boolean isError(IStatus status) { + return 0 != (status.getSeverity() & IStatus.ERROR); + } + + public static boolean isWarning(IStatus status) { + return 0 != (status.getSeverity() & IStatus.WARNING); + } + + public static void logIfErrorOrWarning(String messageIfError, String messageIfWarning, IStatus status) { + if (isError(status)) { + LogHelper.logError(messageIfError, new CoreException(status)); + } + else if (isWarning(status)) { + LogHelper.logWarning(messageIfWarning, new CoreException(status)); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/FileMarkerInfo.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/FileMarkerInfo.java new file mode 100644 index 0000000..3c4c547 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/FileMarkerInfo.java @@ -0,0 +1,40 @@ +package com.excelsior.xds.core.marker; + +import java.util.Collections; +import java.util.Set; + +import org.eclipse.core.resources.IFile; + +import com.excelsior.xds.core.utils.collections.CollectionsUtils; + +/** + * Class contains descriptors of the markers related to the specific IFile. + * Use by {@link com.excelsior.xds.core.marker.MarkerManager} to bulk-create the markers. + * @author lsa80 + */ +public class FileMarkerInfo { + private final Set parserMarkers = CollectionsUtils.newConcurentHashSet(); + + private final IFile ifile; + + public FileMarkerInfo(IFile ifile) { + this.ifile = ifile; + } + + public IFile getIFile() { + return ifile; + } + + public Set getParserMarkers() { + return Collections.unmodifiableSet(parserMarkers); + } + + /** + * Adds parser marker if its position is not occupied by the build marker + * @param markerInfo + */ + public void addParserMarker(MarkerInfo markerInfo) { + // if not position of the parser marker starts at the same position where build marker is to be placed: + parserMarkers.add(markerInfo); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerInfo.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerInfo.java new file mode 100644 index 0000000..e51eb11 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerInfo.java @@ -0,0 +1,72 @@ +package com.excelsior.xds.core.marker; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.resources.IMarker; + +/** + * Marker descriptor - contains all information necessary to create the marker. + * @author lsa80 + */ +public class MarkerInfo { + private Map attributes = new HashMap(); + + private final String type; + + public MarkerInfo(String type) { + this.type = type; + } + + public String getType() { + return type; + } + + public Map getAttributes() { + return attributes; + } + + public void setAttribute(String name, Object value) { + attributes.put(name, value); + } + + /** + * @return + * @see {@link IMarker#CHAR_START} + */ + public Integer getCharStart() { + return (Integer)attributes.get(IMarker.CHAR_START); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((attributes == null) ? 0 : attributes.hashCode()); + result = prime * result + ((type == null) ? 0 : type.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + MarkerInfo other = (MarkerInfo) obj; + if (attributes == null) { + if (other.attributes != null) + return false; + } else if (!attributes.equals(other.attributes)) + return false; + if (type == null) { + if (other.type != null) + return false; + } else if (!type.equals(other.type)) + return false; + return true; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerManager.java new file mode 100644 index 0000000..491f0ea --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerManager.java @@ -0,0 +1,95 @@ +package com.excelsior.xds.core.marker; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.WorkspaceJob; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.ISchedulingRule; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; + +public final class MarkerManager { + private MarkerManager(){ + super(); + } + /** + * Creates a bunch of markers in the workspace as the single atomic operation - thus resulting in a single delta + * @param fileToMarkerInfo + * @param progressMonitor + */ + public static void commitParserMarkers(final Map fileToMarkerInfo, IProgressMonitor progressMonitor) { + int i = 0; + + final IFileStore[] files = new IFileStore[fileToMarkerInfo.size()]; + IFile[] ifiles = new IFile[fileToMarkerInfo.size()]; + + for (Entry keyValue : fileToMarkerInfo.entrySet()) { + files[i] = keyValue.getKey(); + ifiles[i] = keyValue.getValue().getIFile(); + i++; + } + + ISchedulingRule rule = ResourceUtils.createRule(Arrays.asList(ifiles)); + + WorkspaceJob job = new WorkspaceJob("Update markers job") { //$NON-NLS-1$ + @Override + public IStatus runInWorkspace(IProgressMonitor monitor){ + for (int j = 0; j < files.length; j++) { + FileMarkerInfo fileMarkerInfo = fileToMarkerInfo.get(files[j]); + if (fileMarkerInfo != null) { + IFile iFile = fileMarkerInfo.getIFile(); + + try { + if (iFile.exists()) { + Map offset2BuildMarker = createOffset2BuildMarkerMap(iFile); + + MarkerUtils.deleteParserProblemMarkers(iFile, IResource.DEPTH_INFINITE); + Set parserMarkers = fileMarkerInfo.getParserMarkers(); + for (MarkerInfo parserMarker : parserMarkers) { + if (offset2BuildMarker.containsKey(parserMarker.getCharStart())) { + continue; + } + IMarker marker = iFile.createMarker(parserMarker.getType()); + marker.setAttributes(parserMarker.getAttributes()); + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + return Status.OK_STATUS; + } + }; + job.setRule(rule); + job.schedule(); + } + + /** + * @param iFile - iFile to be processed + * @return hashmap (Marker Start Offset --> IMarker) of the build markers from the input {@link IFile} + */ + private static Map createOffset2BuildMarkerMap(IFile iFile) { + IMarker[] buildProblemMarkers = MarkerUtils.findBuildProblemMarkers(iFile); + Map offset2BuildMarker = new HashMap(buildProblemMarkers.length); + for (IMarker m : buildProblemMarkers) { + Integer charStart = MarkerUtils.getCharStart(m); + if (charStart != null) { + offset2BuildMarker.put(charStart, m); + } + } + return offset2BuildMarker; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerUtils.java new file mode 100644 index 0000000..458df06 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/MarkerUtils.java @@ -0,0 +1,77 @@ +package com.excelsior.xds.core.marker; + +import java.util.Arrays; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.WorkspaceJob; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * Utilities that work with markers in the XDS IDE. + * @see {@link IMarker} + * @author lsa80 + */ +public final class MarkerUtils { + private MarkerUtils(){ + super(); + } + /** + * Deletes xds build markers on given resource, and, + * optionally, deletes such markers from its children. If includeSubtypes + * is false, only markers whose type exactly matches + * the given type are deleted. + *

+ * @param resource where to delete markers + * @param includeSubtypes whether or not to consider sub-types of the given type + * @param depth how far to recurse (see IResource.DEPTH_* ) + * @throws CoreException + */ + public static void deleteBuildProblemMarkers(IResource resource, boolean isIncludeSubtypes, int depth) throws CoreException { + resource.deleteMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, isIncludeSubtypes, depth); + } + + public static IMarker[] findBuildProblemMarkers(IResource r) { + IMarker[] buildProblemMarkers = null; + try { + buildProblemMarkers = r.findMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, false, IResource.DEPTH_INFINITE); + } catch (CoreException e) { + LogHelper.logError(e); + } + return buildProblemMarkers; + } + + public static Integer getCharStart(IMarker marker) { + Integer charStart = marker.getAttribute(IMarker.CHAR_START, -1); + if (charStart == -1) { + charStart = null; + } + return charStart; + } + + public static void deleteParserProblemMarkers(IResource resource, int depth) throws CoreException { + resource.deleteMarkers(XdsMarkerConstants.PARSER_PROBLEM, false, depth); + } + + public static void scheduleDeleteMarkers(IProject p){ + WorkspaceJob deleteMarkersJob = new WorkspaceJob(Messages.BuilderUtils_DeleteMarkers) { + @Override + public IStatus runInWorkspace(IProgressMonitor monitor) + throws CoreException { + MarkerUtils.deleteBuildProblemMarkers(p, true, IResource.DEPTH_INFINITE); + return Status.OK_STATUS; + } + }; + //TODO : is this a correct scheduling rule? Perhaps we should include every individual IFile from project... + deleteMarkersJob.setRule(ResourceUtils.createRule(Arrays.asList(p))); + deleteMarkersJob.schedule(); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/XdsMarkerConstants.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/XdsMarkerConstants.java new file mode 100644 index 0000000..53460ba --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/marker/XdsMarkerConstants.java @@ -0,0 +1,55 @@ +package com.excelsior.xds.core.marker; + +public final class XdsMarkerConstants +{ + private XdsMarkerConstants(){ + super(); + } + + /** + * Build problem marker type. + */ + public static final String BUILD_PROBLEM_MARKER_TYPE = "com.excelsior.xds.core.build_problem"; //$NON-NLS-1$ + + /** + * Parser problem marker type. + */ + public static final String PARSER_PROBLEM = "com.excelsior.xds.core.source_code_problem"; //$NON-NLS-1$ + + /** + * Parser problem marker severity attribute. It is used to cheat with eclipse markers. If file with errors does not belong + * to compilation set it should not be marked in the Problems View and Project Explorer. So we create it with IMarker.SEVERITY_INFO + * but then draw correct icon using this artificial attribute. + * {@link com.excelsior.xds.ui.editor.modula.ModulaEditor.NotInCompilationSetMarkerHandler} + */ + public static final String PARSER_PROBLEM_SEVERITY_ATTRIBUTE = PARSER_PROBLEM + ".severity.attribute"; //$NON-NLS-1$ + + // ------------------------------------------------------------------------- + // Marker attributes: + // ------------------------------------------------------------------------- + /** + * Violation marker attribute. An integer value indicating problem with SDK. + * + * @see #NO_VIOLATION + * @see #NO_SDK_ERROR + */ + public static final String VIOLATION_ATTR = "xds.violation"; //$NON-NLS-1$ + + /** + * Violation constant (value 0) indicating a no error state. + */ + public static final int NO_VIOLATION = 0; + + /** + * Violation constant (value -1) indicating that SDK was not specified. + */ + public static final int NO_SDK_ERROR = -1; + + /** + * Attribute MARKER_GRAY_STATE for BUILD_PROBLEM_MARKER_TYPE + * + * Hanged on marker when its line was changed in the editor + */ + public static final String MARKER_GRAY_STATE = "xds.marker.gray.state"; + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/natures/NatureIdRegistry.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/natures/NatureIdRegistry.java new file mode 100644 index 0000000..4daadae --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/natures/NatureIdRegistry.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.core.natures; + +public final class NatureIdRegistry { + private NatureIdRegistry(){ + super(); + } + public static final String MODULA2_SOURCE_PROJECT_NATURE_ID = "com.excelsior.xds.ui.natures.Modula2SourceProjectNature"; //$NON-NLS-1$ +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceCommons.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceCommons.java new file mode 100644 index 0000000..e3a47da --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceCommons.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.core.preferences; + +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.osgi.service.prefs.BackingStoreException; + +import com.excelsior.xds.core.log.LogHelper; + +/** + * Common code for working with the preferences. + * @author lsa80 + */ +public final class PreferenceCommons { + /** + * @param qualifier + * @see org.osgi.service.prefs.Preferences#flush + */ + public static void flushInstanceScope(String qualifier) { + flush(InstanceScope.INSTANCE, qualifier); + } + + /** + * TODO : implement better architecture for storing preferences. + * + * @param scope + * @param qualifier + * @see org.osgi.service.prefs.Preferences#flush + */ + public static void flush(IScopeContext scope, String qualifier) { + try { + IEclipsePreferences node = scope.getNode(qualifier); + node.flush(); + } catch (BackingStoreException e) { + LogHelper.logError(e); + } + } + + /** + * Static methods only. + */ + private PreferenceCommons(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceConstants.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceConstants.java new file mode 100644 index 0000000..70de3bf --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceConstants.java @@ -0,0 +1,151 @@ +package com.excelsior.xds.core.preferences; + + +public final class PreferenceConstants { + private PreferenceConstants() { + super(); + } + + /** + * A named preference that controls whether words containing digits should + * be skipped during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_IGNORE_DIGITS= "xds_spelling_ignore_digits"; //$NON-NLS-1$ + + /** + * A named preference that controls whether mixed case words should be + * skipped during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_IGNORE_MIXED= "xds_spelling_ignore_mixed"; //$NON-NLS-1$ + + /** + * A named preference that controls whether sentence capitalization should + * be ignored during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_IGNORE_SENTENCE= "xds_spelling_ignore_sentence"; //$NON-NLS-1$ + + /** + * A named preference that controls whether upper case words should be + * skipped during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_IGNORE_UPPER= "xds_spelling_ignore_upper"; //$NON-NLS-1$ + + /** + * A named preference that controls whether URLs should be ignored during + * spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_IGNORE_URLS= "xds_spelling_ignore_urls"; //$NON-NLS-1$ + + /** + * A named preference that controls whether non-letters at word boundaries + * should be ignored during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.3 + */ + public final static String SPELLING_IGNORE_NON_LETTERS= "xds_spelling_ignore_non_letters"; //$NON-NLS-1$ + + /** + * A named preference that controls whether single letters + * should be ignored during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.3 + */ + public final static String SPELLING_IGNORE_SINGLE_LETTERS= "xds_spelling_ignore_single_letters"; //$NON-NLS-1$ + + /** + * A named preference that controls whether Java strings + * should be ignored during spell checking. + *

+ * Value is of type Boolean. + *

+ * + * @since 3.4 + */ + public static final String SPELLING_IGNORE_MODULA_STRINGS= "xds_spelling_ignore_modula_strings"; //$NON-NLS-1$; + + + /** + * A named preference that controls the locale used for spell checking. + *

+ * Value is of type String. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_LOCALE= "xds_spelling_locale"; //$NON-NLS-1$ + + /** + * A named preference that specifies the workspace user dictionary. + *

+ * Value is of type Integer. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_USER_DICTIONARY= "xds_spelling_user_dictionary"; //$NON-NLS-1$ + + /** + * A named preference that specifies encoding of the workspace user dictionary. + *

+ * Value is of type String. + *

+ * + * @since 3.3 + */ + public final static String SPELLING_USER_DICTIONARY_ENCODING= "xds_spelling_user_dictionary_encoding"; //$NON-NLS-1$ + + /** + * A named preference that controls the maximum number of problems reported during spell checking. + *

+ * Value is of type Integer. + *

+ * + * @since 3.4 + */ + public final static String SPELLING_PROBLEMS_THRESHOLD= "xds_spelling_problems_threshold"; //$NON-NLS-1$ + + /** + * A named preference that controls the number of proposals offered during + * spell checking. + *

+ * Value is of type Integer. + *

+ * + * @since 3.0 + */ + public final static String SPELLING_PROPOSAL_THRESHOLD= "xds_spelling_proposal_threshold"; //$NON-NLS-1$ + + + public static final String PREF_VALUE_NO_LOCALE = ""; //$NON-NLS-1$ +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKey.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKey.java new file mode 100644 index 0000000..35d306b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKey.java @@ -0,0 +1,207 @@ +package com.excelsior.xds.core.preferences; + +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.eclipse.ui.preferences.IWorkingCopyManager; + +public final class PreferenceKey { + private static final IScopeContext defScope = InstanceScope.INSTANCE; + private static final IWorkingCopyManager defManager = null; + + private final String fQualifier; + private final String fKey; + private final String defStringValue; + private final boolean defBooleanValue; + private final int defIntValue; + + public PreferenceKey(String qualifier, String key) { + this(qualifier, key, null, false, 0); + } + + public PreferenceKey(String qualifier, String key, String defStringValue) { + this(qualifier, key, defStringValue, false, 0); + } + + public PreferenceKey(String qualifier, String key, boolean defBooleanValue) { + this(qualifier, key, null, defBooleanValue, 0); + } + + public PreferenceKey(String qualifier, String key, int defIntValue) { + this(qualifier, key, null, false, defIntValue); + } + + private PreferenceKey(String qualifier, String key, String defStringValue, boolean defBooleanValue, int defIntValue) { + this.fQualifier= qualifier; + this.fKey= key; + this.defStringValue = defStringValue; + this.defBooleanValue = defBooleanValue; + this.defIntValue = defIntValue; + } + + /** + * Check whether the event passed indicate the change of 'this' preference. + * @param e event possibly indicating change of 'this' preference + * @return whether this preference actually changed + */ + public boolean isChanged(PreferenceChangeEvent e) { + String thisPath = "/" +defScope.getName() + "/" + getName(); //$NON-NLS-1$ //$NON-NLS-2$ + String thatPath = e.getNode().absolutePath() + "/" + e.getKey(); //$NON-NLS-1$ + return thisPath.equals(thatPath); + } + + /** + * Full name of the preference, excluding the scope (because actually one preference key can be used in different scopes). + * @return + */ + public String getName() { + return fQualifier + "/" + fKey; //$NON-NLS-1$ + } + + public String getStoredValue(IScopeContext context, IWorkingCopyManager manager) { + return getNode(context, manager).get(fKey, defStringValue); + } + + public String getStoredValue() { + return getStoredValue(defScope, defManager); + } + + public String getStoredValue(IScopeContext[] lookupOrder, boolean ignoreTopScope, IWorkingCopyManager manager) { + for (int i= ignoreTopScope ? 1 : 0; i < lookupOrder.length; i++) { + String value= getStoredValue(lookupOrder[i], manager); + if (value != null) { + return value; + } + } + return null; + } + + public boolean getStoredBoolean(){ + return getStoredBoolean(defScope, defManager); + } + + public boolean getStoredBoolean(IScopeContext context, IWorkingCopyManager manager){ + return getNode(context, manager).getBoolean(fKey, defBooleanValue); + } + + public int getStoredInt(){ + return getStoredInt(defScope, defManager); + } + + public int getStoredInt(IScopeContext context, IWorkingCopyManager manager){ + return getNode(context, manager).getInt(fKey, defIntValue); + } + + + public void setStoredValue(String value) { + setStoredValue(defScope, value, defManager); + } + + public void setStoredValue(IScopeContext context, String value, IWorkingCopyManager manager) { + if (value != null) { + getNode(context, manager).put(fKey, value); + } else { + getNode(context, manager).remove(fKey); + } + } + + public void setStoredBoolean(boolean value) { + setStoredBoolean(defScope, value, defManager); + } + + public void setStoredBoolean(IScopeContext context, Boolean value, IWorkingCopyManager manager) { + if (value != null) { + getNode(context, manager).putBoolean(fKey, value); + } else { + getNode(context, manager).remove(fKey); + } + } + + public void setStoredInt(int value) { + setStoredInt(defScope, value, defManager); + } + + public void setStoredInt(IScopeContext context, Integer value, IWorkingCopyManager manager) { + if (value != null) { + getNode(context, manager).putInt(fKey, value); + } else { + getNode(context, manager).remove(fKey); + } + } + + /* (non-Javadoc) + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + return fQualifier + "/" + fKey; //$NON-NLS-1$ + } + + public String getKey() { + return fKey; + } + + public String getQualifier() { + return fQualifier; + } + + public String getDefStringValue() { + return defStringValue; + } + + public boolean getDefBooleanValue() { + return defBooleanValue; + } + + public int getDefIntValue() { + return defIntValue; + } + + public void addChangeListener(IPreferenceChangeListener listener) { + addChangeListener(getQualifier(), listener); + } + + + public static void addChangeListener(String qualifier, IPreferenceChangeListener listener) + { + addChangeListener(defScope, defManager, qualifier, listener); + } + + public static void addChangeListener(IScopeContext context, IWorkingCopyManager manager, + String qualifier, IPreferenceChangeListener listener) + { + IEclipsePreferences node= context.getNode(qualifier); + if (manager != null) { + node = manager.getWorkingCopy(node); + } + node.addPreferenceChangeListener(listener); + } + + public static void removeChangeListener(String qualifier, IPreferenceChangeListener listener) + { + removeChangeListener(defScope, defManager, qualifier, listener); + } + + public static void removeChangeListener(IScopeContext context, IWorkingCopyManager manager, + String qualifier, IPreferenceChangeListener listener) + { + IEclipsePreferences node= context.getNode(qualifier); + if (manager != null) { + node = manager.getWorkingCopy(node); + } + node.removePreferenceChangeListener(listener); + } + + + private IEclipsePreferences getNode(IScopeContext context, IWorkingCopyManager manager) { + IEclipsePreferences node= context.getNode(fQualifier); + if (manager != null) { + return manager.getWorkingCopy(node); + } + return node; + } + + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKeys.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKeys.java new file mode 100644 index 0000000..6a54f45 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/PreferenceKeys.java @@ -0,0 +1,110 @@ +package com.excelsior.xds.core.preferences; + +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.jface.resource.StringConverter; +import org.eclipse.swt.graphics.RGB; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.utils.GraphicUtils; + +/** + * Preference keys of the com.excelsior.xds.core plugins + * @author lsa80 + */ +public final class PreferenceKeys +{ + private static final String XDS_QUALIFIER = XdsCorePlugin.PLUGIN_ID; + + //-------------------------------------------------------------------------- + // Keys for Spelling Checker: + //-------------------------------------------------------------------------- + + public final static PreferenceKey PKEY_SPELLING_IGNORE_DIGITS = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_IGNORE_DIGITS, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_MIXED = new PreferenceKey(XDS_QUALIFIER, + PreferenceConstants.SPELLING_IGNORE_MIXED, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_SENTENCE = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_IGNORE_SENTENCE, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_UPPER = new PreferenceKey(XDS_QUALIFIER, + PreferenceConstants.SPELLING_IGNORE_UPPER, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_URLS = new PreferenceKey(XDS_QUALIFIER, + PreferenceConstants.SPELLING_IGNORE_URLS, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_NON_LETTERS = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_IGNORE_NON_LETTERS, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_SINGLE_LETTERS = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_IGNORE_SINGLE_LETTERS, true); + + public final static PreferenceKey PKEY_SPELLING_IGNORE_MODULA_STRINGS = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_IGNORE_MODULA_STRINGS, true); + + public final static PreferenceKey PKEY_SPELLING_LOCALE = new PreferenceKey(XDS_QUALIFIER, + PreferenceConstants.SPELLING_LOCALE, PreferenceConstants.PREF_VALUE_NO_LOCALE); + + public final static PreferenceKey PKEY_SPELLING_USER_DICTIONARY = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_USER_DICTIONARY, ""); //$NON-NLS-1$ + + public final static PreferenceKey PKEY_SPELLING_USER_DICTIONARY_ENCODING = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING, ""); //$NON-NLS-1$ + + public final static PreferenceKey PKEY_SPELLING_PROBLEMS_THRESHOLD = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_PROBLEMS_THRESHOLD, 100); + + public final static PreferenceKey PKEY_SPELLING_PROPOSAL_THRESHOLD = new PreferenceKey( + XDS_QUALIFIER, PreferenceConstants.SPELLING_PROPOSAL_THRESHOLD, 20); + + + //-------------------------------------------------------------------------- + // Keys for Editor Preference: + //-------------------------------------------------------------------------- + + /** + * A named preference that controls enable/disable highlight inactive code. + * Code which is disabled by conditional compilation pragmas. + *

+ * Value is of type Boolean. + *

+ */ + public final static PreferenceKey PKEY_HIGHLIGHT_INACTIVE_CODE = new PreferenceKey( + XDS_QUALIFIER, "xds_editor.highlight_inactive_code", true); + + /** + * Preference to show symbol occurrences highlighting + */ + public final static PreferenceKey PKEY_HIGHLIGHT_OCCURENCES = new PreferenceKey( + XDS_QUALIFIER, "xds_editor.highlight_occurrences", true); + + /** + * Preference to show symbol language constructions highlighting + */ + public final static PreferenceKey PKEY_HIGHLIGHT_CONSTRUCTIONS = new PreferenceKey( + XDS_QUALIFIER, "xds_editor.highlight_constructions", true); + + /** + * Preference for the color of the active code (executable source code), + * shown in the Disassembly view and as a background for the line numbers at + * the line number column of the Modula editor. + */ + public final static PreferenceKey PKEY_EXECUTABLE_SOURCE_CODE_COLOR = new PreferenceKey( + XDS_QUALIFIER, "debugger__active_runtime_code_color", + StringConverter.asString(GraphicUtils.lighter(new RGB(0xE6, 0xFD, 0xE6), 0.0f))); + + /** + * Show line number column in the Modula editor during the Debug session, even if General/Editors/Text editors/ setting prohibit it. + */ + public final static PreferenceKey OVERRIDE_SHOW_LINE_NUMBER_COLUMN = new PreferenceKey( + XDS_QUALIFIER, "modula_editor_override_show_line_number_column__during_debug", true); //$NON-NLS-1$ + + public static void addChangeListener(IPreferenceChangeListener listener){ + PreferenceKey.addChangeListener(XdsCorePlugin.PLUGIN_ID, listener); + } + + public static void removeChangeListener(IPreferenceChangeListener listener){ + PreferenceKey.removeChangeListener(XdsCorePlugin.PLUGIN_ID, listener); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/WorkspacePreferencesManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/WorkspacePreferencesManager.java new file mode 100644 index 0000000..94eb79a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/preferences/WorkspacePreferencesManager.java @@ -0,0 +1,91 @@ +package com.excelsior.xds.core.preferences; + +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.core.runtime.preferences.InstanceScope; +import org.osgi.service.prefs.BackingStoreException; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.log.LogHelper; + +public final class WorkspacePreferencesManager +{ + private static final String XDS_QUALIFIER = XdsCorePlugin.PLUGIN_ID; + + private static final String TAG_SERIALIZED_COMPILATION_SET = "SerializedCompilationSet"; //$NON-NLS-1$ + private static final String TAG_SERIALIZED_LIBRARY_FILE_SET = "SerializedLibraryFileSet"; //$NON-NLS-1$ +// private static final String TAG_DEFAULT_VALUES_INITIALIZED = "DEFAULT_VALUES_INITIALIZED"; //$NON-NLS-1$ + + private IScopeContext workspaceScope = InstanceScope.INSTANCE; + + /** + * Thread-safe singleton support. + */ + public static WorkspacePreferencesManager getInstance(){ + return WorkspacePreferencesManagerHolder.INSTANCE; + } + +// public void initializeDefaultValues() { +// PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_DEFAULT_VALUES_INITIALIZED); +// if (!preferenceKey.getStoredBoolean(workspaceScope, null)) { +// preferenceKey.setStoredBoolean(workspaceScope, true, null); +// flush(); +// +// turnOnRefreshOnAccess(); +// turnOffAutobuilding(); +// } +// } + + protected void turnOnRefreshOnAccess() { + PreferenceKey preferenceKey; + preferenceKey = new PreferenceKey(ResourcesPlugin.PI_RESOURCES, ResourcesPlugin.PREF_LIGHTWEIGHT_AUTO_REFRESH); + preferenceKey.setStoredBoolean(workspaceScope, true, null); + + try { + workspaceScope.getNode(ResourcesPlugin.PI_RESOURCES).flush(); + } catch (BackingStoreException e1) { + LogHelper.logError(e1); + } + } + +// protected void turnOffAutobuilding() { +// try { +// BuilderUtils.setAutoBuilding(false); +// } catch (CoreException e) { +// LogHelper.logError(e); +// } +// } + + public String getSerializedCompilationSet(){ + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_SERIALIZED_COMPILATION_SET); + return preferenceKey.getStoredValue(workspaceScope, null); + } + + public void setSerializedCompilationSet(String serialized){ + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_SERIALIZED_COMPILATION_SET); + preferenceKey.setStoredValue(workspaceScope, serialized, null); + } + + public String getSerializedLibraryFileSet(){ + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_SERIALIZED_LIBRARY_FILE_SET); + return preferenceKey.getStoredValue(workspaceScope, null); + } + + public void setSerializedLibraryFileSet(String serialized){ + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_SERIALIZED_LIBRARY_FILE_SET); + preferenceKey.setStoredValue(workspaceScope, serialized, null); + } + + + /** + * Flushes all keys related to 'com.excelsior.xds.core' plugin. + */ + public void flush(){ + PreferenceCommons.flush(workspaceScope, XDS_QUALIFIER); + } + + private static class WorkspacePreferencesManagerHolder{ + static WorkspacePreferencesManager INSTANCE = new WorkspacePreferencesManager(); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamListener.java new file mode 100644 index 0000000..129f568 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamListener.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.process; + +public interface InputStreamListener { + void onHasData(byte[] buffer, int length); + void onEndOfStreamReached(); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamObserver.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamObserver.java new file mode 100644 index 0000000..1a5f56c --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/InputStreamObserver.java @@ -0,0 +1,64 @@ +package com.excelsior.xds.core.process; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +public class InputStreamObserver { + private final int bufferSize; + private final InputStream inputStream; + private Thread thread; + + private final List listeners = new CopyOnWriteArrayList(); + + public InputStreamObserver(InputStream inputStream) { + this(inputStream, 1024); + } + + public InputStreamObserver(InputStream inputStream, int bufferSize) { + this.inputStream = inputStream; + this.bufferSize = bufferSize; + } + + public void addListener(InputStreamListener listener) { + listeners.add(listener); + } + + public void start() { + thread = new Thread(new Runnable(){ + @Override + public void run() { + byte[] buffer = new byte[bufferSize]; + try { + while (true) { + int len = inputStream.read(buffer); + if (len == -1) { + onStreamClosed(); + break; + } + onHasData(buffer, len); + } + } catch (IOException e) { + } + } + }, "InputStreamObserver for the InputStream " + inputStream); //$NON-NLS-1$ + thread.start(); + } + + public void join() throws InterruptedException { + thread.join(); + } + + private void onHasData(byte[] buffer, int len) { + for (InputStreamListener listener : listeners) { + listener.onHasData(buffer, len); + } + } + + private void onStreamClosed() { + for (InputStreamListener listener : listeners) { + listener.onEndOfStreamReached(); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessInputStream.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessInputStream.java new file mode 100644 index 0000000..5e417e6 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessInputStream.java @@ -0,0 +1,76 @@ +package com.excelsior.xds.core.process; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayDeque; + +public class ProcessInputStream extends InputStream { + private volatile ArrayDeque qData; + private volatile boolean eof; + private volatile byte buf[]; + private volatile int pos; + private Object semaphore; + + public ProcessInputStream() { + qData = new ArrayDeque(); + eof = false; + buf = null; + pos = 0; + semaphore = new Object(); + } + + @Override + public int read() throws IOException { + if (eof) + return -1; + if (buf== null || pos >= buf.length) { + synchronized (qData) { + if (qData.isEmpty()) { + buf = null; + } else { + buf= qData.remove(); + } + } + if (buf == null) { + try { + synchronized (semaphore) { + semaphore.wait(); + } + synchronized (qData) { + buf = qData.remove(); + } + } catch (Exception e) { + buf = null; + } + } + if (buf == null || buf.length == 0) { + eof = true; + return -1; + } + pos = 0; + } + return buf[pos++] & 0xff; + } + + public void pushData(byte[] buffer, int offset, int len) { + if (len>0) { + byte arr[] = new byte[len]; + System.arraycopy(buffer, offset, arr, 0, len); + synchronized(qData) { + qData.add(arr); + } + synchronized(semaphore) { + semaphore.notifyAll(); + } + } + } + + public void setEOF() { + synchronized(qData) { + qData.add(new byte[0]); // 0-length => EOF + } + synchronized(semaphore) { + semaphore.notifyAll(); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessLauncher.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessLauncher.java new file mode 100644 index 0000000..3e40f87 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessLauncher.java @@ -0,0 +1,337 @@ +package com.excelsior.xds.core.process; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; + +import org.apache.commons.collections.CollectionUtils; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.console.ColorStreamType; +import com.excelsior.xds.core.console.IXdsConsole; +import com.excelsior.xds.core.console.IXdsConsoleTerminateCallback; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.progress.IListenableProgressMonitor; +import com.excelsior.xds.core.progress.IProgressMonitorListener; + +public final class ProcessLauncher { + public static final int LAUNCH_ERROR_CODE = 100; + + private List cmdlist; + private File workDir; + private Map envmap; + private Map envadd; + + private IXdsConsole console; + private OutputStream normConsoleStream; + private OutputStream errConsoleStream; + private InputStream inputFromConsoleStream; + + private volatile Process proc; + private volatile int exitValue = 2; + + private List processStdoutListeners = new ArrayList(); + private List processStderrListeners = new ArrayList(); + + private final ProgressMonitorListener progressMonitorListener = new ProgressMonitorListener(); + + private IListenableProgressMonitor monitor; + + public void addProcessStdoutListener(InputStreamListener inputStreamListener) { + processStdoutListeners.add(inputStreamListener); + } + + public void addProcessStderrListener(InputStreamListener inputStreamListener) { + processStderrListeners.add(inputStreamListener); + } + + /** + * Set monitor. When set - it will be periodicaly checked for + * isCanceled() and process will be terminated if need. + * + * @param monitor + */ + public void setMonitor(IListenableProgressMonitor monitor) { + this.monitor = monitor; + monitor.setListener(progressMonitorListener); + } + + /** + * Set console for the process to be launched + * + * @param console + * @param bindTerminateButtonOnly - when true - just bind console's terminate button + * to the process, false - redirect process output to the console too + */ + public void setConsole(IXdsConsole console, boolean bindTerminateButtonOnly) { + this.console = console; + + if (!bindTerminateButtonOnly) { + normConsoleStream = console.getConsoleStream(ColorStreamType.NORMAL); + errConsoleStream = console.getConsoleStream(ColorStreamType.ERROR); + inputFromConsoleStream = console.getInputStream(); + } + + console.setTerminateCallback(new IXdsConsoleTerminateCallback() { + @Override + public void terminate() { + if (proc != null) { + try { + proc.destroy(); + } catch (Exception ex) {} + } + } + }); + } + + /** + * Sets 'raw' commandline with program and arguments. + * + * @param cmdlist + */ + public void setCommandline(List cmdlist) { + this.cmdlist = cmdlist; + } + + /** + * Returns commandline with opened variables etc. + * as it will be processed at launch time + * @return + */ + public String getReadableCommandline() { + StringBuilder sb = new StringBuilder(); + if (cmdlist != null) { + for (String s : cmdlist) { + if (sb.length() > 0) { + sb.append(' '); + } + s = s.replace("\"", "\"\""); //$NON-NLS-1$ //$NON-NLS-2$ + if (s.indexOf(' ') >= 0) { + sb.append('"').append(s).append('"'); + } else { + sb.append(s); + } + } + } + return sb.toString(); + } + + /** + * Set process working directory (or null to use default) + * @param workDir + */ + public void setWorkingDirectory(File workDir) { + this.workDir = workDir; + } + + /** + * Set environment variables (or null to use default) + * @param envmap - map with pairs + */ + public void setEnvironment(Map envmap) { + this.envmap = envmap; + } + + /** + * Set environment variables (or null to use default) + * @param envarray - strings in form "name=value" + */ + public void setEnvironment(String[] envarray) { + if (envarray == null) { + envmap = null; + } else { + envmap = new HashMap(); + for (String env : envarray) { + int pos = env.indexOf('='); + if (pos > 0) { + String var = env.substring(0,pos).trim(); + String val = env.substring(pos+1); + envmap.put(var, val); + } + } + } + } + + /** + * Add the given environment variables to other. + * When setEnvironment is used it redefines all default environment + * variables. addEnvironment adds the given variables to the default + * (or to the variables set in setEnvironment if it was used) so + * it gives easy way to add numeral variables to the default set. + * @param envmap - map with pairs + */ + public void addEnvironment(Map envadd) { + if (this.envadd == null) { + this.envadd = new HashMap(); + } + this.envadd.putAll(envadd); + } + public void addEnvironment(String name, String value) { + HashMap hm = new HashMap(); + hm.put(name, value); + addEnvironment(hm); + } + + /** + * Launches all. + * @return false if launching was aborted with monitor + * @throws CoreException + */ + public synchronized boolean launch() throws CoreException { + if (!(new File(cmdlist.get(0)).canExecute())) { + abort(String.format("XDS launching error: can't execute \"%s\"", cmdlist.get(0)), null, LAUNCH_ERROR_CODE); //$NON-NLS-1$ + } + + if (monitor != null && monitor.isCanceled()) { + return false; + } + + ProcessBuilder builder = new ProcessBuilder(cmdlist.toArray(new String[]{})); + builder.directory(workDir); + if (envmap != null) { + builder.environment().clear(); + builder.environment().putAll(envmap); + } + addEnvCaseInsensitive(builder.environment()); + + try { + proc = builder.start(); + } catch (IOException e) { + abort (e.getMessage(), e, LAUNCH_ERROR_CODE); + } + + enableTerminateButton(true); + + InputStreamCopyObserver stdoutObserver = new InputStreamCopyObserver(proc.getInputStream(), normConsoleStream, processStdoutListeners); + InputStreamCopyObserver stderrObserver = new InputStreamCopyObserver(proc.getErrorStream(), errConsoleStream, processStderrListeners); + stdoutObserver.start(); + stderrObserver.start(); + if (inputFromConsoleStream != null) { + InputStreamCopyObserver consoleInputStreamObserver = new InputStreamCopyObserver(inputFromConsoleStream, proc.getOutputStream(), null); + consoleInputStreamObserver.start(); + } + + afterProcessTerminated(proc); + + try { + stdoutObserver.join(); + stderrObserver.join(); + } + catch (InterruptedException e) { + } + + if (monitor != null && !(monitor instanceof NullProgressMonitor)) { + if (monitor.isCanceled()) { + System.out.println("monitor.isCanceled():"+monitor.isCanceled()); + System.out.println(cmdlist); + } + } + + return true; + } + + private final class ProgressMonitorListener implements + IProgressMonitorListener { + @Override + public void onSetCanceled(IProgressMonitor monitor, boolean value) { + if (value) { + proc.destroy(); + } + } + } + + private static class InputStreamCopyObserver extends InputStreamObserver{ + public InputStreamCopyObserver(InputStream fromStream, final OutputStream toStream, List streamListeners) { + super(fromStream); + addListeners(streamListeners); + if (toStream != null) { + addListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + try { + toStream.write(buffer, 0, length); + } catch (IOException e) { + LogHelper.logError(e); + } + } + + @Override + public void onEndOfStreamReached() { + } + }); + } + } + + private void addListeners(List streamListeners) { + if (!CollectionUtils.isEmpty(streamListeners)) { + for (InputStreamListener listener : streamListeners) { + addListener(listener); + } + } + } + } + + private void addEnvCaseInsensitive(Map env) { + if (envadd == null || envadd.isEmpty()) { + return; + } + + HashSet addvars = new HashSet(); + for (String var : envadd.keySet()) { + addvars.add(var.toLowerCase()); + } + + for (Iterator i = env.keySet().iterator(); i.hasNext(); ) + { + String v = i.next(); + if (addvars.contains(v.toLowerCase())) { + i.remove(); + } + } + + env.putAll(envadd); + } + + /** + * + * @return process exit code + */ + public int exitValue() { + return exitValue; + } + + protected void enableTerminateButton(boolean en) { + if (console != null) { + console.enableTerminateButton(en); + } + } + + protected void abort(String message, Throwable exception, int code) throws CoreException { + throw new CoreException(new Status(IStatus.ERROR, XdsCorePlugin.PLUGIN_ID, + code, message, exception)); + } + + /** + * Waits for process to terminate and performs final actions + */ + private void afterProcessTerminated(final Process process) { + try { + proc.waitFor(); + } catch (InterruptedException e) { + } + exitValue = proc.exitValue(); + enableTerminateButton(false); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessUtils.java new file mode 100644 index 0000000..c7dbf93 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/process/ProcessUtils.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.core.process; + +import java.io.File; +import java.util.Arrays; + +import org.eclipse.core.runtime.CoreException; + +/** + * Utilities to work with OS processes. + * @author lsa80 + */ +public final class ProcessUtils { + /** + * @param cmdLineArgs - command line, [0] should be executable path + * @param workingDirectory + * @param environmentVariables + * @return stdout contents + * @throws CoreException if something gone wrong + */ + public static String launchProcessAndCaptureStdout(String[] cmdLineArgs, File workingDirectory, + String[] environmentVariables) throws CoreException { + ProcessLauncher launcher = new ProcessLauncher(); + launcher.setCommandline(Arrays.asList(cmdLineArgs)); + launcher.setEnvironment(environmentVariables); + launcher.setWorkingDirectory(workingDirectory); + final StringBuilder sb = new StringBuilder(); + launcher.addProcessStdoutListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + sb.append(new String(buffer, 0, length)); + } + + @Override + public void onEndOfStreamReached() { + } + }); + launcher.launch(); + return sb.toString(); + } + + private ProcessUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/DelegatingProgressMonitor.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/DelegatingProgressMonitor.java new file mode 100644 index 0000000..4e9cb96 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/DelegatingProgressMonitor.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.core.progress; + +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; + +/** + * Observable wrapper of the usual {@link org.eclipse.core.runtime.IProgressMonitor}.

+ * Know issues: does not works well in the case when monitor is canceled via the {@link org.eclipse.core.runtime.SubMonitor}. + * @author lsa80 + */ +public class DelegatingProgressMonitor implements IListenableProgressMonitor { + private final IProgressMonitor delegateMonitor; + private final List listeners = new CopyOnWriteArrayList(); + + public DelegatingProgressMonitor(IProgressMonitor delegateMonitor) { + this.delegateMonitor = delegateMonitor; + } + + public static DelegatingProgressMonitor wrap(IProgressMonitor monitor) { + return new DelegatingProgressMonitor(monitor); + } + + public static DelegatingProgressMonitor nullProgressMonitor() { + return wrap(new NullProgressMonitor()); + } + + public void setListener(IProgressMonitorListener l) { + listeners.add(l); + } + + public void beginTask(String name, int totalWork) { + delegateMonitor.beginTask(name, totalWork); + } + + public void done() { + delegateMonitor.done(); + } + + public void internalWorked(double work) { + delegateMonitor.internalWorked(work); + } + + public boolean isCanceled() { + return delegateMonitor.isCanceled(); + } + + public void setCanceled(boolean value) { + delegateMonitor.setCanceled(value); + + for (IProgressMonitorListener l : listeners) { + l.onSetCanceled(delegateMonitor, value); + } + } + + public void setTaskName(String name) { + delegateMonitor.setTaskName(name); + } + + public void subTask(String name) { + delegateMonitor.subTask(name); + } + + public void worked(int work) { + delegateMonitor.worked(work); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IListenableProgressMonitor.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IListenableProgressMonitor.java new file mode 100644 index 0000000..c1f1202 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IListenableProgressMonitor.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.progress; + +import org.eclipse.core.runtime.IProgressMonitor; + +/** + * Observalble extension of the {@link org.eclipse.core.runtime.IProgressMonitor}. + * @author lsa + */ +public interface IListenableProgressMonitor extends IProgressMonitor { + void setListener(IProgressMonitorListener l); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IProgressMonitorListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IProgressMonitorListener.java new file mode 100644 index 0000000..545e587 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/progress/IProgressMonitorListener.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.progress; + +import org.eclipse.core.runtime.IProgressMonitor; + +public interface IProgressMonitorListener { + void onSetCanceled(IProgressMonitor monitor, boolean value); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/AbstractProjectSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/AbstractProjectSettings.java new file mode 100644 index 0000000..4483c39 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/AbstractProjectSettings.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.core.project; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.ProjectScope; +import org.eclipse.core.runtime.preferences.IEclipsePreferences; +import org.eclipse.core.runtime.preferences.IScopeContext; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.osgi.service.prefs.BackingStoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceKey; + +/** + * Base class for all IProject-based settings + * + * @author lsa80 + */ +public abstract class AbstractProjectSettings { + protected final IProject project; + private final String quailifier; + protected final IScopeContext projectScope; + + protected AbstractProjectSettings(IProject project, String quailifier) { + this.project = project; + this.quailifier = quailifier; + this.projectScope = new ProjectScope(project); + } + + + public void addChangeListener(IPreferenceChangeListener listener) { + PreferenceKey.addChangeListener(projectScope, null, quailifier, listener); + } + + public void removeChangeListener(IPreferenceChangeListener listener) { + PreferenceKey.removeChangeListener(projectScope, null, quailifier, listener); + } + + public void flush() { + try { + IEclipsePreferences node = projectScope.getNode(quailifier); + node.flush(); + ProjectUtils.refreshLocalSync(project); + } catch (BackingStoreException e) { + LogHelper.logError(e); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/IXdsProjectSettingsListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/IXdsProjectSettingsListener.java new file mode 100644 index 0000000..8282ec9 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/IXdsProjectSettingsListener.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.core.project; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Listener of the changes in Project Settings see {@link XdsProjectSettings} + * + * @author lsa80 + */ +public interface IXdsProjectSettingsListener { + void projectSdkChanged(IProject project, Sdk oldSdk, Sdk currentSdk); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NatureUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NatureUtils.java new file mode 100644 index 0000000..dd6b2b1 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NatureUtils.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.core.project; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; + +public final class NatureUtils { + private NatureUtils() { + super(); + } + + public static void addNature(IProject project, String nature) { + try { + IProjectDescription description = project.getDescription(); + String[] currentNatures = description.getNatureIds(); + String[] newNatures = new String[currentNatures.length + 1]; + System.arraycopy(currentNatures, 0, newNatures, 0, currentNatures.length); + newNatures[currentNatures.length] = nature; + description.setNatureIds(newNatures); + project.setDescription(description, null); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static void removeNature(IProject project, String nature) { + try { + IProjectDescription description = project.getDescription(); + String[] currentNatures = description.getNatureIds(); + + int index = 0; + for (int i = 0; i < currentNatures.length; i++) { + if (nature.equals(currentNatures[i])) { + index = i; + break; + } + } + + if (index != -1) { + String[] newNatures = new String[currentNatures.length - 1]; + System.arraycopy(currentNatures, 0, newNatures, 0, index); + System.arraycopy(currentNatures, index + 1, newNatures, index, + newNatures.length - index); + description.setNatureIds(newNatures); + project.setDescription(description, null); + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static boolean hasModula2Nature(IProject project) { + return hasNature(project, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID); + } + + public static boolean hasNature(IProject project, String nature) { + if (project == null || !project.isOpen()) return false; + try { + return project.getNature(nature) != null; + } catch (CoreException e) { + LogHelper.logError(e); + } + return false; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectCreator.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectCreator.java new file mode 100644 index 0000000..36b5364 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectCreator.java @@ -0,0 +1,497 @@ +package com.excelsior.xds.core.project; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.text.StrSubstitutor; +import org.apache.commons.lang.text.StrTokenizer; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IProjectDescription; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.NullProgressMonitor; +import org.osgi.framework.Bundle; + +import com.excelsior.xds.core.compiler.compset.ExternalResourceManager; +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.SdkManager; +import com.excelsior.xds.core.templates.SourceFileCreator; +import com.excelsior.xds.core.templates.SourceFileTemplate; + +/** + * Special class for creating Modula-2 projects. + */ +public final class NewProjectCreator { + + private String mainModule; + + public IProject createFromScratch(NewProjectSettings settings, Bundle resourceBundle, IUserInteraction userInteraction) { + + FromScratchMaker fsm = new FromScratchMaker(settings, resourceBundle, userInteraction); + + String err = fsm.createProjectFiles(); + if (err != null) { + if (!err.isEmpty()) { + userInteraction.showOkNotification(Messages.NewProjectCreator_CreatePrjFromScratch, err); + } + return null; + } + + final IProject project = createProject(settings.getProjectName(), settings.getProjectRoot()); + openProject(project); + + ExternalResourceManager.recreateExternalsFolder(project, new NullProgressMonitor()); + + final XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + + if (XdsProjectType.PROJECT_FILE.equals(fsm.projectType)) { + xdsProjectSettings.setXdsProjectFile(ResourceUtils.getRelativePath(project, fsm.prjFile)); + xdsProjectSettings.setProjectType(XdsProjectType.PROJECT_FILE); + } else { + xdsProjectSettings.setMainModule(ResourceUtils.getRelativePath(project, fsm.mainModule)); + xdsProjectSettings.setProjectType(XdsProjectType.MAIN_MODULE); + } + mainModule = fsm.mainModule; + + xdsProjectSettings.setProjectSdk(settings.getProjectSdk()); + + NatureUtils.addNature(project, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID); + ResourceUtils.scheduleWorkspaceRunnable(new IWorkspaceRunnable() { + @Override + public void run(IProgressMonitor monitor) throws CoreException { + xdsProjectSettings.flush(); + } + }, project, Messages.NewProjectCreator_BuildingProject, false); + + return project; + } + + public String getMainModule() { + return mainModule; + } + + public static IProject createFromSources (NewProjectSettings settings) { + final IProject project = createProject(settings.getProjectName(), settings.getProjectRoot()); + openProject(project); + ExternalResourceManager.recreateExternalsFolder(project, new NullProgressMonitor()); + + final XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + + if (settings.getXdsProjectFile() != null) { + xdsProjectSettings.setProjectType(XdsProjectType.PROJECT_FILE); + xdsProjectSettings.setXdsProjectFile(ResourceUtils.getRelativePath(project, settings.getXdsProjectFile())); + } else { + xdsProjectSettings.setProjectType(XdsProjectType.MAIN_MODULE); + xdsProjectSettings.setMainModule(ResourceUtils.getRelativePath(project, settings.getMainModule())); + } + + xdsProjectSettings.setProjectSdk(settings.getProjectSdk()); + + NatureUtils.addNature(project, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID); + + ResourceUtils.scheduleWorkspaceRunnable(new IWorkspaceRunnable() { + @Override + public void run(IProgressMonitor monitor) throws CoreException { + xdsProjectSettings.flush(); + } + }, project, Messages.NewProjectCreator_BuildingProject, false); + + return project; + } + + private static IProject createProject(String projectName, String location) { + IWorkspaceRoot workspaceRoot = ResourcesPlugin.getWorkspace().getRoot(); + String workspacePath = ResourceUtils.getAbsolutePath(workspaceRoot); + String differentCasingProjectName = ResourceUtils.checkResourceExistWithDifferentCasing(workspaceRoot, projectName); + if (differentCasingProjectName != null) { + projectName = differentCasingProjectName; + } + + cleanProjectArea(projectName, location); + + IProject newProject = workspaceRoot + .getProject(projectName); + + URI projectLocation = new File(location).toURI(); + IProjectDescription desc = newProject.getWorkspace().newProjectDescription(newProject.getName()); + String locationParent = new File(location).getParent(); + if (location != null && (workspacePath.equals(location) || workspacePath.equals(locationParent))) { + projectLocation = null; + } else if (location == null) { + projectLocation = null; + } + desc.setLocationURI(projectLocation); + try { + newProject.create(desc, null); + } catch (CoreException e) { + LogHelper.logError(e); + } + + return newProject; + } + + private static void cleanProjectArea(String projectName, String location) { + String workspacePath = ResourceUtils.getAbsolutePath(ResourcesPlugin.getWorkspace().getRoot()); + String locationParent = new File(location).getParent(); + if (workspacePath.equals(location) || workspacePath.equals(locationParent)) { + location = FilenameUtils.concat(workspacePath, projectName); + } + + File projectDescriptor = new File(FilenameUtils.concat(location, ".project")); //$NON-NLS-1$ + if (projectDescriptor.exists()) { + FileUtils.deleteQuietly(projectDescriptor); + } + } + + private static void openProject(IProject project) { + if (!project.isOpen()) { + try { + project.open(null); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + + + + private static class FromScratchMaker { + private NewProjectSettings desc; + public String mainModule; + public String prjFile; + public XdsProjectType projectType; + private IUserInteraction userInteraction; + + public FromScratchMaker(NewProjectSettings desc, Bundle resourceBundle, IUserInteraction userInteraction) { + this.desc = desc; + this.userInteraction = userInteraction; + } + + /** + * Create project from scratch + * + * @param newProjectDesc + * @return true when ok + * + * Set this.mainModule = main module name if it was created + * this.prjFile = .prj file name if it was created + * this.projectType = XdsProjectType.MAIN_MODULE or XdsProjectType.PROJECT_FILE + */ + private String createProjectFiles() { + + this.projectType = XdsProjectType.MAIN_MODULE; + + // Get SDK: + Sdk sdk = desc.getProjectSdk(); + if (sdk == null) { + sdk = SdkManager.getInstance().loadSdkRegistry().getDefaultSdk(); + } + if (sdk == null) { + return Messages.NewProjectCreator_CantNoSdk; + } + + // .prj file: + File prjFileToCreate; + { + String name = desc.getXdsProjectFile(); + if (name == null || name.isEmpty()) { + name = desc.getProjectName(); + } + if (!name.toLowerCase().endsWith(".prj")) { //$NON-NLS-1$ + name += ".prj"; //$NON-NLS-1$ + } + prjFileToCreate = new File(desc.getProjectRoot(), name); + } + + // Main module or "" + String mainModule = ""; //$NON-NLS-1$ + String mainModuleName = ""; //$NON-NLS-1$ + String pragmaMain = ""; //$NON-NLS-1$ + if (desc.getMainModule() != null && !StringUtils.isBlank(desc.getMainModule())) { + // Ensure extension = "mod" or "ob2" in lower case + mainModule = desc.getMainModule().trim(); + if (mainModule.toLowerCase().endsWith(".mod")) { //$NON-NLS-1$ + mainModule = mainModule.substring(0, mainModule.length()-3) + "mod"; //$NON-NLS-1$ + } else if (mainModule.toLowerCase().endsWith(".ob2")) { //$NON-NLS-1$ + mainModule = mainModule.substring(0, mainModule.length()-3) + "ob2"; //$NON-NLS-1$ + pragmaMain = "<* +MAIN *>\n"; //$NON-NLS-1$ + } else { + mainModule += ".mod"; //$NON-NLS-1$ + } + mainModuleName = FilenameUtils.getBaseName(mainModule); + } + + // xc: + File xcExe = new File(sdk.getCompilerExecutablePath()); + String xcName = FilenameUtils.getBaseName(xcExe.getName()); + + // Some variables from old xShell\src\var.c: + // + HashMap vars = new HashMap(); + vars.put("mainmodule", mainModule); // - main module name or "" //$NON-NLS-1$ + vars.put("xdsmain", xcExe.getAbsolutePath()); // - main Compiler Executable //$NON-NLS-1$ + vars.put("xdsname", xcName); // - its name without .exe //$NON-NLS-1$ + vars.put("xdsdir", xcExe.getParent()); // - its directory //$NON-NLS-1$ + vars.put("project", prjFileToCreate.getAbsolutePath()); // - full project file name //$NON-NLS-1$ + vars.put("projdir", prjFileToCreate.getParent()); // - project directory //$NON-NLS-1$ + vars.put("projname", desc.getProjectName()); // - project name without path and extension (== Eclipse project name) //$NON-NLS-1$ + vars.put("projext", "prj"); // - project file extension //$NON-NLS-1$ //$NON-NLS-2$ + vars.put("homedir", xcExe.getParent()); // - directory where (old) xds shell resides == xdsdir //$NON-NLS-1$ + vars.put("eclipse.ide.pragmamain", pragmaMain); // - used for main module generation //$NON-NLS-1$ + vars.put("eclipse.ide.modulename", mainModuleName); // - used for main module generation //$NON-NLS-1$ + + + // Create files contents: + // + ArrayList alProblems = new ArrayList(); + + // --- .prj + String prjContent = null; + if (desc.getXdsProjectFile() != null) { + if (desc.getTemplateFile() != null) { + prjContent = openTemplate(desc.getTemplateFile(), vars, alProblems, Messages.NewProjectCreator_ProjectWord); + } else { + prjContent = ""; //$NON-NLS-1$ + + String path = "$!/"; //$NON-NLS-1$ + { + File fprj = new File(desc.getXdsProjectFile()); + while ((fprj = fprj.getParentFile()) != null) { + path += "../"; //$NON-NLS-1$ + } + } + path += FilenameUtils.separatorsToUnix(FilenameUtils.getFullPathNoEndSeparator(mainModule)); + + if (!path.equals("$!/")) { //$NON-NLS-1$ + prjContent += "-lookup = *.mod = " + path + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + prjContent += "-lookup = *.ob2 = " + path + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + prjContent += "-lookup = *.def = " + path + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + prjContent += "\n"; //$NON-NLS-1$ + prjContent += "!module " + path + '/' + FilenameUtils.getName(mainModule) + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + } else { + prjContent += "!module " + mainModule + "\n"; //$NON-NLS-1$ //$NON-NLS-2$ + } + } + } + + // --- .red + String redContent = desc.isCreateRedFile() ? + openTemplate(sdk.getTrdFile(), vars, alProblems, Messages.NewProjectCreator_RedirectionWord) : null; + + // --- main + String mainContent = null; + if (!mainModule.isEmpty()) { + try { + mainContent = SourceFileCreator.getTemplateContent(sdk, SourceFileTemplate.MAIN_MODULE, vars); + } catch (FileNotFoundException e) { + LogHelper.logError(e); + } catch (IOException e) { + LogHelper.logError(e); + } + } + + if (!alProblems.isEmpty()) { + String msg = Messages.NewProjectCreator_TheFollowingProblems; + for (String s:alProblems) { + msg += s + "\n"; //$NON-NLS-1$ + } + msg += Messages.NewProjectCreator_DoYouWantToContinue; + if (!userInteraction.askYesNoQuestion(Messages.NewProjectCreator_CreatePrjFromScratch, msg)) { + return ""; //$NON-NLS-1$ + } + } + + //--- Create directories and write files: + + // Ensure project root dir: + File projectDir = new File(desc.getProjectRoot()); + if (projectDir.isDirectory()) { + File[] fl = projectDir.listFiles(); + if (fl != null && fl.length > 0) { + if (!userInteraction.askYesNoQuestion(Messages.NewProjectCreator_CreatePrjFromScratch, Messages.NewProjectCreator_ProjDirEmpty)) { + return ""; //$NON-NLS-1$ + } + } + } else if (projectDir.isFile()) { + return Messages.NewProjectCreator_TheDirIsFile + ": " + projectDir.getAbsolutePath(); //$NON-NLS-1$ + } else if (!projectDir.mkdirs()) { + return Messages.NewProjectCreator_CantCreateDir + ": " + projectDir.getAbsolutePath(); //$NON-NLS-1$ + } + + // Create default directories + if (desc.isCreateDirs()) { + String dirs = sdk.getDirsToCreate(); + if (dirs != null) { + String arr[] = new StrTokenizer(dirs, ';', '"').getTokenArray(); + for (String d : arr) { + d = d.trim(); + if (!d.isEmpty()) { + File subdir = new File(projectDir, d.trim()); + if (!subdir.isDirectory() && !subdir.mkdirs()) { + return Messages.NewProjectCreator_CantCreateDir+ ": " + subdir.getAbsolutePath(); //$NON-NLS-1$ + } + } + } + } + } + + // Create .prj file + if (prjContent != null) { + String err = createFile(prjFileToCreate, prjContent); + if (err != null) { + return err; + } + this.prjFile = prjFileToCreate.getAbsolutePath(); + this.projectType = XdsProjectType.PROJECT_FILE; + } + + // Create main module: + if (mainContent != null) { + File mainFile = new File(desc.getProjectRoot(), mainModule); + String err = createFile(mainFile, mainContent); + if (err != null) { + return err; + } + this.mainModule = mainFile.getAbsolutePath(); + } + + // Create .red file + if (redContent != null) { + File redFile = new File(desc.getProjectRoot(), xcName+".red"); //$NON-NLS-1$ + String err = createFile(redFile, redContent); + if (err != null) { + return err; + } + } + + return null; + } + + /** + * Create (project or redirection) file content from the template given in xds.ini + * Opens $() variables as it was made in old XDS IDE + * + * @param desc + * @param fileNameTpl - smth. like "$(xdsdir)\$(xdsname).tpr", "xc.tpr" or null + * @param vars - Map with $() vars values + * @param alProblems - dest. place to add problems description + * @param creatureName - "redirection", "project".. + * @return - string with the file content or null + */ + private String openTemplate( String fileNameTpl + , HashMap vars + , ArrayList alProblems + , String creatureName ) + { + if (fileNameTpl == null || fileNameTpl.isEmpty()) { + return null; + } + + String fileName = openVars(fileNameTpl, vars); + try { + return openTemplate(new FileInputStream(new File(fileName)), vars, alProblems, creatureName); + } catch (FileNotFoundException e) { + return null; + } + } + + private String openTemplate( InputStream srcStream + , HashMap vars + , ArrayList alProblems + , String creatureName ) + { + StringBuilder sb = new StringBuilder(); + BufferedReader br = null; + try { + br = new BufferedReader(new InputStreamReader(srcStream)); + String line; + while ((line = br.readLine()) != null) { + if (!line.trim().startsWith("%")) { //$NON-NLS-1$ + line = openVars(line, vars); + } + sb.append(line).append("\n"); //$NON-NLS-1$ + } + } catch (FileNotFoundException fnf) { + // should never get there + return null; + } catch (IOException io) { + alProblems.add(String.format(Messages.NewProjectCreator_ErrReadingTpl, creatureName, creatureName)); + return null; + } finally { + if (br != null) { + IOUtils.closeQuietly(br); + } + } + String template = sb.toString(); + + /* process variables defined in Eclipse style */ + StrSubstitutor sub = new StrSubstitutor(vars); + template = sub.replace(template); + + return template; + } + + private String openVars(String str, HashMap vars) { + if (!str.contains("$(")) //$NON-NLS-1$ + return str; + + StringBuilder sb = new StringBuilder(); + int pos = 0; + int beg; + while((beg = str.indexOf("$(", pos)) >= 0) { //$NON-NLS-1$ + int end = str.indexOf(')', beg); + if (end < 0) { + break; + } + String var = str.substring(beg+2, end).toLowerCase(); + var = vars.get(var); + if (var != null) { + sb.append(str, pos, beg); + sb.append(var); + } else { // undefined var - leave it as is + sb.append(str, pos, end+1); + } + pos = end+1; + } + sb.append(str, pos, str.length()); + return sb.toString(); + } + + private String createFile(File f, String content) { + try { + f.getParentFile().mkdirs(); + FileWriter w = new FileWriter(f); + w.write(content); + w.close(); + } catch (IOException e) { + return Messages.NewProjectCreator_ErrWritingFile + f.getAbsolutePath() + "'"; //$NON-NLS-1$ + } + return null; + } + } // class FromScratchMaker + + public interface IUserInteraction { + void showOkNotification(String title, String message); + boolean askYesNoQuestion(String title, String message); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectSettings.java new file mode 100644 index 0000000..61e5ca4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/NewProjectSettings.java @@ -0,0 +1,104 @@ +package com.excelsior.xds.core.project; + +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Container of settings to create a new project. + */ +public final class NewProjectSettings { + + // common part of settings: + private String projectName; + private String projectRoot; + private Sdk projectSdk; // null means default SDK + + private String mainModule; // .mod/.ob2 file name or null + + private String projectFile; // .prj file or null + + // create from scratch part of settings: + private String tprFile; // templete file or null to don't use it + private boolean createRedirectionFile; + private boolean createDirs; + + /** + * + * @param projectName unique name for new project + * @param projectRoot path to project root folder + * @param projectSdk project specific SDK or null for default SDK + */ + public NewProjectSettings (String projectName, String projectRoot, Sdk projectSdk) { + this.projectName = projectName; + this.projectRoot = !StringUtils.isBlank(projectRoot) ? ResourceUtils.getAbsolutePathAsInFS(projectRoot) : projectRoot; + this.projectSdk = projectSdk; + } + + public String getProjectName() { + return projectName; + } + + public String getProjectRoot() { + return projectRoot; + } + + public Sdk getProjectSdk() { + return projectSdk; + } + + + /** + * @param mainModule existent .mod or .ob2 file name + */ + public void setMainModule(String mainModule) { + this.mainModule = mainModule; + } + + public String getMainModule() { + return mainModule; + } + + /** + * @param projectFile .prj file or null + */ + public void setXdsProjectFile(String projectFile) { + this.projectFile = projectFile; + } + + public String getXdsProjectFile() { + return projectFile; + } + + + // ------------------------------------------------------------------------- + // create from scratch part of settings + // ------------------------------------------------------------------------- + public void setTemplateFile(String tprFile) { + this.tprFile = tprFile; + } + + public String getTemplateFile() { + return tprFile; + } + + + public void setCreateRedFile(boolean create) { + createRedirectionFile = create; + } + + public boolean isCreateRedFile() { + return createRedirectionFile; + } + + + public void setCreateDirs(boolean create) { + createDirs = create; + } + + public boolean isCreateDirs() { + return createDirs; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/ProjectUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/ProjectUtils.java new file mode 100644 index 0000000..3c6c6c4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/ProjectUtils.java @@ -0,0 +1,222 @@ +package com.excelsior.xds.core.project; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.io.FilenameUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.google.common.io.Files; +import com.google.common.io.LineProcessor; + +public final class ProjectUtils { + private ProjectUtils() { + } + /** + * Checks whether given project have the xds project nature + * @return + */ + public static boolean isXdsProject(IProject p) { + return isBelongsToXdsProject(p); + } + public static boolean isBelongsToXdsProject(IResource r) { + if (r == null) { + return false; + } + IProject p = r.getProject(); + return NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID); + } + + public static boolean isWorkspaceContainsXdsProjects() { + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject p : allProjects) { + if (NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + return true; + } + } + return false; + } + + public static String getProjectLocation(IProject p) { + return ResourceUtils.getAbsolutePathAsInFS(p.getLocation().toOSString()); + } + + public static IProject getXdsProjectWithProjectRoot(String projectRoot) { + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject p : allProjects) { + if (NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + if (getProjectLocation(p).equals(projectRoot)) { + return p; + } + } + } + return null; + } + + public static List getXdsProjects() { + List xdsProjects = new ArrayList(); + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject p : allProjects) { + if (NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + xdsProjects.add(p); + } + } + return xdsProjects; + } + + /** + * Checks whether exist project with the name differs only by casing of name`s letters + * + * @param projectName - name of the Eclipse project + * @return + */ + public static boolean isProjectExistsWithAnotherCase(String projectName) { + projectName = projectName.toLowerCase(); + IProject[] allProjects = ResourcesPlugin.getWorkspace().getRoot().getProjects(); + for (IProject p : allProjects) { + if (p.getName().toLowerCase().equals(projectName)) { + return true; + } + } + return false; + } + + public static List filterXdsProjects(Object[] elements) { + List projects = new ArrayList(); + for (Object o : elements) { + if (o instanceof IProject) { + IProject p = (IProject)o; + if (NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + projects.add(p); + } + } + } + return projects; + } + + public static IFile getResource(IProject project, String relativePath) { + if (relativePath == null) return null; + IFile file = project.getFile(relativePath); + if (!file.exists()) return null; + return file; + } + + public static IProject getProject(String name) { + IProject[] projects = ResourceUtils.getWorkspaceRoot().getProjects(); + for (IProject p : projects) { + if (p.getName().equals(name)) { + return p; + } + } + return null; + } + + public static void refreshLocalSync(IProject project) { + ResourceUtils.refreshLocalSync(project); + } + + /** + * Returns workspace resource corresponding to the prj file, or null if project is MAIN_MODULE type instead of PROJECT_FILE + * + * @return + */ + public static IFile getPrjFile(XdsProjectSettings xdsProjectSettings) { + if (XdsProjectType.PROJECT_FILE.equals(xdsProjectSettings.getProjectType())) { + return ProjectUtils.getResource( xdsProjectSettings.getProject(), xdsProjectSettings.getXdsProjectFile()); + } + return null; + } + + public static IFile getMainModuleFile(XdsProjectSettings xdsProjectSettings) { + return getResource( xdsProjectSettings.getProject(), xdsProjectSettings.getMainModule()); + } + + public static String getParseRootModuleName(XdsProjectSettings xdsProjectSettings) { + String compilationRootName = xdsProjectSettings.getCompilationRootName(); + if (XdsFileUtils.isXdsProjectFile(compilationRootName)) { + try { + return Files.readLines(ResourceUtils.getAbsoluteFile(getPrjFile(xdsProjectSettings)), Charset.defaultCharset(), new LineProcessor() { + final Pattern linePattern = Pattern.compile("[!]module (\\w+(?:[.]\\w{3})?)"); + String result; + + @Override + public boolean processLine(String line) throws IOException { + Matcher matcher = linePattern.matcher(line); + if (matcher.find()) { + String moduleName = matcher.group(1); + if (XdsFileUtils.isCompilationUnitFile(moduleName) || + FilenameUtils.getExtension(moduleName).isEmpty()) { + result = moduleName; + return false; + } + } + + return true; + } + + @Override + public String getResult() { + return result; + } + }); + } catch (IOException e) { + LogHelper.logError(e); + } + return null; + } + else { + return compilationRootName; + } + } + + public static IFile getApplicationExecutableFile(XdsProjectSettings xdsProjectSettings) { + String location = xdsProjectSettings.getApplicationExecutable(); + + if (location == null) { + // Autodetect + IFile seed_file = null; + + switch(xdsProjectSettings.getProjectType()) { + case MAIN_MODULE: + seed_file = getMainModuleFile(xdsProjectSettings); + break; + case PROJECT_FILE: + seed_file = getPrjFile(xdsProjectSettings); + break; + } + + if (seed_file == null) + return null; + + Sdk sdk = xdsProjectSettings.getProjectSdk(); + String ext = (sdk == null) ? "exe" : sdk.getExecutableFileExtensions(); //$NON-NLS-1$ + + location = FilenameUtils.removeExtension(ResourceUtils.getAbsolutePath(seed_file)) + + "." + ext; //$NON-NLS-1$ + + // TODO : the following action should be done only once after first build +// if (!new File(location).isFile()) { +// Collection files = FileUtils.listFiles(new File(FilenameUtils.getFullPath(location)), new String[]{ext}, false); +// if (!files.isEmpty()) { +// location = files.iterator().next().getAbsolutePath(); +// } +// } + } + + String relativePath = ResourceUtils.getRelativePath(xdsProjectSettings.getProject(), location); + return ProjectUtils.getResource( xdsProjectSettings.getProject(), relativePath); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFileNames.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFileNames.java new file mode 100644 index 0000000..2f36b46 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFileNames.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.project; + +import java.util.HashSet; +import java.util.Set; + +public final class SpecialFileNames { + public static final String PROJECT_PROPERTIES_FILE = ".project"; //$NON-NLS-1$ + + private static Set specialFileNames; + + public synchronized static Set getSpecialFileNames() { + if (specialFileNames == null) { + specialFileNames = new HashSet(); + specialFileNames.add(PROJECT_PROPERTIES_FILE); + } + return specialFileNames; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFolderNames.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFolderNames.java new file mode 100644 index 0000000..723da82 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/SpecialFolderNames.java @@ -0,0 +1,71 @@ +package com.excelsior.xds.core.project; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * Special folders are used for the internal purposes. + * @author lsa80 + */ +public final class SpecialFolderNames +{ + public static final String EXTERNAL_DEPENDENCIES_DIR_NAME = ".externals"; //$NON-NLS-1$ + public static final String VIRTUAL_MOUNT_ROOT_DIR_NAME = ".mnt"; //$NON-NLS-1$ + public static final String SETTINGS_DIR_NAME = ".settings"; //$NON-NLS-1$ + + private static final Set SPECIAL_FOLDER_NAMES = new HashSet<>(Arrays.asList(EXTERNAL_DEPENDENCIES_DIR_NAME, SETTINGS_DIR_NAME, VIRTUAL_MOUNT_ROOT_DIR_NAME)); + private static final Set IGNORED_SPECIAL_FOLDER_NAMES = new HashSet<>(); + static{ + IGNORED_SPECIAL_FOLDER_NAMES.addAll(SPECIAL_FOLDER_NAMES); + IGNORED_SPECIAL_FOLDER_NAMES.remove(VIRTUAL_MOUNT_ROOT_DIR_NAME); + } + + /** + * Only static methods are allowed. + */ + private SpecialFolderNames() { + } + + public static Set getIgnoredSpecialFolderNames() { + return Collections.unmodifiableSet(IGNORED_SPECIAL_FOLDER_NAMES); + } + + public static Set getSpecialFolderRelativePathes(IProject p) { + if (!NatureUtils.hasNature(p, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + return Collections.emptySet(); + } + + Set pathes = new HashSet<>(); + for (String name : SPECIAL_FOLDER_NAMES) { + IFolder f = p.getFolder(name); + if (f != null) { + pathes.add(f.getProjectRelativePath().toPortableString()); + } + } + + return pathes; + } + + /** + * Checks whether resource is inside special folder (like {@link #VIRTUAL_MOUNT_ROOT_DIR_NAME}) + * @param r resource to check + * @return true if inside + */ + public static boolean isInsideIgnoredSpecialFolder(IResource r) { + for (String folderName : getIgnoredSpecialFolderNames()) { + if (ResourceUtils.isInsideFolder(folderName, r)) { + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettings.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettings.java new file mode 100644 index 0000000..47db937 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettings.java @@ -0,0 +1,286 @@ +package com.excelsior.xds.core.project; + +import java.io.File; +import java.util.Objects; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.exceptions.ExceptionHelper; +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceKey; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.SdkManager; +import com.excelsior.xds.core.sdk.SdkRegistry; +import com.excelsior.xds.core.variables.VariableUtils; + +/** + * Read/write access for the XDS IProject settings. + *
+ * @author lsa80 + */ +public final class XdsProjectSettings extends AbstractProjectSettings +{ + private final XdsProjectSettingsManager manager; + + /** + * If true means that SDK was changed but this edit is unflushed. + */ + private boolean isSdkChanged = false; + private Sdk previousSdk; + + + private static final String XDS_QUALIFIER = XdsCorePlugin.PLUGIN_ID; + private static final String TAG_PROJECT_TYPE_NAME = "ProjectType"; //$NON-NLS-1$ + private static final String TAG_PROJECT_SDK_NAME = "ProjectSdk"; //$NON-NLS-1$ + private static final String TAG_PROJECT_APPLICATION_EXE = "ProjectApplicationExe"; //$NON-NLS-1$ + private static final String TAG_MAIN_MODULE = "MainModule"; //$NON-NLS-1$ + private static final String TAG_XDS_PRJ_FILE = "XdsPrjFile"; //$NON-NLS-1$ + private static final String TAG_XDS_WORKING_DIR = "XdsCompileDir"; //$NON-NLS-1$ + + XdsProjectSettings(IProject project, XdsProjectSettingsManager manager) { + super(project, XDS_QUALIFIER); + this.manager = manager; + } + + public XdsProjectType getProjectType() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_TYPE_NAME); + String projectTypeStr = preferenceKey.getStoredValue(projectScope, null); + if (projectTypeStr == null) { + return null; + } + return XdsProjectType.valueOf(projectTypeStr); + } + + public void setProjectType(XdsProjectType projectType) { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_TYPE_NAME); + preferenceKey.setStoredValue(projectScope, projectType.toString(), null); + } + + /** + * Returns SDK which is assigned to the project or + * null when project uses Default SDK + * + * @return project SDK or null if project uses Default SDK + */ + public Sdk getProjectSdk() { + String sdkName = getProjectSpecificSdkName(); + SdkRegistry sdkRegistry = SdkManager.getInstance().loadSdkRegistry(); + + Sdk sdk; + if (sdkName == null) { + sdk = sdkRegistry.getDefaultSdk(); + } else { + sdk = sdkRegistry.findSdk(sdkName); + } + return sdk; + } + + /** + * Assigns given SDK to the project. The null value of the parameter + * is used to assign the default SDK. + * @param sdk SDK to be assigned to the project or + * null to assign default SDK. + */ + public void setProjectSdk (Sdk sdk) { + if (!isSdkChanged){ + previousSdk = getProjectSdk(); + isSdkChanged = true; + } + + String sdkName = (sdk == null || sdk.isDefault()) + ? null : sdk.getName(); + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_SDK_NAME); + preferenceKey.setStoredValue(projectScope, sdkName, null); + } + + // SDK name (it may be removed SDK) or null when default SDK should be used + public String getProjectSpecificSdkName() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_SDK_NAME); + return preferenceKey.getStoredValue(projectScope, null); + } + + /** + * @return XDS compiler working directory as it is specified in Project properties + * dialog (with ${} variables etc) or null when 'default' directory is selected + */ + public String getXdsWorkingDirString() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_XDS_WORKING_DIR); + String dir = preferenceKey.getStoredValue(projectScope, null); + if (dir != null && dir.trim().isEmpty()) { + dir = null; + } + return dir; + } + + /** + * @return the directory should be used as working directory to run XDS compiler + * in (may be unexistent) or null when error + * @throws CoreException + */ + public File getXdsWorkingDir() throws CoreException { + File compileDir = null; + String path = getXdsWorkingDirString(); + String error = null; + if (path != null) { + try { + path = VariableUtils.performStringSubstitution(getProject(), path); + IPath iPath = new Path(path); + + if (iPath.isAbsolute()) { + File dir = new File(iPath.toOSString()); + if (dir.isDirectory()) { + compileDir = dir; + } else { + // This may be a workspace relative path returned by a variable. + // However variable paths start with a slash and thus are thought to + // be absolute + IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(iPath); + if (res instanceof IContainer && res.exists()) { + compileDir = res.getLocation().toFile(); + } else { + compileDir = dir; // unexistent + } + } + } else { + IResource res = ResourcesPlugin.getWorkspace().getRoot().findMember(iPath); + if (res instanceof IContainer && res.exists()) { + compileDir = res.getLocation() != null? res.getLocation().toFile() : null; + } else { + compileDir = new File(path); // unexistent + } + } + + if (compileDir == null) { + error = Messages.XdsProjectSettings_CantDetermineWorkDir; + } else if (compileDir.isFile()) { + error = Messages.XdsProjectSettings_InvalidWorkDir + compileDir.getAbsolutePath() + Messages.XdsProjectSettings_InvalidWorkDir2; + } + } catch (CoreException e) { + error = Messages.XdsProjectSettings_WrongWorkDir + ": " + e.getMessage(); //$NON-NLS-1$ + compileDir = null; + } + } else { // path == null + compileDir = getDefaultXdsWorkingDir(); + } + if (error != null) { + ExceptionHelper.throwCoreException(XdsCorePlugin.PLUGIN_ID, error); + } + return compileDir; + } + + /** + * @return default directory to execute XDS compiler in: root directory of the project + */ + public File getDefaultXdsWorkingDir() { + return ResourceUtils.getAbsoluteFile(getProject()); + } + + + // dir == null or dir == "" => use default path + public void setXdsWorkingDir(String dir) { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_XDS_WORKING_DIR); + preferenceKey.setStoredValue(projectScope, dir, null); + } + + /** + * Relative path to main module + */ + public String getMainModule() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_MAIN_MODULE); + return preferenceKey.getStoredValue(projectScope, null); + } + + /** + * Relative path to main module + */ + public void setMainModule(String mainModule) { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_MAIN_MODULE); + preferenceKey.setStoredValue(projectScope, mainModule, null); + } + + /** + * Get executable name + * + * @return full file name or null for autodetect + */ + public String getApplicationExecutable() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_APPLICATION_EXE); + String s = preferenceKey.getStoredValue(projectScope, null); + if (s != null) { + try { + s = StringUtils.trim(VariableUtils.performStringSubstitution(getProject(), s)); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + return s; + } + + /** + * Set executable name + * + * @param file - full file name (may be with {vars}) or null for autodetect + */ + public void setApplicationExecutable(String file) { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_PROJECT_APPLICATION_EXE); + preferenceKey.setStoredValue(projectScope, file, null); + } + + public String getXdsProjectFile() { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_XDS_PRJ_FILE); + return preferenceKey.getStoredValue(projectScope, null); + } + + public void setXdsProjectFile(String xdsPrjFile) { + PreferenceKey preferenceKey = new PreferenceKey(XDS_QUALIFIER, TAG_XDS_PRJ_FILE); + preferenceKey.setStoredValue(projectScope, xdsPrjFile, null); + } + + public IProject getProject() { + return project; + } + + public String getCompilationRootName() { + String compilationRoot = null; + if (XdsProjectType.PROJECT_FILE.equals(getProjectType())) { + compilationRoot = getXdsProjectFile(); + } + else if (XdsProjectType.MAIN_MODULE.equals(getProjectType())) { + compilationRoot = getMainModule(); + } + + if (compilationRoot == null) { + compilationRoot = StringUtils.EMPTY; + } + else { + compilationRoot = FilenameUtils.getName(compilationRoot); + } + return compilationRoot; + } + + /** + * Can raise {@link XdsProjectSettingsManager#notifyProjectSdkChanged(XdsProjectSettings, Sdk, Sdk)} event + * @see AbstractProjectSettings#flush() + */ + @Override + public void flush() { + super.flush(); + if (isSdkChanged){ + if (!Objects.equals(previousSdk, getProjectSdk())) { + manager.notifyProjectSdkChanged(this, previousSdk, getProjectSdk()); + } + isSdkChanged = false; + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettingsManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettingsManager.java new file mode 100644 index 0000000..2401d8a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectSettingsManager.java @@ -0,0 +1,84 @@ +package com.excelsior.xds.core.project; + +import static com.excelsior.xds.core.utils.Lambdas.toStream; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.stream.Stream; + +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.sdk.Sdk; + +public final class XdsProjectSettingsManager { + private final Map> project2Listeners = new HashMap>(); + + private XdsProjectSettings createXdsProjectSettings(IProject project) { + return new XdsProjectSettings(project, this); + } + + public static XdsProjectSettings getXdsProjectSettings(IProject project) { + return getInstance().createXdsProjectSettings(project); + } + + /** + * see {@link IXdsProjectSettingsListener} + * + * @param project - project to listen to. If null - listen to every project + * @param l + */ + public static void addListener(IProject project, IXdsProjectSettingsListener l) { + getInstance().doAddListener(project, l); + } + + /** + * Installs global listener (all projects) + * @param l + */ + public static void addListener(IXdsProjectSettingsListener l) { + addListener(null, l); + } + + /** + * see {@link IXdsProjectSettingsListener} + * @param project + * @param l + */ + public static void removeListener(IProject project, IXdsProjectSettingsListener l) { + getInstance().doRemoveListener(project, l); + } + + private synchronized void doRemoveListener(IProject project, IXdsProjectSettingsListener l) { + Set listeners = project2Listeners.get(project); + if (listeners != null) { + listeners.remove(l); + } + } + + private synchronized void doAddListener(IProject project, IXdsProjectSettingsListener l) { + Set listeners = project2Listeners.get(project); + if (listeners == null) { + listeners = new HashSet(); + project2Listeners.put(project, listeners); + } + listeners.add(l); + } + + synchronized void notifyProjectSdkChanged(XdsProjectSettings settings, Sdk oldSdk, Sdk currentSdk) { + IProject project = settings.getProject(); + + Stream.concat(toStream(project2Listeners.get(project)), + toStream(project2Listeners.get(null))).forEach( + l -> l.projectSdkChanged(project, oldSdk, currentSdk)); + } + + private static class XdsProjectManagerHolder{ + static XdsProjectSettingsManager INSTANCE = new XdsProjectSettingsManager(); + } + + public static XdsProjectSettingsManager getInstance(){ + return XdsProjectManagerHolder.INSTANCE; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectType.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectType.java new file mode 100644 index 0000000..bce664b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/XdsProjectType.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.project; + +public enum XdsProjectType { + MAIN_MODULE, + PROJECT_FILE +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/ILaunchConfigConst.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/ILaunchConfigConst.java new file mode 100644 index 0000000..5529ef7 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/ILaunchConfigConst.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.core.project.launcher; +/** + * Constant definitions for Modula-2 launch configurations. + *

+ * Constant definitions only + *

+ */ +public interface ILaunchConfigConst { + + /** + * Identifier for the Modula-2 Application launch configuration type + * (value "com.excelsior.xds.ui.launching.ModulaApplication"). + */ + public static final String ID_MODULA_APPLICATION = "com.excelsior.xds.ui.launching.ModulaApplication"; //$NON-NLS-1$ + public static final String ID_PKT_SCRIPT = "com.excelsior.xds.ui.launching.PktScript"; //$NON-NLS-1$ + + // XDS Modula-2 Application launcher: + public static final String ATTR_EXECUTABLE_PATH = ID_MODULA_APPLICATION + ".ATTR_EXECUTABLE_PATH"; //$NON-NLS-1$ + + // XDS Debug Script launcher: + public static final String ATTR_DBG_USE_PKT = ID_MODULA_APPLICATION + ".ATTR_DBG_USE_PKT"; //$NON-NLS-1$ // use .pkt or .ldp + public static final String ATTR_DBG_PKT_PATH = ID_MODULA_APPLICATION + ".ATTR_DBG_PKT_PATH"; //$NON-NLS-1$ + public static final String ATTR_DBG_LDP_PATH = ID_MODULA_APPLICATION + ".ATTR_DBG_LDP_PATH"; //$NON-NLS-1$ + + // Both launchers: + public static final String ATTR_DEBUGGER_ARGUMENTS = ID_MODULA_APPLICATION + ".ATTR_DEBUGGER_ARGUMENTS"; //$NON-NLS-1$ + + public static final String ATTR_PROJECT_NAME = ID_MODULA_APPLICATION + ".ATTR_PROJECT_NAME"; //$NON-NLS-1$ + + public static final String ATTR_PROGRAM_ARGUMENTS = ID_MODULA_APPLICATION + ".ATTR_PROGRAM_ARGUMENTS"; //$NON-NLS-1$ + + public static final String ATTR_SIMULATOR_ARGUMENTS = ID_MODULA_APPLICATION + ".ATTR_SIMULATOR_ARGUMENTS"; //$NON-NLS-1$ + + public static final String ATTR_WORKING_DIRECTORY = ID_MODULA_APPLICATION + ".ATTR_WORKING_DIRECTORY"; //$NON-NLS-1$ + + public static final String ATTR_USE_CONSOLE_DEBUGGER = ID_MODULA_APPLICATION + ".ATTR_USE_CONSOLE_DEBUGGER"; //$NON-NLS-1$ +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/LaunchConfigurationsRemover.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/LaunchConfigurationsRemover.java new file mode 100644 index 0000000..2b2e677 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/project/launcher/LaunchConfigurationsRemover.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.core.project.launcher; + +import java.util.ArrayList; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationType; +import org.eclipse.debug.core.ILaunchManager; + +import com.excelsior.xds.core.log.LogHelper; + +public final class LaunchConfigurationsRemover { + + /** + * Removes all launch configurations associated with the given project + * (used when project is removed) + * + * @param ip - the project + */ + public static void removeAll(IProject ip) { + DebugPlugin plugin = DebugPlugin.getDefault(); + if (plugin == null) { + return; + } + + ArrayList configsToRemove = new ArrayList(); + try { + ILaunchManager lm = plugin.getLaunchManager(); + ILaunchConfigurationType configType = lm.getLaunchConfigurationType(ILaunchConfigConst.ID_MODULA_APPLICATION); + ILaunchConfiguration[] configs = plugin.getLaunchManager(). + getLaunchConfigurations(configType); + for (ILaunchConfiguration config : configs) { + if (config.getAttribute(ILaunchConfigConst.ATTR_PROJECT_NAME, "").equals(ip.getName())) { //$NON-NLS-1$ + configsToRemove.add(config); + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + + for (ILaunchConfiguration cfg : configsToRemove) { + try { + cfg.delete(); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/EncodingUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/EncodingUtils.java new file mode 100644 index 0000000..6cf68eb --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/EncodingUtils.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.core.resource; + +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; + +import com.excelsior.xds.core.text.TextEncoding; +import com.excelsior.xds.core.text.TextEncoding.CodepageId; + +public final class EncodingUtils { + public static final String DOS_ENCODING = "Cp866"; //$NON-NLS-1$ + + /** + * In the case resource is IFile, its encoding is guessed from its first bytes (see {@link TextEncoding#readFileAndCodepage(java.io.InputStream, StringBuilder, CodepageId[])}) + * @param r + * @param monitor + * @throws IOException + * @throws FileNotFoundException + * @throws CoreException + */ + public static void determineAndSetEncoding(IFile f, IProgressMonitor monitor) throws IOException, CoreException { + if (!f.exists()) { + return; + } + CodepageId cpId[] = {null}; + try(InputStream stream = f.getContents()){ + TextEncoding.readFileAndCodepage(stream, null, cpId); + if (cpId[0] == null) { + cpId[0] = null; + } + if(cpId[0] != null && !cpId[0].charsetName.equalsIgnoreCase(f.getCharset(true))) { + f.setCharset(cpId[0].charsetName, monitor); + } + } + } + + private EncodingUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IFileFromXdsProjectPredicate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IFileFromXdsProjectPredicate.java new file mode 100644 index 0000000..2f44674 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IFileFromXdsProjectPredicate.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.core.resource; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.utils.JavaUtils; +import com.google.common.base.Predicate; + +/** + * Base class for predicates to filter all {@link IResource} except {@link IFile}
+ * Skips settings directory. + * see {@link ResourceUtils#getProjectResources}
+ * @author lsa80 + */ +public class IFileFromXdsProjectPredicate implements Predicate { + @Override + public boolean apply(IResource ifile) { + if (!JavaUtils.isOneOf(ifile, IFile.class) + || ResourceUtils.isInsideFolder(SpecialFolderNames.SETTINGS_DIR_NAME, ifile) + || ResourceUtils.isInsideFolder(SpecialFolderNames.EXTERNAL_DEPENDENCIES_DIR_NAME, ifile) + ) { + return false; + } + return true; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAccess.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAccess.java new file mode 100644 index 0000000..08fffd3 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAccess.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.resource; + +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; + +/** + * Common protocol for obtaining {@link IResource}. + * @author lsa80 + */ +public interface IResourceAccess { + /** + * @return {@link IResource} if it is accessible, null otherwise + */ + IResource getResource() throws CoreException; +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAttributes.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAttributes.java new file mode 100644 index 0000000..75d0e5a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/IResourceAttributes.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.resource; + +import org.eclipse.core.runtime.QualifiedName; + +public class IResourceAttributes { + public static final String LINKED_RESOURCE_ORIGINAL_PATH_ATTR_NAME = "LINKED_RESOURCE_ORIGINAL_PATH"; //$NON-NLS-1$ + /** + * Synthetic Folder maps to the actual folder at the File System. However, it may have less number of children than its actual File System counterpart. + */ + public static final String SYNTHETIC_RESOURCE_FLAG = "SYNTHETIC_RESOURCE_FLAG"; + public static final String BASE_ENCODING = "ENCODING"; //$NON-NLS-1$ + public static final String POSTFIX_ENCODING_DETERMINED = "DETERMINED"; //$NON-NLS-1$ + + public static final QualifiedName ENCODING_DETERMINED = new QualifiedName(BASE_ENCODING, POSTFIX_ENCODING_DETERMINED); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/LocationType.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/LocationType.java new file mode 100644 index 0000000..1b68968 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/LocationType.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.resource; + +public enum LocationType { + WORKSPACE, + NONWORKSPACE +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/PathWithLocationType.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/PathWithLocationType.java new file mode 100644 index 0000000..f5ee85d --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/PathWithLocationType.java @@ -0,0 +1,74 @@ +package com.excelsior.xds.core.resource; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.IPath; + +public final class PathWithLocationType +{ + /** File system handle of the resource */ + private final IFileStore store; + + /** Workspace-relative path of the resource */ + private final IPath fullPath; + + /** The type of the given location */ + private final LocationType locationType; + + private PathWithLocationType(IPath fullPath, IFileStore store, LocationType locationType) { + this.store = store; + this.fullPath = fullPath; + this.locationType = locationType; + } + + public PathWithLocationType(IResource res) { + this(res.getFullPath(), null, LocationType.WORKSPACE); + } + + public PathWithLocationType(IFileStore store) { + this(null, store, LocationType.NONWORKSPACE); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((fullPath == null) ? 0 : fullPath.hashCode()); + result = prime * result + + ((locationType == null) ? 0 : locationType.hashCode()); + result = prime * result + ((store == null) ? 0 : store.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + PathWithLocationType other = (PathWithLocationType) obj; + if (fullPath == null) { + if (other.fullPath != null) + return false; + } else if (!fullPath.equals(other.fullPath)) + return false; + if (locationType != other.locationType) + return false; + if (store == null) { + if (other.store != null) + return false; + } else if (!store.equals(other.store)) + return false; + return true; + } + + @Override + public String toString() { + return String + .format("PathWithLocationType [store=%s, fullPath=%s, locationType=%s]", + store, fullPath, locationType); //$NON-NLS-1$ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/ResourceUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/ResourceUtils.java new file mode 100644 index 0000000..3ed0216 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/ResourceUtils.java @@ -0,0 +1,1041 @@ +package com.excelsior.xds.core.resource; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.URI; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.io.filefilter.DirectoryFileFilter; +import org.apache.commons.lang.NotImplementedException; +import org.apache.commons.lang.ObjectUtils; +import org.eclipse.core.filesystem.EFS; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.filesystem.IFileSystem; +import org.eclipse.core.resources.FileInfoMatcherDescription; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceFilterDescription; +import org.eclipse.core.resources.IResourceRuleFactory; +import org.eclipse.core.resources.IResourceVisitor; +import org.eclipse.core.resources.IWorkspace; +import org.eclipse.core.resources.IWorkspaceDescription; +import org.eclipse.core.resources.IWorkspaceRoot; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.resources.mapping.ResourceMapping; +import org.eclipse.core.resources.mapping.ResourceTraversal; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; +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.Platform; +import org.eclipse.core.runtime.ProgressMonitorWrapper; +import org.eclipse.core.runtime.QualifiedName; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.jobs.MultiRule; +import org.eclipse.osgi.service.datalocation.Location; +import org.osgi.framework.Bundle; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.exceptions.ExceptionHelper; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.project.NatureUtils; +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.utils.IBaseClosure; +import com.google.common.base.Function; +import com.google.common.base.Predicate; +import com.google.common.collect.Collections2; + +public final class ResourceUtils +{ + private static final String REGEX_RESOURCE_FILTER_ID = "org.eclipse.core.resources.regexFilterMatcher"; //$NON-NLS-1$ + + /** + * Only static method are allowed - this class should have no state + */ + private ResourceUtils() { + } + /** + * @param path - valid path in FS - either relative or absolute + * @return system dependent form of path (absolute) - exactly as in the FS. This solves Windows problems, + * that paths in different casings maps to the same FS object. Please see {@link File#getCanonicalPath()} for more info. + */ + public static String getAbsolutePathAsInFS(String path) { + if (path == null) { + return null; + } + File absolutePathAsInFS = getAbsolutePathAsInFS(new File(path)); + if (absolutePathAsInFS != null) { + return absolutePathAsInFS.getPath(); + } + else{ + return null; + } + } + + public static File getAbsolutePathAsInFS(File path) { + if (path == null) { + return null; + } + try { + return path.getCanonicalFile(); + } catch (IOException e) { + LogHelper.logError(e); + } + return null; + } + + public static String toAbsolutePathString(File file) { + if (file == null) { + return null; + } + + return file.getAbsolutePath(); + } + + public static String getAbsolutePath(File file) { + File absoluteFile = ResourceUtils.getAbsolutePathAsInFS(file); + if (absoluteFile == null) { + return null; + } + return absoluteFile.getAbsolutePath(); + } + + public static String getAbsolutePath(IFileStore fileStore) throws CoreException { + return getAbsolutePath(fileStore, new NullProgressMonitor()); + } + + /** + * Works only for the file:// based file stores. + * @param fileStore + * @param monitor + * @return + * @throws CoreException + */ + public static String getAbsolutePath(IFileStore fileStore, IProgressMonitor monitor) throws CoreException { + if (fileStore == null) { + return null; + } + URI uri = fileStore.toURI(); + if (!EFS.SCHEME_FILE.equals(uri.getScheme())) { + return null; + } + return getAbsolutePath(new File(uri)); + } + + public static String toString(IFileStore fileStore) throws CoreException { + return toString(fileStore, new NullProgressMonitor()); + } + + public static String toString(IFileStore fileStore, IProgressMonitor monitor) throws CoreException { + try { + if (fileStore.fetchInfo().exists()) { + try(InputStream stream = fileStore.openInputStream(EFS.NONE , monitor)){ + return IOUtils.toString(stream); + } + } + } catch (IOException e) { + ExceptionHelper.rethrowAsCoreException(e); + } + return null; + } + + + /** + * Compares two path string, by converting to canonical filenames in FS and then "equals" them + * @param path1 + * @param path2 + * @return + */ + public static boolean equalsPathesAsInFS(String path1, String path2) { + String absolutePathAsInFS1 = getAbsolutePathAsInFS(path1); + String absolutePathAsInFS2 = getAbsolutePathAsInFS(path2); + if (absolutePathAsInFS1 == null || absolutePathAsInFS2 == null) { + return false; + } + return absolutePathAsInFS1.equals(absolutePathAsInFS2); + } + + /** + * Compares canonicalized (via java.io.File.getCanonicalPath) pathes. Returns false if either of pathes corresponds + * to the non-existent file-system object + */ + public static boolean equalsPathesAsInFS(File path1, File path2) { + File absolutePathAsInFS1 = getAbsolutePathAsInFS(path1); + File absolutePathAsInFS2 = getAbsolutePathAsInFS(path2); + if (absolutePathAsInFS1 == null || absolutePathAsInFS2 == null) { + return false; + } + return absolutePathAsInFS1.equals(absolutePathAsInFS2); + } + + /** + * Tests IResources for equality. If either of them is null - returns null. + * @return + */ + public static boolean equals(IResource resource1, IResource resource2) { + if (resource1 == null || resource2 == null) { + return false; + } + + return resource1.equals(resource2); + } + + public static String getAbsoluteParentPathAsInFS(String path) { + path = new File(path).getParent(); + if (path == null) return null; + return getAbsolutePathAsInFS(path); + } + + public static String getAbsolutePathAsInFS(IResource resource) { + IPath loc = resource.getLocation(); + if (loc == null){ + return null; + } + return getAbsolutePathAsInFS(loc.toOSString()); + } + + public static QualifiedName createPersistentPropertyQualifiedName(String base, String postfix) { + return new QualifiedName(XdsCorePlugin.PLUGIN_ID + "." + base, FilenameUtils.separatorsToUnix(postfix)); + } + + public static String getAbsolutePathOfLinkedResource(IResource resource) { + try { + QualifiedName qn = ResourceUtils.createPersistentPropertyQualifiedName(IResourceAttributes.LINKED_RESOURCE_ORIGINAL_PATH_ATTR_NAME, resource.getFullPath().toOSString()); + IProject project = resource.getProject(); + if (project != null && project.isOpen()) { + String path = project.getPersistentProperty(qn); + if (path != null) { + return getAbsolutePathAsInFS(path); + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + + return null; + } + + public static void setAbsolutePathOfLinkedResourceAttribute(IResource resource, String absolutePath) { + QualifiedName qn = ResourceUtils.createPersistentPropertyQualifiedName(IResourceAttributes.LINKED_RESOURCE_ORIGINAL_PATH_ATTR_NAME, resource.getFullPath().toOSString()); + try { + resource.getProject().setPersistentProperty(qn, absolutePath); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static void setSyntheticResourceAttribute(IResource resource) { + QualifiedName qn = ResourceUtils.createPersistentPropertyQualifiedName(IResourceAttributes.SYNTHETIC_RESOURCE_FLAG, resource.getFullPath().toOSString()); + try { + resource.getProject().setPersistentProperty(qn, Boolean.TRUE.toString()); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static String getAbsolutePath(IResource resource) { + if (resource == null) { + return null; + } + + String path = getAbsolutePathOfLinkedResource(resource); + if (path != null) { + return path; + } + IPath location = resource.getLocation(); + if (location == null) { + return null; + } + return getAbsolutePathAsInFS(location.toOSString()); + } + + /** + * @see #getExtension(IResource, boolean) + */ + public static String getExtension(IResource resource) { + return getExtension(resource, false); + } + + /** + * Gets extension of the resource + * @param resource + * @param isLowercase if true and resource has an extension then it will be converted to lowercase + * @return extension or null (i.e. resource passed is null or it has no extension) + */ + public static String getExtension(IResource resource, boolean isLowercase) { + if (resource == null){ + return null; + } + String ext = resource.getFileExtension(); + if (ext != null && isLowercase) { + ext = ext.toLowerCase(); + } + return ext; + } + + public static File getAbsoluteFile(IResource resource) { + String absolutePath = getAbsolutePath(resource); + if (absolutePath == null) { + return null; + } + return new File(absolutePath); + } + + public static File getAbsoluteFile(IFileStore file) throws CoreException { + String absolutePath = getAbsolutePath(file); + if (absolutePath == null) { + return null; + } + return new File(absolutePath); + } + + public static IFileStore toFileStore(File file) { + if (file == null){ + return null; + } + return EFS.getLocalFileSystem().getStore(file.toURI()); + } + + public static IFileStore toFileStore(IResource r) { + if (r == null){ + return null; + } + else if (r.getLocation() == null) { + return toFileStore(r.getLocationURI()); + } + else { + return EFS.getLocalFileSystem().getStore(r.getLocation()); + } + } + + public static IFileStore toFileStore(URI uri) { + if (uri == null){ + return null; + } + if (isFileScheme(uri)) { + return EFS.getLocalFileSystem().getStore(uri); + } + else { + try { + IFileSystem fs = EFS.getFileSystem(uri.getScheme()); + return fs.getStore(uri); + } catch (CoreException e) { + LogHelper.logError(e); + } + return null; + } + } + + public static boolean isFileScheme(URI uri) { + return EFS.SCHEME_FILE.equals(uri.getScheme()); + } + + public static IFileSystem getFileSystem(URI uri) throws CoreException { + return EFS.getFileSystem(uri.getScheme()); + } + + public static IFileStore getSibling(IFileStore file, String name) { + IFileStore parent = file.getParent(); + if (parent == null) { + return null; + } + + return parent.getChild(name); + } + + public static Collection convertIFilesToFileStores(Collection ifiles) { + return ifiles.stream().map(ResourceUtils::toFileStore).collect(Collectors.toList()); + } + + public static Collection convertFilesToFileStores(Collection ifiles) { + return ifiles.stream().map(ResourceUtils::toFileStore).collect(Collectors.toList()); + } + + public static Collection convertIFilesToFiles(Collection ifiles) { + Collection files = Collections2.transform(ifiles, new Function() { + @Override + public File apply(IFile ifile) { + File file = ResourceUtils.getAbsoluteFile(ifile); + return file; + } + }); + return files; + } + + public static File getAbsoluteParent(IResource resource) { + return new File(getAbsolutePath(resource)).getParentFile(); + } + + public static IWorkspaceRoot getWorkspaceRoot() { + IWorkspace workspace = getWorkspace(); + if (workspace == null){ + return null; + } + return workspace.getRoot(); + } + + /** + * Gets the Eclipse workspace. + * @return wokrspace or null (when org.eclipse.core.resources is not loaded). + */ + public static IWorkspace getWorkspace() { + try { + return ResourcesPlugin.getWorkspace(); + } catch (IllegalStateException e) { + return null; + } + } + + public static String getWorkspaceRootPath() { + return ResourceUtils.getAbsolutePath(ResourceUtils.getWorkspaceRoot()); + } + + public static String getWorkspaceRelativePath(IResource resource) { + return resource.getFullPath().toPortableString(); + } + + public static String getWorkspaceRelativePathOfParent(String workspaceRelativePath) { + int idx = workspaceRelativePath.lastIndexOf('/'); + if (idx < 1) return null; + return workspaceRelativePath.substring(0, idx); + } + + // TODO : replace with resource.getProjectRelativePath() + public static String getProjectRelativePath(IResource resource) { + String wsFullPath = resource.getFullPath().toPortableString(); + return getProjectRelativePath(wsFullPath); + } + + public static String getProjectRelativePath(String workspaceRelativePath) { + String path = workspaceRelativePath.substring(1); + int idx = path.indexOf('/'); + if (idx < 0) return null; + return path.substring(idx); + } + + public static String getRelativePath(IProject project, String absolutePath) { + if (project == null) { + return null; + } + URI uri = new File(absolutePath).toURI(); + IWorkspaceRoot root = getWorkspaceRoot(); + if (root == null) { + return null; + } + IResource[] resources = root.findFilesForLocationURI(uri); + if (resources.length == 0) { + resources = root.findContainersForLocationURI(uri); + } + if (resources.length == 0) + return null; + + for (IResource res : resources) { + if (res.getProject() == null){ // Workspace root. + return null; + } + if (res.getProject().getName().equals(project.getName())) return getProjectRelativePath(res); + } + + return null; + } + + /** + * Resolves collection of absolute pathes against the given {@link IProject} + * @param project - project to resolve absolute pathes against + * @param absolutePathes - absolute path (in the local FS) to resolve + * @return mapping of {@link File} (from original absolute path) to the {@link IResource} + */ + public static Map resolve(IProject project, Collection absolutePathes) { + Map file2Resource = new HashMap(); + + for (String absolutePath : absolutePathes) { + File absoluteFile = getAbsolutePathAsInFS(new File(absolutePath)); + if (absoluteFile.exists()) { + file2Resource.put(absoluteFile, null); + } + } + + getProjectResources(project, r -> true).forEach(r -> { + File resourceFile = getAbsoluteFile(r); + if (file2Resource.containsKey(resourceFile)) { + file2Resource.put(resourceFile, r); + } + }); + + absolutePathes.forEach(absolutePath -> { + if (file2Resource.get(absolutePath) == null){ + file2Resource.remove(absolutePath); + } + }); + + return file2Resource; + } + + /** + * Searches for existent resource with the given URI from the project + * @param project + * @param uri + * @return Returns first {@link IResource} from the {@link IProject} with the given {@link URI} + */ + public static IResource getResource(IProject project, URI uri) { + IWorkspaceRoot root = getWorkspaceRoot(); + if (root == null) { + return null; + } + IResource[] fileResources = root.findFilesForLocationURI(uri); + IResource[] folderResources = root.findContainersForLocationURI(uri); + + Iterable iterable = Stream.concat(Arrays.stream(fileResources), Arrays.stream(folderResources))::iterator; + for (IResource r : iterable) { + if (ObjectUtils.equals(r.getProject(), project) && r.exists() && !isInsideXdsRelativeFolderPathesToSkip(r)) return r; + } + + return null; + } + + public static IResource[] getResourcesFrom(ResourceMapping mapping) { + List resources = new ArrayList(); + try { + ResourceTraversal[] traversals = mapping.getTraversals(null, null); + for (ResourceTraversal traversal : traversals) { + resources.addAll(Arrays.asList(traversal.getResources())); + } + } catch (CoreException e) { + LogHelper.logError(e); + } + return resources.toArray(new IResource[0]); + } + + public static int findMaxProblemSeverity(IResource[] resources, String type, boolean includeSubtypes, int depth) throws CoreException { + int max = -1; + for (IResource res : resources) { + if (res.getProject().isOpen() && res.exists()) { + max = Math.max(max, res.findMaxProblemSeverity(type, includeSubtypes, depth)); + if (max >= IMarker.SEVERITY_ERROR) { + break; + } + } + } + + return max; + } + + public static int findMaxProblemSeverity(IResource[] resources, String type, int depth) throws CoreException { + return findMaxProblemSeverity(resources, type, true, depth); + } + + public static Path getRelativePath(String resourcePath1, String resourcePath2) { + Path pathBase = Paths.get(resourcePath1); + Path pathAbsolute = Paths.get(resourcePath2); + + Path result = pathBase.relativize(pathAbsolute); + return result; + } + + /** + * Checks whether resource exist with different casing and returns name of such a resource. Returns null otherwise (doesnot exist or exist with same casing). + * @param directory + * @param resourceName + * @return + */ + public static String checkResourceExistWithDifferentCasing(String directory, String resourceName) { + File dir = new File(directory); + String[] resources = dir.list(); + for (String res : resources) { + if (res.equalsIgnoreCase(resourceName) && !res.equals(resourceName)) return res; + } + return null; + } + + public static InputStream getPluginResourceAsStream(Bundle bundle, String entry) throws IOException { + URL fileURL = bundle.getEntry(entry); + return fileURL.openStream(); + } + + /** + * See {@link #checkResourceExistWithDifferentCasing(String, String)} + */ + public static String checkResourceExistWithDifferentCasing(IContainer containerResource, String resourceName) { + return checkResourceExistWithDifferentCasing(getAbsolutePath(containerResource), resourceName); + } + + public static List getImmediateChildren(IResource resource) { + final List children = new ArrayList(); + try { + resource.accept(new IResourceVisitor() { + @Override + public boolean visit(IResource resource) throws CoreException { + children.add(resource); + return false; + } + }, IResource.DEPTH_ZERO, false); + } catch (CoreException e) { + LogHelper.logError(e); + } + return children; + } + + /** + * Gets all resources (see {@link IResource}) matches specified {@link filter} + * + * @param project + * @param filter - filter to match, if null - matches everything + * @return all resources (see {@link IResource}) matches specified filter + */ + public static List getProjectResources(IProject project, final Predicate filter) { + final List resources = new ArrayList(); + try { + project.accept(new IResourceVisitor() { + @Override + @SuppressWarnings("unchecked") + public boolean visit(IResource r) throws CoreException { + if (filter == null || filter.apply(r)) { + resources.add((T)r); + } + return true; + } + }); + } catch (CoreException e) { + LogHelper.logError(e); + } + return resources; + } + + public static boolean isInsideXdsRelativeFolderPathesToSkip(IResource resource) { + for (String relativeFolderPath : SpecialFolderNames.getIgnoredSpecialFolderNames()) { + if (ResourceUtils.isInsideFolder(relativeFolderPath, resource)) { + return true; + } + } + return false; + } + + public static void scheduleWorkspaceRunnable(final IWorkspaceRunnable operation, String jobCaption) throws CoreException { + scheduleWorkspaceRunnable(operation, jobCaption, false); + } + + public static void scheduleWorkspaceRunnable(final IWorkspaceRunnable operation, String jobCaption, boolean user) throws CoreException { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + scheduleWorkspaceRunnable(operation, workspace.getRoot(), jobCaption, user); + } + + public static void scheduleWorkspaceRunnable(final IWorkspaceRunnable operation, + final ISchedulingRule rule, String jobCaption, boolean user) { + scheduleWorkspaceRunnable(operation, rule, jobCaption, null, user); + } + + public static Job scheduleWorkspaceRunnable(final IWorkspaceRunnable operation, + final ISchedulingRule rule, String jobCaption, final Object assignedFamily, boolean user) { + Job job = new Job(jobCaption) { + public IStatus run(IProgressMonitor monitor) { + try { + runWorkspaceRunnable(operation, rule); + } catch (CoreException e) { + LogHelper.logError(e); + } + return Status.OK_STATUS; + } + + @Override + public boolean belongsTo(Object family) { + if (assignedFamily != null){ + return assignedFamily == family; + } + else { + return super.belongsTo(family); + } + } + }; + job.setRule(rule); + job.setUser(user); + job.schedule(); + return job; + } + + public static void scheduleJob(final IBaseClosure jobRunnable, String jobCaption) { + scheduleJob(jobRunnable, null, jobCaption, false); + } + + public static void scheduleJob(final IBaseClosure jobRunnable, ISchedulingRule rule, String jobCaption, boolean user) { + Job job = new Job(jobCaption) { + public IStatus run(IProgressMonitor monitor) { + try { + jobRunnable.execute(null); + } catch (CoreException e) { + LogHelper.logError(e); + } + return Status.OK_STATUS; + } + }; + job.setRule(rule); + job.setUser(user); + job.schedule(); + } + + public static void runWorkspaceRunnable(IWorkspaceRunnable operation, ISchedulingRule rule) + throws CoreException { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + try { + workspace.run(operation, rule, IWorkspace.AVOID_UPDATE, null); + } catch (CoreException e1) { + LogHelper.logError(e1); + } + } + + public static boolean isPathValid(String path) { + File f = new File(path); + try { + f.getCanonicalPath(); + return true; + } catch (IOException e) { + return false; + } + } + + /** + * Get container - immediate child of project. Say, for .setting/subfolder/res.txt it will be .setting folder + */ + public static IFolder getProjectLevelContainer(IResource r) { + IProject p = r.getProject(); + String relPath = r.getProjectRelativePath().toPortableString(); + int idx = relPath.indexOf('/'); + if (idx > 0) { + return p.getFolder(relPath.substring(0, idx)); + } + else { + return p.getFolder(relPath); + } + } + + /** + * @param relativeFolderPath + * @param resource + * @return + */ + public static boolean isInsideFolder(String relativeFolderPath, IResource resource) { + IProject project = resource.getProject(); + if (project == null){ // workspace resource + return false; + } + IFolder folder = project.getFolder(relativeFolderPath); + return folder.getFullPath().isPrefixOf(resource.getFullPath()); + } + + public static boolean isAutoBuilding() { + IWorkspaceDescription description = ResourcesPlugin.getWorkspace().getDescription(); + return description.isAutoBuilding(); + } + + public static void refreshLocalAsync(IResource r, IProgressMonitor monitor) { + try { + r.refreshLocal(IResource.DEPTH_INFINITE, monitor); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + public static void refreshLocalSync(IResource r) { + refreshLocalSync(r, new NullProgressMonitor()); + } + + public static void refreshLocalSync(IResource r, final IProgressMonitor progressMonitor) { + final Object monitor = new Object(); + try { + synchronized (monitor) { + final boolean[] isReady = new boolean[]{false}; + r.refreshLocal(IResource.DEPTH_INFINITE, new ProgressMonitorWrapper(progressMonitor) { + @Override + public void done() { + isReady[0] = true; + monitor.notify(); + } + }); + while(!isReady[0]) { + try { + monitor.wait(); + } catch (InterruptedException e) { + } + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + public static Bundle getXdsResourcesPluginBundle() { + return Platform.getBundle("com.excelsior.xds.resources"); //$NON-NLS-1$ + } + + public static File getXdsPluginsDirectory() throws IOException { + File bundleFile = FileLocator.getBundleFile(getXdsResourcesPluginBundle()); + return bundleFile.getParentFile(); + } + + public static List applyXdsResourcesFilter(Collection resources) { + List filteredResources = new ArrayList(); + for (IResource r : resources) { + if (NatureUtils.hasNature(r.getProject(), NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + filteredResources.add(r); + } + } + return filteredResources; + } + + public static String getTextContent(IFile file) throws IOException { + String path = getAbsolutePath(file); + try { + return FileUtils.readFileToString(new File(path), file.getCharset()); + } catch (CoreException e) { + LogHelper.logError(e); + } + return FileUtils.readFileToString(new File(path)); + } + + public static IProject getProject(String projectName) { + return ResourceUtils.getWorkspaceRoot().getProject(projectName); + } + + /** + * Gets IProject of given resource. + * @param resource + * @return IProject or null, if resource is null + */ + public static IProject getProject(IResource resource) { + IProject p = null; + if (resource != null) { + p = resource.getProject(); + } + return p; + } + + /** + * Checks whether resource belongs to the opened project + */ + public static boolean isOpen(IResource res) { + return res != null && res.getProject().isOpen(); + } + + public static ISchedulingRule createRule(Collection resources) { + ISchedulingRule combinedRule = null; + IResourceRuleFactory ruleFactory = + ResourcesPlugin.getWorkspace().getRuleFactory(); + + for (IResource r : resources) { + ISchedulingRule rule = ruleFactory.createRule(r); + combinedRule = MultiRule.combine(rule, combinedRule); + } + + return combinedRule; + } + + /** + * + * ResourceUtils.iterateRelativeParents("c:/temp/hello/SRC/hello.mod ", true) : + * yields : + * + * SRC + * hello\SRC + * temp\hello\SRC + * + * ResourceUtils.iterateRelativeParents("c:/temp/hello/SRC/hello.mod ", false) : + * yields : + * + * temp\ + * temp\hello\ + * temp\hello\SRC\ + * + * @return + */ + public static Iterator iterateRelativeParents(String absolutePath, boolean isReverse) { + final String path = FilenameUtils.separatorsToSystem(absolutePath); + + if (isReverse) { + return new Iterator() { + + int lastSlashIdx = path.lastIndexOf(File.separatorChar, path.length()); + int idx = lastSlashIdx; + + @Override + public void remove() { + throw new NotImplementedException(); + } + + @Override + public String next() { + return path.substring(idx + 1, lastSlashIdx); + } + + @Override + public boolean hasNext() { + idx = path.lastIndexOf(File.separatorChar, idx - 1); + return idx > -1; + } + }; + } + else{ + return new Iterator() { + int lastSlashIdx = path.indexOf(File.separatorChar, 0); + int idx = lastSlashIdx; + + @Override + public void remove() { + throw new NotImplementedException(); + } + + @Override + public String next() { + return path.substring(lastSlashIdx + 1, idx + 1); + } + + @Override + public boolean hasNext() { + idx = path.indexOf(File.separatorChar, idx + 1); + return idx > -1; + } + }; + } + } + + public static String getFileName(File file) { + if (file == null) { + return null; + } + + return file.getName(); + } + + /** + * @param dir - directory to start from, included in result + * @return collection of sub-directories in the given directory + */ + public static Collection listDirectories(File dir) { + Collection dirs = new ArrayList(); + listDirectoriesInternal(dir, dirs); + return dirs; + } + + public static List getSiblings(IResource f) { + return getSiblings(f, IResource.class); + } + + /** + * Gets resource siblings including itself. + * @param f + * @param tagClass filter class, subclass of {@link IResource} + * @return list of found resources + */ + public static List getSiblings(T f, Class tagClass) { + return getChildren(f.getParent(), tagClass); + } + + /** + * Gets resource children + * @param f + * @param tagClass filter class, subclass of {@link IResource} + * @return list of child resources + */ + public static List getChildren(T f, Class tagClass) { + List found = new ArrayList<>(); + try { + f.accept(new IResourceVisitor() { + @SuppressWarnings("unchecked") + @Override + public boolean visit(IResource r) throws CoreException { + if (tagClass.isAssignableFrom(r.getClass())) { + found.add((U)r); + } + return true; + } + }, IResource.DEPTH_ONE, false); + } catch (CoreException e) { + LogHelper.logError(e); + } + return found; + } + + public static List getParts(File f) { + List parts = new ArrayList<>(); + + do{ + parts.add(f); + f = f.getParentFile(); + } + while(f != null); + + Collections.reverse(parts); + + return parts; + } + + /** + * Directory of the Eclipse platform installation + * @return FS path of the eclipse installation or null if it is running without installation + * @see {@link Platform#getInstallLocation()} + */ + public static File getEclipseInstallationDirectory() { + Location location = Platform.getInstallLocation(); + if (location == null || !location.isSet()){ + return null; + } + try { + return new File(location.getURL().toURI()); + } catch (URISyntaxException e) { + return null; + } + } + + /** + * Applies filter to the target {@link IFolder} + * @param targetFolder + * @param filterType see {@link IContainer#createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)} + * @param regex filtering regex + * @param monitor + * @throws CoreException + * @see {@link IContainer#createFilter(int, FileInfoMatcherDescription, int, IProgressMonitor)} + */ + public static IResourceFilterDescription applyRegexFilter(IFolder targetFolder, int filterType, String regex, IProgressMonitor monitor) throws CoreException { + return targetFolder.createFilter(IResourceFilterDescription.EXCLUDE_ALL | IResourceFilterDescription.FOLDERS, + new FileInfoMatcherDescription(REGEX_RESOURCE_FILTER_ID, + regex), IResource.NONE, monitor); + } + + /** Driver function for the {@link #listDirectories(File)} + * @param dir + * @param dirs + * @see #listDirectories(File) + */ + private static void listDirectoriesInternal(File dir, Collection dirs) { + dirs.add(dir); + String[] subDirNames = dir.list(DirectoryFileFilter.INSTANCE); + for (String subDirName : subDirNames) { + File subDir = new File(dir.getAbsolutePath() + IOUtils.DIR_SEPARATOR + subDirName); + listDirectoriesInternal(subDir, dirs); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsResourceChangeListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsResourceChangeListener.java new file mode 100644 index 0000000..89546dc --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsResourceChangeListener.java @@ -0,0 +1,255 @@ +package com.excelsior.xds.core.resource; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceChangeEvent; +import org.eclipse.core.resources.IResourceChangeListener; +import org.eclipse.core.resources.IResourceDelta; +import org.eclipse.core.resources.IResourceDeltaVisitor; +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 com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.natures.NatureIdRegistry; +import com.excelsior.xds.core.project.NatureUtils; +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.utils.XdsFileUtils; + +public abstract class XdsResourceChangeListener implements IResourceChangeListener { + + /** + * Installs the {@link IWorkspace#addResourceChangeListener(IResourceChangeListener)} + */ + public XdsResourceChangeListener() { + try { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + if (workspace != null) { + workspace.addResourceChangeListener(this); + } + } catch (java.lang.IllegalStateException e) { + } + } + + /** + * Uninstalls the {@link IWorkspace#removeResourceChangeListener(IResourceChangeListener)} + */ + public void stop(){ + try { + IWorkspace workspace = ResourcesPlugin.getWorkspace(); + if (workspace != null) { + workspace.removeResourceChangeListener(this); + } + } catch (java.lang.IllegalStateException e) { + } + } + + @Override + public void resourceChanged(IResourceChangeEvent event) { + doVisit(event); + } + + protected VisitResult doVisit(IResourceChangeEvent event) { + final VisitResult visitResult = new VisitResult(); + IResourceDelta delta = event.getDelta(); + try { + if (delta != null) { // it can be null for project removals +// printDelta(delta); + beginDeltaProcessing(delta); + delta.accept(new IResourceDeltaVisitor() { + @Override + public boolean visit(IResourceDelta childDelta) throws CoreException { + IResource affectedResource = childDelta.getResource(); + if (!(affectedResource instanceof IWorkspaceRoot)) { + if (!NatureUtils.hasNature(affectedResource.getProject(), NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + return false; // DONT visit children of non-XDS nature project + } + + if (ResourceUtils.isInsideFolder(SpecialFolderNames.SETTINGS_DIR_NAME, affectedResource) || + ResourceUtils.isInsideFolder(SpecialFolderNames.EXTERNAL_DEPENDENCIES_DIR_NAME, affectedResource)) { + return false; // DONT visit children of .settings and .mnt directories + } + + boolean isChildrenShouldBeVisited; + switch (childDelta.getKind()) { + case IResourceDelta.ADDED: + isChildrenShouldBeVisited = handleResourceAdded(delta, childDelta, affectedResource); + visitResult.addedResourceDeltas.add(childDelta); + break; + case IResourceDelta.REMOVED: + isChildrenShouldBeVisited = handleResourceRemoved(delta, childDelta, affectedResource); + visitResult.removedResourceDeltas.add(childDelta); + break; + case IResourceDelta.CHANGED: + isChildrenShouldBeVisited = handleResourceChanged(delta, childDelta, affectedResource); + visitResult.changedResourceDeltas.add(childDelta); + break; + default: + isChildrenShouldBeVisited = true; + break; + } + return isChildrenShouldBeVisited; + } + return true; + } + }); + } else { + boolean isPreDeleteEvent = event.getType() == IResourceChangeEvent.PRE_DELETE; + if (isPreDeleteEvent || event.getType() == IResourceChangeEvent.PRE_CLOSE) { + IResource resource = event.getResource(); + if (resource instanceof IProject) { + IProject project = (IProject)resource; + if (NatureUtils.hasNature(project, NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID)) { + handleProjectRemoved(delta, project, isPreDeleteEvent); + visitResult.removedResourceDeltas.add(delta); + } + } + + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + finally{ + endDeltaProcessing(delta); + } + return visitResult; + } + + /** + * TODO : use this method to improve performance of the resource change listening. + * @param delta + * @return + */ + @SuppressWarnings("unused") + private boolean hasModula2Projects(IResourceDelta delta) { + IResourceDelta[] affectedProjects = delta.getAffectedChildren(); + return Arrays.stream(affectedProjects) + .map(rd -> rd.getResource().getProject()) + .filter(p -> NatureUtils.hasModula2Nature(p)) + .findAny().isPresent(); + } + + protected static class VisitResult{ + public final List addedResourceDeltas = new ArrayList(); + public final List changedResourceDeltas = new ArrayList(); + public final List removedResourceDeltas = new ArrayList(); + } + + protected void printDelta(IResourceDelta delta) { + if (delta == null) { + return; + } + final StringBuffer buf = new StringBuffer(80); + final String className = this.getClass().getName(); + try { + delta.accept(new IResourceDeltaVisitor() { + @Override + public boolean visit(IResourceDelta delta) throws CoreException { + if (isContentChanged(delta)) { + buf.append(className + "\r\n"); + buf.append("/"); + switch (delta.getKind()) { + case IResourceDelta.ADDED: + buf.append("ADDED"); //$NON-NLS-1$ + break; + case IResourceDelta.REMOVED: + buf.append("REMOVED"); //$NON-NLS-1$ + break; + case IResourceDelta.CHANGED: + buf.append("CHANGED"); //$NON-NLS-1$ + break; + default: + buf.append("["); //$NON-NLS-1$ + buf.append(delta.getKind()); + buf.append("]"); //$NON-NLS-1$ + break; + } + buf.append(" (( "); //$NON-NLS-1$ + buf.append(delta.getResource()); + buf.append(" ))"); //$NON-NLS-1$ + buf.append("\r\n"); + } + return true; + } + }); + } catch (CoreException e) { + } + System.out.println(buf); + } + + /** + * Called before the traversing of the delta + * @param rootDelta root of the delta + */ + protected void beginDeltaProcessing(IResourceDelta rootDelta) { + } + + /** + * Called after the traversing of the delta + * @param rootDelta root of the delta + */ + protected void endDeltaProcessing(IResourceDelta rootDelta) { + } + + /** + * Called for each project removed in this delta + * @param delta + * @param affectedProject + * @param isPreDeleteEvent + */ + protected void handleProjectRemoved(IResourceDelta delta, IProject affectedProject, boolean isPreDeleteEvent) { + } + + /** + * Called for each resource added in this delta + * @param rootDelta root of the reported delta + * @param childDelta child delta + * @param affectedResource resource from the child delta + * @return true if continue with traversing of the child deltas + */ + protected boolean handleResourceAdded(IResourceDelta rootDelta, IResourceDelta childDelta, IResource affectedResource) { + return !(affectedResource instanceof IProject); + } + + /** + * Called for each resource changed in this delta + * @param rootDelta root of the reported delta + * @param childDelta child delta + * @param affectedResource resource from the child delta + * @return true if continue with traversing of the child deltas + */ + protected boolean handleResourceChanged(IResourceDelta rootDelta, IResourceDelta childDelta, IResource affectedResource) { + return true; + } + + /** + * Called for each resource removed in this delta + * @param rootDelta root of the reported delta + * @param childDelta child delta + * @param affectedResource resource from the child delta + * @return true if continue with traversing of the child deltas + */ + protected boolean handleResourceRemoved(IResourceDelta rootDelta, IResourceDelta childDelta, IResource affectedResource) { + return !(affectedResource instanceof IProject); + } + + protected boolean isCompilationUnitFile(IResource r) { + if (r instanceof IFile) { + IFile ifile = (IFile) r; + return XdsFileUtils.isCompilationUnitFile(ifile); + } + + return false; + } + + protected boolean isContentChanged(IResourceDelta delta) { + return (delta.getFlags() & IResourceDelta.CONTENT) != 0; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsSourceIFilePredicate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsSourceIFilePredicate.java new file mode 100644 index 0000000..e32b072 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/XdsSourceIFilePredicate.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.core.resource; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.utils.XdsFileUtils; + +public class XdsSourceIFilePredicate extends IFileFromXdsProjectPredicate { + @Override + public boolean apply(IResource r) { + if (!super.apply(r)) { + return false; + } + + IFile f = (IFile)r; + return XdsFileUtils.isCompilationUnitFile(f); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/visitor/InterruptResourceVisitorException.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/visitor/InterruptResourceVisitorException.java new file mode 100644 index 0000000..24621d2 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/resource/visitor/InterruptResourceVisitorException.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.core.resource.visitor; + +/** + * Special RuntimeException, that can be throw from visit method of org.eclipse.core.resources.IResourceVisitor, + * in order to interrupt visitor operation + * @author lsa80 + */ +public class InterruptResourceVisitorException extends RuntimeException { + + /** + * + */ + private static final long serialVersionUID = -1097281615838453135L; +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/ISdkListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/ISdkListener.java new file mode 100644 index 0000000..d820a6b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/ISdkListener.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.sdk; + + +public interface ISdkListener { + void sdkChanged(SdkChangeEvent e); + void sdkRemoved(SdkRemovedEvent e); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/Sdk.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/Sdk.java new file mode 100644 index 0000000..517b52f --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/Sdk.java @@ -0,0 +1,704 @@ +package com.excelsior.xds.core.sdk; + +import static org.apache.commons.lang.StringUtils.EMPTY; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collections; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.osgi.framework.Version; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.process.ProcessUtils; +import com.excelsior.xds.core.variables.VariableUtils; + + +/** + * Provides path to the XDS components (compiler, debugger etc) and environment + * necessary to launch such components. Also stores tool settings (see {@link com.excelsior.xds.core.tool.ITool}) + * + * @author fsa, lion + */ +public final class Sdk { + + private static final char PRIMARY_FILE_EXTENSIONS_SEPARATOR_CHAR = ';'; + + /** + * Special value for path to unsupported components + */ + public static final String NOT_SUPPORTED = ""; //$NON-NLS-1$ + + private final static Pattern debuggerExecutableSignature = Pattern.compile(".*XdIdeInfoMagic729236\\s+\\[PipeFormat=(\\d+)[.](\\d+)[.](\\d+)\\]\\s+\\[Version=(\\d+)[.](\\d+)[.]?(\\d+)?\\]\\s*", Pattern.DOTALL); //$NON-NLS-1$ + + /** + * xShell formats of compiler output under "__XDS_SHELL__" option + */ + public static enum XShellFormat { + UNDEFINED ("undefined"), //$NON-NLS-1$ + BINARY ("binary"), //$NON-NLS-1$ + TEXT ("text"); //$NON-NLS-1$ + + /** Unique xShell format name to refer in the ini-file and xml-file. */ + public final String name; + + XShellFormat (String name) { + this.name = name; + } + }; + + public static enum Property { + // property | ini-file key | xml-file tag + XDS_NAME ("xds.name", "Name"), //$NON-NLS-1$ //$NON-NLS-2$ + XDS_HOME ("xds.home", "SdkHomePath"), // optional for sdk.ini //$NON-NLS-1$ //$NON-NLS-2$ + XDS_COMPILER ("xds.compiler", "CompilerExe", //$NON-NLS-1$ //$NON-NLS-2$ + new Tag[]{Tag.CODEPAGE, Tag.COMMANDLINE}), + XDS_DEBUGGER ("xds.debugger", "DebuggerExe"), //$NON-NLS-1$ //$NON-NLS-2$ + XDS_PROFILER ("xds.profiler", "ProfilerExe"), //$NON-NLS-1$ //$NON-NLS-2$ + XDS_SIMULATOR ("xds.simulator", "SimulatorExe"), //$NON-NLS-1$ //$NON-NLS-2$ + XDS_EXE_EXTENSION ("xds.exe.extension", "ExeExtension"), // optional. "exe" by default //$NON-NLS-1$ //$NON-NLS-2$ + XDS_PRIM_EXTENSIONS("xds.primary.extensions", "XdsPrimExtensions"), // ~ "mod;ob2;def" //$NON-NLS-1$ //$NON-NLS-2$ + + XDS_XSHELL_FORMAT ("xds.xshell.format", "xShellFormat"), // optional. UNDEFINED by default //$NON-NLS-1$ //$NON-NLS-2$ + + XDS_LIB_DEFS_PATH ("xds.library.defs", "XdsLibraryDefs"), // optional. "$(XDSDIR)/DEF" by default //$NON-NLS-1$ //$NON-NLS-2$ + + XDS_FOLDER_PRJ_FILE ("xds.folder.prj.file", "FolderPrjFile"), // optional. Project file folder //$NON-NLS-1$ //$NON-NLS-2$ // default subfolder name to create prj file in (for new project dialog, ~="prjDir") + XDS_FOLDER_MAIN_MODULE("xds.folder.main.module", "FolderMainModule"), // optional. Main module folder //$NON-NLS-1$ //$NON-NLS-2$ // default subfolder name to create main module in (for new project dialog, ~="src") + XDS_TOB2_FILE ("xds.template.oberon.file", "XdsOb2File"), // .ob2 - new .ob2 file template //$NON-NLS-1$ //$NON-NLS-2$ + + // this properties are come from xds.ini, but may be overridden in sdk.ini + XDS_TPR_FILE ("xds.template.prj.file", "XdsTprFile"), // .tpr - new .prj file template //$NON-NLS-1$ //$NON-NLS-2$ + XDS_TRD_FILE ("xds.template.red.file", "XdsTrdFile"), // .trd - new .red file template //$NON-NLS-1$ //$NON-NLS-2$ + XDS_MAIN_MOD_FILE ("xds.template.main.mod.file","XdsMainModFile"), // .mod - new main .mod file template //$NON-NLS-1$ //$NON-NLS-2$ + XDS_TMOD_FILE ("xds.template.mod.file", "XdsModFile"), // .mod - new .mod file template //$NON-NLS-1$ //$NON-NLS-2$ + XDS_TDEF_FILE ("xds.template.def.file", "XdsDefFile"), // .def - new .def file template //$NON-NLS-1$ //$NON-NLS-2$ + XDS_DIRS_TO_CREATE ("xds.directories.to.create", "XdsDirsToCreate"), // ~ "SYM;OBJ;SRC" //$NON-NLS-1$ //$NON-NLS-2$ + XDS_UPDATE_MANIFEST("xds.update.manifiest", "XdsUpdateManifest"); // path to update.xml //$NON-NLS-1$ //$NON-NLS-2$ + + /** SDK property key for external 'sdk.ini' file */ + public final String key; + + /** SDK property key for internal 'sdk.xml' file */ + public final String xmlKey; + + /** Array of tags may be used with this property (may be empty but not NULL) */ + public final Tag[] possibleTags; + + /** + * @param key ini-file key associated with property + * @param xmlKey xml-tag associated with property + * @param possibleTags array of tags may be used with this property (may be empty but not NULL) + */ + Property (String key, String xmlKey, Tag[] possibleTags) { + this.key = key; + this.xmlKey = xmlKey; + this.possibleTags = (possibleTags==null) ? new Tag[]{} : possibleTags; + } + + Property (String key, String xmlKey) { + this(key, xmlKey, null); + } + + } + + /** + * Each property may have set of additional tags. Tags are written in sdk.ini file as + * . = + * For example: + * xds.compiler.some.options = -killme + * + * Read tag (returns null when tag not exists): + * sdk.getTag(Sdk.Property.Property, "some.options"); + * + * Set tag: + * sdk.setTag(Sdk.Property.Property, "tag.name", "tagValue"); + * Remove tag: + * sdk.setTag(Sdk.Property.Property, "tag.name", null); + * + */ + public static enum Tag { + CODEPAGE ("codepage", "Codepage"), //$NON-NLS-1$ //$NON-NLS-2$ + COMMANDLINE("commandline", "Commandline"); //$NON-NLS-1$ //$NON-NLS-2$ + + /** Tag name to add to property name in 'sdk.ini' file */ + public final String tagName; + + /** Tag name to add to property name in internal 'sdk.xml' file */ + public final String xmlTagName; + + + Tag(String tagName, String xmlTagName) { + this.tagName = tagName; + this.xmlTagName = xmlTagName; + } + } + + private static final EnumSet FILE_PRORERTIES = EnumSet.of( + Property.XDS_COMPILER, Property.XDS_DEBUGGER); + + private Map propertyName2Value = new HashMap<>(); + + private XShellFormat xShellFormat; // TODO : store in propertyName2Value + private Map tagsMap = new HashMap(); + + // Environment Variables container in form + private Map environmentVariables = new HashMap(); + + // Settings of original XDS IDE + private XdsIniFile transientXdsIni; + + private List tools = new ArrayList(); + + private Boolean isDebuggerSupportsIdeIntegration; + private Version debuggerVersion; + private Version protocolVersion; + + private final SdkManager manager; + + /** + * Create new SDK to edit it + */ + Sdk(SdkManager manager, String name, String sdkHomePath) { + this(manager); + setPropertyInternal(Property.XDS_NAME, name); + setPropertyInternal(Property.XDS_HOME, sdkHomePath); + } + + /** + * Create empty invalid SDK (to read into it from sdk.ini) + */ + Sdk(SdkManager manager) { + this.manager = manager; + setPropertyInternal(Property.XDS_NAME, EMPTY); + setPropertyInternal(Property.XDS_HOME, EMPTY); + setPropertyInternal(Property.XDS_COMPILER, EMPTY); + setPropertyInternal(Property.XDS_DEBUGGER, EMPTY); + setPropertyInternal(Property.XDS_PROFILER, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_SIMULATOR, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_FOLDER_PRJ_FILE, EMPTY); + setPropertyInternal(Property.XDS_FOLDER_MAIN_MODULE, EMPTY); + setPropertyInternal(Property.XDS_TOB2_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_TPR_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_TRD_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_MAIN_MOD_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_TDEF_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_TMOD_FILE, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_LIB_DEFS_PATH, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_UPDATE_MANIFEST, NOT_SUPPORTED); + setPropertyInternal(Property.XDS_EXE_EXTENSION, "exe"); //$NON-NLS-1$ + setPropertyInternal(Property.XDS_PRIM_EXTENSIONS, getDefaultPrimaryFileExtensions()); + setPropertyInternal(Property.XDS_DIRS_TO_CREATE, EMPTY); + this.xShellFormat = XShellFormat.UNDEFINED; + } + + public boolean isDefault() { + return ObjectUtils.equals(manager.loadSdkRegistry().getDefaultSdkName(), getName()); + } + + private SdkChangeEvent sdkChangeEvent; + + public void beginEdit(){ + if (sdkChangeEvent == null){ + sdkChangeEvent = new SdkChangeEvent(this); + } + else { + Assert.isTrue(false, "Already edited"); //$NON-NLS-1$ + } + } + + public void cancelEdit(){ + sdkChangeEvent = null; + } + + public void endEdit(){ + if (sdkChangeEvent != null) { + manager.notifySdkListenersOnChanged(sdkChangeEvent); + sdkChangeEvent = null; + } + else { + Assert.isTrue(false, "Not being edited"); + } + } + + public boolean isBeingEdited() { + return sdkChangeEvent != null; + } + + private void recordModification(Property property, String oldValue, String newValue) { + sdkChangeEvent.setPropertyChanged(property, oldValue, newValue); + } + + private static String getDefaultPrimaryFileExtensions() { + return "mod;def;ob2;prj;pkt;ldp"; //$NON-NLS-1$ + } + + public static String[] getDefaultPrimaryFileExtensionsAsArray() { + return StringUtils.split(getDefaultPrimaryFileExtensions(), PRIMARY_FILE_EXTENSIONS_SEPARATOR_CHAR); + } + + public String getName() { + return getPropertyValue(Property.XDS_NAME); + } + + public void setName(String name) { + setPropertyValue(Property.XDS_NAME, name); + } + + public String getSdkHomePath() { + return getPropertyValue(Property.XDS_HOME); + } + + public void setSdkHomePath(String sdkHomePath) { + setPropertyValue(Property.XDS_HOME, sdkHomePath); + } + + public String getCompilerExecutablePath() { + return getPropertyValue(Property.XDS_COMPILER); + } + + void setCompilerExecutablePath (String compilerExecutablePath) { + setPropertyValue(Property.XDS_COMPILER, compilerExecutablePath); + } + + public String getDebuggerExecutablePath() { + return getPropertyValue(Property.XDS_DEBUGGER); + } + + void setDebuggerExecutablePath (String debuggerExecutablePath) { + setPropertyValue(Property.XDS_DEBUGGER, debuggerExecutablePath); + isDebuggerSupportsIdeIntegration = null; + } + + public String getProfilerExecutablePath() { + return getPropertyValue(Property.XDS_PROFILER); + } + + void setProfilerExecutablePath (String profilerExecutablePath) { + setPropertyValue(Property.XDS_PROFILER, profilerExecutablePath); + } + + public String getSimulatorExecutablePath() { + return getPropertyValue(Property.XDS_SIMULATOR); + } + + void setSimulatorExecutablePath(String simulatorExecutablePath) { + setPropertyValue(Property.XDS_SIMULATOR, simulatorExecutablePath); + } + + public String getExecutableFileExtensions() { + return getPropertyValue(Property.XDS_EXE_EXTENSION); + } + + void setExecutableFileExtensions(String exeExtension) { + setPropertyValue(Property.XDS_EXE_EXTENSION, exeExtension); + } + + public String getPrimaryFileExtensions() { + return getPropertyValue(Property.XDS_PRIM_EXTENSIONS); + } + + void setPrimaryFileExtensions(String primExtensions) { + setPropertyValue(Property.XDS_PRIM_EXTENSIONS, primExtensions); + } + + public String[] getPrimaryFileExtensionsAsArray() { + return StringUtils.split(getPrimaryFileExtensions().toLowerCase(), PRIMARY_FILE_EXTENSIONS_SEPARATOR_CHAR); + } + + public String getTprFile() { + return getPropertyValue(Property.XDS_TPR_FILE); + } + + void setTprFile(String fileLocation) { + setPropertyValue(Property.XDS_TPR_FILE, fileLocation); + } + + public String getTrdFile() { + return getPropertyValue(Property.XDS_TRD_FILE); + } + + void setTrdFile(String fileLocation) { + setPropertyValue(Property.XDS_TRD_FILE, fileLocation); + } + + public String getMainModFile() { + return getPropertyValue(Property.XDS_MAIN_MOD_FILE); + } + + void setMainModFile(String mainModFile) { + setPropertyValue(Property.XDS_MAIN_MOD_FILE, mainModFile); + } + + public String getModFile() { + return getPropertyValue(Property.XDS_TMOD_FILE); + } + + void setModFile(String modFile) { + setPropertyValue(Property.XDS_TMOD_FILE, modFile); + } + + public String getDefFile() { + return getPropertyValue(Property.XDS_TDEF_FILE); + } + + void setDefFile(String defFile) { + setPropertyValue(Property.XDS_TDEF_FILE, defFile); + } + + public String getDirsToCreate() { + return getPropertyValue(Property.XDS_DIRS_TO_CREATE); + } + + void setDirsToCreate(String s) { + setPropertyValue(Property.XDS_DIRS_TO_CREATE, s); + } + + public String getFolderMainModule() { + return getPropertyValue(Property.XDS_FOLDER_MAIN_MODULE); + } + + public String getFolderPrjFile() { + return getPropertyValue(Property.XDS_FOLDER_PRJ_FILE); + } + + public String getLibraryDefinitionsPath() { + return getPropertyValue(Property.XDS_LIB_DEFS_PATH); + } + + public void setLibraryDefinitionsPath(String s) { + setPropertyValue(Property.XDS_LIB_DEFS_PATH, s); + } + + public String getUpdateDescriptorPath() { + return getPropertyValue(Property.XDS_UPDATE_MANIFEST); + } + + void setUpdateDescriptorPath(String updateDescriptorPath) { + setPropertyValue(Property.XDS_UPDATE_MANIFEST, updateDescriptorPath); + } + + public String getPropertyValue (Property property) { + if (Property.XDS_XSHELL_FORMAT == property) { + return xShellFormat.name; + } + else { + return propertyName2Value.get(property); + } + } + + public boolean isDebuggerSupportsIdeIntegration() { + checkDebuggerVersion(); + return isDebuggerSupportsIdeIntegration; + } + + public Version getProtocolVersion() { + checkDebuggerVersion(); + return protocolVersion; + } + + public Version getDebuggerVersion() { + checkDebuggerVersion(); + return debuggerVersion; + } + + private void checkDebuggerVersion() { + if (isDebuggerSupportsIdeIntegration == null) { + try { + String stdOut = ProcessUtils.launchProcessAndCaptureStdout(new String[]{getDebuggerExecutablePath(), "-F"}, new File("."), new String[0]); //$NON-NLS-1$ //$NON-NLS-2$ + Matcher matcher = debuggerExecutableSignature.matcher(stdOut); + isDebuggerSupportsIdeIntegration = matcher.matches(); + + if (isDebuggerSupportsIdeIntegration) { + protocolVersion = version(matcher, 0); + debuggerVersion = version(matcher, 3); + } + } catch (CoreException e) { + LogHelper.logError(e); + isDebuggerSupportsIdeIntegration = false; + } + + } + } + + private static Version version(Matcher matcher, int from) { + int major = getGroup(matcher, from + 1); + int minor = getGroup(matcher, from + 2); + int micro = getGroup(matcher, from + 3); + + return new Version(major, minor, micro); + } + + private static int getGroup(Matcher m, int g) { + String strGroup = m.group(g); + if (strGroup == null) { + return 0; + } + return Integer.parseInt(strGroup); + } + + public void setPropertyValue (Property property, String val) { + String oldVal = getPropertyValue(property); + setPropertyInternal(property, val); + + switch (property) { + case XDS_HOME: + invalidateTransientFields(); + break; + case XDS_COMPILER: + invalidateTransientFields(); + break; + default: + } + + boolean isEdited = isBeingEdited(); + if (isEdited) { + recordModification(property, oldVal, val); + } + } + + void setPropertyInternal(Property property, String val) { + if (property == Property.XDS_XSHELL_FORMAT) { + // TODO : change to Enum.parse + for (XShellFormat format: XShellFormat.values()) { + if (format.name.equals(val)) { + xShellFormat = format; + break; + } + } + } + else { + propertyName2Value.put(property, val); + } + } + + String getTag(Property prop, Tag tag) { + String tagName = prop.key + "." + tag.tagName; //$NON-NLS-1$ + return tagsMap.get(tagName); + } + + void setTag(Property prop, Tag tag, String val) { + String tagName = prop.key + "." + tag.tagName; //$NON-NLS-1$ + if (val == null) { + tagsMap.remove(tagName); + } else { + tagsMap.put(tagName, val); + } + } + + public XShellFormat getXShellFormat() { + if (xShellFormat == XShellFormat.UNDEFINED) { + xShellFormat = XShellFormatTracker.test(this); + } + return xShellFormat; + } + + /** + * @return environment variables, ${} variables in the values are not opened + */ + public Map getEnvironmentVariablesRaw() { + return environmentVariables; + } + + /** + * @return environment variables, ${} variables in the values are opened + */ + public Map getEnvironmentVariables() { + HashMap res = new HashMap(); + for (String name : environmentVariables.keySet()) { + String val = environmentVariables.get(name); + try { + if (val == null) val = StringUtils.EMPTY; + val = VariableUtils.performStringSubstitution(this, val); + } catch (CoreException e) { + LogHelper.logError(e); + } + res.put(name, val); + } + return res; + } + + public void setEnvironmentVariables (Map envVars) { + environmentVariables.clear(); + environmentVariables.putAll(envVars); + invalidateTransientFields(); + } + + /** + * @param name variable name + * @return variable value with not opened ${} variables + */ + public String getEnvironmentVariableRaw (String name) { + return environmentVariables.get(name); + } + + public void putEnvironmentVariable (String name, String value) { + environmentVariables.put(name, value); + invalidateTransientFields(); + } + + public void removeEnvironmentVariable (String name) { + environmentVariables.remove(name); + invalidateTransientFields(); + } + + public List getTools() { + return Collections.unmodifiableList(tools); + } + + public void addTool(SdkTool tool) { + tools.add(tool); + } + + public void removeTool(SdkTool tool) { + tools.remove(tool); + } + + public void removeAllTools() { + tools.clear(); + } + + public boolean moveTool(int idx, boolean up) { + if (up ? (idx-- > 0) : (idx < tools.size() - 1)) { + SdkTool t = tools.remove(idx); + tools.add(idx+1, t); + return true; + } + return false; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + + String sdkHomePath = getSdkHomePath(); + result = prime * result + + ((sdkHomePath == null) ? 0 : sdkHomePath.hashCode()); + + for (Property property: FILE_PRORERTIES) { + String path = this.getPropertyValue(property); + result = prime * result + + ((path == null) ? 0 : path.hashCode()); + } + + String name = getName(); + result = prime * result + + ((name == null) ? 0 : name.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + + Sdk other = (Sdk) obj; + for (Property property: Property.values()) { + String thisValue = this.getPropertyValue(property); + String otherValue = other.getPropertyValue(property); + if (thisValue == null) { + if (otherValue != null) + return false; + } else if (!thisValue.equals(otherValue)) + return false; + } + + return true; + } + + public boolean isValid() { + // NOTE: the same validation criteria should be used in + // com.excelsior.xds.ui.preferences.EditSdkDialog + // except NOT_SUPPORTED fields + String name = getName(); + if (name == null || name.length() < 1) { + return false; + } + + String sdkHomePath = getSdkHomePath(); + // Folder paths must be available: + for (String path : new String[] {sdkHomePath}){ + if (path == null){ + return false; + } + File folder = new File(path); + if (!folder.exists() || !folder.isDirectory()) { + return false; + } + } + + // File paths must exist or NOT_SUPPORTED + for (Property property: FILE_PRORERTIES) { + String path = this.getPropertyValue(property); + if (!NOT_SUPPORTED.equals(path)) { + if (path == null){ + return false; + } + File file = new File(path); + if (!file.exists() || !file.isFile()) { + return false; + } + } + } + return true; + } + + @Override + public Sdk clone() { + Sdk newSdk = SdkManager.createSdk(); + newSdk.copyFrom(this); + return newSdk; + } + + public void copyFrom(Sdk from) { + for (Property property: Property.values()) { + setPropertyValue(property, from.getPropertyValue(property)); + } + setEnvironmentVariables(from.getEnvironmentVariablesRaw()); + this.tools = new ArrayList(from.getTools()); + } + + + public XdsIniFile getXdsIni () { + if (transientXdsIni == null) { + transientXdsIni = new XdsIniFile(this); + } + return transientXdsIni; + } + + private void invalidateTransientFields () { + transientXdsIni = null; + } + + /** + * Checks if the given value from SDK is not "not supported" and is not empty + * @param value + * @return + */ + public static boolean isSet(String value) { + return (!StringUtils.isBlank(value) && !NOT_SUPPORTED.equals(value)); + } + + /** + * Checks if the given value from SDK is not "not supported" and is name of existent file + * @param value + * @return + */ + public static boolean isFile(String value) { + return isSet(value) && ((new File(value))).exists(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkChangeEvent.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkChangeEvent.java new file mode 100644 index 0000000..76cb697 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkChangeEvent.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.core.sdk; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +import com.excelsior.xds.core.sdk.Sdk.Property; +import com.excelsior.xds.core.utils.collections.Pair; + +public final class SdkChangeEvent extends SdkEvent { + private final Map> property2OldAndNewVal = new HashMap>(); + + SdkChangeEvent(Sdk source) { + super(source); + } + + boolean hasChanges() { + return !property2OldAndNewVal.isEmpty(); + } + + void setPropertyChanged(Property p, String oldValue, String newValue) { + Pair oldNewVal = property2OldAndNewVal.get(p); + if (oldNewVal == null){ + oldNewVal = new Pair(oldValue, newValue); + property2OldAndNewVal.put(p, oldNewVal); + } + if (Objects.equals(oldNewVal.getFirst(), oldNewVal.getSecond())) { + property2OldAndNewVal.remove(p); + return; + } + oldNewVal.setSecond(newValue); + } + + public Collection getChangedProperties() { + return property2OldAndNewVal.keySet(); + } + + public boolean isChanged(Property p) { + return property2OldAndNewVal.keySet().contains(p); + } + + public String getOldValue(Property p) { + Pair oldNewVal = property2OldAndNewVal.get(p); + return oldNewVal != null? oldNewVal.getFirst() : null; + } + + public String getNewValue(Property p) { + Pair oldNewVal = property2OldAndNewVal.get(p); + return oldNewVal != null? oldNewVal.getSecond() : null; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkEvent.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkEvent.java new file mode 100644 index 0000000..f02ce92 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkEvent.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.sdk; + +public abstract class SdkEvent { + private final Sdk source; + + SdkEvent(Sdk source) { + this.source = source; + } + + public Sdk getSource() { + return source; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileReader.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileReader.java new file mode 100644 index 0000000..97f98a0 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileReader.java @@ -0,0 +1,321 @@ +package com.excelsior.xds.core.sdk; + +import java.io.File; +import java.io.InputStreamReader; +import java.util.ArrayList; +import java.util.List; +import java.util.Map.Entry; +import java.util.Set; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.ini4j.Config; +import org.ini4j.Ini; +import org.ini4j.Profile.Section; +import org.ini4j.Wini; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.sdk.Sdk.Property; +import com.excelsior.xds.core.text.TextEncoding; + +/** + * Reads external description of XDS development system from the "sdk.ini" file. + * + * Example of composite "sdk.ini" file: + * # import description of Native XDS-x86 Win32 Edition + * !import = sdk-x86.ini + * # import description of XDS-C Win32 Edition + * !import = sdk-c.ini * + * + * Example of simple sdk.ini (for example "sdk-x86.ini") file: + * # name of Development system + * xds.name = XDS-x86 2.60 + * # Relative path to compiler + * xds.compiler = bin\xc.exe + * # Relative path to compiler + * xds.debugger = bin\xd.exe + * + * @author fsa, lion + */ +public class SdkIniFileReader { + + private static final String MAIN_INI_FILE_NAME = "sdk.ini"; //$NON-NLS-1$ + + private static final String ENVIRONMENT_SECTION_NAME = "Environment"; //$NON-NLS-1$ + private static final String TOOL_SECTION_NAME = "Tool"; //$NON-NLS-1$ + + private static final String ENVVAR_XDSDIR = "XDSDIR"; //$NON-NLS-1$ + +// private static final int MAX_TOOL_NUMBER = 1000; + private ArrayList aSdk; + private StringBuilder sbErrLog; + + // lines started with this char(s) are comments + private static final String COMMENT_LINE_CHARS = "#"; //$NON-NLS-1$ + + // key for import file property + private static final String IMPORT_PROPERTY = "!import"; //$NON-NLS-1$ + + + /** + * Read sdk.ini file (or file tree with includes) from the given location. + * @param xdsHomePath - folder to search sdk.ini file + */ + public SdkIniFileReader(String xdsHomePath) { + aSdk = new ArrayList(); + sbErrLog = new StringBuilder(); + + try { + Ini ini = loadFile(xdsHomePath, MAIN_INI_FILE_NAME, true); + if (ini != null) { + Section global = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME); + List imports = global.getAll(IMPORT_PROPERTY); + if ((imports == null) || imports.isEmpty()) { + processIniFile(xdsHomePath, MAIN_INI_FILE_NAME); + } else { + for (String import_file_name: imports) { + processIniFile(xdsHomePath, import_file_name); + } + } + } + } catch (Exception e) { + LogHelper.logError(e); + aSdk.clear(); + setError(e.getMessage()); + } + + } + + /** + * Returns the list of the SDKs which are defined in sdk.ini file. + * The list may be empty if sdk.ini file does not exist or its format is invalid. + * In the last case, use getError() to get error message. + * + * @return array of the available SDKs. + */ + public Sdk[] getSdk() { + return aSdk.toArray(new Sdk[]{}); + } + + /** + * Returns error message for invalid sdk.ini file. + * + * @return error message or null if there was no errors. + */ + public String getError() { + return sbErrLog.toString(); + } + + /** + * @param basePath the base path to attach to, if relative file name is used + * @param fileName the name of the file to be loaded + * @param enableMultiOption the state of multi-option configuration flag + */ + private Ini loadFile ( String basePath, String fileName + , boolean enableMultiOption ) throws Exception + { + String full_name = FilenameUtils.concat(basePath, fileName); + File file = new File(full_name); + if (file.exists() && file.isFile()) { + Ini ini = new Wini(); + Config config = ini.getConfig(); + + config.setMultiSection(true); + config.setMultiOption(enableMultiOption); + config.setGlobalSection(true); + config.setComment(true); + + ini.setFile(file); + ini.setComment(COMMENT_LINE_CHARS); + try(InputStreamReader inputStreamReader = TextEncoding.getInputStreamReader(file)){ + ini.load(inputStreamReader); + } + return ini; + } + return null; + } + + private void processIniFile(String basePath, String fileName) throws Exception { + Ini ini = loadFile(basePath, fileName, false); + String homePath = ini.getFile().getParentFile().getCanonicalPath(); + + Sdk sdk = SdkManager.createSdk(); + sdk.setPropertyInternal(Property.XDS_HOME, homePath); + + for (Sdk.Property property: Sdk.Property.values()) { + String val = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME, property.key); // '?' for the default (global) section + if (val != null) { + switch (property) { + case XDS_NAME: + sdk.setPropertyInternal(Property.XDS_NAME, val); + break; + case XDS_HOME: + sdk.setPropertyInternal(Property.XDS_HOME, makePath(homePath, val)); + break; + case XDS_EXE_EXTENSION: + sdk.setPropertyInternal(Property.XDS_EXE_EXTENSION, val); + break; + case XDS_PRIM_EXTENSIONS: + sdk.setPropertyInternal(Property.XDS_PRIM_EXTENSIONS, val); + break; + default: + if ( Sdk.Property.XDS_XSHELL_FORMAT.equals(property) + || Sdk.Property.XDS_DIRS_TO_CREATE.equals(property) + || Sdk.Property.XDS_FOLDER_PRJ_FILE.equals(property) + || Sdk.Property.XDS_FOLDER_MAIN_MODULE.equals(property)) + { + sdk.setPropertyInternal(property, val); + } else { + sdk.setPropertyInternal(property, makePathNS(homePath, val)); + } + } + } + + for (Sdk.Tag tag : property.possibleTags) { + String tval = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME, property.key + "." + tag.tagName); //$NON-NLS-1$ + if (tval != null) { + sdk.setTag(property, tag, tval); + } + } + } + + adjustSettings(ini.getFile(), sdk); + + // Get additional settings from xds.ini etc.: + addSettingsFromLocation(sdk); + + processEnvironmentSection(sdk, ini); + processToolSections(sdk, ini); + + aSdk.add(sdk); + } + + + private String makePathNS (String basePath, String path) throws Exception { + if (Sdk.NOT_SUPPORTED.equals(path)) { + return path; + } + return makePath(basePath, path); + } + + private String makePath (String basePath, String path) throws Exception { + return FilenameUtils.concat(basePath, path); + } + + + private void adjustSettings(File f, Sdk sdk) throws Exception { + if (StringUtils.isBlank(sdk.getName())) { + throw new Exception(f.getAbsolutePath() + " -- Error: invalid SDK definition file (must define sdk name at least)"); //$NON-NLS-1$ + } + if (sdk.getEnvironmentVariableRaw(ENVVAR_XDSDIR) == null) { + sdk.putEnvironmentVariable(ENVVAR_XDSDIR, sdk.getSdkHomePath()); + } + } + + + private void processEnvironmentSection(Sdk sdk, Ini ini) { + List
environments = ini.getAll(ENVIRONMENT_SECTION_NAME); + if (environments != null) { + for (Section envSection : environments) { + Set> entrySet = envSection.entrySet(); + for (Entry entry : entrySet) { + sdk.putEnvironmentVariable(entry.getKey(), entry.getValue()); + } + } + } + } + + private void processToolSections(Sdk sdk, Ini ini) { + List
tools = ini.getAll(TOOL_SECTION_NAME); + if (tools != null) { + for (Section toolSection : tools) { + SdkTool tool = parseTool(sdk, toolSection); + if (tool.isValid()) { + sdk.addTool(tool); + } else { + LogHelper.logError(tool.getErrorMessage()); + } + } + } + } + + private SdkTool parseTool(Sdk sdk, Section toolSection) { + SdkTool tool; + if (toolSection.containsKey("isSeparator")) { //$NON-NLS-1$ + tool = new SdkTool(); // new SdkTool() makes separator, not a tool + } else { + tool = new SdkTool(sdk); + } + for (SdkTool.Property property : SdkTool.Property.values()) { + String value = toolSection.get(property.key); + if (value != null) { + tool.setPropertyValue(property, value); + } + } + return tool; + } + + + private void setError(String s) { + sbErrLog.append(s).append("\n"); //$NON-NLS-1$ + } + + + /** + * Sdk may have not initialized some fields: templates, directories to create etc. + * Even if sdk.ini is not initialized it or Sdk was created without sdk.ini - some + * this data may be collected from its home path, xds.ini and compiler mane if any. + */ + public static void addSettingsFromLocation(Sdk sdk) { + XdsIniFile ini = sdk.getXdsIni(); + String s; + if (sdk.getDirsToCreate().isEmpty()) { + s = ini.getDirectoriesToCreate(); + if (s != null) { + sdk.setDirsToCreate(s.trim()); + } + } + File f; + // -- .tpr if it is still empty: + if (sdk.getTprFile().isEmpty()) { + s = ini.getProjectTemplateFile(); + if (s != null) { + f = new File(s.trim()); + if (f.isFile()) { + sdk.setTprFile(f.getAbsolutePath()); + } + } + } + // -- .trd if it is still empty: + if (sdk.getTrdFile().isEmpty()) { + s = ini.getRedirectionTemplateFile(); + if (s != null) { + f = new File(s.trim()); + if (f.isFile()) { + sdk.setTrdFile(f.getAbsolutePath()); + } + } + } + + // .tpr and .trd files may be constructed from compiler name + s = FilenameUtils.removeExtension(sdk.getCompilerExecutablePath()); + if (!StringUtils.isEmpty(s)) { + // -- .tpr if it is still empty: + if (sdk.getTprFile().isEmpty()) { + f = new File(s + ".tpr"); //$NON-NLS-1$ + if (f.isFile()) { + sdk.setTprFile(f.getAbsolutePath()); + } + } + // -- .trd if it is still empty: + if (sdk.getTrdFile().isEmpty()) { + f = new File(s + ".trd"); //$NON-NLS-1$ + if (f.isFile()) { + sdk.setTrdFile(f.getAbsolutePath()); + } + } + + } + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileWriter.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileWriter.java new file mode 100644 index 0000000..39f9a7e --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkIniFileWriter.java @@ -0,0 +1,305 @@ +package com.excelsior.xds.core.sdk; + +import java.io.File; +import java.io.FileWriter; +import java.util.Map; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.log.LogHelper; + +public class SdkIniFileWriter { + + public static void exportSdk(Sdk sdk, String iniFileName) { + SdkIniFileWriter sw = new SdkIniFileWriter(sdk); + sw.exportSdk(iniFileName); + } + + + // Private: + private static final String ENVVAR_XDSDIR = "XDSDIR"; //$NON-NLS-1$ + + Sdk sdk; + private SdkIniFileWriter(Sdk sdk) { + this.sdk = sdk; + } + + + private void exportSdk(String iniFileName) { + StringBuilder sb = new StringBuilder(); + String home = FilenameUtils.normalize(sdk.getSdkHomePath() + File.separator); + + + putLine(sb, Messages.SdkIniFileWriter_ComentSdkName); + putSdkProp(sb, Sdk.Property.XDS_NAME, sdk.getName()); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putLine(sb, Messages.SdkIniFileWriter_ComentMainComponents); + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentXcPath); + putSdkProp(sb, Sdk.Property.XDS_COMPILER, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_COMPILER))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentXdPath); + putSdkProp(sb, Sdk.Property.XDS_DEBUGGER, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_DEBUGGER))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentProfilerPath); + putSdkProp(sb, Sdk.Property.XDS_PROFILER, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_PROFILER))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentSimulatorPath); + putSdkProp(sb, Sdk.Property.XDS_SIMULATOR, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_SIMULATOR))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentLibPath0); + putLine(sb, Messages.SdkIniFileWriter_ComentLibPath1); + putSdkProp(sb, Sdk.Property.XDS_LIB_DEFS_PATH, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_LIB_DEFS_PATH))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentExeExt); + putSdkProp(sb, Sdk.Property.XDS_EXE_EXTENSION, sdk.getPropertyValue(Sdk.Property.XDS_EXE_EXTENSION)); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentPrimExts0); + putLine(sb, Messages.SdkIniFileWriter_ComentPrimExts1); + putSdkProp(sb, Sdk.Property.XDS_PRIM_EXTENSIONS, sdk.getPropertyValue(Sdk.Property.XDS_PRIM_EXTENSIONS)); //$NON-NLS-1$ + putNewLine(sb); + putNewLine(sb); + + + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putLine(sb, Messages.SdkIniFileWriter_ComentTemptates); + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentDirsList0); + putLine(sb, Messages.SdkIniFileWriter_ComentDirsList1); + putSdkProp(sb, Sdk.Property.XDS_DIRS_TO_CREATE, sdk.getPropertyValue(Sdk.Property.XDS_DIRS_TO_CREATE)); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentPrjFolder); + putSdkProp(sb, Sdk.Property.XDS_FOLDER_PRJ_FILE, sdk.getPropertyValue(Sdk.Property.XDS_FOLDER_PRJ_FILE)); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentMainFolder); + putSdkProp(sb, Sdk.Property.XDS_FOLDER_MAIN_MODULE, sdk.getPropertyValue(Sdk.Property.XDS_FOLDER_MAIN_MODULE)); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentTprPath); + putSdkProp(sb, Sdk.Property.XDS_TPR_FILE, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_TPR_FILE))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentTrdPath); + putSdkProp(sb, Sdk.Property.XDS_TRD_FILE, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_TRD_FILE))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentMainTmdPath); + putSdkProp(sb, Sdk.Property.XDS_MAIN_MOD_FILE, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_MAIN_MOD_FILE))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentModulesTmdPath); + putSdkProp(sb, Sdk.Property.XDS_TMOD_FILE, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_TMOD_FILE))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentDefTmdPath); + putSdkProp(sb, Sdk.Property.XDS_TDEF_FILE, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_TDEF_FILE))); //$NON-NLS-1$ + putNewLine(sb); + + putLine(sb, Messages.SdkIniFileWriter_ComentManifestPath); + putSdkProp(sb, Sdk.Property.XDS_UPDATE_MANIFEST, mkRelPath(home, sdk.getPropertyValue(Sdk.Property.XDS_UPDATE_MANIFEST))); //$NON-NLS-1$ + putNewLine(sb); + putNewLine(sb); + + + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putLine(sb, Messages.SdkIniFileWriter_ComentTools); + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putNewLine(sb); + + for (SdkTool tool : sdk.getTools()) { + putLine(sb, "[Tool]"); //$NON-NLS-1$ + if (tool.isSeparator()) { + putLine(sb, "isSeparator = 1"); //$NON-NLS-1$ + + putToolProp( sb, tool, SdkTool.Property.MENU_GROUP + , Messages.SdkIniFileWriter_CommentToolGroup0 + , Messages.SdkIniFileWriter_CommentToolGroup1 ); + + } else { + putToolProp( sb, tool, SdkTool.Property.NAME + , Messages.SdkIniFileWriter_ComentToolName ); + + putLine(sb, Messages.SdkIniFileWriter_ComentToolLocation); + putOpt(sb, SdkTool.Property.LOCATION.key, mkRelPath(home, tool.getPropertyValue(SdkTool.Property.LOCATION))); + putNewLine(sb); + + putToolProp( sb, tool, SdkTool.Property.MENU_ITEM + , Messages.SdkIniFileWriter_ComentToolMenuOn0 + , Messages.SdkIniFileWriter_ComentToolMenuOn1 ); + + putToolProp( sb, tool, SdkTool.Property.INACTIVE_MENU_ITEM + , Messages.SdkIniFileWriter_ComentToolMenuOff0 + , Messages.SdkIniFileWriter_ComentToolMenuOff1 ); + + putToolProp( sb, tool, SdkTool.Property.MENU_GROUP + , Messages.SdkIniFileWriter_CommentToolGroup0 + , Messages.SdkIniFileWriter_CommentToolGroup1 ); + + putToolProp( sb, tool, SdkTool.Property.CONSOLE_CODEPAGE + , Messages.SdkIniFileWriter_CommentToolCodepage0 + , Messages.SdkIniFileWriter_CommentToolCodepage1 ); + + putToolProp( sb, tool, SdkTool.Property.FILE_EXTENSIONS + , Messages.SdkIniFileWriter_ComentToolFileExtList0 + , Messages.SdkIniFileWriter_ComentToolFileExtList1 ); + + { + String sourceRoots = "# "; //$NON-NLS-1$ + for (SdkTool.SourceRoot srcRoot : SdkTool.SourceRoot.values()) { + sourceRoots += srcRoot.keyValue + " "; //$NON-NLS-1$ + } + putToolProp( sb, tool, SdkTool.Property.SOURCE_ROOT + , Messages.SdkIniFileWriter_ComentToolSourceRoot1 + , Messages.SdkIniFileWriter_ComentToolSourceRoot2 + , sourceRoots ); + } + + putToolProp( sb, tool, SdkTool.Property.ARGUMENTS_ANY_TYPE + , Messages.SdkIniFileWriter_ComentToolArgs + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.ANY_TYPE.keyValue ); //$NON-NLS-1$ + + putToolProp( sb, tool, SdkTool.Property.WORKDIR_ANY_TYPE + , Messages.SdkIniFileWriter_ComentToolWorkDir + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.ANY_TYPE.keyValue ); //$NON-NLS-1$ + + + putToolProp( sb, tool, SdkTool.Property.ARGUMENTS_PRJ_FILE + , Messages.SdkIniFileWriter_ComentToolArgs + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.PRJ_FILE.keyValue + " | " + SdkTool.SourceRoot.ANY_TYPE_OWN_SETTINGS.keyValue ); //$NON-NLS-1$//$NON-NLS-2$ + + putToolProp( sb, tool, SdkTool.Property.WORKDIR_PRJ_FILE + , Messages.SdkIniFileWriter_ComentToolWorkDir + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.PRJ_FILE.keyValue + " | " + SdkTool.SourceRoot.ANY_TYPE_OWN_SETTINGS.keyValue ); //$NON-NLS-1$//$NON-NLS-2$ + + putToolProp( sb, tool, SdkTool.Property.ARGUMENTS_MAIN_MODULE + , Messages.SdkIniFileWriter_ComentToolArgs + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.MAIN_MODULE.keyValue + " | " + SdkTool.SourceRoot.ANY_TYPE_OWN_SETTINGS.keyValue ); //$NON-NLS-1$//$NON-NLS-2$ + + putToolProp( sb, tool, SdkTool.Property.WORKDIR_MAIN_MODULE + , Messages.SdkIniFileWriter_ComentToolWorkDir + , Messages.SdkIniFileWriter_ComentToolFor + SdkTool.Property.SOURCE_ROOT.key + " = " + SdkTool.SourceRoot.MAIN_MODULE.keyValue + " | " + SdkTool.SourceRoot.ANY_TYPE_OWN_SETTINGS.keyValue ); //$NON-NLS-1$//$NON-NLS-2$ + } + putNewLine(sb); + } + + + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putLine(sb, Messages.SdkIniFileWriter_ComentToolEnvNars0); + putLine(sb, Messages.SdkIniFileWriter_ComentToolEnvVars1); + putLine(sb, Messages.SdkIniFileWriter_ComentToolEnvVars2); + putLine(sb, Messages.SdkIniFileWriter_SeparatorLine); + putNewLine(sb); + putLine(sb, "[Environment]"); //$NON-NLS-1$ + putNewLine(sb); + + Map envs = sdk.getEnvironmentVariablesRaw(); + for (String var : envs.keySet()) { + String val = envs.get(var); + if (val == null) val = ""; //$NON-NLS-1$ + if (var.equalsIgnoreCase(ENVVAR_XDSDIR)) { + String s = FilenameUtils.normalize(val + File.separator); + boolean b; + if (File.separatorChar == '\\') { + b = s.equalsIgnoreCase(home); + } else { + b = s.equals(home); + } + if (b) { + continue; // skip XDSDIR var if it == sdk home (it will be created automatically) + } + } + putOpt(sb, var, val); + putNewLine(sb); + } + + putNewLine(sb); + + // Write ini file: + try { + FileWriter fw = new FileWriter(new File(iniFileName)); + fw.write(sb.toString()); + fw.close(); + } catch (Exception e) { + LogHelper.logError(e); + } + } + + private void putLine(StringBuilder sb, String line) { + if (! StringUtils.isBlank(line)) { + sb.append(line).append("\n"); //$NON-NLS-1$ + } + } + + private void putNewLine(StringBuilder sb) { + sb.append("\n"); //$NON-NLS-1$ + } + + + private void putSdkProp(StringBuilder sb, Sdk.Property prop, String value) { + putOpt(sb, prop.key, value); + for (Sdk.Tag tag : prop.possibleTags) { + String val = sdk.getTag(prop, tag); + if (val != null) { + String tagName = prop.key + "." + tag.tagName; //$NON-NLS-1$ + sb.append(tagName).append(" = ").append(val).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + } + + + private void putOpt(StringBuilder sb, String name, String value) { + if (StringUtils.isBlank(value)) { + sb.append("#").append(name).append(" =").append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } else { + sb.append(name).append(" = ").append(value).append("\n"); //$NON-NLS-1$ //$NON-NLS-2$ + } + } + + private void putToolProp( StringBuilder sb, SdkTool tool + , SdkTool.Property prop + , String... comments ) + { + for (String comment : comments) { + putLine(sb, comment); + } + putOpt(sb, prop.key, tool.getPropertyValue(prop)); + putNewLine(sb); + } + + + private String mkRelPath(String home, String path) { + if (path == null || Sdk.NOT_SUPPORTED.equals(path)) { + return path; + } + String file = FilenameUtils.normalize(path); + boolean isParent; + if (File.separatorChar == '\\') { + isParent = file.toLowerCase().startsWith(home.toLowerCase()); // Win + } else { + isParent = file.startsWith(home); // Linux + } + if (isParent) { + file = file.substring(home.length()); + if (file.startsWith(File.separator)) { + file = file.substring(1); + } + } + return file; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkManager.java new file mode 100644 index 0000000..0fec976 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkManager.java @@ -0,0 +1,450 @@ +package com.excelsior.xds.core.sdk; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.IOException; +import java.io.StringReader; +import java.io.StringWriter; +import java.net.URL; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.osgi.service.datalocation.Location; +import org.eclipse.ui.IMemento; +import org.eclipse.ui.WorkbenchException; +import org.eclipse.ui.XMLMemento; +import org.osgi.framework.Bundle; + +import com.excelsior.xds.core.XdsCorePlugin; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.WorkspacePreferencesManager; +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * Loads/stories internal description of all registered XDS development systems. + * NOT thread-safe + */ +public final class SdkManager { + private static final String KEY_ACTIVE_SDK_NAME = XdsCorePlugin.PLUGIN_ID + ".SdkManager.ActiveSdk"; //$NON-NLS-1$ + private static final String KEY_ALL_SDKS_DATA = XdsCorePlugin.PLUGIN_ID + ".SdkManager.SdksSettings"; //$NON-NLS-1$ // used in "org.eclipse.ui.preferenceTransfer" extension point + private static final String RELATIVE_XDS_RESOURCES_BUNDLE_PATH = "../com.excelsior.xds.resources"; //$NON-NLS-1$ + private static final String RELATIVE_XN_EXE_PATH = "resources\\comp_null\\xn.exe"; //$NON-NLS-1$ + + private static final String TAG_SDK_COLLECTION = "RegisteredSDKs"; //$NON-NLS-1$ + private static final String TAG_SDK = "SDK"; //$NON-NLS-1$ + + private static final String TAG_ENVIRONMENT_VARIABLE = "EnvironmentVariable"; //$NON-NLS-1$ + private static final String TAG_ENVIRONMENT_VARIABLE_NAME = "Name"; //$NON-NLS-1$ + private static final String TAG_ENVIRONMENT_VARIABLE_VALUE = "Value"; //$NON-NLS-1$ + + private static final String TAG_TOOL_COLLECTION = "RegisteredTools"; //$NON-NLS-1$ + private static final String TAG_TOOL = "Tool"; //$NON-NLS-1$ + + private static final String TAG_XDS_FOLDERNAME = "com.excelsior.xds"; //$NON-NLS-1$ + private static final String TAG_SDK_FILENAME = "sdk.xml"; //$NON-NLS-1$ + + private static SdkRegistry sdkRegistry; + private static File registryFile = null; + private static Sdk sdkSimulator = null; + + private final Set sdkListeners = new HashSet<>(); + private final Map name2DeletedSdk = new HashMap<>(); + + private boolean is1stTime = true; + + private static volatile int offPropListener = 0; + + private static class SdkManagerHolder { + static SdkManager INSTANCE = new SdkManager(); + } + + public synchronized void addListener(ISdkListener sdkListener) { + sdkListeners.add(sdkListener); + } + + public synchronized void removeListener(ISdkListener sdkListener) { + sdkListeners.remove(sdkListener); + } + + synchronized void notifySdkListenersOnChanged(SdkChangeEvent e){ + if (e.hasChanges()) { + sdkListeners.stream().forEach(l -> l.sdkChanged(e)); + } + } + + synchronized void notifySdkListenersOnRemoved(SdkRemovedEvent e){ + sdkListeners.stream().forEach(l -> l.sdkRemoved(e)); + } + + public static SdkManager getInstance() { + return SdkManagerHolder.INSTANCE; + } + + public static Sdk createSdk(String name, String sdkHomePath) { + return new Sdk(getInstance(), name, sdkHomePath); + } + + public static Sdk createSdk() { + return new Sdk(getInstance()); + } + + public SdkRegistry loadSdkRegistry() { + if (is1stTime) { + is1stTime = false; + final IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + store.addPropertyChangeListener(new IPropertyChangeListener() { + // used when SDK settings are imported via "org.eclipse.ui.preferenceTransfer" extension point + @Override + public void propertyChange(PropertyChangeEvent event) { + if (offPropListener > 0) return; + String prop = event.getProperty(); + if (KEY_ALL_SDKS_DATA.equals(prop)) { + importSdks(store.getString(KEY_ALL_SDKS_DATA)); + } + } + }); + } + + if (sdkRegistry == null) { + File sdkRegistryFile = getSdkRegistryFile(); + if (sdkRegistryFile.length() > 0) { + FileReader reader = null; + try { + reader = new FileReader(sdkRegistryFile); + sdkRegistry = loadSdkRegistry(XMLMemento.createReadRoot(reader)); + } catch (FileNotFoundException e) { + LogHelper.logError(e); + } catch (WorkbenchException e) { + LogHelper.logError(e); + } finally { + if (reader != null) { + try { + reader.close(); + } catch (IOException e) { + LogHelper.logError(e); + } + } + } + } + else{ + sdkRegistry = new SdkRegistry(null); + } + } + + return sdkRegistry; + } + + private void importSdks(String xml) { + try { + SdkRegistry sr = null; + StringReader reader = new StringReader(xml); + sr = loadSdkRegistry(XMLMemento.createReadRoot(reader)); + + // Megre new SDKs with old, replace old SDKs with the same names, + // defauld sdk name (if any) will not be changed + List newList = new ArrayList(); + HashSet newNames = new HashSet(); + final HashSet changedSdks = new HashSet(); + + if (sdkRegistry == null) { + sdkRegistry = new SdkRegistry(null); + } + + for (Sdk sdk : sr.getRegisteredSDKs()) { + newNames.add(sdk.getName()); + newList.add(sdk); + // This SDK is 'changed' if there is no equal SDK in sdkRegistry: + Sdk sOld = sdkRegistry.findSdk(sdk.getName()); + if (sOld == null || !sOld.equals(sdk)) { + changedSdks.add(sdk.getName()); + } + } + for (Sdk sdk : sdkRegistry.getRegisteredSDKs()) { + if (!newNames.contains(sdk.getName())) { + newList.add(sdk); + } + } + sdkRegistry.setRegisteredSDKs(newList); + saveSdkRegistry(sdkRegistry, false); + } catch (Exception e) { + LogHelper.logError(e); + } + } + + + /** + * re-reads contents of SdkRegistry even it is already in memory + */ + public SdkRegistry reloadSdkRegistry() { + unloadSdkRegistry(); + return loadSdkRegistry(); + } + + public void removeSdk(Sdk sdk) { + if (sdk != null){ + name2DeletedSdk.put(sdk.getName(), sdk); + sdkRegistry.removeSdk(sdk); + } + } + + public void unloadSdkRegistry(){ + if (sdkRegistry != null){ + sdkRegistry.getRegisteredSDKs().stream().filter(Sdk::isBeingEdited).forEach(Sdk::cancelEdit); + sdkRegistry = null; + } + name2DeletedSdk.clear(); + } + + public void saveSdkRegistry(SdkRegistry sdkRegistry) { + sdkRegistry.getRegisteredSDKs().stream().filter(Sdk::isBeingEdited).forEach(Sdk::endEdit); + saveSdkRegistry(sdkRegistry, true); + name2DeletedSdk.values().stream().map(SdkRemovedEvent::new).forEach(this::notifySdkListenersOnRemoved); + name2DeletedSdk.clear(); + } + + private void saveSdkRegistry(SdkRegistry sdkRegistry, boolean dupToPreferenceStore) { + if (sdkRegistry == null) return; + XMLMemento memento = XMLMemento.createWriteRoot(TAG_SDK_COLLECTION); + saveSdkRegistry(memento, sdkRegistry); + + FileWriter fwriter = null; + try { + StringWriter sw = new StringWriter(); + memento.save(sw); + String xml = sw.toString(); + fwriter = new FileWriter(getSdkRegistryFile()); + fwriter.append(xml); + if (dupToPreferenceStore) { + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + try { + ++offPropListener; + store.setValue(KEY_ALL_SDKS_DATA, xml); + } + finally { + --offPropListener; + } + } + } + catch (IOException e) { + LogHelper.logError(e); + } + finally { + try { + if (fwriter != null) + fwriter.close(); + } + catch (IOException e) { + LogHelper.logError(e); + } + } + } + + private void saveSdkRegistry(XMLMemento memento, SdkRegistry sdkRegistry) { + String actSdk = (sdkRegistry.getDefaultSdk() != null) ? sdkRegistry.getDefaultSdk().getName() : ""; //$NON-NLS-1$ + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + store.setValue(KEY_ACTIVE_SDK_NAME, actSdk); + WorkspacePreferencesManager.getInstance().flush(); + + for (Sdk sdk : sdkRegistry.getRegisteredSDKs()) { + IMemento mementoSdk = memento.createChild(TAG_SDK); + for (Sdk.Property property: Sdk.Property.values()) { + mementoSdk.putString(property.xmlKey, sdk.getPropertyValue(property)); + for (Sdk.Tag tag : property.possibleTags) { + String val = sdk.getTag(property, tag); + if (val != null) { + String key = property.xmlKey + "_" + tag.xmlTagName; //$NON-NLS-1$ + mementoSdk.putString(key, val); + } + } + } + Map environmentVariables = sdk.getEnvironmentVariablesRaw(); + if (!environmentVariables.isEmpty()) { + for (Map.Entry entry : environmentVariables.entrySet()) { + IMemento mementoEnvVar = mementoSdk.createChild(TAG_ENVIRONMENT_VARIABLE); + mementoEnvVar.putString(TAG_ENVIRONMENT_VARIABLE_NAME, entry.getKey()); + mementoEnvVar.putString(TAG_ENVIRONMENT_VARIABLE_VALUE, entry.getValue()); + } + } + saveTools(mementoSdk, sdk); + } + } + + private SdkRegistry loadSdkRegistry(XMLMemento memento) { + List registeredSDKs = new ArrayList(); + + IMemento[] children = memento.getChildren(TAG_SDK); + + IPreferenceStore store = XdsCorePlugin.getDefault().getPreferenceStore(); + String actSdk = store.getString(KEY_ACTIVE_SDK_NAME); + if (StringUtils.isEmpty(actSdk)) { + actSdk = null; + } + SdkRegistry sdkRegistry = new SdkRegistry(actSdk); + for (IMemento settingsMemento : children) { + Sdk settings = createSdkFor(settingsMemento); + if (settings != null) { + registeredSDKs.add(settings); + } + } + sdkRegistry.setRegisteredSDKs(registeredSDKs); + + return sdkRegistry; + } + + private Sdk createSdkFor(IMemento memento) { + Sdk sdk = SdkManager.createSdk(); + for (Sdk.Property property: Sdk.Property.values()) { + final String value = memento.getString(property.xmlKey); + if (value == null) + return null; + sdk.setPropertyValue(property, value); + for (Sdk.Tag tag : property.possibleTags) { + String key = property.xmlKey + "_" + tag.xmlTagName; //$NON-NLS-1$ + String val = memento.getString(key); + if (val != null) { + sdk.setTag(property, tag, val); + } + } + } + IMemento[] mementoEnvironmentVariables = memento.getChildren(TAG_ENVIRONMENT_VARIABLE); + if (mementoEnvironmentVariables.length > 0) { + for (IMemento mementoEnvVar : mementoEnvironmentVariables) { + final String name = mementoEnvVar.getString(TAG_ENVIRONMENT_VARIABLE_NAME); + final String value = mementoEnvVar.getString(TAG_ENVIRONMENT_VARIABLE_VALUE); + sdk.putEnvironmentVariable(name, value); + } + + } + loadTools(memento, sdk); + return sdk; + } + + private static void loadTools(IMemento memento, Sdk sdk) { + IMemento toolsChild = memento.getChild(TAG_TOOL_COLLECTION); + if (toolsChild != null) { + IMemento[] toolsChildren = toolsChild.getChildren(TAG_TOOL); + for (IMemento toolChild : toolsChildren) { + SdkTool tool; + if (toolChild.getBoolean("isSeprator") != null) { //$NON-NLS-1$ + tool = new SdkTool(); // new SdkTool() makes separator, not a tool + final String value = toolChild.getString(SdkTool.Property.MENU_GROUP.tag); + if (value != null) { + tool.setPropertyValue(SdkTool.Property.MENU_GROUP, value); + } + + } else { + tool = new SdkTool(sdk); + for (SdkTool.Property property: SdkTool.Property.values()) { + final String value = toolChild.getString(property.tag); + if (value != null) { + tool.setPropertyValue(property, value); + } + } + } + sdk.addTool(tool); + } + } + } + + private static void saveTools(IMemento memento, Sdk sdk) { + List tools = sdk.getTools(); + IMemento toolsMemento = memento.createChild(TAG_TOOL_COLLECTION); + for (SdkTool tool : tools) { + IMemento toolMemento = toolsMemento.createChild(TAG_TOOL); + if (tool.isSeparator()) { + toolMemento.putBoolean("isSeprator", true); //$NON-NLS-1$ + toolMemento.putString(SdkTool.Property.MENU_GROUP.tag, tool.getPropertyValue(SdkTool.Property.MENU_GROUP)); + } else { + for (SdkTool.Property property: SdkTool.Property.values()) { + toolMemento.putString(property.tag, tool.getPropertyValue(property)); + } + } + } + } + + static File getSdkRegistryFile() { + if (registryFile == null) { + try { + // 1st call: + + File dir = null; + Location location = Platform.getConfigurationLocation(); + if (location != null) { + URL configURL = location.getURL(); + if (configURL != null && configURL.getProtocol().startsWith("file")) { //$NON-NLS-1$ + dir = new File(configURL.getFile()); + } + } + + if (dir == null) { + // If the configuration directory is read-only, + // then return an alternate location + // rather than null or throwing an Exception. + dir = XdsCorePlugin.getDefault().getStateLocation().toFile(); + } + + registryFile = new File(new File(dir, TAG_XDS_FOLDERNAME), TAG_SDK_FILENAME); + + if (!registryFile.exists()) { + registryFile.getParentFile().mkdirs(); + registryFile.createNewFile(); + + } + } catch (Exception ex) { + LogHelper.logError(ex); + } + } + + return registryFile; + } + + /** + * Returns the SDK based on internal 'xn' compiler from "com.excelsior.xds.resources" plug-in. + * The 'xn' compiler has not code generator. This compiler is designed to extract + * options, equations and lookups from XDS configuration and project files. + * + * @return SDK based on internal 'xn' compiler or + * null if "com.excelsior.xds.resources" plug-in is not available. + */ + public Sdk getSdkSimulator() throws IOException { + if (sdkSimulator == null) { + File xnLocation = getXnCompiler(); + sdkSimulator = SdkManager.createSdk("XDS Modula-2 SDK Simulator", xnLocation.getParent()); //$NON-NLS-1$ + sdkSimulator.setCompilerExecutablePath(xnLocation.getAbsolutePath()); + } + return sdkSimulator; + } + + /** + * Returns location of the internal xn.exe compiler. + * + * @return location of xn.exe compiler + * @throws IOException + */ + private static File getXnCompiler() throws IOException { + File xnLocation; + + Bundle bundle = ResourceUtils.getXdsResourcesPluginBundle(); //$NON-NLS-1$ + if (bundle != null) { + xnLocation = new File(FileLocator.getBundleFile(bundle), RELATIVE_XN_EXE_PATH); + } + else { + xnLocation = new File(RELATIVE_XDS_RESOURCES_BUNDLE_PATH, RELATIVE_XN_EXE_PATH).getAbsoluteFile(); + } + + return xnLocation; + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRegistry.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRegistry.java new file mode 100644 index 0000000..ddd7d72 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRegistry.java @@ -0,0 +1,121 @@ +package com.excelsior.xds.core.sdk; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * The container of all registered XDS development systems. + */ +public class SdkRegistry { + + private String defaultSdkName; + private List registeredSDKs = new ArrayList(); + + public SdkRegistry(String activeSdkName) { + this.defaultSdkName = activeSdkName; + } + + public String getDefaultSdkName() { + return defaultSdkName; + } + + public Sdk getDefaultSdk() { + for (Sdk sdk : registeredSDKs) { + if (sdk.getName().equals(defaultSdkName)) { + return sdk; + } + } + if (registeredSDKs.size() > 0) { + // if there is no active sdk now: mark 1st sdk (if any) as active and return it + Sdk sdk = registeredSDKs.get(0); + defaultSdkName = sdk.getName(); + return sdk; + } + return null; + } + + public Sdk findSdk(String name) { + for (Sdk sdk : registeredSDKs) { + if (sdk.getName().equals(name)) { + return sdk; + } + } + return null; + } + + public void addSdk(Sdk sdk) { + registeredSDKs.add(sdk); + if (registeredSDKs.size() == 1) { + defaultSdkName = sdk.getName(); + } + } + + public void removeSdk(Sdk sdk) { + registeredSDKs.remove(sdk); + if (sdk.getName().equals(defaultSdkName) && !registeredSDKs.isEmpty()) { // removed is active sdk + defaultSdkName = registeredSDKs.iterator().next().getName(); + } + } + + public void editSdk(Sdk oldSdk, Sdk editedSdk) { + if (oldSdk.getName().equals(defaultSdkName)) { + defaultSdkName = editedSdk.getName(); + } + + // the same Sdk object must be preserved, + // it may be cached anywhere so copyFrom it: + + oldSdk.copyFrom(editedSdk); + } + + public void setDefaultSdk(String defaultSdkName) { + this.defaultSdkName = defaultSdkName; + } + + public List getRegisteredSDKs() { + return Collections.unmodifiableList(registeredSDKs); + } + + public void setRegisteredSDKs(List registeredSDKs) { + this.registeredSDKs = registeredSDKs; + } + + /** + * TODO : remove the fuck out + * @param aSdk + */ + public String makeSdkNameUnique(String name) { + if (findSdk(name) == null) { + return name; + } + for (int i = 1; true; ++i) { + String nn = name + "(" + i +")"; //$NON-NLS-1$ //$NON-NLS-2$ + if (findSdk(nn) == null) { + return nn; + } + } + } + + /** + * TODO : remove the fuck out + * @param aSdk + */ + public void makeSdkNameUnique(Sdk[] aSdk) { + if (aSdk != null) { + for (Sdk sdk : aSdk) { + // TODO : remove ASAP + boolean beingEdited = sdk.isBeingEdited(); + if (!beingEdited){ + sdk.beginEdit(); + } + sdk.setName(makeSdkNameUnique(sdk.getName())); + // TODO : remove ASAP + if (!beingEdited){ + sdk.endEdit(); + } + } + } + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRemovedEvent.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRemovedEvent.java new file mode 100644 index 0000000..4ba6022 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkRemovedEvent.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.core.sdk; + +public final class SdkRemovedEvent extends SdkEvent { + SdkRemovedEvent(Sdk source) { + super(source); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkTool.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkTool.java new file mode 100644 index 0000000..b9deb15 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/SdkTool.java @@ -0,0 +1,430 @@ +package com.excelsior.xds.core.sdk; + +import java.io.File; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.internal.nls.Messages; +import com.excelsior.xds.core.project.XdsProjectType; +import com.excelsior.xds.core.resource.EncodingUtils; +import com.excelsior.xds.core.variables.VariableUtils; + +/** + * SDK Tool settings. + * + * @author lsa80, lion, fsa + */ +public class SdkTool { + + public static enum Property { + // property | ini-file key | xml-file tag + NAME ("tool.name", "Name", null), //$NON-NLS-1$ //$NON-NLS-2$ + LOCATION ("tool.location", "Location", null), //$NON-NLS-1$ //$NON-NLS-2$ + SOURCE_ROOT ("tool.source.root", "SourceRoot", null), //$NON-NLS-1$ //$NON-NLS-2$ + FILE_EXTENSIONS ("tool.file.extensions", "FileExtensions", null), //$NON-NLS-1$ //$NON-NLS-2$ + MENU_ITEM ("tool.menu.item", "MenuItemBoth", null), //$NON-NLS-1$ //$NON-NLS-2$ + INACTIVE_MENU_ITEM ("tool.menu.item.inactive", "InactiveMenuItemBoth", null), //$NON-NLS-1$ //$NON-NLS-2$ + MENU_GROUP ("tool.menu.group", "MenuGroup", null), //$NON-NLS-1$ //$NON-NLS-2$ + CONSOLE_CODEPAGE ("tool.console.codepage", "ConsoleCodepage", null), //$NON-NLS-1$ //$NON-NLS-2$ + + // Properties for all mode containers: + + ARGUMENTS_PRJ_FILE ("tool.arguments.prj_file", "PrjFileArguments", SourceRootSettingsType.PRJ_FILE), //$NON-NLS-1$ //$NON-NLS-2$ + WORKDIR_PRJ_FILE ("tool.workdir.prj_file", "PrjFileWorkingDirectory", SourceRootSettingsType.PRJ_FILE), //$NON-NLS-1$ //$NON-NLS-2$ + + ARGUMENTS_MAIN_MODULE ("tool.arguments.main_module", "MainModuleArguments", SourceRootSettingsType.MAIN_MODULE), //$NON-NLS-1$ //$NON-NLS-2$ + WORKDIR_MAIN_MODULE ("tool.workdir.main_module", "MainModuleWorkingDirectory", SourceRootSettingsType.MAIN_MODULE), //$NON-NLS-1$ //$NON-NLS-2$ + + ARGUMENTS_ANY_TYPE ("tool.arguments", "Arguments", SourceRootSettingsType.ANY_TYPE), //$NON-NLS-1$ //$NON-NLS-2$ + WORKDIR_ANY_TYPE ("tool.workdir", "WorkingDirectory", SourceRootSettingsType.ANY_TYPE); //$NON-NLS-1$ //$NON-NLS-2$ + + /** Tool property key for 'sdk.ini' file */ + public final String key; + + /** SDK property key for internal 'sdk.xml' file */ + public final String tag; + + /** source root type or null */ + public final SourceRootSettingsType srcRoot; + + /** + * @param key ini-file key associated with the property + * @param tag xml-tag associated with property + */ + Property (String key, String tag, SourceRootSettingsType srcRoot) { + this.key = key; + this.tag = tag; + this.srcRoot = srcRoot; + } + }; + + private static enum Error { + NONE (""), //$NON-NLS-1$ + INVALID_TOOL_NAME (Messages.Tool_InvalidToolName), + INVALID_TOOL_LOCATION (Messages.Tool_InvalidToolLocation), + INVALID_WORKDIR_VARS (Messages.Tool_InvalidToolWorkDir_BadVars); + + public final String message; + + Error (String message) { + this.message = message; + } + }; + + /** + * Possible values of the Property.SOURCE_ROOT in 'sdk.ini' file. + */ + public static enum SourceRoot { + PRJ_FILE ("prj_file"), //$NON-NLS-1$ + MAIN_MODULE ("main_module"), //$NON-NLS-1$ + ANY_TYPE ("any_type"), //$NON-NLS-1$ + ANY_TYPE_OWN_SETTINGS ("any_type_with_own_settings"); //$NON-NLS-1$ + + public final String keyValue; + + SourceRoot (String keyValue) { + this.keyValue = keyValue; + } + + public static SourceRoot getInstance(String s) { + for (SourceRoot srcRoot : values()) { + if (srcRoot.keyValue.equals(s)) { + return srcRoot; + } + } + return null; + } + }; + + /** + * Types of source root settings. Four source roots use tree type of settings. + * Source root | Settings type + * ----------------------|--------------- + * PRJ_FILE | PRJ_FILE + * MAIN_MODULE | MAIN_MODULE + * ANY_TYPE | ANY_TYPE + * ANY_TYPE_OWN_SETTINGS | PRJ_FILE & MAIN_MODULE + */ + public static enum SourceRootSettingsType { + PRJ_FILE (0), + MAIN_MODULE(1), + ANY_TYPE (2); + + public final int idx; // Index in sourceRootSettings[] + + /** + * @param idx source root index in modeData[] + */ + SourceRootSettingsType (int idx) { + this.idx = idx; + } + } + + private Sdk sdk; + private Error error = Error.NONE; + private boolean isSeparator = false; // It is not tool, it is separator in tool menu + + private String toolName = ""; //$NON-NLS-1$ + private String location = ""; //$NON-NLS-1$ + private String menuItem = ""; //$NON-NLS-1$ + private String inactiveMenuItem = ""; //$NON-NLS-1$ + private String menuGroup = ""; //$NON-NLS-1$ + private String fileExtensions = ""; //$NON-NLS-1$ + private List fileExtensionsList; // extensions list (in lower case) + private SourceRoot sourceRoot; + private String consoleCodepage = EncodingUtils.DOS_ENCODING; // For unknown codepage names system-default CP will be used //$NON-NLS-1$ + + // This settings depends on type of source root for which the tool is available: + private class SourceRootSettings { + String arguments = ""; //$NON-NLS-1$ + String workingDirectory = ""; //$NON-NLS-1$ + + public void copyFrom(SourceRootSettings from) { + arguments = from.arguments; + workingDirectory = from.workingDirectory; + } + } + + private SourceRootSettings sourceRootSettings[] = { new SourceRootSettings() + , new SourceRootSettings() + , new SourceRootSettings() + }; + + private SourceRootSettings getSourceRootSettings(SourceRootSettingsType m) { + return sourceRootSettings[m.idx]; + } + + private SourceRootSettings getSourceRootSettings(XdsProjectType prjtype) { + switch (sourceRoot) { + case PRJ_FILE: + return (prjtype == XdsProjectType.PROJECT_FILE) ? sourceRootSettings[SourceRootSettingsType.PRJ_FILE.idx] : null; + case MAIN_MODULE: + return prjtype == XdsProjectType.MAIN_MODULE ? sourceRootSettings[SourceRootSettingsType.MAIN_MODULE.idx] : null; + case ANY_TYPE_OWN_SETTINGS: + return (prjtype == XdsProjectType.PROJECT_FILE) ? + sourceRootSettings[SourceRootSettingsType.PRJ_FILE.idx] : + sourceRootSettings[SourceRootSettingsType.MAIN_MODULE.idx]; + default: // ALL_PROJECTS + return sourceRootSettings[SourceRootSettingsType.ANY_TYPE.idx]; + } + } + + //////////////// + + public SdkTool(Sdk sdk) { + this.sdk = sdk; + this.sourceRoot = SourceRoot.ANY_TYPE; + } + + /** + * Makes manu separator, not a tool + */ + public SdkTool() { + isSeparator = true; + } + public Sdk getSdk() { + return sdk; + } + + public boolean isSeparator() { + return isSeparator; + } + + public String getToolName() { + return toolName; + } + + public String getLocation() { + return location; + } + + public String getArguments(XdsProjectType prjtype) { + SourceRootSettings md = getSourceRootSettings(prjtype); + return md == null ? "" : md.arguments; //$NON-NLS-1$ + } + + public String getArguments(SourceRootSettingsType mode) { + return getSourceRootSettings(mode).arguments; + } + + public String getWorkingDirectory(XdsProjectType prjtype) { + SourceRootSettings md = getSourceRootSettings(prjtype); + return md == null ? "" : md.workingDirectory; //$NON-NLS-1$ + } + + public String getWorkingDirectory(SourceRootSettingsType mode) { + return getSourceRootSettings(mode).workingDirectory; + } + + public String getMenuItem() { + return menuItem; + } + + public String getInactiveMenuItem() { + return inactiveMenuItem; + } + + public String getMenuGroup() { + return menuGroup; + } + + public SourceRoot getSourceRoot() { + return sourceRoot; + } + + public String getFileExtensions() { + return fileExtensions; + } + + public List getFileExtensionsList() { + return fileExtensionsList; + } + + public void setToolName(String name) { + this.toolName = name; + } + + public void setLocation(String location) { + this.location = location; + } + + public void setArguments(String commandLineArguments, SourceRootSettingsType m) { + getSourceRootSettings(m).arguments = commandLineArguments; + } + + public void setWorkingDirectory(String workingDirectory, SourceRootSettingsType m) { + getSourceRootSettings(m).workingDirectory = workingDirectory; + } + + public void setFileExtensions(String fileExtensions) { + this.fileExtensions = fileExtensions; + if (fileExtensions != null) { + String[] extensions = StringUtils.split(fileExtensions.toLowerCase(), ';'); + fileExtensionsList = Arrays.asList(extensions); + } else { + fileExtensionsList = null; + } + } + + public void setMenuItem(String menuItemCaption) { + menuItem = menuItemCaption; + } + + public void setInactiveMenuItem(String menuItemCaption) { + inactiveMenuItem = menuItemCaption; + } + + public void setMenuGroup(String grp) { + menuGroup = grp; + } + + public void setSourceRoot(SourceRoot srcRoot) { + sourceRoot = srcRoot; + } + + public void setPropertyValue (Property property, String val) { + switch (property) { + case NAME: + toolName = val; + break; + case LOCATION: + location = FilenameUtils.concat(sdk.getSdkHomePath(), val); + break; + case ARGUMENTS_PRJ_FILE: + case ARGUMENTS_MAIN_MODULE: + case ARGUMENTS_ANY_TYPE: + SourceRootSettings md = getSourceRootSettings(property.srcRoot); + md.arguments = val; + break; + case WORKDIR_PRJ_FILE: + case WORKDIR_MAIN_MODULE: + case WORKDIR_ANY_TYPE: + getSourceRootSettings(property.srcRoot).workingDirectory = val; + break; + case MENU_ITEM: + menuItem = val; + break; + case INACTIVE_MENU_ITEM: + inactiveMenuItem = val; + break; + case MENU_GROUP: + menuGroup = val; + break; + case SOURCE_ROOT: + SourceRoot sr = SourceRoot.getInstance(val); + Assert.isTrue(sr != null, "Wrong availablilty value: " + val); //$NON-NLS-1$ + sourceRoot = sr; + break; + case FILE_EXTENSIONS: + setFileExtensions(val); + break; + case CONSOLE_CODEPAGE: + consoleCodepage = val; + break; + default: + Assert.isTrue(false, "Internal error: invalid SDK Tool property identifier"); //$NON-NLS-1$ + } + } + + public String getPropertyValue (Property property) { + switch (property) { + case NAME: + return toolName; + case LOCATION: + return location; + case ARGUMENTS_PRJ_FILE: + case ARGUMENTS_MAIN_MODULE: + case ARGUMENTS_ANY_TYPE: + return getSourceRootSettings(property.srcRoot).arguments; + case WORKDIR_PRJ_FILE: + case WORKDIR_MAIN_MODULE: + case WORKDIR_ANY_TYPE: + return getSourceRootSettings(property.srcRoot).workingDirectory; + case MENU_ITEM: + return menuItem; + case INACTIVE_MENU_ITEM: + return inactiveMenuItem; + case MENU_GROUP: + return menuGroup; + case SOURCE_ROOT: + return sourceRoot.keyValue; + case FILE_EXTENSIONS: + return fileExtensions; + case CONSOLE_CODEPAGE: + return consoleCodepage; + } + Assert.isTrue(false, "Internal error: invalid SDK Tool property identifier"); //$NON-NLS-1$ + return null; + } + + // Used in SdkIniFileReader + public boolean isValid() { + if (isSeparator()) { + return true; + } + if (StringUtils.isBlank(toolName)) { + error = Error.INVALID_TOOL_NAME; + return false; + } + if (StringUtils.isBlank(location) || !(new File(location).isFile())) { + error = Error.INVALID_TOOL_LOCATION; + return false; + } + for (SourceRootSettings md : sourceRootSettings) { + if (!StringUtils.isBlank(md.workingDirectory)) { + try { + md.workingDirectory = VariableUtils.performStringSubstitution(this.getSdk(), md.workingDirectory); + } catch (CoreException e) { + error = Error.INVALID_WORKDIR_VARS; + return false; + } + } + } + error = Error.NONE; + return true; + } + + public String getErrorMessage() { + return error.message; + } + + @Override + public SdkTool clone() { + SdkTool tool = new SdkTool(sdk); + tool.copyFrom(this); + return tool; + } + + public void copyFrom(SdkTool from) { + sdk = from.sdk; + error = from.error; + toolName = from.toolName; + location = from.location; + menuItem = from.menuItem; + menuGroup = from.menuGroup; + inactiveMenuItem = from.inactiveMenuItem; + fileExtensions = from.fileExtensions; + sourceRoot = from.sourceRoot; + consoleCodepage = from.consoleCodepage; + setFileExtensions(from.fileExtensions); + for (int i=0; i getProjectsWithGivenSdk(Sdk sdk) { + return getProjectsWithGivenSdkName(sdk.getName()); + } + + public static List getProjectsWithGivenSdkName(String sdkName) { + List xdsProjectsWithGivenSdk = new ArrayList(); + + Sdk defaultSdk = SdkManager.getInstance().loadSdkRegistry().getDefaultSdk(); + String defaultSdkName = defaultSdk != null? defaultSdk.getName() : null; + for (IProject p : ProjectUtils.getXdsProjects()) { + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(p); + String projectSdkName = xdsProjectSettings.getProjectSpecificSdkName(); + boolean isAdd = false; + if (projectSdkName != null) { + isAdd = Objects.equals(sdkName, projectSdkName); + } + else { + isAdd = sdkName == null || Objects.equals(sdkName, defaultSdkName); + } + if (isAdd) { + xdsProjectsWithGivenSdk.add(p); + } + } + + return xdsProjectsWithGivenSdk; + } + + /** + * Called at startup. + * If there are no any SDKs registered, it reads preinstalled sdk(s) enumerated + * in \xdsplugin.ini + * + * The file example: + * ================= + * [SDKLIST] + * + * xds.home=XDS_DIR + * xds.home=XDS_DIR2 + * ... + * ================= + * + * first 'xds.home' will be set as 'default' sdk + * + */ + public static void autoLoadSdksOnEarlyStart() { + SdkRegistry sdkRegistry = SdkManager.getInstance().loadSdkRegistry(); + if (sdkRegistry.getRegisteredSDKs().isEmpty()) { + String eclipseInstallDir = System.getProperty(ECLIPSE_HOME_LOCATION_PROPERTY); + try { + File f = new File(new URL(FilenameUtils.concat(eclipseInstallDir, XDSPLUGININI_FILE_NAME)).toURI()); + if (f.isFile()) { + Ini ini = new Wini(); + Config config = ini.getConfig(); + + config.setMultiSection(true); + config.setMultiOption(true); + config.setGlobalSection(true); + config.setComment(true); + ini.setFile(f); + ini.setComment("#:"); //$NON-NLS-1$ + try(InputStreamReader reader = TextEncoding.getInputStreamReader(f)){ + ini.load(reader); + } + + Section sdkListSection = ini.get("SDKLIST"); //$NON-NLS-1$ + if (sdkListSection != null) { + boolean is1st = true; + for (String sdksubpath : sdkListSection.getAll("xds.home")) { //$NON-NLS-1$ + File xdsdir = new File(sdksubpath); + if (!xdsdir.isAbsolute()) { + xdsdir = new File(new URL(FilenameUtils.concat(eclipseInstallDir, sdksubpath)).toURI()); + } + SdkIniFileReader sdkReader = new SdkIniFileReader(xdsdir.getAbsolutePath()); + Sdk aSdk[] = sdkReader.getSdk(); + for (Sdk sdk : aSdk) { + sdkRegistry.addSdk(sdk); + if (is1st) { + sdkRegistry.setDefaultSdk(sdk.getName()); + is1st = false; + } + } + } + } + } + } catch (Exception e) { + LogHelper.logError(e); + } + if (!sdkRegistry.getRegisteredSDKs().isEmpty()) { + SdkManager.getInstance().saveSdkRegistry(sdkRegistry); + } + } + } + + /** + * @param p + * @return SDK set on the given project + * @throws CoreException + */ + public static Sdk getProjectSdk(IProject p) throws CoreException { + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(p); + return xdsProjectSettings.getProjectSdk(); + } + + public static boolean isInsideSdkLibraryDefinitions(Sdk sdk, IFileStore fileStore) { + if (sdk == null || fileStore == null) { + return false; + } + String sdkHomePath = sdk.getSdkHomePath(); + if (sdkHomePath != null) { + File sdkHomeDir = new File(sdkHomePath); + if (sdkHomeDir.isDirectory()) { + IFileStore sdkHomeFileStore = ResourceUtils.toFileStore(sdkHomeDir); + if (sdkHomeFileStore != null) { + return sdkHomeFileStore.isParentOf(fileStore); + } + } + } + return false; + } + + private SdkUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XShellFormatTracker.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XShellFormatTracker.java new file mode 100644 index 0000000..60306e7 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XShellFormatTracker.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.core.sdk; + +import java.io.File; +import java.io.FileOutputStream; +import java.util.ArrayList; +import java.util.List; + +import com.excelsior.xds.core.process.InputStreamListener; +import com.excelsior.xds.core.process.ProcessLauncher; + +public class XShellFormatTracker { + + public static Sdk.XShellFormat test (Sdk sdk) { + Sdk.XShellFormat res = Sdk.XShellFormat.UNDEFINED; + File modFile = null; + try { + // Create .mod file + File dataDir = new File(System.getProperty("java.io.tmpdir")); //$NON-NLS-1$ + modFile = File.createTempFile("XdsTestTmp", ".mod", dataDir); //$NON-NLS-1$ //$NON-NLS-2$ + modFile.deleteOnExit(); + try(FileOutputStream fos = new FileOutputStream(modFile)){ + fos.write('q'); // non empty. some xv.exe crashes on empty files + } + + List args = new ArrayList(); + args.add(sdk.getCompilerExecutablePath()); + args.add("=make"); //$NON-NLS-1$ + args.add(modFile.getAbsolutePath()); + + final ProcessLauncher procLauncher = new ProcessLauncher(); + procLauncher.setCommandline(args); + procLauncher.addEnvironment(sdk.getEnvironmentVariablesRaw()); + procLauncher.addEnvironment("__XDS_SHELL__", "[Eclipse]"); // turn on extended compiler output mode //$NON-NLS-1$ //$NON-NLS-2$ + procLauncher.setWorkingDirectory(dataDir); + + final StringBuilder sbXdsOutput = new StringBuilder(); + procLauncher.addProcessStdoutListener(new InputStreamListener() { + @Override + public void onHasData(byte[] buffer, int length) { + sbXdsOutput.append(new String(buffer, 0, length)); + } + + @Override + public void onEndOfStreamReached() { + } + }); + + // RUN: + boolean ok = false; + try { + ok = procLauncher.launch(); + } catch (Exception e) {} + if (ok) { + String log = sbXdsOutput.toString(); + // #Error 008: error in module header or import section at 1:1 : + if (log.contains("\u0001E\u0008\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0001\u0000\u0000\u0000")) { //$NON-NLS-1$ + res = Sdk.XShellFormat.BINARY; + } else if (log.contains("\u0001E8_1_1_")) { //$NON-NLS-1$ + res = Sdk.XShellFormat.TEXT; + } + } + modFile.delete(); + } catch (Exception e) {} + return res; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsIniFile.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsIniFile.java new file mode 100644 index 0000000..6880365 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsIniFile.java @@ -0,0 +1,138 @@ +package com.excelsior.xds.core.sdk; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.StringReader; +import java.util.HashMap; + +import org.apache.commons.io.FilenameUtils; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.text.TextEncoding; + +/** + * Provides access to settings of original XDS IDE which are stored + * in the "xds.ini" file. + */ +public class XdsIniFile { + + // variables used in 'xds.ini' file + private final String xdsdir; + private final String xdsname; + + // xds.ini file contents in form > + private final HashMap> content; + + XdsIniFile (Sdk sdk) { + content = new HashMap>(); + + String compiler = sdk.getCompilerExecutablePath(); + + String dir = null; + if (compiler != null) { + dir = (new File(compiler)).getParent(); + } + if (dir == null) { + dir = FilenameUtils.concat(sdk.getSdkHomePath(), "bin"); //$NON-NLS-1$ + } + xdsdir = dir; + + xdsname = (compiler == null) + ? "" //$NON-NLS-1$ + : FilenameUtils.getBaseName(compiler); + readXdsIniFile(FilenameUtils.getFullPath(compiler)); + } + + /** + * @return value like "$(xdsdir)\$(xdsname).tpr", "xc.tpr" or null + */ + public String getProjectTemplateFile () { + return getValue("new-project", "template"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * @return value like "src\$(projname).mod" or null + */ + public String getMainModuleName () { + return getValue("new-project", "default-main-module"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * @return value like "$(xdsdir)\$(xdsname).trd", "xc.trd" or null + */ + public String getRedirectionTemplateFile () { + return getValue("new-project", "redfile"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * @return string like "DEF;SRC;OBJ;SYM" or null + */ + public String getDirectoriesToCreate() { + return getValue("new-project", "directories"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * Note: it is case insensitive + */ + private String getValue(String sectionName, String key) { + HashMap section = content.get(sectionName.toLowerCase()); + if (section == null) + return null; + + String value = section.get(key.toLowerCase()); + return value == null ? null + : replaceVariables(value); + } + + private String replaceVariables (String str) { + str = str.replace("$(xdsdir)", xdsdir); // ~= "c:\xds\bin" //$NON-NLS-1$ + str = str.replace("$(xdsname)", xdsname); // ~= "xc" //$NON-NLS-1$ + return str; + } + + private void readXdsIniFile (String location) { + if (location == null) + return; + File file = new File(FilenameUtils.concat(location, "xds.ini")); //$NON-NLS-1$ + if (!file.isFile()) + return; + + // parse and cache xds.ini file: + try { + StringBuilder sb = new StringBuilder(); + TextEncoding.readFileAndCodepage(file, sb, null); + + BufferedReader br = new BufferedReader(new StringReader(sb.toString())); + HashMap section = null; + String line; + while ((line = br.readLine()) != null) { + line = line.trim(); + // [section name] + if (line.length()>2 && line.charAt(0)=='[' && line.charAt(line.length()-1)==']') { + line = line.substring(1,line.length()-1).trim().toLowerCase(); + if (line.length()>0) { + section = content.get(line); // section name + if (section == null) { + section = new HashMap(); + content.put(line, section); + } + } else { + section = null; + } + } else if (section != null && line.contains("=")) { //$NON-NLS-1$ + char c0 = Character.toLowerCase(line.charAt(0)); + if (c0 >= 'a' && c0 <= 'z') { + int pos = line.indexOf('='); + String key = line.substring(0,pos).trim().toLowerCase(); + String val = line.substring(pos+1).trim(); + section.put(key, val); + } + } + } + br.close(); + } catch (IOException e) { + LogHelper.logError(e); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsOptions.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsOptions.java new file mode 100644 index 0000000..7260654 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/sdk/XdsOptions.java @@ -0,0 +1,191 @@ +package com.excelsior.xds.core.sdk; + +/** + * Definition of XDS compiler options. + * + * Options control the process of compilation, including language extensions, + * run-time checks and code generation. An option can be set ON (TRUE) or OFF (FALSE). + */ +public interface XdsOptions +{ + /** + * Enable Oberon-2 language extensions. + */ + String O2EXTENSIONS = "O2EXTENSIONS"; //$NON-NLS-1$ + + /** + * Enable Oberon-2 scientific language extensions, including + * COMPLEX and LONGCOMPLEX types and the in-line exponentiation operator. + */ + String O2NUMEXT = "O2NUMEXT"; //$NON-NLS-1$ + + /** + * Enable XDS Modula-2 language extensions, such as line comment ("--"), + * read-only parameters, etc., to be used in the source code. + */ + String M2EXTENSIONS = "M2EXTENSIONS"; //$NON-NLS-1$ + + /** + * Enable a set of language extensions that makes the compiler more + * compatible with TopSpeed. + */ + String TOPSPEED = "TOPSPEED"; //$NON-NLS-1$ + + /** + * Enable C++ style comments. + */ + String CPPCOMMENTS = "CPPCOMMENTS"; //$NON-NLS-1$ + + /** + * Enable the ISO Modula-2 style pragmas <* *> to be used in Oberon-2. + */ + String O2ISOPRAGMA = "O2ISOPRAGMA"; //$NON-NLS-1$ + + /** + * Enable Modula-2 exceptions and finalization to be used in Oberon-2 programs, + * adding keywords EXCEPT, RETRY, and FINALLY. + */ + String O2ADDKWD = "O2ADDKWD"; //$NON-NLS-1$ + + /** + * Private option. Enable support of GOTO statement. + */ + String M2GOTO = "M2GOTO"; //$NON-NLS-1$ + + /** + * Disable generation BEGIN-part of module. + */ + String NOMODULEINIT = "NOMODULEINIT"; //$NON-NLS-1$ + + /** + * Enable K26 language restrictions + */ + String K26 = "K26"; //$NON-NLS-1$ + + /** + * Enable ASSERT checks + */ + String ASSERT = "ASSERT"; //$NON-NLS-1$ + + /** + * Enable dynarr index checks + */ + String CHECKDINDEX = "CHECKDINDEX"; //$NON-NLS-1$ + + /** + * DIV,MOD - positive divisor checks + */ + String CHECKDIV = "CHECKDIV"; //$NON-NLS-1$ + + /** + * Enable array index checks + */ + String CHECKINDEX = "CHECKINDEX"; //$NON-NLS-1$ + + /** + * Enable NIL pointer checks + */ + String CHECKNIL = "CHECKNIL"; //$NON-NLS-1$ + + /** + * Enable NIL procedure checks + */ + String CHECKPROC = "CHECKPROC"; //$NON-NLS-1$ + + /** + * Enable range checks + */ + String CHECKRANGE = "CHECKRANGE"; //$NON-NLS-1$ + + /** + * Enable set renge checks + */ + String CHECKSET = "CHECKSET"; //$NON-NLS-1$ + + /** + * Enable dynamic type checks + */ + String CHECKTYPE = "CHECKTYPE"; //$NON-NLS-1$ + + /** + * Enable cardinal overflow checks + */ + String COVERFLOW = "COVERFLOW"; //$NON-NLS-1$ + + /** + * Enable integer overflow checks + */ + String IOVERFLOW = "IOVERFLOW"; //$NON-NLS-1$ + + /** + * Enable float overflow checks + */ + String FOVERFLOW = "FOVERFLOW"; //$NON-NLS-1$ + + + /** + * Enable default ALLOCATE & DEAL. + */ + String STORAGE = "STORAGE"; //$NON-NLS-1$ + + /** + * Add SHORT and LONG types + */ + String M2ADDTYPES = "M2ADDTYPES"; //$NON-NLS-1$ + + /** + * Use 16-bits INTEGER,CARDINAL,BITSET + */ + String M2BASE16 = "M2BASE16"; //$NON-NLS-1$ + + /** + * Compare symbol files in Modula-2 + */ + String M2CMPSYM = "M2CMPSYM"; //$NON-NLS-1$ + + /** + * Enable browser + */ + String MAKEDEF = "MAKEDEF"; //$NON-NLS-1$ + + /** + * Browse: include all visible methods + */ + String BSCLOSURE = "BSCLOSURE"; //$NON-NLS-1$ + + /** + * Browse: include all redefined methods + */ + String BSREDEFINE = "BSREDEFINE"; //$NON-NLS-1$ + + /** + * Browse: sort by name + */ + String BSALPHA = "BSALPHA"; //$NON-NLS-1$ + + /** + * Permission to change symbol file + */ + String CHANGESYM = "CHANGESYM"; //$NON-NLS-1$ + + /** + * Oberon-2 main module + */ + String MAIN = "MAIN"; //$NON-NLS-1$ + + /** + * Preserve exported comments + */ + String XCOMMENTS = "XCOMMENTS"; //$NON-NLS-1$ + + /** + * Enable integer division by zero check + */ + String CHECKDZ = "CHECKDZ"; //$NON-NLS-1$ + + /** + * Enable type cast in the PIM style + */ + String PIMCAST = "PIMCAST"; //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileCreator.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileCreator.java new file mode 100644 index 0000000..b0ca4ca --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileCreator.java @@ -0,0 +1,89 @@ +package com.excelsior.xds.core.templates; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileWriter; +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.text.StrSubstitutor; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Path; + +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Methods for getting template file contents and creating new sources files from templates + * @author lsa80 + */ +public class SourceFileCreator { + private static final String RESOURCE_PLUGIN_FOLDER_LOCATION = "resources/newfiles/"; //$NON-NLS-1$ + + private SourceFileCreator() {} + + public static File createSourceFile(IProject project, SourceFileTemplate templateType, String moduleName, String relativeProjectPath) throws IOException, CoreException { + return createSourceFile(project, templateType, moduleName, relativeProjectPath, new HashMap()); + } + + public static File createSourceFile(IProject project, SourceFileTemplate templateType, String moduleName, + String relativeProjectPath, Map vars) throws IOException, CoreException { + + vars.put("eclipse.ide.modulename", moduleName); // - used for main module generation //$NON-NLS-1$ + + XdsProjectSettings xdsProjectSettings = XdsProjectSettingsManager.getXdsProjectSettings(project); + Sdk sdk = xdsProjectSettings.getProjectSdk(); + String template = getTemplateContent(sdk, templateType, vars); + + IContainer c = (IContainer)project.getParent().findMember(new Path(relativeProjectPath)); + File f = new File(FilenameUtils.concat(ResourceUtils.getAbsolutePath(c), moduleName + templateType.extension)); + FileWriter w = new FileWriter(f); + try{ + w.write(template); + } + finally{ + w.close(); + } + return f; + } + + public static String getTemplateContent(Sdk sdk , + SourceFileTemplate templateType, Map vars) + throws FileNotFoundException, IOException { + + InputStream resourceStream = null; + try{ + if (sdk != null) { + String path = sdk.getPropertyValue(templateType.sdkProperty); + if (StringUtils.isNotBlank(path) && new File(path).exists()) { + resourceStream = new FileInputStream(path); + } + } + + if (resourceStream == null) { + String templatePath = RESOURCE_PLUGIN_FOLDER_LOCATION + templateType.fileName; //$NON-NLS-1$ + resourceStream = ResourceUtils.getPluginResourceAsStream(ResourceUtils.getXdsResourcesPluginBundle(), templatePath); + } + + String template = IOUtils.toString(resourceStream); + StrSubstitutor sub = new StrSubstitutor(vars); + template = sub.replace(template); + return template; + } + finally{ + if (resourceStream != null) { + resourceStream.close(); + } + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileTemplate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileTemplate.java new file mode 100644 index 0000000..ff5f88d --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/templates/SourceFileTemplate.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.core.templates; + +import com.excelsior.xds.core.sdk.Sdk; + +/** + * Defines traits of the source template : + * template source file name, extension, related SDK property + */ +public enum SourceFileTemplate { + MAIN_MODULE("main.tmd", ".mod", Sdk.Property.XDS_MAIN_MOD_FILE),//$NON-NLS-1$ //$NON-NLS-2$ + DEFITION("new_def.tmd", ".def", Sdk.Property.XDS_TDEF_FILE),//$NON-NLS-1$ //$NON-NLS-2$ + IMPLEMENTATION("new_mod.tmd", ".mod", Sdk.Property.XDS_TMOD_FILE),//$NON-NLS-1$ //$NON-NLS-2$ + OBERON("new_ob2.tmd", ".ob2", Sdk.Property.XDS_TOB2_FILE);//$NON-NLS-1$ //$NON-NLS-2$ + + public final String fileName; + public final String extension; + public final Sdk.Property sdkProperty; + + private SourceFileTemplate(String fileName, String extension, Sdk.Property sdkProperty) { + this.fileName = fileName; + this.extension = extension; + this.sdkProperty = sdkProperty; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/FileAndPosition.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/FileAndPosition.java new file mode 100644 index 0000000..1e3cdc9 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/FileAndPosition.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.core.text; + +import java.io.File; + +/** + * The file and {@link TextPosition} inside + * @author lsa + */ +public class FileAndPosition { + private final File file; + private final TextPosition textPosition; + + public FileAndPosition(File file, TextPosition textPosition) { + this.file = file; + this.textPosition = textPosition; + } + + public File getFile() { + return file; + } + + public TextPosition getTextPosition() { + return textPosition; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/ITextRegion.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/ITextRegion.java new file mode 100644 index 0000000..11b9390 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/ITextRegion.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.core.text; + +/** + * A region in an indexed text store. A region is defined by its offset into + * the text store and its length. + *

+ * A region is considered a value object. Its offset and length do not change + * over time. + *

+ * Clients may implement this interface or use the standard implementation + * {@link com.excelsior.xds.core.text.TextRegion}. + *

+ */ +public interface ITextRegion +{ + /** + * Returns the length of the region. + * + * @return the length of the region + */ + int getLength(); + + /** + * Returns the offset of the region. + * + * @return the offset of the region + */ + int getOffset(); + + /** + * Returns true if this text region contains the specified position. + * + * @param position a position to be verified. + */ + public boolean contains(int position); + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncoding.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncoding.java new file mode 100644 index 0000000..4c8895a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncoding.java @@ -0,0 +1,190 @@ +package com.excelsior.xds.core.text; + +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.SequenceInputStream; +import java.nio.charset.Charset; +import java.nio.charset.UnsupportedCharsetException; + +import com.excelsior.xds.core.resource.EncodingUtils; + +public class TextEncoding { + private static final int DEFAULT_BUFFER_SIZE = 1024*32; + + /** + * maximum number of chars to examine when guessing the codepage. + */ + private static int MAX_CODEPAGE_GUESS_CHAR_COUNT = 1024 * 128; + + public enum CodepageId { + + CODEPAGE_1251("CP1251"), //$NON-NLS-1$ + CODEPAGE_866(EncodingUtils.DOS_ENCODING); //$NON-NLS-1$ + + final public String charsetName; + + private CodepageId (String name) { + charsetName = name; + } + + }; + + /** + * + * @param is - stream to read file contents from + * @return CodepageId (or null if the determined CP is not supported) + */ + private static CodepageId determineCodepage (InputStream is) throws IOException { + int cnt1251 = 0; + int cnt866 = 0; + + byte buf[] = new byte[32768]; + int len; + + try{ + while ((len = is.read(buf)) >= 0) { + for (int i=0; i= 0x80 && ch <= 0xAF || // 'A'..'ï' + ch >= 0xE0 && ch <= 0xEF || // 'ð'..'ÿ' + ch == 0xB3 || ch == 0xBA ) // '|' or '||' + { + ++cnt866; + } + if(ch >= 0xC0) { // 'A'... + ++cnt1251; + } + } + } + } + finally{ + is.close(); + } + + CodepageId codepage = (cnt866 >= cnt1251) ? CodepageId.CODEPAGE_866 + : CodepageId.CODEPAGE_1251; + try { + Charset.forName(codepage.charsetName); + } catch (Exception e) { + codepage = null; + } + + return codepage; + } + + /** + * @param f file to read + * @param sb (out) StringBuilder to read file in or null to determine codepage only + * @param cpId (out) if cpId != null in cpId[0] returns determined codepage or NULL when the determoned codepage is not supported in jvm + * @return false when I/O error occured, true means that 'sb' contains file content + * @throws IOException + * @throws FileNotFoundException + */ + public static void readFileAndCodepage(File f, StringBuilder sb, CodepageId cpId[]) throws FileNotFoundException, IOException { + try(FileInputStream fis = new FileInputStream(f)){ + readFileAndCodepage(fis, sb, cpId); + } + } + + /** + * First {@link #MAX_CODEPAGE_GUESS_CHAR_COUNT} bytes of the {@link is} are used to determine code page + * @param is input stream to read file from + * @param sb (out) StringBuilder to read file in or null to determine codepage only + * @param cpId (out) if cpId != null in cpId[0] returns determined codepage or NULL when the determoned codepage is not supported in jvm + * @return contents of the file + * @throws IOException + */ + public static void readFileAndCodepage(InputStream is, StringBuilder sb, CodepageId cpId[]) throws IOException { + CodepageId cpi = null; + byte[] streamBytes = new byte[MAX_CODEPAGE_GUESS_CHAR_COUNT]; + int prefixSize = is.read(streamBytes); + if (prefixSize > 0) { + cpi = determineCodepage(new ByteArrayInputStream(streamBytes, 0, prefixSize)); // may be null + } + + if (sb != null && prefixSize > 0) { + Charset cs; + try { + cs = Charset.forName(cpi.charsetName); + } catch (UnsupportedCharsetException e) { + cs = Charset.defaultCharset(); + cpi = null; + } + InputStream compositeStream = new SequenceInputStream(new ByteArrayInputStream(streamBytes, 0, prefixSize), is); + InputStreamReader ir = new InputStreamReader(compositeStream, cs); + + try{ + char buf[] = new char[DEFAULT_BUFFER_SIZE]; + int len; + while((len = ir.read(buf)) >= 0) { + sb.append(buf, 0, len); + } + } + finally{ + ir.close(); + } + } + if (cpId != null) { + cpId[0] = cpi; + } + } + + + public static InputStreamReader getInputStreamReader (File file) throws IOException { + FileInputStream fis = new FileInputStream(file); + return getInputStreamReader(fis); + } + + private static InputStreamReader getInputStreamReader (InputStream is) throws IOException { + byte[] streamBytes = new byte[MAX_CODEPAGE_GUESS_CHAR_COUNT]; + int prefixSize = is.read(streamBytes); + + InputStream resultStream; + Charset cs; + if (prefixSize > 0) { + CodepageId codepage = determineCodepage(new ByteArrayInputStream(streamBytes, 0, prefixSize)); + cs = Charset.forName(codepage.charsetName); + resultStream = new SequenceInputStream(new ByteArrayInputStream(streamBytes, 0, prefixSize), is); + } + else { + resultStream = new ByteArrayInputStream(new byte[0]); + cs = Charset.defaultCharset(); + } + + return new InputStreamReader(resultStream, cs); + } + + /** + * + * @param codepageName - name like "CP866", "Cp1251" etc. May be null (will return false). + * @return true if this encoding is supported + */ + public static boolean isCodepageSupported(String codepageName) { + try { + Charset.forName(codepageName); + } catch (UnsupportedCharsetException e) { + return false; + } + return true; + } + + /** + * + * @param preferredCodepageName - name like "CP866", "Cp1251" etc. + * @return charset to use (charset for this name or Default charset when can't resolve the name) + */ + public static Charset whatCharsetToUse(String preferredCodepageName) { + try { + return Charset.forName(preferredCodepageName); + } + catch (UnsupportedCharsetException e) { + } + return Charset.defaultCharset(); + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncodingContentDescriber.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncodingContentDescriber.java new file mode 100644 index 0000000..6951bfb --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextEncodingContentDescriber.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.core.text; + +import java.io.IOException; +import java.io.InputStream; + +import org.eclipse.core.internal.content.TextContentDescriber; +import org.eclipse.core.runtime.content.IContentDescription; + +/** + * This class provides common basis for text-based content describers + * with encoding autodetect. + */ + +@SuppressWarnings("restriction") +public class TextEncodingContentDescriber extends TextContentDescriber { + + public TextEncodingContentDescriber() { + } + + /* + * Mod, def,... files encoding is determined here and in ModulaDocumentProvider.getPersistedEncoding(). + * + * This describe() is called when file is added to eclipse project from file system, not via XDS + * compilation set list. The encoding determined here will be cached and getPersistedEncoding() + * will return it as is when editor will be opened. + */ + @Override + public int describe(InputStream contents, IContentDescription description) throws IOException { + // here will be read only 1 byte - (used to define endianness) + return super.describe(contents, description); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextPosition.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextPosition.java new file mode 100644 index 0000000..9d7e670 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextPosition.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.core.text; + +/** + * A text position is considered a value object. Its offset and length do not + * change over time. + */ +public class TextPosition +{ + /** source char line number */ + private final int line; + + /** source char column */ + private final int column; + + /** source char offset in the source text */ + private final int offset; + + public TextPosition (int line, int column, int offset) { + this.line = line; + this.column = column; + this.offset = offset; + } + + /** @return source char line number */ + public int getLine() { + return line; + } + + /** @return source char column */ + public int getColumn() { + return column; + } + + /** @return source char offset in the source text */ + public int getOffset() { + return offset; + } + + @Override + public String toString() { + return "TokenPosition [line=" + line + ", column=" + column + + ", offset=" + offset + "]"; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextRegion.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextRegion.java new file mode 100644 index 0000000..7bb88c0 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextRegion.java @@ -0,0 +1,78 @@ +package com.excelsior.xds.core.text; + +/** + * The default implementation of the {@link com.excelsior.xds.core.text.ITextRegion} + * interface. + */ +public class TextRegion implements ITextRegion +{ + /** The text region offset */ + private int offset; + /** The text region length */ + private int length; + + /** + * Create a new text region. + * + * @param offset the offset of the text region + * @param length the length of the text region + */ + public TextRegion(int offset, int length) { + this.offset = offset; + this.length = length; + } + + /** + * {@inheritDoc} + */ + @Override + public int getOffset() { + return offset; + } + + /** + * {@inheritDoc} + */ + @Override + public int getLength() { + return length; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean contains(int position) { + return (offset <= position) && (position < offset + getLength()); + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean equals(Object o) { + if (o instanceof ITextRegion) { + ITextRegion r= (ITextRegion) o; + return r.getOffset() == offset && r.getLength() == length; + } + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() { + return (offset << 24) | (length << 16); + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "offset: " + offset + ", length: " + length; //$NON-NLS-1$ //$NON-NLS-2$; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextUtils.java new file mode 100644 index 0000000..5c5db9b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/text/TextUtils.java @@ -0,0 +1,70 @@ +package com.excelsior.xds.core.text; + +import java.util.regex.Pattern; + +public final class TextUtils { + public final static String NEW_LINE = System.getProperty("line.separator"); //$NON-NLS-1$ + + private static final Pattern PATTERN_BACK_SLASH = Pattern.compile("\\\\"); //$NON-NLS-1$ + + private static final Pattern PATTERN_QUESTION = Pattern.compile("\\?"); //$NON-NLS-1$ + + private static final Pattern PATTERN_STAR = Pattern.compile("\\*"); //$NON-NLS-1$ + + private static final Pattern PATTERN_LBRACKET = Pattern.compile("\\("); //$NON-NLS-1$ + + private static final Pattern PATTERN_RBRACKET = Pattern.compile("\\)"); //$NON-NLS-1$ + + /* + * Converts user string to regular expres '*' and '?' to regEx variables. + * + */ + private static String asRegEx(String pattern, boolean group) { + // Replace \ with \\, * with .* and ? with . + // Quote remaining characters + String result1 = PATTERN_BACK_SLASH.matcher(pattern).replaceAll("\\\\E\\\\\\\\\\\\Q"); //$NON-NLS-1$ + String result2 = PATTERN_STAR.matcher(result1).replaceAll("\\\\E.*\\\\Q"); //$NON-NLS-1$ + String result3 = PATTERN_QUESTION.matcher(result2).replaceAll("\\\\E.\\\\Q"); //$NON-NLS-1$ + if (group) { + result3 = PATTERN_LBRACKET.matcher(result3).replaceAll("\\\\E(\\\\Q"); //$NON-NLS-1$ + result3 = PATTERN_RBRACKET.matcher(result3).replaceAll("\\\\E)\\\\Q"); //$NON-NLS-1$ + } + return "\\Q" + result3 + "\\E"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + /** + * Creates a regular expression pattern from the pattern string (which is + * our old 'StringMatcher' format). + * + * @param pattern + * The search pattern + * @param isCaseSensitive + * Set to true to create a case insensitve pattern + * @return The created pattern + */ + public static Pattern createPattern(String pattern, boolean isCaseSensitive) { + if (isCaseSensitive) + return Pattern.compile(asRegEx(pattern, false)); + return Pattern.compile(asRegEx(pattern, false), Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE); + } + + /** + * Returns double-quoted input text if input text contains spaces + * @param text + * @return + */ + public static String enquoteIfHasSpace(String text) { + if (Pattern.compile("\\s+").matcher(text).find()) { //$NON-NLS-1$ + return String.format("\"%s\"", text); //$NON-NLS-1$ + } + else { + return text; + } + } + + /** + * Only static methods are allowed + */ + private TextUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTask.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTask.java new file mode 100644 index 0000000..825b0bd --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTask.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.core.todotask; + +public class TodoTask +{ + public final String tag; + public final TodoTaskPriority priority; + + TodoTask(String tag, TodoTaskPriority priority) { + this.tag = tag; + this.priority = priority; + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskManager.java new file mode 100644 index 0000000..869be26 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskManager.java @@ -0,0 +1,74 @@ +package com.excelsior.xds.core.todotask; + + +/** + * @noextend This class is not intended to be subclassed by clients. + * + *
+ * RECOGNIZED OPTIONS:
+ * Define the Automatic Task Tags
+ *    When the tag list is not empty, indexer will issue a task marker whenever it encounters
+ *    one of the corresponding tags inside any comment in source code.
+ *    Generated task messages will include the tag, and range until the next line separator or comment ending.
+ *    Note that tasks messages are trimmed. If a tag is starting with a letter or digit, then it cannot be leaded by
+ *    another letter or digit to be recognized ("fooToDo" will not be recognized as a task for tag "ToDo", but "foo#ToDo"
+ *    will be detected for either tag "ToDo" or "#ToDo"). Respectively, a tag ending with a letter or digit cannot be followed
+ *    by a letter or digit to be recognized ("ToDofoo" will not be recognized as a task for tag "ToDo", but "ToDo:foo" will
+ *    be detected either for tag "ToDo" or "ToDo:").
+ * 
+ * Define the Automatic Task Priorities
+ *    In parallel with the Automatic Task Tags, this list defines the priorities (high, normal or low)
+ *    of the task markers issued by the translation.
+ */
+public class TodoTaskManager
+{
+    /**
+     * Thread-safe singleton support.
+     */
+    public static TodoTaskManager getInstance(){
+        return TodoTaskManagerHolder.INSTANCE;
+    }
+    
+    /**
+     * Returns a default "to do" tasks.
+     * 
+     * @return a default "to do" tasks
+     */
+    public TodoTask getDefaultTask() {
+        return DEFAULT_TODO_TASK;
+    }
+    
+    /**
+     * Returns an array of all registered "to do" tasks.
+     * 
+     * @return an array containing the registered "to do" tasks.
+     */
+    public TodoTask[] getAllTasks() {
+        return DEFAULT_TODO_TASKS;
+    }
+
+    /**
+     * Returns the case-sensitivity of the "to do" task tags.
+     * 
+     * @return @true if "to do" task tags are case-sensitive, @false otherwise. 
+     */
+    public boolean isCaseSensitive() {
+        return true;
+    }
+    
+    
+    private static final TodoTask DEFAULT_TODO_TASK = 
+        new TodoTask("TODO",  TodoTaskPriority.Normal);    //$NON-NLS-1$ 
+    
+    private static final TodoTask DEFAULT_TODO_TASKS[] = new TodoTask[]{
+        DEFAULT_TODO_TASK,
+        new TodoTask("FIXME", TodoTaskPriority.Hight),     //$NON-NLS-1$
+        new TodoTask("XXX",  TodoTaskPriority.Low)         //$NON-NLS-1$
+    }
+    ; 
+
+    private static class TodoTaskManagerHolder {
+        static TodoTaskManager INSTANCE = new TodoTaskManager();
+    }
+    
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskMarkerManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskMarkerManager.java
new file mode 100644
index 0000000..41ed2af
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskMarkerManager.java
@@ -0,0 +1,116 @@
+package com.excelsior.xds.core.todotask;
+
+import org.eclipse.core.resources.IMarker;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+
+import com.excelsior.xds.core.text.TextPosition;
+
+/**
+ * This class manages creation and registration of 'to-do' tasks' markers.
+ *   
+ * @noextend This class is not intended to be subclassed by clients.
+ */
+public final class TodoTaskMarkerManager
+{
+    private TodoTaskMarkerManager() {
+	}
+
+	/**
+     * Creates and returns the "to do" task marker with the specified position 
+     * on the given resource. 
+     * 
+     * @param project a project to operate on, must not be null
+     * @param file a source file in which the task takes place or null
+     * @param task instance of discovered task.
+     * @param message text of the task
+     * @param position a start position of the task
+     * @param endOffset a end offset of the task
+     * 
+     * @return the handle of the new marker. 
+     */
+    public static IMarker createMarker( IResource resource
+                                      , TextPosition position, int endOffset 
+                                      , TodoTask task, String message
+                                      ) throws CoreException
+    {
+        IMarker marker = resource.createMarker(IMarker.TASK);
+        marker.setAttribute(IMarker.MESSAGE,     createMessage(task, message));
+        marker.setAttribute(IMarker.PRIORITY,    task.priority.markerPriority);
+        marker.setAttribute(IMarker.LINE_NUMBER, position.getLine());
+        marker.setAttribute(IMarker.CHAR_START,  position.getOffset());
+        marker.setAttribute(IMarker.CHAR_END,    endOffset);
+        marker.setAttribute(IMarker.USER_EDITABLE, Boolean.FALSE);
+        
+        return marker;
+    }
+
+    /**
+     * Creates and returns the "to do" task marker with the specified position 
+     * on the given file. All previous markers with position up to the given will
+     * be removed. 
+     * 
+     * @param project a project to operate on, must not be null
+     * @param file a source file in which the task takes place or null
+     * @param task instance of discovered task.
+     * @param message text of the task
+     * @param position a start position of the task
+     * @param endOffset a end offset of the task
+     * @param oldMarkers markers from the previous parsing to be reused or removed.
+     * 
+     * @return the handle of the new marker, or null if marker wasn't created. 
+     */
+    public static IMarker updateMarkers( IResource resource
+                                       , TextPosition position, int endOffset 
+                                       , TodoTask task, String message
+                                       , IMarker[] oldMarkers
+                                       ) throws CoreException 
+    {
+        int startOffs = position.getOffset();
+        IMarker newMarker = null;
+        String newMessage = createMessage(task, message);
+        
+        // Remove or reuse 'to-do' markers from previous parsing
+        for (int i = 0; i < oldMarkers.length; ++i) {
+            IMarker marker = oldMarkers[i];
+            if (marker != null) {
+                int markerOffs = marker.getAttribute(IMarker.CHAR_START, 0);
+                if (markerOffs <= startOffs) {
+                	// to remove all editable markers
+                	boolean isMarkerNotEditable = Boolean.FALSE.equals(marker.getAttribute(IMarker.USER_EDITABLE));
+                    boolean isMarkerEqual = (markerOffs == startOffs)
+                                         && newMessage.equals(marker.getAttribute(IMarker.MESSAGE, null))
+                                         && isMarkerNotEditable;
+                    if (isMarkerEqual) {
+                        newMarker = marker;  // reuse the marker from previous parsing
+                    } else {
+                        marker.delete();
+                    }
+                    oldMarkers[i] = null;
+                }
+            }
+        }
+        
+        if (newMarker == null) {          
+            newMarker = createMarker(resource, position, endOffset, task, message);
+        }
+
+        return newMarker;
+    }
+
+    /**
+     * Returns all markers of the specified type on this resource, and on its 
+     * children. Returns an empty array if there are no matching markers.
+     * 
+     * @param resource a resource to operate on, must not be null
+     * @throws CoreException 
+     */    
+    public static IMarker[] findMarkers(IResource resource) throws CoreException 
+    {
+        return resource.findMarkers(IMarker.TASK, true, IResource.DEPTH_INFINITE);
+    }
+    
+    private static String createMessage(TodoTask task, String message) {
+        return task.tag + " " + message;     //$NON-NLS-1$
+    }
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskPriority.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskPriority.java
new file mode 100644
index 0000000..130dc2e
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/todotask/TodoTaskPriority.java
@@ -0,0 +1,32 @@
+package com.excelsior.xds.core.todotask;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.resources.IMarker;
+
+/**
+ * Possible priority of "to do" tasks.  
+ */
+public enum TodoTaskPriority
+{
+    Hight ("high",   IMarker.PRIORITY_HIGH),
+    Normal("normal", IMarker.PRIORITY_NORMAL) ,
+    Low   ("low",    IMarker.PRIORITY_LOW);
+
+    private final String id;
+    public  final int markerPriority;
+    
+    private TodoTaskPriority(String id, int markerPriority) {
+        this.id = id;
+        this.markerPriority = markerPriority; 
+    }
+    
+    public static final Map ID_TO_PRIORITY = new HashMap();
+    static {
+        for (TodoTaskPriority priority: TodoTaskPriority.values()) {
+            ID_TO_PRIORITY.put(priority.id, priority);
+        }
+    };
+    
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IEnablementHandler.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IEnablementHandler.java
new file mode 100644
index 0000000..9b3b3e6
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IEnablementHandler.java
@@ -0,0 +1,5 @@
+package com.excelsior.xds.core.tool;
+
+public interface IEnablementHandler {
+	boolean isEnabled();
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/ITool.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/ITool.java
new file mode 100644
index 0000000..021bc92
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/ITool.java
@@ -0,0 +1,20 @@
+package com.excelsior.xds.core.tool;
+
+import java.util.List;
+
+import org.eclipse.core.resources.IResource;
+
+import com.excelsior.xds.core.console.IXdsConsole;
+
+public interface ITool {
+    
+    String getName();
+    
+    String getLocation();
+
+    boolean isEnabled(List resources);
+	
+	void invoke(List resources, IXdsConsole console);
+	
+	void addListener(IToolListener listener);
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IToolListener.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IToolListener.java
new file mode 100644
index 0000000..b05d0f8
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/IToolListener.java
@@ -0,0 +1,5 @@
+package com.excelsior.xds.core.tool;
+
+public interface IToolListener {
+	void finished();
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/RefreshPolicy.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/RefreshPolicy.java
new file mode 100644
index 0000000..d9a4164
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/RefreshPolicy.java
@@ -0,0 +1,6 @@
+package com.excelsior.xds.core.tool;
+
+public enum RefreshPolicy {
+	REFRESH_CONTAINER, // refresh container of the affected resource
+	REFRESH_PROJECT // refresh project of the affected resource
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XTool.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XTool.java
new file mode 100644
index 0000000..9edf4f7
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XTool.java
@@ -0,0 +1,343 @@
+package com.excelsior.xds.core.tool;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CopyOnWriteArrayList;
+
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.collections.MapUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.lang.StringUtils;
+import org.apache.commons.lang.text.StrTokenizer;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Status;
+
+import com.excelsior.xds.core.console.ColorStreamType;
+import com.excelsior.xds.core.console.IXdsConsole;
+import com.excelsior.xds.core.console.IXdsConsoleTerminateCallback;
+import com.excelsior.xds.core.internal.nls.Messages;
+import com.excelsior.xds.core.log.LogHelper;
+import com.excelsior.xds.core.process.InputStreamListener;
+import com.excelsior.xds.core.process.InputStreamObserver;
+import com.excelsior.xds.core.project.XdsProjectSettings;
+import com.excelsior.xds.core.project.XdsProjectSettingsManager;
+import com.excelsior.xds.core.project.XdsProjectType;
+import com.excelsior.xds.core.resource.ResourceUtils;
+import com.excelsior.xds.core.sdk.Sdk;
+import com.excelsior.xds.core.sdk.SdkTool;
+import com.excelsior.xds.core.variables.VariableUtils;
+
+/**
+ * Tool which invokes the specified SDK tool file on given resource elements
+ * @author lsa80
+ */
+public class XTool implements ITool {
+    private SdkTool toolDesc;
+    private XdsProjectType xdsProjectType;
+    private boolean terminated;
+    
+	private List listeners = new CopyOnWriteArrayList(); 
+	private boolean isConsoleButtonEnabled;
+	
+	XTool(SdkTool toolDesc) 
+	{
+	    Assert.isTrue(!toolDesc.isSeparator(), "XTool() is called for separator"); //$NON-NLS-1$
+	    this. toolDesc = toolDesc;
+
+	    switch (toolDesc.getSourceRoot()) {
+		case PRJ_FILE:
+		    this.xdsProjectType = XdsProjectType.PROJECT_FILE;
+		    break;
+		case MAIN_MODULE:
+		    this.xdsProjectType = XdsProjectType.MAIN_MODULE;
+		    break;
+		default:
+		    this.xdsProjectType = null;
+		}
+	}
+	
+    @Override
+    public String getName() {
+        return toolDesc.getToolName();
+    }
+    
+    @Override
+    public String getLocation() {
+        return toolDesc.getLocation();
+    }
+	
+	@Override
+	public boolean isEnabled(List resources) {
+		try {
+	        resources = filterResList(resources);
+	        
+	        if (resources.isEmpty()) {
+	            return false; // no resource(s) to process
+	        }
+	        
+	        // check tools working dir(s):
+	        HashSet prjs = new HashSet();
+	        for (IResource r : resources) {
+	            prjs.add(r.getProject());
+	        }
+	        for (IProject p : prjs) {
+	            XdsProjectSettings settings = XdsProjectSettingsManager.getXdsProjectSettings(p);
+	            String dir = toolDesc.getWorkingDirectory(settings.getProjectType());
+	            if (!StringUtils.isBlank(dir)) {
+	                if (dir.contains("$")) { //$NON-NLS-1$
+//	                    IValueVariable context = VariableUtils.setResolveContext(p);
+	                    dir = VariableUtils.performStringSubstitution(p, dir);
+//	                     VariableUtils.removeResolveContext(context);
+	                }
+	                if (!new File(dir).isDirectory()) {
+	                    return false; // bad work dir
+	                }
+	            }
+	        }
+        } catch (CoreException e) {
+            return false;
+        }
+		return true;
+	}
+	
+	private List filterResList(List resources) {
+	    
+        // drop resources w/o MODULA2_SOURCE_PROJECT_NATURE_ID project
+        resources = ResourceUtils.applyXdsResourcesFilter(resources);
+
+        // drop resources w/o required extensions (if any)
+        if (!CollectionUtils.isEmpty(toolDesc.getFileExtensionsList())) {
+            ArrayList resWithExt = new ArrayList(); 
+            HashSetextensionsToRunOn = new HashSet(toolDesc.getFileExtensionsList());
+            for (IResource r : resources) {
+                String ext = FilenameUtils.getExtension(ResourceUtils.getAbsolutePath(r)).toLowerCase();
+                if (extensionsToRunOn.contains(ext)) {
+                    resWithExt.add(r);
+                }
+            }
+            resources = resWithExt;
+        }
+
+        // drop resources w/o required project type (if any)
+        if (xdsProjectType != null) {
+            ArrayList resWithPT = new ArrayList(); 
+            for (IResource r : resources) {
+                XdsProjectSettings settings = XdsProjectSettingsManager.getXdsProjectSettings(r.getProject());
+                if (settings.getProjectType() == xdsProjectType) {
+                    resWithPT.add(r);
+                }
+            }
+            resources = resWithPT;
+        }
+
+        return resources;
+	}
+	
+	/* XTool expects that all resources are from the same project  
+	 */
+	@Override
+	public void invoke(List resources, final IXdsConsole console) {
+		final List resToProcess = filterResList(resources);
+        isConsoleButtonEnabled = false;
+        new Thread(new Runnable() {
+            @Override
+            public void run() {
+                String str = String.format("%s [%s: %s]", toolDesc.getSdk().getName(), Messages.ConsoleType_XDS_Tool, getName()); //$NON-NLS-1$
+                console.println(str, ColorStreamType.SYSTEM);
+//                IValueVariable context = null;
+                try {
+                    terminated = false;
+                    boolean first = true;
+                    for (IResource r : resToProcess) {
+                        if (!first) {
+                            console.println("--------------------------------------", ColorStreamType.SYSTEM); //$NON-NLS-1$
+                        }
+                        first = false;
+//                        context = VariableUtils.setResolveContext(r.getProject());
+                        invokeOne(r, console);
+//                        VariableUtils.removeResolveContext(context);
+//                        context = null;
+                        if (terminated) {
+                            console.println("--------------------------------------", ColorStreamType.SYSTEM); //$NON-NLS-1$
+                            console.println(Messages.XTool_ToolTerminated, ColorStreamType.SYSTEM);
+                            break;
+                        }
+                    }
+                } catch (InterruptedException e) {
+                } catch (CoreException e) {
+                    console.println(e.getStatus().getMessage(), ColorStreamType.ERROR);
+                    return;
+                } catch (IOException e) {
+                    LogHelper.logError(e);
+                }
+                finally{
+//                    if (context != null) {
+//                        VariableUtils.removeResolveContext(context);
+//                    }
+                    notifyListenersFinished();
+                    console.enableTerminateButton(false);
+                    console.setTerminateCallback(null);
+                }
+            }
+        }, "XTool.waitForProcessToTerminateAndDisableButton Observer").start(); //$NON-NLS-1$
+        
+	    
+	}
+	    
+	public void invokeOne(IResource resource, final IXdsConsole console) throws InterruptedException, CoreException, IOException {
+	    Sdk sdk = toolDesc.getSdk();
+	    XdsProjectSettings settings = XdsProjectSettingsManager.getXdsProjectSettings(resource.getProject());
+	    String toolexe = getLocation();
+
+	    if (!new File(toolexe).isFile()) {
+	        throw new CoreException(LogHelper.createStatus(Status.ERROR, Status.ERROR, 
+	                Messages.XTool_ToolFileNotFound + toolexe + "'", null)); //$NON-NLS-1$
+	    }
+
+	    List cmdlst = new ArrayList();
+	    cmdlst.add('"' + toolexe + '"');     //$NON-NLS-1$  //$NON-NLS-2$
+	    StringBuilder sb = new StringBuilder();
+	    if (toolexe.contains(" ")) { //$NON-NLS-1$
+	        sb.append('"').append(toolexe).append('"');
+	    } else {
+            sb.append(toolexe);
+	    }
+
+	    String arr[] = new StrTokenizer(VariableUtils.performStringSubstitution(resource.getProject(), toolDesc.getArguments(settings.getProjectType())), ' ', '"').getTokenArray();
+	    for (String s : arr) {
+	        cmdlst.add(s);
+	        sb.append(' ');
+	        if (s.contains(" ")) { //$NON-NLS-1$
+	            sb.append('"').append(s).append('"');
+	        } else {
+	            sb.append(s);
+	        }
+	    }
+	    console.println(sb.toString() + "\n", ColorStreamType.SYSTEM); //$NON-NLS-1$
+
+	    final ProcessBuilder builder = new ProcessBuilder(cmdlst);
+
+	    Map envs = sdk.getEnvironmentVariables();
+	    if (!MapUtils.isEmpty(envs)) {
+	        // case-insensitive remove from builder.environment() variables to be redefined:
+	        HashSet hsNewNames = new HashSet();
+	        for (String s : envs.keySet()) {
+	            hsNewNames.add(s.toLowerCase());
+	        }
+	        Set oldset = new HashSet();
+	        oldset.addAll(builder.environment().keySet());
+	        for (String s : oldset) {
+	            if (hsNewNames.contains(s.toLowerCase())) {
+	                builder.environment().remove(s);
+	            }
+	        }
+	        // [re]define variables:
+	        builder.environment().putAll(envs);
+	    }
+
+	    String actualWorkingDir = toolDesc.getWorkingDirectory(settings.getProjectType());
+	    if (!StringUtils.isBlank(actualWorkingDir)) {
+	        actualWorkingDir = VariableUtils.performStringSubstitution(actualWorkingDir);
+	    } else {
+	        actualWorkingDir = ResourceUtils.getAbsolutePath(resource.getProject());
+	    }
+
+	    if (!new File(actualWorkingDir).isDirectory()) {
+	        throw new CoreException(LogHelper.createStatus(Status.ERROR, Status.ERROR, 
+	                Messages.XTool_BadWorkDir + actualWorkingDir + "'", null)); //$NON-NLS-1$
+	    }
+	    builder.directory(new File(actualWorkingDir));
+
+	    final Process process = builder.start();
+
+	    console.setEncoding(toolDesc.getPropertyValue(SdkTool.Property.CONSOLE_CODEPAGE)); // invalid values treats as system default codepage
+
+	    OutObserver oo = new OutObserver();
+	    oo.observeStdoutAndStderr(console, process);
+
+	    console.setTerminateCallback(new IXdsConsoleTerminateCallback() {
+			@Override
+			public void terminate() {
+				 terminated = true;
+		         process.destroy();
+			}
+		});
+	    enableConsoleButton(console);
+
+	    process.waitFor();
+	    oo.waitFor();
+        console.setEncoding(null);
+	}
+	
+	private class OutObserver {
+        InputStreamObserver stdinObserver;
+        InputStreamObserver stErrObserver;
+
+	    public void observeStdoutAndStderr(final IXdsConsole console,
+	            final Process process) throws IOException {
+	        stdinObserver = observeStream(console, ColorStreamType.NORMAL, process.getInputStream(), 1024);
+	        stErrObserver = observeStream(console, ColorStreamType.ERROR, process.getErrorStream(), 1024);
+	        stdinObserver.start();
+	        stErrObserver.start();
+	    }
+	    
+	    public void waitFor() {
+	        try {
+	            stdinObserver.join();
+	            stErrObserver.join();
+	        } catch (Exception e) {}
+	    }
+	    
+	}
+
+	@Override
+	public void addListener(IToolListener listener) {
+		listeners.add(listener);
+	}
+	
+	private void enableConsoleButton(IXdsConsole console) {
+		synchronized(console) {
+			if (!isConsoleButtonEnabled) {
+				console.enableTerminateButton(true);
+				isConsoleButtonEnabled = true;
+			}
+		}
+	}
+
+	private InputStreamObserver observeStream(final IXdsConsole reportConsole, final ColorStreamType reportColorStreamType, InputStream inputStream, int bufferSize ) {
+		InputStreamObserver streamObserver = new InputStreamObserver(inputStream, bufferSize);
+		final OutputStream consoleStream = reportConsole.getConsoleStream(reportColorStreamType);
+		streamObserver.addListener(new InputStreamListener() {
+			@Override
+			public void onHasData(byte[] buffer, int length) {
+				try {
+					consoleStream.write(buffer, 0, length);
+					consoleStream.flush();
+				} catch (IOException e) {
+					LogHelper.logError(e);
+				}
+			}
+
+			@Override
+			public void onEndOfStreamReached() {
+			}
+		});
+		return streamObserver;
+	}
+
+	private void notifyListenersFinished() {
+		for (IToolListener listener : listeners) {
+			listener.finished();
+		}
+	}
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XToolFactory.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XToolFactory.java
new file mode 100644
index 0000000..fbe1f96
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/tool/XToolFactory.java
@@ -0,0 +1,11 @@
+package com.excelsior.xds.core.tool;
+
+import com.excelsior.xds.core.sdk.SdkTool;
+
+public class XToolFactory {
+    
+	public static ITool createFrom(SdkTool toolDesc) {
+		return new XTool(toolDesc);
+	}
+	
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/RepositoryUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/RepositoryUtils.java
new file mode 100644
index 0000000..8fbc7ae
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/RepositoryUtils.java
@@ -0,0 +1,111 @@
+package com.excelsior.xds.core.updates;
+
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.IProvisioningAgentProvider;
+import org.eclipse.equinox.p2.core.ProvisionException;
+import org.eclipse.equinox.p2.repository.IRepositoryManager;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepository;
+import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepository;
+import org.eclipse.equinox.p2.repository.metadata.IMetadataRepositoryManager;
+import org.osgi.framework.ServiceReference;
+
+import com.excelsior.xds.core.XdsCorePlugin;
+import com.excelsior.xds.core.log.LogHelper;
+
+public final class RepositoryUtils {
+	private RepositoryUtils() {
+		super();
+	}
+
+	@SuppressWarnings({ "rawtypes", "unchecked" })
+	public static void addUpdateSite(String url) {
+		try {
+			ServiceReference serviceReference = XdsCorePlugin.getContext().getServiceReference(IProvisioningAgentProvider.SERVICE_NAME);
+			if (serviceReference == null)
+				return;
+			IProvisioningAgentProvider agentProvider = (IProvisioningAgentProvider) XdsCorePlugin
+					.getContext().getService(serviceReference);
+			if (agentProvider == null) {
+				LogHelper.logError("Cannot get provisioning service"); //$NON-NLS-1$
+				return;
+			}
+			// if null provided, the provisioning agent for the currently
+			// running
+			// system is returned, if available
+			IProvisioningAgent provisioningAgent = agentProvider
+					.createAgent(null);
+			if (provisioningAgent == null) {
+				LogHelper.logError("Cannot create provisioning agent"); //$NON-NLS-1$
+				return;
+			}
+
+			// Load repository manager
+			IMetadataRepositoryManager metaManager = (IMetadataRepositoryManager) provisioningAgent
+					.getService(IMetadataRepositoryManager.SERVICE_NAME);
+			if (metaManager == null) {
+				LogHelper.logError("Cannot get service : " + IMetadataRepositoryManager.SERVICE_NAME); //$NON-NLS-1$
+				return;
+			}
+
+			// Load artifact manager
+			IArtifactRepositoryManager artifactManager = (IArtifactRepositoryManager) provisioningAgent
+					.getService(IArtifactRepositoryManager.SERVICE_NAME);
+			if (artifactManager == null) {
+				LogHelper.logError("Cannot get service : " + IArtifactRepositoryManager.SERVICE_NAME); //$NON-NLS-1$
+				return;
+			}
+
+			// create a new repository
+			URI repoUri = new URI(url);
+
+			if (!metaManager.contains(repoUri)) {
+				IMetadataRepository metaRepo = null;
+				boolean loaded = false;
+				try {
+					metaRepo = metaManager.loadRepository(repoUri, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE , null);
+					loaded = true;
+				} catch (ProvisionException e) {
+					//expected - fall through and create the new repository
+				}
+				if (!loaded) {
+					metaRepo = metaManager.createRepository(
+							repoUri, "Metadata desc here", //$NON-NLS-1$
+							IMetadataRepositoryManager.TYPE_COMPOSITE_REPOSITORY,
+							null);
+					metaManager.addRepository(metaRepo.getLocation());
+				}
+			}
+
+			if (!artifactManager.contains(repoUri)) {
+				IArtifactRepository aftifacts = null;
+				boolean loaded = false;
+				try {
+					aftifacts = artifactManager.loadRepository(repoUri, IRepositoryManager.REPOSITORY_HINT_MODIFIABLE , null);
+					loaded = true;
+				} catch (ProvisionException e) {
+					//expected - fall through and create the new repository
+				}
+				if (!loaded) {
+					aftifacts = artifactManager
+							.createRepository(
+									repoUri,
+									"Artifact desc here", //$NON-NLS-1$
+									IArtifactRepositoryManager.TYPE_COMPOSITE_REPOSITORY,
+									null);
+					artifactManager.addRepository(aftifacts.getLocation());
+				}
+			}
+		} catch (OperationCanceledException e) {
+			LogHelper.logError(e);
+		} catch (ProvisionException e) {
+			LogHelper.logError(e);
+		} catch (URISyntaxException e) {
+			LogHelper.logError(e);
+		}
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/DescriptorParser.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/DescriptorParser.java
new file mode 100644
index 0000000..7e5bf30
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/DescriptorParser.java
@@ -0,0 +1,166 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileReader;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.commons.io.FilenameUtils;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+import org.ini4j.Ini;
+import org.ini4j.InvalidFileFormatException;
+import org.osgi.framework.Version;
+
+import com.excelsior.xds.core.log.LogHelper;
+
+public final class DescriptorParser {
+	private static final String DIRECTORY_VERSION_TAG = "version"; //$NON-NLS-1$
+	private static final String DIRECTORY_DESCRIPTION_TAG = "description"; //$NON-NLS-1$
+	private static final String DIRECTORY_SOURCE_TAG = "source"; //$NON-NLS-1$
+	private static final String DIRECTORY_NAME_TAG = "name"; //$NON-NLS-1$
+	private static final String VERSION_TAG = DIRECTORY_VERSION_TAG;
+	private static final String PLUGIN_DESCRIPTION = DIRECTORY_DESCRIPTION_TAG;
+	private static final String SITE_URL = "url"; //$NON-NLS-1$
+	private static final String PLUGIN = "plugin"; //$NON-NLS-1$
+	private static final String PLUGIN_SOURCE = DIRECTORY_SOURCE_TAG;
+	private static final String SITE_TAG = "site"; //$NON-NLS-1$
+	private static final String GENERAL_INI_SECTION = "General"; //$NON-NLS-1$
+	
+	private static final String VERIFIER_TAG = "verifier"; //$NON-NLS-1$
+	private static final String SOURCE_TAG = PLUGIN_SOURCE; //$NON-NLS-1$
+	private static final String FILE_NAME_TAG = DIRECTORY_NAME_TAG; //$NON-NLS-1$
+	private static final String FILE_UPDATE_TAG = "file"; //$NON-NLS-1$
+	private static final String PLUGIN_NAME_TAG = PLUGIN; //$NON-NLS-1$
+	private static final String RESOURCES_TAG = "resources"; //$NON-NLS-1$
+	private static final String UPDATE_DIR_PROPERTY_NAME = "UpdateDescriptor"; //$NON-NLS-1$
+	private static final String UPDATE_FILE_NAME = "update.ini"; //$NON-NLS-1$
+	private static final String ECLIPSE_HOME_LOCATION_PROPERTY = "eclipse.home.location"; //$NON-NLS-1$
+	
+	private static final String DIRECTORY_TAG = "directory"; //$NON-NLS-1$
+	private static final String DIRECTORY_FILE_TAG = "file"; //$NON-NLS-1$
+	
+	private DescriptorParser(){}
+
+	/**
+	 * @return null on incorrect update descriptor
+	 */
+	public static UpdateDirDescriptor parse() {
+		String eclipseInstallDir = System.getProperty(ECLIPSE_HOME_LOCATION_PROPERTY);
+		try {
+			File updatePropertiesFile = new File(new URL(FilenameUtils.concat(
+					eclipseInstallDir, UPDATE_FILE_NAME)).toURI());
+			if (updatePropertiesFile.exists()) {
+				String updateDescriptorURI = getUpdateDescrpitorURI(updatePropertiesFile);
+				File updateDescFile = null;
+				try {
+					updateDescFile = new File(new URI(updateDescriptorURI));
+				}
+				catch(IllegalArgumentException e) { // URI not valid
+					return null;
+				}
+				
+				return parsePendingUpdates(updateDescFile);
+			}
+		} catch (FileNotFoundException e) {
+			LogHelper.logError(e);
+		} catch (WorkbenchException e) {
+			LogHelper.logError(e);
+		} catch (IOException e) {
+			LogHelper.logError(e);
+		} catch (URISyntaxException e) {
+			LogHelper.logError(e);
+		}
+		
+		return null;
+	}
+
+	private static String getUpdateDescrpitorURI(File updatePropertiesFile)
+			throws InvalidFileFormatException, IOException {
+		final Ini ini = new Ini(updatePropertiesFile);
+		return ini.get(GENERAL_INI_SECTION, UPDATE_DIR_PROPERTY_NAME);
+	}
+	
+	public static UpdateDirDescriptor parsePendingUpdates(File updateDescFile) throws IOException, WorkbenchException {
+		if (!updateDescFile.exists()) {
+			return null;
+		}
+		List updates = new ArrayList();
+		List updateSites = new ArrayList();
+		
+		try(InputStreamReader reader = new FileReader(updateDescFile)) {
+			XMLMemento updatePropertiesMemento = XMLMemento.createReadRoot(reader);
+			
+			IMemento[] resourcesChildren = updatePropertiesMemento.getChildren(RESOURCES_TAG);
+			for (IMemento resourcesChild : resourcesChildren) {
+				String pluginName = resourcesChild.getString(PLUGIN_NAME_TAG);
+				
+				IMemento[] updateChildren = resourcesChild.getChildren(FILE_UPDATE_TAG);
+				for (IMemento updateChild : updateChildren) {
+					String pluginRootRelativeLocation = updateChild.getString(FILE_NAME_TAG);
+					
+					String newResourceLocation = updateChild.getString(SOURCE_TAG);
+					String xmlSchemaLocation = updateChild.getString(VERIFIER_TAG);
+					String versionStr = updateChild.getString(VERSION_TAG);
+					Version version = null;
+					try {
+						version = new Version(versionStr);
+						updates.add(new Update(pluginName, newResourceLocation, pluginRootRelativeLocation, xmlSchemaLocation, version));
+					}
+					catch (IllegalArgumentException e) {
+						LogHelper.logError(String.format("Incorrect version format specified for the file element %s", pluginRootRelativeLocation)); //$NON-NLS-1$
+					}
+				}
+			}
+			
+			IMemento[] updateSiteChildren = updatePropertiesMemento.getChildren(SITE_TAG);
+			for (IMemento updateSiteChild : updateSiteChildren) {
+				String url = updateSiteChild.getString(SITE_URL);
+				updateSites.add(new UpdateSite(url));
+			}
+			
+			List pluginUpdates = new ArrayList();
+			IMemento[] pluginChildren = updatePropertiesMemento.getChildren(PLUGIN);
+			for (IMemento pluginChild : pluginChildren) {
+				String source = pluginChild.getString(PLUGIN_SOURCE);
+				String desc = pluginChild.getString(PLUGIN_DESCRIPTION);
+				PluginUpdate pluginUpdate = new PluginUpdate(source, desc);
+				pluginUpdates.add(pluginUpdate);
+			}
+			
+			List instanceDirectoryUpdates = new ArrayList();
+			
+			IMemento[] directoryChildren = updatePropertiesMemento.getChildren(DIRECTORY_TAG);
+			for (IMemento directoryChild : directoryChildren) {
+				String dirName = directoryChild.getString(DIRECTORY_NAME_TAG);
+				IMemento[] fileChildren = directoryChild.getChildren(DIRECTORY_FILE_TAG);
+				List fileUpdates = new ArrayList();
+				for (IMemento fileChild : fileChildren) {
+					String name = fileChild.getString(DIRECTORY_NAME_TAG);
+					String source = fileChild.getString(DIRECTORY_SOURCE_TAG);
+					String description = fileChild.getString(DIRECTORY_DESCRIPTION_TAG);
+					String versionStr = fileChild.getString(DIRECTORY_VERSION_TAG);
+					Version version = null;
+					try{
+						version = new Version(versionStr);
+						InstanceDirectoryUpdate.FileUpdate fileUpdate = new InstanceDirectoryUpdate.FileUpdate(name, source, description, version);
+						fileUpdates.add(fileUpdate);
+					}
+					catch(IllegalArgumentException e){
+						LogHelper.logError(String.format("Incorrect format of the <%s> element", DIRECTORY_TAG)); //$NON-NLS-1$
+					}
+				}
+				InstanceDirectoryUpdate instanceDirectoryUpdate = new InstanceDirectoryUpdate(dirName, fileUpdates);
+				instanceDirectoryUpdates.add(instanceDirectoryUpdate);
+			}
+			return new UpdateDirDescriptor(updateDescFile, updates, updateSites, pluginUpdates, instanceDirectoryUpdates);
+		}
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/InstanceDirectoryUpdate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/InstanceDirectoryUpdate.java
new file mode 100644
index 0000000..f728405
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/InstanceDirectoryUpdate.java
@@ -0,0 +1,29 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+import java.util.List;
+
+import org.osgi.framework.Version;
+
+public class InstanceDirectoryUpdate {
+	public final String name;
+	public final List fileUpdates;
+	
+	public InstanceDirectoryUpdate(String name, List fileUpdates) {
+		this.name = name;
+		this.fileUpdates = fileUpdates;
+	}
+
+	public static class FileUpdate{
+		public String name;
+		public final String source;
+		public final String description;
+		public final Version version;
+		
+		FileUpdate(String name, String source, String description, Version version) {
+			this.name = name;
+			this.source = source;
+			this.description = description;
+			this.version = version;
+		}
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/PluginUpdate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/PluginUpdate.java
new file mode 100644
index 0000000..d1ac3ea
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/PluginUpdate.java
@@ -0,0 +1,11 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+public class PluginUpdate {
+	public final String pluginLocation;
+	public final String description;
+	
+	PluginUpdate(String pluginLocation, String description) {
+		this.pluginLocation = pluginLocation;
+		this.description = description;
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/Update.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/Update.java
new file mode 100644
index 0000000..f3ce5cb
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/Update.java
@@ -0,0 +1,20 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+import org.osgi.framework.Version;
+
+public class Update {
+	public final String targetPluginName;
+	public final String newResourceLocation;
+	public final String existingResourceLocation;
+	public final String xmlSchemaLocation;
+	public final Version version;
+	
+	public Update(String targetPluginName, String newResourceLocation,
+			String existingResourceLocation, String xmlSchemaLocation, Version version) {
+		this.targetPluginName = targetPluginName;
+		this.newResourceLocation = newResourceLocation;
+		this.existingResourceLocation = existingResourceLocation;
+		this.xmlSchemaLocation = xmlSchemaLocation;
+		this.version = version;
+	}
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateDirDescriptor.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateDirDescriptor.java
new file mode 100644
index 0000000..2de96b0
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateDirDescriptor.java
@@ -0,0 +1,27 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+import java.io.File;
+import java.util.List;
+
+public class UpdateDirDescriptor {
+	public final File updateDescFile;
+	public final String updateDirPath;
+	
+	public final List updates;
+	public final List updateSites;
+	
+	public final List pluginUpdates;
+	
+	public final List instanceDirectoryUpdates;
+	
+	UpdateDirDescriptor(File updateDescFile, List updates,
+			List updateSites, List pluginUpdates, List instanceDirectoryUpdates) {
+		this.updateDescFile = updateDescFile;
+		
+		this.updates = updates;
+		this.updateSites = updateSites;
+		this.updateDirPath = updateDescFile.getParent();
+		this.pluginUpdates = pluginUpdates;
+		this.instanceDirectoryUpdates = instanceDirectoryUpdates;
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateSite.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateSite.java
new file mode 100644
index 0000000..7b1abdb
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/descriptor/UpdateSite.java
@@ -0,0 +1,9 @@
+package com.excelsior.xds.core.updates.descriptor;
+
+public class UpdateSite {
+	public final String url;
+
+	public UpdateSite(String url) {
+		this.url = url;
+	}
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/dropins/XdsPluginUpdater.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/dropins/XdsPluginUpdater.java
new file mode 100644
index 0000000..bd94aff
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/dropins/XdsPluginUpdater.java
@@ -0,0 +1,209 @@
+package com.excelsior.xds.core.updates.dropins;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.filefilter.IOFileFilter;
+import org.apache.commons.io.filefilter.TrueFileFilter;
+import org.eclipse.core.runtime.Platform;
+import org.osgi.framework.Version;
+
+import com.excelsior.xds.core.updates.descriptor.PluginUpdate;
+import com.excelsior.xds.core.updates.descriptor.UpdateDirDescriptor;
+
+/**
+ * Update com.excelsior.xds at dropins folders, using specified updateDirectory as jar source
+ * 
+ * @author lsa80
+ */
+public class XdsPluginUpdater {
+
+	private static final String DROPINS_DIR_NAME = "dropins";//$NON-NLS-1$
+	
+	public static boolean areNewPluginsPending(UpdateDirDescriptor desc) {
+		if (desc == null) return false; // update dir was not specified
+		boolean result = false;
+		Collection xdsPluginJarFiles = getXdsPluginJars(desc);
+
+		if (xdsPluginJarFiles.isEmpty()) {
+			result = false;
+		} else {
+			xdsPluginJarFiles = getNewestVersions(xdsPluginJarFiles);
+			
+			for (File xdsPluginJarFile : xdsPluginJarFiles) {
+				if (areSimilarInstalledPluginsOlder(xdsPluginJarFile)) {
+					result = true;
+					break;
+				}
+			}
+		}
+		
+		return result;
+	}
+	
+	public static void doUpdate(UpdateDirDescriptor desc) throws IOException {
+		String installPath = Platform.getInstallLocation().getURL().getPath();
+		File dropinsDir = new File(FilenameUtils.concat(installPath, DROPINS_DIR_NAME));
+		
+		Collection xdsPluginJarFiles = getXdsPluginJars(desc);
+		xdsPluginJarFiles = getNewestVersions(xdsPluginJarFiles);
+		
+		List copiedJarFiles = new ArrayList();
+		try {
+			for (File xdsPluginJarFile : xdsPluginJarFiles) {
+				if (areSimilarInstalledPluginsOlder(xdsPluginJarFile)) {
+					FileUtils.copyFileToDirectory(xdsPluginJarFile, dropinsDir);
+					final String targetJarFilePath = FilenameUtils.concat(dropinsDir.getAbsolutePath(), FilenameUtils.getName(xdsPluginJarFile.getAbsolutePath()));
+					copiedJarFiles.add(targetJarFilePath);
+				}
+			}
+		}
+		catch (IOException e) {
+			// on error - try to clean up the mess
+			for (String targetJarFilePath : copiedJarFiles) {
+				FileUtils.deleteQuietly(new File(targetJarFilePath));
+			}
+			throw e;
+		}
+	}
+
+	private static Collection getNewestVersions(Collection xdsPluginJarFiles) {
+		Map pluginId2NewestPluginJarFile = new HashMap();
+		for (File xdsPluginJarFile : xdsPluginJarFiles) {
+			String pluginId = getPluginId(xdsPluginJarFile);
+			File newestPluginJarFile = pluginId2NewestPluginJarFile.get(pluginId);
+			if (newestPluginJarFile == null) {
+				pluginId2NewestPluginJarFile.put(pluginId, xdsPluginJarFile);
+			}
+			else{
+				if (isNewerThan(xdsPluginJarFile, newestPluginJarFile)) {
+					pluginId2NewestPluginJarFile.put(pluginId, xdsPluginJarFile);
+				}
+			}
+		}
+		return pluginId2NewestPluginJarFile.values();
+	}
+	
+	private static boolean areSimilarInstalledPluginsOlder(File xdsPluginJarFile) {
+		boolean result = false;
+		Collection pluginFiles = getSimilarInstalledPlugins(xdsPluginJarFile);
+		if (org.apache.commons.collections.CollectionUtils.isEmpty(pluginFiles)) {
+			result = true;
+		}
+		else {
+			File newestInstalledPluginJarFile = getNewestPlugin(pluginFiles);
+			if (isNewerThan(xdsPluginJarFile, newestInstalledPluginJarFile)) {
+				result = true;
+			}
+		}
+		
+		return result;
+	}
+	
+	private static File getNewestPlugin(Collection pluginFiles) {
+		return Collections.max(pluginFiles, IsNewerThanPluginJarComparator.INSTANCE);
+	}
+	
+	private static Collection getSimilarInstalledPlugins(
+			File xdsPluginJarFile) {
+		return FileUtils.listFiles(new File(getDropinsDirPath()), new SimilarPluginFileFilter(xdsPluginJarFile), TrueFileFilter.INSTANCE);
+	}
+	
+	private static class IsNewerThanPluginJarComparator implements Comparator {
+		static IsNewerThanPluginJarComparator INSTANCE = new IsNewerThanPluginJarComparator();
+		@Override
+		public int compare(File firstPlugin, File secondPlugin) {
+			return comparePluginVersions(firstPlugin, secondPlugin);
+		}
+	}
+	
+	public static boolean isNewerThan(File firstPlugin, File secondPlugin) {
+		return comparePluginVersions(firstPlugin, secondPlugin) > 0;
+	}
+	
+	private static int comparePluginVersions(File firstPlugin, File secondPlugin) {
+		Version firstVersion = new Version(getVersion(firstPlugin));
+		Version secondVersion = new Version(getVersion(secondPlugin));
+		
+		return firstVersion.compareTo(secondVersion);
+	}
+	
+	private static String getVersion(File plugin) {
+		return FilenameUtils.getName(plugin.getAbsolutePath()).replaceFirst("^.*_", "").replaceFirst("[.]jar$", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+	}
+	
+	private static String getPluginId(File plugin) {
+		return FilenameUtils.getName(plugin.getAbsolutePath()).replaceFirst("_.*$", ""); //$NON-NLS-1$ //$NON-NLS-2$
+	}
+	
+	private static Collection getXdsPluginJars(UpdateDirDescriptor desc) {
+		Collection fileList = new ArrayList();
+		for (PluginUpdate pluginUpdate : desc.pluginUpdates) {
+			File pluginFile = new File(FilenameUtils.concat(desc.updateDirPath, pluginUpdate.pluginLocation));
+			fileList.add(pluginFile);
+		}
+		return fileList;
+	}
+	
+	private static class SimilarPluginFileFilter implements IOFileFilter {
+
+		private String fileNameExpr;
+		
+		public SimilarPluginFileFilter(File xdsPluginJarFile) {
+			this(xdsPluginJarFile.getAbsolutePath());
+		}
+		
+		public SimilarPluginFileFilter(String path) {
+			String fileName = FilenameUtils.getName(path);
+			// Convert "org.apache.ant.source_1.8.2.v20120109-1030" -> "org.apache.ant.source.*[.]jar"
+			fileNameExpr = fileName.replaceFirst("_.*[.]jar$", "") + ".*[.]jar";  //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+		}
+
+		@Override
+		public boolean accept(File file) {
+			String fileName = FilenameUtils.getName(file.getAbsolutePath());
+			return fileName.matches(fileNameExpr);
+		}
+
+		@Override
+		public boolean accept(File dir, String name) {
+			return true;
+		}
+	}
+	
+	@SuppressWarnings("unused")
+	private static class XdsPluginJarFileFilter implements IOFileFilter {
+		public static XdsPluginJarFileFilter INSTANCE = new XdsPluginJarFileFilter();
+
+		@Override
+		public boolean accept(File file) {
+			boolean isCorrectJar = FilenameUtils
+					.getName(file.getAbsolutePath()).matches(
+							"com[.]excelsior[.]xds.*[.]jar");//$NON-NLS-1$
+			return isCorrectJar;
+		}
+
+		@Override
+		public boolean accept(File dir, String name) {
+			return true;
+		}
+	}
+	
+	private static String getDropinsDirPath() {
+		String installPath = Platform.getInstallLocation().getURL().getPath();
+		return FilenameUtils.concat(installPath, DROPINS_DIR_NAME);
+	}
+
+	public static enum UpdateDirectoryValidationResult {
+		NO_ERROR, EMPTY, ALREADY_EXISTS
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdate.java
new file mode 100644
index 0000000..971a9c3
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdate.java
@@ -0,0 +1,21 @@
+package com.excelsior.xds.core.updates.resources;
+
+import org.osgi.framework.Version;
+
+public class InstalledUpdate {
+	private String fileLocation;
+	private Version fileVersion;
+	
+	InstalledUpdate(String fileLocation, Version fileVersion) {
+		this.fileLocation = fileLocation;
+		this.fileVersion = fileVersion;
+	}
+
+	public String getFileLocation() {
+		return fileLocation;
+	}
+
+	public Version getFileVersion() {
+		return fileVersion;
+	}
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesManager.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesManager.java
new file mode 100644
index 0000000..86002d0
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesManager.java
@@ -0,0 +1,120 @@
+package com.excelsior.xds.core.updates.resources;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.Reader;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Map.Entry;
+import java.util.Set;
+
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.osgi.service.datalocation.Location;
+import org.eclipse.ui.IMemento;
+import org.eclipse.ui.WorkbenchException;
+import org.eclipse.ui.XMLMemento;
+import org.osgi.framework.Version;
+
+/**
+ * Loads/stories internal description of all installed resource updates for the XDS IDE.
+ * NOT thread-safe
+ */
+public class InstalledUpdatesManager {
+	
+	private static final String TAG_VERSION = "version"; //$NON-NLS-1$
+	private static final String TAG_FILE_LOCATION = "fileLocation"; //$NON-NLS-1$
+	private static final String TAG_XDS_FOLDERNAME  = "com.excelsior.xds"; //$NON-NLS-1$
+	private static final String TAG_INSTALLED_UPDATES_FILENAME    = "installedUpdates.xml"; //$NON-NLS-1$
+	private static final String TAG_INSTALLED_UPDATES = "InstalledUpdates"; //$NON-NLS-1$
+	private static final String TAG_INSTALLED_UPDATE = "InstalledUpdate"; //$NON-NLS-1$
+	
+	private static File registryFile;
+	private static InstalledUpdatesRegistry installedUpdatesRegistry;
+	
+	private static class InstalledUpdatesManagerHolder {
+		static InstalledUpdatesManager INSTANCE = new InstalledUpdatesManager();
+	}
+	
+	public static InstalledUpdatesManager getInstance() {
+		return InstalledUpdatesManagerHolder.INSTANCE;
+	}
+	
+	public InstalledUpdatesRegistry loadInstalledUpdatesRegistry() throws IOException, WorkbenchException {
+		if (installedUpdatesRegistry == null) {
+			File installedUpdatesRegistryFile = getInstalledUpdatesRegistryFile();
+			if (installedUpdatesRegistryFile.exists()) {
+				Reader reader = new FileReader(installedUpdatesRegistryFile);
+				XMLMemento memento = XMLMemento.createReadRoot(reader);
+				installedUpdatesRegistry = loadInstalledUpdatesRegistry(memento);
+			}
+			else {
+				installedUpdatesRegistry = new InstalledUpdatesRegistry(new HashMap());
+			}
+		}
+		return installedUpdatesRegistry;
+	}
+	
+	public void saveInstalledUpdatesRegistry(InstalledUpdatesRegistry installedUpdatesRegistry) throws IOException {
+		XMLMemento memento = XMLMemento.createWriteRoot(TAG_INSTALLED_UPDATES);
+		saveInstalledUpdatesRegistry(memento, installedUpdatesRegistry);
+		
+		FileWriter writer = new FileWriter(getInstalledUpdatesRegistryFile());
+	    memento.save(writer);
+	}
+	
+	private void saveInstalledUpdatesRegistry(XMLMemento memento, InstalledUpdatesRegistry installedUpdatesRegistry) {
+		Set> installedUpdateEntries = installedUpdatesRegistry.getInstalledFile2Descriptor().entrySet();
+		for (Entry installedUpdateEntry : installedUpdateEntries) {
+			final InstalledUpdate installedUpdate = installedUpdateEntry.getValue();
+			if (!getActualFile(installedUpdate).exists()) continue;
+			IMemento installedUpdateChild = memento.createChild(TAG_INSTALLED_UPDATE);
+			installedUpdateChild.putString(TAG_FILE_LOCATION, installedUpdate.getFileLocation());
+			installedUpdateChild.putString(TAG_VERSION, installedUpdate.getFileVersion().toString());
+		}
+	}
+
+	private static InstalledUpdatesRegistry loadInstalledUpdatesRegistry(XMLMemento memento) {
+		Map installedFile2Descriptor = new HashMap();
+		IMemento[] installedUpdateChildren = memento.getChildren(TAG_INSTALLED_UPDATE);
+		for (IMemento installedUpdateChild : installedUpdateChildren) {
+			InstalledUpdate installedUpdate = createInstalledUpdateFor(installedUpdateChild);
+			File file = getActualFile(installedUpdate);
+			if (file.exists()) {
+				installedFile2Descriptor.put(installedUpdate.getFileLocation(), installedUpdate);
+			}
+		}
+		return new InstalledUpdatesRegistry(installedFile2Descriptor);
+	}
+	
+	private static File getActualFile(InstalledUpdate installedUpdate) {
+		return new File(installedUpdate.getFileLocation());
+	}
+
+	private static InstalledUpdate createInstalledUpdateFor(IMemento installedUpdateChild) {
+		String fileLocation = installedUpdateChild.getString(TAG_FILE_LOCATION);
+		String version = installedUpdateChild.getString(TAG_VERSION);
+		Version fileVersion = new Version(version);
+		return new InstalledUpdate(fileLocation, fileVersion);
+	}
+
+	private static File getInstalledUpdatesRegistryFile() throws IOException {
+		if (registryFile == null) {
+			File dir = null;
+			Location location = Platform.getConfigurationLocation();
+			if (location != null) {
+				URL configURL = location.getURL();
+				dir = new File(configURL.getFile());
+			}
+			
+			registryFile = new File(new File(dir, TAG_XDS_FOLDERNAME), TAG_INSTALLED_UPDATES_FILENAME);
+			if (!registryFile.exists()) {
+				registryFile.getParentFile().mkdirs();
+			}
+		}
+		
+		return registryFile;
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesRegistry.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesRegistry.java
new file mode 100644
index 0000000..9d132f7
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/InstalledUpdatesRegistry.java
@@ -0,0 +1,34 @@
+package com.excelsior.xds.core.updates.resources;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.apache.commons.collections.map.UnmodifiableMap;
+import org.osgi.framework.Version;
+
+public class InstalledUpdatesRegistry {
+	private Map installedFile2Descriptor = new HashMap();
+
+	InstalledUpdatesRegistry(Map installedFile2Descriptor) {
+		this.installedFile2Descriptor = installedFile2Descriptor;
+	}
+	
+	public boolean isNewerThanInstalled(String filePath, Version updateVersion) {
+		InstalledUpdate installedUpdate = installedFile2Descriptor.get(filePath);
+		if (installedUpdate == null) return true;
+		return installedUpdate.getFileVersion().compareTo(updateVersion) < 0;
+	}
+	
+	void add(String fileLocation, Version updateVersion) {
+		add(new InstalledUpdate(fileLocation, updateVersion));
+	}
+	
+	private void add(InstalledUpdate installedUpdate) {
+		installedFile2Descriptor.put(installedUpdate.getFileLocation(), installedUpdate);
+	}
+
+	@SuppressWarnings("unchecked")
+	public Map getInstalledFile2Descriptor() {
+		return UnmodifiableMap.decorate(installedFile2Descriptor);
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/XdsResourcesUpdater.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/XdsResourcesUpdater.java
new file mode 100644
index 0000000..0e84ddb
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/updates/resources/XdsResourcesUpdater.java
@@ -0,0 +1,230 @@
+package com.excelsior.xds.core.updates.resources;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.commons.io.FilenameUtils;
+import org.apache.commons.io.IOUtils;
+import org.eclipse.core.runtime.FileLocator;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.ui.WorkbenchException;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.Version;
+
+import com.excelsior.xds.core.log.LogHelper;
+import com.excelsior.xds.core.updates.RepositoryUtils;
+import com.excelsior.xds.core.updates.descriptor.DescriptorParser;
+import com.excelsior.xds.core.updates.descriptor.InstanceDirectoryUpdate;
+import com.excelsior.xds.core.updates.descriptor.InstanceDirectoryUpdate.FileUpdate;
+import com.excelsior.xds.core.updates.descriptor.Update;
+import com.excelsior.xds.core.updates.descriptor.UpdateDirDescriptor;
+import com.excelsior.xds.core.updates.descriptor.UpdateSite;
+import com.excelsior.xds.core.utils.xml.ValidationResult;
+import com.excelsior.xds.core.utils.xml.XmlUtils;
+
+public class XdsResourcesUpdater {
+	private static final String XSD_FILE_EXT = "xsd"; //$NON-NLS-1$
+	private static final String ECLIPSE_HOME_LOCATION_PROPERTY = "eclipse.home.location"; //$NON-NLS-1$
+
+	private static class XdsResourcesUpdaterHolder {
+		static XdsResourcesUpdater INSTANCE = new XdsResourcesUpdater();
+	}
+
+	public static XdsResourcesUpdater getInstance() {
+		return XdsResourcesUpdaterHolder.INSTANCE;
+	}
+
+	public void updateResources() {
+		UpdateDirDescriptor desc = DescriptorParser.parse();
+		if (desc != null) {
+			try {
+				applyPluginResourceUpdates(desc);
+				applyInstanceResourceUpdates(desc);
+			} catch (MalformedURLException e) {
+				LogHelper.logError(e);
+			} catch (URISyntaxException e) {
+				LogHelper.logError(e);
+			} catch (WorkbenchException e) {
+				LogHelper.logError(e);
+			} catch (IOException e) {
+				LogHelper.logError(e);
+			}
+			addUpdateSitesIfNotPresent(desc.updateSites);
+		}
+	}
+
+	private void addUpdateSitesIfNotPresent(List updateSites) {
+		for (UpdateSite updateSite : updateSites) {
+			RepositoryUtils.addUpdateSite(updateSite.url);
+		}
+	}
+
+	private void applyPluginResourceUpdates(UpdateDirDescriptor desc) throws WorkbenchException, IOException {
+		InstalledUpdatesRegistry installedUpdatesRegistry = InstalledUpdatesManager.getInstance().loadInstalledUpdatesRegistry();
+		
+		boolean isNewUpdatesInstalled = false;
+		
+		String updateDirPath = desc.updateDirPath;
+		List updates = desc.updates;
+		Map pluginName2Bundle = new HashMap();
+		Set unresolvedBundleNames = new HashSet();
+		for (Update update : updates) {
+			Bundle bundle = pluginName2Bundle.get(update.targetPluginName);
+			if (bundle == null) {
+				bundle = Platform.getBundle(update.targetPluginName);
+				if (bundle == null) {
+					unresolvedBundleNames.add(update.targetPluginName);
+					continue;
+				}
+				pluginName2Bundle.put(update.targetPluginName, bundle);
+			}
+			if (updateResource(installedUpdatesRegistry, bundle, updateDirPath, update)) {
+				isNewUpdatesInstalled = true;
+			}
+		}
+		if (isNewUpdatesInstalled) {
+			InstalledUpdatesManager.getInstance().saveInstalledUpdatesRegistry(installedUpdatesRegistry);
+		}
+		
+		for (String unresolvedBundleName : unresolvedBundleNames) {
+			LogHelper.logError(String.format("Bundle '%s' was not found during update", unresolvedBundleName)); //$NON-NLS-1$
+		}
+	}
+	
+	private void applyInstanceResourceUpdates(UpdateDirDescriptor desc) throws URISyntaxException, WorkbenchException, IOException {
+		InstalledUpdatesRegistry installedUpdatesRegistry = InstalledUpdatesManager.getInstance().loadInstalledUpdatesRegistry();
+		boolean isNewUpdatesInstalled = false;
+		
+		String eclipseInstallDir = System.getProperty(ECLIPSE_HOME_LOCATION_PROPERTY);
+		for (InstanceDirectoryUpdate instanceDirectoryUpdate : desc.instanceDirectoryUpdates) {
+			File targetDirectory = new File(new URL(FilenameUtils.concat(eclipseInstallDir, instanceDirectoryUpdate.name)).toURI());
+			if (!targetDirectory.exists()) {
+				LogHelper.logError(String.format("Resource update : incorrect instance directory specified : '%s'", targetDirectory)); //$NON-NLS-1$
+				continue;
+			}
+			List fileUpdates = instanceDirectoryUpdate.fileUpdates;
+			for (FileUpdate fileUpdate : fileUpdates) {
+				if (updateResource(installedUpdatesRegistry, desc.updateDirPath, fileUpdate.source, targetDirectory, 
+						 fileUpdate.name, null, fileUpdate.version, false)) {
+					isNewUpdatesInstalled = true;
+				}
+			}
+		}
+		if (isNewUpdatesInstalled) {
+			InstalledUpdatesManager.getInstance().saveInstalledUpdatesRegistry(installedUpdatesRegistry);
+		}
+	}
+
+	/**
+	 * @param installedUpdatesRegistry 
+	 * @param dirWithUpdatesPath directory where updates are
+	 * @param updateDirSubdirWithResource relative path where update is
+	 * @param newResourceName update resource name
+	 * @throws IOException
+	 * @throws FileNotFoundException
+	 * @return true if the resource was updated
+	 */
+	private boolean updateResource(InstalledUpdatesRegistry installedUpdatesRegistry, Bundle resourcesBundle, String dirWithUpdatesPath, Update update) {
+		String newResourceRelativePath = update.newResourceLocation;
+		String existingResourceRelativePath = update.existingResourceLocation;
+		String xmlSchemaRelativePath = update.xmlSchemaLocation;
+		Version version = update.version;
+		File resourceFolderFile = null;
+		try {
+			resourceFolderFile = FileLocator.getBundleFile(resourcesBundle);
+		} catch (IOException e) {
+			LogHelper.logError(e);
+			return false;
+		}
+		
+		return updateResource(installedUpdatesRegistry, dirWithUpdatesPath,
+				newResourceRelativePath, resourceFolderFile,
+				existingResourceRelativePath, xmlSchemaRelativePath, version, true);
+	}
+
+	/**
+	 * @param installedUpdatesRegistry - registry of installed updates
+	 * @param dirWithUpdatesPath - directory containing update resource to be copied
+	 * @param newResourceRelativePath - relative to dirWithUpdatesPath location of the resource to be copied
+	 * @param resourceFolderFile - folder containing old version of the resource
+	 * @param existingResourceRelativePath - relative to resourceFolderFile old resource
+	 * @param xmlSchemaRelativePath - optional xmlSchema validator
+	 * @param version - new version of the resource
+	 * @return true if the resource was updated
+	 */
+	private boolean updateResource(InstalledUpdatesRegistry installedUpdatesRegistry,
+			String dirWithUpdatesPath, String newResourceRelativePath,
+			File resourceFolderFile, String existingResourceRelativePath,
+			String xmlSchemaRelativePath, Version version, boolean isDemandResourceExistence) {
+		boolean isUpdated = false;
+		String newResourceAbsoluteLocation = FilenameUtils.separatorsToUnix(FilenameUtils.concat(dirWithUpdatesPath, newResourceRelativePath));
+		File newResourceFile = new File(newResourceAbsoluteLocation);
+		try {
+			
+			File targetResourceFile = new File(FilenameUtils.concat(resourceFolderFile.toString(), existingResourceRelativePath));
+			// TODO : maybe we need a better way to protect schema validation file, like hide it inside jar
+			boolean isNotXsd = !XSD_FILE_EXT.equals(FilenameUtils.getExtension(targetResourceFile.getName()));
+			boolean isNewResourceFileOK = isNormalFile(newResourceFile, true);
+			if (!isNewResourceFileOK) {
+				LogHelper.logError(String.format("Resource update : Incorrect update source specified : '%s'", newResourceFile)); //$NON-NLS-1$
+			}
+			boolean isTargetResourceFileOK = isNormalFile(targetResourceFile, isDemandResourceExistence);
+			if (!isTargetResourceFileOK) {
+				LogHelper.logError(String.format("Resource update : Incorrect target resource specified : '%s'", newResourceFile)); //$NON-NLS-1$
+			}
+			if (isNewResourceFileOK && isTargetResourceFileOK && isNotXsd) {
+				if (xmlSchemaRelativePath != null) {
+					File schemaPath = new File(FilenameUtils.concat(resourceFolderFile.toString(), xmlSchemaRelativePath ));
+					if (!schemaPath.exists()) {
+						LogHelper.logError(String.format("Resource update : The following schema resource not exists : '%s'", schemaPath)); //$NON-NLS-1$
+						return isUpdated;
+					}
+					
+					ValidationResult validationResult = XmlUtils.validateAgainstSchema(newResourceFile.toURI(), schemaPath.getAbsolutePath());
+					if (!validationResult.isValid()) {
+						LogHelper.logError(String.format("Resource update : XSD validation failed for file : '%s'", newResourceRelativePath)); //$NON-NLS-1$
+						return isUpdated;
+					}
+				}
+			
+				if (installedUpdatesRegistry.isNewerThanInstalled(targetResourceFile.getAbsolutePath(), version)) {
+					LogHelper.logInfoInLogMode(String.format("File %s updated with %s. Version %s", targetResourceFile, newResourceFile, version)); //$NON-NLS-1$
+					try(FileInputStream inputStream = new FileInputStream(newResourceFile)){
+						try(FileOutputStream outputStream = new FileOutputStream(targetResourceFile)){
+							IOUtils.copy(inputStream, outputStream);
+							installedUpdatesRegistry.add(targetResourceFile.getAbsolutePath(), version);
+							isUpdated = true;
+						}
+					}
+				}
+			}
+			else if (!newResourceFile.exists()){
+				LogHelper.logError(String.format("Resource update : Update directory doesnot contain the following file : '%s'", newResourceRelativePath)); //$NON-NLS-1$
+			}
+			else if (!targetResourceFile.exists()){
+				LogHelper.logError(String.format("Resource update : The following file not exists : '%s'", targetResourceFile)); //$NON-NLS-1$
+			}
+		} catch (IOException e) {
+			LogHelper.logError(e);
+		}
+		return isUpdated;
+	}
+	
+	private static boolean isNormalFile(File file, boolean isDemandResourceExistence) {
+		if (!isDemandResourceExistence) {
+			return file.exists() ? file.isFile() : true;
+		}
+		return file.isFile();
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/AdapterUtilities.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/AdapterUtilities.java
new file mode 100644
index 0000000..777b9fa
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/AdapterUtilities.java
@@ -0,0 +1,39 @@
+package com.excelsior.xds.core.utils;
+
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.PlatformObject;
+
+public class AdapterUtilities {
+  @SuppressWarnings("unchecked")
+  public static  T getAdapter(Object sourceObject, Class adapterType) {
+    Assert.isNotNull(adapterType);
+    if (sourceObject == null) {
+      return null;
+    }
+    if (adapterType.isInstance(sourceObject)) {
+      return (T) sourceObject;
+    }
+
+    if (sourceObject instanceof IAdaptable) {
+      IAdaptable adaptable = (IAdaptable) sourceObject;
+
+      Object result = adaptable.getAdapter(adapterType);
+      if (result != null) {
+        // Sanity-check
+        Assert.isTrue(adapterType.isInstance(result));
+        return (T) result;
+      }
+    }
+
+    if (!(sourceObject instanceof PlatformObject)) {
+      Object result = Platform.getAdapterManager().getAdapter(sourceObject, adapterType);
+      if (result != null) {
+        return (T) result;
+      }
+    }
+
+    return null;
+  }
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuildJob.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuildJob.java
new file mode 100644
index 0000000..b75aea9
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuildJob.java
@@ -0,0 +1,42 @@
+package com.excelsior.xds.core.utils;
+
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+
+import com.excelsior.xds.core.jobs.ListenableJob;
+
+public abstract class BuildJob extends ListenableJob {
+	private final IProject project;
+		
+	BuildJob(IProject project, String name) {
+		super(name);
+		this.project = project;
+	}
+	
+	/* (non-Javadoc)
+	 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+	 */
+	@Override
+	protected final IStatus run(IProgressMonitor monitor) {
+		try {
+			doBuild(project, monitor);
+		} 
+		catch (CoreException e) {
+			return e.getStatus();
+		} 
+		finally {
+			monitor.done();
+		}
+		return Status.OK_STATUS;
+	}
+	
+	@Override
+	public boolean belongsTo(Object family) {
+		return BuilderUtils.BUILD_JOB_FAMILY.equals(family);
+	}
+
+	protected abstract void doBuild(IProject project, IProgressMonitor monitor) throws CoreException;
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuilderUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuilderUtils.java
new file mode 100644
index 0000000..4ca654a
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/BuilderUtils.java
@@ -0,0 +1,328 @@
+package com.excelsior.xds.core.utils;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.ICommand;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IProjectDescription;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceDescription;
+import org.eclipse.core.resources.IncrementalProjectBuilder;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.Job;
+
+import com.excelsior.xds.core.builders.XdsBuildResult;
+import com.excelsior.xds.core.builders.XdsSourceBuilderConstants;
+import com.excelsior.xds.core.compiler.libset.LibraryFileSetManager;
+import com.excelsior.xds.core.internal.nls.Messages;
+import com.excelsior.xds.core.log.LogHelper;
+import com.excelsior.xds.core.marker.MarkerUtils;
+import com.excelsior.xds.core.resource.ResourceUtils;
+
+public final class BuilderUtils {
+    public static final String MULTIPLE_BUILD_ITEM_ID = "MULTIPLE_BUILD_ITEM_ID";  //$NON-NLS-1$
+    public static final String BUILD_JOB_FAMILY = "BUILD_JOB_FAMILY"; //$NON-NLS-1$
+    
+    private static Set multipleBuildsGroups = new HashSet();
+    
+    public static enum BuildAction {
+    	REFRESH_PROJECT,
+    	BUILD_PROJECT,
+    	REBUILD_PROJECT,
+    	REBUILD_LIBRARY_FILESET,
+    	GET_COMPILATION_SET
+    }
+    
+    /**
+     * Only static methods are allowed
+     */
+    private BuilderUtils(){}
+    
+    public static Job invokeBuilder(IProject project, EnumSet actions, IProgressMonitor monitor) throws CoreException {
+    	return configureAndSchedule(createBuildJob(project, actions));
+    }
+
+	public static Job createBuildJob(IProject project,
+			EnumSet actions) {
+		BuildJob buildJob = new BuildJob(project, Messages.BuilderUtils_BuildingProject) {
+    		
+    		private void onAction(BuildAction action, EnumSet actions, Map args, String arg) {
+    			if (actions.contains(action)) {
+    				args.put(arg, Boolean.TRUE.toString());
+    			}
+    		}
+    		
+			@Override
+			protected void doBuild(IProject project, IProgressMonitor monitor) throws CoreException {
+				Map args = new HashMap<>();
+				
+				if (actions.contains(BuildAction.REBUILD_LIBRARY_FILESET)) {
+					LibraryFileSetManager.getInstance().updateFrom(project);
+				}
+				if (actions.contains(BuildAction.REFRESH_PROJECT)) {
+					ResourceUtils.refreshLocalSync(project);
+				}
+				
+				onAction(BuildAction.BUILD_PROJECT, actions, args, XdsSourceBuilderConstants.BUILD_PROJECT_KEY);
+				onAction(BuildAction.REBUILD_PROJECT, actions, args, XdsSourceBuilderConstants.REBUILD_PROJECT_KEY);
+				onAction(BuildAction.REBUILD_LIBRARY_FILESET, actions, args, XdsSourceBuilderConstants.GET_LIBRARY_FILE_SET_KEY);
+				onAction(BuildAction.GET_COMPILATION_SET, actions, args, XdsSourceBuilderConstants.GET_COMPILATION_SET_ONLY_KEY);
+				project.build(IncrementalProjectBuilder.FULL_BUILD, XdsSourceBuilderConstants.BUILDER_ID, args, monitor);
+			}
+		};
+		buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());
+		return buildJob;
+	}
+
+	public static void invokeRebuild(IProject project, IProgressMonitor monitor) throws CoreException {
+		invokeBuilder(project, EnumSet.of(BuildAction.REBUILD_PROJECT), monitor);
+	}
+	
+	public static void invokeRebuildAndGetLibraryFileSet(IProject project, IProgressMonitor monitor) throws CoreException {
+		invokeBuilder(project, EnumSet.of(BuildAction.REBUILD_PROJECT, BuildAction.REBUILD_LIBRARY_FILESET), monitor);
+	}
+
+	public static void invokeBuild(IProject project, IProgressMonitor monitor) throws CoreException {
+	    invokeBuilder(project, EnumSet.of(BuildAction.BUILD_PROJECT), monitor);
+	}
+    
+    public static Job invokeGetCompilationSet(IProject project, IProgressMonitor monitor) throws CoreException {
+    	return invokeBuilder(project, EnumSet.of(BuildAction.GET_COMPILATION_SET), monitor);
+    }
+    
+    public static void invokeGetCompilationSetAndGetLibraryFileSet(IProject project, IProgressMonitor monitor) throws CoreException {
+    	invokeBuilder(project, EnumSet.of(BuildAction.GET_COMPILATION_SET, BuildAction.REBUILD_LIBRARY_FILESET), monitor);
+    }
+    
+    public static void invokeMultipleBuild(List itemsToBuild, IMiltipleBuildFinishListener listener) {
+        final MultipleBuildGroup group = new MultipleBuildGroup(listener);
+        multipleBuildsGroups.add(group);
+        for (final MultipleBuildItem item : itemsToBuild) {
+        	BuildJob buildJob= new BuildJob(item.project, Messages.BuilderUtils_BuildingProject) {
+    			@Override
+    			protected void doBuild(IProject project, IProgressMonitor monitor) throws CoreException {
+    				item.args.put(MULTIPLE_BUILD_ITEM_ID, item.itemUnicalId);
+                    group.addItem(item);
+                    project.build(item.buildKind, XdsSourceBuilderConstants.BUILDER_ID, item.args, monitor);
+    			}
+    		};
+    		configureAndSchedule(buildJob);
+        }
+        
+    }
+    
+    /**
+     * TRUE when this item is in MultipleBuildGroup and some items in this
+     * group are finished. (used to don't clear console output between builds in a group) 
+     */
+    public static boolean isNotFirstInMultipleBuild(String itemId) {
+        if (itemId != null) {
+            for (MultipleBuildGroup group : multipleBuildsGroups) {
+                if (group.findItem(itemId) != null) {
+                    return group.hasFinishedItems();
+                }
+            }
+        }
+        return false;
+    }
+
+    /**
+     * TRUE when this item is in MultipleBuildGroup this group contains more than one this item
+     */
+    public static boolean isInRealMultipleBuild(String itemId) {
+        for (MultipleBuildGroup group : multipleBuildsGroups) {
+            if (group.findItem(itemId) != null) {
+                return group.getItemsCount() > 1;
+            }
+        }
+        return false;
+    }
+    
+    public static void multipleBuildItemFinished(String itemId, XdsBuildResult buildResult, String summaryString) {
+        for (MultipleBuildGroup group : multipleBuildsGroups) {
+            if (group.finishItem(itemId, buildResult, summaryString)) {
+                if (group.isAllFinished()) {
+                    group.callListener();
+                    multipleBuildsGroups.remove(group);
+                    break;
+                }
+                
+            }
+        }
+        
+    }
+    
+    /**
+	 * Add this builder to the specified project if possible. Do nothing if the
+	 * builder has already been added.
+	 * 
+	 * @param project
+	 *            the project (not null)
+	 */
+	public static void addBuilderToProject(IProject project, String BUILDER_ID) {
+		// Cannot modify closed projects.
+	      if (!project.isOpen())
+	         return;
+
+	      // Get the description.
+	      IProjectDescription description;
+	      try {
+	         description = project.getDescription();
+	      }
+	      catch (CoreException e) {
+	    	  LogHelper.logError(e);
+	         return;
+	      }
+
+	      // Look for builder already associated.
+	      ICommand[] cmds = description.getBuildSpec();
+	      for (int j = 0; j < cmds.length; j++)
+	         if (cmds[j].getBuilderName().equals(BUILDER_ID))
+	            return;
+
+	      // Associate builder with project.
+	      ICommand newCmd = description.newCommand();
+	      newCmd.setBuilderName(BUILDER_ID);
+	      List newCmds = new ArrayList();
+	      newCmds.addAll(Arrays.asList(cmds));
+	      newCmds.add(newCmd);
+	      description.setBuildSpec((ICommand[]) newCmds.toArray(new ICommand[newCmds.size()]));
+	      try {
+	         project.setDescription(description, null);
+	      }
+	      catch (CoreException e) {
+	    	  LogHelper.logError(e);
+	      }
+	}
+	
+	// ---------- Multiple build support
+	
+	private static class MultipleBuildGroup {
+	    private ArrayList items;
+	    private IMiltipleBuildFinishListener listener;
+	    
+	    public MultipleBuildGroup(IMiltipleBuildFinishListener listener) {
+	        items = new ArrayList();
+	        this.listener = listener;
+	    }
+	    
+        public void addItem(MultipleBuildItem it) {
+            items.add(it);
+        }
+        
+	    public boolean finishItem(String itemId, XdsBuildResult buildResult, String summaryString) {
+	        MultipleBuildItem it = findItem(itemId);
+            if (it != null) {
+                it.buildResult = buildResult;
+                it.summaryString = summaryString;
+                return true;
+            }
+	        return false;
+	    }
+	    
+	    public MultipleBuildItem findItem(String itemId) {
+            for (MultipleBuildItem it : items) {
+                if (it.itemUnicalId.equals(itemId)) {
+                    return it;
+                }
+            }
+            return null;
+	    }
+	    
+        public boolean isAllFinished() {
+            for (MultipleBuildItem it : items) {
+                if (it.summaryString == null)
+                    return false;
+            }
+            return true;
+        }
+        
+        public boolean hasFinishedItems() {
+            for (MultipleBuildItem it : items) {
+                if (it.summaryString != null)
+                    return true;
+            }
+            return false;
+        }
+        
+        public int getItemsCount() {
+            return items.size();
+        }
+        
+        public void callListener() {
+            if (listener != null) {
+                listener.allItemsAreFinished();
+            }
+        }
+	}
+	
+	public static class MultipleBuildItem {
+	    private int buildKind;
+	    private IProject project;
+	    private Map args;
+	    private final String itemUnicalId;
+	    // Build results:
+	    private XdsBuildResult buildResult;
+	    private String summaryString; // null => not finished
+	    
+	    private static int idcnt = 0;
+	    
+	    public MultipleBuildItem(int buildKind, IProject project, Map args) {
+	        this.buildKind = buildKind;
+	        this.project = project;
+	        this.args = args;
+	        this.itemUnicalId = "mbi_"+idcnt++; //$NON-NLS-1$
+	    }
+	    
+	    public XdsBuildResult getBuildResult() {
+	        return buildResult;
+	    }
+	    
+	    public String getSummaryString() {
+	        return summaryString;
+	    }
+	}
+	
+	public interface IMiltipleBuildFinishListener {
+	    public void allItemsAreFinished();
+	}
+	
+	public static boolean setAutoBuilding(boolean state) throws CoreException {
+        IWorkspace workspace = ResourcesPlugin.getWorkspace();
+        IWorkspaceDescription desc = workspace.getDescription();
+        boolean isAutoBuilding = desc.isAutoBuilding();
+        if (isAutoBuilding != state) {
+            desc.setAutoBuilding(state);
+            workspace.setDescription(desc);
+        }
+        return isAutoBuilding;
+    }
+	
+	public static void applySdkToProject(final IProject p, boolean isRebuild, IProgressMonitor monitor) throws CoreException {
+		LibraryFileSetManager.getInstance().updateFrom(p);
+		
+		if (isRebuild) {
+			invokeRebuildAndGetLibraryFileSet(p, monitor);
+		}
+		else {
+			// since we have changed SDK - remove all markers from the previous build
+			MarkerUtils.scheduleDeleteMarkers(p);
+			invokeGetCompilationSetAndGetLibraryFileSet(p, monitor);
+		}
+	}
+	
+	private static Job configureAndSchedule(Job buildJob) {
+		buildJob.setUser(true);
+		buildJob.schedule();
+		return buildJob;
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/CompositedDisposable.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/CompositedDisposable.java
new file mode 100644
index 0000000..0b2f843
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/CompositedDisposable.java
@@ -0,0 +1,19 @@
+package com.excelsior.xds.core.utils;
+
+import java.util.ArrayList;
+import java.util.List;
+
+public class CompositedDisposable implements IDisposable{
+	private List disposables = new ArrayList();
+	
+	public CompositedDisposable(IDisposable... disposables) {
+		for (IDisposable d : disposables) {
+			this.disposables.add(d);
+		}
+	}
+
+	@Override
+	public void dispose() {
+		disposables.stream().forEach(IDisposable::dispose);
+	}
+}
\ No newline at end of file
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/EclipseCommandLineUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/EclipseCommandLineUtils.java
new file mode 100644
index 0000000..b2eedbe
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/EclipseCommandLineUtils.java
@@ -0,0 +1,23 @@
+package com.excelsior.xds.core.utils;
+
+import org.eclipse.core.runtime.Platform;
+
+public abstract class EclipseCommandLineUtils {
+	/**
+	 * Checks whether specific application option was set. Options are set via Program arguments field of launch configuration, 
+	 * or, in production system - via xds-ide.ini. In xds-ide.ini program arguments are those that are specified before -vmargs option. 
+	 * Options specified after -vmargs are passed to the JVM.   
+	 * 
+	 * @param optionName - full option name, say "-perspective" or "--org.eclipse.equinox.p2.reconciler.dropins.directory".
+	 * @return
+	 */
+	public static boolean isApplicationArgSet(String optionName) {
+		String[] args = Platform.getApplicationArgs();
+		for (int i = 0; i < args.length; i++) {
+			if (optionName.equalsIgnoreCase(args[i])) { //$NON-NLS-1$
+				return true;
+			}
+		}
+		return false;
+	}
+}
diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/GraphicUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/GraphicUtils.java
new file mode 100644
index 0000000..ecd1128
--- /dev/null
+++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/GraphicUtils.java
@@ -0,0 +1,43 @@
+package com.excelsior.xds.core.utils;
+
+import org.eclipse.swt.graphics.RGB;
+
+/**
+ * Graphics related stuff
+ * 
+ * @author lsa80 + */ +public final class GraphicUtils { + /** + * Makes an SWT color lighter + * @param c + * @param factor float in [0..1]. if 0 - color will be unchanged, if 1 - color become white. + * @return + */ + public static RGB lighter(RGB c, float factor) { + float rComponent = (255 - c.red)*factor + c.red; + float gComponent = (255 - c.green)*factor + c.green; + float bComponent = (255 - c.blue)*factor + c.blue; + return new RGB((int)rComponent, (int)gComponent, (int)bComponent); + } + + /** + * Makes an SWT color darker + * @param c + * @param factor float in [0..1]. if 0 - color will be unchanged, if 1 - color become black. + * @return + */ + public static RGB darker(RGB c, float factor) { + float rComponent = (1 - factor)* c.red; + float gComponent = (1 - factor)* c.green; + float bComponent = (1 - factor)* c.blue; + return new RGB((int)rComponent, (int)gComponent, (int)bComponent); + } + + + /** + * Cannot instantiate this class, static methods only + */ + private GraphicUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IBaseClosure.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IBaseClosure.java new file mode 100644 index 0000000..87919d3 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IBaseClosure.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.utils; + +/** + * + * Base class for the {@link IClosure}.

+ * Allows to specify throwed exception. + *
+ * @author lsa80 + * + * @param + * @param + */ +public interface IBaseClosure { + void execute(T param) throws E; +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IClosure.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IClosure.java new file mode 100644 index 0000000..92c0d42 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IClosure.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.core.utils; + +/** + * Abstract operation to be performed on its parameter. + * See http://en.wikipedia.org/wiki/Closure_(computer_science) + * + * @author lsa80 + * @param - parameter of the operation + */ +public interface IClosure extends IBaseClosure { +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IDisposable.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IDisposable.java new file mode 100644 index 0000000..751bbf4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IDisposable.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.core.utils; + +/** + * This interface should be implemented by the classes holding references to native resources + * and dispose them on dispose call. + * @author lsa80 + */ +public interface IDisposable extends AutoCloseable { + /** + * Dispose the managed resource(s). If dispose was already called, should do nothing. + */ + void dispose(); + + default void close() throws Exception { + dispose(); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IPredicate.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IPredicate.java new file mode 100644 index 0000000..50eeec0 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IPredicate.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.utils; + + +/** + * Tests some condition on given object of class T + * @author lion + * @param + */ +public interface IPredicate { + /** + * @param object the object to evaluate, should not be changed + * @return + */ + boolean evaluate(T object); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IVarParameter.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IVarParameter.java new file mode 100644 index 0000000..ae45342 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/IVarParameter.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.core.utils; + +public interface IVarParameter { + T getValue(); + void setValue(T val); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/JavaUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/JavaUtils.java new file mode 100644 index 0000000..ee182df --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/JavaUtils.java @@ -0,0 +1,127 @@ +package com.excelsior.xds.core.utils; + +import java.math.BigInteger; + +public final class JavaUtils +{ + /** + * Casts {@link entity} to {@link targetClass} or return null, if it is impossible + * + * @param targetClass + * @param entity + * @return + */ + @SuppressWarnings("unchecked") + public static T as(Class targetClass, Object entity) { + T result = null; + if ((entity != null) && targetClass.isAssignableFrom(entity.getClass())) + { + result = (T)entity; + } + return result; + } + + /** + * Tests for {@code o.getClass()} to be one of {@code possibleClasses} in the sense of {@code java.lang.Class.isAssignableFrom} + */ + public static boolean isOneOf(Object o, Class... possibleClasses) { + if (o == null) { + return false; + } + for (Class clazz : possibleClasses) { + if (clazz.isAssignableFrom(o.getClass())) return true; + } + return false; + } + + public static boolean areFlagsSet(int bitset, int mask) { + return (bitset & mask) != 0; + } + + /** + * Allows to get stack depth of the current call. + * + * NOTE : this is very slow. Please use with caution. + * @return + */ + public static int getCurrentCallStackDepth() { + return new Exception().getStackTrace().length; + } + + public static boolean isCalledFrom(String methodName) { + StackTraceElement[] stackTrace = new Exception().getStackTrace(); + for (int i = stackTrace.length - 1; i > -1; i--) { + StackTraceElement stackTraceElement = stackTrace[i]; + String methodFullName = getMethodFullName(stackTraceElement); + if (methodFullName.startsWith(methodName)) { + return true; + } + } + return false; + } + + protected static String getMethodFullName( + StackTraceElement stackTraceElement) { + return stackTraceElement.getClassName()+ "." + stackTraceElement.getMethodName(); + } + + public static String getAncestorCallerName(int levelUp) { + return getAncestorCallerName(levelUp + 1, false); + } + + public static String getAncestorCallerName(int levelUp, boolean isAddPosition) { + StackTraceElement[] stackTrace = new Exception().getStackTrace(); + return getMethodFullName(stackTrace[levelUp]) + (isAddPosition? " " + stackTrace[levelUp].getLineNumber() : ""); + } + + public static > int compare(T c1, T c2) { + return compare(c1, c2, false); + } + + public static > int compare(T c1, T c2, boolean isNullGreater) { + if (c1 == c2) { + return 0; + } else if (c1 == null) { + return (isNullGreater ? 1 : -1); + } else if (c2 == null) { + return (isNullGreater ? -1 : 1); + } + return c1.compareTo(c2); + } + + /** + * Returns either an n converted to int, or 0 if n equals {@code null} + * @param n + * @param defaultValue + * @return + */ + public static int toInt(Integer n) { + return n != null ? n : 0; + } + + /** + * Returns either an n converted to int, or default value if n equals {@code null} + * @param n + * @param defaultValue + * @return + */ + public static int toInt(Integer n, int defaultValue) { + return n != null ? n : defaultValue; + } + + /** + * Parses 0x representation of the {@link BigInteger} from string + * @param val string to parse + * @return parsed + */ + public static BigInteger toBigIntegerFromHex(String val) { + BigInteger n = new BigInteger(val.replace("0x", ""), 16); + return n; + } + + /** + * Cannot instantiate this class, static methods only + */ + private JavaUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/Lambdas.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/Lambdas.java new file mode 100644 index 0000000..fa714ea --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/Lambdas.java @@ -0,0 +1,106 @@ +package com.excelsior.xds.core.utils; + +import java.util.Collection; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Predicate; +import java.util.function.Supplier; +import java.util.stream.Stream; + +/** + * java 8 lambda helpers + * @author lsa80 + */ +public final class Lambdas { + public static Predicate as(Predicate predicate) { + return predicate; + } + + /** + * IF expression + * @param t object to test + * @param predicate if evaluates to {@code true} on the {@code t} then {@code iff} function evaluates to the {@code t} object itself, otherwise evaluates to {@code null} + * @return {@code t} itself or null + */ + public static T iff(T t, Predicate predicate) { + return iff(() -> t, predicate, () -> t, () -> null); + } + + /** + * IF expression + * @param supplier used to obtain object {@code t} of type {@code T} + * @param predicate used to test {@code t} of type {@code T} obtained from the {@code supplier} + * @param ifTrueSupplier will be evaluated (method {@link Supplier#get()} called) if {@code predicate} evaluates to true + * @param ifFalseSupplier will be evaluated {@code predicate} evaluates to false + * @return result of either {@code ifTrueSupplier} or {@code ifFalseSupplier} evaluation, depending on {@code predicate} + */ + public static U iff(Supplier supplier, Predicate predicate, Supplier ifTrueSupplier, Supplier ifFalseSupplier) { + T t = supplier.get(); + if (predicate.test(t)) { + return ifTrueSupplier.get(); + } + else { + return ifFalseSupplier.get(); + } + } + + public static Predicate not(Predicate predicate) { + return predicate.negate(); + } + + public static Predicate and(Predicate predicate1, Predicate predicate2) { + return predicate1.and(predicate2); + } + + public static Predicate or(Predicate predicate1, Predicate predicate2) { + return predicate1.or(predicate2); + } + + public static Consumer as(Consumer consumer) { + return consumer; + } + + public static Supplier as(Supplier supplier) { + return supplier; + } + + public static Function as(Function function) { + return function; + } + + public static Function func(Map m) { + return t -> m.get(t); + } + + public static Predicate nonnull() { + return o -> o != null; + } + + public static Stream toStream(Collection c) { + if (c != null){ + return c.stream(); + } + else { + return Stream.empty(); + } + } + + public static Predicate TRUE() { + return t -> { + return true; + }; + } + + public static Predicate FALSE() { + return t -> { + return false; + }; + } + + /** + * Only static methods allowed. + */ + private Lambdas(){ + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/OperationInterrupted.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/OperationInterrupted.java new file mode 100644 index 0000000..4e090b5 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/OperationInterrupted.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.core.utils; + +/** + * Thrown as the signal to stop some process (say loop or visitor). + * + * @author lsa80 + */ +public class OperationInterrupted extends RuntimeException { + private static final long serialVersionUID = 2688620279678023220L; +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/ReflectionUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/ReflectionUtils.java new file mode 100644 index 0000000..d4e1210 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/ReflectionUtils.java @@ -0,0 +1,528 @@ +package com.excelsior.xds.core.utils; + + +import java.lang.annotation.Annotation; +import java.lang.reflect.Array; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.Arrays; +import java.util.Collection; +import java.util.HashSet; +import java.util.LinkedList; +import java.util.List; +import java.util.Set; + +/** + * Utility class for breaking encapsulation via reflection. + *
+ * All methods of this class throw AssertionError if any exception is thrown from + * reflection facilities. + * + * @author kit + * @author alexm + */ +public class ReflectionUtils { + + /** + * Returns true if specified class is annotated with annotation of + * annotationClass type. + */ + public static Annotation getAnnotation(Class c, Class annotationClass) { + return c.getAnnotation(annotationClass); + } + + /** + * Returns true if specified class is annotated with annotation of + * annotationClass type. + */ + public static boolean annotatedWith(Class c, Class annotationClass) { + return (c.getAnnotation(annotationClass) != null); + } + + /** + * Returns attribute value of given annotation with attrName attribute name. + */ + public static Object getAnnotationAttribute(Annotation a, String attrName) { + try { + Method method = a.annotationType().getMethod(attrName); + return method.invoke(a); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } catch (SecurityException e) { + throw new AssertionError(e); + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } catch (IllegalArgumentException e) { + throw new AssertionError(e); + } catch (InvocationTargetException e) { + throw new AssertionError(e); + } + } + + /** + * Returns true if field with given name exists in given class. + */ + public static boolean fieldExists(Class clazz, String fname) { + try { + clazz.getDeclaredField(fname); + return true; + } catch (NoSuchFieldException e) { + return false; + } + } + + /** + * Sets field with specified value in spite of access permission. + * + * @throws AssertionError if field is final + */ + public static void setField(Field f, Object this_, Object value) { + try { + f.setAccessible(true); + f.set(this_, value); + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } + } + + /** + * Sets field with specified value in spite of access permission. + * + * @throws AssertionError if no such field in the class or field is final + */ + public static void setField(Class clazz, String fname, Object this_, Object value, boolean isSearchSuperclass) { + try { + Field f = findField(clazz, fname, isSearchSuperclass); + setField(f, this_, value); + } catch (NoSuchFieldException e) { + throw new AssertionError(e); + } + } + + /** + * Gets value of field in spite of access permission. + */ + public static Object getField(Field f, Object this_) { + try { + f.setAccessible(true); + return f.get(this_); + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } + } + + public static Object getDeclaredField(String name, Object this_) { + try { + Field field = this_.getClass().getDeclaredField(name); + field.setAccessible(true); + return getField(field, this_); + } catch (SecurityException e) { + throw new AssertionError(e); + } catch (NoSuchFieldException e) { + throw new AssertionError(e); + } + } + + /** + * Gets value of field in spite of access permission. + * + * @throws AssertionError if no such field in the class + */ + public static Object getField(Class clazz, String fname, Object this_, boolean isSearchSuperclass) { + try { + Field f = findField(clazz, fname, isSearchSuperclass); + return getField(f, this_); + } catch (NoSuchFieldException e) { + throw new AssertionError(e); + } + } + + private static Field findField(Class clazz, String fname, + boolean isSearchSuperclass) throws NoSuchFieldException, + AssertionError { + Field f = null; + try{ + f = clazz.getDeclaredField(fname); + } + catch(NoSuchFieldException e) { + + } + if (f == null && isSearchSuperclass) { + do{ + clazz = clazz.getSuperclass(); + if (clazz == null) { + throw new NoSuchFieldException("Class " + clazz + " has no such field: %s" + fname); //$NON-NLS-1$ //$NON-NLS-2$ + } + try{ + f = clazz.getDeclaredField(fname); + } + catch(NoSuchFieldException e) { + + } + } + while(f == null); + } + return f; + } + + /** + * Creates new object using default constructor without access check. + * + * @return an instance of specified class. + */ + public static T createObject(Class clazz) { + try { + Constructor constr = clazz.getDeclaredConstructor(); + constr.setAccessible(true); + return constr.newInstance(); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } catch (SecurityException e) { + throw new AssertionError(e); + } catch (InstantiationException e) { + throw new AssertionError(e); + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } catch (IllegalArgumentException e) { + throw new AssertionError(e); + } catch (InvocationTargetException e) { + throw new AssertionError(e); + } + } + + /** + * Creates new object using constructor with given parameters, without access check. + * + * @return an instance of specified class. + */ + public static T createObject(Class clazz, Class[] paramTypes, Object... args) { + try { + Constructor constr = clazz.getDeclaredConstructor(paramTypes); + constr.setAccessible(true); + return constr.newInstance(args); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } catch (SecurityException e) { + throw new AssertionError(e); + } catch (InstantiationException e) { + throw new AssertionError(e); + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } catch (IllegalArgumentException e) { + throw new AssertionError(e); + } catch (InvocationTargetException e) { + throw new AssertionError(e); + } + } + + /** + * Returns return type of given method in given class. + */ + public static Class getMethodReturnType(Class clazz, String methodName) { + try { + Method method = clazz.getDeclaredMethod(methodName); + return method.getReturnType(); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } catch (SecurityException e) { + throw new AssertionError(e); + } + } + + /** + * Looks for non-overloaded method declaring in given class. + * + * @throws AssertionError if method is not found, or more than 1 methods found. + */ + public static Method findMethod(Class clazz, String methodName) { + Method[] methods; + try { + methods = clazz.getDeclaredMethods(); + } catch (SecurityException e) { + throw new AssertionError(e); + } + Method found = null; + for (Method m : methods) { + if (m.getName().equals(methodName)) { + if (found != null) { + throw new AssertionError("Multiple methods " + methodName + " found in " + clazz + ": " + found + ", " + m); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + } + found = m; + } + } + if (found == null) { + throw new AssertionError("Method " + methodName + " is not found in " + clazz); //$NON-NLS-1$ //$NON-NLS-2$ + } + return found; + } + + /** + * Looks for method with given name and parameter types declared in given class. + * + * @throws AssertionError if method is not found. + */ + public static Method findMethod(Class clazz, String methodName, Class... paramTypes) { + try { + return clazz.getDeclaredMethod(methodName, paramTypes); + } catch (NoSuchMethodException e) { + throw new AssertionError(e); + } catch (SecurityException e) { + throw new AssertionError(e); + } + } + + /** + * Looks for methods annotated with {@code annot} in specified class. + * + * @return list of annotated methods (empty if none found) + */ + public static List findAnnotatedMethods(Class clazz, Class annot) { + try { + final List foundMethods = new LinkedList(); + + final Method[] allMethods = clazz.getDeclaredMethods(); + for (Method m : allMethods) { + if (m.getAnnotation(annot) != null) { + foundMethods.add(m); + } + } + + return foundMethods; + + } catch (SecurityException e) { + throw new AssertionError(e); + } + } + + /** + * Invokes given method with given arguments. + * For instance method the 1st argument is used as {@code this}. + * + * @throws AssertionError if error happened or method has thrown an exception. + */ + public static Object invokeMethod(Method method, Object... args) { + try { + return invokeMethodHandleException(method, args); + } catch (InvocationTargetException e) { + throw new AssertionError(e); + } + } + + /** + * Invokes given method with given arguments. + * For instance method the 1st argument is used as {@code this}. + *
+ * Unlike {@link #invokeMethod(Method, Object...)} an exception thrown from target method is + * not treated as error. + * + * @throws AssertionError if error happened. + */ + public static Object invokeMethodHandleException(Method method, Object... args) throws InvocationTargetException { + try { + method.setAccessible(true); + if (Modifier.isStatic(method.getModifiers())) { + return method.invoke(null, args); + } else { + Object this_ = args[0]; + Object[] newArgs = new Object[args.length - 1]; + System.arraycopy(args, 1, newArgs, 0, args.length - 1); + return method.invoke(this_, newArgs); + } + } catch (IllegalAccessException e) { + throw new AssertionError(e); + } catch (IllegalArgumentException e) { + throw new AssertionError(e); + } + } + + /** + * Return {@code true} if given class has instance fields. + * Does not check superclass. + */ + public static boolean hasInstanceFields(Class clazz) { + Field[] fields = clazz.getDeclaredFields(); + for (Field f : fields) { + if (!Modifier.isStatic(f.getModifiers())) { + return true; + } + } + return false; + } + + /** + * Looks for a class with given name. + * + * @throws AssertionError if class is not found. + */ + public static Class findClass(String className) { + try { + return Class.forName(className, false, ReflectionUtils.class.getClassLoader()); + } catch (ClassNotFoundException e) { + throw new AssertionError(e); + } + } + + /** + * Looks for enclosed class with the given name. + * + * @param host enclosing class + * @param className enclosed class name + * @return found class or {@code null} if no such class. + */ + public static Class findDeclaredClass(Class host, String className) { + String fqName = host.getName() + "$" + className; //$NON-NLS-1$ + for (Class c: host.getDeclaredClasses()) { + if (c.getName().equals(fqName)) + return c; + } + return null; + } + + /** + * Walks object graph + */ + public static void visitObjectTree(Object obj, IVisitFieldsFilter filter, IClosure visitor) { + VisitedFieldInfo fieldInfo = new VisitedFieldInfo(new ObjectTreePath(new StringBuilder(obj.getClass().getSimpleName().toString())), null, obj); + visitObjectTree(fieldInfo, filter, new HashSet(), visitor); + } + + public static void visitObjectTree(VisitedFieldInfo fieldInfo, IVisitFieldsFilter filter, Set visitedObjects, IClosure visitor) { + if (fieldInfo.fieldValue == null) { + return; + } + visitor.execute(fieldInfo); + if (!visitedObjects.add(fieldInfo.fieldValue)) { + return; + } + + Object obj = fieldInfo.fieldValue; + Class c = obj.getClass(); + if (filter != null && (filter.reject(getPackage(obj)) || filter.reject(obj.getClass()))) { + return; + } + while(c != null) { + Field[] declaredFields = c.getDeclaredFields(); + for (int i = 0; i < declaredFields.length; i++) { + Field declaredField = declaredFields[i]; + Class fieldType = declaredField.getType(); + if (fieldType.isPrimitive()) { + continue; + } + Object declFieldValue = getField(declaredField, obj); + if (declFieldValue == null) { + continue; + } + String classHint = String.format("(%s)", declFieldValue.getClass().getSimpleName()); + if (!fieldType.isArray()) { + VisitedFieldInfo subfieldInfo = new VisitedFieldInfo(fieldInfo.objectTreePath.append(declaredField.getName()+classHint), declaredField, declFieldValue); + visitObjectTree(subfieldInfo, filter, visitedObjects, visitor); + } + else { + int length = Array.getLength(declFieldValue); + for (int j = 0; j < length; j++) { + Object declFieldArrayValue = Array.get(declFieldValue, j); + VisitedFieldInfo subfieldInfo = new VisitedFieldInfo(fieldInfo.objectTreePath.append(String.format("[%s]%s", j, classHint)), null, declFieldArrayValue); + visitObjectTree(subfieldInfo, filter, visitedObjects, visitor); + } + } + } + c = c.getSuperclass(); + } + } + + private static String getPackage(Object obj) { + Package p = obj.getClass().getPackage(); + if (p == null) { + return ""; + } + else{ + return p.getName(); + } + } + + @SuppressWarnings("rawtypes") + public static final IVisitFieldsFilter COMMON_FIELDS_FILTER = new com.excelsior.xds.core.utils.ReflectionUtils.VisitFieldsFilter(Arrays.asList((Class)String.class), Arrays.asList("org.eclipse")); + + @SuppressWarnings("rawtypes") + public static class VisitFieldsFilter implements IVisitFieldsFilter{ + private final Set rejectedClasses; + private final Set packages; + + public VisitFieldsFilter(Collection rejectedClasses, + Collection packages) { + this.rejectedClasses = new HashSet(rejectedClasses); + this.packages = new HashSet(packages); + } + + @Override + public boolean reject(Class c) { + return rejectedClasses.contains(c); + } + + @Override + public boolean reject(String pkg) { + for (String p : packages) { + if (pkg.contains(p)) { + return true; + } + } + return false; + } + } + + /** + * Skip visiting of the rejected classes fields + * @author lsa80 + */ + public static interface IVisitFieldsFilter { + boolean reject(Class c); + boolean reject(String packageName); + } + + public static class VisitedFieldInfo { + public final ObjectTreePath objectTreePath; + public final Field field; + public final Object fieldValue; + + public VisitedFieldInfo(ObjectTreePath objectTreePath, Field field, + Object fieldValue) { + this.objectTreePath = objectTreePath; + this.field = field; + this.fieldValue = fieldValue; + } + } + + public static class ObjectTreePath{ + private final StringBuilder path; + + public ObjectTreePath() { + path = new StringBuilder(); + } + + public ObjectTreePath(StringBuilder path) { + this.path = path; + } + + public ObjectTreePath append(String fieldName) { + StringBuilder prefix = new StringBuilder(path); + if (prefix.length() > 0) { + if (!fieldName.contains("[")) { + prefix.append('.'); + } + } + return new ObjectTreePath(prefix.append(fieldName)); + } + + public boolean isEmpty() { + return this.path.length() == 0; + } + + @Override + public String toString() { + return path.toString(); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/XdsFileUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/XdsFileUtils.java new file mode 100644 index 0000000..721acd4 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/XdsFileUtils.java @@ -0,0 +1,200 @@ +package com.excelsior.xds.core.utils; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; + +import com.excelsior.xds.core.resource.ResourceUtils; + +/** + * Utility class for recognizing XDS files. + */ +public final class XdsFileUtils { + /** + * Only static method are allowed - this class should have no state + */ + private XdsFileUtils() { + } + + public static final String XDS_PROJECT_FILE_EXTENSION = "prj"; //$NON-NLS-1$ + public static final String XDS_REDIRECTION_FILE_EXTENSION = "red"; //$NON-NLS-1$ + public static final String XDS_SYMBOL_FILE_EXTENSION = "sym"; //$NON-NLS-1$ + + public static final String MODULA_PROGRAM_MODULE_FILE_EXTENSION = "mod"; //$NON-NLS-1$ + public static final String MODULA_DEFINITION_MODULE_FILE_EXTENSION = "def"; //$NON-NLS-1$ + + public static final String OBERON_MODULE_FILE_EXTENSION = "ob2"; //$NON-NLS-1$ + public static final String OBERON_DEFINITION_MODULE_FILE_EXTENSION = "odf"; //$NON-NLS-1$ + + public static final String XDS_DBGSCRIPT_FILE_EXTENSION = "pkt"; //$NON-NLS-1$ + public static final String XDS_DBGSCRIPT_BUNDLE_FILE_EXTENSION = "ldp"; //$NON-NLS-1$ + public static final String XDS_DBGSCRIPT_OUTPUT_FILE_EXTENSION = "res"; //$NON-NLS-1$ + + public static Set MODULA_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { MODULA_PROGRAM_MODULE_FILE_EXTENSION + , MODULA_DEFINITION_MODULE_FILE_EXTENSION } + )); + + public static Set OBERON_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { OBERON_MODULE_FILE_EXTENSION + , OBERON_DEFINITION_MODULE_FILE_EXTENSION } + )); + + public static Set XDS_DBGSCRIPT_UNIT_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { XDS_DBGSCRIPT_FILE_EXTENSION + , XDS_DBGSCRIPT_BUNDLE_FILE_EXTENSION + , XDS_DBGSCRIPT_OUTPUT_FILE_EXTENSION } + )); + + public static Set XDS_DBGSCRIPT_SOURCE_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { XDS_DBGSCRIPT_FILE_EXTENSION + , XDS_DBGSCRIPT_BUNDLE_FILE_EXTENSION } + )); + + public static Set COMPILATION_UNIT_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { MODULA_PROGRAM_MODULE_FILE_EXTENSION + , MODULA_DEFINITION_MODULE_FILE_EXTENSION + , OBERON_MODULE_FILE_EXTENSION + , OBERON_DEFINITION_MODULE_FILE_EXTENSION } + )); + + public static Set PROGRAM_MODULE_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { MODULA_PROGRAM_MODULE_FILE_EXTENSION + , OBERON_MODULE_FILE_EXTENSION } + )); + + public static Set DEFINITION_MODULE_FILE_EXTENSIONS = new HashSet( + Arrays.asList(new String[] { MODULA_DEFINITION_MODULE_FILE_EXTENSION + , OBERON_DEFINITION_MODULE_FILE_EXTENSION } + )); + + + public static boolean isXdsFile (String fileName) { + return isCompilationUnitFile(fileName) || isXdsProjectFile(fileName); + } + + public static boolean isModulaFile(IFile f) { + return isModulaFile(ResourceUtils.getAbsolutePath(f)); + } + + public static boolean isModulaFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return MODULA_FILE_EXTENSIONS.contains(fileExt); + } + + public static boolean isOberonFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return OBERON_FILE_EXTENSIONS.contains(fileExt); + } + + public static boolean isCompilationUnitFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return COMPILATION_UNIT_FILE_EXTENSIONS.contains(fileExt); + } + + public static boolean isCompilationUnitFile(IFile f) { + return isCompilationUnitFile(ResourceUtils.getAbsolutePath(f)); + } + + public static boolean isProgramModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return PROGRAM_MODULE_FILE_EXTENSIONS.contains(fileExt); + } + + public static boolean isModulaProgramModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return MODULA_PROGRAM_MODULE_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isModulaDefinitionModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return MODULA_DEFINITION_MODULE_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isDefinitionModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return DEFINITION_MODULE_FILE_EXTENSIONS.contains(fileExt); + } + + public static boolean isOberonModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return OBERON_MODULE_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isOberonDefinitionModuleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return OBERON_DEFINITION_MODULE_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isDefinitionModuleOrOberonModuleFile (String fileName) { + return isDefinitionModuleFile(fileName) || isOberonModuleFile(fileName); + } + + public static boolean isXdsProjectFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return XDS_PROJECT_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isAnyOfDbgScriptSourceFiles (IFile f) { + return isAnyOfDbgScriptSourceFiles(ResourceUtils.getAbsolutePath(f)); + } + + /** + * test for *.PKT or .LDP files + */ + public static boolean isAnyOfDbgScriptSourceFiles (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return XDS_DBGSCRIPT_SOURCE_FILE_EXTENSIONS.contains(fileExt); + } + + /** + * test for *.PKT files + */ + public static boolean isDbgScriptFile (IFile f) { + return isDbgScriptFile(ResourceUtils.getAbsolutePath(f)); + } + + /** + * test for *.PKT files + */ + public static boolean isDbgScriptFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return XDS_DBGSCRIPT_FILE_EXTENSION.equals(fileExt); + } + + /** + * test for *.PKT files + */ + public static boolean isDbgScriptBundleFile (IFile f) { + return isDbgScriptBundleFile(ResourceUtils.getAbsolutePath(f)); + } + + /** + * test for *.LDP files + */ + public static boolean isDbgScriptBundleFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return XDS_DBGSCRIPT_BUNDLE_FILE_EXTENSION.equals(fileExt); + } + + public static boolean isSymbolFile (String fileName) { + String fileExt = getLowercasedExtension(fileName); + return XDS_SYMBOL_FILE_EXTENSION.equals(fileExt); + } + + public static String getLowercasedExtension (String fileName) { + return StringUtils.lowerCase(FilenameUtils.getExtension(fileName)); + } + + public static String getProgramModuleFileName(String moduleName) { + return moduleName + "." + MODULA_PROGRAM_MODULE_FILE_EXTENSION; + } + + public static String getDefinitionModuleFileName(String moduleName) { + return moduleName + "." + MODULA_DEFINITION_MODULE_FILE_EXTENSION; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/YourkitProfilerController.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/YourkitProfilerController.java new file mode 100644 index 0000000..54f0a5d --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/YourkitProfilerController.java @@ -0,0 +1,104 @@ +package com.excelsior.xds.core.utils; + +/** + * Sample usage: + * YourkitProfilerController.startProfiler(); + YourkitProfilerController.startCpuProfiling(YourkitProfilerController.CPU_SAMPLING, YourkitProfilerController.DEFAULT_FILTERS); + + YourkitProfilerController.captureSnapshot(YourkitProfilerController.SNAPSHOT_WITHOUT_HEAP); + */ +public class YourkitProfilerController { + private static Object profiler; + + public static long CPU_SAMPLING; + public static long CPU_TRACING; + public static long CPU_J2EE; + public static long SNAPSHOT_WITHOUT_HEAP; + public static long SNAPSHOT_WITH_HEAP; + + public static String DEFAULT_FILTERS; + + public static void startProfiler() { + Class controllerClazz; + Class profilingModesClazz; + try { + controllerClazz = Class.forName("com.yourkit.api.Controller"); + profilingModesClazz = Class.forName("com.yourkit.api.ProfilingModes"); + + DEFAULT_FILTERS = (String)ReflectionUtils.getField(controllerClazz, "DEFAULT_FILTERS", null, true); + DEFAULT_FILTERS += System.getProperty("line.separator")+"com.excelsior.asda.dashmap.core.utils.YourkitProfilerController"; + DEFAULT_FILTERS += System.getProperty("line.separator")+"com.excelsior.asda.dashmap.ui.gis.JMapPaneProfiler"; + System.out.println("DEFAULT_FILTERS:"+DEFAULT_FILTERS); + + CPU_SAMPLING = (Long)ReflectionUtils.getField(profilingModesClazz, "CPU_SAMPLING", null, true); + CPU_TRACING = (Long)ReflectionUtils.getField(profilingModesClazz, "CPU_TRACING", null, true); + CPU_J2EE = (Long)ReflectionUtils.getField(profilingModesClazz, "CPU_J2EE", null, true); + SNAPSHOT_WITHOUT_HEAP = (Long)ReflectionUtils.getField(profilingModesClazz, "SNAPSHOT_WITHOUT_HEAP", null, true); + SNAPSHOT_WITH_HEAP = (Long)ReflectionUtils.getField(profilingModesClazz, "SNAPSHOT_WITH_HEAP", null, true); + } catch (Exception e) { + System.out.println("Profiler not present:" + e); + return; + } + + try { + profiler = controllerClazz.newInstance(); + } catch (Exception e) { + System.out.println("startProfiler: Profiler was active, but failed due: " + e); + } + } + + public static void takeMemorySnapshot() { + if (profiler != null) { + try { + profiler.getClass().getMethod("forceGC").invoke(profiler); + profiler.getClass().getMethod("captureMemorySnapshot").invoke(profiler); + } catch (Exception e) { + System.out.println("takeMemorySnapshot: Profiler was active, but failed due: " + e); + } + } + else{ + System.out.println("takeMemorySnapshot: Profiler not present"); + } + } + + public static void startCpuProfiling(long mode, String filters) { + if (profiler != null) { + try { + profiler.getClass().getMethod("startCPUProfiling", long.class, String.class).invoke(profiler, mode, filters); + } catch (Exception e) { + System.out.println("startCpuProfiling: Profiler was active, but failed due: " + e); + } + } + else{ + System.out.println("startCpuProfiling: Profiler not present"); + } + } + + public static void stopCPUProfiling() { + if (profiler != null) { + try { + profiler.getClass().getMethod("stopCPUProfiling").invoke(profiler); + } catch (Exception e) { + System.out.println("stopCPUProfiling: Profiler was active, but failed due: " + e); + } + } + else{ + System.out.println("stopCPUProfiling: Profiler not present"); + } + } + + public static void captureSnapshot(long snapshotFlags) { + if (profiler != null) { + try { + String path = (String)profiler.getClass().getMethod("captureSnapshot", long.class).invoke(profiler, snapshotFlags); + System.out.println(); + System.out.println("Snapshot was captured to path:" + path); + } catch (Exception e) { + System.out.println("captureSnapshot: Profiler was active, but failed due: " + e); + } + } + else{ + System.out.println("captureSnapshot: Profiler not present"); + } + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ArrayListStack.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ArrayListStack.java new file mode 100644 index 0000000..ff22f96 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ArrayListStack.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.core.utils.collections; + +import java.util.ArrayList; + +/** + * The Stack class represents a last-in-first-out + * (LIFO) stack of objects. It extends class ArrayList. + * + * When a stack is first created, it contains no items. + */ +public class ArrayListStack extends ArrayList { + + /** + * Constructs an empty stack with an initial capacity of ten. + */ + public ArrayListStack() { + this(10); + } + + /** + * Constructs an empty stack with the specified initial capacity. + * + * @param initialCapacity the initial capacity of the list + */ + public ArrayListStack (int initialCapacity) { + super(initialCapacity); + } + + private static final long serialVersionUID = 236346862596086763L; + + public void push(T o) { + add(o); + } + + public T pop() { + return remove(size() - 1); + } + + public boolean empty() { + return size() == 0; + } + + public T peek() { + return get(size() - 1); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/BaseTypeIterator.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/BaseTypeIterator.java new file mode 100644 index 0000000..f22d980 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/BaseTypeIterator.java @@ -0,0 +1,36 @@ +package com.excelsior.xds.core.utils.collections; +import java.util.Iterator; + +public class BaseTypeIterator implements Iterator +{ + private final Iterator iterator; + + public BaseTypeIterator(Iterator iterator) { + this.iterator = iterator; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean hasNext() { + return iterator.hasNext(); + } + + /** + * {@inheritDoc} + */ + @Override + public T next() { + return iterator.next(); + } + + /** + * {@inheritDoc} + */ + @Override + public void remove() { + iterator.remove(); + } + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/CollectionsUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/CollectionsUtils.java new file mode 100644 index 0000000..344afda --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/CollectionsUtils.java @@ -0,0 +1,159 @@ +package com.excelsior.xds.core.utils.collections; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +import org.apache.commons.collections.CollectionUtils; + +import com.google.common.base.Function; +import com.google.common.collect.Collections2; + +public final class CollectionsUtils { + /** + * Binary search implementation + * @param list to search at + * @param director 'directs' the binary search where to look for the element + * @return element found or null + * @see ISearchDirector + */ + public static T binarySearch(List list, ISearchDirector director) { + if (CollectionUtils.isEmpty(list)) { + return null; + } + + int idx = indexBinarySearch(list, director); + if (idx > -1) { + return list.get(idx); + } + else { + return null; + } + } + + /** + * @param list to search at + * @param director director 'directs' the binary search where to look for the element + * @return index of the element, or value from which is possible to devise the insertion position + * @see {@link java.util.Collections#binarySearch} + */ + public static int indexBinarySearch(List list, ISearchDirector director) { + if (CollectionUtils.isEmpty(list)) { + return -1; + } + + int left = 0; + int right = list.size() -1; + + while(left <= right) + { + int middle = (left + right) >>> 1; + T key = list.get(middle); + int direction = director.direct(key); + if (direction > 0) + { + left = middle + 1; + } + else if (direction < 0) + { + right = middle - 1; + } + else{ + return middle; + } + } + + return -(left + 1); + } + + /** + * Founds all values between (inclusive) the two boundaries + * @param list + * @param lowerBoundDirector - search director to found the lower bound + * @param upperBoundDirector - search director to found the upper bound + * @return values between + * @see {@link ISearchDirector} + */ + public static List between(List list, ISearchDirector lowerBoundDirector, ISearchDirector upperBoundDirector) { + int lowerBoundIdx = indexBinarySearch(list, lowerBoundDirector); + int upperBoundIdx = indexBinarySearch(list, upperBoundDirector); + if (lowerBoundIdx < 0 ) { + lowerBoundIdx = -lowerBoundIdx - 1; + } + + if (upperBoundIdx < 0 ) { + upperBoundIdx = -upperBoundIdx - 1; + } + else { + ++upperBoundIdx; + } + + return list.subList(lowerBoundIdx, upperBoundIdx); + } + + public static Set newConcurentHashSet() { + return Collections.newSetFromMap(new ConcurrentHashMap()); + } + + public static Set newConcurentHashSet(int initialCapacity) { + return Collections.newSetFromMap(new ConcurrentHashMap(initialCapacity)); + } + + /** + * Create collection of the first elements of the pair using collections of pairs. + */ + public static Collection bindFirst(Collection> pairs) { + return Collections2.transform(pairs, new Function, T>() { + @Override + public T apply(Pair input) { + return input.getFirst(); + } + }); + } + + /** + * Create collection of the second elements of the pair using collections of pairs. + */ + public static Collection bindSecond(Collection> pairs) { + return Collections2.transform(pairs, new Function, U>() { + @Override + public U apply(Pair input) { + return input.getSecond(); + } + }); + } + + /** + * @param c + * @return size of {@link c} if c is not {@code null}, 0 otherwise + */ + public static int size(Collection c) { + return c != null? c.size() : 0; + } + + public static T last(List list) { + return list != null && !list.isEmpty() ? list.get(list.size() - 1) : null; + } + + public static List unmodifiableArrayList(Collection elements) { + return Collections.unmodifiableList(new ArrayList(elements)); + } + + public static List unmodifiableArrayList(Collection elements, Class castClass) { + return Collections.unmodifiableList(new ArrayList(elements)); + } + + @SafeVarargs + public static T[] array(T...ts) { + return ts; + } + + /** + * Cannot instantiate this class, static methods only + */ + private CollectionsUtils(){ + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ISearchDirector.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ISearchDirector.java new file mode 100644 index 0000000..a6a3415 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/ISearchDirector.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.core.utils.collections; + +/** + * Helper interface, to perform search using the + * com.excelsior.xds.core.utils.collections.CollectionsUtils.binarySearch + * @author lsa80 + * @see ISearchDirector#direct(Object) + */ +public interface ISearchDirector { + /** + * returns -1, 0 or 1 if the search should look left, succeeded (i.e. element is found), or right. + * @return + */ + int direct(T key); +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/IntStack.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/IntStack.java new file mode 100644 index 0000000..9bfc16a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/IntStack.java @@ -0,0 +1,58 @@ +package com.excelsior.xds.core.utils.collections; + +import java.util.EmptyStackException; + +/** + * Simple stack for integer values. + */ +public class IntStack { + + private int[] data; + private int size; + + public IntStack(int initialCapacity) { + data = new int[initialCapacity]; + size = 0; + } + + public IntStack() { + this(5); + } + + public void push(int t) { + if (size >= data.length) { + int[] newdata = new int[data.length * 3 / 2]; + System.arraycopy(data, 0, newdata, 0, size); + data = newdata; + } + data[size++] = t; + } + + public int peek() { + if (size == 0) throw new EmptyStackException(); + return data[size - 1]; + } + + public int pop() { + if (size == 0) throw new EmptyStackException(); + return data[--size]; + } + + public boolean empty() { + return size == 0; + } + + @Override + public boolean equals(Object o) { + if (o instanceof IntStack) { + IntStack otherStack = (IntStack)o; + if (size != otherStack.size) return false; + for (int i = 0; i < otherStack.size; i++) { + if (data[i] != otherStack.data[i]) return false; + } + return true; + } + + return false; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/Pair.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/Pair.java new file mode 100644 index 0000000..8fb5a41 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/Pair.java @@ -0,0 +1,80 @@ +package com.excelsior.xds.core.utils.collections; + +/** + * Utility class representing pair of objects + * + * @param + * @param + */ +public class Pair { + + private K first; + private V second; + + public Pair(K first, V second) { + super(); + this.first = first; + this.second = second; + } + + public static Pair create(K first, V second){ + return new Pair(first, second); + } + + @SuppressWarnings("unchecked") + public static Pair[] createArray(int size) { + return new Pair[size]; + } + + public K getFirst() { + return first; + } + + public void setFirst(K first) { + this.first = first; + } + + public V getSecond() { + return second; + } + + public void setSecond(V second) { + this.second = second; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((first == null) ? 0 : first.hashCode()); + result = prime * result + ((second == null) ? 0 : second.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Pair other = (Pair) obj; + if (first == null) { + if (other.first != null) + return false; + } else if (!first.equals(other.first)) + return false; + if (second == null) { + if (other.second != null) + return false; + } else if (!second.equals(other.second)) + return false; + return true; + } + + @Override + public String toString() { + return "Pair [First=" + first + ", Second=" + second + "]"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XListUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XListUtils.java new file mode 100644 index 0000000..c85c940 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XListUtils.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.core.utils.collections; + +import java.util.ArrayList; + +public final class XListUtils { + private XListUtils(){ + super(); + } + public static ArrayList getElementsAsArrayList(Iterable iterable) { + ArrayList list = new ArrayList(); + for (T e : iterable) { + list.add(e); + } + return list; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XMapUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XMapUtils.java new file mode 100644 index 0000000..687ab11 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/collections/XMapUtils.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.core.utils.collections; + +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; + + +/** + * XMapUtils in order not to confuse with org.apache.commons.collections.MapUtils + * @author lsa80 + */ +public final class XMapUtils { + private XMapUtils(){ + super(); + } + + public static Map newHashMap(T key, U value) { + Map m = new HashMap(); + + m.put(key, value); + + return m; + } + + public static Map newLinkedHashMap(T key, U value) { + Map m = new LinkedHashMap(); + + m.put(key, value); + + return m; + } + + public static Map newHashMap(T[] keys, U[] values) { + Map m = new HashMap(); + + for (int i = 0; i < keys.length; i++) { + m.put(keys[i], values[i]); + } + + return m; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/io/StreamUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/io/StreamUtils.java new file mode 100644 index 0000000..b197314 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/io/StreamUtils.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.core.utils.io; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.nio.charset.Charset; + +import com.excelsior.xds.core.log.LogHelper; + +public final class StreamUtils { + private static final int DEFAULT_WAIT_TIME = 200; + private static final int DEFAULT_ATTEMPT_COUNT = 300; + + public static FileInputStream tryOpenInputPipe(String pipeName) throws FileNotFoundException { + return tryOpenInputPipe(pipeName, DEFAULT_ATTEMPT_COUNT, DEFAULT_WAIT_TIME); + } + + public static FileInputStream tryOpenInputPipe(String pipeName, int attemptCount, int waitTime) throws FileNotFoundException { + for (int i = 0; i < attemptCount; i++) { + try{ + return new FileInputStream(pipeName); + } + catch(FileNotFoundException e) { + try { + Thread.sleep(waitTime); + } catch (InterruptedException e1) { + LogHelper.logError(e); + } + } + } + throw new FileNotFoundException("Pipe " + pipeName); + } + + public static FileOutputStream tryOpenOutputPipe(String pipeName) throws FileNotFoundException { + return tryOpenOutputPipe(pipeName, DEFAULT_ATTEMPT_COUNT, DEFAULT_WAIT_TIME); + } + + public static FileOutputStream tryOpenOutputPipe(String pipeName, int attemptCount, int waitTime) throws FileNotFoundException { + for (int i = 0; i < attemptCount; i++) { + try{ + return new FileOutputStream(pipeName); + } + catch(FileNotFoundException e) { + try { + Thread.sleep(waitTime); + } catch (InterruptedException e1) { + LogHelper.logError(e); + } + } + } + throw new FileNotFoundException(); + } + + public static InputStreamReader createInputStreamReader(File file, String charsetName) throws FileNotFoundException, UnsupportedEncodingException { + Charset charset = charsetName == null? Charset.defaultCharset() : Charset.forName(charsetName); + return createInputStreamReader(file, charset); + } + + public static InputStreamReader createInputStreamReader(File file, Charset charset) throws FileNotFoundException, UnsupportedEncodingException { + FileInputStream is = new FileInputStream(file); + return new InputStreamReader(is, charset); + } + + private StreamUtils(){ + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/json/JsonUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/json/JsonUtils.java new file mode 100644 index 0000000..a35c59a --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/json/JsonUtils.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.core.utils.json; + +import java.util.ArrayList; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONException; + +public final class JsonUtils { + public static List toStringList(JSONArray arr) throws JSONException { + List l = new ArrayList(arr != null? arr.length() : 0); + if (arr != null) { + for (int i = 0; i < arr.length(); i++) { + l.add(arr.getString(i)); + } + } + return l; + } + + private JsonUtils(){ + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/launch/LaunchConfigurationUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/launch/LaunchConfigurationUtils.java new file mode 100644 index 0000000..b578ddd --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/launch/LaunchConfigurationUtils.java @@ -0,0 +1,125 @@ +package com.excelsior.xds.core.utils.launch; + +import java.util.Arrays; +import java.util.function.Predicate; +import java.util.stream.Stream; + +import org.apache.commons.lang.ObjectUtils; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.core.ILaunchManager; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.project.ProjectUtils; +import com.excelsior.xds.core.project.launcher.ILaunchConfigConst; +import com.excelsior.xds.core.utils.IClosure; +import com.google.common.base.Objects; + +/** + * Helper methods to work with launch configurations. + * @author lsa80 + */ +public final class LaunchConfigurationUtils { + private LaunchConfigurationUtils() { + } + + public static void modifyLaunchConfiguration(ILaunchConfiguration config, + IClosure configWorkingCopyAccessor) throws CoreException { + ILaunchConfigurationWorkingCopy workingCopy = config.getWorkingCopy(); + configWorkingCopyAccessor.execute(workingCopy); + workingCopy.doSave(); + } + + /** + * Project referred by this launch + * @param config + * @return + * @throws CoreException + */ + public static IProject getProject(ILaunchConfiguration config) throws CoreException { + if (config == null) { + return null; + } + String projectName = getProjectName(config); + if (projectName == null){ + return null; + } + return ProjectUtils.getProject(projectName); + } + + /** + * Gets the name of the corresponding (XDS IDE) {@link IProject} from the {@link ILaunchConfiguration} + * @param config + * @return + * @throws CoreException + */ + public static String getProjectName(ILaunchConfiguration config) + throws CoreException { + return config.getAttribute(ILaunchConfigConst.ATTR_PROJECT_NAME, (String)null); + } + + /** + * Get all XDS launches operating on the current project.
+ * {@link #getProject(ILaunchConfiguration)} method is used to determine whether launch it is the XDS launch.
+ * @param project current project + * @throws CoreException + */ + public static Stream getLaunches(IProject project) throws CoreException { + ILaunch[] launches = DebugPlugin.getDefault().getLaunchManager().getLaunches(); + return Arrays.stream(launches).filter(l -> projectPredicate(project).test(l.getLaunchConfiguration())); + } + + public static long countLaunches(IProject project, Predicate predicate) throws CoreException { + return getLaunches(project).filter(predicate).count(); + } + + public static Predicate projectPredicate(IProject p) { + return lc -> { + try { + return ObjectUtils.equals(p, getProject(lc)); + } catch (CoreException e) { + LogHelper.logError(e); + return false; + } + }; + } + + public static Predicate debugOrProfileLaunchPredicate() { + return debugLaunchPredicate().or(profileLaunchPredicate()); + } + + public static Predicate debugLaunchPredicate() { + return launch -> ILaunchManager.DEBUG_MODE.equals(launch.getLaunchMode()); + } + + public static Predicate profileLaunchPredicate() { + return launch -> ILaunchManager.PROFILE_MODE.equals(launch.getLaunchMode()); + } + + /** + *
Finds Modula launch associated with the given project, if any (there should be only one) + * @param project project to query + * @return + */ + public static ILaunch getLaunch(IProject project) { + ILaunchManager launchManager = DebugPlugin.getDefault().getLaunchManager(); + ILaunch[] launches = launchManager.getLaunches(); + for (ILaunch launch : launches) { + try { + IProject launchProject = getProject(launch.getLaunchConfiguration()); + if (launchProject == null){ + continue; + } + if (Objects.equal(launchProject, project)) { + return launch; + } + } catch (CoreException e) { + } + } + return null; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/ModificationStamp.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/ModificationStamp.java new file mode 100644 index 0000000..2b6c041 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/ModificationStamp.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.core.utils.time; + +import java.util.concurrent.atomic.AtomicLong; + +public class ModificationStamp +{ + /** + * Time stamp value guaranteed to be oldest + */ + public final static ModificationStamp OLDEST = new ModificationStamp(true); + + private final static AtomicLong globalModificationCount = new AtomicLong(0L); + + private final long modificationStampValue; + + public ModificationStamp() { + this(false); + } + + private ModificationStamp(boolean isOldest) { + if (isOldest) { + modificationStampValue = 0L; + } + else{ + modificationStampValue = globalModificationCount.incrementAndGet(); + } + } + + public long getModificationStampValue() { + return modificationStampValue; + } + + public boolean isGreaterThan(ModificationStamp ms) { + return this.modificationStampValue - ms.modificationStampValue > 0; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime + * result + + (int) (modificationStampValue ^ (modificationStampValue >>> 32)); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModificationStamp other = (ModificationStamp) obj; + if (modificationStampValue != other.modificationStampValue) + return false; + return true; + } + + @Override + public String toString() { + return ""+modificationStampValue; + } + + +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/TimeStamp.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/TimeStamp.java new file mode 100644 index 0000000..ae4b1b7 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/time/TimeStamp.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.core.utils.time; + +/** + * Represents system time at the moment of this object creation + * @author lion + */ +public final class TimeStamp +{ + final long time; + + public TimeStamp() { + time = System.currentTimeMillis(); + } + + public long getTime() { + return time; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (int) (time ^ (time >>> 32)); + return result; + } + + public boolean isGreaterThan(TimeStamp ts) { + return this.time - ts.time > 0; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TimeStamp other = (TimeStamp) obj; + if (time != other.time) + return false; + return true; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/ValidationResult.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/ValidationResult.java new file mode 100644 index 0000000..c7ce61b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/ValidationResult.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.core.utils.xml; + +public class ValidationResult { + private boolean isValid; + private String validationMessage; + + public ValidationResult(boolean isValid, String validationMessage) { + this.isValid = isValid; + this.validationMessage = validationMessage; + } + + public boolean isValid() { + return isValid; + } + + public String getValidationMessage() { + return validationMessage; + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/XmlUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/XmlUtils.java new file mode 100644 index 0000000..f4d60b2 --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/utils/xml/XmlUtils.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.core.utils.xml; + +import java.io.IOException; +import java.net.URI; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.xml.sax.SAXException; + +import com.excelsior.xds.core.log.LogHelper; + +public final class XmlUtils { + private XmlUtils() { + super(); + } + + public static ValidationResult validateAgainstSchema(URI uri, String xsdPath) throws IOException { + boolean isValid = true; + String validationMessage = ""; //$NON-NLS-1$ + + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + + factory.setValidating(true); + + factory.setAttribute( + "http://java.sun.com/xml/jaxp/properties/schemaLanguage", //$NON-NLS-1$ + "http://www.w3.org/2001/XMLSchema"); //$NON-NLS-1$ + factory.setAttribute( + "http://java.sun.com/xml/jaxp/properties/schemaSource", //$NON-NLS-1$ + xsdPath); + try { + DocumentBuilder parser = factory.newDocumentBuilder(); + parser.parse(uri.toString()); + } + catch (ParserConfigurationException e) { + isValid = false; + validationMessage = "Parser failure"; //$NON-NLS-1$ + LogHelper.logError(e); + } + catch (SAXException e) { + validationMessage = e.getMessage(); + isValid = false; + } + + return new ValidationResult(isValid, validationMessage); + } +} diff --git a/product/com.excelsior.xds.core/src/com/excelsior/xds/core/variables/VariableUtils.java b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/variables/VariableUtils.java new file mode 100644 index 0000000..ded203b --- /dev/null +++ b/product/com.excelsior.xds.core/src/com/excelsior/xds/core/variables/VariableUtils.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.core.variables; + +import java.util.regex.Pattern; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.variables.IStringVariableManager; +import org.eclipse.core.variables.VariablesPlugin; + +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.sdk.Sdk; + +/** + * String variable utilities. + */ +public final class VariableUtils { + public static final String XDS_HOME_VAR = "xds_home"; //$NON-NLS-1$ + + private VariableUtils() { + } + + public static String performStringSubstitution(String line) throws CoreException { + return performStringSubstitution(line, true); + } + + public static String performStringSubstitution(String line, boolean isReportUndefinedVariables) throws CoreException { + IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); + return manager.performStringSubstitution(line, isReportUndefinedVariables); + } + + public static String performStringSubstitution(Sdk context, String line) throws CoreException { + return performStringSubstitution(context, line, true); + } + + public static String performStringSubstitution(Sdk context, String line, boolean isReportUndefinedVariables) throws CoreException { + IStringVariableManager manager = VariablesPlugin.getDefault().getStringVariableManager(); + if (context != null) { + line = line.replaceAll(String.format(Pattern.quote("${%s}"), + XDS_HOME_VAR), StringUtils.replaceChars( + context.getSdkHomePath(), '\\', '/')); + } + line = manager.performStringSubstitution(line, isReportUndefinedVariables); + return line; + } + + public static String performStringSubstitution(IProject context, String line) throws CoreException { + XdsProjectSettings settings = XdsProjectSettingsManager.getXdsProjectSettings(context); + return performStringSubstitution(settings.getProjectSdk(), line); + } +} diff --git a/product/com.excelsior.xds.feature/.project b/product/com.excelsior.xds.feature/.project new file mode 100644 index 0000000..7e748b7 --- /dev/null +++ b/product/com.excelsior.xds.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.feature/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..1d9c803 --- /dev/null +++ b/product/com.excelsior.xds.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/feature_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.feature/build.properties b/product/com.excelsior.xds.feature/build.properties new file mode 100644 index 0000000..04e3f7d --- /dev/null +++ b/product/com.excelsior.xds.feature/build.properties @@ -0,0 +1,4 @@ +root=rootfiles/ +bin.includes = feature.xml,\ + feature.properties,\ + feature_ru.properties diff --git a/product/com.excelsior.xds.feature/feature.properties b/product/com.excelsior.xds.feature/feature.properties new file mode 100644 index 0000000..72157ca --- /dev/null +++ b/product/com.excelsior.xds.feature/feature.properties @@ -0,0 +1 @@ +featureDesription=Excelsior XDS Modula-2 development environment. Contains no XDS Development System. \ No newline at end of file diff --git a/product/com.excelsior.xds.feature/feature.xml b/product/com.excelsior.xds.feature/feature.xml new file mode 100644 index 0000000..91ec04e --- /dev/null +++ b/product/com.excelsior.xds.feature/feature.xml @@ -0,0 +1,939 @@ + + + + + %featureDesription + + + + (c) 2014 Excelsior LLC + + + + Excelsior Freeware License Agreement + +This License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and Excelsior, LLC ("Excelsior") for the Excelsior software product identified above, which includes computer software, electronic documentation, and the associated printed materials ("Software"). By installing, copying or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, you may not install or use the Software. + +LICENSE GRANT + +Excelsior hereby grants to you a non-exclusive, transferable limited license to use the accompanying Software on the following terms: + +You may: a. install and use the Software on any computer in your possession or under your control; and b. copy and redistribute the Software provided it is not modified in any way and you do not charge for its distribution without explicit prior written permission. + +You may not: a. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), or create derivative works based on the Software; b. sell, rent, lease, or charge for access to the Software; c. remove any proprietary notices or labels on the Software. or d. distribute the Software for a fee, whether as a stand-alone product, or as part of a compilation or anthology, without Excelsior's prior written consent; + +TITLE + +Title, ownership rights, and intellectual property rights in and to the Software, and any copies of the Software shall at all times remain with Excelsior and/or its suppliers. The Software is protected by the copyright laws of the Russian Federation and international copyright treaties. + +TECHNICAL SUPPORT AND UPDATES + +This Agreement does not entitle you to receive from Excelsior printed manuals, technical support, phone support, updates, or enhancements to the Software. Excelsior may at its own discretion offer fee-based support, consulting and custom engineering services for the Software. + +NO FAIL-SAFE USES + +The Software has been created using technologies that are not fault tolerant and thus the Software is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, including, but without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the technologies employed in the Software could lead directly to death, personal injury, or severe physical or environmental damage. + +DISCLAIMER OF WARRANTY + +THE SOFTWARE IS PROVIDED TO YOU "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EXCELSIOR AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY NATURE WHATSOEVER, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE. EXCELSIOR DOES NOT WARRANT THAT ANY OR ALL FAILURES OR ERRORS IN THE SOFTWARE WILL BE CORRECTED OR WARRANT THAT THE SOFTWARE'S FUNCTIONALITY WILL MEET YOUR REQUIREMENTS OR THAT THE SOFTWARE WILL OPERATE IN COMBINATIONS YOU SELECT. NO EXCELSIOR DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS DISCLAIMER. + +LIMITATION OF LIABILITY + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL EXCELSIOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF EXCELSIOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. + +TERMINATION + +You may terminate this license at any time by destroying all copies of the Software you received or made under this Agreement. This Agreement shall terminate automatically if you fail to comply with any of its terms and conditions. On such termination, you must destroy all copies of the Software you received or made under this Agreement. The Disclaimer of Warranty and Limitation of Liability sections above shall survive termination of this Agreement. + +This Agreement is the entire Agreement between us and supersedes any other communications, advertisements, or understandings with respect to the Software. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.feature/feature_ru.properties b/product/com.excelsior.xds.feature/feature_ru.properties new file mode 100644 index 0000000..781750a --- /dev/null +++ b/product/com.excelsior.xds.feature/feature_ru.properties @@ -0,0 +1 @@ +featureDesription=\u0421\u0440\u0435\u0434\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \u041d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 XDS \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \ No newline at end of file diff --git a/product/com.excelsior.xds.feature/feature_ru_1251.properties b/product/com.excelsior.xds.feature/feature_ru_1251.properties new file mode 100644 index 0000000..8f253a4 --- /dev/null +++ b/product/com.excelsior.xds.feature/feature_ru_1251.properties @@ -0,0 +1 @@ +featureDesription=Ñðåäà ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì. Íå ñîäåðæèò XDS ñèñòåìû ïðîãðàììèðîâàíèÿ. \ No newline at end of file diff --git a/product/com.excelsior.xds.feature/rootfiles/configuration/.settings/org.eclipse.ui.ide.prefs b/product/com.excelsior.xds.feature/rootfiles/configuration/.settings/org.eclipse.ui.ide.prefs new file mode 100644 index 0000000..3e3651e --- /dev/null +++ b/product/com.excelsior.xds.feature/rootfiles/configuration/.settings/org.eclipse.ui.ide.prefs @@ -0,0 +1,5 @@ +MAX_RECENT_WORKSPACES=5 +RECENT_WORKSPACES= +RECENT_WORKSPACES_PROTOCOL=3 +SHOW_WORKSPACE_SELECTION_DIALOG=false +eclipse.preferences.version=1 diff --git a/product/com.excelsior.xds.feature/rootfiles/dropins/readme.txt b/product/com.excelsior.xds.feature/rootfiles/dropins/readme.txt new file mode 100644 index 0000000..0dab9cf --- /dev/null +++ b/product/com.excelsior.xds.feature/rootfiles/dropins/readme.txt @@ -0,0 +1 @@ +Ðàçìåñòèòå íîâûé ìîäóëü ðàñøèðåíèÿ çäåñü \ No newline at end of file diff --git a/product/com.excelsior.xds.feature/rootfiles/epl-v10.html b/product/com.excelsior.xds.feature/rootfiles/epl-v10.html new file mode 100644 index 0000000..fd39122 --- /dev/null +++ b/product/com.excelsior.xds.feature/rootfiles/epl-v10.html @@ -0,0 +1,261 @@ + + + + + + +Eclipse Public License - Version 1.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.

+ + + + diff --git a/product/com.excelsior.xds.feature/rootfiles/logs/.empty b/product/com.excelsior.xds.feature/rootfiles/logs/.empty new file mode 100644 index 0000000..e69de29 diff --git a/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs b/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs new file mode 100644 index 0000000..e87a950 --- /dev/null +++ b/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.prefs @@ -0,0 +1,3 @@ +allowNonOKPlan=prompt +eclipse.preferences.version=1 +showLatestVersion=true diff --git a/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs b/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs new file mode 100644 index 0000000..4bdfa7e --- /dev/null +++ b/product/com.excelsior.xds.feature/rootfiles/p2/org.eclipse.equinox.p2.engine/profileRegistry/profile.profile/.data/.settings/org.eclipse.equinox.p2.ui.sdk.scheduler.prefs @@ -0,0 +1,6 @@ +autoUpdateInit=true +day=Every day +eclipse.preferences.version=1 +enabled=true +hour=1\:00 AM +migrated34Prefs=true diff --git a/product/com.excelsior.xds.help.ce.feature/.project b/product/com.excelsior.xds.help.ce.feature/.project new file mode 100644 index 0000000..6c69a8f --- /dev/null +++ b/product/com.excelsior.xds.help.ce.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.help.ce.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.help.ce.feature/build.properties b/product/com.excelsior.xds.help.ce.feature/build.properties new file mode 100644 index 0000000..64f93a9 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/product/com.excelsior.xds.help.ce.feature/feature.xml b/product/com.excelsior.xds.help.ce.feature/feature.xml new file mode 100644 index 0000000..1c6a4fc --- /dev/null +++ b/product/com.excelsior.xds.help.ce.feature/feature.xml @@ -0,0 +1,27 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/.classpath b/product/com.excelsior.xds.help.ce.nl_ru/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/.project b/product/com.excelsior.xds.help.ce.nl_ru/.project new file mode 100644 index 0000000..7c3a072 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.help.ce.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.help.ce.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..ad6b587 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.help.ce.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.help.ce;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.help.ce.nl_ru/build.properties b/product/com.excelsior.xds.help.ce.nl_ru/build.properties new file mode 100644 index 0000000..aa28400 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/build.properties @@ -0,0 +1,5 @@ +bin.includes = META-INF/,\ + fragment.properties,\ + fragment_ru.properties,\ + nl/,\ + plugin_ru.properties diff --git a/product/com.excelsior.xds.help.ce.nl_ru/fragment.properties b/product/com.excelsior.xds.help.ce.nl_ru/fragment.properties new file mode 100644 index 0000000..159bc92 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.help.ce Russian NLS Support diff --git a/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..3d500e7 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.help.ce \ No newline at end of file diff --git a/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..ca70b5b --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.help.ce diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableSoftwareSites.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableSoftwareSites.png new file mode 100644 index 0000000..48e8a45 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableSoftwareSites.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableUpdates.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableUpdates.png new file mode 100644 index 0000000..08cf490 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/AvailableUpdates.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationArguments.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationArguments.png new file mode 100644 index 0000000..c7e5bbd Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationArguments.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationCommon.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationCommon.png new file mode 100644 index 0000000..3c43fe0 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationCommon.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironment.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironment.png new file mode 100644 index 0000000..48aaa04 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironment.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentNew.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentNew.png new file mode 100644 index 0000000..766cdde Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentNew.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentSelect.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentSelect.png new file mode 100644 index 0000000..fae8fb7 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationEnvironmentSelect.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationSDKSettings.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationSDKSettings.png new file mode 100644 index 0000000..de328f1 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/CreateConfigurationSDKSettings.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptMain.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptMain.png new file mode 100644 index 0000000..24bcc08 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptMain.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptSDKSettings.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptSDKSettings.png new file mode 100644 index 0000000..b0b81ac Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/DebugScriptSDKSettings.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterIndent.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterIndent.png new file mode 100644 index 0000000..00e6e12 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterIndent.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterLinewrap.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterLinewrap.png new file mode 100644 index 0000000..06efd27 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterLinewrap.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterNewline.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterNewline.png new file mode 100644 index 0000000..16f606e Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterNewline.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterPrefs.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterPrefs.png new file mode 100644 index 0000000..858698a Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterPrefs.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterWhitespace.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterWhitespace.png new file mode 100644 index 0000000..cc47f36 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/FormatterWhitespace.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/IndentGuideExample.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/IndentGuideExample.png new file mode 100644 index 0000000..df4076e Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/IndentGuideExample.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponents.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponents.png new file mode 100644 index 0000000..8818432 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponents.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsAddTool3Way.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsAddTool3Way.png new file mode 100644 index 0000000..c912173 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsAddTool3Way.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsExtraTools.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsExtraTools.png new file mode 100644 index 0000000..1f0d3d4 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditComponentsExtraTools.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironment.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironment.png new file mode 100644 index 0000000..a530337 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironment.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironmentNew.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironmentNew.png new file mode 100644 index 0000000..8ec06f9 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditEnvironmentNew.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditTemplates.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditTemplates.png new file mode 100644 index 0000000..f8561d9 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/InstalledSDKsEditTemplates.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewElement.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewElement.png new file mode 100644 index 0000000..4a8718b Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewElement.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModule.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModule.png new file mode 100644 index 0000000..2e4e886 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModule.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModuleSource.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModuleSource.png new file mode 100644 index 0000000..d056a21 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/NewModulaModuleSource.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenModule.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenModule.png new file mode 100644 index 0000000..9489e74 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenModule.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenResource.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenResource.png new file mode 100644 index 0000000..80669a5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/OpenResource.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PrefAvailableUpdates.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PrefAvailableUpdates.png new file mode 100644 index 0000000..c653556 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PrefAvailableUpdates.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesConsole.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesConsole.png new file mode 100644 index 0000000..896f086 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesConsole.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesEditor.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesEditor.png new file mode 100644 index 0000000..30bbe2f Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesEditor.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesIndentGuide.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesIndentGuide.png new file mode 100644 index 0000000..a160ce1 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesIndentGuide.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSpelling.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSpelling.png new file mode 100644 index 0000000..4a5abd4 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSpelling.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSyntaxColoring.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSyntaxColoring.png new file mode 100644 index 0000000..7559152 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesSyntaxColoring.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplates.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplates.png new file mode 100644 index 0000000..25d30c6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplates.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplatesEdit.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplatesEdit.png new file mode 100644 index 0000000..ed52721 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PreferencesTemplatesEdit.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PropertiesXDSModula2.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PropertiesXDSModula2.png new file mode 100644 index 0000000..6da52cd Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/PropertiesXDSModula2.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/Restart.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/Restart.png new file mode 100644 index 0000000..1cafd4c Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/Restart.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SecurityWarning.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SecurityWarning.png new file mode 100644 index 0000000..2342866 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SecurityWarning.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariable.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariable.png new file mode 100644 index 0000000..b15f77c Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariable.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableArgumentConfigure.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableArgumentConfigure.png new file mode 100644 index 0000000..1ffc50d Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableArgumentConfigure.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableEditVariables.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableEditVariables.png new file mode 100644 index 0000000..0a9fc1b Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/SelectVariableEditVariables.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/ToggleXBookmark.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/ToggleXBookmark.png new file mode 100644 index 0000000..bf862af Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/ToggleXBookmark.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplAfterApply.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplAfterApply.png new file mode 100644 index 0000000..7e7a295 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplAfterApply.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplEdit.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplEdit.png new file mode 100644 index 0000000..77b1eb6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplEdit.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplInserted.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplInserted.png new file mode 100644 index 0000000..5cfde2f Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplInserted.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplPopup.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplPopup.png new file mode 100644 index 0000000..984862f Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplPopup.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplSelBefore.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplSelBefore.png new file mode 100644 index 0000000..1948658 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplSelBefore.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplWithComments.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplWithComments.png new file mode 100644 index 0000000..f90b1fc Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/TplWithComments.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesDetails.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesDetails.png new file mode 100644 index 0000000..a1af883 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesDetails.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesLicenses.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesLicenses.png new file mode 100644 index 0000000..1fb91d6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesLicenses.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesMessage.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesMessage.png new file mode 100644 index 0000000..4ffd7c5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/UpdatesMessage.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createDebugScript.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createDebugScript.png new file mode 100644 index 0000000..314f61a Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createDebugScript.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createconfiguration.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createconfiguration.png new file mode 100644 index 0000000..e0e5f4c Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/createconfiguration.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/debugbutton.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/debugbutton.png new file mode 100644 index 0000000..14f13a6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/debugbutton.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/editor.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/editor.png new file mode 100644 index 0000000..9f63790 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/editor.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/existingproject.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/existingproject.png new file mode 100644 index 0000000..9f43e06 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/existingproject.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/goToXBookmark.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/goToXBookmark.png new file mode 100644 index 0000000..4d441c7 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/goToXBookmark.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/newproject.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/newproject.png new file mode 100644 index 0000000..b242f20 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/newproject.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/preferences.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/preferences.png new file mode 100644 index 0000000..d864670 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/preferences.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/projectexplorer.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/projectexplorer.png new file mode 100644 index 0000000..13b8586 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/projectexplorer.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runbutton.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runbutton.png new file mode 100644 index 0000000..e938e17 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runbutton.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runconfiguration.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runconfiguration.png new file mode 100644 index 0000000..35b1824 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/runconfiguration.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/showproblems.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/showproblems.png new file mode 100644 index 0000000..6bd45c3 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/showproblems.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/userinterfacenum.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/userinterfacenum.png new file mode 100644 index 0000000..e1896f6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/userinterfacenum.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPanel.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPanel.png new file mode 100644 index 0000000..c4ac4ad Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPanel.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPoupMenu.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPoupMenu.png new file mode 100644 index 0000000..96b00b6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPoupMenu.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPreferences.png b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPreferences.png new file mode 100644 index 0000000..0055e39 Binary files /dev/null and b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/pics/xFindPreferences.png differ diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help.html new file mode 100644 index 0000000..90a8cd3 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help.html @@ -0,0 +1,9 @@ + + + + +XDS Œ®¤ã« -2 IDE: ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ + + + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help000.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help000.html new file mode 100644 index 0000000..88111be --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help000.html @@ -0,0 +1,156 @@ + + + + +XDS Œ®¤ã« -2 IDE: ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ + + +  +

+

+

+

+

+

+

+

+

+

+

+

+

+

ணࠬ¬­ë¥ தãªâë ‘¥à¨¨ XDS +

+

‘¨á⥬  ¯à®£à ¬¬¨à®¢ ­¨ï ­  ï§ëª¥ Œ®¤ã« -2 +

+

ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ +

㪮¢®¤á⢮ ¯®«ì§®¢ â¥«ï +

Excelsior, LLC +

http://www.excelsior-usa.com +

+

ணࠬ¬­®¥ ®¡¥á¯¥ç¥­¨¥ ¨ ¤®ªã¬¥­â æ¨ï Excelsior copyright © 2001-2014 Excelsior, LLC. +

‚ᥠ¯à ¢  § é¨é¥­ë. ‚ë ¬®¦¥â¥ ¨á¯®«ì§®¢ âì ¯à¨« £ ¥¬®¥ ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­¨¥ ­  ®¤­®¬ ª®¬¯ìîâ¥à¥; ¯¥à¥­®á¨âì ¥£® á ®¤­®£® ª®¬¯ìîâ¥à  ­  ¤à㣮©, ¯à¨ ãá«®¢¨¨, çâ® ¯à®£à ¬¬­®¥ ®¡¥á¯¥ç¥­¨¥ ¨á¯®«ì§ã¥âáï ¥¤¨­®¢à¥¬¥­­® ⮫쪮 ­  ®¤­®¬ ª®¬¯ìîâ¥à¥ ¨ çâ® ¢ë 㤠«ï¥â¥ ¢á¥ ª®¯¨¨ ¤ ­­®£® ¯à®£à ¬¬­®£® ®¡¥á¯¥ç¥­¨ï á ª®¬¯ìîâ¥à , á ª®â®à®£® ¯à®¨§¢¥¤¥­® ª®¯¨à®¢ ­¨¥; ᮧ¤ ¢ âì १¥à¢­ë¥ ª®¯¨¨ ¯à®£à ¬¬­®£® ®¡¥á¯¥ç¥­¨ï. +

ˆ­ä®à¬ æ¨ï ¢ ¤ ­­®¬ ¤®ªã¬¥­â¥ ¬®¦¥â ¡ëâì ¨§¬¥­¥­  ¡¥§ ®¯®¢¥é¥­¨ï ¨ ­¥ ï¥âáï ®¡ï§ â¥«ìá⢮¬ á® áâ®à®­ë Excelsior, LLC. +

ணࠬ¬­®¥ ®¡¥á¯¥ç¥­¨¥ ¨ ¤®ªã¬¥­â æ¨ï Excelsior ¡ë«¨ ¯à®â¥áâ¨à®¢ ­ë ¨ ¯à®á¬®â७ë. ’¥¬ ­¥ ¬¥­¥¥, Excelsior ­¥ ¤ ¥â ­¨ª ª¨å £ à ­â¨© ¨ ®¡ï§ â¥«ìáâ¢, ª ª ëå, â ª ¨ ¯®¤à §ã¬¥¢ ¥¬ëå, ®â­®á¨â¥«ì­® ¯à®£à ¬¬­®£® ®¡¥á¯¥ç¥­¨ï ¨ ¤®ªã¬¥­â æ¨¨, ¢å®¤ïé¨å ¢ á®áâ ¢ ¯à®¤ãªâ  á¥à¨¨ XDS. ¨ ¯à¨ ª ª¨å ®¡áâ®ï⥫ìá⢠å Excelsior ­¥ ¬®¦¥â ¡ëâì ¯à¨¢«¥ç¥­  ª ®â¢¥âá⢥­­®á⨠§  ¯àï¬ë¥, ª®á¢¥­­ë¥, ®á®¡ë¥, á«ãç ©­ë¥ ¨«¨ ¯®á«¥¤®¢ â¥«ì­ë¥ ¯®¢à¥¦¤¥­¨ï ¨ ¯®â¥à¨, ¢è¨¥áï १ã«ìâ â®¬ «î¡®£® ­¥¤®áâ âª  ¢ ¯à®£à ¬¬­®¬ ®¡¥á¯¥ç¥­¨¨ ¨«¨ ¤®ªã¬¥­â æ¨¨, ¢å®¤ïé¨å ¢ á®áâ ¢ ¤ ­­®£® ¯à®¤ãªâ . ‚ ç áâ­®áâ¨, Excelsior ­¥ ­¥á¥â ®â¢¥âá⢥­­®á⨠§  «î¡ë¥ ¯à®£à ¬¬ë ¨ ¤ ­­ë¥, ¨á¯®«ì§ã¥¬ë¥ ᮢ¬¥áâ­® á í⨬ ¯à®¤ãªâ®¬, ¢ª«îç ï á⮨¬®áâì ¢®ááâ ­®¢«¥­¨ï ¯à®£à ¬¬ ¨«¨ ¤ ­­ëå. +

XDS â®à£®¢ ï ¬ àª  Excelsior, LLC. +

Microsoft, Windows 95, Windows NT - â®à£®¢ë¥ ¬ àª¨ ¨«¨ § à¥£¨áâà¨à®¢ ­­ë¥ â®à£®¢ë¥ ¬ àª¨ Microsoft Corporation. +

‚ᥠâ®à£®¢ë¥ ¬ àª¨ ¨  ¢â®à᪨¥ ¯à ¢ , 㯮¬ï­ãâë¥ ¢ ¤ ­­®¬ ¤®ªã¬¥­â¥, ïîâáï ᮡá⢥­­®áâìî á®â¢¥âáâ¢ãîé¨å ¢« ¤¥«ì楢. +

+

+

+


+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
0000000000000000000000000000
 ç «® à ¡®âë +
“áâ ­®¢ª  ¨ § ¯ã᪠á।ë +
®¤ª«î祭¨¥ Š‘ +
¥à¢ë¥ è £¨ +
‘®§¤ ­¨¥ ­®¢®£® ¯à®¥ªâ  +
‘®§¤ ­¨¥ ¯à®¥ªâ  ¤«ï áãé¥áâ¢ãî饣® ª®¤  +
Š®¬¯¨«ïæ¨ï ¯à®¥ªâ  +
‡ ¯ã᪠¯à®£à ¬¬ë +
Žâ« ¤ª  ¯à®£à ¬¬ë +
Žá­®¢­ë¥ ª®­æ¥¯æ¨¨ +
 ¡®ç ï ®¡« áâì +
஥ªâ +
¥áãàáë +
®¤ª«îç ¥¬ë© ¬®¤ã«ì +
®«ì§®¢ â¥«ì᪨© ¨­â¥à䥩á +
 ¡®ç¨© á⮫ +
஥ªæ¨¨ +
¥¤ ªâ®à +
 ­¥«¨ +
‘âàãªâãà  ¯à®¥ªâ  +
Œ áâ¥à ­ áâனª¨ +
 ¢¨£ æ¨ï +
–¨äà®¢ë¥ § ª« ¤ª¨ +
Žâªàë⨥ à¥áãàá  +
 ­¥«ì ¡ëáâண® ¯®¨áª  +
 à ¬¥âàë +
XDS Œ®¤ã« -2 +
Š®­á®«ì +
¥¤ ªâ®à +
‘¨á⥬ë ࠧࠡ®âª¨ +
‘â¨«ì ª®¤  +
”®à¬ â¨à®¢ ­¨¥ +
Ž¡é¨¥ +
Žà䮣à ä¨ï +
‘¢®©á⢠ à¥áãàᮢ +
Modula-2 ᢮©á⢠ ¯à®¥ªâ  +
ˆá¯®«ì§®¢ ­¨¥ +
‘®§¤ ­¨¥ ­®¢ëå í«¥¬¥­â®¢ +
®¢ë© ¯à®¥ªâ +
஥ªâ ¤«ï áãé¥áâ¢ãî饣® ª®¤  +
®¢ë© Œ®¤ã« -2 ¬®¤ã«ì +
“¯à ¢«¥­¨¥ ¯ à ¬¥âà ¬¨ Š‘ +
Œ áâ¥à ­ áâனª¨ Š‘ +
Œ áâ¥à ­ áâனª¨ ¨­áâà㬥­â  Š‘ +
Š®­ä¨£ãà æ¨¨ § ¯ã᪠ +
Š®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï +
Š®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ +
‚ë¡®à ª â «®£  ¨«¨ ä ©«  +
 ¡®â  á ¯¥à¥¬¥­­ë¬¨ +
Š®­ä¨£ãà æ¨ï  à£ã¬¥­â®¢ +
¥¤ ªâ¨à®¢ ­¨¥ ᯨ᪠ ¯¥à¥¬¥­­ëå +
Žá­®¢­ë¥ ã¯à ¢«ïî騥 ª« ¢¨è¨ +
+
+ + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help001.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help001.html new file mode 100644 index 0000000..a6ec309 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help001.html @@ -0,0 +1,38 @@ + + + + + ç «® à ¡®âë + + + +

+ ç «® à ¡®âë

+ +

ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ Œ®¤ã« -2 ¯à®£à ¬¬ (XDS Modula-2 IDE) ¯à¥¤­ §­ ç¥­  ¤«ï ᮧ¤ ­¨ï ¨ । ªâ¨à®¢ ­¨ï ¨á室­ëå ⥪á⮢ ¯à®£à ¬¬ ­  ï§ëª¥ Œ®¤ã« -2,   â ª¦¥ ¨­â¥£à æ¨¨ á।á⢠ࠧࠡ®âª¨ Œ®¤ã« -2 ¯à®£à ¬¬ ¢ ¥¤¨­ë© ª®¬¯«¥ªá. +

ˆ­â¥£à¨à®¢ ­­ ï á।  ¯à¥¤áâ ¢«ï¥â ᮡ®© ­ ¡®à ¯®¤ª«îç ¥¬ëå ¬®¤ã«¥© ¯« âä®à¬ë Eclipse. ‚ á®áâ ¢ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ­¥ ¢å®¤ïâ á।á⢠ ࠧࠡ®âª¨ Œ®¤ã« -2 ¯à®£à ¬¬: ª®¬¯¨«ïâ®à, ®â« ¤ç¨ª ¨ â.¯. ‚¬¥áâ® í⮣® ¯à¥¤ãᬮâ७  ¢®§¬®¦­®áâì ¨­â¥£à æ¨¨ á 㦥 ãáâ ­®¢«¥­­ë¬¨ ªà®áá-á¨á⥬ ¬¨ ¯à®£à ¬¬¨à®¢ ­¨ï (Š‘). +

‚ ¨­â¥£à¨à®¢ ­­®© á।¥ ¨á¯®«ì§ã¥âáï á¢®ï ¯à®¥ªâ­ ï á¨á⥬ , ®á­®¢­ë¬¨ í«¥¬¥­â ¬¨, ª®â®à®© ïîâáï:  ¡®ç¨¥ Ž¡« á⨠(Workspace), ஥ªâë (Projects) ¨ ¥áãàáë (Resources) ¨­â¥£à¨à®¢ ­­®© á।ë. +

Š ¦¤ ï à ¡®ç ï ®¡« áâì ¬®¦¥â ᮤ¥à¦ âì ®¤¨­ ¨«¨ ­¥áª®«ìª® ¯à®¥ªâ®¢ ¨­â¥£à¨à®¢ ­­®© á।ë.  ¡®ç¨¥ ®¡« á⨠¯®§¢®«ïîâ à §¡¨âì ¯à®¥ªâë ­  £àã¯¯ë ¨ ¨á¯®«ì§®¢ âì à §­ë¥ ­ áâனª¨ ¤«ï ª ¦¤®© ¨§ ­¨å. +

Œ®¦­® ᮧ¤ âì ¯à®¨§¢®«ì­®¥ ª®«¨ç¥á⢮ à ¡®ç¨å ®¡« á⥩. Ž¤­ ª®, ª ¦¤ë© § ¯ã饭­ë© íª§¥¬¯«ïà ¨­â¥£à¨à®¢ ­­®© á।ë à ¡®â ¥â ⮫쪮 á ®¤­®© à ¡®ç¥© ®¡« áâìî, ª®â®à ï áâ ­®¢¨âáï ­  íâ®â ¬®¬¥­â ­¥¤®áâ㯭®© ¤«ï ®áâ «ì­ëå íª§¥¬¯«ï஢ ¨­â¥£à¨à®¢ ­­®© á।ë. ¥à¥ª«î祭¨¥ ¬¥¦¤ã à ¡®ç¨¬¨ ®¡« áâﬨ ¯à¨¢®¤¨â ª ¯¥à¥§ ¯ãáªã ¨­â¥£à¨à®¢ ­­®© á।ë. +

+“áâ ­®¢ª  ¨ § ¯ã᪠á।ë

+ +

ˆ­â¥£à¨à®¢ ­­ ï á।  à á¯à®áâà ­ï¥âáï ¢ ¢¨¤¥ ZIP- à娢 . „«ï ¥¥ ãáâ ­®¢ª¨ à á¯ ªã©â¥  à娢 ¢ «®ª «ì­ãî ¤¨à¥ªâ®à¨î ª®¬¯ìîâ¥à , ᮤ¥à¦ éãî ­  ¬¥­¥¥ 300 Œ¡ ᢮¡®¤­®£® ¯à®áâà ­á⢠. +

®«ìè¥ ­¨ª ª¨å ¤¥©á⢨© ­¥ âॡã¥âáï. ‚  à娢 㦥 ¢ª«îç¥­ë ¢á¥ ­¥®¡å®¤¨¬ë¥ ¤«ï ä㭪樮­¨à®¢ ­¨ï ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ª®¬¯®­¥­âë. +

„«ï § ¯ã᪠ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ­¥®¡å®¤¨¬® § ¯ãáâ¨âì ä ©« xds-ide.exe ¨§ ¤¨à¥ªâ®à¨¨, ¢ ª®â®àãî ¡ë«  ãáâ ­®¢«¥­  ¨­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨. ®á«¥ § ¯ã᪠ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¡ã¤¥â  ¢â®¬ â¨ç¥áª¨ ®âªàëâ  ¯à®¥ªæ¨ï XDS Œ®¤ã« -2, ­ áâ஥­­ ï ­  à ¡®âã á Œ®¤ã« -2 ¯à®¥ªâ ¬¨. +

ਠ¯¥à¢®¬ § ¯ã᪥ à ¡®ç ï ®¡« áâì (Workspace)  ¢â®¬ â¨ç¥áª¨ ᮧ¤ ¥âáï ¢ ¯¥àá®­ «ì­®© ¯ ¯ª¥ ¯®«ì§®¢ â¥«ï %USERPROFILE%\xds-workspace. +

ਠ¯®á«¥¤ãîé¨å § ¯ã᪠å, ¯® 㬮«ç ­¨î, ¡ã¤¥â ®âªà뢠âìáï ¯®á«¥¤­ïï ®âªàëâ ï ¯à®¥ªæ¨ï ¨ à ¡®ç ï ®¡« áâì. +

+®¤ª«î祭¨¥ Š‘

+ +

ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ ¯®§¢®«ï¥â ¯®¤ª«îç âì ¨ ¨á¯®«ì§®¢ âì ­¥áª®«ìª® á¨á⥬ ¯à®£à ¬¬¨à®¢ ­¨ï. ‘¨á⥬  ¯à®£à ¬¬¨à®¢ ­¨ï ¤®«¦­  ¡ëâì 㦥 ãáâ ­®¢«¥­  ­  «®ª «ì­ë© ¨«¨ á¥â¥¢®© ¤¨áª. +

„«ï ¯®¤ª«î祭¨ï á¨áâ¥¬ë ¯à®£à ¬¬¨à®¢ ­¨ï ª ¨­â¥£à¨à®¢ ­­®© á।¥ ­¥®¡å®¤¨¬® ®âªàëâì ¤¨ «®£  à ¬¥âàë, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î Žª­® >  à ¬¥âàë.... ‡ â¥¬ ¢ «¥¢®© ¯ ­¥«¨ ¤¨ «®£  ¢ë¡à âì XDS M®¤ã« -2 > ‘¨á⥬ë ࠧࠡ®âª¨. ®á«¥ í⮣® ¢ ¯à ¢®© ç á⨠¤¨ «®£  ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã „®¡ ¢¨âì ¨ ¢ë¡à âì ª â «®£, ¢ ª®â®àë© ãáâ ­®¢«¥­  ¯®¤ª«îç ¥¬ ï Š‘. +

+

…᫨ ¢ë¡à ­­ ï Š‘ ¯®¤£®â®¢«¥­  ¤«ï ¨­â¥£à æ¨¨ á® á।®© ࠧࠡ®âª¨ (¢ ª®à­¥¢®¬ ª â «®£¥ Š‘ ­ å®¤¨âáï ä ©« sdk.ini), â® ¢ ᯨ᪥ ãáâ ­®¢«¥­­ëå á¨á⥬ ¯à®£à ¬¬¨à®¢ ­¨ï ¯®ï¢¨âáï ­®¢ ï § ¯¨áì, ᮮ⢥âáâ¢ãîé ï ¢ë¡à ­­®© Š‘. +

…c«¨ ¦¥ ä ©« sdk.ini ®âáãâáâ¢ã¥â, â® ®âªà®¥âáï ¬ áâ¥à ¤«ï àãç­®© ­ áâனª¨ ­  ¤ ­­ãî Š‘. Œ áâ¥à ­ áâனª¨ Š‘ ¬®¦­® ®âªàëâì ¢ «î¡®© ¬®¬¥­â, ¢ë¡à ¢ ¢ ᯨ᪥ ¦¥« ¥¬ãî á¨á⥬㠯ணࠬ¬¨à®¢ ­¨ï ¨ ­ ¦ ¢ ª­®¯ªã ˆ§¬¥­¨âì. +

®á«¥ § ªàëâ¨ï ¤¨ «®£   à ¬¥âàë ª­®¯ª®© OK ¨­â¥£à¨à®¢ ­­ ï á।  ¯®«­®áâìî £®â®¢  ª ࠧࠡ®âª¥ Œ®¤ã« -2 ¯à®£à ¬¬. +

ˆ­â¥£à¨à®¢ ­­ ï á।  ¯®§¢®«ï¥â ¯®¤ª«îç¨âì ¨ ®¤­®¢à¥¬¥­­® ¨á¯®«ì§®¢ âì ­¥áª®«ìª® ªà®áá-á¨á⥬ ¯à®£à ¬¬¨à®¢ ­¨ï. Š ¦¤®© ¨§ ¯®¤ª«î祭­ëå Š‘ ¯à¨á¢ ¨¢ ¥âáï ã­¨ª «ì­®¥ ¨¬ï. …᫨ ¯à¨ ¯®¤ª«î祭¨¨ Š‘ ®¡­ à㦨¢ ¥âáï ᮢ¯ ¤¥­¨¥ ¨¬¥­¨ á 㦥 áãé¥áâ¢ãî饩, â® ª ¨¬¥­¨ ⮫쪮 çâ® ¯®¤ª«î祭­®© á¨áâ¥¬ë ¯à®£à ¬¬¨à®¢ ­¨ï ¤®¡ ¢¨âáï æ¨ä஢®© ¨­¤¥ªá. +

‘¨á⥬  ¯à®£à ¬¬¨à®¢ ­¨ï, ®â¬¥ç¥­­ ï £ «®çª®©, ï¥âáï á¨á⥬®© ¯à®£à ¬¬¨à®¢ ­¨ï, ¨á¯®«ì§ã¥¬®© ¯® 㬮«ç ­¨î. Ž­  ¨á¯®«ì§ã¥âáï ¢ ⮬ á«ãç ¥, ¥á«¨ ¢ ¯à®¥ªâ¥ ­¥ ¡ë«  ® 㪠§ ­  ª®­ªà¥â­ ï á¨á⥬  ¯à®£à ¬¬¨à®¢ ­¨ï. +

+ + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help002.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help002.html new file mode 100644 index 0000000..9cbbc70 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help002.html @@ -0,0 +1,69 @@ + + + + +¥à¢ë¥ è £¨ + + + +

+¥à¢ë¥ è £¨

+ +

+‘®§¤ ­¨¥ ­®¢®£® ¯à®¥ªâ 

+ +

„«ï ᮧ¤ ­¨ï ­®¢®£® ¯à®¥ªâ  ­¥®¡å®¤¨¬® ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì: ” ©« > ‘®§¤ âì > Œ®¤ã« -2 ¯à®¥ªâ. ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë ­®¢®£® ¯à®¥ªâ . +

+

०¤¥ ¢á¥£®, ­¥®¡å®¤¨¬® 㪠§ âì ¨¬ï ­®¢®£® ¯à®¥ªâ  (¯®«¥  §¢ ­¨¥ ¯à®¥ªâ ). +

„ «¥¥ ­¥®¡å®¤¨¬® 㪠§ âì ¬¥áâ®à á¯®«®¦¥­¨¥ ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  ( á¯®«®¦¥­¨¥). +

‡ â¥¬ á«¥¤ã¥â ¢ë¡à âì, ª ª ï Š‘ ¡ã¤¥â ¨á¯®«ì§®¢ âìáï (¯®«¥ ‘¨á⥬  ࠧࠡ®âª¨): ¥á«¨ ® ­¥ 㪠§ âì ¤à㣮¥, â® ¡ã¤¥â ¨á¯®«ì§®¢ ­  â  Š‘, ª®â®à ï 㪠§ ­  ª ª ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î ¢ ­ áâனª å ¨­â¥£à¨à®¢ ­­®© á।ë.  ¦ ¢ ­  ª­®¯ªã  áâநâì...: ¬®¦­® ¯¥à¥©â¨ ª ¤¨ «®£ã ­ áâனª¨ Š‘ ¨­â¥£à¨à®¢ ­­®© á।ë. +

„«ï ­®¢®£® ¯à®¥ªâ  ¬®¦­® áà §ã ᮧ¤ âì ¯à®¥ªâ­ë© ä ©«, £« ¢­ë© ¬®¤ã«ì, áâ ­¤ àâ­ãî áâàãªâãàã ¤¨à¥ªâ®à¨© ¨ ä ©« ¯¥à¥­ ¯à ¢«¥­¨©. ˆ¬¥­  ä ©«  ¯à®¥ªâ  ¨ ä ©«  £« ¢­®£® ¬®¤ã«ï 㪠§ë¢ îâáï ¢ ᮮ⢥âáâ¢ãîé¨å áâப å ¬ áâ¥à  ­ áâனª¨. …᫨ ®â¬¥ç¥­ ¯à¨§­ ª ˆá¯®«ì§®¢ âì è ¡«®­ë á¨á⥬ë ࠧࠡ®âª¨, â® ä ©«ë ¡ã¤ãâ ᮧ¤ ­ë ¯® è ¡«®­ ¬, 㪠§ ­­ë¬ ¢ ­ áâனª å Š‘. ‘âàãªâãà  ¤¨à¥ªâ®à¨© ¨ ¨¬ï ä ©«  ¯¥à¥­ ¯à ¢«¥­¨© â ª¦¥ ¡¥àãâáï ¨§ ­ áâ஥ª ¢ë¡à ­­®© Š‘. +

®á«¥ ­ ¦ â¨ï ª­®¯ª¨ ƒ®â®¢® ­®¢ë© Œ®¤ã« -2 ¯à®¥ªâ ¡ã¤¥â ᮧ¤ ­ ¨ ¤®¡ ¢«¥­ ¢ ⥪ãéãî à ¡®çãî ®¡« áâì. ‘®§¤ ­­ë¥ ä ©«ë ¨ ¤¨à¥ªâ®à¨¨ ®â®¡à §ïâáï ¢ ¬¥­¥¤¦¥à¥ ¯à®¥ªâ®¢. +

+‘®§¤ ­¨¥ ¯à®¥ªâ  ¤«ï áãé¥áâ¢ãî饣® ª®¤ 

+ +

„«ï ᮧ¤ ­¨ï ¯à®¥ªâ  㦥 áãé¥áâ¢ãî饣® Œ®¤ã« -2 ª®¤  ­¥®¡å®¤¨¬® ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì: ” ©« > ‘®§¤ âì > Œ®¤ã« -2 ¯à®¥ªâ ¤«ï áãé¥áâ¢ãî饣® ª®¤ . ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë ¯à®¥ªâ . +

+

ˆ¬ï ­®¢®£® ¯à®¥ªâ  ( §¢ ­¨¥ ¯à®¥ªâ ) ¬®¦­® 㪠§ âì ï¢­ë¬ ®¡à §®¬, «¨¡® ¯®á«¥ ¢ë¡®à  ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  (¯®«¥  á¯®«®¦¥­¨¥) ¨¬ï ¡ã¤¥â ¯®¤áâ ¢«¥­®  ¢â®¬ â¨ç¥áª¨. +

’ ª¦¥ á«¥¤ã¥â ¢ë¡à âì, ª ª ï Š‘ ¡ã¤¥â ¨á¯®«ì§®¢ âìáï (¯®«¥ ‘¨á⥬  ࠧࠡ®âª¨): ¥á«¨ ® ­¥ 㪠§ âì ¤à㣮¥, â® ¡ã¤¥â ¨á¯®«ì§®¢ ­  â  Š‘, ª®â®à ï 㪠§ ­  ª ª ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î ¢ ­ áâனª å ¨­â¥£à¨à®¢ ­­®© á।ë.  ¦ ¢ ­  ª­®¯ªã  áâநâì...: ¬®¦­® ¯¥à¥©â¨ ª ¤¨ «®£ã ­ áâனª¨ Š‘ ¨­â¥£à¨à®¢ ­­®© á।ë. +

„ «¥¥ ­¥®¡å®¤¨¬® 㪠§ âì, ª ª®© ¨¬¥­­® ¯à®¥ªâ­ë© ä ©« (¯®«¥ ஥ªâ­ë© ä ©«) ¨«¨ £« ¢­ë© ¬®¤ã«ì (¯®«¥ ƒ« ¢­ë© ¬®¤ã«ì) ¡ã¤¥â ¨á¯®«ì§®¢ âìáï ¯à¨ ª®¬¯¨«ï樨 ¯à®£à ¬¬ë. ਠ¢ë¡®à¥ ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  á¨á⥬  ¯®¯ëâ ¥âáï § ¯®«­¨âì ¤ ­­ë¥ ¯®«ï  ¢â®¬ â¨ç¥áª¨. ‘«¥¤ã¥â ¯à®¢¥à¨âì ¯®¤áâ ¢«¥­­ë¥ §­ ç¥­¨ï ¨«¨ § ¯®«­¨âì ¯®«¥ ¢àãç­ãî: ¯® ­ ¦ â¨î ª­®¯ª¨ Ž¡§®à... ®âªà®¥âáï ¯à®¢®¤­¨ª, £¤¥ ¬®¦­® ¢ë¡à âì ä ©« ¯à®¥ªâ  *.prj ¨«¨ ᮮ⢥âá⢥­­® ä ©« £« ¢­®£® ¬®¤ã«ï *.mod ¨«¨ *.ob2. +

®á«¥ ­ ¦ â¨ï ª­®¯ª¨ ƒ®â®¢® ­®¢ë© Œ®¤ã« -2 ¯à®¥ªâ ¡ã¤¥â ᮧ¤ ­ ¨ ¤®¡ ¢«¥­ ¢ ⥪ãéãî à ¡®çãî ®¡« áâì. ‘®§¤ ­­ë¥ ä ©«ë ¨ ¤¨à¥ªâ®à¨¨ ®â®¡à §ïâáï ¢ ¬¥­¥¤¦¥à¥ ¯à®¥ªâ®¢. +

+Š®¬¯¨«ïæ¨ï ¯à®¥ªâ 

+ +

„«ï ⮣® ç⮡ë ᪮¬¯¨«¨à®¢ âì ¯à®¥ªâ ­¥®¡å®¤¨¬® ¢ë¡à âì ¥£® ¢ ®ª­¥ ¬¥­¥¤¦¥à  ¯à®¥ªâ®¢,   § â¥¬ ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì ஥ªâ > ‘®¡à âì ¯à®¥ªâ ¨«¨ ஥ªâ > ¥à¥á®¡à âì ¯à®¥ªâ. ¥à¢ ï ª®¬ ­¤  § ¯ã᪠¥â ¨­ªà¥¬¥­â «ì­ãî á¡®àªã ¯à®¥ªâ ,   ¢â®à ï ¯®«­ãî ¯¥à¥á¡®àªã ¯à®¥ªâ . „ ­­ë¥ ª®¬ ­¤ë ¤ã¡«¨àãîâáï ¢ ª®­â¥ªáâ­®¬ ¬¥­î ¯à®¥ªâ , ¢ë§ë¢ ¥¬®¬ ¯® ­ ¦ â¨î ¯à ¢®© ª­®¯ª¨ ¬ëè¨, ª­®¯ª ¬¨ ­  ¯ ­¥«¨ ¨­áâà㬥­â®¢,   â ª¦¥ ¬®£ãâ ¡ëâì ¢ë§¢ ­ë ª®¬¡¨­ æ¨¥© £®àïç¨å ª« ¢¨è: Shift + F9 ¨«¨ Ctrl + Shift + F9 ᮮ⢥âá⢥­­®. +

Šà®¬¥ ⮣®, ¯®¤¤¥à¦¨¢ ¥âáï ०¨¬  ¢â®¬ â¨ç¥áª®© ª®¬¯¨«ï樨 ¯à¨ á®åà ­¥­¨¨ ¨§¬¥­¥­­®£® ä ©«  ­  ¤¨áª. ® 㬮«ç ­¨î ¤ ­­ë© ०¨¬ ¢ëª«î祭. —â®¡ë ¥£® ¢ª«îç¨âì ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ®â¬¥â¨âì ¯ã­ªâ ஥ªâ > €¢â®¬ â¨ç¥áª ï ª®¬¯®­®¢ª . +

Žè¨¡ª¨ ¨ ¯à¥¤ã¯à¥¦¤¥­¨ï ª®¬¯¨«ïâ®à  ®â®¡à ¦ îâáï ¢ ᯥ樠«ì­®¬ ®ª­¥ ஡«¥¬ë. ® 㬮«ç ­¨î ¢ í⮬ ®ª­¥ ¯®ª §ë¢ îâáï § ¬¥ç ­¨ï ¤«ï ¢á¥å ¯à®¥ªâ®¢, ®âªàëâëå ¢ ¨­â¥£à¨à®¢ ­­®© á।¥. …᫨ ¦¥ ¢ ¯ ­¥«¨ ¨­áâà㬥­â®¢ ®ª­  ¢ë¡à âì ¯ã­ªâ Show > Error/Warnings on Project, â® ¯à¥¤ã¯à¥¦¤¥­¨ï ¨ ®è¨¡ª¨ ¡ã¤ãâ ¯®ª §ë¢ âìáï ⮫쪮 ¤«ï ⥪ã饣® ¯à®¥ªâ . +

+

+‡ ¯ã᪠¯à®£à ¬¬ë

+ +

„«ï ⮣® çâ®¡ë § ¯ãáâ¨âì Œ®¤ã« -2 ¯à®£à ¬¬ã ­¥®¡å®¤¨¬® ᮧ¤ âì ª®­ä¨£ãà æ¨î § ¯ã᪠ (Run Configuration). ‚ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ 㪠§ë¢ ¥âáï, ¤«ï ª ª®£® ¯à®¥ªâ  ®­  ᮧ¤ ¥âáï, ¨¬ï ¨á¯®«­ï¥¬®£® ä ©«  ª®â®àë© ­¥®¡å®¤¨¬® § ¯ãáâ¨âì ¨ ®¯æ¨®­ «ì­® ¯ à ¬¥âàë, á ª®â®à묨 ­ã¦­® § ¯ãáâ¨âì ¯à®£à ¬¬ã. +

„«ï ⮣® ç⮡ë ᮧ¤ âì ª®­ä¨£ãà æ¨î § ¯ã᪠ ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ¢ë¡à âì: ‡ ¯ã᪠> ‚믮«­¨âì.... ‚ ®âªàë¢è¥¬áï ¤¨ «®£®¢®¬ ®ª­¥ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë § ¯ã᪠. +

‚ «¥¢®© ¯ ­¥«¨ ®âªàë¢è¥£®áï ¤¨ «®£  ­ã¦­® ¢ë¡à âì XDS Œ®¤ã« -2 ¯à®£à ¬¬ , 饫窮¬ ¯à ¢®© ª­®¯ª¨ ¬ëè¨ ®âªàëâì ª®­â¥ªáâ­®¥ ¬¥­î ¨ ¢ë¡à âì ‘®§¤ âì. +

+

㤥â ᮧ¤ ­  ­®¢ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠,   ¢ ¯à ¢®© ¯ ­¥«¨ ®âªà®¥âáï ¤¨ «®£ ¤«ï ¢¢®¤  ¯ à ¬¥â஢. +

+

Š ¦¤ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¤®«¦­  ¨¬¥âì ᢮¥ ã­¨ª «ì­®¥ ¨¬ï – ¥£® ­¥®¡å®¤¨¬® ¢¢¥á⨠¢ ¯®«¥ ˆ¬ï. +

  ¢ª« ¤ª¥ ƒ« ¢­ ï ­¥®¡å®¤¨¬® ¢ë¡à âì ¯à®¥ªâ, ¤«ï ª®â®à®£® ¡ã¤¥â ᮧ¤ ­  ª®­ä¨£ãà æ¨ï § ¯ã᪠ (¢ë¡¨à ¥âáï ¨§ ¯à®¥ªâ®¢, ®âªàëâëå ¢ ⥪ã饩 à ¡®ç¥© ®¡« áâ¨),   â ª¦¥ ¯à®£à ¬¬­ë© ä ©« *.prg ¨«¨ ¨á¯®«­ï¥¬ë© ä ©« *.exe ¤«ï § ¯ã᪠. ® ­ ¦ â¨î ª­®¯ª¨ ਬ¥­¨âì ¬®¦­® á®åà ­¨âì ¨§¬¥­¥­¨ï ¤«ï । ªâ¨à㥬®© ª®­ä¨£ãà æ¨¨ § ¯ã᪠; ª­®¯ª  ‚®ááâ ­®¢¨âì ¢®ááâ ­ ¢«¨¢ ¥â ¯®á«¥¤­¨¥ á®åà ­¥­­ë¥ ¯ à ¬¥âàë. +

  ®áâ «ì­ëå ¢ª« ¤ª å ¬®¦­® ¢¢¥á⨠¤®¯®«­¨â¥«ì­ë¥ ­¥®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë ª®­ä¨£ãà æ¨¨ § ¯ã᪠. +

®á«¥ § ¯®«­¥­¨ï ®¡ï§ â¥«ì­ëå ¯®«¥© ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ‡ ¯ã᪠¤«ï § ¯ã᪠ ¯à®£à ¬¬ë. +

Ž¤¨­ à §, ᮧ¤ ¢ ª®­ä¨£ãà æ¨î § ¯ã᪠ ¥¥ ¬®¦­® ¯®«ì§®¢ âì á­®¢  ¨ á­®¢ . „«ï í⮣® ¥¥ ­ã¦­® ¯à®áâ® ¢ë¡à âì ¨§ ᯨ᪠ ¤®áâ㯭®£® ¨§ £« ¢­®£® ¬¥­î: ‡ ¯ã᪠> •à®­®«®£¨ï ¢ë¯®«­¥­¨ï. +

®«ì設á⢮ ­¥®¡å®¤¨¬ëå ¤¥©á⢨© ¯® § ¯ãáªã ¯à®£à ¬¬ë ¤®áâ㯭® ç¥à¥§ ª­®¯ªã ‚믮«­¨âì ¯ ­¥«¨ ¨­áâà㬥­â®¢: +

+

Ž­  ®à£ ­¨§®¢ ­  ¢ ¢¨¤¥ ¢ë¯ ¤ î饣® ᯨ᪠ ¯®á«¥¤­¨å ª®­ä¨£ãà æ¨© § ¯ã᪠ ¨ ª®¬ ­¤ ¤«ï ¨å । ªâ¨à®¢ ­¨ï. ‹®£ ¢ë¯®«­¥­¨ï ¯à®£à ¬¬ë ®â®¡à §¨âáï ¢ ®ª­¥ Š®­á®«ì. +

+Žâ« ¤ª  ¯à®£à ¬¬ë

+ +

„«ï ⮣® çâ®¡ë ­ ç âì ®â« ¦¨¢ âì Œ®¤ã« -2 ¯à®£à ¬¬ã ­¥®¡å®¤¨¬® ᮧ¤ âì ª®­ä¨£ãà æ¨î ®â« ¤ª¨ (Debug Configuration) ¨«¨ ¢®á¯®«ì§®¢ âìáï 㦥 £®â®¢®© Run Configuration. ‚®®¡é¥-â® à §­¨æë ¬¥¦¤ã ª®­ä¨£ãà æ¨¥© § ¯ã᪠ ¨ ª®­ä¨£ãà æ¨¥© ®â« ¤ª¨ ­¥â ­¨ª ª®©. Ž­¨  ¡á®«îâ­® ®¤¨­ ª®¢ë, ⮫쪮 ¢ë§ë¢ îâáï ç¥à¥§ à §­ë¥ ¯ã­ªâë ¬¥­î, ¨ ¢ á«ãç ¥ ª®­ä¨£ãà æ¨¨ ®â« ¤ª¨ ¯à®£à ¬¬  § ¯ã᪠¥â ¯®¤ ®â« ¤ç¨ª®¬. +

„«ï ⮣® ç⮡ë ᮧ¤ âì ª®­ä¨£ãà æ¨î ®â« ¤ª¨ ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ¢ë¡à âì: ‡ ¯ã᪠> Žâ« ¤¨âì.... ‡ â¥¬ ¢ «¥¢®© ¯ ­¥«¨ ®âªàë¢è¥£®áï ¤¨ «®£  ¢ë¡à âì XDS Œ®¤ã« -2 ¯à®£à ¬¬ , 饫窮¬ ¯à ¢®© ª­®¯ª¨ ¬ëè¨ ®âªàëâì ª®­â¥ªáâ­®¥ ¬¥­î ¨ ¢ë¡à âì ‘®§¤ âì. +

Š ¦¤ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¤®«¦­  ¨¬¥âì ᢮¥ ã­¨ª «ì­®¥ ¨¬ï – ¥£® ­¥®¡å®¤¨¬® ¢¢¥á⨠¢ ¯®«¥ ˆ¬ï. +

Žáâ «ì­ë¥ ¯®«ï § ¯®«­ïîâáï  ­ «®£¨ç­® § ¯®«­¥­¨î ¯®«¥© ¯à¨ ᮧ¤ ­¨¨ ª®­ä¨£ãà æ¨¨ § ¯ã᪠. +

®á«¥ § ¯®«­¥­¨ï ®¡ï§ â¥«ì­ëå ¯®«¥© ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã Žâ« ¤ª  ¤«ï § ¯ã᪠ ¯à®£à ¬¬ë. +

Ž¤¨­ à §, ᮧ¤ ¢ ª®­ä¨£ãà æ¨î ®â« ¤ª¨ ¥¥ ¬®¦­® ¯®«ì§®¢ âì á­®¢  ¨ á­®¢ . „«ï í⮣® ¥¥ ­ã¦­® ¯à®áâ® ¢ë¡à âì ¨§ ᯨ᪠ ¤®áâ㯭®£® ¨§ £« ¢­®£® ¬¥­î: ‡ ¯ã᪠> •à®­®«®£¨ï ®â« ¤ª¨. +

®«ì設á⢮ ­¥®¡å®¤¨¬ëå ¤¥©á⢨© ¯® § ¯ãáªã ®â« ¤ç¨ª  ¯à®£à ¬¬ ¤®áâ㯭® ç¥à¥§ ª­®¯ªã Žâ« ¤ª  ¯ ­¥«¨ ¨­áâà㬥­â®¢: +

+

Ž­  ®à£ ­¨§®¢ ­  ¢ ¢¨¤¥ ¢ë¯ ¤ î饣® ᯨ᪠ ¯®á«¥¤­¨å ª®­ä¨£ãà æ¨© ®â« ¤ª¨ ¨ ª®¬ ­¤ ¤«ï ¨å । ªâ¨à®¢ ­¨ï. +

+ + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help003.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help003.html new file mode 100644 index 0000000..e4313e1 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help003.html @@ -0,0 +1,59 @@ + + + + +Žá­®¢­ë¥ ª®­æ¥¯æ¨¨ + + + +

+Žá­®¢­ë¥ ª®­æ¥¯æ¨¨

+ +

ˆ­â¥£à¨à®¢ ­­ ï á।  ࠧࠡ®âª¨ Œ®¤ã« -2 ¯à®£à ¬¬ (XDS Modula-2 IDE) ࠧࠡ®â ­  ­  ¡ §¥ Eclipse. Eclipse ¯à¥¤áâ ¢«ï¥â ᮡ®© ®âªàëâãî ¯« âä®à¬ã ¤«ï ¯®áâ஥­¨ï ¨­â¥£à¨à®¢ ­­ëå á। ࠧࠡ®âª¨, ®¡®¡é îéãî â ª¨¥ ¢®§¬®¦­®á⨠¢§ ¨¬®¤¥©á⢨©, ª ª ã¯à ¢«¥­¨¥ à¥áãàá ¬¨, § ¯ã᪠¯à®£à ¬¬ ¨ ¯à®æ¥ááë ®â« ¤ª¨. +

‚ í⮩ £« ¢¥ ®¯¨á뢠¥âáï àï¤ ®á­®¢­ëå ª®­æ¥¯æ¨© ¯« âä®à¬ë Eclipse, ¨á¯®«ì§ã¥¬ëå ¢ ¨­â¥£à¨à®¢ ­­®© á।¥ ࠧࠡ®âª¨ Œ®¤ã« -2 ¯à®£à ¬¬. +

+ ¡®ç ï ®¡« áâì

+ +

 ¡®ç ï ®¡« áâì (Worspace) – íâ® ¯à¥¦¤¥ ¢á¥£® ª®­â¥©­¥à ¤«ï ¯à®¥ªâ®¢. Šà®¬¥ í⮣®, ¢ ­¥© ᮤ¥à¦ âáï ­ áâனª¨, á®åà ­ï¥¬ë¥ ª®¬¯®­¥­â ¬¨ ¨­â¥£à¨à®¢ ­­®© á।ë, ¨ ¢á¯®¬®£ â¥«ì­ë¥ ¤ ­­ë¥. ”¨§¨ç¥áª¨ à ¡®ç ï ®¡« áâì ¯à¥¤áâ ¢«ï¥â ᮡ®© ¤¨à¥ªâ®à¨î, ¯®¤¤¨à¥ªâ®à¨¨ ª®â®à®© ᮮ⢥âáâ¢ãî⠯஥ªâ ¬,   ¤¨à¥ªâ®à¨ï .metadata ¨á¯®«ì§ã¥âáï ª ª åà ­¨«¨é¥ ­ áâ஥ª ¨ ¤ ­­ëå, ®¡é¨å ¤«ï ¯à®¥ªâ®¢ ¤ ­­®© à ¡®ç¥© ®¡« áâ¨. +

 ¡®ç¨å ®¡« á⥩ ¬®¦¥â ¡ëâì ¯à®¨§¢®«ì­®¥ ª®«¨ç¥á⢮. Ž¤­ ª® ¢ ®¤­® ¢à¥¬ï ¢ ¨­â¥£à¨à®¢ ­­®© á।¥ ¬®¦¥â ¡ëâì ®âªàëâ  â®«ìª® ®¤­  à ¡®ç ï ®¡« áâì. ¥áª®«ìª® íª§¥¬¯«ï஢ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¬®£ãâ ®¤­®¢à¥¬¥­­® à ¡®â âì á ®¤­®© ¨ ⮦¥ à ¡®ç¥© ®¡« áâìî. ®í⮬㠯஥ªâë, ­ ¤ ª®â®à묨 ¢ë å®â¨â¥ à ¡®â âì ®¤­®¢à¥¬¥­­® ¨§ à §­ëå íª§¥¬¯«ï஢ ¨­â¥£à¨à®¢ ­­®© á।ë, ­¥®¡å®¤¨¬® ¯®¬¥é âì ¢ à §­ë¥ à ¡®ç¨¥ ®¡« áâ¨. +

ਠ¯¥à¢®¬ § ¯ã᪥ à ¡®ç ï ®¡« áâì (Workspace)  ¢â®¬ â¨ç¥áª¨ ᮧ¤ ¥âáï ¢ ¯¥àá®­ «ì­®© ¯ ¯ª¥ ¯®«ì§®¢ â¥«ï. ‘®§¤ ¢ âì ¤®¯®«­¨â¥«ì­ë¥ à ¡®ç¨¥ ®¡« á⨠¨ ¯¥à¥ª«îç âìáï ¬¥¦¤ã ­¨¬¨ ¬®¦­® ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î: ” ©« > ‘¬¥­¨âì à ¡®çãî ®¡« áâì... > à®ç¨¥... ¨ 㪠§ ¢ ¯ãâì ¤® ª â «®£  à ¡®ç¥© ®¡« áâ¨. …᫨ 㪠§ ­­ë© ª â «®£ ­¥ ᮤ¥à¦¨â à ¡®ç¥© ®¡« áâ¨, â® â ¬ ¡ã¤¥â ᮧ¤ ­  ­®¢ ï à ¡®ç ï ®¡« áâì. +

ਠáâ à⥠¨­â¥£à¨à®¢ ­­®© á।ë, ¯® 㬮«ç ­¨î ®âªà뢠¥âáï à ¡®ç ï ®¡« áâì, ª®â®à ï ¡ë«  ®âªàëâ  ¯®á«¥¤­¥©. Œ®¦­® ¢ª«îç¨âì ०¨¬, ¯à¨ ª®â®à®¬ à ¡®ç ï ®¡« áâì ¡ã¤¥â ® § ¯à è¨¢ âìáï ¯à¨ ª ¦¤®¬ § ¯ã᪥ ¨­â¥£à¨à®¢ ­­®© á।ë. „«ï í⮣® ®âªà®©â¥ ¤¨ «®£  à ¬¥âàë, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î Žª­® >  à ¬¥âàë..., ¢ «¥¢®© ¯ ­¥«¨ ¤¨ «®£  ¢ë¡¥à¨â¥ Ž¡é¨¥ > Startup and Shutdown > Workspaces ¨ ¢ª«îç¨â¥ ®¯æ¨î ।« £ âì ¢ë¡à âì à ¡®çãî ®¡« áâì ¯à¨ § ¯ã᪥. +

ਠ¨á¯®«ì§®¢ ­¨¨ ­¥áª®«ìª¨å à ¡®ç¨å ®¡« á⥩, ç áâ® ¢®§­¨ª ¥â ­¥®¡å®¤¨¬®áâì, ¢ ᨭåà®­¨§ æ¨¨ ­ áâ஥ª ¬¥¦¤ã ­¨¬¨. „«ï í⮣® ­¥®¡å®¤¨¬® ¨á¯®«ì§®¢ âì ¬¥å ­¨§¬ íªá¯®àâ  ¨¬¯®àâ  ­ áâ஥ª, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î ᮮ⢥âá⢥­­® ” ©« > ªá¯®àâ¨à®¢ âì... > Ž¡é¨¥ >  à ¬¥âàë ¨ ” ©« > ˆ¬¯®àâ¨à® âì... > Ž¡é¨¥ >  à ¬¥âàë. +

ਠ§ ¯ã᪥ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¬®¦­® ® 㪠§ âì ª ªãî à ¡®çãî ®¡« áâì ­¥®¡å®¤¨¬® ®âªàëâì ¯à¨ ¯®¬®é¨ á«¥¤ãî饣® ¯ à ¬¥âà  ª®¬ ­¤­®© áâப¨: +

-data WorkspacePath +

£¤¥ ¢ ª ç¥á⢥ ®¡ï§ â¥«ì­®£®  à£ã¬¥­â  WorkspacePath ­¥®¡å®¤¨¬® 㪠§ âì ¯ãâì ¤® à ¡®ç¥© ®¡« áâ¨. +

‘«¥¤ãî騩 ¯ à ¬¥âà ª®¬ ­¤­®© áâப¨ ¢ª«î砥⠮⮡ࠦ¥­¨¥ ¯ã⨠¤® à ¡®ç¥© ®¡« á⨠¢ § £®«®¢ª¥ £« ¢­®£® ®ª­  ¨­â¥£à¨à®¢ ­­®© á।ë: +

-showlocation [WorkspaceName] +

£¤¥ ­¥®¡ï§ â¥«ì­ë©  à£ã¬¥­â WorkspaceName § ¤ ¥â §­ ç¥­¨¥, ª®â®à®¥ ¡ã¤¥â ®â®¡à ¦ âìáï ¢ § £®«®¢ª¥ £« ¢­®£® ®ª­  ¢¬¥áâ® ¯ã⨠¤® à ¡®ç¥© ®¡« áâ¨. +

+஥ªâ

+ +

஥ªâ (Project) – íâ® ¯à¥¦¤¥ ¢á¥£® ª®­â¥©­¥à à¥áãàᮢ, ª ª®â®àë¬ ®â­®áïâáï ä ©«ë ¨ ¯ ¯ª¨, ¯à ¢¨« ¨å ®¡à ¡®âª¨ ¨ ¤à㣨å ᢮©á⢠¯à®¥ªâ  (â ª¨å, ª ª ­ áâனª¨ ª®¬¯¨«ïâ®à ). ”¨§¨ç¥áª¨ ¯à®¥ªâ ¯à¥¤áâ ¢«ï¥â ᮡ®© ¤¨à¥ªâ®à¨î, ä ©«ë ¨ ¯ ¯ª¨ ª®â®à®© ¨ ï¥âáï à¥áãàá ¬¨ ¯à®¥ªâ . ਠᮧ¤ ­¨¨ ¯à®¥ªâ  ­¥®¡å®¤¨¬® 㪠§ âì, £¤¥ ¥£® à §¬¥áâ¨âì ¢ ä ©«®¢®© á¨á⥬¥. +

‚ ¤¨à¥ªâ®à¨¨ ïî饩áï ¯à®¥ªâ®¬ ¨­â¥£à¨à®¢ ­­®© á।ë ᮧ¤ ¥âáï ᯥ樠«ì­ë© ä ©« á ¨¬¥­¥¬ .project.  á¯®«®¦¥­­ ï ¢ ⮩ ¦¥ ¤¨à¥ªâ®à¨¨ ¯ ¯ª  .settings ¨á¯®«ì§ã¥âáï ª ª åà ­¨«¨é¥ ᢮©á⢠¯à®¥ªâ . Š ª ¯à ¢¨«®, ¨¬¥­  ®áâ «ì­ëå ¢á¯®¬®£ â¥«ì­ëå ä ©«®¢ ¨ ¯ ¯®ª ¨­â¥£à¨à®¢ ­­®© á।ë â ª ¦¥ ­ ç¨­ îâáï á ᨬ¢®«  ".". +

‚§ ¨¬­® ®¤­®§­ ç­®£® ᮮ⢥âáâ¢¨ï ¬¥¦¤ã ¯à®¥ªâ­ë¬¨ ä ©« ¬¨ Š‘ (prj-ä ©« ¬¨) ¨ ¯à®¥ªâ ¬¨ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ­¥â. ஥ªâ­ë¥ ä ©«ë Š‘ ïîâáï ç áâ­ë¬ ¢¨¤®¬ à¥áãàá  ¯à®¥ªâ®¢ ¨­â¥£à¨à®¢ ­­®© á।ë. ஥ªâ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¬®¦¥â ᮤ¥à¦ âì ­¥áª®«ìª® prj-ä ©«®¢. +

 §¬¥é âì ¯à®¥ªâë ¢­ãâਠࠡ®ç¥© ®¡« á⨠­¥ ®¡ï§ â¥«ì­®. ®«¥¥ ⮣®, ¯à¨ à §¬¥é¥­¨¨ ¯à®¥ªâ  ¢­ãâਠࠡ®ç¥© ®¡« á⨠­¥®¡å®¤¨¬® çâ®¡ë ­ §¢ ­¨¥ ¯à®¥ªâ  ᮢ¯ ¤ «® á ­ §¢ ­¨¥¬ ¯ ¯ª¨, ¢ ª®â®à®© à §¬¥é¥­ ¯à®¥ªâ. +

஥ªâë ¨­â¥£à¨à®¢ ­­®© á।ë ४®¬¥­¤ã¥âáï à §¬¥é âì ¢ â¥å ¦¥ ¯ ¯ª å, çâ® ¨ Œ®¤ã« -2 ¯à®£à ¬¬ë. ‚ ç áâ­®áâ¨, íâ® ¯®§¢®«¨â «¥£ª® ¯¥à¥­®á¨âì ¯à®¥ªâ ¨§ ®¤­®£® à ¡®ç¥£® ¯à®áâà ­á⢠ ¢ ¤à㣮¥. +

„«ï ⮣® çâ®¡ë ¤®¡ ¢¨âì áãé¥áâ¢ãî騩 ¯à®¥ªâ ¢ à ¡®çãî ®¡« áâì ­¥®¡å®¤¨¬® ¢®á¯®«ì§®¢ âìáï ¬¥å ­¨§¬®¬ ¨¬¯®àâ , ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î ” ©« > ˆ¬¯®àâ¨à®¢ âì... > Ž¡é¨¥ > ஥ªâ ¢ à ¡®çãî ®¡« áâì. +

® 㬮«ç ­¨î ¯à¥¤¯®« £ ¥âáï, çâ® ¢á¥ à¥áãàáë ¯à®¥ªâ  åà ­ïâáï ¢­ãâਠ¯ ¯ª¨, ᮤ¥à¦ é¥© ¯à®¥ªâ. „«ï ¨á¯®«ì§®¢ ­¨ï à¥áãàᮢ ­ å®¤ïé¨åáï ¢­¥ ¯ ¯ª¨ ¯à®¥ªâ , ¨å ­¥®¡å®¤¨¬® ¤®¡ ¢«ïâì, ç¥à¥§ ᯥ樠«ì­ë© ¬¥å ­¨§¬ ‘¢ï§ ­­ëå ¥áãàᮢ (Linked Resources). +

…᫨ ä ©«ë ¨ ¯ ¯ª¨ ¤®¡ ¢«¥­ë ¨«¨ 㤠«¥­ë ¨§ ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  ­¥ ç¥à¥§ ¨­â¥£à¨à®¢ ­­ãî á।ã, â® ¤«ï ⮣® ç⮡ë â ª¨¥ ¨§¬¥­¥­¨ï ¡ë«¨ ¤®áâã¯­ë ¢ ¨­â¥£à¨à®¢ ­­®© á।¥ ­¥®¡å®¤¨¬® ¢ë¯®«­¨âì ®¡­®¢«¥­¨¥ ¯à®¥ªâ . „«ï í⮣® ¯¥à¥©¤¨â¥ ¢ ¯ ­¥«ì ‘âàãªâãà  ¯à®¥ªâ , ¢ë¡¥à¨â¥ ­ã¦­ë© ¯à®¥ªâ ¨ ¢ ¥£® ª®­â¥ªáâ­®¬ ¬¥­î ¢ë¡¥à¨â¥ ¯ã­ªâ Ž¡­®¢¨âì ¨«¨ ­ ¦¬¨â¥ F5. +

Š ª¨¬ ®¡à §®¬ ¨­â¥£à¨à®¢ ­­ ï á।  ¡ã¤¥â ¨­â¥à¯à¥â¨à®¢ âì ¨ ®¡à ¡ â뢠âì ¯à®¥ªâ § ¢¨á¨â ®â ᢮©á⢠¯à®¥ªâ .  ¨¡®«¥¥ ¢ ¦­ë¬¨ ᢮©á⢠¬¨ ïîâáï: â¨¯ë ¯à®¥ªâ®¢ (project natures) ¨ ¯®áâந⥫¨ (builders). +

’¨¯ ¯à®¥ªâ  (Project Nature) ®¯à¥¤¥«ï¥â ¬­®¦¥á⢮ ¯®áâந⥫¥©, ª®â®àë¥ ¬®£ãâ à ¡®â âì á à¥áãàá ¬¨ ¯à®¥ªâ . ‘ ®¤­¨¬ ¯à®¥ªâ®¬ ¬®¦¥â à ¡®â âì ­¥áª®«ìª® ¯®áâந⥫¥©. +

®áâந⥫¨ (Builders) ®â¢¥ç îâ §  ®¡à ¡®âªã à¥áãàᮢ ¯à®¥ªâ , ­ ¯à¨¬¥à, § ¯ã᪠ª®¬¯¨«ïâ®à . Š ª ¯à ¢¨«®, ª ¦¤ë© ¯®áâà®¨â¥«ì ¯à¥¤­ §­ ç¥­ ¤«ï ®¯à¥¤¥«ñ­­®£® ⨯  ä ©«®¢. +

®á¬®âà¥âì ¨ ¨§¬¥­¨âì ᯨ᮪ ¯®áâந⥫¥© ¯à®¥ªâ  ¬®¦­® ¢ë¡à ¢ ¢ ª®­â¥ªáâ­®¬ ¬¥­î ¯à®¥ªâ  ‘¢®©á⢠ > Š®¬¯®­®¢é¨ª¨. +

+¥áãàáë

+ +

¥áãàáë (Resources) – íâ® ®¡é¨© â¥à¬¨­ ¤«ï ¯à®¥ªâ®¢, ¯ ¯®ª ¨ ä ©«®¢ ª®â®à묨 ®¯¥à¨àã¥â ¨­â¥£à¨à®¢ ­­ ï á। . ” ©«ë ¨ ¯ ¯ª¨ ¨­â¥£à¨à®¢ ­­®© á।ë ᮮ⢥âáâ¢ãîâ ®¡ëç­ë¬ ä ©« ¬ ¨ ¤¨à¥ªâ®à¨ï¬ ä ©«®¢®© á¨á⥬ë.  ¯ª¨ ¬®£ãâ ᮤ¥à¦ âì ä ©«ë ¨ ¤à㣨¥ ¯ ¯ª¨, ­® ­¥ ¯à®¥ªâë. ‘ ¬¨ ¯ ¯ª¨ ᮤ¥à¦ âìáï ¢ ¯à®¥ªâ å ¨«¨ ¤àã£¨å ¯ ¯ª å. +

” ©«ë ¨ ¯ ¯ª¨ ¬®£ãâ ¡ëâì á¢ï§ ­­ë á ä ©« ¬¨ ¨ ¯ ¯ª ¬¨ ¢­¥ ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ . ’ ª¨¥ ä ©«ë ¨ ¯ ¯ª¨ ­ §ë¢ îâáï á¢ï§ ­­ë¬¨ à¥áãàá ¬¨. +

 ¢¨£ æ¨®­­ë¥ ¯ ­¥«¨, â ª¨¥ ª ª ‘âàãªâãà  ¯à®¥ªâ  ®â®¡à ¦ îâ ¨¥à àå¨ç¥áªãî áâàãªâãàã à¥áãàᮢ ¨ ¯®§¢®«ïîâ ®âªà뢠âì ¨ । ªâ¨à®¢ âì à¥áãàáë. ®¬¨¬® ä ©«®¢ ¨ ¯ ¯®ª ¯à®¥ªâ  ­ ¢¨£ æ¨®­­ë¥ ¯ ­¥«¨ ¬®£ã⠮⮡ࠦ âì ¢¨àâã «ì­ë¥ ¯ ¯ª¨, ª®â®àë¥ ­¥ ᮮ⢥âáâ¢ãîâ ­¨ ®¤­®© ¤¨à¥ªâ®à¨¨ ä ©«®¢®© á¨á⥬ë.  «¨ç¨¥ ¨ ᮤ¥à¦ ­¨¥ ¢¨àâã «ì­ëå ¯ ¯®ª § ¢¨á¨â ®â ⨯  ¯à®¥ªâ . +

‘¬®âਠ⠪¦¥ +

‘¢®©á⢠ à¥áãàᮢ
+ ‘®§¤ ­¨¥ ­®¢ëå í«¥¬¥­â®¢
+ ஥ªâ +

+®¤ª«îç ¥¬ë© ¬®¤ã«ì

+ +

Š«î祢®© ®á®¡¥­­®áâìî ¯« âä®à¬ë Eclipse ï¥âáï ¥¥ £¨¡ª®áâì ¨ à áè¨à塞®áâì, ª®â®à ï ¤®á⨣ ¥âáï §  áç¥â ¬®¤ã«ì­®© ®à£ ­¨§ æ¨¨ ¯« âä®à¬ë. ‡  ¨áª«î祭¨¥¬ ¬ «¥­ìª®£® ï¤à  ¢à¥¬¥­¨ ¨á¯®«­¥­¨ï, ¢á¥ ª®¬¯®­¥­âë á ¬®© ¯« âä®à¬ë ¨ ¯®áâ஥­­®© ­  ¥¥ ¡ §¥ ¨­â¥£à¨à®¢ ­­®© á।ë ïîâáï ®¤ª«îç ¥¬ë¬¨ Œ®¤ã«ï¬¨ (Plug-ins), ª®â®àë¥ § £à㦠îâáï ¤¨­ ¬¨ç¥áª¨ ¨ ­¥§ ¢¨á¨¬® ¤à㣠®â ¤à㣠.  §ã¬¥¥âáï, ¯à¥¤ãᬮâ७  ¢®§¬®¦­®áâì ¤«ï ª ¦¤®£® ¯®¤ª«îç ¥¬®£® ¬®¤ã«ï 㪠§ âì, ª ª¨¥ ¬®¤ã«¨ ¤®«¦­ë ¡ëâì § £à㦥­ë ¤® ­¥£®. ”㭪樨 ï¤à  ¯« âä®à¬ë ä ªâ¨ç¥áª¨ ᢮¤ïâáï ª ®¡­ à㦥­¨î ¯®¤ª«îç ¥¬ëå ¬®¤ã«¥© ¨ ¨­â¥£à æ¨¨ ¨å ¢ ¯« âä®à¬ã ¨ ¤à㣨¥ ¬®¤ã«¨. ‚ í⮬ ®â­®è¥­¨¨ áâ ­¤ àâ­ë¥ ¨ ¢­®¢ì ᮧ¤ ¢ ¥¬ë¥ ä㭪樮­ «ì­ë¥ ¢®§¬®¦­®á⨠¯« âä®à¬ë à ¢­®¯à ¢­ë. +

+ + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help004.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help004.html new file mode 100644 index 0000000..87bd03d --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help004.html @@ -0,0 +1,137 @@ + + + + +®«ì§®¢ â¥«ì᪨© ¨­â¥à䥩á + + + +

+®«ì§®¢ â¥«ì᪨© ¨­â¥à䥩á

+ +

Žá­®¢­ë¥ í«¥¬¥­âë ¯®«ì§®¢ â¥«ì᪮£® ¨­â¥àä¥©á  ¯à¥¤áâ ¢«¥­ë ­  ¯à¨¢¥¤¥­­®¬ ­¨¦¥ à¨áã­ª¥: +

+

Žá­®¢­ë¥ í«¥¬¥­âë áà¥¤ë ¢ª«îç îâ ¢ ᥡï: +

    + +
  1. Workbench ( ¡®ç¨© á⮫) – ¢á¥®¡ê¥¬«î騩 ª®­â¥©­¥à ¤«ï ¢á¥å ®ª®­. Ž­ ᮤ¥à¦¨â £« ¢­®¥ ¬¥­î, áâப㠪­®¯®ª ¨ ­ ¡®à ¤®ç¥à­¨å ®ª®­.
  2. +
  3. Perspective (஥ªæ¨ï) – ¢¨§ã «ì­ë© ª®­â¥©­¥à ¤«ï ¢á¥å ®âªàëâëå  ­¥«¥© (Views) ¨ ¥¤ ªâ®à®¢ (Editors), ®â­®áïé¨åáï ª ®¯à¥¤¥«¥­­®© § ¤ ç¥.   à¨áã­ª¥ ¯à¥¤áâ ¢«¥­  ¯à®¥ªæ¨ï XDS Œ®¤ã« -2, í⮠㪠§ ­® ¢ «¥¢®© ¢¥àå­¥© § ª« ¤ª¥, ¯®¤ áâன ª­®¯®ª. „ ­­ ï ¯à®¥ªæ¨ï ¯à¥¤­ §­ ç¥­  ¤«ï à ¡®âë á Œ®¤ã« -2 ¯à®£à ¬¬ ¬¨.
  4. +
  5. View ( ­¥«ì) – ¢¨§ã «ì­ë© ª®­â¥©­¥à, ¢ ª®â®à®¬ ¯®ª § ­ë à¥áãàáë ª®­ªà¥â­®£® ⨯ . Ž¡ëç­® ¤ ­­ë¥ â ¬ ¯à¥¤áâ ¢«¥­ë ¢ ¢¨¤¥ á¥âª¨ ¨«¨ ¤¥à¥¢ .   à¨áã­ª¥ ¢ ª ç¥á⢥ ¯à¨¬¥à  ¯à¨¢¥¤¥­  ¯ ­¥«ì ஡«¥¬ë, ¢ ª®â®à®© ®â®¡à ¦ îâáï ®è¨¡ª¨ ¨ ¯à¥¤ã¯à¥¦¤¥­¨ï, ®¡­ à㦥­­ë¥ ¢ ¨á室­®¬ ª®¤¥ ¯à®£à ¬¬ë.
  6. +
  7. Short Cut Bar (¯ ­¥«ì ¨ª®­®ª) – ­ ¡®à ¨ª®­®ª, ª®â®àë¥ ¤ îâ ¯®«ì§®¢ â¥«î ¡ëáâàë© ¤®áâ㯠ª à §«¨ç­ë¬ ¯à®¥ªæ¨ï¬.
  8. +
  9. Menu Bar (¬¥­î) – ­ ¡®à ª®­â¥ªáâ­®-§ ¢¨á¨¬ëå ¤¥©á⢨©, ª®â®àë¥ ¤ îâ ¯®«ì§®¢ â¥«î ¢®§¬®¦­®áâì § ¯ãáâ¨âì ª ªãî-­¨¡ã¤ì ¯à¥¤®¯à¥¤¥«¥­­ãî äã­ªæ¨î.
  10. +
  11. Tool Bar (¯ ­¥«ì ¨­áâà㬥­â®¢) – ­ ¡®à ª®­â¥ªáâ­®-§ ¢¨á¨¬ëå ¤¥©á⢨©, ª®â®àë¥ ¤ îâ ¯®«ì§®¢ â¥«î ¢®§¬®¦­®áâì § ¯ãáâ¨âì ª ªãî-­¨¡ã¤ì ¯à¥¤®¯à¥¤¥«¥­­ãî äã­ªæ¨î. Š® ¢á¥¬ ¯ã­ªâ ¬ ¢ ¯ ­¥«¨ ¨­áâà㬥­â®¢ Tool Bar ¬®¦­® â ª¦¥ ¯®«ãç¨âì ¤®áâ㯠¨ ç¥à¥§ Œ¥­î.
  12. +
  13. Editor (¥¤ ªâ®à) – ¯à¥¤áâ ¢«ï¥â ᮡ®© ¨­áâà㬥­â ¤«ï । ªâ¨à®¢ ­¨ï ä ©«®¢ ¯à®¥ªâ .
  14. +
  15.  ­¥«ì ¨­áâà㬥­â®¢ ®ª­  – ­ ¡®à ª®­â¥ªáâ­®-§ ¢¨á¨¬ëå ¤¥©á⢨©, ª®â®àë¥ ¤ îâ ¯®«ì§®¢ â¥«î ¢®§¬®¦­®áâì ¢ë¯®«­¨âì ª ª®¥-«¨¡® ¤¥©á⢨¥ ¤«ï ®¯à¥¤¥«¥­­®£® ®ª­ . ’ ª¨¥ ¯ ­¥«¨ ¥áâì ª ª ã  ­¥«¥©, â ª ¨ ã ¥¤ ªâ®à®¢.
  16. +
  17. Project Explorer (‘âàãªâãà  ¯à®¥ªâ ) – ¯ ­¥«ì, ª®â®à ï ¨á¯®«ì§ã¥âáï ¤«ï ã¯à ¢«¥­¨ï ¯à®¥ªâ ¬¨ ¨ à¥áãàá ¬¨. Ž¯¨á ­¨¥ ¤ ­­®© ¯ ­¥«¨ ¢ë­¥á¥­® ®â¤¥«ì­®, â ª ª ª ¨¬¥­­® §¤¥áì ®áãé¥á⢫ï¥âáï ã¯à ¢«¥­¨¥ ®âªàëâ묨 ¯à®¥ªâ ¬¨ ¨ à¥áãàá ¬¨.
  18. +
  19. Status Bar (‘âப  á®áâ®ï­¨ï) – í⮠ᯥ樠«ì­ë© í«¥¬¥­â ®ª­ , ¯à¥¤­ §­ ç¥­­ë© ¤«ï ¢ë¢®¤  ¢á¯®¬®£ â¥«ì­®© ¨­ä®à¬ æ¨¨: ¯ à ¬¥â஢ ¤®ªã¬¥­â , á ª®â®àë¬ à ¡®â ¥â ¯®«ì§®¢ â¥«ì, ¯®¤áª §®ª ¨ â.¤.   à¨áã­ª¥ ¯®ª § ­  áâப  á®áâ®ï­¨ï, ®â®¡à ¦ îé ï á®áâ®ï­¨¥  ªâ¨¢­®£® ®ª­  ¥¤ ªâ®à .
  20. +
+ +

¥¤ ªâ®àë ¨ ¯ ­¥«¨ ïîâáï ¤®ç¥à­¨¬¨ ®ª­ ¬¨ à ¡®ç¥£® á⮫ . „®ç¥à­¨¥ ®ª­  ¬®£ãâ ¡ëâì  ªâ¨¢­ë¬¨ ¨«¨ ­¥ ªâ¨¢­ë¬¨, ­® ⮫쪮 ®¤­® ¤®ç¥à­¥¥ ®ª­® ¬®¦¥â ¡ëâì  ªâ¨¢­ë¬ ¢ ¤ ­­ë© ¬®¬¥­â ¢à¥¬¥­¨. €ªâ¨¢­ë¬ ï¥âáï â® ®ª­®, ã ª®â®à®£® ¯®¤á¢¥ç¥­ § £®«®¢®ª. Š ᮤ¥à¦¨¬®¬ã  ªâ¨¢­®£® ®ª­  ¡ã¤ã⠯ਬ¥­ïâìáï ®¡é¨¥ ®¯¥à æ¨¨ ¢ë१ª¨, ª®¯¨à®¢ ­¨î ¨ ¢áâ ¢ª¨. ’ ª¦¥  ªâ¨¢­®¥ ®ª­® ®¡ãá« ¢«¨¢ ¥â ᮤ¥à¦¨¬®¥ áâப¨ á®áâ®ï­¨ï à ¡®ç¥£® á⮫ . …᫨ § ª« ¤ª  । ªâ®à  ¡¥« ï, â® íâ® ¯®ª §ë¢ ¥â, çâ® ¤ ­­ë© । ªâ®à ­¥ ªâ¨¢¥­, ®¤­ ª® ¯ ­¥«¨ ¬®£ã⠮⮡ࠦ âì ¨­ä®à¬ æ¨î, ¯®«ã祭­ãî ¨§ । ªâ®à , ¡ë¢è¥£®  ªâ¨¢­ë¬ ¯®á«¥¤­¨¬. ਠ¤¢®©­®¬ ­ ¦ â¨¨ ­  § ª« ¤ªã ¤®ç¥à­¥£® ®ª­  ®­® à §¢®à ç¨¢ ¥âáï ­  ¯®«­ë© à §¬¥à ®ª­  Eclipse. ®¢â®à­®¥ ¤¢®©­®¥ ­ ¦ â¨¥ ᢥ୥⠮ª­® ¤® ¯¥à¢®­ ç «ì­®£® à §¬¥à . +

® ¤®ç¥à­¨¬ ®ª­ ¬ à ¡®ç¥£® á⮫  ¬®¦­® ¯¥à¥¬¥é âìáï 横«¨ç¥áª¨, ¨á¯®«ì§ãï ª®¬¡¨­ æ¨î ª« ¢¨è Ctrl + ~. +

Žáâ ­®¢¨¬áï ¯®¤à®¡­¥¥ ­  ®¯¨á ­¨¨ ­¥ª®â®àëå ®á­®¢­ëå í«¥¬¥­â®¢. +

+ ¡®ç¨© á⮫

+ +

 ¡®ç¨© ‘⮫ (Workbench) íâ® £« ¢­®¥ ®ª­® ¨­â¥£à¨à®¢ ­­®© á।ë, ª®â®à®¥ ¯à¥¤®áâ ¢«ï¥â ¨­äà áâàãªâãàã ¤«ï ã¯à ¢«¥­¨ï à¥áãàá ¬¨ à ¡®ç¥© ®¡« á⨠¨ ­ ¢¨£ æ¨¨ ¯® ­¨¬. +

Žª­® à ¡®ç¥£® á⮫  ᮤ¥à¦¨â ®¤­ã ¨«¨ ­¥áª®«ìª® ¯à®¥ªæ¨©, ª®â®àë¥ ã¯à ¢«ïîâ ¢§ ¨¬­ë¬ à á¯®«®¦¥­¨¥¬ । ªâ®à®¢ ¨ ¯ ­¥«¥© ­ ¨¡®«¥¥ 㤮¡­ë¬ ¤«ï ¢ë¯®«­¥­¨ï ®¯à¥¤¥«ñ­­ëå § ¤ ç. +

+஥ªæ¨¨

+ +

஥ªæ¨¨ (Perspective) ®¯à¥¤¥«ï¥â ­ ¡®à ¨ ¢§ ¨¬­®¥ à á¯®«®¦¥­¨¥ ¯ ­¥«¥©, । ªâ®à®¢ ¨ ¤à㣨å í«¥¬¥­â®¢ ¨­â¥à䥩á , ª®â®àë¥ ¢¨¤­ë ¯®«ì§®¢ â¥«î. ஥ªæ¨ï ¬®¦¥â ᮤ¥à¦ âì ¯à®¨§¢®«ì­®¥ ª®«¨ç¥á⢮ ¯ ­¥«¥© ¨ । ªâ®à®¢. Š®«¨ç¥á⢮ á ¬¨å ¯à®¥ªæ¨© â ª ¦¥ ­¨ç¥¬ ­¥ ®£à ­¨ç¥­®, ­® ⮫쪮 ®¤­  ¨§ ­¨å ¢¨¤¨¬  ¢ ¤ ­­ë© ¬®¬¥­â. „«ï ⮣® çâ®¡ë ¯®«ãç¨âì ¯®«­ë© ᯨ᮪ ¯à®¥ªæ¨© ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ¢ë¡à âì Žª­® > Žâªàëâì ¯à®¥ªæ¨î > à®ç¨¥.... +

Š ¦¤ ï ¯à®¥ªæ¨ï ¬®¦¥â ¨¬¥âì à §«¨ç­ë¥ ­ ¡®àë ¯ ­¥«¥©, ­® ¢á¥ ¯à®¥ªæ¨¨ ¨á¯®«ì§ãîâ ®¤¨­ ¨ â®â ¦¥ ­ ¡®à । ªâ®à®¢. ’.¥. ¯à¨ ¯¥à¥ª«î祭¨¨ ¬¥¦¤ã ¯à®¥ªæ¨ï¬¨ ª®«¨ç¥á⢮ ¨ ¢§ ¨¬­®¥ à á¯®«®¦¥­¨¥ । ªâ®à®¢ ­¥ ¬¥­ï¥âáï. +

Žá­®¢­®¥ ­ §­ ç¥­¨¥ ¯à®¥ªæ¨¨ ¯à¥¤®áâ ¢¨âì ¤«ï ¢ë¯®«­ï¥¬®© ¢ ¤ ­­ë© ¬®¬¥­â § ¤ ç¨ ®¯â¨¬ «ì­ë© ­ ¡®à ¯ ­¥«¥©, â ª çâ®¡ë ¯®¤ à㪮© ¡ë«¨ ⮫쪮 ­¥®¡å®¤¨¬ë¥ ¨­áâà㬥­â «ì­ë¥ á।á⢠. +

„«ï ⥪ã饩 ¯à®¥ªæ¨¨ ¬®¦­® ¢®ááâ ­®¢¨âì ­ ç «ì­®¥ à á¯®«®¦¥­¨¥ ®ª®­, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î Žª­® > ‘¡à®á ¯à®¥ªæ¨¨. +

+¥¤ ªâ®à

+ +

¥¤ ªâ®à (Editor) ¯à¥¤áâ ¢«ï¥â ᮡ®© ¨­áâà㬥­â ¤«ï ¯à®á¬®âà  ¨ । ªâ¨à®¢ ­¨ï ä ©«®¢ ¯à®¥ªâ . „«ï ª ¦¤®£® ä ©«  ᮧ¤ ¥âáï ᢮© íª§¥¬¯«ïà । ªâ®à . ‚¥àå­ïï ç áâì ®ª­  । ªâ®à  ¯à¥¤áâ ¢«ï¥â ᮡ®© ¨­â¥à䥩á á § ª« ¤ª ¬¨ ¤«ï ¡ëáâண® ¯¥à¥ª«î祭¨ï ¬¥¦¤ã ä ©« ¬¨. +

ˆ§¬¥­¥­¨ï, ¢ë¯®«­¥­­ë¥ ¢ ¯à®æ¥áᥠ। ªâ¨à®¢ ­¨ï, ­¥ § ¯¨á뢠îâáï ¢ ®âªàëâë© ä ©«, ¤® â¥å ¯®à, ¯®ª  ­¥ ¡ã¤¥â ¢ë§¢ ­  ª®¬ ­¤  á®åà ­¥­¨ï. ‚ । ªâ®à¥, ᮧ¤ ­­®¬ ¤«ï ®¤­®£® ä ©« , ­¥¢®§¬®¦­® ®âªàëâì ª ª®©-«¨¡® ¤à㣮© ä ©«. +

ˆ¬ï । ªâ¨à㥬®£® ä ©«  ®â®¡à ¦ ¥âáï ¢ § ª« ¤ª¥. …᫨ ¢ «¥¢®© ç á⨠§ ª« ¤ª¨ ¯®ï¢«ï¥âáï ᨬ¢®« §¢¥§¤®çª¨ *, â® íâ® ®§­ ç ¥â, ç⮠। ªâ®à ᮤ¥à¦¨â ­¥á®åà ­¥­­ë¥ ¨§¬¥­¥­¨ï. …᫨ ¢ë ¯®¯ëâ ¥â¥áì ¢ â ª®¬ á«ãç ¥ § ªàëâì । ªâ®à ¨«¨ ¢ë©â¨ ¨§ ¨­â¥£à¨à®¢ ­­®© á।ë, â® ¡ã¤¥â ¢ë¢¥¤¥­® ­ ¯®¬¨­ ­¨¥ ® ­ «¨ç¨¥ ­¥á®åà ­¥­­ëå ¨§¬¥­¥­¨©. +

+

‚ «¥¢®© ç á⨠। ªâ®à  à á¯®« £ ¥âáï ¢¥à⨪ «ì­ ï ¯« ­ª , ­ §ë¢ ¥¬ ï ¯« ­ª  ¬ àª¨à®¢ª¨. ‚ ­¥© ®â®¡à ¦ îâáï ¨ª®­ª¨ ¬ àª¥à®¢, 㪠§ë¢ î騥 ­  ®è¨¡ª¨ ¨ ¯à¥¤ã¯à¥¦¤¥­¨ï ª®¬¯¨«ï樨, ­ «¨ç¨¥ § ª« ¤ª¨ ¨ â.¤. ਠ­ ¢¥¤¥­¨¨ ªãàá®à  ­  ¬ àª¥à ¯®ï¢«ï¥âáï ª®­â¥ªáâ­ ï ¨­ä®à¬ æ¨ï ® ¤ ­­®¬ ¬ àª¥à¥. ‚맢 ¢ ª®­â¥ªáâ­®¥ ¬¥­î ­ ¯à®â¨¢ ­ã¦­®© áâப¨ ¤®ªã¬¥­â  ­  ¯« ­ª¥ ¬ àª¨à®¢ª¨, ¬®¦­® ¤®¡ ¢«ïâì ¨«¨ 㤠«ïâì § ª« ¤ª¨ ¨ § ¤ ç¨, ᮮ⢥âá⢥­­® ¢ë¡à ¢ ¯ã­ªâë „®¡ ¢¨âì/“¤ «¨âì § ª« ¤ªã, „®¡ ¢¨âì/“¤ «¨âì § ¤ çã. +

‘¯à ¢  ®â ¯« ­ª¨ ¬ àª¥à®¢ à á¯®« £ ¥âáï ¢¥à⨪ «ì­®¥ ¯®«¥, ¢ ª®â®à®¬ ¬®£ã⠮⮡ࠦ âìáï ­®¬¥à  áâப ¨ ¬ àª¥àë æ¨ä஢ëå § ª« ¤®ª. ˜¨à¨­  í⮣® ¯®«ï ¬¥­ï¥âáï ¤¨­ ¬¨ç¥áª¨ ¢ § ¢¨á¨¬®á⨠®â ®â®¡à ¦ ¥¬®© ¢ ­¥¬ ¨­ä®à¬ æ¨¨. +

‚ ¯à ¢®© ç á⨠। ªâ®à  à á¯®«®¦¥­  «¨­¥©ª  ®¡§®à , ᮤ¥à¦ é ï 梥â­ë¥ ¬ àª¥àë. Ž­¨ 㪠§ë¢ îâ ­  ⥠¬¥áâ  ¢ ä ©«¥, ¢ ª®â®àëå ­ å®¤ïâáï ¯à¥¤ã¯à¥¦¤¥­¨ï, ®è¨¡ª¨, § ª« ¤ª¨ ¨ १ã«ìâ âë ¯®¨áª . ‹¨­¥©ª  ®¡§®à  ¯®«¥§­  ¯à¨ ­ ¢¨£ æ¨¨ ¯® ä ©« ¬, ª®â®àë¥ ­¥ ¢¬¥é îâáï ¢ ®ª­® । ªâ®à  ¯®«­®áâìî. ਠ­ ¢¥¤¥­¨¨ ªãàá®à  ­  ¬ àª¥à ®â®¡à ¦ ¥âáï ¯®¤áª §ª . ਠ­ ¦ â¨¨ ­  ¬ àª¥à ®áãé¥á⢫ï¥âáï ¯¥à¥å®¤ ª ⮩ ç á⨠ª®¤ , ­  ª®â®àãî ®­ 㪠§ë¢ ¥â.   ¨áã­ª¥ ¢¨¤­ë ç¥âëॠ⨯  ¬ àª¥à®¢: ¦¥«âë¥ – ¯à¥¤ã¯à¥¦¤¥­¨ï, ªà á­ë¥ – ®è¨¡ª¨, ᨭ¨¥ – § ¤ ç¨, §¥«¥­ë¥ – § ª« ¤ª¨. +

‚ë ¬®¦¥â¥ ¯¥à¥¬¥é âìáï ¯® । ªâ®à ¬ à ¡®ç¥£® á⮫  横«¨ç¥áª¨, ¨á¯®«ì§ãï ª®¬¡¨­ æ¨î ª« ¢¨è Ctrl + Tab. +

+ ­¥«¨

+ +

 ­¥«¨ (Views) ¯à¥¤­ §­ ç¥­ë ¤«ï ¯à¥¤®áâ ¢«¥­¨ï ¨­ä®à¬ æ¨¨ ®¡ ®¡ê¥ªâ¥, á ª®â®àë¬ ¯®«ì§®¢ â¥«ì à ¡®â ¥â ¢ ¤ ­­ë© ¬®¬¥­â, ¨ ¨§¬¥­¥­¨¨ ¥£® ᢮©áâ¢. ‚ ®â«¨ç¨¥ ®â । ªâ®à®¢ ¯ ­¥«¨ ­¥ á¢ï§ ­ë á ª ª¨¬-«¨¡® ª®­ªà¥â­ë¬ à¥áãàᮬ. Ž¤¨­  ¨ â  ¦¥ ¯ ­¥«ì ¢ à §­ë¥ ¬®¬¥­âë ¢à¥¬¥­¨ ¬®¦¥â ®â®¡à âì ¨­ä®à¬ æ¨î ® à §­ëå ®¡ê¥ªâ å.  ­¥«¨ ¬®£ãâ ¡ëâì ¨á¯®«ì§®¢ ­ë ¤«ï ®â®¡à ¦¥­¨ï ᮤ¥à¦¨¬®£®  ªâ¨¢­®£® ¢ ¤ ­­ë© ¬®¬¥­â । ªâ®à , í«¥¬¥­â , ¢ë¡à ­­®£® ¢ ¤à㣮© ¯ ­¥«¨,   â ª¦¥ ¤ ­­ëå, ¯®«ã祭­ëå «î¡ë¬ ¤à㣨¬ ¯ã⥬ (â ª¨å, ª ª, ­ ¯à¨¬¥à, á®®¡é¥­¨ï ª®¬¯¨«ïâ®à ). +

‚ ®â«¨ç¨¥ ®â । ªâ®à®¢, ¨§¬¥­¥­¨ï, ᤥ« ­­ë¥ ¯®«ì§®¢ â¥«¥¬ ¯à¨ ¯®¬®é¨ ¯ ­¥«¨, ª ª ¯à ¢¨«®, ­¥¬¥¤«¥­­® á®åà ­ïîâáï ¨«¨ ¯¥à¥­®áïâáï ¢ ᮮ⢥âáâ¢ãî騥 à¥áãàáë.  ¯à¨¬¥à, ¢ ¯ ­¥«¨ ‘âàãªâãà  ¯à®¥ªâ  ®âáãâáâ¢ã¥â ª®¬ ­¤  ‘®åà ­¨âì (Save) ¨«¨ ¯®¤®¡­ ï ¥© – â ª¨¥ ¤¥©áâ¢¨ï ¯®«ì§®¢ â¥«ï, ª ª ª®¯¨à®¢ ­¨¥ ¨«¨ ¯¥à¥¨¬¥­®¢ ­¨¥ ä ©«®¢, ­¥¬¥¤«¥­­® ¯à®¨§¢®¤ïâáï á ᮮ⢥âáâ¢ãî騬¨ à¥áãàá ¬¨. „ ­­®¥ ᮣ« è¥­¨¥ ­¥ ï¥âáï, áâண® £®¢®àï, ®¡ï§ â¥«ì­ë¬. ¥ª®â®àë¥ ¯ ­¥«¨ ¬®£ãâ âॡ®¢ âì ®£® á®åà ­¥­¨ï ¯®«ì§®¢ â¥«ìáª¨å ¨§¬¥­¥­¨©. Ž¤­ ª® â ª¨¥ ¯®¢¥¤¥­¨¥ ¯à®â¨¢®à¥ç¨â ¯à¨­ïâë¬ á®£« è¥­¨ï¬ ® ¯®«ì§®¢ â¥«ì᪮¬ ¨­â¥à䥩ᥠ¯« âä®à¬ë Eclipse. +

‹î¡ ï ¨§ ¯ ­¥«¥© ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¬®¦¥â ¡ëâì § ªàëâ  ¨ ¢ «î¡®© ¬®¬¥­â ®âªàëâ  á­®¢  ç¥à¥§ £« ¢­®¥ ¬¥­î: Žª­® > ®ª § âì ¯ ­¥«ì > à®ç¨¥.... +

+‘âàãªâãà  ¯à®¥ªâ 

+ +

 ­¥«ì ‘âàãªâãà  ¯à®¥ªâ  ®â®¡à ¦ ¥â ¤à¥¢®¢¨¤­ãî áâàãªâãà㠯஥ªâ®¢ ⥪ã饩 à ¡®ç¥© ®¡« áâ¨. „ ­ ï ¯ ­¥«ì ¯®§¢®«ï¥â: +

    + +
  • ¯à®á¬ âਢ âì áâàãªâãàã ¯ ¯®ª ¨ ä ©«®¢ ¯à®¥ªâ ,
  • +
  • ®âªà뢠âì । ªâ®à ¤«ï ä ©«®¢,
  • +
  • ᮧ¤ ¢ âì ­®¢ë¥ ¯à®¥ªâë, ¯ ¯ª¨ ¨ ä ©«,
  • +
  • 㤠«ïâì, ¯¥à¥¨¬¥­®¢ë¢ âì ¨ ¯¥à¥­®á¨âì áãé¥áâ¢ãî騥 ä ©«ë,
  • +
  • ®áãé¥á⢫ïâì íªá¯®àâ ¨ ¨¬¯®à⠯஥ªâ®¢ ¨ ­ áâ஥ª.
  • +
+ +

” ©«ë, ª®â®àë¥ ¢ë¡à ­ë ¢ ¯ ­¥«¨ ‘âàãªâãà  à®¥ªâ  ­¥¯®á।á⢥­­® ¢«¨ïîâ ­  â®, çâ® ®â®¡à ¦ ¥âáï ¢ ®áâ «ì­ëå ¯ ­¥«ïå ¨­â¥£à¨à®¢ ­­®© á।ë. +

™¥«ç®ª ¯à ¢®© ª­®¯ª¨ ¬ëè¨ ­  «î¡®¬ í«¥¬¥­â¥ ¢ ¯ ­¥«¨ ‘âàãªâãà  à®¥ªâ  ®âªà뢠¥â ª®­â¥ªáâ­®¥ ¬¥­î, ª®â®à®¥ ¯®§¢®«ï¥â ã¯à ¢«ïâì ¤ ­­ë¬ í«¥¬¥­â®¢ ¨ ¥£® ᢮©á⢠¬¨. +

„«ï Œ®¤ã« -2 ¯à®¥ªâ®¢, ¯® 㬮«ç ­¨î, ®â®¡à ¦ îâáï ⮫쪮 ¨á室­ë¥ ä ©«ë á Œ®¤ã« -2 ª®¤®¬ ¨ ¯ ª¥â­ë¥ ä ©«ë ®â« ¤ç¨ª  – ä ©«ë á à áè¨à¥­¨ï¬¨ *.mod, *.def, *.prj, *.pkt, *.res ¨ *.ldp. ‚ᥠ®áâ «ì­ë¥ ä ©«ë, ­ å®¤ï騥áï ¢ ¯à®¥ªâ¥, 䨫ìâàãîâáï ¨ ­¥ ®â®¡à ¦ îâáï. „«ï ⮣® çâ®¡ë ®â®¡à ¦ «¨áì ¢á¥ ä ©«ë, ­ å®¤ï騥áï ¢ ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ , ­¥®¡å®¤¨¬® ¢ ¯ ­¥«¨ ¨­áâà㬥­â®¢ ®ª­  ¢ë¡à âì ¯ã­ªâ ®ª §ë¢ âì ¢á¥ ä ©«ë. +

+

Œ®¤ã« -2 ä ©«ë, ­¥®¡å®¤¨¬ë¥ ¤«ï ª®¬¯¨«ï樨 ¯à®¥ªâ , ¯®¬¥ç îâáï ¢¨§ã «ì­® §¥«¥­®© â®çª®© ¢ ¯à ¢®¬ ¢¥àå­¥¬ 㣫㠭  §­ çª¥ ¨ª®­ª¨ ä ©« . Šà®¬¥ ⮣®, ¯®á«¥ ¨¬¥­¨ â ª¨å ä ©«®¢ ¢ ª¢ ¤à ­â­ëå ᪮¡ª å 㪠§ë¢ ¥âáï ¨¬ï ¯à®¥ªâ­®£® ä ©«  ¨«¨ £« ¢­®£® ¬®¤ã«ï, ¨á¯®«ì§ã¥¬ëå ¤«ï ª®¬¯¨«ï樨 ¯à®¥ªâ . +

Œ®¤ã« -2 ä ©«ë, ª®â®àë¥ ­¥®¡å®¤¨¬ë ¤«ï ª®¬¯¨«ï樨, ­® ­ å®¤ïâáï ­¥ ¢ ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ , ¯®¬¥é îâáï ¢ ¢¨àâã «ì­ãî ¯ ¯ªã á ¨¬¥­¥¬ ‚­¥è­¨¥ ‡ ¢¨á¨¬®áâ¨. +

…᫨ ¨­â¥£à æ¨ï á Š‘ ¯à®¥¤¥­  ¢ ¯®«­®¬ ®¡ê¥¬¥, â® ¢ ¢¨àâã «ì­®© ¯ ¯ª¥ ¨¡«¨®â¥ª  ‘¨á⥬ë ணࠬ¬¨à®¢ ­¨ï ¡ã¤ã⠮⮡ࠦ âìáï ¬®¤ã«¨ ®¯à¥¤¥«¥­¨© áâ ­¤ àâ­®© ¡¨¡«¨®â¥ª¨ Š‘. +

+

+Œ áâ¥à ­ áâனª¨

+ +

ਠ§ ¤ ­¨¨ à §«¨ç­ëå ¯ à ¬¥â஢ ¤«ï à ¡®âë ¢ á।¥ ¨á¯®«ì§ãîâáï ¬ áâ¥à  ­ áâனª¨. +

’¨¯¨ç­ë© ¬ áâ¥à ­ áâனª¨ ¢ë£«ï¤¨â á«¥¤ãî騬 ®¡à §®¬: +

+

‚ è ¯ª¥ 㪠§ ­® ­ §¢ ­¨¥ ¬ áâ¥à  ­ áâனª¨. € ­¨¦¥ ¬®¦­® ¢¨¤¥âì ¨­ä®à¬ æ¨®­­ãî áâபã, ¢ ª®â®à®© ¯®ª §ë¢ îâáï ¯®¤áª §ª¨ ¨ ¯à¥¤ã¯à¥¦¤¥­¨ï. ‚ ¯à¨¬¥à¥ ¬®¦­® ¢¨¤¥âì ¯à¥¤ã¯à¥¦¤¥­¨¥ ® ­¥®¡å®¤¨¬®á⨠¢¢®¤  ¨¬¥­¨ ¯à®¥ªâ  ¯à¨ ᮧ¤ ­¨¨ ¯à®¥ªâ  㦥 áãé¥áâ¢ãî饣® Œ®¤ã« -2 ª®¤ . +

‚ ­¨¦­¥© ç á⨠¬ áâ¥à  ­ áâனª¨ à á¯®« £ îâáï ª­®¯ª¨ ƒ®â®¢® ¨ Žâ¬¥­¨âì. ® ­ ¦ â¨î ª­®¯ª¨ ƒ®â®¢® á®åà ­ïîâáï ¨ ¯à¨¬¥­ïîâáï ¢á¥ á¤¥« ­­ë¥ ¨§¬¥­¥­¨ï; ¢â®à ï ª­®¯ª  § ªà뢠¥â ¬ áâ¥à ¡¥§ á®åà ­¥­¨ï ¨§¬¥­¥­¨©. +

+ ¢¨£ æ¨ï

+ +

+–¨äà®¢ë¥ § ª« ¤ª¨

+ +

„«ï ¡ëáâண® ¯¥à¥¬¥é¥­¨ï ¯® ª®¤ã ¢ । ªâ®à å ¬®¦­® ¨á¯®«ì§®¢ âì æ¨äà®¢ë¥ § ª« ¤ª¨. +

—⮡ë ãáâ ­®¢¨âì § ª« ¤ªã ­  ⥪ã饩 áâப¥ ­¥®¡å®¤¨¬® ­ ¦ âì ª®¬¡¨­ æ¨î Ctrl + Shift + <Number>, £¤¥ <Number> – «î¡ ï æ¨äà  ®â 0 ¤® 9. ’ ª¨¬ ®¡à §®¬ ¬®¦­® ãáâ ­®¢¨âì 10 § ª« ¤®ª. …᫨ ¯à¨ ãáâ ­®¢ª¥ § ª« ¤ª¨ ¨á¯®«ì§®¢ âì 㦥 § ­ïâãî æ¨äàã, â® § ª« ¤ª  ¡ã¤¥â ¯¥à¥­ §­ ç¥­ . ®¢â®à­®¥ ­ ¦ â¨¥ Ctrl + Shift + <Number> ­  ⮩ ¦¥ áâப¥ 㤠«ï¥â § ª« ¤ªã. +

„«ï ¯¥à¥å®¤  ­  ãáâ ­®¢«¥­­ãî § ª« ¤ªã ­¥®¡å®¤¨¬® ­ ¦ âì Ctrl + <Number>. ®á¬®âà¥âì ¢á¥ ãáâ ­®¢«¥­­ë¥ § ª« ¤ª¨ ¨ ¯¥à¥©â¨ ª ­ã¦­®© ¬®¦­®, ­ ¦ ¢ ª®¬¡¨­ æ¨î Ctrl + =. +

+

‚ë¡à ¢ áâ५ª ¬¨ ­¥®¡å®¤¨¬ãî § ª« ¤ªã ¨ ­ ¦ ¢ Enter ¬®¦­® ®áãé¥á⢨âì ¯¥à¥å®¤ ª § ª« ¤ª¥ (¯à¨ ­¥®¡å®¤¨¬®áâ¨, ­ã¦­ë© ä ©« ¡ã¤¥â ®âªàëâ ¢ ­®¢®¬ ®ª­¥ । ªâ®à ). +

¥à¥­ §­ ç¨âì ¨«¨ 㤠«¨âì ª®­ªà¥â­ãî § ª« ¤ªã ¬®¦­®, ¨á¯®«ì§ãï ª®¬¡¨­ æ¨î Ctrl + Shift + =. +

+

Žç¨áâ¨âì ᯨ᮪ ¢á¥å § ª« ¤®ª ¬®¦­®, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î ¯ã­ªâ  ¢¨£ æ¨ï > –¨äà®¢ë¥ § ª« ¤ª¨ > “¤ «¨âì ¢á¥ æ¨äà®¢ë¥ § ª« ¤ª¨. +

+Žâªàë⨥ à¥áãàá 

+ +

ëáâà® ®âªàëâì «î¡®© ä ©« «î¡®£® ¯à®¥ªâ  à ¡®ç¥© ®¡« á⨠¬®¦­®, ¨á¯®«ì§ãï ª®¬¡¨­ æ¨î Ctrl + Shift + R. +

+

‚ ¤¨ «®£¥ ¯®ª §ë¢ îâáï ¢á¥ à¥áãàáë à ¡®ç¥© ®¡« á⨠(¢ª«îç ï â¥, ®â®¡à ¦¥­¨¥ ª®â®àëå ¬®¦¥â ¡ëâì ¢ëª«î祭® ¢ ¯ ­¥«¨ ‘âàãªâãà  ¯à®¥ªâ ). ‚¢¥àåã ᯨ᪠ ¯®ª §ë¢ îâáï ¯®á«¥¤­¨¥ ®âªà뢠¥¬ë¥ à¥áãàáë (ã¡à âì ¨§ ¤ ­­®£® ᯨ᪠ ¨å ¬®¦­®, ¢ë¡à ¢ ¢ ª®­â¥ªáâ­®¬ ¬¥­î ¯ã­ªâ “¤ «¨âì ¨§ åà®­®«®£¨¨). ‘âப  ¢ ¢¥àå­¥© ç á⨠¤¨ «®£  ¯®§¢®«ï¥â ¡ëáâà® ®â䨫ìâ஢ âì à¥áãàáë ¯® ­ §¢ ­¨î. Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤áâ ­®¢®ç­ë¥ è ¡«®­ë: * ®§­ ç ¥â «î¡®¥ ª®«¨ç¥á⢮ ᨬ¢®«®¢ (áâப ) ¨«¨ ¨å ®âáãâá⢨¥, ? ®§­ ç ¥â «î¡®© ᨬ¢®« ¨«¨ ¥£® ®âáãâá⢨¥. +

„«ï ¢ë¡®à  ¬®¤ã«ï ¬®¦­® ¨á¯®«ì§®¢ âì ª®¬¡¨­ æ¨î Ctrl + M. +

+

+ ­¥«ì ¡ëáâண® ¯®¨áª 

+ +

„«ï ¯®¨áª  ⥪áâ  ¢ ä ©«¥ á«ã¦¨â  ­¥«ì ¡ëáâண® ¯®¨áª . ‚맢 âì ¥¥ ¬®¦­® ¨á¯®«ì§ãï ¢ ⥪á⮢®¬ । ªâ®à¥ ª®¬¡¨­ æ¨î Ctrl + F. +

‚ ¢¥àå­¥© ç á⨠®ª­  । ªâ®à  ¯®ï¢«ï¥âáï ¯®«¥ ¢¢®¤  ⥪áâ , ª®â®àë© ­¥®¡å®¤¨¬® ­ ©â¨. ˆ¬¥¥âáï ¢®§¬®¦­®áâì ®âªà뢠âì ¯ ­¥«ì ¯®¨áª  ­¥ ¢¢¥àåã । ªâ®à ,   ¢­¨§ã, ¢ § ¢¨á¨¬®á⨠®â ­ áâ஥ª. +

+

® 㬮«ç ­¨î ¯ ­¥«ì ¡ëáâண® ¯®¨áª  ®âªà뢠¥âáï ¯® ­ ¦ â¨î Ctrl+Alt+F. +

—â®¡ë § ªàëâì ¯ ­¥«ì, ­ ¦¬¨â¥ Esc. +

  ¤ ­­ë© ¬®¬¥­â ¯ ­¥«ì ¯®¤¤¥à¦¨¢ ¥â ⮫쪮 ¯®¨áª, ¤«ï ¢ë¯®«­¥­¨ï ¯®¨áª  ¨ § ¬¥­ë ­ã¦­® ¨á¯®«ì§®¢ âì áâ ­¤ àâ­ë© ¤¨ «®£  ©â¨ ¨ § ¬¥­¨âì, ª®â®àë© á¥©ç á ¢ë§ë¢ ¥âáï ª®¬¡¨­ æ¨¥© Ctrl + Alt + F (¨«¨ ç¥à¥§ £« ¢­®¥ ¬¥­î Eclipse). +

Šà®¬¥ ⮣®, ¢ ­¥ª®â®àëå á«ãç ïå, ­ ¯à¨¬¥à ¢ । ªâ®à¥ .xml ä ©«®¢, ¯ ­¥«ì ¡ëáâண® ¯®¨áª  ­¥ à ¡®â ¥â - ¢ â ª¨å á«ãç ïå ¢¬¥áâ® ­¥¥ ¯®ª §ë¢ ¥âáï áâ ­¤ àâ­ë© ¤¨ «®£  ©â¨ ¨ § ¬¥­¨âì. +

®á«¥ ­ ¡®à  ⥪áâ  ¢ ¯ ­¥«¨, ¤«ï ¥£® ¯®¨áª  ¨á¯®«ì§ãîâáï ª« ¢¨è¨ Up/Donwn ¨«¨ Shift+Enter/Enter. +

…᫨ 䮪ãá ­ å®¤¨âáï ­  ¯ ­¥«¨, â® Ctrl + Down ®âªà뢠¥â ¨áâ®à¨î ¯®¨áª . Shift+Down áࠧ㠯®¤áâ ¢«ï¥â ¢ áâப㠯®¨áª  á«¥¤ãî騩 ¯ã­ªâ ¨§ ¨áâ®à¨¨ ¯®¨áª . Š®¬¡¨­ æ¨ï, ª®â®à ï ¨á¯®«ì§ã¥âáï ¤«ï ®âªàëâ¨ï ¯ ­¥«¨, ®âªà뢠¥â ¢ ­¥© ¬¥­î ­ áâ஥ª ¯®¨áª . +

’ ª ¦¥, ¨áâ®à¨ï ¯®¨áª , ¯®¨áª á«¥¤ãî饣® ¨ ¯à¥¤ë¤ã饣® ¢å®¦¤¥­¨ï ¨áª®¬®© áâப¨, ¬¥­î ­ áâ஥ª ¯®¨áª  ¨ § ªàë⨥ ¯ ­¥«¨ ¬®£ãâ ¡ëâì ¢ë¯®«­¥­ë ¬ëèìî á ¨á¯®«ì§®¢ ­¨¥¬ ᮮ⢥âáâ¢ãîé¨å ª­®¯®ª à á¯®«®¦¥­­ëå ­  ¯ ­¥«¨ á¯à ¢ . +

 ­¥«ì ¡ëáâண® ¯®¨áª  ¯®¤¤¥à¦¨¢ ¥â ¢á¥ ०¨¬ë ¯®¨áª  áâ ­¤ àâ­®£® ¤¨ «®£ ,  ©â¨ ¨ § ¬¥­¨âì, ­ áâà ¨¢ âì ¨å ¬®¦­® ¢ ¬¥­î ­ áâ஥ª ¯®¨áª : +

+

Šà®¬¥ ⮣®, ¨§ í⮣® ¬¥­î ¬®¦­® ®ç¨á¨â¨âì ¨áâ®à¨î ¯®¨áª  ¨ ¯¥à¥©â¨ ¢ ¤¨ «®£ ­ áâ஥ª ¯ ­¥«¨. +

®¬¨¬® ¯ ­¥«¨ ¡ëáâண® ¯®¨áª , ¯®¤¤¥à¦¨¢ ¥âáï â ª ¦¥ ¡ëáâàë© ¯®¨áª á«®¢  ¡¥§ ®âªàëâ¨ï ¯ ­¥«¨. „«ï í⮣® ¤®áâ â®ç­® ¢áâ âì ªãàá®à®¬ ­  á«®¢® ¨ ­ ¦ âì Ctrl+Up ¨«¨ Ctrl+Down. ® 㬮«ç ­¨î í⨠¦¥ ª®¬¡¨­ æ¨¨ ª« ¢¨è ¨á¯®«ì§ãîâáï ¤«ï ¯à®ªàã⪨ íªà ­  ¨ ¯à¨ ¨å ­ ¦ â¨¨ ¢®§­¨ª ¥â ª®­ä«¨ªâ, ª®â®àë© ¬®¦­® à §à¥è¨âì, ®â¬¥­¨¢ ¤«ï ®¤­®£® ¨§ ¤¥©á⢨© í⨠ª®¬¡¨­ æ¨¨ ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥¨­  áâà ­¨æ¥ Ž¡é¨¥ > Š« ¢¨è¨. +

‚ˆŒ€ˆ…: …᫨ ¤«ï ¡ëáâண® ¯®¨áª  ­ §­ ç îâáï ­®¢ë¥ ª« ¢¨è¨, â® ­ã¦­® ã¡¥¤¨âìáï, çâ® ¢ ¯®«¥ Š®£¤  ¢ë¡à ­ ¯ã­ªâ ‚ ®ª­ å. +

+ áâனª¨ ¯ ­¥«¨ ¡ëáâண® ¯®¨áª 

+ +

 à ¬¥âàë ­ áâனª¨ ¯ ­¥«¨ ¡ëáâண® ¯®¨áª  à §¬¥é¥­ë ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥ Ž¡é¨¥ > ¥¤ ªâ®àë > ’¥ªáâ®¢ë¥ à¥¤ ªâ®àë >  ­¥«ì ¯®¨áª . +

+

‡¤¥áì ¬®¦­® ¢ë¡à âì ¢¥àå­¥¥ ¨«¨ ­¨¦­¥¥ à á¯®«®¦¥­¨¥ ¯ ­¥«¨ ¡ëáâண® ¯®¨áª  ¢ ®ª­¥ । ªâ®à . + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help005.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help005.html new file mode 100644 index 0000000..813171b --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help005.html @@ -0,0 +1,293 @@ + + + + + à ¬¥âàë + + + +

+ à ¬¥âàë

+ +

“¯à ¢«¥­¨¥ ¯ à ¬¥âà ¬¨ ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ®áãé¥á⢫ï¥âáï ç¥à¥§ ¤¨ «®£  à ¬¥âàë. „«ï ⮣® çâ®¡ë ¥£® ®âªàëâì ¢ë¡¥à¨â¥ ¢ £« ¢­®¬ ¬¥­î Žª­® >  à ¬¥âàë.... +

„«ï ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¯®¤¤¥à¦ ­® ®£à®¬­®¥ ª®«¨ç¥á⢮ ¯ à ¬¥â஢.  à ¬¥âàë à §¡¨âë ­  £à㯯ë, ª®â®àë¥ ®â®¡à ¦ îâáï ­  ®â¤¥«ì­ëå áâà ­¨æ å. ‚ á¢®î ®ç¥à¥¤ì áâà ­¨æë á ­ áâனª ¬¨ ®¡ê¥¤¨­¥­ë ¢ ¨¥à àå¨ç¥áªãî áâàãªâãàã, ª®â®à ï ®â®¡à ¦ ¥âáï ¢ «¥¢®© ç á⨠¤¨ «®£ . ‚ ¢¥àå­¥© ç á⨠¤¨ «®£  ­ å®¤¨âáï ¯®«¥ ¢¢®¤  䨫ìâà , ª®â®àë© ¯®§¢®«ï¥â ¡ëáâà® ­ ©â¨ ­ã¦­ãî áâà ­¨æã. +

®á«¥ ¨§¬¥­¥­¨ï ¯ à ¬¥â஢ ­ ¦¬¨â¥ ª­®¯ªã ਬ¥­¨âì, çâ®¡ë ¯à¨¬¥­¨âì ¨§¬¥­¥­¨ï ¨ ¯à®¤®«¦¨âì । ªâ¨à®¢ ­¨¥ ¯ à ¬¥â஢. „«ï ⮣®, çâ® ¯à¨¬¥­¨âì ¨§¬¥­¥­¨ï ¨ § ªàëâì ¤¨ «®£ ­ ¦¬¨â¥ ª­®¯ªã OK. Š­®¯ª  ‚®ááâ ­®¢¨âì §­ ç¥­¨ï ¯® 㬮«ç ­¨î á¡à á뢠¥â §­ ç¥­¨ï ¯ à ¬¥â஢ ⥪ã饩 áâà ­¨æë ¢ §­ ç¥­¨ï, ¯à¨­ïâë¥ ¯® 㬮«ç ­¨î. +

+XDS Œ®¤ã« -2

+ +

 à ¬¥âàë ᯥæ¨ä¨ç­ë¥ ¤«ï ¯®¤¤¥à¦ª¨ ï§ëª  Œ®¤ã« -2 à §¬¥é¥­ë ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥ XDS Œ®¤ã« -2 ¨ à á¯®«®¦¥­­ëå ­¨¦¥ áâà ­¨æ å: +

+ +

+Š®­á®«ì

+ +

 à ¬¥âàë ª®­á®«¨ à §¬¥é¥­ë ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥ XDS Œ®¤ã« -2 > Š®­á®«ì. +

+

‚ ¢¥àå­¥© ç á⨠¤¨ «®£  ¬®¦­® ®â¬¥â¨âì ¤¢  ¯à¨§­ ª : +

    + +
  • ®ª §ë¢ âì ª®­á®«ì ¯à¨ § ¯ã᪥ ᡮન – ¯®ª §ë¢ âì «¨ ª®­á®«ì ¯à¨ ᡮથ;
  • +
  • ‚ᥣ¤  ®ç¨é âì ª®­á®«ì ¯¥à¥¤ ᡮમ© – ®ç¨é âì «¨ ª®­á®«ì ¯¥à¥¤ ᡮમ©.
  • +
+ +

‚ à §¤¥«¥ –¢¥â  ⥪áâ  ª®­á®«¨ § ¤ îâáï æ¢¥â  à áªà áª¨ ¤«ï á®®¡é¥­¨© à §«¨ç­ëå ⨯®¢, æ¢¥â  à áªà áª¨ ⥪áâ  ¨ ä®­ . ‘¯¨á®ª § ¤ ¢ ¥¬ëå 梥⮢ ¯à¥¤áâ ¢«¥­ ­¨¦¥: +

    + +
  • ‘®®¡é¥­¨¥ ®¡ ®è¨¡ª¥ – 梥â á®®¡é¥­¨ï ®¡ ®è¨¡ª¥;
  • +
  • ।ã¯à¥¦¤¥­¨¥ – 梥⠯।ã¯à¥¦¤ î饣® á®®¡é¥­¨ï;
  • +
  • “¢¥¤®¬«¥­¨¥ ®¡ ®è¨¡ª¥ – 梥â 㢥¤®¬«¥­¨ï ®¡ ®è¨¡ª¥;
  • +
  • ˆ­ä®à¬ æ¨®­­®¥ á®®¡é¥­¨¥ – 梥⠨­ä®à¬ æ¨®­­®£® á®®¡é¥­¨ï;
  • +
  • ‘â ­¤ àâ­ë© ¯®â®ª ¢ë¢®¤  – 梥⠢ë室­ëå ¤ ­­ëå;
  • +
  • ‘â ­¤ àâ­ë© ¯®â®ª ¢¢®¤  – 梥⠢室­ëå ¤ ­­ëå;
  • +
  • –¢¥â ä®­  – 梥â ä®­ .
  • +
+ +

„«ï ¨§¬¥­¥­¨ï æ¢¥â  ­¥®¡å®¤¨¬® 饫ª­ãâì «¥¢®© ª­®¯ª®© ¬ëè¨ ­  ᮮ⢥âáâ¢ãî騩 ¯àאַ㣮«ì­¨ª, § â¥¬ ¢ ®âªàë¢è¥¬áï áâ ­¤ àâ­®¬ ¤¨ «®£¥ ¢ë¡®à  æ¢¥â  ¢ë¡à âì ¯à¥¤¯®ç¨â ¥¬ë© ¨ ­ ¦ âì ª­®¯ªã OK. +

+¥¤ ªâ®à

+ +

 à ¬¥âàë । ªâ®à  Œ®¤ã« -2 ¯à®£à ¬¬ à §¬¥é¥­ë ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥ XDS Œ®¤ã« -2 > ¥¤ ªâ®à ¨ à á¯®«®¦¥­­ëå ­¨¦¥ áâà ­¨æ å: +

+ +

+

Žâ¬¥â¨¢ ¯à¨§­ ª ‚뤥«ïâì ¯ à­ë¥ ᪮¡ª¨, ¬®¦­® 㪠§ âì, ª ª¨¬¨ 梥⠬¨ ®â¬¥ç âì ¯ à­ë¥ ¨ ­¥¯ à­ë¥ ᪮¡ª¨ (ªà㣫ë¥, ¯àאַ㣮«ì­ë¥, âà¥ã£®«ì­ë¥ ¨«¨ 䨣ãà­ë¥) ¢ ª®¤¥. “ª §ë¢ îâáï ᮮ⢥âá⢥­­® 梥â : +

    + +
  • ¤«ï ᮢ¯ ¤ îé¨å ᪮¡®ª – ¯ã­ªâ –¢¥â ¯®¤á¢¥âª¨ ¯ à­ëå ᪮¡®ª;
  • +
  • ¤«ï ­¥á®¢¯ ¤ îé¨å ᪮¡®ª – ¯ã­ªâ –¢¥â ¯®¤á¢¥âª¨ ­¥¯ à­ëå ᪮¡®ª.
  • +
+ +

ਧ­ ª ®¤á¢¥ç¨¢ âì áâàãªâãàã ®¯¥à â®à  ¯®§¢®«ï¥â ¢ª«îç âì ¯®¤á¢¥âªã «¥ªá¥¬, ¢å®¤ïé¨å ¢ ®¤¨­ ®¯¥à â®à. –¢¥â ¯®¤á¢¥âª¨ 㪠§ë¢ ¥âáï ¢ –¢¥â ¯®¤á¢¥âª¨ áâàãªâãàë ®¯¥à â®à . +

ਧ­ ª ‚뤥«ïâì ­¥ ªâ¨¢­ë© ª®¤ ¢ª«î砥⠢뤥«¥­¨¥ 梥⮬ â¥å ãç á⪮¢ ª®¤ , ª®â®àë¥ ¢ëª«îç¥­ë ¨§ ª®¬¯¨«ï樨 ¯®á।á⢮¬ ¨á¯®«ì§®¢ ­¨ï ᮮ⢥âáâ¢ãîé¨å ¯à £¬ ª®¬¯¨«ïâ®à .  áâனª  ¨á¯®«ì§ã¥¬®£® ¤«ï ¢ë¤¥«¥­¨ï æ¢¥â  ­ å®¤¨âáï ­  áâà ­¨æ¥  áªà áª  ᨭ⠪á¨á  +

„«ï ¨§¬¥­¥­¨ï à §¬¥à  èà¨äâ , ¨á¯®«ì§ã¥¬®£® ¢ ⥪á⮢ëå । ªâ®à å, ­¥®¡å®¤¨¬® ¯¥à¥©â¨ ­  áâà ­¨æã Ž¡é¨¥ > ‚­¥è­¨© ¢¨¤ > –¢¥â  ¨ èà¨äâë, ¢ë¡à âì à®á⮩ > ˜à¨äâ ⥪áâ  ¨ ­ ¦ âì ª­®¯ªã ¥¤ ªâ¨à®¢ âì. +

+Žà¨¥­â¨àë ®âáâ㯮¢

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ¥¤ ªâ®à > Žà¨¥­â¨àë ®âáâ㯮¢ ­ áâà ¨¢ ¥âáï ®â®¡à ¦¥­¨¥ ®à¨¥­â¨à®¢ ®âáâ㯠. +

+

Žà¨¥­â¨àë ®âáâ㯠 ¨¬¥îâ ¢¨¤ ¢¥à⨪ «ì­ëå «¨­¨© ¯®ª §ë¢ îé¨å áâàãªâãà㠯ணࠬ¬­®£® ª®¤ , ª ª ­  à¨áã­ª¥: +

+

®ª § ®à¨¥­â¨à®¢ ®âáâ㯠 ¬®¦¥â ¡ëâì ®âª«î祭 ¯à¨§­ ª®¬ ®ª §ë¢ âì ¢¥à⨪ «ì­ë¥ ®à¨¥­â¨àë ®âáâ㯮¢. +

Œ®¦­® ­ áâநâì á«¥¤ãî騥 ¯ à ¬¥âàë ¨å ¯®ª § : +

    + +
  • ¥¯à®§­ ç­®áâì – §­ ç¥­¨¥ ®â 0 ¤® 255 å à ªâ¥à¨§ãî饥 á⥯¥­ì ¯à®§à ç­®áâì¨ «¨­¨¨, £¤¥ 0 - «¨­¨ï ¯à®§à ç­ , 255 - ­¥¯à®§à ç­ ;
  • +
  • ‘â¨«ì – ¢ë¡®à áâ¨«ï ®â®¡à ¦¥­¨ï «¨­¨¨;
  • +
  • ˜¨à¨­  – è¨à¨­  «¨­¨¨, ®â 1 ¤® 8 â®ç¥ª;
  • +
  • ‘¬¥é¥­¨¥ – ᬥ饭¨¥ «¨­¨¨ ¯® £®à¨§®­â «¨, ®â 1 ¤® 8 â®ç¥ª;
  • +
  • –¢¥â – 梥⠫¨­¨¨;
  • +
+ +

+ áªà áª  ᨭ⠪á¨á 

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ¥¤ ªâ®à >  áªà áª  ᨭ⠪á¨á  ¬®¦­® ­ áâநâì æ¢¥â  ¨ íä䥪âë, ¨á¯®«ì§ã¥¬ë¥ ¤«ï ᨭ⠪á¨ç¥áª®© à áªà áª¨ Œ®¤ã« -2 ª®¤ . +

+

‚ ®ª­¥ «¥¬¥­â ¢ë¡¨à ¥âáï, ¤«ï ª ª®£® ¨¬¥­­® ⨯  § ¤ ñâáï à áªà áª ,   á¯à ¢  ®â ®ª­  ®â¬¥ç ¥âáï ¯à¨§­ ª ¨á¯®«ì§ã¥¬®á⨠à áªà áª¨ ‚ª«îç¨âì (¥á«¨ ­¥ ®â¬¥ç¥­®, â® § ¤ ­­ ï à áªà áª  á®åà ­ï¥âáï ¢ á¨á⥬¥, ­® ­¥ ¨á¯®«ì§ã¥âáï) ¨ § ¤ îâáï íä䥪âë: +

    + +
  • –¢¥â – 梥â í«¥¬¥­â ;
  • +
  • ®«ã¦¨à­ë© – ¢ë¤¥«¥­¨¥ í«¥¬¥­â  ¦¨à­ë¬, ¥á«¨ ®â¬¥ç¥­®;
  • +
  • Šãàᨢ – ¢ë¤¥«¥­¨¥ í«¥¬¥­â  ªãàᨢ®¬, ¥á«¨ ®â¬¥ç¥­®;
  • +
  • ¥à¥ç¥àª­ãâë© – ¯¥à¥ç¥àª­ãâë© â¥ªáâ, ¥á«¨ ®â¬¥ç¥­®;
  • +
  • ®¤ç¥àª­ãâë© – ¯®¤ç¥àª­ãâë© â¥ªáâ, ¥á«¨ ®â¬¥ç¥­®.
  • +
+ +

‚ ®ª­¥ ।¢ à¨â¥«ì­ë© ¯à®á¬®âà ¬®¦­® 㢨¤¥âì ¯à¨¬¥à à áªà áª¨ ª®¤ , ᮮ⢥âá⢥­­® § ¤ ­­ë¬ ¢ëè¥ ¯ à ¬¥âà ¬. +

+˜ ¡«®­ë

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ¥¤ ªâ®à > ˜ ¡«®­ë ¬®¦­® ­ áâநâì è ¡«®­ë ᨭ⠪á¨ç¥áª¨å ª®­áâàãªæ¨©, ¨§ ª®â®àëå á®á⮨⠌®¤ã« -2 ª®¤. +

+

„®¡ ¢¨âì ­®¢ãî ᨭ⠪á¨ç¥áªãî ª®­áâàãªæ¨î ¬®¦­®, ­ ¦ ¢ ª­®¯ªã ‘®§¤ âì... ¢ ¯à ¢®© ç á⨠¤¨ «®£ . +

+

‚ ®âªàë¢è¥¬áï ®ª­¥ ­ã¦­® § ¯®«­¨âì á«¥¤ãî騥 ᢮©á⢠: +

    + +
  • ˆ¬ï – ¨¬ï ª®­áâàãªæ¨¨;
  • +
  • Š®­â¥ªáâ – ª®­â¥ªáâ, ¢ ª®â®à®¬ ¤ ­­ ï ª®­áâàãªæ¨ï ¨á¯®«ì§ã¥âáï, ¢ë¡¨à ¥âáï ¨§ ¯à¥¤« £ ¥¬®£® ᯨ᪠;
  • +
  • €¢â®¬ â¨ç¥áª ï ¢áâ ¢ª  – ¯à¨§­ ª, ¢áâ ¢«ïâì «¨ ª®­áâàãªæ¨î  ¢â®¬ â¨ç¥áª¨ ¯à¨ । ªâ¨à®¢ ­¨¨ Œ®¤ã« -2 ª®¤ ;
  • +
  • Ž¯¨á ­¨¥ – ®¯¨á ­¨¥ ª®­áâàãªæ¨¨;
  • +
  • ˜ ¡«®­ – áâàãªâãà  ª®­áâàãªæ¨¨.
  • +
+ +

ਠ§ ¯®«­¥­¨¨ ¯®á«¥¤­¥£® ¯®«ï ¬®¦­® ¨á¯®«ì§®¢ âì ¯¥à¥¬¥­­ë¥, ᯨ᮪ ª®â®àëå ®âªà뢠¥âáï ¯® ª­®¯ª¥ ‚áâ ¢¨âì ¯¥à¥¬¥­­ãî.... +

‘¨­â ªá¨ç¥áª ï ª®­áâàãªæ¨ï ¤®¡ ¢«ï¥âáï ¢ ᯨ᮪ ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

Œ®¦­® ®â। ªâ¨à®¢ âì ᢮©á⢠ áãé¥áâ¢ãî饩 ᨭ⠪á¨ç¥áª®© ª®­áâàãªæ¨¨, ¢ë¤¥«¨¢ ¥ñ ¢ ᯨ᪥ ¨ ­ ¦ ¢ ª­®¯ªã ¥¤ ªâ¨à®¢ âì,   â ª¦¥ 㤠«¨âì ª®­áâàãªæ¨î, ­ ¦ ¢ ª­®¯ªã “¤ «¨âì. Žè¨¡®ç­® 㤠«¥­­ãî ᨭ⠪á¨ç¥áªãî ª®­áâàãªæ¨î ¬®¦­® ¢®ááâ ­®¢¨âì, ­ ¦ ¢ ­  ª­®¯ªã ‚®ááâ ­®¢ ¨âì 㤠«¥­­ë¥. Š­®¯ª  ‚¥à­ãâì §­ ç¥­¨ï ¯® 㬮«ç ­¨î á¡à á뢠¥â §­ ç¥­¨ï ᢮©á⢠⥪ã饩 ª®­áâàãªæ¨¨ ¢ §­ ç¥­¨ï, ¯à¨­ïâë¥ ¯® 㬮«ç ­¨î. +

’ ª¦¥ ᨭ⠪á¨ç¥áª ï ª®­áâàãªæ¨ï ¬®¦¥â ¡ëâì ¤®¡ ¢«¥­  ¢ ᯨ᮪ ¯ã⥬ ¨¬¯®àâ  ¨§ ä ©«  *.xml. â® ¤¥« ¥âáï ­ ¦ â¨¥¬ ª­®¯ª¨ ˆ¬¯®àâ¨à®¢ âì... á¯à ¢  ®â ᯨ᪠ ¨ ¯®á«¥¤ãî騬 ¢ë¡®à®¬ ä ©« . ªá¯®àâ¨à®¢ âì ᨭ⠪á¨ç¥áªãî ª®­áâàãªæ¨î ¢ ä ©« *.xml ¬®¦­®, ¢ë¤¥«¨¢ ¥ñ ¢ ᯨ᪥ ¨ ­ ¦ ¢ ª­®¯ªã ªá¯®àâ¨à®¢ âì... á¯à ¢  ®â ᯨ᪠. +

…᫨ ¯¥à¥¤ ­ §¢ ­¨¥¬ ᨭ⠪á¨ç¥áª®© ª®­áâàãªæ¨¨ á­ïâ  ®â¬¥âª , â® ª®­áâàãªæ¨ï á®åà ­ï¥âáï ¢ á¨á⥬¥, ­® ­¥ ¨á¯®«ì§ã¥âáï. +

‚ ­¨¦­¥© ç á⨠¤¨ «®£  ¬®¦­® ®â¬¥­¨âì ¯à¨§­ ª ˆá¯®«ì§®¢ âì á।á⢮ ä®à¬ â¨à®¢ ­¨ï ª®¤ , ®§­ ç î騩 ¨á¯®«ì§®¢ ­¨¥ ä®à¬ â¨à®¢ ­¨ï ª®¤ . +

 áᬮâਬ ¯®¤à®¡­¥¥, ª ª ¬®¦­® ¨§¬¥­¨âì è ¡«®­ ª®¤  ­  ¯à¨¬¥à¥ è ¡«®­  IF-ELSE. „«ï ­ ç «  । ªâ¨à®¢ ­¨ï, ¢ë¡¥à¨â¥ è ¡«®­ IF-ELSE ¨ ­ ¦¬¨â¥ ¥¤ ªâ¨à®¢ âì. +

Žâªà®¥âáï ®ª­® । ªâ®à  è ¡«®­ : +

+

˜ ¡«®­  ¢â®¤®¯®«­¥­¨ï ¯à¥¤áâ ¢«ï¥â ᮡ®© ⥪áâ ᮠᯥ樠«ì­ë¬¨ ¯¥à¥¬¥­­ë¬¨  ¢â®¤®¯®«­¥­¨ï. Ž¡®«®çª  § ¬¥­ï¥â ¨å ¢ ¬®¬¥­â ¢áâ ¢ª¨ è ¡«®­ , «¨¡® â ª ï ¯¥à¥¬¥­­ ï ᯥ樠«ì­ë¬ ®¡à §®¬ ¬®¤¨ä¨æ¨àã¥â ¯®¢¥¤¥­¨¥ । ªâ®à  ª®¤  (çâ® ¡ã¤¥â ¯à®¤¥¬®­áâà¨à®¢ ­® ­  ¯à¨¬¥à¥ ­¨¦¥). +

‘ãé¥áâ¢ã¥â àï¤ ¢áâ஥­­ëå ¯¥à¥¬¥­­ëå  ¢â®¤®¯®«­¥­¨ï (¨å ᯨ᮪ ¬®¦­® 㢨¤¥âì ­ ¦ ¢ ª­®¯ªã ‚áâ ¢¨âì ¯¥à¥¬¥­­ãî...): ${cursor}, ${date}, $$, ${line_selection}, ${time}, ${user}, ${word_selection}, ${year} . +

‹î¡ ï ¯¥à¥¬¥­­ ï  ¢â®¤®¯®«­¥­¨ï á ¨¬¥­¥¬ ­¥ ᮮ⢥âáâ¢ãî騬 ¢áâ஥­­®©, ï¥âáï «®ª æ¨¥© । ªâ¨à®¢ ­¨ï (¯®¤à®¡­¥¥ - ­¨¦¥). ਠ¢áâ ¢ª¥ è ¡«®­  ¬®¦­® ¯¥à¥¬¥é âìáï ¬¥¦¤ã «®ª æ¨ï¬¨ । ªâ¨à®¢ ­¨ï ª« ¢¨è ¬¨ Tab ¨«¨ Shift + Tab. +

 áᬮâਬ ¯¥à¥¬¥­­ãî ${cursor}. +

Žâ। ªâ¨àã©â¥ è ¡«®­ IF-ELSE á«¥¤ãî騬 ®¡à §®¬: +

IF ${condition} THEN 
+  ${line_selection} 
+ELSE                    
+  ${cursor};         
+END;
+
+ +

 ¦¬¨â¥ OK, ਬ¥­¨âì ¨ § ªà®©â¥ ¯ ­¥«ì । ªâ¨à®¢ ­¨ï è ¡«®­®¢. +

¥à¥©¤¨â¥ ¢ । â®à ¨á室­®£® ª®¤  ¤«ï ª ª®£®-­¨¡ã¤ì mod-ä ©« , ¯¥à¥©¤¨â¥ ¢ ⥫® ¯à®æ¥¤ãàë, ­ ç­¨â¥ ­ ¡¨à âì if ¨ ­ ¦¬¨â¥ Ctrl + ஡¥«. +

®ï¢¨âáï á«¥¤ãî饥 ®ª­®: +

+

Šãàá®à ¢¢®¤  ­ å®¤¨âáï ¢ à ©®­¥ condition, â ª çâ® ¥á«¨ ­ ç âì ­ ¡¨à âì, ­ ¯à¨¬¥à, TRUE, condition ¡ã¤¥â § ¬¥­¥­® ­  TRUE. +

®¯à®¡ã©â¥ â ª¦¥ ¯®­ ¦¨¬ âì ª« ¢¨èã Tab - ªãàá®à ¡ã¤¥â ¯à룠âì ¬¥¦¤ã «®ª æ¨ï¬¨ । ªâ¨à®¢ ­¨ï, ¢ ¤ ­­®¬ ¯à¨¬¥à¥ íâ® áâப¨ 17 ¨ 20. ‘âப  20 ª ª à § ᮮ⢥âá¢ã¥â «®ª æ¨¨ । ªâ¨à®¢ ­¨ï ¯¥à¥¬¥­­®© ${cursor}. +

“¡¥à¨â¥ ¢áâ ¢«¥­­ë© ⥪áâ. +

’¥¯¥àì ­ ¡¥à¨â¨â¥ i := 0; ¨ ¢ë¤¥«¨â¥ íâ®â ⥪áâ: +

+

 ¦¬¨â¥ Ctrl + ஡¥« ¨ ¢ ¯®ï¢¨¢è¥¬áï ᯨ᪥ ¢ à¨ ­â®¢  ¢â®¤®¯®«­¥­¨© ¢ë¡¥à¨â¥ IF-ELSE. +

㤥⠢áâ ¢«¥­ á«¥¤ãî騩 ⥪áâ: +

+

’ ª¨¬ ®¡à §®¬, ¢ ª ç¥á⢥ §­ ç¥­¨ï ¯¥à¥¬¥­­®© ${line_selection} ¡ë«® ¢§ï⮠⥪ã饥 ¢ë¤¥«¥­¨¥ । ªâ®à . +

Žâ। ªâ¨àã©â¥ ¯®«¥ condition ¨ ­ ¦¬¨â¥ Enter. Šãàá®à ¯¥à¥©¤¥â ¢ «®ª æ¨î । ªâ¨à®¢ ­¨ï, ᮮ⢥âáâ¢ãîéãî ¯¥à¥¬¥­­®© ${cursor}. â  ¯¥à¥¬¥­­ ï ª ª à § 㪠§ë¢ ¥â ¯®§¨æ¨î, ªã¤  ¤®«¦¥­ ¡ëâì ¯®¬¥é¥­ ªãàá®à ¯®á«¥ § ¢¥à襭¨ï á¥áᨨ  ¢â®¤®¯®«­¥­¨ï. +

Žâ। ªâ¨àã©â¥ ⥯¥àì è ¡«®­ IF-ELSE á«¥¤ãî騬 ®¡à §®¬: +

IF ${condition} THEN (* ${ª®¬¬¥­â à¨©_¤«ï_THEN} *)
+  ${line_selection}
+ELSE  (* ${ª®¬¬¥­â à¨©_¤«ï_ELSE} *)
+  ${cursor};
+END; (* ${ª®¬¬¥­â à¨©_¤«ï_END} *)
+
+ +

¥à¥©¤¨â¥ ¢ । ªâ®à ¨á室­®£® ª®¤ , ¨ ¢ë§®¢¨â¥ è ¡«®­ IF-ELSE: +

+

‚¢¨¤ã ⮣®, çâ® ¯¥à¥¬¥­­ë¥ ${ª®¬¬¥­â à¨©_¤«ï_THEN}, ${ª®¬¬¥­â à¨©_¤«ï_ELSE} ¨ ${ª®¬¬¥­â à¨©_¤«ï_END} ­¥ ïîâáï ¢áâ஥­­ë¬¨, ®­¨ § ¤ îâ ⮫쪮 «®ª æ¨¨ । ªâ¨à®¢ ­¨ï. ‚® ¢à¥¬ï á¥áᨨ  ¢â®¤®¯®«­¥­¨ï, ¯® ­¨¬ ¬®¦­® ¯¥à¥¬¥é âìáï á ¯®¬®éìî ª« ¢¨è Tab ¨ Shift + Tab. +

Ž¯¨á ­¨¥ ¢áâ஥­­ëå ¯¥à¥¬¥­­ëå è ¡«®­®¢  ¢â®¤®¯®«­¥­¨ï: +

    + +
  • ${cursor} – ¢ «®ª æ¨î í⮩ ¯¥à¥¬¥­­®© ¡ã¤¥â ¯®¬¥é¥­ ªãàá®à ¯®á«¥ § ¢¥à襭¨ï á¥áᨨ  ¢â®¤®¯®«­¥­¨ï;
  • +
  • ${date} – ⥪ãé ï ¤ â ;
  • +
  • $$ – ᨬ¢®« ¤®«« à ;
  • +
  • ${line_selection} – § ¬¥­ï¥âáï ­  ⥪ã饥 ¢ë¤¥«¥­¨¥ ¢ । ªâ®à¥;
  • +
  • ${time} – ⥪ã饥 ¢à¥¬ï;
  • +
  • ${user} – ¨¬ï ¯®«ì§®¢ â¥«ï;
  • +
  • ${year} – ⥪ã騩 £®¤.
  • +
+ +

+‘¨á⥬ë ࠧࠡ®âª¨

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ‘¨á⥬ë ࠧࠡ®âª¨ ¬®¦­® § à¥£¨áâà¨à®¢ âì ­®¢ë¥ ¨ ­ áâநâì 㦥 § à¥£¨áâà¨à®¢ ­­ë¥ Š‘. +

®¤à®¡­¥¥ ® ­ áâனª¥ Š‘ ¬®¦­® ¯à®ç¥áâì ¢ à §¤¥«¥ “¯à ¢«¥­¨¥ ¯ à ¬¥âà ¬¨ Š‘. +

+‘â¨«ì ª®¤ 

+ +

‚ ¤ ­­ë© ¬®¬¥­â à §¤¥« XDS Œ®¤ã« -2 > ‘â¨«ì ª®¤  ᮤ¥à¦¨â ⮫쪮 ­ áâனªã ä®à¬ â¨à®¢ ­¨ï. +

+”®à¬ â¨à®¢ ­¨¥

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ‘â¨«ì ª®¤  > ”®à¬ â¨à®¢ ­¨¥ ¬®¦­® ¨§¬¥­ïâì ­ áâனª¨  ¢â®¬ â¨ç¥áª®£® ä®à¬ â¨à®¢ ­¨ï ⥪áâ . +

+

‚ᥠ­ áâனª¨ ä®à¬ â¨à®¢ ­¨ï á®åà ­ïîâáï ¢ ¯à®ä¨«¥. ˆ§­ ç «ì­® âãâ ãáâ ­®¢«¥­ ¢áâ஥­­ë© ¯à®ä¨«ì - ¥£® ­ áâனª¨ ¬®¦­® ᬮâà¥âì, ­® ­¥«ì§ï ¨§¬¥­¨âì. ‚¢¥àåã ¤¨ «®£  ”®à¬ â¨à®¢ ­¨¥ à á¯®«®¦¥­ ᯨ᮪, ¢ ª®â®à®¬ ¬®¦­®  ªâ¨¢¨§¨à®¢ âì ¯à®ä¨«ì ¨§ ç¨á«  ¨¬¥îé¨åáï,   â ª ¦¥ ª­®¯ª¨: +

    + +
  • ˆ§¬¥­¨âì – । ªâ¨à¢® ­¨¥ ¯à®ä¨«ï. ’ãâ ®âªà®¥âáï „¨ «®£ । ªâ¨à®¢ ­¨ï ¯à®ä¨«ï ä®à¬ â¨à®¢ ­¨ï.
  • +
  • “¤ «¨âì – 㤠«¥­¨¥ ¯à®ä¨«ï.
  • +
  • ®¢ë©... – ᮧ¤ ­¨¥ ­®¢®£® ¯à®ä¨«ï. ’ãâ ®âªà®¥âáï ¤¨ «®£, ¢ ª®â®à®¬ ¡ã¤¥â § ¯à®è¥­® ¨¬ï ᮧ¤ ¢ ¥¬®£® ¯à®ä¨«ï,   â ª ¦¥ ¬®¦­® ¡ã¤¥â 㪠§ âì ¨§ ª ª®£® ¯à®ä¨«ï ¢§ïâì ¤«ï ­¥£® ­ ç «ì­ë¥ ­ áâனª¨.
  • +
  • ˆ¬¯®àâ¨à®¢ âì... – ¨¬¯®àâ¨à®¢ ­¨¥ ¯à®ä¨«¥© ¨§ ä ©« . 㤥⠧ ¯à®è¥­ .xml ä ©« ¨ ¢á¥ ­ ©¤¥­­ë¥ ¢ ­¥¬ ¯à®ä¨«¨ ¡ã¤ãâ ¨¬¯®àâ¨à®¢ ­ë. …᫨ ¢ ä ©«¥ ­ ©¤ãâáï ¯à®ä¨«¨, ¨¬¥­  ª®â®àëå ᮢ¯ ¤ îâ á 㦥 ¨¬¥î騬¨áï, â® ¯®á«¥ ¨¬¯®àâ  ®­¨ ¡ã¤ãâ ¯¥à¥®¯à¥¤¥«¥­ë ­  â¥, çâ® ¨¬¯®àâ¨à®¢ «¨áì ¨§ ä ©« .
  • +
  • ªá¯®àâ¨à®¢ âì ¢á¥... – íªá¯®àâ ¢á¥å ¨¬¥îé¨åáï ¯à®ä¨«¥© ¢ .xml ä ©«.
  • +
+ +

’ ª ¦¥, ¢­¨§ã ¤¨ «®£  ­ å®¤¨âáï ®ª­® ।¯à®á¬®âà, ¢ ª®â®à®¬ ¬®¦­® ¢¨¤¥âì ª ª ¢ë£«ï¤¨â १ã«ìâ â ¯à¨¬¥­¥­¨ï ¢ë¡à ­­®£® ¯à®ä¨«ï ª äà £¬¥­â㠯ணࠬ¬­®£® ⥪áâ . +

+„¨ «®£ । ªâ¨à®¢ ­¨ï ¯à®ä¨«ï ä®à¬ â¨à®¢ ­¨ï

+ +

‚¢¥àåã ¤¨ «®£  ¯®ª §ë¢ ¥âáï ¨¬ï । ªâ¨à㥬®£® ¯à®ä¨«ï, à冷¬ á ª®â®àë¬ ­ å®¤¨âáï ª­®¯ª  ªá¯®àâ... - á ¥¥ ¯®¬®éìî ¤ ­­ë© ¯à®ä¨«ì ¬®¦­® íªá¯®àâ¨à®¢ âì ¢ .xml ä ©«. +

¨¦¥ - § ª« ¤ª¨, ᮮ⢥âáâ¢ãî騥 áâà ­¨æ ¬ á à §«¨ç­ë¬¨ £à㯯 ¬¨ ­ áâ஥ª ä®à¬ à¨â®¢ ­¨ï: +

+ +

  ª ¦¤®© ¨§ § ª« ¤®ª á¯à ¢  ­ å®¤¨âáï ®ª­® ।¯à®á¬®âà, ¢ ª®â®à®¬ ¬®¦­® ¢¨¤¥âì ª ª ¢ë£«ï¤ïâ १ã«ìâ âë ¯à¨¬¥­¥­¨ï ¨§¬¥­ï¥¬ëå ­ áâ஥ª ª äà £¬¥­â㠯ணࠬ¬­®£® ⥪áâ . +

+ áâனª¨ ä®à¬ â¨à®¢ ­¨ï ®âáâ㯮¢
+ +

+

‡¤¥áì Ž¡é¨¥ ­ áâனª¨ § ¤ îâ ᯮᮡ, ª®â®àë¬ ¡ã¤ãâ ä®à¬ â¨à®¢ âìáï ®âáâã¯ë ¢ áâப å. +

    + +
  • ¥¦¨¬ â ¡ã«ï樨 - ¢ í⮬ ᯨ᪥ ¢ë¡¨à ¥âáï ०¨¬ ¨á¯®«ì§®¢ ­¨ï ᨬ¢®«®¢ â ¡ã«ïæ¨. ਠä®à¬ â¨à®¢ ­¨¨ ®âáâ㯠, ¥á«¨ ¢ë¡à ­® ¨á¯®«ì§®¢ ­¨¥ ᨬ¢®«®¢ â ¡ã«ï樨, ®­¨ ¡ã¤ãâ ¢áâ ¢«¥­ë ¢ ¬ ªá¨¬ «ì­® ¢®§¬®¦­®¬ ¤® ¤®áâ¨è¥­¨ï à §¬¥à  ®âáâ㯠 ª®«¨ç¥á⢥, ¯®á«¥ ­¨å, ¥á«¨ ­ã¦­®, ¢áâ ¢ïâáï ¥é¥ ¨ ¯à®¡¥«ë. ‘¬¥è ­­ë© ०¨¬ ®§­ ç ¥â, çâ® ­®¢ë¥ ®âáâã¯ë ¡ã¤ãâ ä®à¬¨à®¢ âìáï â ª¨¬ ¦¥ ®¡à §®¬, ®¤­ ª® ¥á«¨ ®âáâ㯠¢ª«î砥⠢ á¥¡ï ®âáâ㯠㦥 ¨¬¥î騩áï ¢ ¤®ªã¬¥­â¥, â® âãâ, ¯® ¢®§¬®¦­®áâ¨, ¡ã¤¥â á®åà ­¥­  ¨¬¥­­® â  ¯®á«¥¤®¢ â¥«ì­®áâì ¯à®¡¥«®¢ ¨ â ¡ã«ï権, ª®â®à ï â ¬ ¨§­ ç «ì­® ¡ë« . â® ¯®§¢®«ï¥â ¬ ªá¨¬ «ì­® á®åà ­¨âì á⨫ì ä®à¬ â¨à®¢ ­¨ï, ª®â®àë© ¡ë« ¢ ¤®ªã¬¥­â¥ (­® § ç áâãî ¬®¦¥â ¯®à®¦¤ âì "ࠧꥧ¦ ­¨¥" áâப ¯à¨ ¨§¬¥­¥­¨¨ à §¬¥à  â ¡ã«ï樨, ¥á«¨ ⮫쪮 ç áâì íâ¨å áâப ã­ á«¥¤®¢ «  áâ àë© á⨫ì ä®à¬ â¨à®¢ ­¨ï).
  • +
  •  §¬¥à ®âáâ㯠 - § ¤ ¥â à §¬¥à ®âáâ㯠 ¢ §­ ª®¬¥áâ å.
  • +
  •  §¬¥à â ¡ã«ï樨 - è¨à¨­  â ¡ã«ï樨. ¥ á«¥¤ã¥â ¯ãâ âì à §¬¥à ®âáâ㯠 ¨ è¨à¨­ã â ¡ã«ï樨: ­  íªà ­¥ ¡ã¤¥â ¢¨¤¥­ ®âáâ㯠¢ë£«ï¤ï騩 â ª ¦¥, ª ª 㪠§ ­­®¥ ¢ ¥£® è¨à¨­¥ ç¨á«® ¯à®¡¥«®¢. ‚­ãâਠ¦¥ ­¥£® ¬®¦¥â ¡ëâì ¢áâ ¢«¥­® ᪮«ìª®-⮠ᨬ¢®«®¢ â ¡ã«ï樨 ¨ ¯à®¡¥«®¢.  ¯à¨¬¥à, ¯à¨ è¨à¨­¥ ®âáâ㯠 5 ¨ à §¬¥à¥ â ¡ã«ï樨 2, ¥á«¨ â ¡ã«ïæ¨ï ¨á¯®«ì§ã¥âáï, ®âáâ㯠¡ã¤¥â ä®à¬¨à®¢ âìáï ¨§ ¤¢ãå ᨬ¢®«®¢ â ¡ã«ï樨 ¨ ®¤­®£® ¯à®¡¥« , á«¥¤ãî饣® §  ­¨¬¨.
  • +
+ +

‚ à §¤¥«¥ Žâáâ㯠¯¥à¥ç¨á«¥­ë ¯à¨§­ ª¨ ⮣®, ¢ ª ª¨å á«ãç ïå á«¥¤ã¥â ä®à¬¨à®¢ âì ®âáâ㯠¨ ¤«ï ­¥ª®â®àëå ¯à¨§­ ª®¢ ® 㪠§ë¢ ¥âáï à §¬¥à ®âáâ㯠 – ¤«ï ­¨å à ¢¥­ ­¥ §­ ç¥­¨î  §¬¥à ®âáâ㯠,   㪠§ ­­®¬ã âãâ. „®áâ㯭ë á«¥¤ãî騥 ¯à¨§­ ª¨: +

    + +
  • Ž¡ê¥­¨ï ¢­ãâਠ¬®¤ã«ï
  • +
  • Ž¡ê¥­¨ï ¢­ãâਠ¯à®æ¥¤ãàë
  • +
  • Ž¡ê¥­¨ï ¢­ãâਠ¡«®ª  VAR/TYPE/CONST
  • +
  • Ž¡ê¥­¨ï «®ª «ì­ëå ¯à®æ¥¤ãà
  • +
  • Ž¡ê¥­¨ï «®ª «ì­ëå ¬®¤ã«¥©
  • +
  • Ž¡ê¥­¨ï ¯®«¥© § ¯¨á¥©
  • +
  • Ž¯¥à â®àë ¢­ãâਠ⥫ ®¯¥à â®à®¢/¯à®æ¥¤ãà/¬®¤ã«¥©
  • +
  • Ž¯¥à â®àë ¢­ãâਠCASE
  • +
  • Ž¯¥à â®àë ¢­ãâਠ «ìâ¥à­ â¨¢ CASE
  • +
+ +

+ áâனª¨ ä®à¬ â¨à®¢ ­¨ï ¯à®¡¥«®¢
+ +

+

‡¤¥áì, ¢ ¤¥à¥¢¥ ¢ë¡®à  ‚áâ ¢«ïâì ¯à®¡¥«, ¬®¦­® ¢ë¡¨à âì à §«¨ç­ë¥ ᨭ⠪á¨ç¥áª¨¥ í«¥¬¥­âë ï§ëª . Š®£¤  í«¥¬¥­â ¢ë¡à ­, ¤«ï ­¥£®, ¯®¤ ¤¥à¥¢®¬, ¯®ª §ë¢ îâáï ¯à¨§­ ª¨ ⮣®, á«¥¤ã¥â «¨ ¢áâ ¢«ïâì ¯à®¡¥« ¯¥à¥¤ ­¨¬ ¨«¨ ¯®á«¥ ­¥£®. +

‚ á«ãç ¥, ª®£¤  ­  £à ­¨æ¥ ¤¢ãå í«¥¬¥­â®¢ ª ¦¤ë© ¨§ ­¨å ¬®¦¥â § ¤ ¢ âì ¯à¨§­ ª ¢áâ ¢ª¨ ¯à®¡¥« , ¯à®¡¥« ¡ã¤¥â ¢áâ ¢«ïâìáï ¢á¥£¤ , ª®£¤  å®âï ¡ë ®¤¨­ ¨§ íâ¨å ¯à¨§­ ª®¢ ãáâ ­®¢«¥­. +

+ áâனª¨ ä®à¬ â¨à®¢ ­¨ï ¯¥à¥¢®¤®¢ áâப
+ +

+

‡¤¥áì, ¢ ¤¥à¥¢¥ ¢ë¡®à  ‚áâ ¢ª  ¯¥à¥¢®¤®¢ áâப, ¬®¦­® ¢ë¡¨à âì à §«¨ç­ë¥ ᨭ⠪á¨ç¥áª¨¥ í«¥¬¥­âë ï§ëª . Š®£¤  í«¥¬¥­â ¢ë¡à ­, ¤«ï ­¥£®, ¯®¤ ¤¥à¥¢®¬, ¯®ª §ë¢ îâáï ¯à¨§­ ª¨ ⮣®, á«¥¤ã¥â «¨ ¢áâ ¢«ïâì ¯¥à¥¢®¤ áâப¨ ¯¥à¥¤ ­¨¬ ¨«¨ ¯®á«¥ ­¥£®. +

‚ á«ãç ¥, ª®£¤  ­  £à ­¨æ¥ ¤¢ãå í«¥¬¥­â®¢ ª ¦¤ë© ¨§ ­¨å § ¤ ¥â ¯à¨§­ ª ¢áâ ¢ª¨ ¯¥à¥¢®¤  áâப¨, ®­ ¡ã¤¥â ¢áâ ¢«ïâìáï ¢á¥£¤ , ª®£¤  å®âï ¡ë ®¤¨­ ¨§ íâ¨å ¯à¨§­ ª®¢ ãáâ ­®¢«¥­. +

+ áâனª¨ ä®à¬ â¨à®¢ ­¨ï ¯¥à¥­®á  áâப
+ +

+

®¤ ¯¥à¥­®á®¬ áâப ¯®­¨¬ ¥âáï "᢮à ç¨¢ ­¨¥" ᫨誮¬ ¤«¨­­ëå áâப ¯ã⥬ ¢áâ ¢ª¨ ¢ ­¨å ¯¥à¥¢®¤  áâப¨ ¨, ¥á«¨ ­ã¦­®, ®âáâ㯠 ¯¥à¥¤ ⥪á⮬, ¯¥à¥­¥á¥­­ë¬ ­  ­®¢ãî áâபã. +

’ãâ ¬®¦­® § ¤ âì §­ ç¥­¨¥ Œ ªá¨¬ «ì­ë© à §¬¥à áâப¨ – íâ® ¯®§¨æ¨ï ¢ áâப¥, ¤® ª®â®à®© ä®à¬ ââ¥à ¯®áâ à ¥âáï áâப¨ 㪮à®â¨âì. ‘¤¥« âì íâ®, ­¥ ¨á¯®à⨢ ᨭ⠪á¨á  ¯à®à ¬¬ë, ­¥ ¢á¥£¤  ¢®§¬®¦­®, ¯®í⮬㠨­®£¤  áâப¨ ¬®£ãâ ®áâ âìáï ­¥ ᢥà­ãâ묨 ¯à¨ ¤®á⨦¥­¨¨ 㪠§ ­­®© £à ­¨æë. +

’ãâ ¦¥, ¯®¤ ®ª­®¬ ¯à¥¤¢ à¨â¥«ì­®£® ¯à®á¬®âà , á¯à ¢  ¢­¨§ã, ®â¤¥«ì­® § ¤ ¥âáï §­ ç¥­¨¥  §¬¥à áâப¨ ¢ ®ª­¥ ¯à¥¤¢ à¨â¥«ì­®£® ¯à®á¬®âà  – íâ® è¨à¨­ , ¤® ª®â®à®© ⥪á⠡㤥â ᢥà­ãâ +

¢ ®ª­¥ ¯à¥¤¢ à¨â¥«ì­®£® ¯à®á¬®âà , ¬¥­ïï ¥¥ ¬®¦­® ¯®á¬®âà¥âì ª ª ¯à¨¬¥à­® ¡ã¤¥â ¢ë£«ï¤¥âì ⥪á⠯ਠ᢮à ç¨¢ ­¨¨. +

+Ž¡é¨¥

+ +

Ž¡é¨¥ ãáâ ­®¢ª¨ á।ë Eclipse. XDS Modula-2 ¨á¯®«ì§ã¥â ç áâì ¨§ ­¨å ¨, ªà®¬¥ ⮣®, ¤®¡ ¢«ï¥â ¢ íâ®â à §¤¥« ­¥ª®â®àë¥ á¢®¨ ­ áâனª¨. +

+Žà䮣à ä¨ï

+ +

 à ¬¥âàë ­ áâனª¨ ¯à®¢¥àª¨ ®à䮣à ä¨¨ à §¬¥é¥­ë ¢ ¤¨ «®£¥  à ¬¥âàë ­  áâà ­¨æ¥ Ž¡é¨¥ > ¥¤ ªâ®àë > ’¥ªáâ®¢ë¥ à¥¤ ªâ®àë > Žà䮣à ä¨ï. +

+

‚¢¥àåã ¤¨ «®£  à á¯®«®¦¥­ ¯à¨§­ ª ‚ª«îç¨âì ¯à®¢¥àªã ®à䮣à ä¨¨ - ®­ ¯®§¢®«ï¥â ¢ª«îç âì ¨«¨ ¯®«­®áâìî ®âª«îç âì ¯à®¢¥àªã. +

®¤ ­¨¬, ¥á«¨ ¢ á।¥ ®¤­®¢à¥¬¥­­® ãáâ ­®¢«¥­­® ­¥áª®«ìª® à §«¨ç­ëå á«ã¦¡ ¯à®¢¥àª¨ ®à䮣à ä¨¨, ¬®¦¥â ¯®ª §ë¢ âìáï ᯨ᮪ ¢ë¡®à , ¢ ª®â®à®¬ ¬®¦­® ¢ë¡à âì ®¤­ã ¨§ íâ¨å á«ã¦¡. ’ãâ ®¯¨á뢠îâáï ­ áâனª¨ ¤®áâã¯­ë¥ ¯à¨ ¢ë¡®à¥ XDS á«ã¦¡  ¯à®¢¥àª¨ ®à䮣à ä¨¨. +

„ «¥¥ ¯¥à¥ç¨á«¥­ë ¯à¨§­ ª¨, § ¤ î騥 ¯ à ¬¥âàë ¯à®¢¥àª¨: +

    + +
  • ˆ£­®à¨à®¢ âì á«®¢  á æ¨äà ¬¨
  • +
  • ˆ£­®à¨à®¢ âì á«®¢  ¢ ᬥ蠭­®¬ ॣ¨áâà¥
  • +
  • ˆ£­®à¨à®¢ âì ¯à®¯¨á­ë¥ ¡ãª¢ë ¢ ­ ç «¥ ¯à¥¤«®¦¥­¨©
  • +
  • ˆ£­®à¨à®¢ âì á«®¢  ¨§ ¯à®¯¨á­ëå ¡ãª¢
  • +
  • ˆ£­®à¨à®¢ âì URL-ë
  • +
  • ˆ£­®à¨à®¢ âì ­¥ ¡ãª¢¥­­ë¥ ᨬ¢®«ë ­  £à ­¨æ å á«®¢
  • +
  • ˆ£­®à¨à®¢ âì ¥¤¨­¨ç­ë¥ ¡ãª¢ë
  • +
  • ˆ£­®à¨à®¢ âì áâப¨ Modula-2
  • +
+ +

‚ à §¤¥«¥ ‘«®¢ à¨ ¬®¦­® ¢ë¡à âì á«®¢ àì ¨§ ¨¬¥îé¨åáï ¢ ¤ ­­ë© ¬®¬¥­â ¢ á।¥ Eclipse, ¨«¨ 㪠§ âì ä ©« á® á«®¢ à¥¬ ¯®«ì§®¢ â¥«ï – ¢ í⮬ á«ãç ¥ ®¦¨¤ ¥âáï ä ©«, ­  ª ¦¤®© áâப¥ ª®â®à®£® á⮨⠯® ®¤­®¬ã á«®¢ã. Šà®¬¥ ⮣®, ä ©« ¤®«¦¥­ ¡ëâì ¤®áâ㯥­ ­¥ ⮫쪮 ­  ç⥭¨¥, ­® ¨ ­  § ¯¨áì. “ª §ë¢ ï íâ®â ä ©«, âãâ ¦¥ á«¥¤ã¥â ¢ë¡à âì ¨ ᮮ⢥âáâ¢ãîéãî ¥¬ã ª®¤¨à®¢ªã. +

Šà®¬¥ ⮣®, ¢­¨§ã ¤¨ «®£ , ¬®¦­® § ¤ âì ®£à ­¨ç¥­¨ï ¬ ªá¨¬ «ì­®£® ç¨á«  á®®¡é¥­¨© ®¡ ®è¨¡ª å ¢ ®¤­®¬ ä ©«¥, ¨ ®£à ­¨ç¥­¨¥ ª®«¨ç¥á⢠ ¢ à¨ ­â®¢ ¨á¯à ¢«¥­¨©, ¯à¥¤« £ ¥¬ëå ¯®«ì§®¢ â¥«î. + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help006.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help006.html new file mode 100644 index 0000000..e8990aa --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help006.html @@ -0,0 +1,37 @@ + + + + +‘¢®©á⢠ à¥áãàᮢ + + + +

+‘¢®©á⢠ à¥áãàᮢ

+ +

‘ ª ¦¤ë¬ ¨§ à¥áãàᮢ ¨­â¥£à¨à®¢ ­­®© á।ë á¢ï§ ­ ­ ¡®à ᢮©áâ¢. Š®­ªà¥â­ë© ­ ¡®à ᢮©á⢠§ ¢¨á¨â ®â ⨯  à¥áãàá  ¨ ⨯  ¯à®¥ªâ  ª ª®â®à®¬ã ®­ ¯à¨­ ¤«¥¦¨â. +

à®á¬®âà ¨ ¨§¬¥­¥­¨¥ ᢮©á⢠à¥áãàá  ¢ë¯®«­ï¥âáï ç¥à¥§ ¤¨ «®£ ‘¢®©á⢠. —â®¡ë ®âªàëâì ¥£® ¤«ï ª ª®£®-«¨¡® à¥áãàá : +

    + +
  1. ™¥«ª­¨â¥ ¯à ¢®© ª­®¯ª®© ¬ëè¨ ­  à¥áãàᥠ¢ ®¤­®© ¨§ ­ ¢¨£ æ¨®­­ëå ¯ ­¥«¥© (‘âàãªâãà  ¯à®¥ªâ  ¨ â.¯.).
  2. +
  3. ‚ ª®­â¥ªáâ­®¬ ¬¥­î ¢ë¡¥à¨â¥ ¯ã­ªâ ‘¢®©á⢠.
  4. +
+ +

’ ª¦¥ ¤¨ «®£ ‘¢®©á⢠ ¬®¦­® ®âªàëâì, ¨á¯®«ì§ãî ª®¬¡¨­ æ¨î £®àïç¨å ª« ¢¨è Alt + Enter. +

‘¢®©á⢠ à §¡¨âë ­  £à㯯ë, ª®â®àë¥ ®â®¡à ¦ îâáï ­  ®â¤¥«ì­ëå áâà ­¨æ å ¤¨ «®£ . ‚ á¢®î ®ç¥à¥¤ì áâà ­¨æë á ­ áâனª ¬¨ ®¡ê¥¤¨­¥­ë ¢ ¨¥à àå¨ç¥áªãî áâàãªâãàã, ª®â®à ï ®â®¡à ¦ ¥âáï ¢ «¥¢®© ç á⨠¤¨ «®£ . ‚ ¢¥àå­¥© ç á⨠¤¨ «®£  ­ å®¤¨âáï ¯®«¥ ¢¢®¤  䨫ìâà , ª®â®àë© ¯®§¢®«ï¥â ¡ëáâà® ­ ©â¨ ­ã¦­ãî áâà ­¨æã ᢮©áâ¢. +

…᫨ ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì Žª­® > ®ª § âì ¯ ­¥«ì > à®ç¨¥... > Ž¡é¨¥ > ‘¢®©á⢠, â® ®âªà®¥âáï ¯ ­¥«ì, ª®â®à ï ¡ã¤¥â ®â®¡à ¦ âì ®á­®¢­ë¥ ᢮©á⢠ à¥áãàá , ¢ë¡à ­­®£® ¢ ­ ¢¨£ æ¨®­­®© ¯ ­¥«¨. +

+Modula-2 ᢮©á⢠ ¯à®¥ªâ 

+ +

‘¢®©á⢠, ᯥæ¨ä¨ç­ë¥ ¤«ï Œ®¤ã« -2 ¯à®¥ªâ®¢, ®â®¡à ¦ îâáï ¨ । ªâ¨àãîâáï ¢ ¤¨ «®£¥ ‘¢®©á⢠ ­  áâà ­¨æ¥ XDS Œ®¤ã« -2. +

+

„«ï Œ®¤ã« -2 ¯à®¥ªâ  ¬®¦­® ¨§¬¥­¨âì: +

    + +
  • ¨á¯®«ì§ã¥¬ãî ¤«ï ¯à®¥ªâ  Š‘,
  • +
  • ¨á¯®«ì§ã¥¬ë¥ ¤«ï ª®¬¯¨«ï樨 ¯à®£à ¬¬ë prj-ä ©« ¨«¨ £« ¢­ë© ¬®¤ã«ì,
  • +
  • à ¡®ç¨© ª â «®£, ¨á¯®«ì§ã¥¬ë© ¤«ï ª®¬¯¨«ï樨 ¯à®¥ªâ .
  • +
+ + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help007.html b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help007.html new file mode 100644 index 0000000..816448a --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/html/xds_help007.html @@ -0,0 +1,546 @@ + + + + +ˆá¯®«ì§®¢ ­¨¥ + + + +

+ˆá¯®«ì§®¢ ­¨¥

+ +

‚ í⮩ £« ¢¥ ®¯¨á ­ë ®á­®¢­ë¥ á¯®á®¡ë ¨á¯®«ì§®¢ ­¨ï ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¤«ï à ¡®âë á Œ®¤ã« -2 ª®¤®¬. +

+‘®§¤ ­¨¥ ­®¢ëå í«¥¬¥­â®¢

+ +

‘®§¤ ­¨¥ ­®¢ëå í«¥¬¥­â®¢ ¢ ¨­â¥£à¨à®¢ ­­®© á।¥ ¢ë¯®«­ï¥âáï, ç¥à¥§ ᮮ⢥âáâ¢ãî騩 ¬ áâ¥à. „«ï ᮧ¤ ­¨ï ­®¢®£® í«¥¬¥­â  ¢ £« ¢­®¬ ¬¥­î ¢ë¡¥à¨â¥ ” ©« > ‘®§¤ âì > à®ç¨¥.... ®ï¢¨âáï ¤¨ «®£ ᮠᯨ᪮¬ ¬ áâ¥à®¢ ᮧ¤ ­¨ï ­®¢ëå í«¥¬¥­â®¢. Œ áâ¥à  ®¡ê¥¤¨­¥­ë ¢ ¨¥à àå¨ç¥áªãî áâàãªâãàã. ‚ ¢¥àå­¥© ç á⨠¤¨ «®£  ­ å®¤¨âáï ¯®«¥ ¢¢®¤  䨫ìâà , ª®â®àë© ¯®§¢®«ï¥â ¡ëáâà® ­ ©â¨ ­ã¦­ë© ¬ áâ¥à. Žáâ ¥âáï ¢ë¡à âì ᮮ⢥âáâ¢ãî騩 ¬ áâ¥à ¨ ­ ¦ âì ª­®¯ªã „ «¥¥. +

+

„ «¥¥ ¬ áâ¥à ¯à¨ ¯®¬®é¨ ¯®á«¥¤®¢ â¥«ì­ëå ¤¨ «®£®¢ § ¯à è¨¢ ¥â ­¥®¡å®¤¨¬ë¥ ¤«ï ᮧ¤ ­¨ï í«¥¬¥­â  ¯ à ¬¥âàë. Š­®¯ª  ƒ®â®¢® áâ ­®¢¨âáï  ªâ¨¢­®©, ª ª ⮫쪮 ¢¢¥¤¥­ë ¢á¥ ®¡ï§ â¥«ì­ë¥ ¯ à ¬¥âàë. ®á«¥ ¥¥ ­ ¦ â¨ï ¡ã¤¥â ᮧ¤ ­ ᮮ⢥âáâ¢ãî騩 í«¥¬¥­âã à¥áãàá ¨ ¯à¨á¢®¥­ë ­ ç «ì­ë¥ §­ ç¥­¨ï ¥£® ᢮©á⢠¬. +

+®¢ë© ¯à®¥ªâ

+ +

„«ï ᮧ¤ ­¨ï ­®¢®£® ¯à®¥ªâ  ­¥®¡å®¤¨¬® ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì: ” ©« > ‘®§¤ âì > Œ®¤ã« -2 ¯à®¥ªâ. ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë ­®¢®£® ¯à®¥ªâ . +

+

०¤¥ ¢á¥£®, ­¥®¡å®¤¨¬® 㪠§ âì ¨¬ï ­®¢®£® ¯à®¥ªâ  (¯®«¥  §¢ ­¨¥ ¯à®¥ªâ ). +

„ «¥¥ ­¥®¡å®¤¨¬® 㪠§ âì ¬¥áâ®à á¯®«®¦¥­¨¥ ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  (¯®«¥  á¯®«®¦¥­¨¥). +

‡ â¥¬ á«¥¤ã¥â ¢ë¡à âì, ª ª ï Š‘ ¡ã¤¥â ¨á¯®«ì§®¢ âìáï (¯®«¥ ‘¨á⥬  ࠧࠡ®âª¨): ¥á«¨ ® ­¥ 㪠§ âì ¤à㣮¥, â® ¡ã¤¥â ¨á¯®«ì§®¢ ­  â  Š‘, ª®â®à ï 㪠§ ­  ª ª ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î ¢ ­ áâனª å ¨­â¥£à¨à®¢ ­­®© á।ë.  ¦ ¢ ­  ª­®¯ªã  áâநâì...: ¬®¦­® ¯¥à¥©â¨ ª ¬ áâ¥àã ­ áâனª¨ Š‘ ¨­â¥£à¨à®¢ ­­®© á।ë. +

„«ï ­®¢®£® ¯à®¥ªâ  ¬®¦­® áà §ã ᮧ¤ âì ¯à®¥ªâ­ë© ä ©«, £« ¢­ë© ¬®¤ã«ì, áâ ­¤ àâ­ãî áâàãªâãàã ¤¨à¥ªâ®à¨© ¨ ä ©« ¯¥à¥­ ¯à ¢«¥­¨©. ˆ¬¥­  ä ©«  ¯à®¥ªâ  ¨ ä ©«  £« ¢­®£® ¬®¤ã«ï 㪠§ë¢ îâáï ¢ ᮮ⢥âáâ¢ãîé¨å áâப å ¬ áâ¥à  ­ áâனª¨ (¯®«ï ‘®§¤ âì ¯à®¥ªâ­ë© ä ©« ¨ ‘®§¤ âì £« ¢­ë© ¬®¤ã«ì ᮮ⢥âá⢥­­®). …᫨ ®â¬¥ç¥­ ¯à¨§­ ª ˆá¯®«ì§®¢ âì è ¡«®­ë á¨á⥬ë ࠧࠡ®âª¨, â® ä ©«ë ¡ã¤ãâ ᮧ¤ ­ë ¯® è ¡«®­ ¬, 㪠§ ­­ë¬ ¢ ­ áâனª å Š‘. ‘âàãªâãà  ¤¨à¥ªâ®à¨© ¨ ¨¬ï ä ©«  ¯¥à¥­ ¯à ¢«¥­¨© â ª¦¥ ¡¥àãâáï ¨§ ­ áâ஥ª ¢ë¡à ­­®© Š‘ –  ¢â®¬ â¨ç¥áª¨ ¡ã¤ãâ § ¯®«­¥­ë ¯®«ï ‘®§¤ âì ¯®¤¯ ¯ª¨ ¨ ‘®§¤ âì red-ä ©«. +

®á«¥ ­ ¦ â¨ï ª­®¯ª¨ ƒ®â®¢® ­®¢ë© Œ®¤ã« -2 ¯à®¥ªâ ¡ã¤¥â ᮧ¤ ­ ¨ ¤®¡ ¢«¥­ ¢ ⥪ãéãî à ¡®çãî ®¡« áâì. ‘®§¤ ­­ë¥ ä ©«ë ¨ ¤¨à¥ªâ®à¨¨ ®â®¡à §ïâáï ¢ ¬¥­¥¤¦¥à¥ ¯à®¥ªâ®¢. +

+஥ªâ ¤«ï áãé¥áâ¢ãî饣® ª®¤ 

+ +

„«ï ᮧ¤ ­¨ï ¯à®¥ªâ  㦥 áãé¥áâ¢ãî饣® Œ®¤ã« -2 ª®¤  ­¥®¡å®¤¨¬® ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì: ” ©« > ‘®§¤ âì > Œ®¤ã« -2 ¯à®¥ªâ ¤«ï áãé¥áâ¢ãî饣® ª®¤ . ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë ¯à®¥ªâ . +

+

ˆ¬ï ­®¢®£® ¯à®¥ªâ  (¯®«¥  §¢ ­¨¥ ¯à®¥ªâ ) ¬®¦­® 㪠§ âì ï¢­ë¬ ®¡à §®¬, «¨¡® ¯®á«¥ ¢ë¡®à  ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  (¯®«¥  á¯®«®¦¥­¨¥) ¨¬ï ¡ã¤¥â ¯®¤áâ ¢«¥­®  ¢â®¬ â¨ç¥áª¨. +

’ ª¦¥ á«¥¤ã¥â ¢ë¡à âì, ª ª ï Š‘ ¡ã¤¥â ¨á¯®«ì§®¢ âìáï (¯®«¥ ‘¨á⥬  ࠧࠡ®âª¨): ¥á«¨ ® ­¥ 㪠§ âì ¤à㣮¥, â® ¡ã¤¥â ¨á¯®«ì§®¢ ­  â  Š‘, ª®â®à ï 㪠§ ­  ª ª ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î ¢ ­ áâனª å ¨­â¥£à¨à®¢ ­­®© á।ë.  ¦ ¢ ­  ª­®¯ªã  áâநâì...: ¬®¦­® ¯¥à¥©â¨ ª ¬ áâ¥àã ­ áâனª¨ Š‘ ¨­â¥£à¨à®¢ ­­®© á।ë. +

„ «¥¥ ­¥®¡å®¤¨¬® 㪠§ âì, ª ª®© ¨¬¥­­® ¯à®¥ªâ­ë© ä ©« (¯®«¥ ஥ªâ­ë© ä ©«) ¨«¨ £« ¢­ë© ¬®¤ã«ì (¯®«¥ ƒ« ¢­ë© ¬®¤ã«ì) ¡ã¤¥â ¨á¯®«ì§®¢ âìáï ¯à¨ ª®¬¯¨«ï樨 ¯à®£à ¬¬ë. ਠ¢ë¡®à¥ ª®à­¥¢®© ¤¨à¥ªâ®à¨¨ ¯à®¥ªâ  á¨á⥬  ¯®¯ëâ ¥âáï § ¯®«­¨âì ¤ ­­ë¥ ¯®«ï  ¢â®¬ â¨ç¥áª¨. ‘«¥¤ã¥â ¯à®¢¥à¨âì ¯®¤áâ ¢«¥­­ë¥ §­ ç¥­¨ï ¨«¨ § ¯®«­¨âì ¯®«¥ ¢àãç­ãî: ¯® ­ ¦ â¨î ª­®¯ª¨ Ž¡§®à... ®âªà®¥âáï ¯à®¢®¤­¨ª, £¤¥ ¬®¦­® ¢ë¡à âì ä ©« ¯à®¥ªâ  *.prj ¨«¨ ᮮ⢥âá⢥­­® ä ©« £« ¢­®£® ¬®¤ã«ï *.mod ¨«¨ *.ob2. +

®á«¥ ­ ¦ â¨ï ª­®¯ª¨ ƒ®â®¢® ­®¢ë© Œ®¤ã« -2 ¯à®¥ªâ ¡ã¤¥â ᮧ¤ ­ ¨ ¤®¡ ¢«¥­ ¢ ⥪ãéãî à ¡®çãî ®¡« áâì. ‘®§¤ ­­ë¥ ä ©«ë ¨ ¤¨à¥ªâ®à¨¨ ®â®¡à §ïâáï ¢ ¬¥­¥¤¦¥à¥ ¯à®¥ªâ®¢. +

+®¢ë© Œ®¤ã« -2 ¬®¤ã«ì

+ +

„«ï ᮧ¤ ­¨ï ­®¢®£® Œ®¤ã« -2 ¬®¤ã«ï ­¥®¡å®¤¨¬® ¢ £« ¢­®¬ ¬¥­î ¢ë¡à âì ” ©« > ‘®§¤ âì > à®ç¨¥... «¨¡® ¨á¯®«ì§®¢ âì ª®¬¡¨­ æ¨î £®àïç¨å ª« ¢¨è: Ctrl + N. ‚ ®âªàë¢è¥¬áï ¤¨ «®£¥ ­ã¦­® ­ ©â¨ á।¨ ¯à¥¤« £ ¥¬ëå ¬ áâ¥à®¢ Œ®¤ã« -2 ¬®¤ã«ì, ­ å®¤ï騩áï ¢ ª â¥£®à¨¨ XDS Œ®¤ã« -2 (¤«ï 㤮¡á⢠ ¢ë¡®à  ¬®¦­® ¢¢¥á⨠¢ ¯®«¥ 䨫ìâà  ¢ ¢¥àå­¥© ç á⨠¤¨ «®£  §­ ç¥­¨¥ ¬®¤ã«ì). ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® 㪠§ âì ¯ à ¬¥âàë ¬®¤ã«ï. +

+

०¤¥ ¢á¥£®, ­¥®¡å®¤¨¬® 㪠§ âì ¨¬ï ­®¢®£® ¬®¤ã«ï (¯®«¥ ˆ¬ï ¬®¤ã«ï). +

„ «¥¥ ­¥®¡å®¤¨¬® 㪠§ âì ¬¥áâ®à á¯®«®¦¥­¨¥ à¥áãàᮢ (¯®«¥ ˆá室­ ï ¯ ¯ª ). ਠ­ ¦ â¨¨ ª­®¯ª¨ Ž¡§®à... á¯à ¢  ®â ¯®«ï ¬®¦­® ¢ë¡à âì ¤¨à¥ªâ®à¨î á।¨ ¢á¥å ¤®áâ㯭ëå ¤¨à¥ªâ®à¨© ¯à®¥ªâ®¢, ¢å®¤ïé¨å ¢ ⥪ãéãî à ¡®çãî ®¡« áâì. +

+

‘âப  ¢ ¢¥àå­¥© ç á⨠¤¨ «®£  ¯®§¢®«ï¥â ¡ëáâà® ®â䨫ìâ஢ âì ¤¨à¥ªâ®à¨¨ ¯® ­ §¢ ­¨î. Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤áâ ­®¢®ç­ë¥ è ¡«®­ë: * ®§­ ç ¥â «î¡®¥ ª®«¨ç¥á⢮ ᨬ¢®«®¢ (áâப ) ¨«¨ ¨å ®âáãâá⢨¥, ? ®§­ ç ¥â «î¡®© ᨬ¢®« ¨«¨ ¥£® ®âáãâá⢨¥. ‚ë¡®à ¤¨à¥ªâ®à¨¨ ®áãé¥á⢫ï¥âáï ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

…᫨ ᮧ¤ ¢ ¥¬ë© ¬®¤ã«ì ­¥®¡å®¤¨¬® ᤥ« âì £« ¢­ë¬ ¬®¤ã«¥¬ ¯à®¥ªâ , â® ­¥®¡å®¤¨¬® ®â¬¥â¨âì ¯à¨§­ ª ‘®§¤ âì £« ¢­ë© ¬®¤ã«ì. ‚ í⮬ á«ãç ¥ ­¥®¡å®¤¨¬® 㪠§ âì ä ©« ॠ«¨§ æ¨¨ – § ¯®«­¨âì ¯®«¥ ¥ «¨§ æ¨ï. +

…᫨ ¬®¤ã«ì ­¥ ï¥âáï £« ¢­ë¬, â® ¬®¦­® ¢ë¡à âì, ­¥®¡å®¤¨¬® «¨ 㪠§ ­¨¥ ä ©«  ॠ«¨§ æ¨¨ ¨ ä ©«®¢ ®¯à¥¤¥«¥­¨© – ¯®«ï ¥ «¨§ æ¨ï ¨ ˆ­â¥à䥩á ᮮ⢥âá⢥­­®. ਠ¢ë¡®à¥ ¯à¨§­ ª  ­¥®¡å®¤¨¬® § ¯®«­¥­¨¥ ¯®«ï: ¨¬ï ä ©«  ¯®¤áâ ¢«ï¥âáï  ¢â®¬ â¨ç¥áª¨ ¯®á«¥ 㪠§ ­¨ï ¨¬¥­¨ ¬®¤ã«ï,   ¯à¨ ­ ¦ â¨¨ ª­®¯ª¨ Ž¡§®à... ®âªà뢠¥âáï ¤¨ «®£, ¯®§¢®«ïî騩 ¢ë¡à âì ¬¥á⮯®«®¦¥­¨¥ ä ©«  (¤¨ «®£  ­ «®£¨ç¥­ ¤¨ «®£ã ¢ë¡®à  ¬¥á⮯®«®¦¥­¨ï à¥áãàᮢ, ­® ¢ë¡®à ¯à¥¤« £ ¥âáï ®áãé¥á⢨âì á।¨ ¯®¤¤¨à¥ªâ®à¨© ¤¨à¥ªâ®à¨¨ à¥áãàᮢ); ¢ë¡®à ¬¥á⮯®«®¦¥­¨ï ®áãé¥á⢫ï¥âáï ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

®á«¥ ­ ¦ â¨ï ª­®¯ª¨ ƒ®â®¢® ­®¢ë© Œ®¤ã« -2 ¬®¤ã«ì ¡ã¤¥â ᮧ¤ ­ ¨ ¤®¡ ¢«¥­ ¢ ¢ë¡à ­­ãî ¤¨à¥ªâ®à¨î. ‘®§¤ ­­ë¥ ä ©«ë ®â®¡à §ïâáï ¢ ¬¥­¥¤¦¥à¥ ¯à®¥ªâ®¢. +

+“¯à ¢«¥­¨¥ ¯ à ¬¥âà ¬¨ Š‘

+ +

‚ à §¤¥«¥ XDS Œ®¤ã« -2 > ‘¨á⥬ë ࠧࠡ®âª¨ ¬®¦­® § à¥£¨áâà¨à®¢ âì ­®¢ë¥ ¨ ­ áâநâì 㦥 § à¥£¨áâà¨à®¢ ­­ë¥ Š‘. +

+

„«ï ॣ¨áâà æ¨¨ ­®¢®© Š‘ ­¥®¡å®¤¨¬® ¢ ¯à ¢®© ç á⨠¤¨ «®£  ­ ¦ âì ª­®¯ªã „®¡ ¢¨âì ¨ ¢ë¡à âì ª â «®£, ¢ ª®â®àë© ãáâ ­®¢«¥­  ¯®¤ª«îç ¥¬ ï Š‘. +

…᫨ ¢ë¡à ­­ ï Š‘ ¯®¤£®â®¢«¥­  ¤«ï ¨­â¥£à æ¨¨ á® á।®© ࠧࠡ®âª¨ (¢ ª®à­¥¢®¬ ª â «®£¥ Š‘ ­ å®¤¨âáï ä ©« sdk.ini), â® ¢ ᯨ᪥ ãáâ ­®¢«¥­­ëå á¨á⥬ ¯à®£à ¬¬¨à®¢ ­¨ï ¯®ï¢¨âáï ­®¢ ï § ¯¨áì, ᮮ⢥âáâ¢ãîé ï ¢ë¡à ­­®© Š‘. +

…c«¨ ¦¥ ä ©« sdk.ini ®âáãâáâ¢ã¥â, â® ®âªà®¥âáï ¬ áâ¥à ¤«ï àãç­®© ­ áâனª¨ ­  ¤ ­­ãî Š‘. Œ áâ¥à ­ áâனª¨ Š‘ ¬®¦­® ®âªàëâì ¢ «î¡®© ¬®¬¥­â, ¢ë¡à ¢ ¢ ᯨ᪥ ¦¥« ¥¬ãî á¨á⥬㠯ணࠬ¬¨à®¢ ­¨ï ¨ ­ ¦ ¢ ª­®¯ªã ˆ§¬¥­¨âì. +

“¤ «¨âì Š‘ ¨§ ᯨ᪠ ¬®¦­® ­ ¦ â¨¥¬ ª­®¯ª¨ “¤ «¨âì. +

„«ï ¢ë¤¥«¥­­®© ¢ ᯨ᪥ Š‘ ¬®¦­® á®åà ­¨âì ä ©« á ­ áâனª ¬¨ *.ini. „«ï í⮣® ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ªá¯®àâ, ¢ë¡à âì ¬¥áâ® ¤«ï á®åà ­¥­¨ï ¨ ¢¢¥á⨠¨¬ï ä ©« . +

…᫨ ᤥ« ­ë ª ª¨¥-«¨¡® ¨§¬¥­¥­¨ï ¢ ᯨ᪥ Š‘, ­ ¯à¨¬¥à, ¨§¬¥­¥­  Š‘, ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î, â® ¯à¨¬¥­¨âì ¨§¬¥­¥­¨ï, ­¥ § ªàë¢ ï ¤¨ «®£, ¬®¦­® ­ ¦ â¨¥¬ ª­®¯ª¨ ਬ¥­¨âì. +

„«ï ¨§¬¥­¥­¨ï ¯ à ¬¥â஢ Š‘ á«ã¦¨â ¬ áâ¥à ­ áâனª¨ Š‘. +

+Œ áâ¥à ­ áâனª¨ Š‘

+ +

Œ áâ¥à ­ áâனª¨ Š‘ ¢ë£«ï¤¨â á«¥¤ãî騬 ®¡à §®¬: +

+

‚ ¢¥àå­¥© ç á⨠¬ áâ¥à  ­ áâனª¨ Š‘ ¢ ¯®«ïå „®¬ è­¨© ª â «®£ ¨  §¢ ­¨¥ á¨áâ¥¬ë ¢¢®¤ïâáï ᮮ⢥âá⢥­­® ¯ãâì ª ª®à­¥¢®¬ã ª â «®£ã Š‘ ¨ ¨¬ï Š‘. …᫨ ¯à¨ ¢¢®¤¥ ¨¬¥­¨ Š‘ ¡ã¤¥â ¢¢¥¤¥­® ¨¬ï, 㦥 ¨á¯®«ì§ãî饥áï á।®©, â® ¢ ¨­ä®à¬ æ¨®­­®© áâப¥ ¡ã¤¥â ®â®¡à ¦¥­® ¯à¥¤ã¯à¥¦¤¥­¨¥. +

¨¦¥ ¬®¦­® ¢¨¤¥âì âਠ§ ª« ¤ª¨: Š®¬¯®­¥­âë, ˜ ¡«®­ë, ‘। . +

+‡ ª« ¤ª  Š®¬¯®­¥­âë

+ +

+Žá­®¢­ë¥ ¨­áâà㬥­âë
+ +

  ¯¥à¢®© § ª« ¤ª¥ ¢ à §¤¥«¥ Žá­®¢­ë¥ ¨­áâà㬥­âë 㪠§ë¢ îâáï ®á­®¢­ë¥ ¨­áâà㬥­âë, ¨á¯®«ì§ã¥¬ë¥ Š‘, â ª¨¥ ª ª: +

    + +
  • ª®¬¯¨«ïâ®à – ¯®«¥ Š®¬¯¨«ïâ®à;
  • +
  • ®â« ¤ç¨ª – ¯®«¥ Žâ« ¤ç¨ª;
  • +
  • ¬®¤¥«¨àãîé ï ¯à®£à ¬¬  – ¯®«¥ ˆ­â¥à¯à¥â â®à;
  • +
  • ¡¨¡«¨®â¥ª  ®¯à¥¤¥«¥­¨© – ¯®«¥ Ž¯¨á ­¨¥ ¡¨¡«¨®â¥ª.
  • +
+‡­ ç¥­¨ï¬¨ ¯¥à¢ëå âàñå ¯®«¥© ¤®«¦­ë ¡ëâì ¯ã⨠¤® ¨á¯®«­ï¥¬ëå ä ©«®¢ (*.exe ¨«¨ *.bat). ‡­ ç¥­¨¥¬ ¯®á«¥¤­¥£® ¯®«ï ï¥âáï ¯ãâì ¤® ª â «®£  á ä ©« ¬¨ ®¯à¥¤¥«¥­¨© *.def. Ž¡ï§ â¥«ì­ë¬ ¤«ï § ¯®«­¥­¨ï ï¥âáï ⮫쪮 ¯®«¥, ¢ ª®â®à®¬ 㪠§ë¢ ¥âáï ¯ãâì ¤® ª®¬¯¨«ïâ®à . +

+„®¯®«­¨â¥«ì­ë¥ ¨­áâà㬥­âë
+ +

¨¦¥ ¢ à §¤¥«¥ „®¯®«­¨â¥«ì­ë¥ ¨­áâà㬥­âë ¬®¦­® 㪠§ âì ¤®¯®«­¨â¥«ì­ë¥ ¨­áâà㬥­âë. „®¡ ¢«¥­­ë¬ ¨­áâà㬥­â ¬ ¡ã¤ãâ ᮮ⢥âá⢮¢ âì ¯ã­ªâë ¬¥­î, ¯à¨ç¥¬ ¯ã­ªâë í⨠¬®£ãâ £à㯯¨à®¢ âìáï ¢ ¯®¤¬¥­î, á।¨ ¯ã­ªâ®¢ ¬®£ã⠨ᯮ«ì§®¢ âìáï à §¤¥«¨â¥«¨. ‚ ®ª­¥ „®¯®«­¨â¥«ì­ë¥ ¨­áâà㬥­âë ¢®á¯à®¨§¢®¤¨âáï ¢áï áâàãªâãà  ¬¥­î. „«ï ¤®¡ ¢«¥­¨ï ­®¢®£® ¯ã­ªâ  ¢ ¬¥­î á«¥¤ã¥â á¯à ¢  ®â ᯨ᪠ ¨­áâà㬥­â®¢ ­ ¦ âì ª­®¯ªã „®¡ ¢¨âì. ®á«¥ í⮣® ¯®ï¢¨âáï ¤¨ «®£ ¢ë¡®à  ⮣®, çâ® ¨¬¥­­® ­ã¦­® ¤®¡ ¢¨âì: +

+

’ãâ ¬®¦­® ¢ë¡à âì: +

    + +
  • „®¡ ¢¨âì ­®¢ë© ¨­áâà㬥­â – ¤®¡ ¢«¥­¨¥ ­®¢®£® ¨­áâà㬥­â . ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® ¡ã¤¥â § ¯®«­¨âì ᢮©á⢠ ¨ ­ ¦ âì ª­®¯ªã ƒ®â®¢®. Œ áâ¥à ­ áâனª¨ ᢮©á⢠¬®¦­® ®âªàëâì ¢ «î¡®© ¬®¬¥­â, ¢ë¡à ¢ ¢ ᯨ᪥ ­ã¦­ë© ¨­áâà㬥­â ¨ ­ ¦ ¢ ª­®¯ªã ˆ§¬¥­¨âì.
    +®¤à®¡­¥¥ ® ­ áâனª¥ ¤®¯®«­¨â¥«ì­ëå ¨­áâà㬥­â®¢ ¬®¦­® ¯à®ç¥áâì ¢ à §¤¥«¥ Œ áâ¥à ­ áâனª¨ ¨­áâà㬥­â  Š‘.
  • +
  • „®¡ ¢¨âì à §¤¥«¨â¥«ì ¯ã­ªâ®¢ ¬¥­î – ¤®¡ ¢«¥­¨¥ à §¤¥«¨â¥«ï ¢ ¬¥­î.  §¤¥«¨â¥«ì - íâ® £®à¨§®­â «ì­ ï ¯®«®á  ¬¥¦¤ã ¯ã­ªâ ¬¨ ¬¥­î.
  • +
  • „®¡ ¢¨âì ­®¢ãî £à㯯㠖 „®¡ ¢«¥­¨¥ £àã¯¯ë ¢ ¬¥­î, âã⠭㦭® ¡ã¤¥â ¢¢¥á⨠¨¬ï £à㯯ë. ˆ¬ï £à㯯ë - íâ® ¨¬ï ¯ã­ªâ  ¢ ¬¥­î, ¯®¤ ª®â®àë¬ ¡ã¤¥â ¯®ª §ë¢ âìáï ¯®¤¬¥­î á ¨­áâà㬥­â ¬¨ §¨ í⮩ £à㯯ë.
  • +
+ +

®à冷ª ¯à¨¬¥­¥­¨ï ¤®¯®«­¨â¥«ì­ëå ¨­áâà㬥­â®¢ ¨, ᮮ⢥âá⢥­­®, ¯®à冷ª ¢ ª®â®à®¬ ®­¨ ¯®ª §ë¢ îâáï ¢ ¬¥­î, ¬®¦­® § ¤ ¢ âì, ¨á¯®«ì§ãï ª­®¯ª¨ ‚¢¥àå ¨ ‚­¨§ á¯à ¢  ®â ᯨ᪠ ¨­áâà㬥­â®¢. +

—â®¡ë ¯¥à¥¬¥áâ¨âì ¨­áâà㬥­â ¨§ ®¤­®© £àã¯¯ë ¢ ¤àã£ãî, á«¥¤ã¥â ®âªàëâì ¤¨ «®£ । ªâ¨à®¢ ­¨ï ᢮©á⢠í⮣® ¨­áâà㬥­â  ¨ ¯®¬¥­ïâì £à㯯㠢 ­¥¬. +

+‡ ª« ¤ª  ˜ ¡«®­ë

+ +

  § ª« ¤ª¥ ˜ ¡«®­ë ᯥæ¨ä¨æ¨àãîâáï ⨯ë ä ©«®¢ ¨ è ¡«®­ë, ¯® ª®â®àë¬ ¡ã¤ãâ ᮧ¤ ¢ âìáï ä ©«ë ¤«ï ­®¢ëå ¯à®¥ªâ®¢, ¥á«¨ ᮮ⢥âáâ¢ãî騩 ¯à¨§­ ª ¡ã¤¥â ®â¬¥ç¥­. +

+

+’¨¯ë ä ©«®¢
+ +

‚ à §¤¥«¥ ’¨¯ë ä ©«®¢ ¬®¦­® 㪠§ âì ¤¢  ¯ à ¬¥âà : +

    + +
  • à áè¨à¥­¨¥ ¨á¯®«­ï¥¬®£® ä ©«  – ¯®«¥  áè¨à¥­¨¥ ¨á¯®«­ï¥¬®£® ä ©« ;
  • +
  • à áè¨à¥­¨ï ¯¥à¢¨ç­ëå ä ©«®¢, ¯¥à¥ç¨á«ï¥¬ë¥ ç¥à¥§ â®çªã á § ¯ï⮩ – ¯®«¥  áè¨à¥­¨ï ®á­®¢­ëå ä ©«®¢.
  • +
+ +

+˜ ¡«®­ë ä ©«®¢
+ +

‚ à §¤¥«¥ ˜ ¡«®­ë ä ©«®¢ ®¯à¥¤¥«ï¥âáï ª ª¨¥ ¨¬¥­­® è ¡«®­ë § ¤ ­ë ¤«ï ¤ ­­®© Š‘. Œ®¦­® § ¤ âì á«¥¤ãî騥 è ¡«®­ë: +

    + +
  • è ¡«®­ ¤«ï ä ©«  ¯à®¥ªâ  – ¯®«¥ ˜ ¡«®­ ¯à®¥ªâ­®£® ä ©« , ä ©« *.tpr;
  • +
  • è ¡«®­ ¤«ï ä ©«  ¯¥à¥­ ¯à ¢«¥­¨© – ¯®«¥ ˜ ¡«®­ red-ä ©« , ä ©« *.trd;
  • +
  • è ¡«®­ ¤«ï ä ©«  £« ¢­®£® ¬®¤ã«ï – ¯®«¥ ˜ ¡«®­ £« ¢­®£® ¬®¤ã«ï, ä ©« *.tmd;
  • +
  • è ¡«®­ ¤«ï ä ©«  ®¯à¥¤¥«¥­¨© – ¯®«¥ ˜ ¡«®­ ¬®¤ã«ï ®¯à¥¤¥«¥­¨©, ä ©« *.tmd;
  • +
  • è ¡«®­ ¤«ï ä ©«  ॠ«¨§ æ¨¨ – ¯®«¥ ˜ ¡«®­ ¬®¤ã«ï ॠ«¨§ æ¨¨, ä ©« *.tmd;
  • +
  • è ¡«®­ ¤«ï ä ©«  Ž¡¥à®­ ¬®¤ã«ï – ¯®«¥ ˜ ¡«®­ Ž¡¥à®­ ¬®¤ã«ï, ä ©« *.tmd.
  • +
+ +

+‘âàãªâãà  ¯ ¯®ª
+ +

‚ à §¤¥«¥ ‘âàãªâãà  ¯ ¯®ª ®¯à¥¤¥«ïîâáï ¨¬¥­  ¤¨à¥ªâ®à¨©, ¨á¯®«ì§ã¥¬ëå ¯à¨ á®§¤ ­¨¨ ­®¢®£® ¯à®¥ªâ : +

    + +
  • ‘®§¤ ¢ ¥¬ë¥ ¯ ¯ª¨ - âãâ ¬®¦­® 㪠§ âì ᯨ᮪ ¤¨à¥ªâ®à¨© (ç¥à¥§ â®çªã á § ¯ï⮩), ª®â®àë¥ ¡ã¤ãâ ᮧ¤ ¢ âìáï  ¢â®¬ â¨ç¥áª¨ ¤«ï ­®¢®£® ¯à®¥ªâ ;
  • +
  •  ¯ª  ¯à®¥ªâ­®£® ä ©«  - ¥á«¨ § ¤ ­®, â® ¯à®¥ªâ­ë© ä ©« ¢ ­®¢®¬ ¯à®¥ªâ¥ ¡ã¤¥â ¯®¬¥é¥­ ¢ 㪠§ ­­ãî ¯®¤¤¨à¥ªâ®à¨î;
  • +
  •  ¯ª  £« ¢­®£® ¬®¤ã«ï - ¥á«¨ § ¤ ­®, â® £« ¢­ë© ¬®¤ã«ì ¢ ­®¢®¬ ¯à®¥ªâ¥ ¡ã¤¥â ¯®¬¥é¥­ ¢ 㪠§ ­­ãî ¯®¤¤¨à¥ªâ®à¨î;
  • +
+ +

+‡ ª« ¤ª  ‘। 

+ +

  § ª« ¤ª¥ ‘।  ¯¥à¥ç¨á«ïîâáï ¯¥à¥¬¥­­ë¥ á।ë. +

+

„®¡ ¢¨âì ­®¢ãî ¯¥à¥¬¥­­ãî ¬®¦­®, ­ ¦ ¢ á¯à ¢  ®â ᯨ᪠ ª­®¯ªã ‘®§¤ âì.... ‚ ®âªàë¢è¥¬áï ¬ áâ¥à¥ ­ áâனª¨ ­¥®¡å®¤¨¬® § ¯®«­¨âì ᢮©á⢠ ¨ ­ ¦ âì ª­®¯ªã ƒ®â®¢®. Œ áâ¥à ­ áâனª¨ ᢮©á⢠¬®¦­® ®âªàëâì ¢ «î¡®© ¬®¬¥­â, ¢ë¡à ¢ ¢ ᯨ᪥ ­ã¦­ãî ¯¥à¥¬¥­­ãî ¨ ­ ¦ ¢ ª­®¯ªã ˆ§¬¥­¨âì.... ¥à¥¬¥­­ë¥ ¨§ ᯨ᪠ 㤠«ïîâáï ª­®¯ª®© “¤ «¨âì. +

+

„«ï ¯¥à¥¬¥­­®© § ¯®«­ïîâáï á«¥¤ãî騥 ᢮©á⢠: +

    + +
  • ¨¬ï ¯¥à¥¬¥­­®© – ¯®«¥ ˆ¬ï;
  • +
  • §­ ç¥­¨¥ ¯¥à¥¬¥­­®© – ¯®«¥ ‡­ ç¥­¨¥.
  • +
+ +

Ž¡ï§ â¥«ì­ë¬ ¤«ï § ¯®«­¥­¨ï ï¥âáï ⮫쪮 ¨¬ï ¯¥à¥¬¥­­®©. ਠ㪠§ ­¨¨ §­ ç¥­¨ï ¯¥à¥¬¥­­®© ¬®¦­® ¨á¯®«ì§®¢ âì ¯¥à¥¬¥­­ë¥ áà¥¤ë – ᯨ᮪ ®âªà뢠¥âáï ­ ¦ â¨¥¬ ª­®¯ª¨ ¥à¥¬¥­­ë¥.... +

+Œ áâ¥à ­ áâனª¨ ¨­áâà㬥­â  Š‘

+ +

+Žá­®¢­ë¥ ­ áâனª¨

+ +

+

„«ï ¤®¯®«­¨â¥«ì­ëå ¨­áâà㬥­â®¢ ¯à¥¦¤¥ ¢á¥£® á«¥¤ã¥â 㪠§ âì ®á­®¢­ë¥ ­ áâனª¨: +

    + +
  • ­ §¢ ­¨¥ ¨­áâà㬥­â  – ¯®«¥  §¢ ­¨¥;
  • +
  • ¬¥áâ® à á¯®«®¦¥­¨ï – ¯®«¥  á¯®«®¦¥­¨¥, ¯ãâì ¤® ¨á¯®«­ï¥¬®£® ä ©«  (*.exe ¨«¨ *.bat);
  • +
+„ ­­ë¥ ¯®«ï ïîâáï ®¡ï§ â¥«ì­ë¬¨ ¤«ï § ¯®«­¥­¨ï. +

+ à ¬¥âàë ¬¥­î

+ +

‚ à §¤¥«¥ ’¥ªáâ ¯ã­ªâ  ¬¥­î ¬®¦­® ᯥæ¨ä¨æ¨à®¢ âì ­ §¢ ­¨ï ¯ã­ªâ®¢ ¢ ¬¥­î ¤«ï ¤®¡ ¢«ï¥¬®£® ¤®¯®«­¨â¥«ì­®£® ¨­áâà㬥­â . Œ®¦­® 㪠§ âì à §«¨ç­ë¥ ­ §¢ ­¨ï: ­ §¢ ­¨¥ ¤«ï  ªâ¨¢­®£® ¯ã­ªâ  ¬¥­î (¯®«¥ €ªâ¨¢­ë© ¯ã­ªâ) ¨ ­ §¢ ­¨¥, ¨á¯®«ì§ã¥¬®¥, ª®£¤  ¨­áâà㬥­â ­¥ ¤®áâ㯥­ ¤«ï § ¯ã᪠ (¯®«¥ ‡ ¡«®ª¨à®¢ ­­ë© ¯ã­ªâ). …᫨ ¯®«ï ­¥ § ¯®«­¥­ë, â® ¡ã¤¥â ¨á¯®«ì§®¢ âìáï ­ §¢ ­¨¥ ¨­áâà㬥­â . +

㭪⠬¥­î á 㪠§ ­­ë¬ ­ §¢ ­¨¥¬ ¯®ï¢«ï¥âáï ¯®¤¯ã­ªâ®¬ ª ¯ã­ªâã ˆ­áâà㬥­âë ®á­®¢­®£® ¬¥­î áà¥¤ë ¨«¨ ¢ ᮮ⢥âáâ¢ãî饩 ¨­áâà㬥­âã £à㯯¥ ¯®ª § ­­®© ¢ ¬¥­î ˆ­áâà㬥­âë. +

ƒà㯯ã, ¢ ª®â®à®© ¡ã¤¥â ¯®ª §ë¢ âìáï ¨­áâà㬥­â, ¬®¦­® ¯®¬¥­ïâì ¢ ᯨ᪥ ƒà㯯  ¢ ¬¥­î. …᫨ ¢ë¡à ­® <¥ ¢ £à㯯¥>, ¨­áâà㬥­â ¡ã¤¥â ¯®ª § ­ ¢ á ¬®¬ ¬¥­î ˆ­áâà㬥­âë. +

+ à ¬¥âàë § ¯ã᪠

+ +

‚ à §¤¥«¥  à ¬¥âàë § ¯ã᪠ 㪠§ë¢ îâáï ­ áâனª¨ ¤«ï § ¯ã᪠ ¨­áâà㬥­â . +

…᫨ ®â¬¥ç¥­ ¯à¨§­ ª ਬ¥­¨¬ ¤«ï ä ©«®¢ á à áè¨à¥­¨ï¬¨, â® ¨­áâà㬥­â ¯à¨¬¥­ï¥âáï ⮫쪮 ¤«ï ä ©«®¢ á 㪠§ ­­ë¬¨ à áè¨à¥­¨ï¬¨: ¢ í⮬ á«ãç ¥ áâ ­®¢¨âáï ¤®áâã¯­ë¬ ¯®«¥ ¤«ï ¢¢®¤ , ¢ ª®â®à®¬ à áè¨à¥­¨ï ¤®«¦­ë ¡ëâì ¯¥à¥ç¨á«¥­ë ç¥à¥§ â®çªã á § ¯ï⮩. +

‚ ¯®«¥ ਬ¥­¨¬ ¤«ï ¯à®¥ªâ®¢ á ª®à­¥¢ë¬ í«¥¬¥­â®¬ ­¥®¡å®¤¨¬® ¢ë¡à âì, ¤«ï ª ª¨å ⨯®¢ ¯à®¥ªâ  ¤®áâ㯥­ ¨­áâà㬥­â. ‚®§¬®¦­ë á«¥¤ãî騥 ¢ à¨ ­âë: +

    + +
  • «î¡®© – ¯à®¨§¢®«ì­ë¥ â¨¯ë ¯à®¥ªâ ;
  • +
  • «î¡®©, ­® á à §­ë¬¨ ­ áâனª ¬¨ – ¯à®¨§¢®«ì­ë¥ â¨¯ë ¯à®¥ªâ  ᮠᯥ樠«ì­ë¬¨ ­ áâனª ¬¨;
  • +
  • ¯à®¥ªâ­ë© ä ©« (*.prj) – ¯à®¥ªâë, ®á­®¢ ­­ë¥ ­  ¨á¯®«ì§®¢ ­¨¨ ¯à®¥ªâ­®£® ä ©«  *.prj;
  • +
  • £« ¢­ë© ¬®¤ã«ì – ¯à®¥ªâë, ®á­®¢ ­­ë¥ ­  ¨á¯®«ì§®¢ ­¨¨ £« ¢­®£® ¬®¤ã«ï.
  • +
+ +

®á«¥ ¢ë¡®à  ⨯  ¯à®¥ªâ  á«¥¤ã¥â 㪠§ âì ­ áâனª¨ ­  § ª« ¤ª¥ ­¨¦¥ (¢ á«ãç ¥ ¢ë¡®à  ¢â®à®£® ¯ã­ªâ  ­¥®¡å®¤¨¬® § ¯®«­¨âì ¤¢¥ § ª« ¤ª¨): ¬®¦­® 㪠§ âì  à£ã¬¥­âë ¨ à ¡®ç¨© ª â «®£. +

‚ ¯®«¥ ˆá¯®«ì§ã¥¬ ï ª®¤¨à®¢ª  ¢­¨§ã ¤¨ «®£  ¬®¦­® 㪠§ âì ª ª ï ª®¤¨à®¢ª  ¤®«¦­  ¨á¯®«ì§®¢ âìáï ¤«ï ¨á室ïé¨å á®®¡é¥­¨© ¨­áâà㬥­â . +

+€à£ã¬¥­âë
+ +

„«ï 㪠§ ­¨ï  à£ã¬¥­â®¢ ¬®¦­® ¨á¯®«ì§®¢ âì ᯨ᮪ ¯¥à¥¬¥­­ëå á।ë. „«ï ®âªàëâ¨ï ᯨ᪠ á«¥¤ã¥â ­ ¦ âì ª­®¯ªã ¥à¥¬¥­­ë¥... á¯à ¢  ®â ¯®«ï. ®¤à®¡­¥¥ ®¡ ¨á¯®«ì§®¢ ­¨¨ ¯¥à¥¬¥­­ëå ¬®¦­® ¯à®ç¨â âì ¢ à §¤¥«¥  ¡®â  á ¯¥à¥¬¥­­ë¬¨. +

+ ¡®ç¨© ª â «®£
+ +

 ¡®ç¨© ª â «®£ 㪠§ë¢ ¥âáï ¢ à §¤¥«¥  ¡®ç¨© ª â «®£. Œ®¦­® ¨á¯®«ì§®¢ âì à ¡®ç¨© ª â «®£ Š‘ – ¢ í⮬ á«ãç ¥ á«¥¤ã¥â ®â¬¥â¨âì ¯à¨§­ ª ˆá¯®«ì§®¢ âì §­ ç¥­¨¥ ¯® 㬮«ç ­¨î, ¨«¨ 㪠§ âì ¢àãç­ãî ¢ ¯®«¥  á¯®«®¦¥­¨¥ (á¬. à §¤¥« ‚ë¡®à ª â «®£  ¨«¨ ä ©« ). +

+Š®­ä¨£ãà æ¨¨ § ¯ã᪠

+ +

+Š®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï

+ +

„«ï ⮣® ç⮡ë ᮧ¤ âì ¨«¨ ®â। ªâ¨à®¢ âì ª®­ä¨£ãà æ¨î § ¯ã᪠ ¯à¨«®¦¥­¨ï ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ¢ë¡à âì: ‡ ¯ã᪠> ‚믮«­¨âì... «¨¡® ‡ ¯ã᪠> Žâ« ¤¨âì.... +

„«ï ᮧ¤ ­¨ï ­®¢®© ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï ¢ «¥¢®© ¯ ­¥«¨ ®âªàë¢è¥£®áï ¤¨ «®£  ­ã¦­® ¢ë¡à âì XDS Œ®¤ã« -2 ¯à®£à ¬¬ , 饫窮¬ ¯à ¢®© ª­®¯ª¨ ¬ëè¨ ®âªàëâì ª®­â¥ªáâ­®¥ ¬¥­î ¨ ¢ë¡à âì ‘®§¤ âì. 㤥â ᮧ¤ ­  ­®¢ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¯à¨«®¦¥­¨ï,   ¢ ¯à ¢®© ¯ ­¥«¨ ®âªà®¥âáï ¤¨ «®£ ¤«ï ¢¢®¤  ¯ à ¬¥â஢. +

+

„«ï ¨§¬¥­¥­¨ï ¯ à ¬¥â஢ áãé¥áâ¢ãî饩 ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï ­¥®¡å®¤¨¬® ¯à®áâ® ¢ë¡à âì ¥ñ ¢ «¥¢®© ¯ ­¥«¨ ¤¨ «®£  – ¢ ¯à ¢®© ¯ ­¥«¨ ®âªà®îâáï ᢮©á⢠ ¢ë¡à ­­®© ª®­ä¨£ãà æ¨¨. +

+

Š ¦¤ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¯à¨«®¦¥­¨ï ¤®«¦­  ¨¬¥âì ᢮¥ ã­¨ª «ì­®¥ ¨¬ï – ¥£® ­¥®¡å®¤¨¬® ¢¢¥á⨠¢ ¯®«¥ ˆ¬ï. +

®á«¥ § ¯®«­¥­¨ï ®¡ï§ â¥«ì­ëå ¯®«¥© ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ‡ ¯ã᪠¨«¨ ‚믮«­¨âì (¢ § ¢¨á¨¬®á⨠®â ⮣®, ª ª®© ¯ã­ªâ ¢ ¬¥­î ¡ë« ¢ë¡à ­ ¨§­ ç «ì­®) ¤«ï á®åà ­¥­¨ï ª®­ä¨£ãà æ¨¨ ¨ § ¯ã᪠ ¯à®£à ¬¬ë. …᫨ âॡã¥âáï á®åà ­¨âì ¨§¬¥­¥­¨ï ¢ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ­¥ § ¯ãáª ï ¯à®£à ¬¬ã, â® á«¥¤ã¥â ­ ¦ âì á­ ç «  ª­®¯ªã ਬ¥­¨âì,   § â¥¬ § ªàëâì ¤¨ «®£ ­ ¦ â¨¥¬ ª­®¯ª¨ ‡ ªàëâì. ‚®ááâ ­®¢¨âì ¯®á«¥¤­¨¥ á®åà ­¥­­ë¥ §­ ç¥­¨ï ¬®¦­® ­ ¦ â¨¥¬ ª­®¯ª¨ ‚®ááâ ­®¢¨âì. +

„ «¥¥ ®¯¨á ­ë ¢ª« ¤ª¨, ­  ª®â®àëå § ¯®«­ïîâáï ¯ à ¬¥âàë ¯à¨ á®§¤ ­¨¨ ­®¢®© ¨«¨ । ªâ¨à®¢ ­¨¨ áãé¥áâ¢ãî饩 ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï. +

+‚ª« ¤ª  ƒ« ¢­ë¥
+ +

  ¢ª« ¤ª¥ ƒ« ¢­ ï ­¥®¡å®¤¨¬® ¢ë¡à âì ¯à®¥ªâ, ¤«ï ª®â®à®£® ¡ã¤¥â ᮧ¤ ­  ª®­ä¨£ãà æ¨ï § ¯ã᪠ – § ¯®«­¨âì à §¤¥« ஥ªâ. ஥ªâ ¢ë¡¨à ¥âáï ¨§ ¢á¥å ¯à®¥ªâ®¢ ⥪ã饩 à ¡®ç¥© ®¡« áâ¨: ¬®¦­® ¢¢¥á⨠¨¬ï ¯à®¥ªâ  ¢àãç­ãî ¨«¨ ­ ¦ âì ª­®¯ªã Ž¡§®à... ¨ ¢®á¯®«ì§®¢ âìáï ¤¨ «®£®¬ ¢ë¡®à . +

„ «¥¥ 㪠§ë¢ ¥âáï ¯à®£à ¬¬­ë© ä ©« *.prg ¤«ï § ¯ã᪠ – íâ® ¬®¦­® ᤥ« âì ¢ à §¤¥«¥ ‡ ¯ã᪠¥¬ ï ¯à®£à ¬¬  (á¬. à §¤¥« ‚ë¡®à ª â «®£  ¨«¨ ä ©« ). +

+‚ª« ¤ª  €à£ã¬¥­âë
+ +

  ¢ª« ¤ª¥ €à£ã¬¥­âë ¬®¦­® § ¤ âì  à£ã¬¥­âë ¤«ï § ¯ã᪠¥¬®© ¯à®£à ¬¬ë,   â ª¦¥ 㪠§ âì à ¡®çãî ¤¨à¥ªâ®à¨î. +

+

‚ à §¤¥«¥ €à£ã¬¥­âë ¯à®£à ¬¬ë 㪠§ë¢ îâáï ᮡá⢥­­®  à£ã¬¥­âë ¯à®£à ¬¬ë. „«ï 㪠§ ­¨ï  à£ã¬¥­â®¢ ¬®¦­® ¨á¯®«ì§®¢ âì ᯨ᮪ ¯¥à¥¬¥­­ëå á।ë. „«ï ®âªàëâ¨ï ᯨ᪠ á«¥¤ã¥â ­ ¦ âì ª­®¯ªã ¥à¥¬¥­­ë¥... á¯à ¢  ®â ¯®«ï. ®¤à®¡­¥¥ ®¡ ¨á¯®«ì§®¢ ­¨¨ ¯¥à¥¬¥­­ëå ¬®¦­® ¯à®ç¨â âì ¢ à §¤¥«¥  ¡®â  á ¯¥à¥¬¥­­ë¬¨. +

‚ à §¤¥«¥  ¡®ç¨© ª â «®£ ¬®¦­® ¢ë¡à âì, ¨á¯®«ì§®¢ âì «¨ ª â «®£ ¯à®¥ªâ  – ¯ã­ªâ ® 㬮«ç ­¨î, ¨«¨ ¤à㣮© ª â «®£ – ¯ã­ªâ „à㣮© (á¬. à §¤¥« ‚ë¡®à ª â «®£  ¨«¨ ä ©« ). +

+‚ª« ¤ª  ‘¨á⥬  ࠧࠡ®âª¨
+ +

  ¢ª« ¤ª¥ ‘¨á⥬  ࠧࠡ®âª¨ 㪠§ë¢ îâáï  à£ã¬¥­âë ¤«ï ¬®¤¥«¨àãî饩 ¯à®£à ¬¬ë ¨ ®â« ¤ç¨ª  – ᮮ⢥âá⢥­­® ¢ à §¤¥« å €à£ã¬¥­âë ¨­â¥à¯à¥â â®à  ¨ €à£ã¬¥­âë ®â« ¤ç¨ª . +

+

ਠ㪠§ ­¨¨  à£ã¬¥­â®¢ ¬®¦­® ¨á¯®«ì§®¢ âì ¯¥à¥¬¥­­ë¥ á।ë. ®¤à®¡­¥¥ ®¡ ¨á¯®«ì§®¢ ­¨¨ ¯¥à¥¬¥­­ëå á।ë ᬮâà¨â¥ ¢ à §¤¥«¥  ¡®â  á ¯¥à¥¬¥­­ë¬¨. +

+‚ª« ¤ª  ‘। 
+ +

  ¢ª« ¤ª¥ ‘।  ãáâ ­ ¢«¨¢ îâáï ¯¥à¥¬¥­­ë¥ á।ë. +

+

„®¡ ¢¨âì ­®¢ãî ¯¥à¥¬¥­­ãî áà¥¤ë ¬®¦­®, ­ ¦ ¢ ª­®¯ªã ‘®§¤ âì... ¢ ¯à ¢®© ç á⨠¤¨ «®£ . +

+

‚ ®âªàë¢è¥¬áï ®ª­¥ ­ã¦­® ¢¢¥á⨠¨¬ï ¯¥à¥¬¥­­®© áà¥¤ë – § ¯®«­¨âì ¯®«¥ ˆ¬ï (®¡ï§ â¥«ì­®¥ ¯®«¥) ¨ ¥ñ §­ ç¥­¨¥ – ¯®«¥ ‡­ ç¥­¨¥). ‡­ ç¥­¨¥ ¯¥à¥¬¥­­®© áà¥¤ë ¬®¦¥â ¡ëâì ¢¢¥¤¥­® ¢àãç­ãî, ¨«¨ ¨á¯®«ì§®¢ ­ë ¯¥à¥¬¥­­ë¥, ᯨ᮪ ª®â®àëå ®âªà뢠¥âáï ¯à¨ ­ ¦ â¨¨ ª­®¯ª¨ ¥à¥¬¥­­ë¥.... ¥à¥¬¥­­ ï ¤®¡ ¢«ï¥âáï ¢ ᯨ᮪ ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

€­ «®£¨ç­®¥ ®ª­® ¤«ï । ªâ¨à®¢ ­¨ï ¯¥à¥¬¥­­®© áà¥¤ë ®âªà뢠¥âáï ¯à¨ ¢ë¡®à¥ ¥ñ ¢ ᯨ᪥ ¨ ­ ¦ â¨¨ ª­®¯ª¨ ˆ§¬¥­¨âì... ¢ ¯à ¢®© ç á⨠¤¨ «®£ . ˆ§¬¥­¥­¨ï á®åà ­ïîâáï ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

’ ª¦¥ ¯¥à¥¬¥­­ãî áà¥¤ë ¬®¦­® ¤®¡ ¢¨âì ¯ãâñ¬ ¢ë¡®à  ¨§ ᯨ᪠. „«ï ¥£® ®âªàëâ¨ï ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ‚ë¡à âì.... +

+

ã¦­ë¥ ¯¥à¥¬¥­­ë¥ ®â¬¥ç îâáï ¢ ᯨ᪥. Œ®¦­® ¨á¯®«ì§®¢ âì ª­®¯ª¨ ‚ë¡à âì ¢á¥ ¨ Žâ¬¥­¨âì ¢á¥ ¤«ï ®â¬¥âª¨ ¢á¥å ¯¥à¥¬¥­­ëå ¨«¨ á­ïâ¨ï ®â¬¥âª¨ á® ¢á¥å ¯¥à¥¬¥­­ëå ᮮ⢥âá⢥­­®. Žâ¬¥ç¥­­ë¥ ¯¥à¥¬¥­­ë¥ ¤®¡ ¢«ïîâáï ¢ ᯨ᮪ ¯¥à¥¬¥­­ëå áà¥¤ë ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

“¤ «¨âì ¯¥à¥¬¥­­ãî áà¥¤ë ¨§ ᯨ᪠ ¬®¦­® ¢ë¤¥«¨¢ ¥ñ ¢ ᯨ᪥ ¨ ­ ¦ ¢ ª­®¯ªã “¤ «¨âì. +

…᫨ ¢ ᯨ᪥ ¯à¨áãâáâ¢ã¥â å®âï ¡ë ®¤­  ¯¥à¥¬¥­­ ï á।ë, â® ¢ ­¨¦­¥© ç á⨠¤¨ «®£  áâ ­®¢¨âáï ¤®áâã¯­ë¬ ¢ë¡®à: +

    + +
  • „®¡ ¢¨âì á।㠢® ¢­ãâ७­îî á।㠖 ¤®¡ ¢¨âì 㪠§ ­­ë¥ ¯¥à¥¬¥­­ë¥ ®ªà㦥­¨ï ª á¨á⥬­ë¬;
  • +
  • ‡ ¬¥­¨âì ¢­ãâ७­îî á।ã 㪠§ ­­®© á।®© – § ¬¥­¨âì á¨á⥬­ë¥ ¯¥à¥¬¥­­ë¥ ®ªà㦥­¨ï 㪠§ ­­ë¬¨ ¯¥à¥¬¥­­ë¬¨.
  • +
+ +

+‚ª« ¤ª  Ž¡é¨¥
+ +

  ¢« ¤ª¥ Ž¡é¨¥ § ¤ îâáï ®¡é¨¥ ­ áâனª¨ ª®­ä¨£ãà æ¨¨ § ¯ã᪠. +

+

‚ à §¤¥«¥ ‘®åà ­¨âì ª ª ¬®¦­® ¢ë¡à âì, á®åà ­ïâì «¨ ª®­ä¨£ãà æ¨î ª ª «®ª «ì­ë© ä ©« (¯ã­ªâ ‹®ª «ì­ë© ä ©«) ¨«¨ ª ª ®¡é¥¤®áâã¯­ë© ä ©« (¯ã­ªâ Ž¡é¨© ä ©«). ‚® ¢â®à®¬ á«ãç ¥ áâ ­®¢¨âáï ¤®áâã¯­ë¬ ¯®«¥ ¤«ï ¢¢®¤ , ¢ ª®â®à®¬ ­¥®¡å®¤¨¬® 㪠§ âì ¯ãâì ¤® ¤¨à¥ªâ®à¨¨ ¤«ï á®åà ­¥­¨ï. +

‚ à §¤¥«¥ ®ª §ë¢ âì ¢ ¬¥­î ˆ§¡à ­­®¥ ¬®¦­® ®â¬¥â¨âì, ¯®ª §ë¢ âì «¨ ¤ ­­ãî ª®­ä¨£ãà æ¨î § ¯ã᪠ á।¨ ¯à¥¤¯®ç¨â ¥¬ëå ¯ã­ªâ®¢ ¬¥­î § ¯ã᪠ ¨ ¬¥­î ®â« ¤ª¨. +

‚ à §¤¥«¥ Encoding ¢ë¡¨à ¥âáï ª®¤¨à®¢ª : ¨á¯®«ì§ã¥¬ ï ¯® 㬮«ç ­¨î (¯ã­ªâ ® 㬮«ç ­¨î) ¨«¨ 㪠§ ­­ ï (¯ã­ªâ à®ç¨¥). +

‚ à §¤¥«¥ stdin ¨ stdout ¢ë¡¨à îâáï ¨­áâà㬥­âë ¤«ï ¢¢®¤ -¢ë¢®¤ . Œ®£ãâ ¡ëâì ¨á¯®«ì§®¢ ­ë: +

    + +
  • ¢ë¤¥«¥­­ ï ª®­á®«ì, ¥á«¨ ®â¬¥ç¥­ ¯ã­ªâ ‚뤥«¨âì ª®­á®«ì;
  • +
  • áâ®à®­­¨© ä ©«, ¥á«¨ ®â¬¥ç¥­ ¯ã­ªâ ” ©« (á¬. à §¤¥« ‚ë¡®à ª â «®£  ¨«¨ ä ©« ).
  • +
+ +

ਠ㪠§ ­¨¨ ä ©«  ®­ ¬®¦¥â ¤®¯®«­ïâìáï, ¥á«¨ ®â¬¥ç¥­ ¯à¨§­ ª „®¡ ¢¨âì. +

‚ ­¨¦­¥© ç á⨠¤¨ «®£  㪠§ë¢ ¥âáï, ­ã¦­® «¨ § ¯ã᪠âì ¯à®£à ¬¬ã ¢ ä®­®¢®¬ ०¨¬¥ – ¯à¨§­ ª ‡ ¯ãáâ¨âì ¢ ä®­®¢®¬ ०¨¬¥. +

+Š®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨

+ +

„«ï ⮣® ç⮡ë ᮧ¤ âì ¨«¨ ®â। ªâ¨à®¢ âì ª®­ä¨£ãà æ¨î § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ ¢ £« ¢­®¬ ¬¥­î ­¥®¡å®¤¨¬® ¢ë¡à âì: ‡ ¯ã᪠> ‚믮«­¨âì... «¨¡® ‡ ¯ã᪠> Žâ« ¤¨âì.... +

„«ï ᮧ¤ ­¨ï ­®¢®© ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ ¢ «¥¢®© ¯ ­¥«¨ ®âªàë¢è¥£®áï ¤¨ «®£  ­ã¦­® ¢ë¡à âì XDS ¯ ª¥â ®â« ¤ª¨, 饫窮¬ ¯à ¢®© ª­®¯ª¨ ¬ëè¨ ®âªàëâì ª®­â¥ªáâ­®¥ ¬¥­î ¨ ¢ë¡à âì ‘®§¤ âì. 㤥â ᮧ¤ ­  ­®¢ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨,   ¢ ¯à ¢®© ¯ ­¥«¨ ®âªà®¥âáï ¤¨ «®£ ¤«ï ¢¢®¤  ¯ à ¬¥â஢. +

+

„«ï ¨§¬¥­¥­¨ï ¯ à ¬¥â஢ áãé¥áâ¢ãî饩 ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ ­¥®¡å®¤¨¬® ¯à®áâ® ¢ë¡à âì ¥ñ ¢ «¥¢®© ¯ ­¥«¨ ¤¨ «®£  – ¢ ¯à ¢®© ¯ ­¥«¨ ®âªà®îâáï ᢮©á⢠ ¢ë¡à ­­®© ª®­ä¨£ãà æ¨¨. +

+

Š ¦¤ ï ª®­ä¨£ãà æ¨ï § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ ¤®«¦­  ¨¬¥âì ᢮¥ ã­¨ª «ì­®¥ ¨¬ï – ¥£® ­¥®¡å®¤¨¬® ¢¢¥á⨠¢ ¯®«¥ ˆ¬ï. +

®á«¥ § ¯®«­¥­¨ï ®¡ï§ â¥«ì­ëå ¯®«¥© ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ‡ ¯ã᪠¨«¨ ‚믮«­¨âì (¢ § ¢¨á¨¬®á⨠®â ⮣®, ª ª®© ¯ã­ªâ ¢ ¬¥­î ¡ë« ¢ë¡à ­ ¨§­ ç «ì­®) ¤«ï á®åà ­¥­¨ï ª®­ä¨£ãà æ¨¨ ¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨. …᫨ âॡã¥âáï á®åà ­¨âì ¨§¬¥­¥­¨ï ¢ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ­¥ § ¯ãáª ï ¯ ª¥â ®â« ¤ª¨, â® á«¥¤ã¥â ­ ¦ âì á­ ç «  ª­®¯ªã ਬ¥­¨âì,   § â¥¬ § ªàëâì ¤¨ «®£ ­ ¦ â¨¥¬ ª­®¯ª¨ ‡ ªàëâì. ‚®ááâ ­®¢¨âì ¯®á«¥¤­¨¥ á®åà ­¥­­ë¥ §­ ç¥­¨ï ¬®¦­® ­ ¦ â¨¥¬ ª­®¯ª¨ ‚®ááâ ­®¢¨âì. +

„ «¥¥ ®¯¨á ­ë ¢ª« ¤ª¨, ­  ª®â®àëå § ¯®«­ïîâáï ¯ à ¬¥âàë ¯à¨ á®§¤ ­¨¨ ­®¢®© ¨«¨ । ªâ¨à®¢ ­¨¨ áãé¥áâ¢ãî饩 ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨. +

+‚ª« ¤ª  ƒ« ¢­ë¥
+ +

  ¢ª« ¤ª¥ ƒ« ¢­ ï ­¥®¡å®¤¨¬® ¢ë¡à âì ¯à®¥ªâ, ¤«ï ª®â®à®£® ¡ã¤¥â ᮧ¤ ­  ª®­ä¨£ãà æ¨ï § ¯ã᪠ – § ¯®«­¨âì à §¤¥« ஥ªâ. ஥ªâ ¢ë¡¨à ¥âáï ¨§ ¢á¥å ¯à®¥ªâ®¢ ⥪ã饩 à ¡®ç¥© ®¡« áâ¨: ¬®¦­® ¢¢¥á⨠¨¬ï ¯à®¥ªâ  ¢àãç­ãî ¨«¨ ­ ¦ âì ª­®¯ªã Ž¡§®à... ¨ ¢®á¯®«ì§®¢ âìáï ¤¨ «®£®¬ ¢ë¡®à . +

„ «¥¥ ­¥®¡å®¤¨¬® ¢ë¡à âì, ¨á¯®«ì§®¢ âì «¨ ®¤¨­®ç­ë© áªà¨¯â ®â« ¤ª¨ ¨«¨ ¯ ª¥â ®â« ¤ª¨. ਠ¢ë¡®à¥ ¯¥à¢®£® ¢ à¨ ­â  (‡ ¯ãáâ¨âì XDS ¯ ª¥â ®â« ¤ª¨) ­¥®¡å®¤¨¬® 㪠§ âì ä ©« *.pkt, ¯à¨ ¢ë¡®à¥ ¢â®à®£® ¢ à¨ ­â  (‡ ¯ãáâ¨âì £à㯯ã XDS ¯ ª¥â®¢ ®â« ¤ª¨) – ä ©« *.ldp (á¬. à §¤¥« ‚ë¡®à ª â «®£  ¨«¨ ä ©« ). +

+‚ª« ¤ª  €à£ã¬¥­âë
+ +

‚ª« ¤ª  § ¯®«­ï¥âáï  ­ «®£¨ç­® § ¯®«­¥­¨î ¢ª« ¤ª¨ €à£ã¬¥­âë ¯à¨ à¥¤ ªâ¨à®¢ ­¨¨ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï. ‘¬®âਠࠧ¤¥« ‚ª« ¤ª  €à£ã¬¥­âë. +

+‚ª« ¤ª  ‘¨á⥬  ࠧࠡ®âª¨
+ +

  ¢ª« ¤ª¥ ‘¨á⥬  ࠧࠡ®âª¨ 㪠§ë¢ îâáï  à£ã¬¥­âë ¤«ï ®â« ¤ç¨ª  – ¢ à §¤¥«¥ €à£ã¬¥­âë ®â« ¤ç¨ª . +

+

ਠ㪠§ ­¨¨  à£ã¬¥­â®¢ ¬®¦­® ¨á¯®«ì§®¢ âì ¯¥à¥¬¥­­ë¥ á।ë. ®¤à®¡­¥¥ ®¡ ¨á¯®«ì§®¢ ­¨¨ ¯¥à¥¬¥­­ëå á।ë ᬮâà¨â¥ ¢ à §¤¥«¥  ¡®â  á ¯¥à¥¬¥­­ë¬¨. +

+‚ª« ¤ª  ‘। 
+ +

‚ª« ¤ª  § ¯®«­ï¥âáï  ­ «®£¨ç­® § ¯®«­¥­¨î ¢ª« ¤ª¨ ‘।  ¯à¨ । ªâ¨à®¢ ­¨¨ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï. ‘¬®âਠࠧ¤¥« ‚ª« ¤ª  ‘। . +

+‚ª« ¤ª  Ž¡é¨¥
+ +

‚ª« ¤ª  § ¯®«­ï¥âáï  ­ «®£¨ç­® § ¯®«­¥­¨î ¢ª« ¤ª¨ Ž¡é¨¥ ¯à¨ । ªâ¨à®¢ ­¨¨ ª®­ä¨£ãà æ¨¨ § ¯ã᪠ ¯à¨«®¦¥­¨ï. ‘¬®âਠࠧ¤¥« ‚ª« ¤ª  Ž¡é¨¥. +

+‚ë¡®à ª â «®£  ¨«¨ ä ©« 

+ +

‚ë¡®à ª â «®£  ¨«¨ ä ©«  ç áâ® ¨á¯®«ì§ã¥âáï ¢ à §«¨ç­ëå ¤¨ «®£ å ¨ ¬ áâ¥à å ­ áâனª¨. ¥®¡å®¤¨¬® § ¯®«­¨âì ¯®«¥  á¯®«®¦¥­¨¥, çâ® ¬®¦­® ᤥ« âì ¢àãç­ãî ¨«¨ ¢®á¯®«ì§®¢ ¢è¨áì ª­®¯ª ¬¨: +

    + +
  •  ¡®ç ï ®¡« áâì... ¤«ï ¢ë¡®à  ¨§ ¤¨à¥ªâ®à¨© ¨«¨ ᮮ⢥â¢â¥­­® ä ©«®¢ ¯à®¥ªâ®¢ à ¡®ç¥© ®¡« áâ¨;
  • +
  • ” ©«®¢ ï á¨á⥬ ... ¤«ï ¢ë¡®à  ¤¨à¥ªâ®à¨¨ ¨«¨ ä ©«  ­  ä ©«®¢®© á¨á⥬¥;
  • +
  • ¥à¥¬¥­­ë¥... ¤«ï ¢ë¡®à  ¯¥à¥¬¥­­®© (¯®¤à®¡­¥¥ ®¡ ¨á¯®«ì§®¢ ­¨¨ ¯¥à¥¬¥­­ëå ¬®¦­® ¯à®ç¨â âì ¢ à §¤¥«¥  ¡®â  á ¯¥à¥¬¥­­ë¬¨).
  • +
+ +

®á«¥ § ¯®«­¥­¨ï ¯®«ï, ­ §¢ ­¨¥ ¯®«ï  á¯®«®¦¥­¨¥ áâ ­¥â áá뫪®©, ¯® ­ ¦ â¨î ­  ª®â®àãî ®âªà뢠¥âáï ¯à®¢®¤­¨ª ®¯¥à æ¨®­­®© á¨á⥬ë, £¤¥ 㪠§ ­­ ï ¤¨à¥ªâ®à¨ï ï¥âáï ⥪ã饩, ¥á«¨ ¯®«¥ § ¯®«­¥­® ª®à४⭮; ¢ ¯à®â¨¢­®¬ á«ãç ¥, ¥á«¨ ¯ãâì 㪠§ ­ ­¥ ª®à४⭮, á।  ¢ë¤ á⠮訡ªã. +

+ ¡®â  á ¯¥à¥¬¥­­ë¬¨

+ +

ਠ§ ¯®«­¥­¨¨ ¯®«¥© à §«¨ç­ëå ¤¨ «®£®¢ ç áâ® ¨á¯®«ì§ãîâáï ¯¥à¥¬¥­­ë¥ á।ë. ‘¯¨á®ª ¯¥à¥¬¥­­ëå ®âªà뢠¥âáï ®¡ëç­® ­ ¦ â¨¥¬ ª­®¯ª¨ ¥à¥¬¥­­ë¥.... +

+

‘âப  ¢ ¢¥àå­¥© ç á⨠¤¨ «®£  ¯®§¢®«ï¥â ¡ëáâà® ®â䨫ìâ஢ âì ¯¥à¥¬¥­­ë¥ ¯® ­ §¢ ­¨î. Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤áâ ­®¢®ç­ë¥ è ¡«®­ë: * ®§­ ç ¥â «î¡®¥ ª®«¨ç¥á⢮ ᨬ¢®«®¢ (áâப ) ¨«¨ ¨å ®âáãâá⢨¥, ? ®§­ ç ¥â «î¡®© ᨬ¢®« ¨«¨ ¥£® ®âáãâá⢨¥. +

® 㬮«ç ­¨î ¢ ᯨ᪥ ®â®¡à ¦ îâáï ⮫쪮 ®¡é¨¥ ¯¥à¥¬¥­­ë¥. …᫨ ®â¬¥â¨âì ¯à¨§­ ª ®ª § âì ¢á¥, â® ¢ ᯨ᪥ ¡ã¤ãâ ¯®ª § ­ë ¢á¥ ¯¥à¥¬¥­­ë¥ á।ë. Ž¤­ ª® ­ ¤® ¨¬¥âì ¢ ¢¨¤ã, çâ® ­¥ª®â®àë¥ ¯¥à¥¬¥­­ë¥ ¬®£ãâ ¡ëâì ­¥ ¤®áâã¯­ë ¢ 㪠§ ­­®¬ ª®­â¥ªáâ¥. +

ਠ¢ë¤¥«¥­¨¨ ¯¥à¥¬¥­­®© ¢ ᯨ᪥ ¢ ¯®«¥ Ž¯¨á ­¨¥ ¯¥à¥¬¥­­®© ¯®ª §ë¢ ¥âáï ªà âª®¥ ®¯¨á ­¨¥ ¯¥à¥¬¥­­®©. „«ï ­¥ª®â®àëå ¯¥à¥¬¥­­ëå â ª¦¥ ¬®¦­® ¢¢¥á⨠ à£ã¬¥­âë – ¢ í⮬ á«ãç ¥ ¯®«¥ €à£ã¬¥­â áâ ­®¢¨âáï ¤®áâ㯭ë¬, – ª®â®àë¥ ¢ á¢®î ®ç¥à¥¤ì ¢ ­¥ª®â®àëå á«ãç ïå ¬®¦­® ᪮­ä¨£ãà¨à®¢ âì, ­ ¦ ¢ ­  ª­®¯ªã  áâநâì.... +

®¤â¢¥à¦¤¥­¨¥ ¢ë¡®à   à£ã¬¥­â  ¨ § ªàë⨥ ¤¨ «®£  ®áãé¥á⢫ï¥âáï ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

+Š®­ä¨£ãà æ¨ï  à£ã¬¥­â®¢

+ +

„¨ «®£ ª®­ä¨£ãà æ¨¨  à£ã¬¥­â®¢ ¢ë£«ï¤¨â á«¥¤ãî騬 ®¡à §®¬. +

+

‘âப  ¢ ¢¥àå­¥© ç á⨠¤¨ «®£  ¯®§¢®«ï¥â ¡ëáâà® ®â䨫ìâ஢ âì ¢®§¬®¦­ë¥ à¥áãàáë ¯® ­ §¢ ­¨î. Œ®¦­® ¨á¯®«ì§®¢ âì ¯®¤áâ ­®¢®ç­ë¥ è ¡«®­ë: * ®§­ ç ¥â «î¡®¥ ª®«¨ç¥á⢮ ᨬ¢®«®¢ (áâப ) ¨«¨ ¨å ®âáãâá⢨¥, ? ®§­ ç ¥â «î¡®© ᨬ¢®« ¨«¨ ¥£® ®âáãâá⢨¥. ®á«¥ § ¯®«­¥­¨ï ¤ ­­®£® ¯®«ï ¢ ¯®«¥ ‘®¢¯ ¤ î騥 à¥áãàáë ¡ã¤ã⠮⮡ࠦ¥­ë à¥áãàáë á ­ §¢ ­¨¥¬, ᮮ⢥âáâ¢ãî騬 ¢¢¥¤¥­­®¬ã ãá«®¢¨î. € ¯à¨ ¢ë¤¥«¥­¨¨ à¥áãàá  ¢ ¯®«¥ ‚ ¯ ¯ª å ®â®¡à §¨âáï ¥£® ¬¥á⮯®«®¦¥­¨¥. ®á«¥ ¢ë¡®à  à¥áãàá  ¤¨ «®£ § ªà뢠¥âáï ª­®¯ª®© OK. +

+¥¤ ªâ¨à®¢ ­¨¥ ᯨ᪠ ¯¥à¥¬¥­­ëå

+ +

‘¯¨á®ª ¯¥à¥¬¥­­ëå ¬®¦­® ¯®¯®«­¨âì, ­ ¦ ¢ ­  ª­®¯ªã ˆ§¬¥­¨âì ¯¥à¥¬¥­­ë¥.... „«ï ¤®¡ ¢«¥­¨ï ­®¢®© ¯¥à¥¬¥­­®© ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã ‘®§¤ âì... ¢ ¯à ¢®© ç á⨠®âªàë¢è¥£®áï ¤¨ «®£ . +

+

‚ ®âªàë¢è¥¬áï ®ª­¥ ­ã¦­® ¢¢¥á⨠¨¬ï ¯¥à¥¬¥­­®© (¯®«¥ ˆ¬ï), ¥ñ §­ ç¥­¨¥ – ¤¨à¥ªâ®à¨î (¯®«¥ ‡­ ç¥­¨¥) ¨ ®¯¨á ­¨¥ (¯®«¥ Ž¯¨á ­¨¥). Ž¡ï§ â¥«ì­ë¬ ï¥âáï ⮫쪮 ¨¬ï ¯¥à¥¬¥­­®©, ª®â®à®¥ ­¥ ¬®¦¥â ¡ëâì ¨§¬¥­¥­® ¯à¨ । ªâ¨à®¢ ­¨¨ ¯¥à¥¬¥­­®©. ¥à¥¬¥­­ ï ¤®¡ ¢«ï¥âáï ¢ ᯨ᮪ ­ ¦ â¨¥¬ ª­®¯ª¨ OK. +

Œ®¦­® ®â। ªâ¨à®¢ âì §­ ç¥­¨¥ ¨ ®¯¨á ­¨¥ áãé¥áâ¢ãî饩 ¯¥à¥¬¥­­®©, ¢ë¤¥«¨¢ ¥ñ ¢ ᯨ᪥ ¨ ­ ¦ ¢ ª­®¯ªã ¥¤ ªâ¨à®¢ âì,   â ª¦¥ 㤠«¨âì ¯¥à¥¬¥­­ãî, ­ ¦ ¢ ª­®¯ªã “¤ «¨âì. +

+Žá­®¢­ë¥ ã¯à ¢«ïî騥 ª« ¢¨è¨

+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
¥¤ ªâ¨à®¢ ­¨¥  
Ctrl+Z Žâ¬¥­¨âì । ªâ¨à®¢ ­¨¥
Ctrl+Shift+Z ®¢â®à¨âì । ªâ¨à®¢ ­¨¥
Ctrl+Y “¤ «¨âì áâபã
Ctrl+/ ‡ ª®¬¬¥­â¨à®¢ âì/à áª®¬¬¥­â¨à®¢ âì áâப¨
Ctrl+Shift+/ ‡ ª®¬¬¥­â¨à®¢ âì ¢ë¤¥«¥­­®¥
Ctrl+Shift+\ “¡à âì ª®¬¬¥­â à¨©
Ctrl+I Žâª®à४âà¨à®¢ âì ®âáã¯ë ¢ë¤¥«¥­­ëå áâப
Ctrl+Shift+F Žâä®à¬ â¨à®¢ âì ¢ë¤¥«¥­­ë© ⥪áâ
Alt+Shift+‚¢¥àå ‚ë¤¥«¨âì ®¡ê¥¬«î騩 í«¥¬¥­â
Alt+Shift+‚­¨§ ‚®ááâ ­®¢¨âì ¢ë¤¥«¥­¨¥
Ctrl+R ¥à¥¨¬¥­®¢ âì ®¡ê¥ªâ
 
®¨áª  
Ctrl+F Žâªàëâì xFind ¯ ­¥«ì ¯®¨áª 
Ctrl+‚¢¥àå xFind: ¡ëáâà® ­ ©â¨ ¯à¥¤ë¤ã饥 ¢å®¦¤¥­¨¥
Ctrl+‚­¨§ xFind: ¡ëáâà® ­ ©â¨ á«¥¤ãî饥 ¢å®¦¤¥­¨¥
Ctrl+Alt+F „¨ «®£ ¯®¨áª  ¨ § ¬¥­ë
Ctrl+H Œ®¤ã« -2 ¯®¨áª
Ctrl+G  ©â¨ ®¡ê¥­¨ï ¢ë¡à ­­®£® í«¥¬¥­â  ¢ à ¡®ç¥© ®¡« áâ¨
Ctrl+Shift+G  ©â¨ áá뫪¨ ­  ¢ë¡à ­­ë© í«¥¬¥­â ¢ à ¡®ç¥© ®¡« áâ¨
 
 ¢¨£ æ¨ï  
Ctrl+L ¥à¥©â¨ ª áâ®à®ª¥ ¯® ­®¬¥àã
F3 Žâªàëâì ®¡ê¥­¨¥ ¢ë¡à ­­®£® í«¥¬¥­â 
Ctrl+M Žâªàëâì ¬®¤ã«ì ¨§ ᯨ᪠
Ctrl+P Žâªàëâì ¯ à­ë© ¬®¤ã«ì
Alt+Shift+O  §à¥è¨âì/§ ¯à¥â¨âì ®â¬¥ç âì ¢å®¦¤¥­¨ï ®¡ê¥ªâ®¢
 
Š®¬¯¨«ïæ¨ï ¨ § ¯ã᪠ 
F9 Š®¬¯¨«¨à®¢ âì ä ©«
Shift+F9 ‘®¡à âì ¯à®¥ªâ
Ctrl+Shift+F9 ®«­®áâìî ¯¥à¥á®¡à âì ¯à®¥ªâ
Ctrl+F11 ‡ ¯ãáâ¨âì ¯®á«¥¤­îî § ¯ã᪠¢èãîáï ª®­ä¨£ãà æ¨î § ¯ã᪠
F11 ‡ ¯ãáâ¨âì ¯®á«¥¤­îî § ¯ã᪠¢èãîáï ª®­ä¨£ãà æ¨î ¤¥¡ ££¥à 
Ctrl+F9 ‡ ¯ãáâ¨âì ¢ë¡à ­­ë© ¯ ª¥â ®â« ¤ª¨
 
㬥஢ ­­ë¥ § ª« ¤ª¨  
Ctrl+Shift+<æ¨äà > „®¡ ¢¨âì ¨«¨ 㤠«¨âì ᮮ⢥âáâ¢ãîéãî § ª« ¤ªã ¢ ⥪ã饩 áâப¥
Ctrl+<æ¨äà > ¥à¥©â¨ ª ᮮ⢥âáâ¢ãî饩 § ª« ¤ª¥
Ctrl+= ¥à¥©â¨ ª § ª« ¤ª¥
Ctrl+Shift+= „®¡ ¢¨âì ¨«¨ 㤠«¨âì § ª« ¤ªã
 
à®ç¥¥  
Ctrl+O ®ª § âì á奬㠬®¤ã«ï (outline)
F2 ®ª § âì ¢á¯«ë¢ îéãî ª®­â¥ªáâ­ãî ¯®¤áª §ªã
F12 ®ª § âì ª®­â¥ªáâ­ãî ¯®¤áª §ªã
Ctrl+Shift+L ®ª § âì á¯à ¢ªã ¯® ª« ¢¨è ¬
Alt+F9 Œ ªá¨¬¨§¨à®¢ âì/¢®ááâ ­®¢ âì à §¬¥àë ®ª­  । ªâ®à 
Ctrl+Tab ¥à¥ª«î祭¨¥ ­  á«¥¤ãî饥 ®ª­® । ªâ®à 
Ctrl+‘ ¥à¥ª«î祭¨¥ ¬¥¦¤ã ¯ ­¥«ï¬¨
+

+ + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/toc.xml b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/toc.xml new file mode 100644 index 0000000..9c3b892 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/toc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/xds_help_toc.xml b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/xds_help_toc.xml new file mode 100644 index 0000000..fa11be4 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/nl/ru/xds_help_toc.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..9bbe4c7 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0421\u043f\u0440\u0430\u0432\u043a\u0430 \u043f\u043e \u0441\u0440\u0435\u0434\u0435 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c diff --git a/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..0c5de16 --- /dev/null +++ b/product/com.excelsior.xds.help.ce.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ñïðàâêà ïî ñðåäå ðàçðàáîòêè Ìîäóëà-2 ïðîãðàìì diff --git a/product/com.excelsior.xds.help.ce/.project b/product/com.excelsior.xds.help.ce/.project new file mode 100644 index 0000000..60ca595 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/.project @@ -0,0 +1,22 @@ + + + com.excelsior.xds.help.ce + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/product/com.excelsior.xds.help.ce/META-INF/MANIFEST.MF b/product/com.excelsior.xds.help.ce/META-INF/MANIFEST.MF new file mode 100644 index 0000000..3b647ea --- /dev/null +++ b/product/com.excelsior.xds.help.ce/META-INF/MANIFEST.MF @@ -0,0 +1,7 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.help.ce; singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin diff --git a/product/com.excelsior.xds.help.ce/build.properties b/product/com.excelsior.xds.help.ce/build.properties new file mode 100644 index 0000000..68a6760 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/build.properties @@ -0,0 +1,5 @@ +bin.includes = plugin.xml,\ + META-INF/,\ + html/,\ + *.xml,\ + plugin.properties diff --git a/product/com.excelsior.xds.help.ce/contexts.xml b/product/com.excelsior.xds.help.ce/contexts.xml new file mode 100644 index 0000000..58dcbc0 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/contexts.xml @@ -0,0 +1,256 @@ + + + + + +  ­¥«¨ ¯à¥¤­ §­ ç¥­ë ¤«ï ¯à¥¤®áâ ¢«¥­¨ï ¨­ä®à¬ æ¨¨ ®¡ ®¡ê¥ªâ¥, á ª®â®àë¬ ¯®«ì§®¢ â¥«ì à ¡®â ¥â ¢ ¤ ­­ë© ¬®¬¥­â, ¨ ¨§¬¥­¥­¨¨ ¥£® ᢮©áâ¢. + + + + + +  ­¥«ì Project Explorer ¯®§¢®«ï¥â ã¯à ¢«ïâì ᮤ¥à¦¨¬ë¬ ⥪ã饩 à ¡®ç¥© ®¡« áâ¨. + + + + + + + ¥¤ ªâ®à ¯à¥¤áâ ¢«ï¥â ᮡ®© ¨­áâà㬥­â ¤«ï ¯à®á¬®âà  ¨ । ªâ¨à®¢ ­¨ï ä ©«®¢ ¯à®¥ªâ . „«ï ª ¦¤®£® ä ©«  ᮧ¤ ¥âáï ᢮© íª§¥¬¯«ïà । ªâ®à . + + + + + + + â®â ¤¨ «®£ ¯®§¢®«ï¥â ã¯à ¢«ïâì ¯ à ¬¥âà ¬¨ ¯®¤¤¥à¦ª¨ ï§ëª  Œ®¤ã« -2. + + + + + + + + „¨ «®£ ã¯à ¢«¥­¨ï ¯ à ¬¥âà ¬¨ Œ®¤ã« -2 ª®­á®«¨. + + + + + + + + „¨ «®£ ã¯à ¢«¥­¨ï ¯ à ¬¥âà ¬¨ Œ®¤ã« -2 । ªâ®à . + + + + + + + + + + „¨ «®£ ã¯à ¢«¥­¨ï à áªà áª®© ⥪áâ  Œ®¤ã« -2 । ªâ®à . + + + + + + + + „¨ «®£ ã¯à ¢«¥­¨ï è ¡«®­ ¬¨ Œ®¤ã« -2 । ªâ®à . + + + + + + + + + „¨ «®£ । ªâ¨à®¢ ­¨ï ᨭ⠪á¨ç¥áª¨å ª®­áâàãªæ¨©. + + + + + + + + „¨ «®£ ã¯à ¢«¥­¨ï ᯨ᪮¬ ãáâ ­®¢«¥­­ëå SDK ¨ ¨å ᢮©á⢠¬¨. + + + + + + + +  áâனª  ä®à¬ â¨à®¢ ­¨ï. + + + + + +  áâனª  ¯ ­¥«¨ ¡ëáâண® ¯®¨áª . + + + + + + + Œ áâ¥à ­ áâனª¨ Š‘. + + + + + + + Œ áâ¥à ­ áâனª¨ Š‘. ‡ ª« ¤ª  ‘। . „®¡ ¢«¥­¨¥ ¯¥à¥¬¥­­®© á।ë. + + + + + + +  ¡®â  á ¯¥à¥¬¥­­ë¬¨. + + + + + + + ¥¤ ªâ¨à®¢ ­¨¥ ᯨ᪠ ¯¥à¥¬¥­­ëå. + + + + + + + Š®­ä¨£ãà æ¨ï  à£ã¬¥­â®¢. + + + + + + Œ áâ¥à ­ áâனª¨ ¨­áâà㬥­â  Š‘. + + + + + + + ¥¤ ªâ¨à®¢ ­¨¥ ᢮©á⢠¯à®¥ªâ . + + + + + + + + â®â ¤¨ «®£ ¨á¯®«ì§ã¥âáï ¤«ï ⮣® çâ®¡ë ¢ë¡à âì à¥áãàáë, ª®â®àë¥ ­¥®¡å®¤¨¬® á®åà ­¨âì ¯¥à¥¤ ª®¬¯®­®¢ª®© ¯à®¥ªâ . +Žâ¬¥­  í⮣® ¤¨ «®£  ®â¬¥­ïâ ª®¬¯®­®¢ªã ¯à®¥ªâ . + + + + + + + + + + Š®­ä¨£ãà æ¨¨ï § ¯ã᪠ ¯à¨«®¦¥­¨ï + + + + + + + Š®­ä¨£ãà æ¨¨ï § ¯ã᪠ ¯ ª¥â  ®â« ¤ª¨ + + + + + + + + „¨ «®£ ᮧ¤ ­¨ï ­®¢ëå í«¥¬¥­â®¢. + + + + + + + ‘®§¤ ­¨¥ ­®¢®£® Œ®¤ã« -2 ¬®¤ã«ï + + + + + + + + + ‘®§¤ ­¨¥ ­®¢®£® ¯à®¥ªâ  + + + + + + + ‘®§¤ ­¨¥ ­®¢®£® ¯à®¥ªâ  ¤«ï áãé¥áâ¢ãî饣® ª®¤  + + + + + + + + Žâªàë⨥ à¥áãàá  + + + + + + + Žâªàë⨥ ¬®¤ã«ï + + + + diff --git a/product/com.excelsior.xds.help.ce/html/pics/AvailableSoftwareSites.png b/product/com.excelsior.xds.help.ce/html/pics/AvailableSoftwareSites.png new file mode 100644 index 0000000..db64921 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/AvailableSoftwareSites.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/AvailableUpdates.png b/product/com.excelsior.xds.help.ce/html/pics/AvailableUpdates.png new file mode 100644 index 0000000..97e8456 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/AvailableUpdates.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationArguments.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationArguments.png new file mode 100644 index 0000000..1ab7bf0 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationArguments.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationCommon.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationCommon.png new file mode 100644 index 0000000..9f941e5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationCommon.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironment.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironment.png new file mode 100644 index 0000000..65ee4a3 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironment.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentNew.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentNew.png new file mode 100644 index 0000000..280b339 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentNew.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentSelect.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentSelect.png new file mode 100644 index 0000000..c4cba3e Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationEnvironmentSelect.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationSDKSettings.png b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationSDKSettings.png new file mode 100644 index 0000000..94233a0 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/CreateConfigurationSDKSettings.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/DebugScriptMain.png b/product/com.excelsior.xds.help.ce/html/pics/DebugScriptMain.png new file mode 100644 index 0000000..9c4664b Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/DebugScriptMain.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/DebugScriptSDKSettings.png b/product/com.excelsior.xds.help.ce/html/pics/DebugScriptSDKSettings.png new file mode 100644 index 0000000..9333bbe Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/DebugScriptSDKSettings.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/FormatterIndent.png b/product/com.excelsior.xds.help.ce/html/pics/FormatterIndent.png new file mode 100644 index 0000000..f808f0f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/FormatterIndent.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/FormatterLinewrap.png b/product/com.excelsior.xds.help.ce/html/pics/FormatterLinewrap.png new file mode 100644 index 0000000..880591f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/FormatterLinewrap.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/FormatterNewline.png b/product/com.excelsior.xds.help.ce/html/pics/FormatterNewline.png new file mode 100644 index 0000000..4ede204 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/FormatterNewline.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/FormatterPrefs.png b/product/com.excelsior.xds.help.ce/html/pics/FormatterPrefs.png new file mode 100644 index 0000000..1d9af81 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/FormatterPrefs.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/FormatterWhitespace.png b/product/com.excelsior.xds.help.ce/html/pics/FormatterWhitespace.png new file mode 100644 index 0000000..728c437 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/FormatterWhitespace.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/IndentGuideExample.png b/product/com.excelsior.xds.help.ce/html/pics/IndentGuideExample.png new file mode 100644 index 0000000..df4076e Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/IndentGuideExample.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponents.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponents.png new file mode 100644 index 0000000..2b71455 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponents.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsAddTool3Way.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsAddTool3Way.png new file mode 100644 index 0000000..ce30b7f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsAddTool3Way.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsExtraTools.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsExtraTools.png new file mode 100644 index 0000000..6bda783 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsExtraTools.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsMessage.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsMessage.png new file mode 100644 index 0000000..0e478da Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditComponentsMessage.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironment.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironment.png new file mode 100644 index 0000000..371fd1e Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironment.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironmentNew.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironmentNew.png new file mode 100644 index 0000000..7acbb93 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditEnvironmentNew.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditTemplates.png b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditTemplates.png new file mode 100644 index 0000000..8bc0488 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/InstalledSDKsEditTemplates.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/NewElement.png b/product/com.excelsior.xds.help.ce/html/pics/NewElement.png new file mode 100644 index 0000000..f6d7415 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/NewElement.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/NewModulaModule.png b/product/com.excelsior.xds.help.ce/html/pics/NewModulaModule.png new file mode 100644 index 0000000..d07772e Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/NewModulaModule.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/NewModulaModuleSource.png b/product/com.excelsior.xds.help.ce/html/pics/NewModulaModuleSource.png new file mode 100644 index 0000000..1ee401a Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/NewModulaModuleSource.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/OpenModule.png b/product/com.excelsior.xds.help.ce/html/pics/OpenModule.png new file mode 100644 index 0000000..b4dcd34 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/OpenModule.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/OpenResource.png b/product/com.excelsior.xds.help.ce/html/pics/OpenResource.png new file mode 100644 index 0000000..d592177 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/OpenResource.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PrefAvailableUpdates.png b/product/com.excelsior.xds.help.ce/html/pics/PrefAvailableUpdates.png new file mode 100644 index 0000000..1953e1c Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PrefAvailableUpdates.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesConsole.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesConsole.png new file mode 100644 index 0000000..9fca668 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesConsole.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesEditor.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesEditor.png new file mode 100644 index 0000000..1bab2d6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesEditor.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesIndentGuide.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesIndentGuide.png new file mode 100644 index 0000000..b435ece Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesIndentGuide.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesSpelling.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesSpelling.png new file mode 100644 index 0000000..ded340b Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesSpelling.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesSyntaxColoring.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesSyntaxColoring.png new file mode 100644 index 0000000..1debb5a Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesSyntaxColoring.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplates.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplates.png new file mode 100644 index 0000000..858eacf Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplates.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplatesEdit.png b/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplatesEdit.png new file mode 100644 index 0000000..f44a04e Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PreferencesTemplatesEdit.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/PropertiesXDSModula2.png b/product/com.excelsior.xds.help.ce/html/pics/PropertiesXDSModula2.png new file mode 100644 index 0000000..b63913c Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/PropertiesXDSModula2.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/Restart.png b/product/com.excelsior.xds.help.ce/html/pics/Restart.png new file mode 100644 index 0000000..3da2acf Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/Restart.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/SecurityWarning.png b/product/com.excelsior.xds.help.ce/html/pics/SecurityWarning.png new file mode 100644 index 0000000..9a88c18 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/SecurityWarning.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/SelectVariable.png b/product/com.excelsior.xds.help.ce/html/pics/SelectVariable.png new file mode 100644 index 0000000..65231a6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/SelectVariable.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/SelectVariableArgumentConfigure.png b/product/com.excelsior.xds.help.ce/html/pics/SelectVariableArgumentConfigure.png new file mode 100644 index 0000000..7883cd4 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/SelectVariableArgumentConfigure.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/SelectVariableEditVariables.png b/product/com.excelsior.xds.help.ce/html/pics/SelectVariableEditVariables.png new file mode 100644 index 0000000..a92d6e5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/SelectVariableEditVariables.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/ToggleXBookmark.png b/product/com.excelsior.xds.help.ce/html/pics/ToggleXBookmark.png new file mode 100644 index 0000000..a8423bf Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/ToggleXBookmark.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplAfterApply.png b/product/com.excelsior.xds.help.ce/html/pics/TplAfterApply.png new file mode 100644 index 0000000..7e7a295 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplAfterApply.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplEdit.png b/product/com.excelsior.xds.help.ce/html/pics/TplEdit.png new file mode 100644 index 0000000..ced6ad5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplEdit.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplInserted.png b/product/com.excelsior.xds.help.ce/html/pics/TplInserted.png new file mode 100644 index 0000000..5cfde2f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplInserted.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplPopup.png b/product/com.excelsior.xds.help.ce/html/pics/TplPopup.png new file mode 100644 index 0000000..984862f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplPopup.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplSelBefore.png b/product/com.excelsior.xds.help.ce/html/pics/TplSelBefore.png new file mode 100644 index 0000000..1948658 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplSelBefore.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/TplWithComments.png b/product/com.excelsior.xds.help.ce/html/pics/TplWithComments.png new file mode 100644 index 0000000..f90b1fc Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/TplWithComments.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/UpdatesDetails.png b/product/com.excelsior.xds.help.ce/html/pics/UpdatesDetails.png new file mode 100644 index 0000000..d7eba07 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/UpdatesDetails.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/UpdatesLicenses.png b/product/com.excelsior.xds.help.ce/html/pics/UpdatesLicenses.png new file mode 100644 index 0000000..aad22df Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/UpdatesLicenses.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/UpdatesMessage.png b/product/com.excelsior.xds.help.ce/html/pics/UpdatesMessage.png new file mode 100644 index 0000000..4ffd7c5 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/UpdatesMessage.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/createDebugScript.png b/product/com.excelsior.xds.help.ce/html/pics/createDebugScript.png new file mode 100644 index 0000000..5e6aaae Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/createDebugScript.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.gif b/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.gif new file mode 100644 index 0000000..4e7ae9a Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.gif differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.png b/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.png new file mode 100644 index 0000000..3f7b962 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/createconfiguration.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/debugbutton.png b/product/com.excelsior.xds.help.ce/html/pics/debugbutton.png new file mode 100644 index 0000000..14f13a6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/debugbutton.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/editor.png b/product/com.excelsior.xds.help.ce/html/pics/editor.png new file mode 100644 index 0000000..9f63790 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/editor.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/existingproject.png b/product/com.excelsior.xds.help.ce/html/pics/existingproject.png new file mode 100644 index 0000000..49232a2 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/existingproject.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/goToXBookmark.png b/product/com.excelsior.xds.help.ce/html/pics/goToXBookmark.png new file mode 100644 index 0000000..f2367cd Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/goToXBookmark.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/newproject.png b/product/com.excelsior.xds.help.ce/html/pics/newproject.png new file mode 100644 index 0000000..21e95dd Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/newproject.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/preferences.png b/product/com.excelsior.xds.help.ce/html/pics/preferences.png new file mode 100644 index 0000000..f6e34f0 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/preferences.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/projectexplorer.png b/product/com.excelsior.xds.help.ce/html/pics/projectexplorer.png new file mode 100644 index 0000000..cf3358f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/projectexplorer.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/runbutton.png b/product/com.excelsior.xds.help.ce/html/pics/runbutton.png new file mode 100644 index 0000000..e938e17 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/runbutton.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/runconfiguration.png b/product/com.excelsior.xds.help.ce/html/pics/runconfiguration.png new file mode 100644 index 0000000..808623f Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/runconfiguration.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/showproblems.png b/product/com.excelsior.xds.help.ce/html/pics/showproblems.png new file mode 100644 index 0000000..f19c74b Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/showproblems.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/userinterfacenum.png b/product/com.excelsior.xds.help.ce/html/pics/userinterfacenum.png new file mode 100644 index 0000000..0bbce2b Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/userinterfacenum.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/xFindPanel.png b/product/com.excelsior.xds.help.ce/html/pics/xFindPanel.png new file mode 100644 index 0000000..92f0456 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/xFindPanel.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/xFindPoupMenu.png b/product/com.excelsior.xds.help.ce/html/pics/xFindPoupMenu.png new file mode 100644 index 0000000..b1d34f9 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/xFindPoupMenu.png differ diff --git a/product/com.excelsior.xds.help.ce/html/pics/xFindPreferences.png b/product/com.excelsior.xds.help.ce/html/pics/xFindPreferences.png new file mode 100644 index 0000000..a9f76b6 Binary files /dev/null and b/product/com.excelsior.xds.help.ce/html/pics/xFindPreferences.png differ diff --git a/product/com.excelsior.xds.help.ce/html/xds_help.html b/product/com.excelsior.xds.help.ce/html/xds_help.html new file mode 100644 index 0000000..3dc5e0a --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help.html @@ -0,0 +1,9 @@ + + + + +User Guide + + + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help000.html b/product/com.excelsior.xds.help.ce/html/xds_help000.html new file mode 100644 index 0000000..c50a86f --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help000.html @@ -0,0 +1,153 @@ + + + + +User Guide + + +  +

+

+

+

+

+

+

+

+

+

+

+

+

+

XDS Family of Products +

+

XDS Modula-2 IDE +

for Microsoft Windows +

Version 1.7.0 +

User Guide +

Excelsior, LLC +

http://www.excelsior-usa.com +

+

Copyright © 2001-2016 Excelsior, LLC. All rights reserved. +

Information in this document is subject to change without notice and does not represent a commitment on the part of Excelsior, LLC. +

Excelsior’s software and documentation have been tested and reviewed. Nevertheless, Excelsior makes no warranty or representation, either express or implied, with respect to the software and documentation included with Excelsior product. In no event will Excelsior be liable for direct, indirect, special, incidental or consequential damages resulting from any defect in the software or documentation included with this product. In particular, Excelsior shall have no liability for any programs or data used with this product, including the cost of recovering programs or data. +

XDS Modula-2 IDE is a trademark of Excelsior, LLC. +

Microsoft, Windows 95, Windows NT are either registered trademarks or trademarks of Microsoft Corporation. +

All trademarks and copyrights mentioned in this documentation are the property of their respective holders. +

+

+

+


+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
0000000000000000000000000000
Getting started +
IDE installation and start +
Add SDK +
First steps +
Create new project +
Create project from existing sources +
Build project +
Run program +
Debug program +
Basic concepts +
Worspace +
Project +
Resources +
Plugin +
User interface +
Workbench +
Perspectives +
Editor +
Views +
Project Explorer +
Wizard +
Navigation +
Numbered Bookmarks +
Open resource +
xFind +
Parameters +
XDS Modula-2 +
Console +
Editor +
Registered SDKs +
Code style +
Formatter +
General +
Spelling +
Resource properties +
Modula-2 project properties +
Usage +
Create new elements +
New project from scratch +
Create project from existing sources +
New Modula-2 module +
Edit SDK +
Edit SDK wizard +
Edit tool dialog +
Launch configurations +
Edit launch configurations +
Select folder or file +
Working with variables +
Configure arguments +
Edit variables +
Keyboard map +
+
+ + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help001.html b/product/com.excelsior.xds.help.ce/html/xds_help001.html new file mode 100644 index 0000000..80d5024 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help001.html @@ -0,0 +1,39 @@ + + + + +Getting started + + + +

+Getting started

+ +

XDS Modula-2 integrated development environment (XDS Modula-2 IDE) is used for the Modula-2 source code editing and interation of various Modula-2 tools and utilites into the single environment. +

XDS Modula-2 IDE is implemented as a number of Eclipse platform plugins. IDE itself doesnot includes Modula-2 development tools like compiler, debugger, etc. Instead IDE integrates with already installed development systems (SDK). +

IDE uses its own project system comprised of: Workspaces (Workspace), Projects (Projects) and Resources (Resources). +

Each workspace can contain one or more XDS IDE projects. It is possible to cluster projects into a number of groups and apply different settings to each of these group. +

It is possible to create an arbitrary number of workspaces. However, each launched instance of XDS IDE works only with the one workspace at the moment, and locks used worspace making it inaccessible for the other XDS IDE instances. Switching between workspaces restarts the IDE. +

+IDE installation and start

+ +

IDE is distributed as the ZIP-archive. To instal the IDE unpack the archive to the local directory of your PC. Your PC hard drive should have at least 300 MB of free disk space. +

No extra actions necessary. ZIP archive contains all required IDE components. +

To start IDE start xds-ide.exe file from the installation directory. After IDE startup the XDS Modula-2 projection will open. This projection is configured to +

support the Modula-2 development. +

After the first launch workspace is created at the %USERPROFILE%\xds-workspace – user home subfolder. +

By default subsequent launches will open last opened workspace and perspective. +

+Add SDK

+ +

IDE allows adding and usage of several development systems (SDKs). Development system should be installed locally or to the network drive. +

To add SDK open the Preferences dialog by clicking Window > Preferences at the main menu. The select at the dialog left pane XDS Modula-2 > Registered SDKs. After that press the Add button at +

the dialog right and select the SDK folder. +

+

When the selected SDK is configured to be used with the IDE (i.e. SDK root folder contains the sdk.ini) then the installed SDK list will show the new added SDK record. +

If the sdk.ini file is absent then manual SDK configuration wizard will show up. One can always open the SDK configuration wizard by selecting the SDK in the list and pressing the Edit button. +

After the applying changes by pressing the OK button IDE is all set for the Modula-2 development. +

IDE allows usage of several SDKs at a time. Each SDK is given a unique name. In the cast of name conflict number suffix is used to resolve it. +

Checkboxed SDK is the default development system. It is used in the case no SDK have been selected for the given project. + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help002.html b/product/com.excelsior.xds.help.ce/html/xds_help002.html new file mode 100644 index 0000000..b1a7a24 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help002.html @@ -0,0 +1,71 @@ + + + + +First steps + + + +

+First steps

+ +

+Create new project

+ +

To create the new project select File > New > Modula-2 Project at the main menu. In the opened wizard specify new +

project parameters. +

+

Specify new project name (Project Name field). +

Then specify project root directory location:(Project root). +

Select the project SDK (Project SDK field): Unless otherwise indicated the default SDK is used. The Configure... button will open the SDK settings dialog. +

One can create main module or project file, standard directory structure and redirection file. If Use SDK templates is checked then SDK templates will be used to create the files. Directory structure and redirection file name are also taken from the selected SDK settings. +

Pressing the Finish button will create the new Modula-2 project and add it to the workspace. Newly created files and directories will show up in the Project Explorer. +

+Create project from existing sources

+ +

To create project from existing sources select File > New > Modula-2 Project from Existing Sources in the main menu. Specify project settings in the wizard opened. +

+

You can explicitly specify the new project name or it will be set automatically after the project root directory selection (Project root field). +

Select the project SDK (Project SDK field): Unless otherwise indicated the default SDK is used. The Configure... button will open the SDK settings dialog. +

Specify whether project file (Project File field) or main module (Main module) is used for the source build. One can select project file *.prj or main module file (*.mod or *.ob2) by pressing Browse... button. +

Pressing the Finish button will create the new Modula-2 project and add it to the workspace. Newly created files and directories will show up in the Project Explorer. +

+Build project

+ +

To compile project select it in the Project Explorer view and the click Project > Build Project or Project > Rebuild Project in the main menu. First +

compiles the project incrementally while the second rebuilds the project from scratch. These commands also can be invoked via the project element context menu at the Project Explorer view or by using hot key combinations Shift + F9 or Ctrl + Shift + F9 respectfully. +

Compiler errors and warnings show up in the Problems view. By default markers are shown for all open projects in the IDE. To restrict markers to be shown for the single project select Show > Error/Warnings on Project item in the toolbar. +

+

+Run program

+ +

To run the Modula-2 program create the (Run Configuration). Run configuration specifies the project, executable file path and optional launch parameters for the program. +

To create run configuration select Run > Run Configurations... in the main menu and specify run configuration parameters. +

In the opened dialog select XDS Modula-2 Application in the left pane, open context menu with the right mouse +

click and select New. +

+

New run configuration will be created and right pane will show run configuration editor. +

+

Type run configuration name in the Name field. +

Select target workspace project for this run configuration and executable file for the launch. Apply button saves changes for the edited run configuration, Revert button reverts run configuration parameters to the last saved state. +

Other tabs allow to set additional optional run configuration parameters. +

After filling up mandatory fields press the Run button to launch the program. +

Once created launch configuration can be used again. To do this select it from the Main menu dropdown: Run > Run History. +

The majority of launch actions for the progam is available via the Run toolbar button: +

+

This button shows the list of last invoked last configurations and their corresponding edit actions. Progam standard output and standard error will show up in the Console view. +

+Debug program

+ +

To launch Modula-2 program in debug mode create (Debug Configuration) or use already existent Run Configuration. +

To create the Debug Configuration select Run > Debug Configurations... in the main menu. In the opened dialog select XDS Modula-2 Application in the left pane, open context menu with the right mouse +

click and select New. +

Type run configuration name in the Name field. +

Other fields can be filled the same way as for the Run Configuration. +

After filling up mandatory fields press the Debug button to launch the program in the Debug mode. +

Once created Debug configuration can be used again. To do this select it from the Main menu dropdown: Debug > Debug History. +

The majority of launch actions for the progam is available via the Debug toolbar button: +

+

This button shows the list of last invoked last configurations and their corresponding edit actions. + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help003.html b/product/com.excelsior.xds.help.ce/html/xds_help003.html new file mode 100644 index 0000000..a58bc86 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help003.html @@ -0,0 +1,54 @@ + + + + +Basic concepts + + + +

+Basic concepts

+ +

The XDS Modula-2 Integrated Development Environment (XDS Modula-2 IDE) is based on the Eclipse platform. Eclipse is the open-source IDE platform simplifying such tasks as resource management, program launching, editing and debugging. +

This chapter describes common idioms of the Eclipse platform, leveraged by the XDS Modula-2 IDE. +

+Worspace

+ +

Worspace – first of all, this is a project container. Besides, it contains settings used by the IDE components and auxilary data. Workspace is the directory containing project subdirectories. Special .metadata subdirectory is used as the common data and settings storage, used by this workspace projects. +

It is possible to have an arbitrary number of workspaces. However only one workspace can be opened in the IDE at the given moment. +

On the first launch the workspace is created in the user‘s home directory. To create new workspaces and switch between them select File > Switch Workspace > Other.... Then select the workspace folder. If the folder selected doesnot contain the workspace it will be created there. +

On IDE start last opened workspace is loaded by default. It is possible to force workspace selection dialog on IDE start. For this open Preferences, by clicking Window > PreferencesPreferences, then select in the left pane General > Startup and Shutdown >Workspaces and turn on the option Prompt for workspace on startup. +

When using several workspaces sometimes it is necessary to synchronize their settings. For this please use File > Export... > General > Preferences in the source workspace and then File > Import... > General > Preferences for the target workspace. +

It is possible to explicitly specify workspace on IDE startup by using the following command line: +

-data WorkspacePath +

where WorkspacePath is the required argument specifying path to the workspace. +

Another command line parameter turns on the workpace path display in the IDE‘s main window title: +

-showlocation [WorkspaceName] +

where WorkspaceName is the required argument specifying label to be displayed in the main window title instead of the workspace path displayed by default. +

+Project

+ +

Project – is the resource container, containing folders and files, their processing rules and other project properties (such as the compiler settings). Physically it is the directory whose files and folders are the project‘s resources. When creating project it is necessary to specify where to place it on the file system. +

In the project‘s directory special file named .project is created. This directory also contains .settings folder used as project properties storage. Usually, IDE stores other auxilary files and folders with names starting with the "." symbol. +

There is no one-to-one correspondence between XDS project files (*.prj-files) and IDE projects. XDS project files are just particular kind of the XDS IDE resources. XDS IDE project can contain several prj-files. +

It is not necessary to place the project inside the workspace. +

It is recommended to place XDS IDE project in the same folder as the Modula-2 program folder. In particular, this simplfies the transfer of the project between workspaces. +

In order to import the existing project in to the workspace on can use File > Import... > General > Existing Projects into Workspace. +

It is assumed by default that all project resources are stored inside the project‘s folder. +

To use resources outside the project‘s folder it is necessary to add them via the so called Linked Resources mechanism. +

+Resources

+ +

Resources – this is general term for projects, folders and files operated by the integrated environment. IDE‘s files and folders corresponds to the usual files and folders of the file system. Folders can contain files and other foldes but not projects. Folders themselves contained in projects and other folders. +

Files and folders can be linked to files and folders outside the project‘s directory. These files and folders are called linked resources. +

Navigational panels, such as Project Explorer display hierarchical structure of the resources and facilitates resource opening and editing. Besides files and folders navigational panels can display virtual folders which are not correspond to any real file system directory. +

See also +

Resource properties
+ New element creation
+ Project +

+Plugin

+ +

The key feature of the Eclipse platform is flexibility and extensibility enabled by the platform modular architecture. Beside the compact runtime core all platform‘s components and Eclipse-based IDE are Plugins. These plugins are dynamically loaded independently of each other. Certanly, it is possible to specify for the plugin which plugins are dependendant from it - and thus must be loaded before. Platform runtime core locates and integrates plugins in to the running platform. In this regard standard and newly created plugins are functionaly equivalent. + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help004.html b/product/com.excelsior.xds.help.ce/html/xds_help004.html new file mode 100644 index 0000000..dcb4d48 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help004.html @@ -0,0 +1,128 @@ + + + + +User interface + + + +

+User interface

+ +

Main elements of the user interface are shown in the picture below: +

+

Main elements are: +

    + +
  1. Workbench – container containing all other windows. It contains main menu, toolbars and child windows.
  2. +
  3. Perspective – visual container for Views and Editors related to the certain task. The picture shows XDS Modula-2 perspective - it is shown in the upper left label atop the +

    toolbar. This perspective is used to develop Modula-2 programs.

  4. +
  5. View – visual container used to render the current selection. The picture shows the Problems view which renders the problems for the current selection.
  6. +
  7. Short Cut Bar – shortcuts to access certain perspectives.
  8. +
  9. Menu Bar – the set of context-dependent actions invoking certain functionality.
  10. +
  11. Tool Bar – the set of context-dependent actions invoking certain functionality. All toolbar actions are also accessible via the Menu.
  12. +
  13. Editor – instrument to edit the project resources. Unlike the View the contents of the Editor are defined during the open action, for example, when user double clicks the source file.
  14. +
  15. Project Explorer – view which for the management of project and resources. This view is described separately.
  16. +
  17. Status Bar – special workbench element which is used to show extra information, such as: document parameters, hints, etc. The picture shows the Status bar for the active Editor.
  18. +
+ +

Editors and views are child windows of the Workbench. Child windows can be active and inactive but only one child windows can be active at the given moment. Active window has its title highlighted. The active window contents are usualy the target for the Copy, Cut and Paste operations. It is the active window on which the Status bar is dependent from. Views can show information from the last active editor, if there no any active editor at the moment. +

One can cycle through the workbench windows using the Ctrl + ~ hotkey. +

Lets descrive some main elements in details. +

+Workbench

+ +

Workbench – is the main window of the IDE which introduces the framework for managing and navigating workspace resources. +

Workbench can be rearranged using one of the several perspectives, which are govern the layout of views and editors, organizing them in a way most appropriate for the certain task. +

+Perspectives

+ +

Perspective (Perspective) defines the set and the layout of views, editors, menu items and other elements visible to user. Perspective can have an arbitrary number of views and editors. There can be any number of perspectives, but workbench can have only one active perspective at a time. To see all available perspectives select Window > Open Perspective > Other... in the main +

menu. +

Main purpose of the perspective is to give user the most appropriate set of tools for the particular task, so all necessary tools will be at hand. +

It is possible to restore the initial layout of the perspective by selecting Window > Reset Perspective... at the main menu. +

+Editor

+ +

Editor is used to render and edit the resource (usualy file) contents. For each file the separate instance of editor is created. +

Changes done in the editor are not commited to underlying file until the save command is invoked. +

The editor‘s title contans the * symbol in it when the editor contents is modified but is not written to file. +

+

One can cycle through the editors using the Ctrl + Tab hotkey. +

+Views

+ +

Views usualy provide information about the selected object or element. Some views provide global information, like state of the file system (Project Explorer). +

Unlike editors, views immediately apply changes to the object being edited. For example, Project Explorer lacks the Save command – user action +

like file copy or rename are immediately affect the corresponding resources. However, few views violate this agreement and require explicit save action from user. +

Every view can be closed and then reopened via the Window > Show View > Others... main menu command. +

+Project Explorer

+ +

Project Explorer renders resources from a project of the current Workspace as the tree-like structure. This view allows: +

    + +
  • navigate through files and folders of a project,
  • +
  • open editors for files,
  • +
  • Create new projects, files, folders,
  • +
  • delete, rename or move existent files/folders,
  • +
  • conduct import/export of projects and settings.
  • +
+ +

Files selected in the Project Explorer can immediately affect contents of other IDE views. +

Context menu can be opened for any Project Explorer element by right clicking this element. Context menu allows to view/edit element properties. +

For Modula-2 prjects only Modula-2 source files and packet files are shown – that is, files with the following extensions: *.mod, *.def, *.prj, *.pkt, *.res and *.ldp. Other files are filtered out. To see all files select Show All Files action in the Project Explorer action bar. +

+

Modula-2 files which are included in the project compilation set are marked with green dot in the file icon‘s upper right corner. Besides, next to the file name used project file or main module name is shown. +

Modula-2 files which are not children of project directory are included in the External Dependencies virtual folder. +

If SDK is set to show definition modules then SDK Library virtual folder will show definition module resources. +

+Wizard

+ +

Wizards are used for the step by step configuration of various parameters. +

Typical example of wizard is on the picture below: +

+

+Navigation

+ +

+Numbered Bookmarks

+ +

Numbered bookmarks are used for the quick navigation in editors. +

To set bookmark in the current line press Ctrl + Shift + <Number>, where <Number> – is an arbitrary digit from 0 to 9. So it is possible to set maximum 10 numbered bookmarks. When setting the bookmark, if the digit is already assigned to the other bookmark then the digit will be re-assigned to the new bookmark. If press Ctrl + Shift + <Number> once again – bookmark will be deleted. Press Ctrl + <Number> to jump on the particular numbered bookmark. To see all numbered bookmarks press Ctrl + =. +

+

Select bookmark with the cursor key and press Enter to open the bookmark location (new editor may open). +

The particular bookmark can reassigned or delete with the Ctrl + Shift + = hotkey. +

+

To remove all bookmarks select Navigate > xBookmarks > Remove All xBookmarks in the main menu. +

+Open resource

+ +

To quickly open workspace resource use the Ctrl + Shift + R combination. +

+

Dialog will show all workspace resources (including filtered out in Project Explorer). +

Text field atop allows to filter resources by name. Wildcards are supported : * stands for the arbitrary string, ? stands for the single character or emptry string. +

To select the Modula-2 module use Ctrl + M hotkey. +

+

+xFind

+ +

To search through the editor contents use xFind panel. It can be invoked with Ctrl + F hotkey. +

Atop the editor text field will appear, input the search pattern there. It is possible to change the panel placement in the settings. +

+

Default Eclipse search dialog can be opened with the Ctrl+Alt+F combination. +

Press Esc to close the panel. +

For now, xFind panel only supports search, to replace use the standard Find/Replace dialog, invoked by the Ctrl + Alt + F hotkey or via the Eclipse main menu. +

After typing the search text use Up/Down or Shift+Enter/Enter to navigate through the occurences. +

If the xFind panel has input focus then Ctrl + Down will show the search history. Shift+Down hotkey will put the next item from the search history in to the text field. +

xFind panel supports all modes of the standard Find/Replace dialog, you can set them in search settings menu: +

+

Besides the xFind panel it is possible to quick find the word. For this just place cursor on the word in the editor and press Ctrl+Up or Ctrl+Down. +

+xFind preferences

+ +

One can access the xFind panel settings using the Preferences dialog on theGeneral > Editors > Text Editors > xFind page. +

+

Here you can select the xFind panel placement in the editor. + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help005.html b/product/com.excelsior.xds.help.ce/html/xds_help005.html new file mode 100644 index 0000000..784de0a --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help005.html @@ -0,0 +1,294 @@ + + + + +Parameters + + + +

+Parameters

+ +

IDE preferences management is done via the Preferences dialog. Select Window > Preferences in the main menu to open this dialog. +

The great number of preferences is supported for the IDE. Preferences are split into groups which are displayed on separate pages. Preference pages in turn are combined into the hierarchial structure displayed in the left pane of the dialog. In the upper part of the dialog filter text field is located which allows quick search of the particular page. +

Press the Apply button to apply changes and continue the preferences edit. To aply changes and close dialog press OK button. Restore Defaults button resets preferences to their defaults. +

+XDS Modula-2

+ +

Modula-2 specific preferences are located in the Preferences dialog on the XDS Modula-2 page and on the pages below: +

+ +

+Console

+ +

Console preferences are located in the Preferences dialog on the XDS Modula-2 > Console. +

+

In the upper part of the dialog there are two checkboxes: +

    + +
  • Show console when building – whether to show console when building;
  • +
  • Always clear before building – whether to clear console before building.
  • +
+ +

Console text color page specify color key for the various message types, text and background coloring. The color list is as follows: +

    + +
  • Error message – error message color;
  • +
  • Warning message – warning message color;
  • +
  • Error notification – error notification color;
  • +
  • Information message – ènformation message color;
  • +
  • Output text – standard output color;
  • +
  • Input text – standard input color;
  • +
  • Background color – background color.
  • +
+ +

To change color left click on the corresponding rectangle then select preferred color in the standard color selection dialog and press the OK color. +

+Editor

+ +

Modula-2 editor preferences are located in the Preferences dialog on the XDS Modula-2 > Editor and on pages below: +

+ +

+

By checking Highlight matching brackets it is then possible to specify what colors should be used to highlight matched and unmatched brackets (brackets, parenthesis and angle brackets) in the code. The colors being specified: +

    + +
  • for the matched brackets – Matched brackets highlight color;
  • +
  • for the unmatched brackets – Unmatched brackets highlight color.
  • +
+ +

Highlight operators structure checkbox turns on token highlighting for the tokens belonging to the same language construct. Highlight color is specified in the Operators structure highlight color. +

Highlight inactive code checkbox turns on highlighting of the code excluded by the compiler pragmas. Highlight color is specified on the Syntax Coloring page. +

To change the text editor font size go to the page General > Appearance > Colors and Fonts +

, select Basic > Text Font and press the Edit... button. +

+Indent Guides

+ +

The page XDS Modula-2 > Editor > Indent Guides contains preferences for the indent guide display. +

+

Indent guides are vertical lines displaying the program code structure, see the picture: +

+

Indent guide display can be turned off by the checkbox Show vertical indent guides. +

The following parameters can be specified: +

    + +
  • Alpha – value in [0..255] - line alpha parameter, where 0 - line is transparent, 255 - line is opaque;
  • +
  • Style – line display style;
  • +
  • Width – line thickness, [1..8] pixels;
  • +
  • Shift – horizontal line displacement, [1..8] pixels;
  • +
  • Color – line color;
  • +
+ +

+Syntax Coloring

+ +

The page XDS Modula-2 > Editor > Syntax Coloring allows to specify colors and stylings employed in +

Modula-2 syntax coloring. +

+

The page Element allows to specify the type for which the higlighting is performed. To the right is possible to enable Enable highlighting (if is not checked then the given highlighting is saved in the system but is not applied). Also, the following stylings can be specified: +

    + +
  • Color – element color;
  • +
  • Bold – element is marked with bold if checked;
  • +
  • Italic – element is marked with italic if checked;
  • +
  • Strikethrough – element is strikethrough if checked;
  • +
  • Underline – element is underlined if checked.
  • +
+ +

In the page Preview it is possible to see the preview of the code corresponding to the parameters specified. +

+Templates

+ +

The section XDS Modula-2 > Editor > Templates allows to setup the code templates. +

+

To add the new template press New... button at the dialog right. +

+

In the opened dialog specify the folllowing: +

    + +
  • Name – template name;
  • +
  • Context – template usage context, selected in the dropdown list.
  • +
  • Automatically insert – this template will be automatically inserted, when checked;
  • +
  • Description – template description;
  • +
  • Pattern – template pattern.
  • +
+ +

Last field also allows usage of so called variables. Variable list can be opened by pressing the button Insert Variable.... +

Template is commited to the list by pressing the OK button. +

To edit the template press the Edit... button. To delete the template press the Remove button. To revert the deleted template press the Restore Removed button. +

To reset the template list to defaults press the Revert to Default button. +

Templates can be imported from the *.xml file by pressing the Import... button. To export templates press the Export... button. +

If the template is unchecked then it is saved but not applied (not active). +

If the Use code formatter checkbox is checked then the template code is formatted after the application. +

Lets modify the template using the IF-ELSE template as the example. Select IF-ELSE template and press Edit.... +

Template editor will pop up: +

+

Autocompletion template itself is the text with so called autocompletion variables. IDE replaces these variables in the moment of template insertion, or such variable can modify the editor behavior (demonstrated in the example below). +

There is a number of pre-defined autocompletion variables (to see them press Insert Variable... button): ${cursor}, ${date}, $$, ${line_selection}, ${time}, ${user}, ${word_selection}, ${year} . +

Each autocompletion variable with the name different from the pre-defined variable name is the edit location (more on this below). When inserting template it is possible to traverse between edit locations using the Tab ¨«¨ Shift + Tab buttons. +

Let us consider the ${cursor} variable. +

Modify the IF-ELSE template as the following: +

IF ${condition} THEN 
+  ${line_selection} 
+ELSE                    
+  ${cursor};         
+END;
+
+ +

Press OK, Apply and close the template editor. +

Open the Modula-2 editor on some mod-file, go to the procedure body, start typing the if and press Ctrl + Space. +

The following window appears: +

+

Cursor will be placed near condition, so if type TRUE, condition will be replaced with TRUE. +

Try pressing the Tab button - the cursor will traverse between edit locations, in the current example this happens to be lines 17 and 20. Line 20 corresponds to ${cursor} variable edit location. +

Remove the inserted text. +

Now type i := 0; and select this text: +

+

Press Ctrl + Space and select IF-ELSE in the autocompletion list. +

The following text will be inserted: +

+

So the current selection was used as the ${line_selection} variable value. Edit the condition location and press Enter. Cursor will jump to edit location corresponding to the ${cursor} variable. This variable specifies the position where the cursor should be placed after completion of the autocompletion session. +

Now edit IF-ELSE template as the following: +

IF ${condition} THEN (* ${THEN\_comment} *)
+  ${line_selection}
+ELSE  (* ${ELSE\_comment} *)
+  ${cursor};
+END; (* ${END\_comment} *)
+
+ +

Go to the source code editor and invoke the IF-ELSE template: +

+

Since variables ${THEN_comment}, ${ELSE_comment} and ${END_comment} are not built-in they only specify edit locations. During the autocompletion session it is possible to traverse them using the Tab and Shift + Tab buttons. +

Built-in autocompletion variables: +

    + +
  • ${cursor} – cursor is placed to this location after autcompletion session ends;
  • +
  • ${date} – current date;
  • +
  • $$ – dollar sign;
  • +
  • ${line_selection} – replaced with the current text selection;
  • +
  • ${time} – current time;
  • +
  • ${user} – user name;
  • +
  • ${year} – current year.
  • +
+ +

+Registered SDKs

+ +

Section XDS Modula-2 > Registered SDKs is used to specify new or edit existing SDKs. +

More on SDK setup please see SDK configuration. +

+Code style

+ +

At the moment the section XDS Modula-2 > Code style contains only formatting settings. +

+Formatter

+ +

The section XDS Modula-2 > Code style > Formatter is used to specify source code formatting settings. +

+

All formattings settings are saved in the formatting profile. Initially built-in formatting profile is used - it is possible to inspect its settings but it is not possible to edit them. Listbox atop allows to activate existing profile. The buttons are as follows: +

    + +
  • Edit – edit formatting profile. ??? will open.
  • +
  • Remove – delete profile.
  • +
  • New... – create new profile. Dialog will open - it allows to specify profile name, also it is possible to select profile to get initial settings from.
  • +
  • Import... – import profile from the file. Select .xml file containing profiles, they will be imported. If some profile names are the same as already presented they will be redefined with the imported.
  • +
  • Export All... – export all profiles into the file.
  • +
+ +

In the dialog below there is a window Preview allowing to preview formatting on the given source code sample. +

+Formatting profile edit dialog

+ +

Atop of the dialog there is a Export... button allowing export of the profile to the .xml file. +

The tabs below specify formatting parameter groups: +

    + +
  • Indentation – ???
  • +
  • White space – ???
  • +
  • New lines – ???
  • +
  • Line wrapping – ???
  • +
+ +

Each tab contains Preview window allowing preview effect of the settings being changed. +

+Indent formatting settings
+ +

+

    + +
  • Tab policy - this list specifies tab usage mode.
  • +
  • Indentation size - indentation size in characters.
  • +
  • Tab size - tab width.
  • +
+ +

The Indent section allows to override Indentation size for the given elements: +

    + +
  • Declarations within module
  • +
  • Declarations within procedure
  • +
  • Declarations within VAR/TYPE/CONST block
  • +
  • Declarations of local procedures
  • +
  • Declarations of local modules
  • +
  • Declarations of record fields
  • +
  • Statements within operator/procedure/module body
  • +
  • Statements within CASE body
  • +
  • Statements within CASE alternative
  • +
+ +

+Whitespace formatting settings
+ +

+

Insert space tree allows to select varios language elements. It is possible to specify for the selected element whether to put space after or before this element. +

When two elements are adjacent - space will be inserted if either of them confirm this. +

+Newline formatting settings
+ +

+

Insert new line tree allows to select varios language elements. It is possible to specify for the selected element whether to put newline after or before this element. +

When two elements are adjacent - newline will be inserted if either of them confirm this. +

+Line wrap formatting settings
+ +

+

By line wrapping we mean reorganizing long strings in a way that newline or / and whitespace padding is inserted to fit the string in the editor. +

One can specify Maximal line width value - position in the string which will be used by the formatter to fit the text in. It is not always possible to do this without broking the program syntax so sometimes strings are extended beyond this border. +

Below the preview window the value Set line width for preview window specifies the text wrapping +

width in the preview window - by changing this value one can guess how the text will appear after the reorganizing. +

+General

+ +

General Eclipse platform settings. XDS Modula-2 IDE uses some of them and besides adds some of its own preferences. +

+Spelling

+ +

Spellchecking preferences can be found in the Preferences dialog at the General > Editors > Text Editors > Spelling page. +

+

Enable spell checking checkbox allows to turn on the spell checking. +

In the combobox below it is possible to select the currently active spell checking service. Here we describe the XDS spell checking settings. +

The settings below affect the spell checking: +

    + +
  • Ignore words with digits
  • +
  • Ignore mixed case words
  • +
  • Ignore sentence capitalization
  • +
  • Ignore upper case words
  • +
  • Ignore internet addresses
  • +
  • Ignore non-letters at word boundaries
  • +
  • Ignore single letters
  • +
  • Ignore Modula-2 string literals
  • +
+ +

The section Dictionaries allows to select dictionary among the registered or select the user dictionary – in the later case the specially formatted file is expected. The format is as follows : each line contains the single word. IDE should have the permissions for both reading and writing the file. By selecting the file user should also specify the file encoding. +

In the dialog bottom is also possible to set maximum number of errors in the single source file and constrain the maximum count of spelling corrections offered to user. + + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help006.html b/product/com.excelsior.xds.help.ce/html/xds_help006.html new file mode 100644 index 0000000..7c69330 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help006.html @@ -0,0 +1,37 @@ + + + + +Resource properties + + + +

+Resource properties

+ +

Each IDE resource is associated with the set of properties. Particular set of properties depends on the corresponding resource type and ??? it belongs to. +

To view or edit resource properties use the Properties dialog. To open it for some resource: +

    + +
  1. Right click some resource in the Project Explorer view.
  2. +
  3. Select the Properties item in the context menu.
  4. +
+ +

It is also possible to open Properties dialog using the Alt + Enter hotkey combination. +

Properties are divided into groups that are displayed in different dialog pages. This pages are in turn are organized into the hierarchial structure displayed in the left pane of the dialog. Atop the dialog filter field can be used to quickly navigate to the property page. +

Select Window > Show View > Other... > General > Properties, to open the Property view. This +

view shows main properties of the resource selected in the Navigator view such as the Project Explorer view. +

+Modula-2 project properties

+ +

To view and edit Modula-2 project specific properties use XDS Modula-2 page of the Properties dialog. +

+

You can modify the following Modula-2 project properties: +

    + +
  • SDK used by the project,
  • +
  • Main module or prj file used for the compilation,
  • +
  • working directory used for the compilation.
  • +
+ + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help007.html b/product/com.excelsior.xds.help.ce/html/xds_help007.html new file mode 100644 index 0000000..5e2bedc --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help007.html @@ -0,0 +1,527 @@ + + + + +Usage + + + +

+Usage

+ +

This chapter describes main usages of the XDS Modula-2 IDE. +

+Create new elements

+ +

Select File > New > Other... to create new resource. Select the appropriate wizard and press Next: +

+

Provide all necessary parameters and Finish. The new resource will be created. +

+New project from scratch

+ +

Select File > New > Modula-2 Project in the main menu, and provide necessary parameters: +

+

Specify Project Name. Next, provide location of the project root directory (Project root field). +

Select project SDK (Project SDK field). Use Configure... button to edit SDK settings. +

One can create main module or project file, standard directory structure and redirection file. If Use SDK templates is checked then SDK templates will be used to create the files. Directory structure and redirection file name are also taken from the selected SDK settings. +

Pressing the Finish button will create the new Modula-2 project and add it to the workspace. Newly created files and directories will show up in the Project Explorer. +

+Create project from existing sources

+ +

To create project from existing sources select File > New > Modula-2 Project from Existing Sources in the main menu. Specify project settings in the wizard opened. +

+

You can explicitly specify the new project name or it will be set automatically after the project root directory selection (Project root field). +

Select the project SDK (Project SDK field): Unless otherwise indicated the default SDK is used. The Configure... button will open the SDK settings dialog. +

Specify whether project file (Project File field) or main module (Main module) is used for the source build. One can select project file *.prj or main module file (*.mod or *.ob2) by pressing Browse... button. +

Pressing the Finish button will create the new Modula-2 project and add it to the workspace. Newly created files and directories will show up in the Project Explorer. +

+New Modula-2 module

+ +

To create the new Modula-2 module select File > New > Other... in the main menu or use Ctrl + N +

hotkey. Select Modula-2 Module wizard under the XDS Modula-2 category (you can type module in the filter field to narrow the search). In the opened wizard +

specify module parameters: +

+

Specify new module name (Module name field). +

Specify folder to store the module that will be created (Source folder field). The Browse... button allows to select +

the directory from the available folders in workspace projects. +

+

Text field atop allows to filter resources by name. Wildcards are supported : * stands for the arbitrary string, ? stands for the single character or emptry string. +

Check the Create main module checkbox to promote the newly created module as the main project module. In this case it is necessary to specify implementation module (Implementation field). +

For the ordinary (not main) module one can set up the implementation and definition files – the Implementation field and the Definition field. The Browse... button allows to select module location directory via the standard Eclipse Folder Selection dialog. +

Pressing the Finish button in the wizard creates the module resource and add it to the workspace. Newly created files will show up in the Project Explorer. +

+Edit SDK

+ +

Add or edit SDK under the XDS Modula-2 > Registered SDKs preference page. +

+

Use Add button to select the folder where SDK is installed to register the SDK. +

When the selected SDK is configured to be used with the IDE (i.e. SDK root folder contains the sdk.ini) then the installed SDK list will show the new added SDK record. +

If the sdk.ini file is absent then manual SDK configuration wizard will show up. One can always open the SDK configuration wizard by selecting the SDK in the list and pressing the Edit button. +

To remove SDK use the Remove button. +

To export selected SDK settings (*.ini file) press the Export button, select and select folder to export. +

To apply and commit SDK changes press the Apply button. +

To edit the particular SDK settings use the Edit SDK wizard. +

+Edit SDK wizard

+ +

Edit SDK wizard is depicted on the picture below: +

+

In the top part of the wizard fields XDS home and XDS name used to set up SDK root folder and SDK name. +

Another settings are accessible from the following tabs: Components, Templates, Environment. +

+Components

+ +

+Base tools
+ +

The Base tools section allow to specify main tools, such as: +

    + +
  • compiler – Compiler field;
  • +
  • debugger – Debugger field;
  • +
  • simulator – Simulator field;
  • +
  • library definitions – ¯®«¥Library definitions field.
  • +
+ +

The first three fields should specify either executable file path (*.exe or *.bat). Last field should specify path to library definitions folder containing definition files *.def. The only mandatory field of these is the first one, containing compiler path. +

+Extra tools
+ +

The Extra tools section allow to specify extra tools. These extra tools can be invoked via the Project Explorer context menu. It is possible to build the context menu structure. +

+

Here you can specify: +

    + +
  • Add new Tool – adds a new tool.
  • +
  • Add menu items separator – adds a horizontal line between menu items.
  • +
  • Add new menu group – adds a menu item group.
  • +
+ +

To modify the menu items ordering use Up and Down buttons. +

To reassign the instrument to the another group edit this instrument and change its group to another. +

+Templates

+ +

The Templates tab specifies file types and templates to create files to create files of these types. +

+

+Files types
+ +

The Files types tab specifies two parameters: +

    + +
  • executable file extension – Executable file extension field.
  • +
  • Comma-separated primary files extensions – Primary files extensions field.
  • +
+ +

+Templates files
+ +

The Templates files section specifies templates to create files. +

    + +
  • Project file template – Project file template field, *.tpr file;
  • +
  • Redirection file template – Redirection file template field, *.trd file;
  • +
  • Main module template – Main module template field, *.tmd file;
  • +
  • Definition module template – Definition module template field, *.tmd file;
  • +
  • è ¡«®­ ¤«ï ä ©«  ॠ«¨§ æ¨¨ – Implementation module template field, *.tmd file;
  • +
  • Oberon module template – Oberon module template field, *.tmd file.
  • +
+ +

+Folders layout
+ +

The Folders layout section specifies directory names that will be created for the new project: +

    + +
  • Folders to create - comma-separated list of directories that will be created for the new project;
  • +
  • Project file folder - if set project file will be put into the specified directory;
  • +
  • Main module folder - if set main module will be put into the specified directory;
  • +
+ +

+Environment

+ +

The Environment specifies environment variables. +

+

To add the new variable use the New... button. In the opened wizard set the variable properties and press the Finish button. To edit or delete the variable press the Edit... button or the Delete button. +

+

Variable has the following properties: +

    + +
  • variable name – Name field;
  • +
  • variable value – Value field.
  • +
+ +

Only the name field is mandatory. When specifying the variable value one can use predefined IDE variables – these can be selected by pressing the Variables... button. +

+Edit tool dialog

+ +

+Tool settings

+ +

+

For the extra tools it is necessary to specify the following settings: +

    + +
  • instrument name– Name field;
  • +
  • instrument location – Location, this is the path to (*.exe or *.bat);
  • +
+ +

These fields are mandatory. +

+Tool menu

+ +

The Menu item text section can set up the menu for the Extra tool. It is possible to set the menu name for the enabled menu (Enabled menu item field) and the menu name for the disabled menu (Disabled menu item field). If the fields are not filled then instument name will be used. +

Tool menu is the submenu for the Tools menu item in the IDE main menu or context menu. +

+Tool launch settings

+ +

The Tool launch settings section specifies the tools launch settings. +

When Available for files with extensions checkbox is set then tool is applied only to the files with +

the specified extensions: extensions should be separated with comma. +

‚ ¯®«¥ Available for projects with source code root ­¥®¡å®¤¨¬® ¢ë¡à âì, ¤«ï ª ª¨å ⨯®¢ ¯à®¥ªâ  ¤®áâ㯥­ ¨­áâà㬥­â. ‚®§¬®¦­ë á«¥¤ãî騥 ¢ à¨ ­âë: +

The field Available for projects with source code root specifies project types for which the +

tool is enabled. +

    + +
  • any – any project type;
  • +
  • any, but with different settings – any project type with special settings;
  • +
  • project file (*.prj) – project file based projects *.prj;
  • +
  • main module – main module based projects.
  • +
+ +

After selecting the project type it is possible to specify launch parameters and working directory. +

The Output encoding field specifies standard output (and standard error) encoding. +

+Arguments
+ +

To specify arguments it is possible to use predefined IDE variables – these can be selected by pressing the Variables... button. More on this please see Working with variables +

+Working directory
+ +

The working directory is set up in the Working directory section. To use the SDK working directory – check the Use default location checkbox or manualy specify in the +

Location field (see Selecting working directory). +

+Launch configurations

+ +

+Edit launch configurations

+ +

To create or edit launch configuration select Run > Run Configurations... or Run > Debug Configurations... in the main menu. +

In the opened dialog select XDS Modula-2 Application in the left pane, open context menu with the right mouse +

click and select New. +

+

To edit the existing launch configuration select it in the left pane - the right pane will display its properties. +

+

Type run configuration name in the Name field. +

Select target workspace project for this run configuration and executable file for the launch. Apply button saves changes for the edited run configuration, Revert button reverts run configuration parameters to the last saved state. +

Next we will describe tabs used when creating or editing the run configuration. +

+Main Tab
+ +

Select the project for the run configuration on the Main tab – fill in the Project field. Project is selected from the current workspace it is possible to type the project name manually or to use the project selection dialog. +

Next specify the executable file for run – it is done under the Program to Run section (see the Select folder or file section). +

+Arguments Tab
+ +

The Arguments tab allows to specify program arguments and working directory for the launched program. +

+

Specify program arguments under the Program arguments section. It is possible to use predefined IDE variables to +

specify arguments. To do this press the Variables... button. More on predefined IDE variables see Variables.... +

Under the Working directory it is possible to specify whether to use project folder – Default item, or any other folder – Other folder. See (Select file or folder). +

+SDK Settings Tab
+ +

The SDK Settings tab allows to specify arguments for simulator and debugger – in the sections Simulator arguments and Debugger arguments correspondingly. +

+

It is possible to use predefined IDE variables. More on this see Working with variables +

+Environment
+ +

The Environment allow to set environment variables. +

+

To add new predefined IDE variable press New... at the right. +

+

In the opened dialog specify variable name (Name field - mandatory) and variable value (Value field - optional). Variable value can be typed manually or predefined variables can be used (use Variables... button). +

Press Edit... button to edit the variable. +

It is possible to add variable from the list. Press Select... button to open this list. +

+

Select required variables in the list. Selected variables will be added to predefined IDE variables. +

To delete environment variable select it in the list and press Remove. +

If there is at least one variable choice is enabled: +

    + +
  • Append environment to native environment – add selected variables to system variables;
  • +
  • Replace native environment with specified environment – replace system variables with selected variables.
  • +
+ +

+Common Tab
+ +

The Common tab allow to specify general launch configuration settings. +

+

The Save as section allows to set whether to save launch configuration as local file (Local file item) or as shared file (Shared file item). In the latter case it is necessary to specify directory to save the launch configuration. +

The Display in favorites menu section allows to specify whether to show launch configuration in the Favorites dropdown at Run/Debug menu. +

Select encoding in the Encoding section: default (Default item) or specific (Other item). +

The Standard Input and Output section allows to specify input/output integration parameters. +

One can use: +

+ +

The file will be appended if Append checkbox is checked. +

+Select folder or file

+ +

File or folder selection is a common task in various wizards and dialogs. It is possible to fill the Location field manually or using buttons: +

    + +
  • Workspace... to select from workspace resources;
  • +
  • File System... to select the file or folder from the file system;
  • +
  • Variables... to select the variable (more on variables Working with variables).
  • +
+ +

After the field is filled the Location field becomes the hyperlink – double click on it will open native operating system explorer. +

+Working with variables

+ +

IDE predefined variables are often used in various wizards and dialogs. To open the variable list click on the Variables... button. +

+

Filter field atop of the dialog alllow to quick filter variables by their name. Wildcards are enabled: * is an arbitrary string, ? is a single character or an empty string. +

When the particular variable is selected the Variable Description field will show the quick variable +

description. Some variables can make use of their arguments – in this case Argument field will become active – arguments can be configured with the Configure... button. +

Apply changes and close the dialog with the OK button. +

+Configure arguments

+ +

Argument configuration dialog looks like the following: +

+

Filter field atop of the dialog alllow to quick filter variables by their name. Wildcards are enabled: * is an arbitrary string, ? is a single character or an empty string. The Matching resources field show resources matching the +

condition. +

When the resource is selected the In folders field will show its location. +

+Edit variables

+ +

One can introduce new variables using the Edit Variables... button. To add the variable press the New... +

button on the right. +

+

Variable has the following properties: +

    + +
  • variable name – Name field;
  • +
  • variable value – Value field.
  • +
+ +

Only the name field is mandatory. When specifying the variable value one can use predefined IDE variables – these can be selected by pressing the Variables... button. +

Press the OK button to add the variable to list. +

To edit the variable use the Edit... button, to delete it use the Remove button. +

+Keyboard map

+ +

+

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 
Edit  
Ctrl+Z Undo last edit
Ctrl+Shift+Z Redo last edit
Ctrl+Y delete current line
Ctrl+/ Comment/uncomment lines
Ctrl+Shift+/ Comment selected
Ctrl+Shift+\ Uncomment
Ctrl+I Indent selected lines
Ctrl+Shift+F Format selected text
Alt+Shift+Up Select containing construction
Alt+Shift+Down Shrink containing construction selection
Ctrl+R Rename element
 
Search  
Ctrl+F Open xFind panel
Ctrl+‚¢¥àå xFind: quick find previos occurence
Ctrl+‚­¨§ xFind: quick find next occurence
Ctrl+Alt+F Search and replace dialog
Ctrl+H Œ®¤ã« -2 search
Ctrl+G Find declarations of the selected element in the workspace
Ctrl+Shift+G Find usages of the selected element in the workspace
 
Navigation  
Ctrl+L Go to line
F3 Open declaration of the selected element
Ctrl+M Open module from list
Ctrl+P Open coupled module
Alt+Shift+O Enable/disable mark occurences
 
Š®¬¯¨«ïæ¨ï ¨ § ¯ã᪠ 
F9 Compile file
Shift+F9 Build project
Ctrl+Shift+F9 Rebuild project from scratch
Ctrl+F11 Launch last Run configuration
F11 Launch last Debug configuration
 
Numbered bookmarks  
Ctrl+Shift+<digit> Add/remove corresponding bookmark at the current line
Ctrl+<æ¨äà > Goto corresponding bookmark
Ctrl+= Goto bookmark
Ctrl+Shift+= Add/remove
 
à®ç¥¥  
Ctrl+O Show module quick outline
F2 Show context tooltip
F12 Show context help
Ctrl+Shift+L Show key assist
Alt+F9 Maximize/restore editor window
Ctrl+Tab Next editor
Ctrl+‘ Next view
+

+ + diff --git a/product/com.excelsior.xds.help.ce/html/xds_help008.html b/product/com.excelsior.xds.help.ce/html/xds_help008.html new file mode 100644 index 0000000..5e52d97 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/html/xds_help008.html @@ -0,0 +1,69 @@ + + + + +‘¨á⥬  ®¡­®¢«¥­¨© + + + +

+‘¨á⥬  ®¡­®¢«¥­¨©

+ +

‚ ¨­â¥£à¨à®¢ ­­®© á।¥ ࠧࠡ®âª¨ ¯®¤¤¥à¦¨¢ ¥âáï ¤¢  ¢¨¤  ®¡­®¢«¥­¨©: +

    + +
  1. Ž¡­®¢«¥­¨¥ ¢­¥è­¨å à¥áãàᮢ.
  2. +
  3. Ž¡­®¢«¥­¨¥ ª®¬¯®­¥­â ¨­â¥£à¨à®¢ ­­®© á।ë.
  4. +
+ +

+Ž¡­®¢«¥­¨¥ ¢­¥è­¨å à¥áãàᮢ

+ +

®¤ ¢­¥è­¨¬¨ à¥áãàá ¬¨ ¯®¤à §ã¬¥¢ îâáï ä ©«ë, à á¯®«®¦¥­­ë¥ ¢­¥ ¤¨à¥ªâ®à¨¨, ¢ ª®â®àãî ãáâ ­®¢«¥­  ¨­â¥£à¨à®¢ ­­ ï á। . Š â ª¨¬ à¥áãàá ¬, ¯à¥¦¤¥ ¢á¥£®, ®â­®áïâáï ª®¬¯®­¥­âë á ¬®© Š‘: ª®¬¯¨«ïâ®à, ®â« ¤ç¨ª, ¯à®ç¨¥ ¨­áâà㬥­âë, è ¡«®­ë ᮧ¤ ­¨ï ­®¢ëå ¬®¤ã«¥© ¨ ¯à®¥ªâ­ëå ä ©«®¢. +

Š ª ¯à ¢¨«®, ®¡à é¥­¨¥ ª ¢­¥è­¨¬ à¥áãàá ¬ ¯à®¨á室¨â ¯® áá뫪¥, â® ¥áâì ¢ ¨­â¥£à¨à®¢ ­­®© á।¥ åà ­¨âáï ⮫쪮 ¯ãâì ¤® ¤ ­­®£® à¥áãàá . Š ¦¤ë© à § ¯à¨ ®¡à é¥­¨¨ ª ¤ ­­®¬ã à¥áãàáã ®­ § ­®¢® § £à㦠¥âáï ¢ ®¡®«®çªã. +

„«ï ®¡­®¢«¥­¨ï â ª¨å à¥áãàᮢ ¤®áâ â®ç­® ®¡­®¢¨âì ¨å ¢ ä ©«®¢®© á¨á⥬¥, ¨ ¯à¨ á«¥¤ãî饬 ®¡à é¥­¨¨ ª â ª®¬ã à¥áãàáã ¡ã¤¥â  ¢â®¬ â¨ç¥áª¨ ¨á¯®«ì§®¢ ­  ­®¢ ï ¢¥àá¨ï ¤ ­­®£® à¥áãàá . +

Ž¡à â¨â¥ ¢­¨¬ ­¨¥, çâ® ª®­ä¨£ãà æ¨®­­ë© ä ©« sdk.ini, ¨á¯®«ì§ã¥¬ë© ¤«ï ¡ëáâண® ¯®¤ª«î祭¨ï Š‘, ¢®®¡é¥ ­¥ ®â­®á¨âáï ª à¥áãàá ¬ ¨­â¥£à¨à®¢ ­­®© á।ë. Ž­ ç¨â ¥âáï ⮫쪮 ®¤¨­ à § ¯à¨ ¯®¤ª«î祭¨¨ Š‘. ®í⮬㠤«ï ⮣®, çâ®¡ë ¢á¥ ¢ë¯®«­¥­­ë¥ ¢ ­¥¬ ¨§¬¥­¥­¨ï ¢áâ㯨«¨ ¢ ᨫã, ­¥®¡å®¤¨¬® § ­®¢® ¯®¤ª«îç¨âì ¤ ­­®¥ Š‘. +

+Ž¡­®¢«¥­¨¥ ª®¬¯®­¥­â ¨­â¥£à¨à®¢ ­­®© á।ë

+ +

„«ï ®¡­®¢«¥­¨ï ª®¬¯®­¥­â ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¨á¯®«ì§ã¥âáï èâ â­ ï á¨á⥬  ®¡­®¢«¥­¨© Eclipse ­  ®á­®¢¥ ‘ ©â®¢ Ž¡­®¢«¥­¨© (Update Sites). ‘ ©â ®¡­®¢«¥­¨© í⮠ᯥ樠«ì­®£® ¢¨¤  ¤¨à¥ªâ®à¨ï, ¢ ª®â®à®© à §¬¥é¥­ë ­®¢ë¥ ¢¥àᨨ ª®¬¯®­¥­â ¨­â¥£à¨à®¢ ­­®© áà¥¤ë ¨ ¬ ­¨ä¥áâ ®¡­®¢«¥­¨© – ᯥ樠«ì­ë© ä ©«, ®¯¨á뢠î騩 áâàãªâãàã ¤®áâ㯭ëå ®¡­®¢«¥­¨ï. ‘ ©â ®¡­®¢«¥­¨© ¬®¦¥â ¡ëâì à §¬¥é¥­ ­  http-á¥à¢¥à¥, á¥â¥¢®¬ ¨«¨ «®ª «ì­®¬ ¤¨áª¥. « âä®à¬  Eclipse ¯®¤¤¥à¦¨¢ ¥â ­¥®£à ­¨ç¥­­®¥ ª®«¨ç¥á⢮ ᠩ⮢ ®¡­®¢«¥­¨©. +

—â®¡ë ¢®á¯®«ì§®¢ âìáï á¨á⥬®© ®¡­®¢«¥­¨ï Eclipse ¯à¥¦¤¥ ¢á¥£® ­¥®¡å®¤¨¬® 㪠§ âì ¯ãâì ¤® á ©â  ®¡­®¢«¥­¨© ᮮ⢥âáâ¢ãî饩 ª®¬¯®­¥­âë ¨«¨ £à㯯 ª®¬¯®­¥­â®¢. „«ï í⮣® ­¥®¡å®¤¨¬® ¢ë¯®«­¨âì á«¥¤ãî騥 è £¨: +

    + +
  1. ‚ £« ¢­®¬ ¬¥­î ¢ë¡à âì Window > Preferences > Install/Update > Available Software Sites.
  2. +
  3. ‚ ¯à ¢®© ç á⨠¤¨ «®£  Available Software Sites ­ ¦ âì ª­®¯ªã Add....
  4. +
  5. ‚ ¤¨ «®£¥ Add Site ¢ ¯®«¥ Name 㪠§ âì ­¥®¡ï§ â¥«ì­®¥ ­ §¢ ­¨¥ á ©â  ®¡­®¢«¥­¨©.
  6. +
  7. ‚ ¯®«¥ Location ¤¨ «®£  Add Site 㪠§ âì ¯ãâì ¤® á ©â  ®¡­®¢«¥­¨© ¢ ä®à¬ â¥ URI. …᫨ á ©â ®¡­®¢«¥­¨© à §¬¥é¥­ ­  «®ª «ì­®¬ ¨«¨ á¥â¥¢®¬ ¤¨áª¥, â® á⮨⠢®á¯®«ì§®¢ âìáï ª­®¯ª®© Local..., ª®â®à ï ®âªà®¥â áâ ­¤ àâ­ë© ¤¨ «®£ ¤«ï ¢ë¡®à  ¤¨à¥ªâ®à¨¨,   § â¥¬  ¢â®¬ â¨ç¥áª¨ ¯à¥®¡à §ã¥â ¢ë¡à ­­ãî ¤¨à¥ªâ®à¨î ¢ ä®à¬ â URI.
  8. +
+ +

+

®á«¥ í⮣®, ¢ «î¡®© ¬®¬¥­â ¬®¦­® ¯à®¢¥à¨âì ­ «¨ç¨¥ ­®¢ëå ®¡­®¢«¥­¨©, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î Help > Check for Updates. …᫨ ¤®áâã¯­ë ­®¢ë¥ ®¡­®¢«¥­¨ï, â® § ¯ãáâ¨âáï ¬ áâ¥à ãáâ ­®¢ª¨ ®¡­®¢«¥­¨©. +

+

  ¯¥à¢®© áâà ­¨æ¥ ¬ áâ¥à  ®¡­®¢«¥­¨© ¯à¥¤« £ ¥âáï ¢ë¡à âì, ª ª¨¥ ¨§ ¤®áâ㯭ëå ®¡­®¢«¥­¨© ­¥®¡å®¤¨¬® ãáâ ­ ¢«¨¢ âì. ‘«¥¤ãîé ï áâ ­¨æ  ¯à¥¤®áâ ¢«ï¥â ¡®«¥¥ ¤¥â «ì­ãî ¨­ä®à¬ æ¨î ® ⮬, ª ª¨¥ ª®¬¯®­¥­âë ¡ã¤ãâ ®¡­®¢«¥­ë. +

+

  ¯®á«¥¤­¥© áâà ­¨æ¥ ¬ áâ¥à  ®¡­®¢«¥­¨©, ¡ã¤¥â ¯à¥¤«®¦¥­® ¯à¨­ïâì «¨æ¥­§¨®­­®¥ ᮣ« è¥­¨ï. „«ï í⮣® ­¥®¡å®¤¨¬® ® ¢ë¡à âì ¯ã­ªâ I accept the terms of the license agreement. +

+

®á«¥ í⮣® ¤«ï ãáâ ­®¢ª¨ ®¡­®¢«¥­¨© ®áâ ¥âáï ­ ¦ âì ª­®¯ªã Finish. …᫨ ãáâ ­ ¢«¨¢ ¥¬ë¥ ®¡­®¢«¥­¨ï ­¥ ᮤ¥à¦ â æ¨ä஢®© ¯®¤¯¨á¨, â® ¢ ¯à®æ¥áᥠãáâ ­®¢ª¨ ¡ã¤¥â ¢ë¤ ­® ¯à¥¤ã¯à¥¦¤¥­¨¥. ‚ í⮬ á«ãç ¥ ­¥®¡å®¤¨¬® ® ¤ âì ᮣ« á¨¥ ­  ãáâ ­®¢ªã ®¡­®¢«¥­¨©, ­ ¦ ¢ ª­®¯ªã OK. +

+

®á«¥ ãáâ ­®¢ª¨ ®¡­®¢«¥­¨© ¢®§¬®¦­® ¯®âॡã¥âáï ¯¥à¥§ ¯ã᪠á।ë. ‚ í⮬ á«ãç ¥ ¡ã¤¥â ¢ë¤ ­® ᮮ⢥âáâ¢ãî饥 á®®¡é¥­¨¥. „«ï ¯¥à¥§ ¯ã᪠ áà¥¤ë ­¥®¡å®¤¨¬® ­ ¦ âì ª­®¯ªã Restart Now. +

+

+— áâ®â  ¯à®¢¥àª¨ ®¡­®¢«¥­¨©

+ +

— áâ®â  ¯à®¢¥àª¨ ®¡­®¢«¥­¨© ¨­â¥£à¨à®¢ ­­®© á।®© § ¤ ¥âáï ¢ ¤¨ «®£¥ Preferences. „«ï ¥¥ ­ áâனª¨ ­¥®¡å®¤¨¬®: +

    + +
  1. ‡ ¯ãáâ¨âì ¨­â¥£à¨à®¢ ­­ãî á।㠨 ®âªàëâì ¤¨ «®£ Preferences, ¢ë¡à ¢ ¢ £« ¢­®¬ ¬¥­î Window > Preferences.
  2. +
  3. ‚ «¥¢®© ¯ ­¥«¨ ¤¨ «®£  ¢ë¡à âì Install/Update > Automatic Updates.
  4. +
  5. “áâ ­®¢¨âì ­¥®¡å®¤¨¬ë¥ ¯ à ¬¥âàë ¢ ¯à ¢®© ç á⨠¤¨ «®£ .
  6. +
  7.  ¦ âì ª­®¯ªã Apply.
  8. +
+ +

+

…᫨ ¯à¨  ¢â®¬ â¨ç¥áª®© ¯à®¢¥àª¥ ®¡­ à㦥­ë ­®¢ë¥ ®¡­®¢«¥­¨ï, â® ¢ ¯à ¢®¬ ­¨¦­¥¬ 㣫㠨­â¥£à¨à®¢ ­­®© áà¥¤ë ¯®ï¢¨âáï ᮮ⢥âáâ¢ãî饥 á®®¡é¥­¨¥: +

+

„¢®©­®© 饫箪 ¬ëèìî ¯® í⮬ã á®®¡é¥­¨î ®âªà®¥â ¤¨ «®£ ¤«ï ãáâ ­®¢ª¨ ¤®áâ㯭ëå ®¡­®¢«¥­¨©. +

+

+ + diff --git a/product/com.excelsior.xds.help.ce/plugin.properties b/product/com.excelsior.xds.help.ce/plugin.properties new file mode 100644 index 0000000..53fdfcc --- /dev/null +++ b/product/com.excelsior.xds.help.ce/plugin.properties @@ -0,0 +1 @@ +pluginName=Excelsior IDE User Guide diff --git a/product/com.excelsior.xds.help.ce/plugin.xml b/product/com.excelsior.xds.help.ce/plugin.xml new file mode 100644 index 0000000..4d70207 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/plugin.xml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.help.ce/toc.xml b/product/com.excelsior.xds.help.ce/toc.xml new file mode 100644 index 0000000..e25f0e4 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/toc.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.help.ce/xds_help_toc.xml b/product/com.excelsior.xds.help.ce/xds_help_toc.xml new file mode 100644 index 0000000..05ea089 --- /dev/null +++ b/product/com.excelsior.xds.help.ce/xds_help_toc.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.ide.updates/.project b/product/com.excelsior.xds.ide.updates/.project new file mode 100644 index 0000000..9615751 --- /dev/null +++ b/product/com.excelsior.xds.ide.updates/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.updates + + + + + + org.eclipse.pde.UpdateSiteBuilder + + + + + + org.eclipse.pde.UpdateSiteNature + + diff --git a/product/com.excelsior.xds.ide.updates/site.xml b/product/com.excelsior.xds.ide.updates/site.xml new file mode 100644 index 0000000..3c47aa2 --- /dev/null +++ b/product/com.excelsior.xds.ide.updates/site.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + This category contains all of the Eclipse IDE for XDS Modula-2 features. + + + + + This category contains all of Java Platform Runtime Enviroment features + + + diff --git a/product/com.excelsior.xds.ide/.classpath b/product/com.excelsior.xds.ide/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ide/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ide/.project b/product/com.excelsior.xds.ide/.project new file mode 100644 index 0000000..78ad2b8 --- /dev/null +++ b/product/com.excelsior.xds.ide/.project @@ -0,0 +1,34 @@ + + + com.excelsior.xds.ide + + + + + + org.eclipse.xtext.ui.shared.xtextBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + org.eclipse.xtext.ui.shared.xtextNature + + diff --git a/product/com.excelsior.xds.ide/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ide/META-INF/MANIFEST.MF new file mode 100644 index 0000000..5fa9ab5 --- /dev/null +++ b/product/com.excelsior.xds.ide/META-INF/MANIFEST.MF @@ -0,0 +1,23 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Excelsior IDE for XDS Modula-2 +Bundle-SymbolicName: com.excelsior.xds.ide;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ide.Activator +Bundle-Vendor: Excelsior LLC +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.ui;bundle-version="1.7.0", + org.eclipse.ui.ide, + org.apache.commons.io, + org.apache.commons.collections, + org.apache.commons.lang, + org.eclipse.e4.ui.css.core, + org.eclipse.e4.ui.css.swt, + org.w3c.css.sac, + org.eclipse.e4.ui.css.swt.theme, + org.eclipse.platform;bundle-version="4.4.2", + com.excelsior.xds.ui.editor;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/product/com.excelsior.xds.ide/OSGI-INF/l10n/bundle.properties b/product/com.excelsior.xds.ide/OSGI-INF/l10n/bundle.properties new file mode 100644 index 0000000..313e635 --- /dev/null +++ b/product/com.excelsior.xds.ide/OSGI-INF/l10n/bundle.properties @@ -0,0 +1,14 @@ +#Properties file for com.excelsior.xds.ide +product.name = Excelsior IDE for XDS Modula-2 Developers +aboutText = Excelsior IDE for XDS Modula-2 Developers\n\ + \n\ + Version 1.7.0\n\ + \n\ + Copyright \u00a9 2015, Excelsior LLC. All rights reserved.\n\ + Visit http://www.excelsior-usa.com/xds.html\n\ + \n\ + This offering is based on technology from the Eclipse Project.\n\ + Visit http://www.eclipse.org\n\ + \n\ + This product includes software developed by the\n\ + Apache Software Foundation http://www.apache.org/ \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/about.ini b/product/com.excelsior.xds.ide/about.ini new file mode 100644 index 0000000..87642f6 --- /dev/null +++ b/product/com.excelsior.xds.ide/about.ini @@ -0,0 +1,28 @@ +# about.ini +# contains information about a feature +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in about.properties +# This file does not need to be translated. + +# Property "aboutText" contains blurb for "About" dialog (translated) +aboutText=%blurb + +# Property "windowImage" contains path to window icon (16x16) +# needed for primary features only + +# Property "featureImage" contains path to feature image (32x32) +featureImage=icons/xds32.png + +# Property "aboutImage" contains path to product image (500x330 or 115x164) +# needed for primary features only +aboutImage=icons/about.png + +# Property "appName" contains name of the application (not translated) +# needed for primary features only + +# Property "welcomePage" contains path to welcome page (special XML-based format) +# optional + +# Property "welcomePerspective" contains the id of the perspective in which the +# welcome page is to be opened. +# optional diff --git a/product/com.excelsior.xds.ide/about.mappings b/product/com.excelsior.xds.ide/about.mappings new file mode 100644 index 0000000..32e9f81 --- /dev/null +++ b/product/com.excelsior.xds.ide/about.mappings @@ -0,0 +1 @@ +0=@build@ \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/about.properties b/product/com.excelsior.xds.ide/about.properties new file mode 100644 index 0000000..b78f8ca --- /dev/null +++ b/product/com.excelsior.xds.ide/about.properties @@ -0,0 +1,17 @@ +# about.properties +# contains externalized strings for about.ini +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# fill-ins are supplied by about.mappings +# This file should be translated. + +blurb=Excelsior IDE for XDS Modula-2 Developers\n\ +\n\ +Version: 1.7.0\n\ +Build id: {0}\n\ +\n\ +Copyright © 2015, Excelsior LLC. All rights reserved.\n\ +Visit http://www.excelsior-usa.com\n\ +\n\ +This offering is powered by Eclipse technology and includes\n\ +Eclipse plug-ins that can be installed and used\n\ +with other Eclipse-based offerings. \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/build.properties b/product/com.excelsior.xds.ide/build.properties new file mode 100644 index 0000000..82d879d --- /dev/null +++ b/product/com.excelsior.xds.ide/build.properties @@ -0,0 +1,19 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + splash.bmp,\ + plugin_customization.ini,\ + plugin_customization.properties,\ + about.ini,\ + about.mappings,\ + about.properties,\ + icons/xds32.png,\ + icons/xds16.png,\ + icons/about.png,\ + OSGI-INF/,\ + helpData.xml,\ + css/ +qualifier = context + diff --git a/product/com.excelsior.xds.ide/com.excelsior.xds.ide.k26.product b/product/com.excelsior.xds.ide/com.excelsior.xds.ide.k26.product new file mode 100644 index 0000000..2a987f7 --- /dev/null +++ b/product/com.excelsior.xds.ide/com.excelsior.xds.ide.k26.product @@ -0,0 +1,66 @@ + + + + + + + + + %aboutText + + + + + + + + -Xms40m -Xmx768m + -data @user.home/xds-workspace -perspective com.excelsior.xds.DevelopmentPerspective --org.eclipse.equinox.p2.reconciler.dropins.directory dropins --launcher.defaultAction openFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/com.excelsior.xds.ide.product b/product/com.excelsior.xds.ide/com.excelsior.xds.ide.product new file mode 100644 index 0000000..a448523 --- /dev/null +++ b/product/com.excelsior.xds.ide/com.excelsior.xds.ide.product @@ -0,0 +1,62 @@ + + + + + + + + + %aboutText + + + + + + + + -Xms40m -Xmx768m + -data @user.home/xds-workspace -perspective com.excelsior.xds.DevelopmentPerspective --org.eclipse.equinox.p2.reconciler.dropins.directory dropins --launcher.defaultAction openFile + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/css/xds.css b/product/com.excelsior.xds.ide/css/xds.css new file mode 100644 index 0000000..9cc6c2f --- /dev/null +++ b/product/com.excelsior.xds.ide/css/xds.css @@ -0,0 +1,3 @@ +ToolBar#org-eclipse-debug-ui-main-toolbar { + visibility : hidden +} diff --git a/product/com.excelsior.xds.ide/helpData.xml b/product/com.excelsior.xds.ide/helpData.xml new file mode 100644 index 0000000..44d12d3 --- /dev/null +++ b/product/com.excelsior.xds.ide/helpData.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/icons/about.png b/product/com.excelsior.xds.ide/icons/about.png new file mode 100644 index 0000000..a3d5ea4 Binary files /dev/null and b/product/com.excelsior.xds.ide/icons/about.png differ diff --git a/product/com.excelsior.xds.ide/icons/xds16.png b/product/com.excelsior.xds.ide/icons/xds16.png new file mode 100644 index 0000000..53fb494 Binary files /dev/null and b/product/com.excelsior.xds.ide/icons/xds16.png differ diff --git a/product/com.excelsior.xds.ide/icons/xds32.png b/product/com.excelsior.xds.ide/icons/xds32.png new file mode 100644 index 0000000..990342e Binary files /dev/null and b/product/com.excelsior.xds.ide/icons/xds32.png differ diff --git a/product/com.excelsior.xds.ide/plugin.xml b/product/com.excelsior.xds.ide/plugin.xml new file mode 100644 index 0000000..8329857 --- /dev/null +++ b/product/com.excelsior.xds.ide/plugin.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/plugin_customization.ini b/product/com.excelsior.xds.ide/plugin_customization.ini new file mode 100644 index 0000000..f530d5b --- /dev/null +++ b/product/com.excelsior.xds.ide/plugin_customization.ini @@ -0,0 +1,54 @@ +# plugin_customization.ini +# sets default values for plug-in-specific preferences +# keys are qualified by plug-in id +# e.g., com.example.acmeplugin/myproperty=myvalue +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# "%key" are externalized strings defined in plugin_customization.properties +# This file does not need to be translated. + +# WARNING: This file defines the preference overrides for the Platform build +# (the one with no JDT or PDE), not the SDK build (aka the IDE). +# For the SDK build, use the plugin_customization.ini file in the +# org.eclipse.sdk plug-in instead. + +# Property "org.eclipse.ui/defaultPerspectiveId" controls the +# perspective that the workbench opens initially + +org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP=true +org.eclipse.ui/KEY_CONFIGURATION_ID=com.excelsior.xds.command.keybinding +org.eclipse.ui/SAVE_ALL_BEFORE_BUILD=true + +# Since Problem view accesses internal API, I see no better way to configure it +org.eclipse.ui.ide/org.eclipse.ui.internal.views.markers.CachedMarkerBuilderorg.eclipse.ui.views.ProblemView=\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n +org.eclipse.ui.ide/SAVE_ALL_BEFORE_BUILD=true + +org.eclipse.core.resources/refresh.lightweight.enabled=true +org.eclipse.core.resources/description.autobuilding=false +org.eclipse.ui.editors/printMargin=true +org.eclipse.ui.editors/currentLineColor=255,255,215 +org.eclipse.ui.editors/searchResultIndicationColor=255, 250, 0 +org.eclipse.ui.editors/tabWidth=2 +org.eclipse.ui.editors/spacesForTabs=true +com.excelsior.texteditor.xbookmarks/com.excelsior.xds.xbookmarks.TEXT_MODE_KEY=true + +# Override CTRL+1 QuickFix to CTRL+Q +org.eclipse.ui.workbench/org.eclipse.ui.commands=\r\n\r\n\r\n\r\n\r\n + +org.eclipse.core.resources/refresh.enabled=true + +# launch last launch configuration +org.eclipse.debug.ui/org.eclipse.debug.ui.UseContextualLaunch=false +# Build before launch and always save dirty editors before launch - KIDE-477 +org.eclipse.debug.ui/org.eclipse.debug.ui.build_before_launch=true +org.eclipse.debug.ui/org.eclipse.debug.ui.save_dirty_editors_before_launch=always +# always switch to debug perspective +org.eclipse.debug.ui/org.eclipse.debug.ui.switch_to_perspective=always + +# initial state of Outline filters +com.excelsior.xds.ui.editor/com.excelsior.xds.ui.editor.modula.ModulaQuickOutlineDialog.FILTER_IMPORT=true +com.excelsior.xds.ui.editor/com.excelsior.xds.ui.editor.modula.ModulaQuickOutlineDialog.FILTER_FORAML_PARAMETERS=true + +com.excelsior.xds.ui.editor/com.excelsior.xds.ui.editor.modula.ModulaOutlinePage.FILTER_FORAML_PARAMETERS=true + +#Set default editor font to be Courier New, 10 +org.eclipse.ui.workbench/org.eclipse.jface.textfont=1|Courier New|10.0|0|WINDOWS|1|-20|0|0|0|400|0|0|0|-52|3|2|1|49|Courier New \ No newline at end of file diff --git a/product/com.excelsior.xds.ide/plugin_customization.properties b/product/com.excelsior.xds.ide/plugin_customization.properties new file mode 100644 index 0000000..f2f3517 --- /dev/null +++ b/product/com.excelsior.xds.ide/plugin_customization.properties @@ -0,0 +1,14 @@ +############################################################################### +# Copyright (c) 2000, 2006 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 +############################################################################### +# plugin_customization.properties +# contains externalized strings for plugin_customization.ini +# java.io.Properties file (ISO 8859-1 with "\" escapes) +# This file should be translated. diff --git a/product/com.excelsior.xds.ide/splash.bmp b/product/com.excelsior.xds.ide/splash.bmp new file mode 100644 index 0000000..638ee30 Binary files /dev/null and b/product/com.excelsior.xds.ide/splash.bmp differ diff --git a/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/Activator.java b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/Activator.java new file mode 100644 index 0000000..4fd23dc --- /dev/null +++ b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/Activator.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.ide; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class Activator extends AbstractUIPlugin implements BundleActivator { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.ide"; //$NON-NLS-1$ + + // The shared instance + private static Activator plugin; + + /** + * The constructor + */ + public Activator() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static Activator getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/internal/ini/EclipseIniWriter.java b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/internal/ini/EclipseIniWriter.java new file mode 100644 index 0000000..b251faa --- /dev/null +++ b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/internal/ini/EclipseIniWriter.java @@ -0,0 +1,120 @@ +package com.excelsior.xds.ide.internal.ini; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.LinkedHashMap; +import java.util.Map; + +import org.apache.commons.collections.MapUtils; +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.runtime.Platform; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.utils.collections.XMapUtils; + +public class EclipseIniWriter { + private static final String LINE_SEPARATOR = System.getProperty("line.separator"); //$NON-NLS-1$ + private Map changeOptionName2Value; + private boolean isWriteIfNotKeyPresent; + + public EclipseIniWriter(String name, String value, boolean isWriteIfNotKeyPresent) { + this(XMapUtils.newLinkedHashMap(name, value), isWriteIfNotKeyPresent); + } + + public EclipseIniWriter(Map changeOptionName2Value, boolean isWriteIfNotKeyPresent) { + this.changeOptionName2Value = new LinkedHashMap(changeOptionName2Value); + } + + public void write() throws Throwable { + if (!MapUtils.isEmpty(changeOptionName2Value)) { + String installPath = Platform.getInstallLocation().getURL() + .getPath(); + String iniFile = FilenameUtils.concat(installPath, "xds-ide.ini"); //$NON-NLS-1$ + if (!new File(iniFile).exists()) { + LogHelper.logError(String.format("Ini file not found : %s", iniFile)); + return; + } + File backupIniFile = File.createTempFile("xds-ide", ".ini"); //$NON-NLS-1$ //$NON-NLS-2$ + File tempIniFile = File.createTempFile("xds-ideTemp", ".ini"); //$NON-NLS-1$ //$NON-NLS-2$ + FileUtils.copyFile(new File(iniFile), backupIniFile); + + boolean isNeedRestoreOfIni = false; + + BufferedReader reader = new BufferedReader(new FileReader(iniFile)); + BufferedWriter writer = new BufferedWriter(new FileWriter(tempIniFile)); + + Map key2Value = new LinkedHashMap(); + + try { + String line; + String key = null; + String value = null; + + boolean hasChanges = false; + + try { + while ((line = reader.readLine()) != null) { + String trimmedLine = line.trim(); + if (trimmedLine.startsWith("-")) { // we have an option name //$NON-NLS-1$ + if (changeOptionName2Value.containsKey(trimmedLine)) { + value = changeOptionName2Value.get(trimmedLine); + changeOptionName2Value.remove(trimmedLine); + if (value != null) { // if null value specified - remove corresponding key /value + key2Value.put(trimmedLine, value); + } + hasChanges = true; + key = null; // skip this key + } + else { + key = trimmedLine; + key2Value.put(trimmedLine, ""); //$NON-NLS-1$ + } + } else { // we have an option value + if (key != null) { + key2Value.put(key, line); + } + + value = null; + key = null; + } + } + + if (hasChanges || isWriteIfNotKeyPresent) { + for(Map.Entry pair : key2Value.entrySet()) { + writer.write(pair.getKey() + LINE_SEPARATOR); + if (!StringUtils.isBlank(pair.getValue())) { + writer.write(pair.getValue() + LINE_SEPARATOR); + } + } + hasChanges = true; + } + + if (isWriteIfNotKeyPresent && changeOptionName2Value.size() > 0) { + for(Map.Entry pair : changeOptionName2Value.entrySet()) { + writer.write(pair.getKey() + LINE_SEPARATOR + pair.getValue() + LINE_SEPARATOR); + } + hasChanges = true; + } + } finally { + writer.close(); + reader.close(); + } + + if (hasChanges) { + isNeedRestoreOfIni = true; + FileUtils.copyFile(tempIniFile, new File(iniFile)); + } + } catch (Throwable t) { + if (isNeedRestoreOfIni) { + FileUtils.copyFile(backupIniFile, new File(iniFile)); + } + throw t; + } + } + } +} diff --git a/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/startup/StartupHook.java b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/startup/StartupHook.java new file mode 100644 index 0000000..8721f14 --- /dev/null +++ b/product/com.excelsior.xds.ide/src/com/excelsior/xds/ide/startup/StartupHook.java @@ -0,0 +1,85 @@ +package com.excelsior.xds.ide.startup; + +import java.io.File; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.ui.IStartup; +import org.eclipse.ui.internal.ide.ChooseWorkspaceData; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.ide.internal.ini.EclipseIniWriter; + +@SuppressWarnings("restriction") +public class StartupHook implements IStartup { + + @Override + public void earlyStartup() { + try { + // on first launch - remove '-data' key/value pair from the xds-ide.ini + EclipseIniWriter eclipseIniWriter = new EclipseIniWriter("-data", null, false); //$NON-NLS-1$ + eclipseIniWriter.write(); + } catch (Throwable e) { + LogHelper.logError("xds-ide.ini modification failed : reseting of -data param", e); //$NON-NLS-1$ + } + + Job job = new Job("Setting Current Workspace To Be Used On Next Launch") { //$NON-NLS-1$ + @Override + protected IStatus run(IProgressMonitor monitor) { + while (Platform.getInstanceLocation() == null + || !Platform.getInstanceLocation().isSet()) { + try { + Thread.sleep(500); + } catch (InterruptedException e) { + } + } + + boolean isWorkspaceSet = false; + while(!isWorkspaceSet) { + try { + ResourceUtils.getWorkspaceRootPath(); + isWorkspaceSet = true; + } catch (IllegalStateException e) { + System.out.println("Wainting for the workspace initialization..."); + } + } + + makeCurrentWorkspaceToUsedOnNextLaunch(); + + return Status.OK_STATUS; + } + }; + job.schedule(); + } + + private static void makeCurrentWorkspaceToUsedOnNextLaunch() { + ChooseWorkspaceData data = new ChooseWorkspaceData(""); //$NON-NLS-1$ + data.readPersistedData(); + + String[] recentWorkspaces = data.getRecentWorkspaces(); + String workspaceRootPath = ResourceUtils.getWorkspaceRootPath(); + boolean isFound = false; + for (String workspace : recentWorkspaces) { + if (workspace == null) continue; + workspace = (new File(workspace)).getAbsolutePath(); + if (workspace.equals(workspaceRootPath)) { + isFound = true; + break; + } + } + if (!isFound) { + List recentWorkspacesList = new ArrayList(Arrays.asList(recentWorkspaces)); + recentWorkspacesList.add(0, workspaceRootPath); + data.setRecentWorkspaces(recentWorkspacesList.toArray(new String[0])); + data.writePersistedData(); + } + } + +} diff --git a/product/com.excelsior.xds.jre.feature/.project b/product/com.excelsior.xds.jre.feature/.project new file mode 100644 index 0000000..f29af94 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.jre.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.jre.feature/build.properties b/product/com.excelsior.xds.jre.feature/build.properties new file mode 100644 index 0000000..406c584 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/build.properties @@ -0,0 +1,2 @@ +bin.includes = feature.xml +root.win32.win32.x86=rootfiles.win32/ \ No newline at end of file diff --git a/product/com.excelsior.xds.jre.feature/feature.xml b/product/com.excelsior.xds.jre.feature/feature.xml new file mode 100644 index 0000000..295b48c --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/feature.xml @@ -0,0 +1,12 @@ + + + + + Default Java Platform Runtime Enviroment for Excelsior IDE. + + + diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/COPYRIGHT b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/COPYRIGHT new file mode 100644 index 0000000..defd406 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/COPYRIGHT @@ -0,0 +1,69 @@ +Copyright © 1993, 2015, Oracle and/or its affiliates. +All rights reserved. + +This software and related documentation are provided under a +license agreement containing restrictions on use and +disclosure and are protected by intellectual property laws. +Except as expressly permitted in your license agreement or +allowed by law, you may not use, copy, reproduce, translate, +broadcast, modify, license, transmit, distribute, exhibit, +perform, publish, or display any part, in any form, or by +any means. Reverse engineering, disassembly, or +decompilation of this software, unless required by law for +interoperability, is prohibited. + +The information contained herein is subject to change +without notice and is not warranted to be error-free. If you +find any errors, please report them to us in writing. + +If this is software or related documentation that is +delivered to the U.S. Government or anyone licensing it on +behalf of the U.S. Government, the following notice is +applicable: + +U.S. GOVERNMENT END USERS: Oracle programs, including any +operating system, integrated software, any programs +installed on the hardware, and/or documentation, delivered +to U.S. Government end users are "commercial computer +software" pursuant to the applicable Federal Acquisition +Regulation and agency-specific supplemental regulations. As +such, use, duplication, disclosure, modification, and +adaptation of the programs, including any operating system, +integrated software, any programs installed on the hardware, +and/or documentation, shall be subject to license terms and +license restrictions applicable to the programs. No other +rights are granted to the U.S. Government. + +This software or hardware is developed for general use in a +variety of information management applications. It is not +developed or intended for use in any inherently dangerous +applications, including applications that may create a risk +of personal injury. If you use this software or hardware in +dangerous applications, then you shall be responsible to +take all appropriate fail-safe, backup, redundancy, and +other measures to ensure its safe use. Oracle Corporation +and its affiliates disclaim any liability for any damages +caused by use of this software or hardware in dangerous +applications. + +Oracle and Java are registered trademarks of Oracle and/or +its affiliates. Other names may be trademarks of their +respective owners. + +Intel and Intel Xeon are trademarks or registered trademarks +of Intel Corporation. All SPARC trademarks are used under +license and are trademarks or registered trademarks of SPARC +International, Inc. AMD, Opteron, the AMD logo, and the AMD +Opteron logo are trademarks or registered trademarks of +Advanced Micro Devices. UNIX is a registered trademark of +The Open Group. + +This software or hardware and documentation may provide +access to or information on content, products, and services +from third parties. Oracle Corporation and its affiliates +are not responsible for and expressly disclaim all +warranties of any kind with respect to third-party content, +products, and services. Oracle Corporation and its +affiliates will not be responsible for any loss, costs, or +damages incurred due to your access to or use of third-party +content, products, or services. diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/LICENSE b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/LICENSE new file mode 100644 index 0000000..39e216a --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/LICENSE @@ -0,0 +1 @@ +Please refer to http://java.com/license diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/README.txt b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/README.txt new file mode 100644 index 0000000..cdb30f2 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/README.txt @@ -0,0 +1 @@ +Please refer to http://java.com/licensereadme diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME-JAVAFX.txt b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME-JAVAFX.txt new file mode 100644 index 0000000..ff9bbd0 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME-JAVAFX.txt @@ -0,0 +1,1531 @@ +DO NOT TRANSLATE OR LOCALIZE + +*************************************************************************** + +%%The following software may be included in this product: +Microsoft DirectShow - Base Classes + +Use of any of this software is governed by the terms of the license below: + +MSDN - Information on Terms of Use + +Updated: February 13, 2008 + +ON THIS PAGE + + * ACCEPTANCE OF TERMS + * PRIVACY AND PROTECTION OF PERSONAL INFORMATION + * NOTICE SPECIFIC TO APIs AVAILABLE ON THIS WEB SITE + * NOTICE SPECIFIC TO SOFTWARE AVAILABLE ON THIS WEB SITE + * NOTICE SPECIFIC TO DOCUMENTATION AVAILABLE ON THIS WEB SITE + * NOTICES REGARDING SOFTWARE, DOCUMENTATION, APIS AND SERVICES AVAILABLE ON +THIS WEB SITE + * RESERVATION OF RIGHTS + * MEMBER ACCOUNT, PASSWORD, AND SECURITY + * NO UNLAWFUL OR PROHIBITED USE + * USE OF SERVICES + * MATERIALS PROVIDED TO MICROSOFT OR POSTED AT ANY MICROSOFT WEB SITE + * NOTICES AND PROCEDURE FOR MAKING CLAIMS OF COPYRIGHT INFRINGEMENT + * LINKS TO THIRD PARTY SITES + * UNSOLICITED IDEA SUBMISSION POLICY + * COPYRIGHT NOTICE & FAQ + * TRADEMARKS + +ACCEPTANCE OF TERMS. + +Microsoft provides you with access to a variety of resources on this website +(“Web Siteâ€), including documentation and other product information +(collectively the “Documentationâ€), download areas, communication forums, and +other services (collectively "Services"), software, including developer tools +and sample code (collectively “Softwareâ€), and Application Program Interface +information (“APIsâ€). The Documentation, Services, Software, and APIs +(including any updates, enhancements, new features, and/or the addition of any +new Web properties to the Web Site), are subject to the following Terms of Use +("TOU"), unless we have provided those items to you under more specific terms, +in which case, those more specific terms will apply to the relevant item. +Microsoft reserves the right to update the TOU at any time without notice to +you. The most current version of the TOU can be reviewed by clicking on the +"Terms of Use" hypertext link located at the bottom of our Web pages. + +Top of page +PRIVACY AND PROTECTION OF PERSONAL INFORMATION. + +See the Privacy Statement disclosures relating to the collection and use of your +information. + +Top of page +NOTICE SPECIFIC TO APIS AVAILABLE ON THIS WEB SITE. + +Microsoft publishes information on a number of APIs on this Web Site. Microsoft +will not assert any of its patent rights on account of your products calling +these APIs in order to receive services from the Microsoft product that exposes +the APIs. + +Top of page +NOTICE SPECIFIC TO SOFTWARE AVAILABLE ON THIS WEB SITE. + +All Software is the copyrighted work of Microsoft and/or its suppliers. Use of +the Software is governed by the terms of the end user license agreement, if any, +which accompanies or is included with the Software ("License Agreement"). + +If Microsoft makes Software available on this Web Site without a License +Agreement, you may use such Software to design, develop and test your programs +to run on Microsoft products and services. + +If Microsoft makes any code marked as “sample†available on this Web Site +without a License Agreement, then that code is licensed to you under the terms +of the Microsoft Limited Public License. + +The Software is made available for download solely for use by end users +according to the License Agreement or these TOU. Any reproduction or +redistribution of the Software not in accordance with the License Agreement or +these TOU is expressly prohibited. + +WITHOUT LIMITING THE FOREGOING, COPYING OR REPRODUCTION OF THE SOFTWARE TO ANY +OTHER SERVER OR LOCATION FOR FURTHER REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY +PROHIBITED, UNLESS SUCH REPRODUCTION OR REDISTRIBUTION IS EXPRESSLY PERMITTED BY +THE LICENSE AGREEMENT ACCOMPANYING SUCH SOFTWARE. + +FOR YOUR CONVENIENCE, MICROSOFT MAY MAKE AVAILABLE ON THIS WEB SITE, TOOLS AND +UTILITIES FOR USE AND/OR DOWNLOAD. MICROSOFT DOES NOT MAKE ANY ASSURANCES WITH +REGARD TO THE ACCURACY OF THE RESULTS OR OUTPUT THAT DERIVES FROM SUCH USE OF +ANY SUCH TOOLS AND UTILITIES. PLEASE RESPECT THE INTELLECTUAL PROPERTY RIGHTS OF +OTHERS WHEN USING THE TOOLS AND UTILITIES MADE AVAILABLE ON THIS WEB SITE. + +RESTRICTED RIGHTS LEGEND. Any Software which is downloaded from the Web Site for +or on behalf of the United States of America, its agencies and/or +instrumentalities ("U.S. Government"), is provided with Restricted Rights... Use, +duplication, or disclosure by the U.S. Government is subject to restrictions as +set forth in subparagraph (c)(1)(ii) of the Rights in Technical Data and +Computer Software clause at DFARS 252.227-7013 or subparagraphs (c)(1) and (2) +of the Commercial Computer Software - Restricted Rights at 48 CFR 52.227-19, as +applicable. Manufacturer is Microsoft Corporation, One Microsoft Way, Redmond, +WA 98052-6399. + +Top of page +NOTICE SPECIFIC TO DOCUMENTATION AVAILABLE ON THIS WEB SITE. + +All Documentation is the copyrighted work of Microsoft and/or its suppliers. Use +of the Documentation is governed by the terms of the license agreement, if any, +which accompanies or is included with the Documentation ("Documentation License +Agreement"). + +If Documentation is made available to you on this Web Site without a +Documentation License Agreement, then You may annotate, translate, and make a +reasonable number of copies of the Documentation for your internal use in +designing, developing, and testing your software, products and services, and you +may distribute a reasonable amount of portions of the Documentation as necessary +to document your software, products, and services. You may not publish any such +annotations or translations. You must preserve the below copyright notice in +all copies of the Documentation and ensure that both the copyright notice and +this permission notice appear in those copies. Accredited educational +institutions, such as K-12, universities, private/public colleges, and state +community colleges, may download and reproduce the Documentation for +distribution in the classroom. Distribution outside the classroom requires +express written permission. Use for any other purpose is expressly prohibited + +The Documentation does not include the design or layout of the Microsoft.com Web +site or any other Microsoft owned, operated, licensed or controlled site. +Elements of Microsoft Web sites are protected by trade dress, trademark, unfair +competition, and other laws and may not be copied or imitated in whole or in +part. No logo, graphic, sound or image from any Microsoft Web site may be copied +or retransmitted unless expressly permitted by Microsoft. + +THE DOCUMENTATION AND RELATED GRAPHICS PUBLISHED ON THE WEB SITE COULD INCLUDE +TECHNICAL INACCURACIES OR TYPOGRAPHICAL ERRORS. CHANGES ARE PERIODICALLY ADDED +TO THE INFORMATION IN THIS WEB SITE. MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS +MAY MAKE IMPROVEMENTS AND/OR CHANGES IN THE PRODUCT(S) AND/OR THE PROGRAM(S) +DESCRIBED IN THIS WEB SITE AT ANY TIME. + +Top of page +NOTICES REGARDING SOFTWARE, DOCUMENTATION, APIS AND SERVICES AVAILABLE ON THIS +WEB SITE. + +THE SOFTWARE, DOCUMENTATION, APIS, AND SERVICES ARE WARRANTED, IF AT ALL, ONLY +ACCORDING TO THE TERMS OF ASEPARATE AGREEMENT THAT COVERS THE APPLICABLE +SOFTWARE, DOCUMENTATION, APIS, OR SERVICES. EXCEPT AS WARRANTED IN THAT SEPARATE +AGREEMENT (IF ANY), MICROSOFT CORPORATION HEREBY DISCLAIMS ALL WARRANTIES AND +CONDITIONS WITH REGARD TO THE SOFTWARE, DOCUMENTATION, APIS, AND SERVICES, +INCLUDING ALL WARRANTIES AND CONDITIONS OF MERCHANTABILITY, WHETHER EXPRESS, +IMPLIED OR STATUTORY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. + +IN NO EVENT SHALL MICROSOFT AND/OR ITS RESPECTIVE SUPPLIERS BE LIABLE FOR ANY +SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING +FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE +OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF SOFTWARE, DOCUMENTATION, APIS, PROVISION OF OR FAILURE TO PROVIDE +SERVICES, OR INFORMATION AVAILABLE FROM ANY OF THE FOREGOING SOFTWARE, +DOCUMENTATION, APIS OR SERVICES. + +Top of page +RESERVATION OF RIGHTS. + +Microsoft reserves all rights not expressly granted under these TOU, and no +other rights are granted under these TOU by implication or estoppel or otherwise. + +Top of page +MEMBER ACCOUNT, PASSWORD, AND SECURITY. + +If any of the Services requires you to open an account, you must complete the +registration process by providing us with current, complete and accurate +information as prompted by the applicable registration form. You also will +choose a password and a user name. You are entirely responsible for maintaining +the confidentiality of your password and account. Furthermore, you are entirely +responsible for any and all activities that occur under your account. You agree +to notify Microsoft immediately of any unauthorized use of your account or any +other breach of security. Microsoft will not be liable for any loss that you may +incur as a result of someone else using your password or account, either with or +without your knowledge. However, you could be held liable for losses incurred by +Microsoft or another party due to someone else using your account or password. +You may not use anyone else's account at any time, without the permission of the +account holder. + +Top of page +NO UNLAWFUL OR PROHIBITED USE. + +As a condition of your use of the Services, you will not use the Services for +any purpose that is unlawful or prohibited by these terms, conditions, and +notices. You may not use the Services in any manner that could damage, disable, +overburden, or impair any Microsoft server, or the network(s) connected to any +Microsoft server, or interfere with any other party's use and enjoyment of any +Services. You may not attempt to gain unauthorized access to any Services, other +accounts, computer systems or networks connected to any Microsoft server or to +any of the Services, through hacking, password mining or any other means. You +may not obtain or attempt to obtain any materials or information through any +means not intentionally made available through the Services. + +Top of page +USE OF SERVICES. + +The Services may contain e-mail services, bulletin board services, chat areas, +news groups, forums, communities, personal web pages, calendars, photo albums, +file cabinets and/or other message or communication facilities designed to +enable you to communicate with others (each a "Communication Service" and +collectively "Communication Services"). You agree to use the Communication +Services only to post, send and receive messages and material that are proper +and, when applicable, related to the particular Communication Service. By way of +example, and not as a limitation, you agree that when using the Communication +Services, you will not: + + * Use the Communication Services in connection with surveys, contests, +pyramid schemes, chain letters, junk email, spamming or any duplicative or +unsolicited messages (commercial or otherwise). + * Defame, abuse, harass, stalk, threaten or otherwise violate the legal +rights (such as rights of privacy and publicity) of others. + * Publish, post, upload, distribute or disseminate any inappropriate, +profane, defamatory, obscene, indecent or unlawful topic, name, material or +information. + * Upload, or otherwise make available, files that contain images, +photographs, software or other material protected by intellectual property laws, +including, by way of example, and not as limitation, copyright or trademark laws +(or by rights of privacy or publicity) unless you own or control the rights +thereto or have received all necessary consent to do the same. + * Use any material or information, including images or photographs, which +are made available through the Services in any manner that infringes any +copyright, trademark, patent, trade secret, or other proprietary right of any party. + * Upload files that contain viruses, Trojan horses, worms, time bombs, +cancelbots, corrupted files, or any other similar software or programs that may +damage the operation of another's computer or property of another. + * Advertise or offer to sell or buy any goods or services for any business +purpose, unless such Communication Services specifically allows such messages. + * Download any file posted by another user of a Communication Service that +you know, or reasonably should know, cannot be legally reproduced, displayed, +performed, and/or distributed in such manner. + * Falsify or delete any copyright management information, such as author +attributions, legal or other proper notices or proprietary designations or +labels of the origin or source of software or other material contained in a file +that is uploaded. + * Restrict or inhibit any other user from using and enjoying the +Communication Services. + * Violate any code of conduct or other guidelines which may be applicable +for any particular Communication Service. + * Harvest or otherwise collect information about others, including e-mail +addresses. + * Violate any applicable laws or regulations. + * Create a false identity for the purpose of misleading others. + * Use, download or otherwise copy, or provide (whether or not for a fee) to +a person or entity any directory of users of the Services or other user or usage +information or any portion thereof. + +Microsoft has no obligation to monitor the Communication Services. However, +Microsoft reserves the right to review materials posted to the Communication +Services and to remove any materials in its sole discretion. Microsoft reserves +the right to terminate your access to any or all of the Communication Services +at any time, without notice, for any reason whatsoever. + +Microsoft reserves the right at all times to disclose any information as +Microsoft deems necessary to satisfy any applicable law, regulation, legal +process or governmental request, or to edit, refuse to post or to remove any +information or materials, in whole or in part, in Microsoft's sole discretion. + +Always use caution when giving out any personally identifiable information about +yourself or your children in any Communication Services. Microsoft does not +control or endorse the content, messages or information found in any +Communication Services and, therefore, Microsoft specifically disclaims any +liability with regard to the Communication Services and any actions resulting +from your participation in any Communication Services. Managers and hosts are +not authorized Microsoft spokespersons, and their views do not necessarily +reflect those of Microsoft. + +Materials uploaded to the Communication Services may be subject to posted +limitations on usage, reproduction and/or dissemination; you are responsible for +adhering to such limitations if you download the materials. + +Top of page +MATERIALS PROVIDED TO MICROSOFT OR POSTED AT ANY MICROSOFT WEB SITE. + +Microsoft does not claim ownership of the materials you provide to Microsoft +(including feedback and suggestions) or post, upload, input or submit to any +Services or its associated services for review by the general public, or by the +members of any public or private community, (each a "Submission" and +collectively "Submissions"). However, by posting, uploading, inputting, +providing or submitting ("Posting") your Submission you are granting Microsoft, +its affiliated companies, necessary sublicensees (including third parties whose +products , technologies and services use or interface with any specific parts of +a Microsoft software or service that includes the Submission) , without charge, +the right to use, share and commercialize your Submission in any way and for +any purpose. You will not give any Submission that is subject to a license that +requires Microsoft to license its software or documentation to third parties +because we include your Submission in them. + +Microsoft is under no obligation to post or use any Submission you may provide, +and Microsoft may remove any Submission at any time in its sole discretion. + +By Posting a Submission you warrant and represent that you own or otherwise +control all of the rights to your Submission as described in these TOU +including, without limitation, all the rights necessary for you to Post the +Submissions. + +In addition to the warranty and representation set forth above, by Posting a +Submission that contains images, photographs, pictures or that are otherwise +graphical in whole or in part ("Images"), you warrant and represent that (a) you +are the copyright owner of such Images, or that the copyright owner of such +Images has granted you permission to use such Images or any content and/or +images contained in such Images consistent with the manner and purpose of your +use and as otherwise permitted by these TOU, (b) you have the rights necessary +to grant the licenses and sublicenses described in these TOU, and (c) that each +person depicted in such Images, if any, has provided consent to the use of the +Images as set forth in these TOU, including, by way of example, and not as a +limitation, the distribution, public display and reproduction of such Images. By +Posting Images, you are granting (a) to all members of your private community +(for each such Images available to members of such private community), and/or +(b) to the general public (for each such Images available anywhere on the +Services or Web Site, other than a private community), permission to use your +Images in connection with the use, as permitted by these TOU, of any of the +Services or Web Site, (including, by way of example, and not as a limitation, +making prints and gift items which include such Images), and including, without +limitation, a non-exclusive, world-wide, royalty-free license to: copy, +distribute, transmit, publicly display, publicly perform, reproduce, edit, +translate and reformat your Images without having your name attached to such +Images, and the right to sublicense such rights to any supplier of the Services. +The licenses granted in the preceding sentences for a Images will terminate at +the time you completely remove such Images from the Services or Web Site, +provided that such termination shall not affect any licenses granted in +connection with such Images prior to the time you completely remove such Images. +No compensation will be paid with respect to the use of your Images. + +Top of page +NOTICES AND PROCEDURE FOR MAKING CLAIMS OF COPYRIGHT INFRINGEMENT. + +Pursuant to Title 17, United States Code, Section 512(c)(2), notifications of +claimed copyright infringement should be sent to Service Provider's Designated +Agent. ALL INQUIRIES NOT RELEVANT TO THE FOLLOWING PROCEDURE WILL NOT RECEIVE A +RESPONSE. + +See Notice and Procedure for Making Claims of Copyright Infringement. + +Top of page +LINKS TO THIRD PARTY SITES. + +THE LINKS IN THIS AREA WILL LET YOU LEAVE MICROSOFT'S SITE. THE LINKED SITES ARE +NOT UNDER THE CONTROL OF MICROSOFT AND MICROSOFT IS NOT RESPONSIBLE FOR THE +CONTENTS OF ANY LINKED SITE OR ANY LINK CONTAINED IN A LINKED SITE, OR ANY +CHANGES OR UPDATES TO SUCH SITES. MICROSOFT IS NOT RESPONSIBLE FOR WEBCASTING OR +ANY OTHER FORM OF TRANSMISSION RECEIVED FROM ANY LINKED SITE. MICROSOFT IS +PROVIDING THESE LINKS TO YOU ONLY AS A CONVENIENCE, AND THE INCLUSION OF ANY +LINK DOES NOT IMPLY ENDORSEMENT BY MICROSOFT OF THE SITE. + +Top of page +UNSOLICITED IDEA SUBMISSION POLICY. + +MICROSOFT OR ANY OF ITS EMPLOYEES DO NOT ACCEPT OR CONSIDER UNSOLICITED IDEAS, +INCLUDING IDEAS FOR NEW ADVERTISING CAMPAIGNS, NEW PROMOTIONS, NEW PRODUCTS OR +TECHNOLOGIES, PROCESSES, MATERIALS, MARKETING PLANS OR NEW PRODUCT NAMES. PLEASE +DO NOT SEND ANY ORIGINAL CREATIVE ARTWORK, SAMPLES, DEMOS, OR OTHER WORKS... THE +SOLE PURPOSE OF THIS POLICY IS TO AVOID POTENTIAL MISUNDERSTANDINGS OR DISPUTES +WHEN MICROSOFT'S PRODUCTS OR MARKETING STRATEGIES MIGHT SEEM SIMILAR TO IDEAS +SUBMITTED TO MICROSOFT. SO, PLEASE DO NOT SEND YOUR UNSOLICITED IDEAS TO +MICROSOFT OR ANYONE AT MICROSOFT. IF, DESPITE OUR REQUEST THAT YOU NOT SEND US +YOUR IDEAS AND MATERIALS, YOU STILL SEND THEM, PLEASE UNDERSTAND THAT MICROSOFT +MAKES NO ASSURANCES THAT YOUR IDEAS AND MATERIALS WILL BE TREATED AS +CONFIDENTIAL OR PROPRIETARY. + +Top of page +COPYRIGHT NOTICE & FAQ. + +© 2008 Microsoft Corporation. All rights reserved. + +The following is provided for informational purposes only and should not be +construed as legal advice. If you need legal advice, contact a lawyer. + +What is copyright? + +Copyright law protects original works, such as websites, books, music, +paintings, photos and video. A work is “original†if it contains some elements +you created and did not borrow from others. Typically, when you create an +original work, you own the copyright. As the copyright owner, you can control +how others use your work. For example, if you write a movie script, you have the +right to, and can prevent others from, copying your script, sharing it with +others (“distributing itâ€), making a movie or book from your script (a +“derivative workâ€), or publicly performing your script as a play or movie. You +also have the ability to sell or give away these rights. In other words, you +could sell the right to make a movie based on your script to a movie studio. + +If you use someone else’s copyrighted materials without permission, that use +generally violates the copyright owner's exclusive rights, and is copyright +infringement. So if you create a new work and include parts of other people’s +works in it (such as an existing photo, lengthy quotes from a book or a loop +from a song), you must own or have permission to use the elements you borrow. +For example, if your script is based on an existing popular series, you should +obtain permission to use the elements you borrow from the series. + +Copyright law is different from the law of personal property. If you buy a +physical object, such as a movie on DVD, you own the physical object. You do +not, however, obtain ownership of the “copyrights†(the rights to make copies, +distribute, make derivatives and publicly perform or display) in the content of +the movie. The fact that you have obtained physical possession of a DVD does not +automatically grant you the right to copy or share it. + +If you make your own movie, it may include many copyrighted works in it. So, if +you decide to make a movie based on your script, you must either create all +elements of it on your own, or have permission to use the elements you borrow. +Especially keep in mind that photos or artwork hanging on the walls of your sets +and music on the soundtrack (even if you own the CD or MP3) may be copyrighted. +You should not include copyrighted works such as these in your movie without +authorization. + +A few other things to keep in mind are: + + 1. Just because a work does not include a copyright notice (e.g., © 2006 +Microsoft Corporation) does not mean the work is in the public domain. Copyright +notices are generally not required for works to be protected by copyright. + 2. Just because a work is easily available on the internet or elsewhere does +not mean you may use the work freely. Look for terms of use, such as Creative +Commons, that explain how works you find on the Internet may be used. + +Isn't it in the public domain? + +Just because a work is freely available, does not mean it is in the “public +domain.†Copyright is for a limited term; it does not last forever. In the +copyright context, “public domain†means the copyright term has expired. Once a +work is in the public domain, it may be freely used without permission from the +copyright owner. + +Determining the term of copyright can be complex, particularly because copyright +laws vary from country to country. Also, even if the copyright on a work has +expired, you should be careful about how you use a public domain work. For +example, a book may be in the public domain, but it might not be ok to scan the +book cover to cover and post it on the internet. This is because the particular +version of the book may contain new copyrightable material that is not in the +public domain, such as cover art or footnotes. + +What about fair use? + +In limited situations, you can use copyrighted works without permission from the +copyright holder. It can be difficult to figure out whether use of copyrighted +works without permission is legal, though, because the laws in this area are +often vague and vary from country to country. + +The copyright law in the United States has a doctrine called “fair useâ€. Fair +use provides a defense to copyright infringement in some circumstances. For +example, fair use allows documentary filmmakers to use very short clips of +copyrighted movies, music and news footage without permission from the copyright +owner. Fair use is a difficult concept because determining whether something is +a fair use involves weighing four factors. Unfortunately, weighing the fair use +factors rarely results in a clear-cut answer. + +Rather than applying a fair use test, many other countries have specific +exceptions to copyright infringement. The number and type of exceptions vary by +country, but they frequently allow copyrighted materials to be used without +permission from the copyright holder for activities such as nonprofit research, +teaching, news reporting, or private study. + +If you incorrectly decide that something is a fair use or falls into an +exception to copyright infringement, you could be held criminally and civilly +liable and have to pay damages. We suggest you talk to a lawyer if you have +questions regarding fair uses of copyrighted works. + +What happens if you upload copyrighted materials to one of our websites without +permission? + +By law, we are required to take down videos, music, photographs or other content +you upload onto a website hosted by Microsoft if we learn that it infringes +someone else’s copyright. If you believe that we have mistakenly taken down +content you uploaded that you own or have permission to upload, you can also let +us know that. Finally, if you upload infringing content repeatedly, we will +terminate your account and you could face criminal and civil penalties. So +please, respect other people’s copyrights. + +What if my stuff is on a Microsoft website without my permission? + +If you believe that anything on a website hosted by Microsoft infringes your +copyright, let us know. Just provide us with the information requested here and +we will see that your copyrighted works are taken down. + +What if I don't want my website crawled? + +Microsoft search services (MSN Search and Windows Live Search) follow the Robots +Exclusion Standards. This means that you can control which pages Microsoft +search engines index and how often Microsoft bots access your website. To learn +how to do so, or for more information regarding Microsoft’s webcrawling and site +indexing practices, please visit http://search.msn.com/docs/siteowner.aspx. + +Top of page +TRADEMARKS. + +Trademark information is available at +http://www.microsoft.com/library/toolbar/3.0/trademarks/en-us.mspx. + +Any rights not expressly granted herein are reserved. + +Send your questions to the appropriate contact as listed below: + + * Microsoft Web properties, contact homepage@microsoft.com. + * MSN Web properties, contact webmaster@msn.com. + * Hotmail, contact support@hotmail.com; for spam/privacy issues, contact +abuse@hotmail.com or hotmailprivacy@hotmail.com. + * Piracy questions can be routed to piracy@microsoft.com or by calling +1-800-R-U-LEGIT. + +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Microsoft Public License (Ms-PL) +Mon, 2007-10-15 19:23 — nelson + +This license governs use of the accompanying software. If you use the software, you +accept this license. If you do not accept the license, do not use the software. + +1. Definitions +The terms "reproduce," "reproduction," "derivative works," and "distribution" +have the +same meaning here as under U.S. copyright law. +A "contribution" is the original software, or any additions or changes to the +software. +A "contributor" is any person that distributes its contribution under this license. +"Licensed patents" are a contributor's patent claims that read directly on its +contribution. + +2. Grant of Rights +(A) Copyright Grant- Subject to the terms of this license, including the license +conditions and limitations in section 3, each contributor grants you a +non-exclusive, worldwide, royalty-free copyright license to reproduce its +contribution, prepare derivative works of its contribution, and distribute its +contribution or any derivative works that you create. +(B) Patent Grant- Subject to the terms of this license, including the license +conditions and limitations in section 3, each contributor grants you a +non-exclusive, worldwide, royalty-free license under its licensed patents to +make, have made, use, sell, offer for sale, import, and/or otherwise dispose of +its contribution in the software or derivative works of the contribution in the +software. + +3. Conditions and Limitations +(A) No Trademark License- This license does not grant you rights to use any +contributors' name, logo, or trademarks. +(B) If you bring a patent claim against any contributor over patents that you +claim are infringed by the software, your patent license from such contributor +to the software ends automatically. +(C) If you distribute any portion of the software, you must retain all +copyright, patent, trademark, and attribution notices that are present in the +software. +(D) If you distribute any portion of the software in source code form, you may +do so only under this license by including a complete copy of this license with +your distribution. If you distribute any portion of the software in compiled or +object code form, you may only do so under a license that complies with this +license. +(E) The software is licensed "as-is." You bear the risk of using it. The +contributors give no express warranties, guarantees or conditions. You may have +additional consumer rights under your local laws which this license cannot +change. To the extent permitted under your local laws, the contributors exclude +the implied warranties of merchantability, fitness for a particular purpose and +non-infringement. + +*************************************************************************** + +%%The following software may be included in this product: +Apache Batik + +Use of any of this software is governed by the terms of the license below: + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution..." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) 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. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +*************************************************************************** + +%%The following software may be included in this product: +ASM + +Use of any of this software is governed by the terms of the license below: + +Copyright (c) 2000-2005 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +JPEG + +Use of any of this software is governed by the terms of the license below: + +Taken from code...... + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The Unix configuration script "configure" was produced with GNU Autoconf. +It is copyright by the Free Software Foundation but is freely distributable. +The same holds for its supporting scripts (config.guess, config.sub, +ltconfig, ltmain.sh). Another support script, install-sh, is copyright +by M.I.T. but is also freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +The IJG distribution formerly included code to read and write GIF files. +To avoid entanglement with the Unisys LZW patent, GIF reading support has +been removed altogether, and the GIF writer has been simplified to produce +"uncompressed GIFs". This technique does not use the LZW algorithm; the +resulting GIF files are larger than usual, but are readable by all standard +GIF decoders. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + +Additional License(s) + +"copyright" + +*************************************************************************** + +MD5 License +"THE BEER-WARE LICENSE" (Revision 42): + wrote this file. As long as you retain this +notice you can do whatever you want with this stuff. If we meet some +day, and you think this stuff is worth it, you can buy me a beer in +return. Poul-Henning Kamp + + + + + +*************************************************************************** + + +%%The following software may be included in this product: +ANTLR Java runtime binary only jar + +Use of any of this software is governed by the terms of the license below: + +ANTLR 3 License + +[The BSD License] +Copyright (c) 2003-2007, Terence Parr +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + * Neither the name of the author nor the names of its contributors may be +used to endorse or promote products derived from this software without specific +prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +gstreamer + +You are receiving a copy of the GStreamer library in object code in the +JavaFX runtime or JavaFX SDK. A +copy of the Oracle modified GStreamer library in source code is located +at http://oss.oracle.com/projects/gstreamer-mods/ . The terms of the +Oracle license do NOT apply to the GStreamer program; it is licensed under +the following license, separately from the Oracle programs you receive. If +you do not wish to install this program, you may not wish to install +the JavaFX Runtime or JavaFX SDK. + +Use of any of this software is governed by the terms of the license below: + +GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 +Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. +[This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and +change it. By contrast, the GNU General Public Licenses are intended to guarantee +your freedom to share and change free software--to make sure the software is free +for all its users. +This license, the Lesser General Public License, applies to some specially +designated software packages--typically libraries--of the Free Software Foundation +and other authors who decide to use it. You can use it too, but we suggest you first +think carefully about whether this license or the ordinary General Public License is +the better strategy to use in any particular case, based on the explanations below. +When we speak of free software, we are referring to freedom of use, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish); that +you receive source code or can get it if you want it; that you can change the +software and use pieces of it in new free programs; and that you are informed that +you can do these things. +To protect your rights, we need to make restrictions that forbid distributors to +deny you these rights or to ask you to surrender these rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +library or if you modify it. +For example, if you distribute copies of the library, whether gratis or for a fee, +you must give the recipients all the rights that we gave you. You must make sure +that they, too, receive or can get the source code. If you link other code with the +library, you must provide complete object files to the recipients, so that they can +relink them with the library after making changes to the library and recompiling it. +And you must show them these terms so they know their rights. +We protect your rights with a two-step method: (1) we copyright the library, and (2) +we offer you this license, which gives you legal permission to copy, distribute +and/or modify the library. +To protect each distributor, we want to make it very clear that there is no warranty +for the free library. Also, if the library is modified by someone else and passed +on, the recipients should know that what they have is not the original version, so +that the original author's reputation will not be affected by problems that might be +introduced by others. +Finally, software patents pose a constant threat to the existence of any free +program. We wish to make sure that a company cannot effectively restrict the users +of a free program by obtaining a restrictive license from a patent holder. +Therefore, we insist that any patent license obtained for a version of the library +must be consistent with the full freedom of use specified in this license. +Most GNU software, including some libraries, is covered by the ordinary GNU General +Public License. This license, the GNU Lesser General Public License, applies to +certain designated libraries, and is quite different from the ordinary General +Public License. We use this license for certain libraries in order to permit linking +those libraries into non-free programs. +When a program is linked with a library, whether statically or using a shared +library, the combination of the two is legally speaking a combined work, a +derivative of the original library. The ordinary General Public License therefore +permits such linking only if the entire combination fits its criteria of freedom. +The Lesser General Public License permits more lax criteria for linking other code +with the library. +We call this license the "Lesser" General Public License because it does Less to +protect the user's freedom than the ordinary General Public License. It also +provides other free software developers Less of an advantage over competing non-free +programs. These disadvantages are the reason we use the ordinary General Public +License for many libraries. However, the Lesser license provides advantages in +certain special circumstances. +For example, on rare occasions, there may be a special need to encourage the widest +possible use of a certain library, so that it becomes a de-facto standard. To +achieve this, non-free programs must be allowed to use the library. A more frequent +case is that a free library does the same job as widely used non-free libraries. In +this case, there is little to gain by limiting the free library to free software +only, so we use the Lesser General Public License. +In other cases, permission to use a particular library in non-free programs enables +a greater number of people to use a large body of free software. For example, +permission to use the GNU C Library in non-free programs enables many more people to +use the whole GNU operating system, as well as its variant, the GNU/Linux operating +system. +Although the Lesser General Public License is Less protective of the users' freedom, +it does ensure that the user of a program that is linked with the Library has the +freedom and the wherewithal to run that program using a modified version of the +Library. +The precise terms and conditions for copying, distribution and modification follow. +Pay close attention to the difference between a "work based on the library" and a +"work that uses the library". The former contains code derived from the library, +whereas the latter must be combined with the library in order to run. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which +contains a notice placed by the copyright holder or other authorized party saying it +may be distributed under the terms of this Lesser General Public License (also +called "this License"). Each licensee is addressed as "you". +A "library" means a collection of software functions and/or data prepared so as to +be conveniently linked with application programs (which use some of those functions +and data) to form executables. +The "Library", below, refers to any such software library or work which has been +distributed under these terms. A "work based on the Library" means either the +Library or any derivative work under copyright law: that is to say, a work +containing the Library or a portion of it, either verbatim or with modifications +and/or translated straightforwardly into another language. (Hereinafter, translation +is included without limitation in the term "modification".) +"Source code" for a work means the preferred form of the work for making +modifications to it. For a library, complete source code means all the source code +for all modules it contains, plus any associated interface definition files, plus +the scripts used to control compilation and installation of the library. +Activities other than copying, distribution and modification are not covered by this +License; they are outside its scope. The act of running a program using the Library +is not restricted, and output from such a program is covered only if its contents +constitute a work based on the Library (independent of the use of the Library in a +tool for writing it). Whether that is true depends on what the Library does and what +the program that uses the Library does. +1. You may copy and distribute verbatim copies of the Library's complete source code +as you receive it, in any medium, provided that you conspicuously and appropriately +publish on each copy an appropriate copyright notice and disclaimer of warranty; +keep intact all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the Library. +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. +2. You may modify your copy or copies of the Library or any portion of it, thus +forming a work based on the Library, and copy and distribute such modifications or +work under the terms of Section 1 above, provided that you also meet all of these +conditions: +a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you +changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third +parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to +be supplied by an application program that uses the facility, other than as an +argument passed when the facility is invoked, then you must make a good faith effort +to ensure that, in the event an application does not supply such function or table, +the facility still operates, and performs whatever part of its purpose remains +meaningful. (For example, a function in a library to compute square roots has a purpose that is +entirely well-defined independent of the application. Therefore, Subsection 2d +requires that any application-supplied function or table used by this function must +be optional: if the application does not supply it, the square root function must +still compute square roots.) +These requirements apply to the modified work as a whole. If identifiable sections +of that work are not derived from the Library, and can be reasonably considered +independent and separate works in themselves, then this License, and its terms, do +not apply to those sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based on the +Library, the distribution of the whole must be on the terms of this License, whose +permissions for other licensees extend to the entire whole, and thus to each and +every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to +work written entirely by you; rather, the intent is to exercise the right to control +the distribution of derivative or collective works based on the Library. +In addition, mere aggregation of another work not based on the Library with the +Library (or with a work based on the Library) on a volume of a storage or +distribution medium does not bring the other work under the scope of this License. +3. You may opt to apply the terms of the ordinary GNU General Public License instead +of this License to a given copy of the Library. To do this, you must alter all the +notices that refer to this License, so that they refer to the ordinary GNU General +Public License, version 2, instead of to this License. (If a newer version than +version 2 of the ordinary GNU General Public License has appeared, then you can +specify that version instead if you wish.) Do not make any other change in these +notices. +Once this change is made in a given copy, it is irreversible for that copy, so the +ordinary GNU General Public License applies to all subsequent copies and derivative +works made from that copy. +This option is useful when you wish to copy part of the code of the Library into a +program that is not a library. +4. You may copy and distribute the Library (or a portion or derivative of it, under +Section 2) in object code or executable form under the terms of Sections 1 and 2 +above provided that you accompany it with the complete corresponding machine- +readable source code, which must be distributed under the terms of Sections 1 and 2 +above on a medium customarily used for software interchange. +If distribution of object code is made by offering access to copy from a designated +place, then offering equivalent access to copy the source code from the same place +satisfies the requirement to distribute the source code, even though third parties +are not compelled to copy the source along with the object code. +5. A program that contains no derivative of any portion of the Library, but is +designed to work with the Library by being compiled or linked with it, is called a +"work that uses the Library". Such a work, in isolation, is not a derivative work of +the Library, and therefore falls outside the scope of this License. +However, linking a "work that uses the Library" with the Library creates an +executable that is a derivative of the Library (because it contains portions of the +Library), rather than a "work that uses the library". The executable is therefore +covered by this License. Section 6 states terms for distribution of such +executables. +When a "work that uses the Library" uses material from a header file that is part of +the Library, the object code for the work may be a derivative work of the Library +even though the source code is not. Whether this is true is especially significant +if the work can be linked without the Library, or if the work is itself a library. +The threshold for this to be true is not precisely defined by law. +If such an object file uses only numerical parameters, data structure layouts and +accessors, and small macros and small inline functions (ten lines or less in +length), then the use of the object file is unrestricted, regardless of whether it +is legally a derivative work. (Executables containing this object code plus portions +of the Library will still fall under Section 6.) +Otherwise, if the work is a derivative of the Library, you may distribute the object +code for the work under the terms of Section 6. Any executables containing that work +also fall under Section 6, whether or not they are linked directly with the Library +itself. +6. As an exception to the Sections above, you may also combine or link a "work that +uses the Library" with the Library to produce a work containing portions of the +Library, and distribute that work under terms of your choice, provided that the +terms permit modification of the work for the customer's own use and reverse +engineering for debugging such modifications. +You must give prominent notice with each copy of the work that the Library is used +in it and that the Library and its use are covered by this License. You must supply +a copy of this License. If the work during execution displays copyright notices, you +must include the copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one of these +things: +a) Accompany the work with the complete corresponding machine-readable source code +for the Library including whatever changes were used in the work (which must be +distributed under Sections 1 and 2 above); and, if the work is an executable linked +with the Library, with the complete machine-readable "work that uses the Library", +as object code and/or source code, so that the user can modify the Library and then +relink to produce a modified executable containing the modified Library. (It is +understood that the user who changes the contents of definitions files in the +Library will not necessarily be able to recompile the application to use the +modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable +mechanism is one that (1) uses at run time a copy of the library already present on +the user's computer system, rather than copying library functions into the +executable, and (2) will operate properly with a modified version of the library, if +the user installs one, as long as the modified version is interface-compatible with +the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give +the same user the materials specified in Subsection 6a, above, for a charge no more +than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated +place, offer equivalent access to copy the above specified materials from the same +place. e) Verify that the user has already received a copy of these materials or that you +have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must +include any data and utility programs needed for reproducing the executable from it. +However, as a special exception, the materials to be distributed need not include +anything that is normally distributed (in either source or binary form) with the +major components (compiler, kernel, and so on) of the operating system on which the +executable runs, unless that component itself accompanies the executable. +It may happen that this requirement contradicts the license restrictions of other +proprietary libraries that do not normally accompany the operating system. Such a +contradiction means you cannot use both them and the Library together in an +executable that you distribute. +7. You may place library facilities that are a work based on the Library side-by- +side in a single library together with other library facilities not covered by this +License, and distribute such a combined library, provided that the separate +distribution of the work based on the Library and of the other library facilities is +otherwise permitted, and provided that you do these two things: +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. +13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the +Free Software Foundation. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. +NO WARRANTY +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH +YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE +OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). +To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. one line to give the library's name and an idea of what it does. Copyright (C) year name of author +This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. +This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. +You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. +You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: +Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. +signature of Ty Coon, 1 April 1990 Ty Coon, President of Vice That's all there is to it! + +*************************************************************************** + +%%The following software may be included in this product: +JFXtras Core v 0.5 + +Use of any of this software is governed by the terms of the license below: +Copyright (c) 2008-2009, JFXtras Group +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. +3. Neither the name of JFXtras nor the names of its contributors may be used + to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE + +*************************************************************************** + +%%The following software may be included in this product: +Webkit + +You are receiving a copy of the WebKit library in object code in the +JavaFX runtime or JavaFX SDK. +A copy of the Oracle modified WebKit library in source code is located +at http://oss.oracle.com/projects/webkit-java-mods/ . The terms of the +Oracle license do NOT apply to the WebKit program; it is licensed under +the following license separately from the Oracle programs you receive. +If you do not wish to install this program, you may not wish to install +the JavaFX runtime or JavaFX SDK. + +Use of any of this software is governed by the terms of the license below: + +GNU LIBRARY GENERAL PUBLIC LICENSE +Version 2, June 1991 +Copyright (C) 1991 Free Software Foundation, Inc. +51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] +Preamble +The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. +This license, the Library General Public License, applies to some specially designated Free Software Foundation software, and to any other libraries whose authors decide to use it. You can use it for your libraries, too. +When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. +To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library, or if you modify it. +For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link a program with the library, you must provide complete object files to the recipients so that they can relink them with the library, after making changes to the library and recompiling it. And you must show them these terms so they know their rights. +Our method of protecting your rights has two steps: (1) copyright the library, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the library. +Also, for each distributor's protection, we want to make certain that everyone understands that there is no warranty for this free library. If the library is modified by someone else and passed on, we want its recipients to know that what they have is not the original version, so that any problems introduced by others will not reflect on the original authors' reputations. +Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that companies distributing free software will individually obtain patent licenses, thus in effect transforming the program into proprietary software. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. +Most GNU software, including some libraries, is covered by the ordinary GNU General Public License, which was designed for utility programs. This license, the GNU Library General Public License, applies to certain designated libraries. This license is quite different from the ordinary one; be sure to read it in full, and don't assume that anything in it is the same as in the ordinary license. +The reason we have a separate public license for some libraries is that they blur the distinction we usually make between modifying or adding to a program and simply using it. Linking a program with a library, without changing the library, is in some sense simply using the library, and is analogous to running a utility program or application program. However, in a textual and legal sense, the linked executable is a combined work, a derivative of the original library, and the ordinary General Public License treats it as such. +Because of this blurred distinction, using the ordinary General Public License for libraries did not effectively promote software sharing, because most developers did not use the libraries. We concluded that weaker conditions might promote sharing better. +However, unrestricted linking of non-free programs would deprive the users of those programs of all benefit from the free status of the libraries themselves. This Library General Public License is intended to permit developers of non-free programs to use free libraries, while preserving your freedom as a user of such programs to change the free libraries that are incorporated in them. (We have not seen how to achieve this as regards changes in header files, but we have achieved it as regards changes in the actual functions of the Library.) The hope is that this will lead to faster development of free libraries. +The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, while the latter only works together with the library. +Note that it is possible for a library to be covered by the ordinary General Public License rather than by this special one. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +0. This License Agreement applies to any software library which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Library General Public License (also called "this License"). Each licensee is addressed as "you". +A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. +The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) +"Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. +Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. +1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. +You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. +2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: +a) The modified work must itself be a software library. +b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. +c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. +d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) +These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. +Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. +In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. +3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. +Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. +This option is useful when you wish to copy part of the code of the Library into a program that is not a library. +4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. +If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. +5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. +However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. +When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. +If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) +Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. +6. As an exception to the Sections above, you may also compile or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. +You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: +a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) +b) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. +c) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. +d) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. +For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. +It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. +7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: +a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. +b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. +8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. +9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. +10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. +11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. +If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. +It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. +This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. +12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. +13. The Free Software Foundation may publish revised and/or new versions of the Library General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. +Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. +14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. +NO WARRANTY +15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. +16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + + + +*************************************************************************** + +%%The following software may be included in this product: +zlib + + +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.2, October 3rd, 2004 + + Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly jloup@gzip.org + Mark Adler madler@alumni.caltech.edu + +*/ + +*************************************************************************** + +%%The following software may be included in this product: +libpng + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.5.0, January 6, 2011, are +Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +January 6, 2011 + +*************************************************************************** + +%%The following software may be included in this product: +libxml + +The MIT License +Copyright (c) +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*************************************************************************** + +%%The following software may be included in this product: +libxslt + +The MIT License + +Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME.txt b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME.txt new file mode 100644 index 0000000..cd88baf --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/THIRDPARTYLICENSEREADME.txt @@ -0,0 +1,3605 @@ +DO NOT TRANSLATE OR LOCALIZE. +----------------------------- + +%% This notice is provided with respect to ASM Bytecode Manipulation +Framework v5.0.3, which may be included with JRE 8, and JDK 8, and +OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2000-2011 France Télécom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +-------------------------------------------------------------------------------- + +%% This notice is provided with respect to BSDiff v4.3, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright 2003-2005 Colin Percival +All rights reserved + +Redistribution and use in source and binary forms, with or without +modification, are permitted providing that the following conditions +are met: +1. Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to CodeViewer 1.0, which may be +included with JDK 8. + +--- begin of LICENSE --- + +Copyright 1999 by CoolServlets.com. + +Any errors or suggested improvements to this class can be reported as +instructed on CoolServlets.com. We hope you enjoy this program... your +comments will encourage further development! This software is distributed +under the terms of the BSD License. Redistribution and use in source and +binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +Neither name of CoolServlets.com nor the names of its contributors may be +used to endorse or promote products derived from this software without +specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY COOLSERVLETS.COM AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." + + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Cryptix AES 3.2.0, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Cryptix General License + +Copyright (c) 1995-2005 The Cryptix Foundation Limited. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + 1. Redistributions of source code must retain the copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + +THIS SOFTWARE IS PROVIDED BY THE CRYPTIX FOUNDATION LIMITED AND +CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE CRYPTIX FOUNDATION LIMITED OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to CUP Parser Generator for +Java 0.10k, which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, provided +that the above copyright notice appear in all copies and that both the +copyright notice and this permission notice and warranty disclaimer appear in +supporting documentation, and that the names of the authors or their +employers not be used in advertising or publicity pertaining to distribution of +the software without specific, written prior permission. + +The authors and their employers disclaim all warranties with regard to +this software, including all implied warranties of merchantability and fitness. +In no event shall the authors or their employers be liable for any special, +indirect or consequential damages or any damages whatsoever resulting from +loss of use, data or profits, whether in an action of contract, negligence or +other tortious action, arising out of or in connection with the use or +performance of this software. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Document Object Model (DOM) Level 2 +& 3, which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +W3C SOFTWARE NOTICE AND LICENSE + +http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 + +This work (and included software, documentation such as READMEs, or other +related items) is being provided by the copyright holders under the following +license. By obtaining, using and/or copying this work, you (the licensee) +agree that you have read, understood, and will comply with the following terms +and conditions. + +Permission to copy, modify, and distribute this software and its +documentation, with or without modification, for any purpose and without fee +or royalty is hereby granted, provided that you include the following on ALL +copies of the software and documentation or portions thereof, including +modifications: + + 1.The full text of this NOTICE in a location viewable to users of the + redistributed or derivative work. + + 2.Any pre-existing intellectual property disclaimers, notices, or terms and + conditions. If none exist, the W3C Software Short Notice should be included + (hypertext is preferred, text is permitted) within the body of any + redistributed or derivative code. + + 3.Notice of any changes or modifications to the files, including the date + changes were made. (We recommend you provide URIs to the location from + which the code is derived.) + +THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS +MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT +LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR +PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY +THIRD PARTY PATENTS,COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. + +COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL +OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR +DOCUMENTATION. The name and trademarks of copyright holders may NOT be used +in advertising or publicity pertaining to the software without specific, +written prior permission. Title to copyright in this software and any +associated documentation will at all times remain with copyright holders. + +____________________________________ + +This formulation of W3C's notice and license became active on December 31 +2002. This version removes the copyright ownership notice such that this +license can be used with materials other than those owned by the W3C, reflects +that ERCIM is now a host of the W3C, includes references to this specific +dated version of the license, and removes the ambiguous grant of "use". +Otherwise, this version is the same as the previous version and is written so +as to preserve the Free Software Foundation's assessment of GPL compatibility +and OSI's certification under the Open Source Definition. Please see our +Copyright FAQ for common questions about using materials from our site, +including specific terms and conditions for packages like libwww, Amaya, and +Jigsaw. Other questions about this notice can be directed to +site-policy@w3.org. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Dynalink v0.5, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2009-2013, Attila Szegedi + +All rights reserved.Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the following conditions are +met:* Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. * Redistributions in +binary form must reproduce the above copyright notice, this list of +conditions and the following disclaimer in the documentation and/or other +materials provided with the distribution. * Neither the name of Attila +Szegedi nor the names of its contributors may be used to endorse or promote +products derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 +OF THIS SOFTWARE, EVEN IF ADVISED OF THEPOSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Elliptic Curve Cryptography, which +may be included with JRE 8, JDK 8, and OpenJDK 8. + +You are receiving a copy of the Elliptic Curve Cryptography library in source +form with the JDK 8 and OpenJDK 8 source distributions, and as object code in +the JRE 8 & JDK 8 runtimes. + +In the case of the JRE 8 & JDK 8 runtimes, the terms of the Oracle license do +NOT apply to the Elliptic Curve Cryptography library; it is licensed under the +following license, separately from Oracle's JDK & JRE. If you do not wish to +install the Elliptic Curve Cryptography library, you may delete the library +named libsunec.so (on Solaris and Linux systems) or sunec.dll (on Windows +systems) from the JRE bin directory reserved for native libraries. + + +--- begin of LICENSE --- + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it becomes +a de-facto standard. To achieve this, non-free programs must be +allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to ECMAScript Language +Specification ECMA-262 Edition 5.1 which may be included with +JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright notice +Copyright © 2011 Ecma International +Ecma International +Rue du Rhone 114 +CH-1204 Geneva +Tel: +41 22 849 6000 +Fax: +41 22 849 6001 +Web: http://www.ecma-international.org + +This document and possible translations of it may be copied and furnished to +others, and derivative works that comment on or otherwise explain it or assist +in its implementation may be prepared, copied, published, and distributed, in +whole or in part, without restriction of any kind, provided that the above +copyright notice and this section are included on all such copies and derivative +works. However, this document itself may not be modified in any way, including +by removing the copyright notice or references to Ecma International, except as +needed for the purpose of developing any document or deliverable produced by +Ecma International (in which case the rules applied to copyrights must be +followed) or as required to translate it into languages other than English. The +limited permissions granted above are perpetual and will not be revoked by Ecma +International or its successors or assigns. This document and the information +contained herein is provided on an "AS IS" basis and ECMA INTERNATIONAL +DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY +WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP +RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR +PURPOSE." Software License + +All Software contained in this document ("Software)" is protected by copyright +and is being made available under the "BSD License", included below. This +Software may be subject to third party rights (rights from parties other than +Ecma International), including patent rights, and no licenses under such third +party rights are granted under this license even if the third party concerned is +a member of Ecma International. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS +AVAILABLE AT http://www.ecma-international.org/memento/codeofconduct.htm FOR +INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO +IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and +binary forms, with or without modification, are permitted provided that the +following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation and/or +other materials provided with the distribution. + +3. Neither the name of the authors nor Ecma International may be used to endorse +or promote products derived from this software without specific prior written +permission. + +THIS SOFTWARE IS PROVIDED BY THE ECMA INTERNATIONAL "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. +--- end of LICENSE --- + +%% This notice is provided with respect to Dynalink library which is included +with the Nashorn technology. + +--- begin of LICENSE --- +Copyright (c) 2009-2013, Attila Szegedi + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +* Neither the name of the copyright holder nor the names of + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF +ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +--- end of LICENSE --- + +%% This notice is provided with respect to Joni library which is included +with the Nashorn technology. + +--- begin of LICENSE --- +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to FontConfig 2.5, which may be +included with JRE 8, JDK 8, and OpenJDK 8 source distributions on +Linux and Solaris. + +--- begin of LICENSE --- + +Copyright © 2001,2003 Keith Packard + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that the +above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation, and that +the name of Keith Packard not be used in advertising or publicity pertaining +to distribution of the software without specific, written prior permission. +Keith Packard makes no representations about the suitability of this software +for any purpose. It is provided "as is" without express or implied warranty. + +KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL KEITH +PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to IAIK PKCS#11 Wrapper, +which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +IAIK PKCS#11 Wrapper License + +Copyright (c) 2002 Graz University of Technology. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: + + "This product includes software developed by IAIK of Graz University of + Technology." + + Alternately, this acknowledgment may appear in the software itself, if and + wherever such third-party acknowledgments normally appear. + +4. The names "Graz University of Technology" and "IAIK of Graz University of + Technology" must not be used to endorse or promote products derived from this + software without prior written permission. + +5. Products derived from this software may not be called "IAIK PKCS Wrapper", + nor may "IAIK" appear in their name, without prior written permission of + Graz University of Technology. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +LICENSOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, +OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to ICU4C 4.0.1 and ICU4J 4.4, which +may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) 1995-2010 International Business Machines Corporation and others + +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, and/or sell copies of the +Software, and to permit persons to whom the Software is furnished to do so, +provided that the above copyright notice(s) and this permission notice appear +in all copies of the Software and that both the above copyright notice(s) and +this permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE +LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. +All trademarks and registered trademarks mentioned herein are the property of +their respective owners. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to IJG JPEG 6b, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +This software is copyright (C) 1991-1998, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + +--- end of LICENSE --- + +-------------------------------------------------------------------------------- + +%% This notice is provided with respect to Joni v1.1.9, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to JOpt-Simple v3.0, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + + Copyright (c) 2004-2009 Paul R. Holser, Jr. + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- end of LICENSE --- + +-------------------------------------------------------------------------------- + +%% This notice is provided with respect to JSON, which may be included +with JRE 8 & JDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2002 JSON.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +The Software shall be used for Good, not Evil. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Kerberos functionality, which +which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + + (C) Copyright IBM Corp. 1999 All Rights Reserved. + Copyright 1997 The Open Group Research Institute. All rights reserved. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Kerberos functionality from +FundsXpress, INC., which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + + Copyright (C) 1998 by the FundsXpress, INC. + + All rights reserved. + + Export of this software from the United States of America may require + a specific license from the United States Government. It is the + responsibility of any person or organization contemplating export to + obtain such a license before exporting. + + WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + distribute this software and its documentation for any purpose and + without fee is hereby granted, provided that the above copyright + notice appear in all copies and that both that copyright notice and + this permission notice appear in supporting documentation, and that + the name of FundsXpress. not be used in advertising or publicity pertaining + to distribution of the software without specific, written prior + permission. FundsXpress makes no representations about the suitability of + this software for any purpose. It is provided "as is" without express + or implied warranty. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. + + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Kronos OpenGL headers, which may be +included with JDK 8 and OpenJDK 8 source distributions. + +--- begin of LICENSE --- + + Copyright (c) 2007 The Khronos Group Inc. + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and/or associated documentation files (the "Materials"), to + deal in the Materials without restriction, including without limitation the + rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + sell copies of the Materials, and to permit persons to whom the Materials are + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Materials. + + THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE MATERIALS OR THE USE OR OTHER DEALINGS IN THE + MATERIALS. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% Portions Copyright Eastman Kodak Company 1992 + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to libpng 1.6.16, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +This copy of the libpng notices is provided for your convenience. In case of +any discrepancy between this copy and the notices in the file png.h that is +included in the libpng distribution, the latter shall prevail. + +COPYRIGHT NOTICE, DISCLAIMER, and LICENSE: + +If you modify libpng you may insert additional notices immediately following +this sentence. + +This code is released under the libpng license. + +libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are +Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.2.5 +with the following individual added to the list of Contributing Authors + + Cosmin Truta + +libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are +Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-1.0.6 +with the following individuals added to the list of Contributing Authors + + Simon-Pierre Cadieux + Eric S. Raymond + Gilles Vollant + +and with the following additions to the disclaimer: + + There is no warranty against interference with your enjoyment of the + library or against infringement. There is no warranty that our + efforts or the library will fulfill any of your particular purposes + or needs. This library is provided with all faults, and the entire + risk of satisfactory quality, performance, accuracy, and effort is with + the user. + +libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are +Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are +distributed according to the same disclaimer and license as libpng-0.96, +with the following individuals added to the list of Contributing Authors: + + Tom Lane + Glenn Randers-Pehrson + Willem van Schaik + +libpng versions 0.89, June 1996, through 0.96, May 1997, are +Copyright (c) 1996, 1997 Andreas Dilger +Distributed according to the same disclaimer and license as libpng-0.88, +with the following individuals added to the list of Contributing Authors: + + John Bowler + Kevin Bracey + Sam Bushell + Magnus Holmgren + Greg Roelofs + Tom Tanner + +libpng versions 0.5, May 1995, through 0.88, January 1996, are +Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc. + +For the purposes of this copyright and license, "Contributing Authors" +is defined as the following set of individuals: + + Andreas Dilger + Dave Martindale + Guy Eric Schalnat + Paul Schmidt + Tim Wegner + +The PNG Reference Library is supplied "AS IS". The Contributing Authors +and Group 42, Inc. disclaim all warranties, expressed or implied, +including, without limitation, the warranties of merchantability and of +fitness for any purpose. The Contributing Authors and Group 42, Inc. +assume no liability for direct, indirect, incidental, special, exemplary, +or consequential damages, which may result from the use of the PNG +Reference Library, even if advised of the possibility of such damage. + +Permission is hereby granted to use, copy, modify, and distribute this +source code, or portions hereof, for any purpose, without fee, subject +to the following restrictions: + +1. The origin of this source code must not be misrepresented. + +2. Altered versions must be plainly marked as such and must not + be misrepresented as being the original source. + +3. This Copyright notice may not be removed or altered from any + source or altered source distribution. + +The Contributing Authors and Group 42, Inc. specifically permit, without +fee, and encourage the use of this source code as a component to +supporting the PNG file format in commercial products. If you use this +source code in a product, acknowledgment is not required but would be +appreciated. + + +A "png_get_copyright" function is available, for convenient use in "about" +boxes and the like: + + printf("%s",png_get_copyright(NULL)); + +Also, the PNG logo (in PNG format, of course) is supplied in the +files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31). + +Libpng is OSI Certified Open Source Software. OSI Certified Open Source is a +certification mark of the Open Source Initiative. + +Glenn Randers-Pehrson +glennrp at users.sourceforge.net +December 22, 2014 + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to libungif 4.1.3, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +The GIFLIB distribution is Copyright (c) 1997 Eric S. Raymond + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Little CMS 2.5, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Little CMS +Copyright (c) 1998-2011 Marti Maria Saguer + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% Lucida is a registered trademark or trademark of Bigelow & Holmes in the +U.S. and other countries. + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Mesa 3D Graphics Library v4.1, +which may be included with JRE 8, JDK 8, and OpenJDK 8 source distributions. + +--- begin of LICENSE --- + + Mesa 3-D graphics library + Version: 4.1 + + Copyright (C) 1999-2002 Brian Paul All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN + AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN + CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Mozilla Network Security +Services (NSS), which is supplied with the JDK test suite in the OpenJDK +source code repository. It is licensed under Mozilla Public License (MPL), +version 2.0. + +The NSS libraries are supplied in executable form, built from unmodified +NSS source code labeled with the "NSS_3_16_RTM" HG tag. + +The NSS source code is available in the OpenJDK source code repository at: + jdk/test/sun/security/pkcs11/nss/src + +The NSS libraries are available in the OpenJDK source code repository at: + jdk/test/sun/security/pkcs11/nss/lib + +--- begin of LICENSE --- + +Mozilla Public License Version 2.0 +================================== + +1. Definitions +-------------- + +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + This Source Code Form is subject to the terms of the Mozilla Public + License, v. 2.0. If a copy of the MPL was not distributed with this + file, You can obtain one at http://mozilla.org/MPL/2.0/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. + +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to PC/SC Lite for Suse Linux v.1.1.1, +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. + +--- begin of LICENSE --- + +Copyright (c) 1999-2004 David Corcoran +Copyright (c) 1999-2004 Ludovic Rousseau +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by: + David Corcoran + http://www.linuxnet.com (MUSCLE) +4. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +Changes to this license can be made only by the copyright author with +explicit written consent. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to PorterStemmer v4, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +See: http://tartarus.org/~martin/PorterStemmer + +The software is completely free for any purpose, unless notes at the head of +the program text indicates otherwise (which is rare). In any case, the notes +about licensing are never more restrictive than the BSD License. + +In every case where the software is not written by me (Martin Porter), this +licensing arrangement has been endorsed by the contributor, and it is +therefore unnecessary to ask the contributor again to confirm it. + +I have not asked any contributors (or their employers, if they have them) for +proofs that they have the right to distribute their software in this way. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Relax NG Object/Parser v.20050510, +which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) Kohsuke Kawaguchi + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: The above copyright +notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to RelaxNGCC v1.12, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (c) 2000-2003 Daisuke Okajima and Kohsuke Kawaguchi. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +3. The end-user documentation included with the redistribution, if any, must + include the following acknowledgment: + + "This product includes software developed by Daisuke Okajima + and Kohsuke Kawaguchi (http://relaxngcc.sf.net/)." + +Alternately, this acknowledgment may appear in the software itself, if and +wherever such third-party acknowledgments normally appear. + +4. The names of the copyright holders must not be used to endorse or promote + products derived from this software without prior written permission. For + written permission, please contact the copyright holders. + +5. Products derived from this software may not be called "RELAXNGCC", nor may + "RELAXNGCC" appear in their name, without prior written permission of the + copyright holders. + +THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESSED OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE APACHE +SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to SAX 2.0.1, which may be included +with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + + SAX is free! + + In fact, it's not possible to own a license to SAX, since it's been placed in + the public domain. + + No Warranty + + Because SAX is released to the public domain, there is no warranty for the + design or for the software implementation, to the extent permitted by + applicable law. Except when otherwise stated in writing the copyright holders + and/or other parties provide SAX "as is" without warranty of any kind, either + expressed or implied, including, but not limited to, the implied warranties + of merchantability and fitness for a particular purpose. The entire risk as + to the quality and performance of SAX is with you. Should SAX prove + defective, you assume the cost of all necessary servicing, repair or + correction. + + In no event unless required by applicable law or agreed to in writing will + any copyright holder, or any other party who may modify and/or redistribute + SAX, be liable to you for damages, including any general, special, incidental + or consequential damages arising out of the use or inability to use SAX + (including but not limited to loss of data or data being rendered inaccurate + or losses sustained by you or third parties or a failure of the SAX to + operate with any other programs), even if such holder or other party has been + advised of the possibility of such damages. + + Copyright Disclaimers + + This page includes statements to that effect by David Megginson, who would + have been able to claim copyright for the original work. SAX 1.0 + + Version 1.0 of the Simple API for XML (SAX), created collectively by the + membership of the XML-DEV mailing list, is hereby released into the public + domain. + + No one owns SAX: you may use it freely in both commercial and non-commercial + applications, bundle it with your software distribution, include it on a + CD-ROM, list the source code in a book, mirror the documentation at your own + web site, or use it in any other way you see fit. + + David Megginson, sax@megginson.com + 1998-05-11 + + SAX 2.0 + + I hereby abandon any property rights to SAX 2.0 (the Simple API for XML), and + release all of the SAX 2.0 source code, compiled code, and documentation + contained in this distribution into the Public Domain. SAX comes with NO + WARRANTY or guarantee of fitness for any purpose. + + David Megginson, david@megginson.com + 2000-05-05 + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to SoftFloat version 2b, which may be +included with JRE 8, JDK 8, and OpenJDK 8 on Linux/ARM. + +--- begin of LICENSE --- + +Use of any of this software is governed by the terms of the license below: + +SoftFloat was written by me, John R. Hauser. This work was made possible in +part by the International Computer Science Institute, located at Suite 600, +1947 Center Street, Berkeley, California 94704. Funding was partially +provided by the National Science Foundation under grant MIP-9311980. The +original version of this code was written as part of a project to build +a fixed-point vector processor in collaboration with the University of +California at Berkeley, overseen by Profs. Nelson Morgan and John Wawrzynek. + +THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort +has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT +TIMES RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO +PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL +LOSSES, COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO +FURTHERMORE EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER +SCIENCE INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, +COSTS, OR OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE +SOFTWARE. + +Derivative works are acceptable, even for commercial purposes, provided +that the minimal documentation requirements stated in the source code are +satisfied. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Sparkle 1.5, +which may be included with JRE 8 on Mac OS X. + +--- begin of LICENSE --- + +Copyright (c) 2012 Sparkle.org and Andy Matuschak + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% Portions licensed from Taligent, Inc. + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Thai Dictionary, which may be +included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Copyright (C) 1982 The Royal Institute, Thai Royal Government. + +Copyright (C) 1998 National Electronics and Computer Technology Center, +National Science and Technology Development Agency, +Ministry of Science Technology and Environment, +Thai Royal Government. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Unicode 6.2.0 & CLDR 21.0.1 +which may be included with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + +Unicode Terms of Use + +For the general privacy policy governing access to this site, see the Unicode +Privacy Policy. For trademark usage, see the Unicode® Consortium Name and +Trademark Usage Policy. + +A. Unicode Copyright. + 1. Copyright © 1991-2013 Unicode, Inc. All rights reserved. + + 2. Certain documents and files on this website contain a legend indicating + that "Modification is permitted." Any person is hereby authorized, + without fee, to modify such documents and files to create derivative + works conforming to the Unicode® Standard, subject to Terms and + Conditions herein. + + 3. Any person is hereby authorized, without fee, to view, use, reproduce, + and distribute all documents and files solely for informational + purposes in the creation of products supporting the Unicode Standard, + subject to the Terms and Conditions herein. + + 4. Further specifications of rights and restrictions pertaining to the use + of the particular set of data files known as the "Unicode Character + Database" can be found in Exhibit 1. + + 5. Each version of the Unicode Standard has further specifications of + rights and restrictions of use. For the book editions (Unicode 5.0 and + earlier), these are found on the back of the title page. The online + code charts carry specific restrictions. All other files, including + online documentation of the core specification for Unicode 6.0 and + later, are covered under these general Terms of Use. + + 6. No license is granted to "mirror" the Unicode website where a fee is + charged for access to the "mirror" site. + + 7. Modification is not permitted with respect to this document. All copies + of this document must be verbatim. + +B. Restricted Rights Legend. Any technical data or software which is licensed + to the United States of America, its agencies and/or instrumentalities + under this Agreement is commercial technical data or commercial computer + software developed exclusively at private expense as defined in FAR 2.101, + or DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, + duplication, or disclosure by the Government is subject to restrictions as + set forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov + 1995) and this Agreement. For Software, in accordance with FAR 12-212 or + DFARS 227-7202, as applicable, use, duplication or disclosure by the + Government is subject to the restrictions set forth in this Agreement. + +C. Warranties and Disclaimers. + 1. This publication and/or website may include technical or typographical + errors or other inaccuracies . Changes are periodically added to the + information herein; these changes will be incorporated in new editions + of the publication and/or website. Unicode may make improvements and/or + changes in the product(s) and/or program(s) described in this + publication and/or website at any time. + + 2. If this file has been purchased on magnetic or optical media from + Unicode, Inc. the sole and exclusive remedy for any claim will be + exchange of the defective media within ninety (90) days of original + purchase. + + 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR SOFTWARE IS + PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, IMPLIED, + OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + UNICODE AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR + OMISSIONS IN THIS PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH + ARE REFERENCED BY OR LINKED TO THIS PUBLICATION OR THE UNICODE WEBSITE. + +D. Waiver of Damages. In no event shall Unicode or its licensors be liable for + any special, incidental, indirect or consequential damages of any kind, or + any damages whatsoever, whether or not Unicode was advised of the + possibility of the damage, including, without limitation, those resulting + from the following: loss of use, data or profits, in connection with the + use, modification or distribution of this information or its derivatives. + +E.Trademarks & Logos. + 1. The Unicode Word Mark and the Unicode Logo are trademarks of Unicode, + Inc. “The Unicode Consortium†and “Unicode, Inc.†are trade names of + Unicode, Inc. Use of the information and materials found on this + website indicates your acknowledgement of Unicode, Inc.’s exclusive + worldwide rights in the Unicode Word Mark, the Unicode Logo, and the + Unicode trade names. + + 2. The Unicode Consortium Name and Trademark Usage Policy (“Trademark + Policyâ€) are incorporated herein by reference and you agree to abide by + the provisions of the Trademark Policy, which may be changed from time + to time in the sole discretion of Unicode, Inc. + + 3. All third party trademarks referenced herein are the property of their + respective owners. + +Miscellaneous. + 1. Jurisdiction and Venue. This server is operated from a location in the + State of California, United States of America. Unicode makes no + representation that the materials are appropriate for use in other + locations. If you access this server from other locations, you are + responsible for compliance with local laws. This Agreement, all use of + this site and any claims and damages resulting from use of this site are + governed solely by the laws of the State of California without regard to + any principles which would apply the laws of a different jurisdiction. + The user agrees that any disputes regarding this site shall be resolved + solely in the courts located in Santa Clara County, California. The user + agrees said courts have personal jurisdiction and agree to waive any + right to transfer the dispute to any other forum. + + 2. Modification by Unicode. Unicode shall have the right to modify this + Agreement at any time by posting it to this site. The user may not + assign any part of this Agreement without Unicode’s prior written + consent. + + 3. Taxes. The user agrees to pay any taxes arising from access to this + website or use of the information herein, except for those based on + Unicode’s net income. + + 4. Severability. If any provision of this Agreement is declared invalid or + unenforceable, the remaining provisions of this Agreement shall remain + in effect. + + 5. Entire Agreement. This Agreement constitutes the entire agreement + between the parties. + +EXHIBIT 1 +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + +Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, and +http://www.unicode.org/cldr/data/. Unicode Data Files do not include PDF +online code charts under the directory http://www.unicode.org/Public/. +Software includes any source code published in the Unicode Standard or under +the directories http://www.unicode.org/Public/, +http://www.unicode.org/reports/, and http://www.unicode.org/cldr/data/. + +NOTICE TO USER: Carefully read the following legal agreement. BY DOWNLOADING, +INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES ("DATA +FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO +BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT +AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR +SOFTWARE. + +COPYRIGHT AND PERMISSION NOTICE + +Copyright © 1991-2012 Unicode, Inc. All rights reserved. Distributed under the +Terms of Use in http://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the Unicode data files and any associated documentation (the "Data Files") +or Unicode software and any associated documentation (the "Software") to deal +in the Data Files or Software without restriction, including without +limitation the rights to use, copy, modify, merge, publish, distribute, and/or +sell copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that (a) the above +copyright notice(s) and this permission notice appear with all copies of the +Data Files or Software, (b) both the above copyright notice(s) and this +permission notice appear in associated documentation, and (c) there is clear +notice in each modified Data File or in the Software as well as in the +documentation associated with the Data File(s) or Software that the data or +software has been modified. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN +THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR +PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS +ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE +DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in these Data Files or Software without prior written authorization of the +copyright holder. + +Unicode and the Unicode logo are trademarks of Unicode, Inc. in the United +States and other countries. All third party trademarks referenced herein are +the property of their respective owners. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to UPX v3.01, which may be included +with JRE 8 on Windows. + +--- begin of LICENSE --- + +Use of any of this software is governed by the terms of the license below: + + + ooooo ooo ooooooooo. ooooooo ooooo + `888' `8' `888 `Y88. `8888 d8' + 888 8 888 .d88' Y888..8P + 888 8 888ooo88P' `8888' + 888 8 888 .8PY888. + `88. .8' 888 d8' `888b + `YbodP' o888o o888o o88888o + + + The Ultimate Packer for eXecutables + Copyright (c) 1996-2000 Markus Oberhumer & Laszlo Molnar + http://wildsau.idv.uni-linz.ac.at/mfx/upx.html + http://www.nexus.hu/upx + http://upx.tsx.org + + +PLEASE CAREFULLY READ THIS LICENSE AGREEMENT, ESPECIALLY IF YOU PLAN +TO MODIFY THE UPX SOURCE CODE OR USE A MODIFIED UPX VERSION. + + +ABSTRACT +======== + + UPX and UCL are copyrighted software distributed under the terms + of the GNU General Public License (hereinafter the "GPL"). + + The stub which is imbedded in each UPX compressed program is part + of UPX and UCL, and contains code that is under our copyright. The + terms of the GNU General Public License still apply as compressing + a program is a special form of linking with our stub. + + As a special exception we grant the free usage of UPX for all + executables, including commercial programs. + See below for details and restrictions. + + +COPYRIGHT +========= + + UPX and UCL are copyrighted software. All rights remain with the authors. + + UPX is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer + UPX is Copyright (C) 1996-2000 Laszlo Molnar + + UCL is Copyright (C) 1996-2000 Markus Franz Xaver Johannes Oberhumer + + +GNU GENERAL PUBLIC LICENSE +========================== + + UPX and the UCL library are free software; you can redistribute them + and/or modify them under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + UPX and UCL are distributed in the hope that they will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; see the file COPYING. + + +SPECIAL EXCEPTION FOR COMPRESSED EXECUTABLES +============================================ + + The stub which is imbedded in each UPX compressed program is part + of UPX and UCL, and contains code that is under our copyright. The + terms of the GNU General Public License still apply as compressing + a program is a special form of linking with our stub. + + Hereby Markus F.X.J. Oberhumer and Laszlo Molnar grant you special + permission to freely use and distribute all UPX compressed programs + (including commercial ones), subject to the following restrictions: + + 1. You must compress your program with a completely unmodified UPX + version; either with our precompiled version, or (at your option) + with a self compiled version of the unmodified UPX sources as + distributed by us. + 2. This also implies that the UPX stub must be completely unmodfied, i.e. + the stub imbedded in your compressed program must be byte-identical + to the stub that is produced by the official unmodified UPX version. + 3. The decompressor and any other code from the stub must exclusively get + used by the unmodified UPX stub for decompressing your program at + program startup. No portion of the stub may get read, copied, + called or otherwise get used or accessed by your program. + + +ANNOTATIONS +=========== + + - You can use a modified UPX version or modified UPX stub only for + programs that are compatible with the GNU General Public License. + + - We grant you special permission to freely use and distribute all UPX + compressed programs. But any modification of the UPX stub (such as, + but not limited to, removing our copyright string or making your + program non-decompressible) will immediately revoke your right to + use and distribute a UPX compressed program. + + - UPX is not a software protection tool; by requiring that you use + the unmodified UPX version for your proprietary programs we + make sure that any user can decompress your program. This protects + both you and your users as nobody can hide malicious code - + any program that cannot be decompressed is highly suspicious + by definition. + + - You can integrate all or part of UPX and UCL into projects that + are compatible with the GNU GPL, but obviously you cannot grant + any special exceptions beyond the GPL for our code in your project. + + - We want to actively support manufacturers of virus scanners and + similar security software. Please contact us if you would like to + incorporate parts of UPX or UCL into such a product. + + + +Markus F.X.J. Oberhumer Laszlo Molnar +markus.oberhumer@jk.uni-linz.ac.at ml1050@cdata.tvnet.hu + +Linz, Austria, 25 Feb 2000 + +Additional License(s) + +The UPX license file is at http://upx.sourceforge.net/upx-license.html. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to Xfree86-VidMode Extension 1.0, +which may be included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. + +--- begin of LICENSE --- + +Version 1.1 of XFree86 ProjectLicence. + +Copyright (C) 1994-2004 The XFree86 Project, Inc. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicence, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so,subject to the following conditions: + + 1. Redistributions of source code must retain the above copyright + notice,this list of conditions, and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution, and in the same place + and form as other copyright, license and disclaimer information. + + 3. The end-user documentation included with the redistribution, if any,must + include the following acknowledgment: "This product includes + software developed by The XFree86 Project, Inc (http://www.xfree86.org/) and + its contributors", in the same place and form as other third-party + acknowledgments. Alternately, this acknowledgment may appear in the software + itself, in the same form and location as other such third-party + acknowledgments. + + 4. Except as contained in this notice, the name of The XFree86 Project,Inc + shall not be used in advertising or otherwise to promote the sale, use + or other dealings in this Software without prior written authorization from + The XFree86 Project, Inc. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE XFREE86 PROJECT, INC OR ITS CONTRIBUTORS BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL,SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO,PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to X Window System 6.8.2, which may be +included with JRE 8, JDK 8, and OpenJDK 8 on Linux and Solaris. + +--- begin of LICENSE --- + + Licenses +The X.Org Foundation March 2004 + +1. Introduction + +The X.org Foundation X Window System distribution is a compilation of code and +documentation from many sources. This document is intended primarily as a +guide to the licenses used in the distribution: you must check each file +and/or package for precise redistribution terms. None-the-less, this summary +may be useful to many users. No software incorporating the XFree86 1.1 license +has been incorporated. + +This document is based on the compilation from XFree86. + +2. XFree86 License + +XFree86 code without an explicit copyright is covered by the following +copyright/license: + +Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +XFREE86 PROJECT BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the XFree86 Project shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from the XFree86 Project. + +3. Other Licenses + +Portions of code are covered by the following licenses/copyrights. See +individual files for the copyright dates. + +3.1. X/MIT Copyrights + +3.1.1. X Consortium + +Copyright (C) X Consortium + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X +CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of the X Consortium shall not be +used in advertising or otherwise to promote the sale, use or other dealings in +this Software without prior written authorization from the X Consortium. + +X Window System is a trademark of X Consortium, Inc. + +3.1.2. The Open Group + +Copyright The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that the +above copyright notice appear in all copies and that both that copyright +notice and this permission notice appear in supporting documentation. + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN +ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings in +this Software without prior written authorization from The Open Group. 3.2. +Berkeley-based copyrights: + +o +3.2.1. General + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. 3.2.2. UCB/LBL + +Copyright (c) 1993 The Regents of the University of California. All rights +reserved. + +This software was developed by the Computer Systems Engineering group at +Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and contributed to +Berkeley. + +All advertising materials mentioning features or use of this software must +display the following acknowledgement: This product includes software +developed by the University of California, Lawrence Berkeley Laboratory. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes software + developed by the University of California, Berkeley and its contributors. + + 4. Neither the name of the University nor the names of its contributors may + be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.3. The +NetBSD Foundation, Inc. + +Copyright (c) 2003 The NetBSD Foundation, Inc. All rights reserved. + +This code is derived from software contributed to The NetBSD Foundation by Ben +Collver + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: This product includes software + developed by the NetBSD Foundation, Inc. and its contributors. + + 4. Neither the name of The NetBSD Foundation nor the names of its + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS ``AS +IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 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 OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 3.2.4. Theodore +Ts'o. + +Copyright Theodore Ts'o, 1994, 1995, 1996, 1997, 1998, 1999. All rights +reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + and the entire permission notice in its entirety, including the disclaimer + of warranties. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. he name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE, ALL OF WHICH ARE HEREBY DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. 3.2.5. Theo de Raadt and Damien Miller + +Copyright (c) 1995,1999 Theo de Raadt. All rights reserved. Copyright (c) +2001-2002 Damien Miller. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. 3.2.6. Todd C. Miller + +Copyright (c) 1998 Todd C. Miller + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND TODD C. MILLER DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL TODD C. MILLER BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION +OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 3.2.7. Thomas +Winischhofer + +Copyright (C) 2001-2004 Thomas Winischhofer + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESSED OR IMPLIED +WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO +EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) 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 OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. 3.3. NVIDIA Corp + +Copyright (c) 1996 NVIDIA, Corp. All rights reserved. + +NOTICE TO USER: The source code is copyrighted under U.S. and international +laws. NVIDIA, Corp. of Sunnyvale, California owns the copyright and as design +patents pending on the design and interface of the NV chips. Users and +possessors of this source code are hereby granted a nonexclusive, royalty-free +copyright and design patent license to use this code in individual and +commercial software. + +Any use of this source code must include, in the user documentation and +internal comments to the code, notices to the end user as follows: + +Copyright (c) 1996 NVIDIA, Corp. NVIDIA design patents pending in the U.S. and +foreign countries. + +NVIDIA, CORP. MAKES NO REPRESENTATION ABOUT THE SUITABILITY OF THIS SOURCE +CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED +WARRANTY OF ANY KIND. NVIDIA, CORP. DISCLAIMS ALL WARRANTIES WITH REGARD TO +THIS SOURCE CODE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL NVIDIA, CORP. BE LIABLE +FOR ANY SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. 3.4. GLX Public +License + +GLX PUBLIC LICENSE (Version 1.0 (2/11/99)) ("License") + +Subject to any third party claims, Silicon Graphics, Inc. ("SGI") hereby +grants permission to Recipient (defined below), under Recipient's copyrights +in the Original Software (defined below), to use, copy, modify, merge, +publish, distribute, sublicense and/or sell copies of Subject Software +(defined below), and to permit persons to whom the Subject Software is +furnished in accordance with this License to do the same, subject to all of +the following terms and conditions, which Recipient accepts by engaging in any +such use, copying, modifying, merging, publishing, distributing, sublicensing +or selling: + +1. Definitions. + + (a) "Original Software" means source code of computer software code which + is described in Exhibit A as Original Software. + + (b) "Modifications" means any addition to or deletion from the substance + or structure of either the Original Software or any previous + Modifications. When Subject Software is released as a series of files, a + Modification means (i) any addition to or deletion from the contents of a + file containing Original Software or previous Modifications and (ii) any + new file that contains any part of the Original Code or previous + Modifications. + + (c) "Subject Software" means the Original Software or Modifications or the + combination of the Original Software and Modifications, or portions of any + of the foregoing. + + (d) "Recipient" means an individual or a legal entity exercising rights + under, and complying with all of the terms of, this License. For legal + entities, "Recipient" includes any entity which controls, is controlled + by, or is under common control with Recipient. For purposes of this + definition, "control" of an entity means (a) the power, direct or + indirect, to direct or manage such entity, or (b) ownership of fifty + percent (50%) or more of the outstanding shares or beneficial ownership of + such entity. + +2. Redistribution of Source Code Subject to These Terms. Redistributions of +Subject Software in source code form must retain the notice set forth in +Exhibit A, below, in every file. A copy of this License must be included in +any documentation for such Subject Software where the recipients' rights +relating to Subject Software are described. Recipient may distribute the +source code version of Subject Software under a license of Recipient's choice, +which may contain terms different from this License, provided that (i) +Recipient is in compliance with the terms of this License, and (ii) the +license terms include this Section 2 and Sections 3, 4, 7, 8, 10, 12 and 13 of +this License, which terms may not be modified or superseded by any other terms +of such license. If Recipient distributes the source code version under a +different license Recipient must make it absolutely clear that any terms which +differ from this License are offered by Recipient alone, not by SGI. Recipient +hereby agrees to indemnify SGI for any liability incurred by SGI as a result +of any such terms Recipient offers. + +3. Redistribution in Executable Form. The notice set forth in Exhibit A must +be conspicuously included in any notice in an executable version of Subject +Software, related documentation or collateral in which Recipient describes the +user's rights relating to the Subject Software. Recipient may distribute the +executable version of Subject Software under a license of Recipient's choice, +which may contain terms different from this License, provided that (i) +Recipient is in compliance with the terms of this License, and (ii) the +license terms include this Section 3 and Sections 4, 7, 8, 10, 12 and 13 of +this License, which terms may not be modified or superseded by any other terms +of such license. If Recipient distributes the executable version under a +different license Recipient must make it absolutely clear that any terms which +differ from this License are offered by Recipient alone, not by SGI. Recipient +hereby agrees to indemnify SGI for any liability incurred by SGI as a result +of any such terms Recipient offers. + +4. Termination. This License and the rights granted hereunder will terminate +automatically if Recipient fails to comply with terms herein and fails to cure +such breach within 30 days of the breach. Any sublicense to the Subject +Software which is properly granted shall survive any termination of this +License absent termination by the terms of such sublicense. Provisions which, +by their nature, must remain in effect beyond the termination of this License +shall survive. + +5. No Trademark Rights. This License does not grant any rights to use any +trade name, trademark or service mark whatsoever. No trade name, trademark or +service mark of SGI may be used to endorse or promote products derived from +the Subject Software without prior written permission of SGI. + +6. No Other Rights. This License does not grant any rights with respect to the +OpenGL API or to any software or hardware implementation thereof or to any +other software whatsoever, nor shall any other rights or licenses not +expressly granted hereunder arise by implication, estoppel or otherwise with +respect to the Subject Software. Title to and ownership of the Original +Software at all times remains with SGI. All rights in the Original Software +not expressly granted under this License are reserved. + +7. Compliance with Laws; Non-Infringement. Recipient shall comply with all +applicable laws and regulations in connection with use and distribution of the +Subject Software, including but not limited to, all export and import control +laws and regulations of the U.S. government and other countries. Recipient may +not distribute Subject Software that (i) in any way infringes (directly or +contributorily) the rights (including patent, copyright, trade secret, +trademark or other intellectual property rights of any kind) of any other +person or entity or (ii) breaches any representation or warranty, express, +implied or statutory, which under any applicable law it might be deemed to +have been distributed. + +8. Claims of Infringement. If Recipient at any time has knowledge of any one +or more third party claims that reproduction, modification, use, distribution, +import or sale of Subject Software (including particular functionality or code +incorporated in Subject Software) infringes the third party's intellectual +property rights, Recipient must place in a well-identified web page bearing +the title "LEGAL" a description of each such claim and a description of the +party making each such claim in sufficient detail that a user of the Subject +Software will know whom to contact regarding the claim. Also, upon gaining +such knowledge of any such claim, Recipient must conspicuously include the URL +for such web page in the Exhibit A notice required under Sections 2 and 3, +above, and in the text of any related documentation, license agreement or +collateral in which Recipient describes end user's rights relating to the +Subject Software. If Recipient obtains such knowledge after it makes Subject +Software available to any other person or entity, Recipient shall take other +steps (such as notifying appropriate mailing lists or newsgroups) reasonably +calculated to inform those who received the Subject Software that new +knowledge has been obtained. + +9. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, +MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON- INFRINGING. SGI ASSUMES NO +RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE +PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY +SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN +ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED +HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +10. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, +WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), +CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY +CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK +STOPPAGE, LOSS OF DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER +COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF +THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY +TO LIABILITY FOR DEATH OR PERSONAL INJURY RESULTING FROM SGI's NEGLIGENCE TO +THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT +ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO +THAT EXCLUSION AND LIMITATION MAY NOT APPLY TO RECIPIENT. + +11. Indemnity. Recipient shall be solely responsible for damages arising, +directly or indirectly, out of its utilization of rights under this License. +Recipient will defend, indemnify and hold harmless Silicon Graphics, Inc. from +and against any loss, liability, damages, costs or expenses (including the +payment of reasonable attorneys fees) arising out of Recipient's use, +modification, reproduction and distribution of the Subject Software or out of +any representation or warranty made by Recipient. + +12. U.S. Government End Users. The Subject Software is a "commercial item" +consisting of "commercial computer software" as such terms are defined in +title 48 of the Code of Federal Regulations and all U.S. Government End Users +acquire only the rights set forth in this License and are subject to the terms +of this License. + +13. Miscellaneous. This License represents the complete agreement concerning +subject matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed so as to achieve as nearly as +possible the same economic effect as the original provision and the remainder +of this License will remain in effect. This License shall be governed by and +construed in accordance with the laws of the United States and the State of +California as applied to agreements entered into and to be performed entirely +within California between California residents. Any litigation relating to +this License shall be subject to the exclusive jurisdiction of the Federal +Courts of the Northern District of California (or, absent subject matter +jurisdiction in such courts, the courts of the State of California), with +venue lying exclusively in Santa Clara County, California, with the losing +party responsible for costs, including without limitation, court costs and +reasonable attorneys fees and expenses. The application of the United Nations +Convention on Contracts for the International Sale of Goods is expressly +excluded. Any law or regulation which provides that the language of a contract +shall be construed against the drafter shall not apply to this License. + +Exhibit A + +The contents of this file are subject to Sections 2, 3, 4, 7, 8, 10, 12 and 13 +of the GLX Public License Version 1.0 (the "License"). You may not use this +file except in compliance with those sections of the License. You may obtain a +copy of the License at Silicon Graphics, Inc., attn: Legal Services, 2011 N. +Shoreline Blvd., Mountain View, CA 94043 or at +http://www.sgi.com/software/opensource/glx/license.html. + +Software distributed under the License is distributed on an "AS IS" basis. ALL +WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED +WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF NON- +INFRINGEMENT. See the License for the specific language governing rights and +limitations under the License. + +The Original Software is GLX version 1.2 source code, released February, 1999. +The developer of the Original Software is Silicon Graphics, Inc. Those +portions of the Subject Software created by Silicon Graphics, Inc. are +Copyright (c) 1991-9 Silicon Graphics, Inc. All Rights Reserved. 3.5. CID +Font Code Public License + +CID FONT CODE PUBLIC LICENSE (Version 1.0 (3/31/99))("License") + +Subject to any applicable third party claims, Silicon Graphics, Inc. ("SGI") +hereby grants permission to Recipient (defined below), under SGI's copyrights +in the Original Software (defined below), to use, copy, modify, merge, +publish, distribute, sublicense and/or sell copies of Subject Software +(defined below) in both source code and executable form, and to permit persons +to whom the Subject Software is furnished in accordance with this License to +do the same, subject to all of the following terms and conditions, which +Recipient accepts by engaging in any such use, copying, modifying, merging, +publication, distributing, sublicensing or selling: + +1. Definitions. + + a. "Original Software" means source code of computer software code that is + described in Exhibit A as Original Software. + + b. "Modifications" means any addition to or deletion from the substance or + structure of either the Original Software or any previous Modifications. + When Subject Software is released as a series of files, a Modification + means (i) any addition to or deletion from the contents of a file + containing Original Software or previous Modifications and (ii) any new + file that contains any part of the Original Code or previous + Modifications. + + c. "Subject Software" means the Original Software or Modifications or the + combination of the Original Software and Modifications, or portions of any + of the foregoing. + + d. "Recipient" means an individual or a legal entity exercising rights + under the terms of this License. For legal entities, "Recipient" includes + any entity that controls, is controlled by, or is under common control + with Recipient. For purposes of this definition, "control" of an entity + means (i) the power, direct or indirect, to direct or manage such entity, + or (ii) ownership of fifty percent (50%) or more of the outstanding shares + or beneficial ownership of such entity. + + e. "Required Notice" means the notice set forth in Exhibit A to this + License. + + f. "Accompanying Technology" means any software or other technology that + is not a Modification and that is distributed or made publicly available + by Recipient with the Subject Software. Separate software files that do + not contain any Original Software or any previous Modification shall not + be deemed a Modification, even if such software files are aggregated as + part of a product, or in any medium of storage, with any file that does + contain Original Software or any previous Modification. + +2. License Terms. All distribution of the Subject Software must be made +subject to the terms of this License. A copy of this License and the Required +Notice must be included in any documentation for Subject Software where +Recipient's rights relating to Subject Software and/or any Accompanying +Technology are described. Distributions of Subject Software in source code +form must also include the Required Notice in every file distributed. In +addition, a ReadMe file entitled "Important Legal Notice" must be distributed +with each distribution of one or more files that incorporate Subject Software. +That file must be included with distributions made in both source code and +executable form. A copy of the License and the Required Notice must be +included in that file. Recipient may distribute Accompanying Technology under +a license of Recipient's choice, which may contain terms different from this +License, provided that (i) Recipient is in compliance with the terms of this +License, (ii) such other license terms do not modify or supersede the terms of +this License as applicable to the Subject Software, (iii) Recipient hereby +indemnifies SGI for any liability incurred by SGI as a result of the +distribution of Accompanying Technology or the use of other license terms. + +3. Termination. This License and the rights granted hereunder will terminate +automatically if Recipient fails to comply with terms herein and fails to cure +such breach within 30 days of the breach. Any sublicense to the Subject +Software that is properly granted shall survive any termination of this +License absent termination by the terms of such sublicense. Provisions which, +by their nature, must remain in effect beyond the termination of this License +shall survive. + +4. Trademark Rights. This License does not grant any rights to use any trade +name, trademark or service mark whatsoever. No trade name, trademark or +service mark of SGI may be used to endorse or promote products derived from or +incorporating any Subject Software without prior written permission of SGI. + +5. No Other Rights. No rights or licenses not expressly granted hereunder +shall arise by implication, estoppel or otherwise. Title to and ownership of +the Original Software at all times remains with SGI. All rights in the +Original Software not expressly granted under this License are reserved. + +6. Compliance with Laws; Non-Infringement. Recipient shall comply with all +applicable laws and regulations in connection with use and distribution of the +Subject Software, including but not limited to, all export and import control +laws and regulations of the U.S. government and other countries. Recipient may +not distribute Subject Software that (i) in any way infringes (directly or +contributorily) the rights (including patent, copyright, trade secret, +trademark or other intellectual property rights of any kind) of any other +person or entity, or (ii) breaches any representation or warranty, express, +implied or statutory, which under any applicable law it might be deemed to +have been distributed. + +7. Claims of Infringement. If Recipient at any time has knowledge of any one +or more third party claims that reproduction, modification, use, distribution, +import or sale of Subject Software (including particular functionality or code +incorporated in Subject Software) infringes the third party's intellectual +property rights, Recipient must place in a well-identified web page bearing +the title "LEGAL" a description of each such claim and a description of the +party making each such claim in sufficient detail that a user of the Subject +Software will know whom to contact regarding the claim. Also, upon gaining +such knowledge of any such claim, Recipient must conspicuously include the URL +for such web page in the Required Notice, and in the text of any related +documentation, license agreement or collateral in which Recipient describes +end user's rights relating to the Subject Software. If Recipient obtains such +knowledge after it makes Subject Software available to any other person or +entity, Recipient shall take other steps (such as notifying appropriate +mailing lists or newsgroups) reasonably calculated to provide such knowledge +to those who received the Subject Software. + +8. DISCLAIMER OF WARRANTY. SUBJECT SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, +WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT +LIMITATION, WARRANTIES THAT THE SUBJECT SOFTWARE IS FREE OF DEFECTS, +MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. SGI ASSUMES NO +RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE. SHOULD ANY SOFTWARE +PROVE DEFECTIVE IN ANY RESPECT, SGI ASSUMES NO COST OR LIABILITY FOR ANY +SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN +ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY SUBJECT SOFTWARE IS AUTHORIZED +HEREUNDER EXCEPT UNDER THIS DISCLAIMER. + +9. LIMITATION OF LIABILITY. UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, +WHETHER TORT (INCLUDING, WITHOUT LIMITATION, NEGLIGENCE OR STRICT LIABILITY), +CONTRACT, OR OTHERWISE, SHALL SGI OR ANY SGI LICENSOR BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SUBJECT SOFTWARE OR +THE USE OR OTHER DEALINGS IN THE SUBJECT SOFTWARE. SOME JURISDICTIONS DO NOT +ALLOW THE EXCLUSION OR LIMITATION OF CERTAIN DAMAGES, SO THIS EXCLUSION AND +LIMITATION MAY NOT APPLY TO RECIPIENT TO THE EXTENT SO DISALLOWED. + +10. Indemnity. Recipient shall be solely responsible for damages arising, +directly or indirectly, out of its utilization of rights under this License. +Recipient will defend, indemnify and hold SGI and its successors and assigns +harmless from and against any loss, liability, damages, costs or expenses +(including the payment of reasonable attorneys fees) arising out of +(Recipient's use, modification, reproduction and distribution of the Subject +Software or out of any representation or warranty made by Recipient. + +11. U.S. Government End Users. The Subject Software is a "commercial item" +consisting of "commercial computer software" as such terms are defined in +title 48 of the Code of Federal Regulations and all U.S. Government End Users +acquire only the rights set forth in this License and are subject to the terms +of this License. + +12. Miscellaneous. This License represents the complete agreement concerning +subject matter hereof. If any provision of this License is held to be +unenforceable by any judicial or administrative authority having proper +jurisdiction with respect thereto, such provision shall be reformed so as to +achieve as nearly as possible the same economic effect as the original +provision and the remainder of this License will remain in effect. This +License shall be governed by and construed in accordance with the laws of the +United States and the State of California as applied to agreements entered +into and to be performed entirely within California between California +residents. Any litigation relating to this License shall be subject to the +exclusive jurisdiction of the Federal Courts of the Northern District of +California (or, absent subject matter jurisdiction in such courts, the courts +of the State of California), with venue lying exclusively in Santa Clara +County, California, with the losing party responsible for costs, including +without limitation, court costs and reasonable attorneys fees and expenses. +The application of the United Nations Convention on Contracts for the +International Sale of Goods is expressly excluded. Any law or regulation that +provides that the language of a contract shall be construed against the +drafter shall not apply to this License. + +Exhibit A + +Copyright (c) 1994-1999 Silicon Graphics, Inc. + +The contents of this file are subject to the CID Font Code Public License +Version 1.0 (the "License"). You may not use this file except in compliance +with the License. You may obtain a copy of the License at Silicon Graphics, +Inc., attn: Legal Services, 2011 N. Shoreline Blvd., Mountain View, CA 94043 +or at http://www.sgi.com/software/opensource/cid/license.html + +Software distributed under the License is distributed on an "AS IS" basis. ALL +WARRANTIES ARE DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED +WARRANTIES OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE OR OF +NON-INFRINGEMENT. See the License for the specific language governing rights +and limitations under the License. + +The Original Software (as defined in the License) is CID font code that was +developed by Silicon Graphics, Inc. Those portions of the Subject Software (as +defined in the License) that were created by Silicon Graphics, Inc. are +Copyright (c) 1994-1999 Silicon Graphics, Inc. All Rights Reserved. + +[NOTE: When using this text in connection with Subject Software delivered +solely in object code form, Recipient may replace the words "this file" with +"this software" in both the first and second sentences.] 3.6. Bitstream Vera +Fonts Copyright + +The fonts have a generous copyright, allowing derivative works (as long as +"Bitstream" or "Vera" are not in the names), and full redistribution (so long +as they are not *sold* by themselves). They can be be bundled, redistributed +and sold with any software. + +The fonts are distributed under the following copyright: + +Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera is a +trademark of Bitstream, Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of the fonts accompanying this license ("Fonts") and associated documentation +files (the "Font Software"), to reproduce and distribute the Font Software, +including without limitation the rights to use, copy, merge, publish, +distribute, and/or sell copies of the Font Software, and to permit persons to +whom the Font Software is furnished to do so, subject to the following +conditions: + +The above copyright and trademark notices and this permission notice shall be +included in all copies of one or more of the Font Software typefaces. + +The Font Software may be modified, altered, or added to, and in particular the +designs of glyphs or characters in the Fonts may be modified and additional +glyphs or characters may be added to the Fonts, only if the fonts are renamed +to names not containing either the words "Bitstream" or the word "Vera". + +This License becomes null and void to the extent applicable to Fonts or Font +Software that has been modified and is distributed under the "Bitstream Vera" +names. + +The Font Software may be sold as part of a larger software package but no copy +of one or more of the Font Software typefaces may be sold by itself. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME FOUNDATION +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, +SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO +USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE. + +Except as contained in this notice, the names of Gnome, the Gnome Foundation, +and Bitstream Inc., shall not be used in advertising or otherwise to promote +the sale, use or other dealings in this Font Software without prior written +authorization from the Gnome Foundation or Bitstream Inc., respectively. For +further information, contact: fonts at gnome dot org. 3.7. Bigelow & Holmes +Inc and URW++ GmbH Luxi font license + +Luxi fonts copyright (c) 2001 by Bigelow & Holmes Inc. Luxi font instruction +code copyright (c) 2001 by URW++ GmbH. All Rights Reserved. Luxi is a +registered trademark of Bigelow & Holmes Inc. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of these Fonts and associated documentation files (the "Font Software"), to +deal in the Font Software, including without limitation the rights to use, +copy, merge, publish, distribute, sublicense, and/or sell copies of the Font +Software, and to permit persons to whom the Font Software is furnished to do +so, subject to the following conditions: + +The above copyright and trademark notices and this permission notice shall be +included in all copies of one or more of the Font Software. + +The Font Software may not be modified, altered, or added to, and in particular +the designs of glyphs or characters in the Fonts may not be modified nor may +additional glyphs or characters be added to the Fonts. This License becomes +null and void when the Fonts or Font Software have been modified. + +THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, +TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BIGELOW & HOLMES INC. OR URW++ +GMBH. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY +GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR +INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT +SOFTWARE. + +Except as contained in this notice, the names of Bigelow & Holmes Inc. and +URW++ GmbH. shall not be used in advertising or otherwise to promote the sale, +use or other dealings in this Font Software without prior written +authorization from Bigelow & Holmes Inc. and URW++ GmbH. + +For further information, contact: + +info@urwpp.de or design@bigelowandholmes.com + + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to zlib v1.2.8, which may be included +with JRE 8, JDK 8, and OpenJDK 8. + +--- begin of LICENSE --- + + version 1.2.8, April 28th, 2013 + + Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly Mark Adler + jloup@gzip.org madler@alumni.caltech.edu + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + +%% This notice is provided with respect to the following which may be +included with JRE 8, JDK 8, and OpenJDK 8. + + Apache Commons Math 3.2 + Apache Derby 10.11.1.2 + Apache Jakarta BCEL 5.1 + Apache Jakarta Regexp 1.4 + Apache Santuario XML Security for Java 1.5.4 + Apache Xalan-Java 2.7.1 + Apache Xerces Java 2.10.0 + Apache XML Resolver 1.1 + Dynalink 0.5 + + +--- begin of LICENSE --- + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) 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. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--- end of LICENSE --- + +------------------------------------------------------------------------------- + diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/Welcome.html b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/Welcome.html new file mode 100644 index 0000000..4553aec --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/Welcome.html @@ -0,0 +1,28 @@ + + + +Welcome to the Java(TM) Platform + + + + +

Welcome to the JavaTM Platform

+

Welcome to the JavaTM Standard Edition Runtime + Environment. This provides complete runtime support for Java applications. +

The runtime environment includes the JavaTM + Plug-in product which supports the Java environment inside web browsers. +

References

+

+See the Java Plug-in product +documentation for more information on using the Java Plug-in product. +

See the Java Platform web site for + more information on the Java Platform. +


+ +Copyright (c) 2006, 2015, Oracle and/or its affiliates. All rights reserved. + +

+ + diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JAWTAccessBridge-32.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JAWTAccessBridge-32.dll new file mode 100644 index 0000000..2426e3a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JAWTAccessBridge-32.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JavaAccessBridge-32.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JavaAccessBridge-32.dll new file mode 100644 index 0000000..73b57bb Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/JavaAccessBridge-32.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/WindowsAccessBridge-32.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/WindowsAccessBridge-32.dll new file mode 100644 index 0000000..97e8db7 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/WindowsAccessBridge-32.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/awt.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/awt.dll new file mode 100644 index 0000000..f82d7c6 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/awt.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/bci.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/bci.dll new file mode 100644 index 0000000..a90fca8 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/bci.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/Xusage.txt b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/Xusage.txt new file mode 100644 index 0000000..11302aa --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/Xusage.txt @@ -0,0 +1,24 @@ + -Xmixed mixed mode execution (default) + -Xint interpreted mode execution only + -Xbootclasspath: + set search path for bootstrap classes and resources + -Xbootclasspath/a: + append to end of bootstrap class path + -Xbootclasspath/p: + prepend in front of bootstrap class path + -Xnoclassgc disable class garbage collection + -Xincgc enable incremental garbage collection + -Xloggc: log GC status to a file with time stamps + -Xbatch disable background compilation + -Xms set initial Java heap size + -Xmx set maximum Java heap size + -Xss set java thread stack size + -Xprof output cpu profiling data + -Xfuture enable strictest checks, anticipating future default + -Xrs reduce use of OS signals by Java/VM (see documentation) + -Xcheck:jni perform additional checks for JNI functions + -Xshare:off do not attempt to use shared class data + -Xshare:auto use shared class data if possible (default) + -Xshare:on require using shared class data, otherwise fail. + +The -X options are non-standard and subject to change without notice. diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/classes.jsa b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/classes.jsa new file mode 100644 index 0000000..0f8156c Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/classes.jsa differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/jvm.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/jvm.dll new file mode 100644 index 0000000..c3f6c1f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/client/jvm.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dcpr.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dcpr.dll new file mode 100644 index 0000000..6b35d31 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dcpr.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/decora_sse.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/decora_sse.dll new file mode 100644 index 0000000..425cd81 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/decora_sse.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/deploy.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/deploy.dll new file mode 100644 index 0000000..26ec4c4 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/deploy.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_shmem.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_shmem.dll new file mode 100644 index 0000000..e486917 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_shmem.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_socket.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_socket.dll new file mode 100644 index 0000000..79e5430 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dt_socket.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/deployJava1.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/deployJava1.dll new file mode 100644 index 0000000..f50a717 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/deployJava1.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/npdeployJava1.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/npdeployJava1.dll new file mode 100644 index 0000000..16409c4 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/dtplugin/npdeployJava1.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/eula.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/eula.dll new file mode 100644 index 0000000..495b14e Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/eula.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fontmanager.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fontmanager.dll new file mode 100644 index 0000000..b28393a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fontmanager.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fxplugins.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fxplugins.dll new file mode 100644 index 0000000..9dbecd4 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/fxplugins.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glass.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glass.dll new file mode 100644 index 0000000..a80af5f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glass.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glib-lite.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glib-lite.dll new file mode 100644 index 0000000..ffec2d3 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/glib-lite.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/gstreamer-lite.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/gstreamer-lite.dll new file mode 100644 index 0000000..27dc3fc Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/gstreamer-lite.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/hprof.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/hprof.dll new file mode 100644 index 0000000..e3bc666 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/hprof.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/instrument.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/instrument.dll new file mode 100644 index 0000000..d42b503 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/instrument.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pcsc.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pcsc.dll new file mode 100644 index 0000000..3f2f0a8 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pcsc.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pkcs11.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pkcs11.dll new file mode 100644 index 0000000..470325a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/j2pkcs11.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jaas_nt.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jaas_nt.dll new file mode 100644 index 0000000..4a15e8f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jaas_nt.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jabswitch.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jabswitch.exe new file mode 100644 index 0000000..b6685b1 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jabswitch.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java-rmi.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java-rmi.exe new file mode 100644 index 0000000..d74c457 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java-rmi.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.dll new file mode 100644 index 0000000..b8ebeab Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.exe new file mode 100644 index 0000000..0acb85a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java_crw_demo.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java_crw_demo.dll new file mode 100644 index 0000000..7b6eaf8 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/java_crw_demo.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.cpl b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.cpl new file mode 100644 index 0000000..ed3cd4f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.cpl differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.exe new file mode 100644 index 0000000..bc49b91 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javacpl.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font.dll new file mode 100644 index 0000000..c1b9549 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font_t2k.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font_t2k.dll new file mode 100644 index 0000000..4a71b42 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_font_t2k.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_iio.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_iio.dll new file mode 100644 index 0000000..bf840e8 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javafx_iio.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaw.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaw.exe new file mode 100644 index 0000000..b0c58fd Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaw.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaws.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaws.exe new file mode 100644 index 0000000..b0173fe Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/javaws.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jawt.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jawt.dll new file mode 100644 index 0000000..096a785 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jawt.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jdwp.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jdwp.dll new file mode 100644 index 0000000..5a75ea6 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jdwp.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfr.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfr.dll new file mode 100644 index 0000000..f0b920f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfr.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxmedia.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxmedia.dll new file mode 100644 index 0000000..1701d12 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxmedia.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxwebkit.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxwebkit.dll new file mode 100644 index 0000000..7135693 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jfxwebkit.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jjs.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jjs.exe new file mode 100644 index 0000000..fa82cba Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jjs.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jli.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jli.dll new file mode 100644 index 0000000..78a1940 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jli.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2iexp.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2iexp.dll new file mode 100644 index 0000000..3d3ff31 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2iexp.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2launcher.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2launcher.exe new file mode 100644 index 0000000..ff770c4 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2launcher.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2native.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2native.dll new file mode 100644 index 0000000..0e52dcb Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2native.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2ssv.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2ssv.dll new file mode 100644 index 0000000..0d28c9a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jp2ssv.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jpeg.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jpeg.dll new file mode 100644 index 0000000..85a8d86 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jpeg.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsdt.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsdt.dll new file mode 100644 index 0000000..b2dca4d Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsdt.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsound.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsound.dll new file mode 100644 index 0000000..f757e2f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsound.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsoundds.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsoundds.dll new file mode 100644 index 0000000..161fbb7 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/jsoundds.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kcms.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kcms.dll new file mode 100644 index 0000000..76533fd Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kcms.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/keytool.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/keytool.exe new file mode 100644 index 0000000..b71331e Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/keytool.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kinit.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kinit.exe new file mode 100644 index 0000000..333ebf8 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/kinit.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/klist.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/klist.exe new file mode 100644 index 0000000..fc80d9e Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/klist.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ktab.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ktab.exe new file mode 100644 index 0000000..464cd57 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ktab.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/lcms.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/lcms.dll new file mode 100644 index 0000000..5a00780 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/lcms.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/management.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/management.dll new file mode 100644 index 0000000..5a1776f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/management.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/mlib_image.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/mlib_image.dll new file mode 100644 index 0000000..6006dad Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/mlib_image.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/msvcr100.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/msvcr100.dll new file mode 100644 index 0000000..3e82b1a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/msvcr100.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/net.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/net.dll new file mode 100644 index 0000000..4557a78 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/net.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/nio.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/nio.dll new file mode 100644 index 0000000..0b248b9 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/nio.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/npt.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/npt.dll new file mode 100644 index 0000000..4d9a637 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/npt.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/orbd.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/orbd.exe new file mode 100644 index 0000000..23bbffb Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/orbd.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/pack200.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/pack200.exe new file mode 100644 index 0000000..315150d Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/pack200.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/msvcr100.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/msvcr100.dll new file mode 100644 index 0000000..3e82b1a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/msvcr100.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/npjp2.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/npjp2.dll new file mode 100644 index 0000000..a065611 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/plugin2/npjp2.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/policytool.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/policytool.exe new file mode 100644 index 0000000..933bdd2 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/policytool.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_common.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_common.dll new file mode 100644 index 0000000..b6345be Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_common.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_d3d.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_d3d.dll new file mode 100644 index 0000000..ac1300a Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_d3d.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_es2.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_es2.dll new file mode 100644 index 0000000..9af90c6 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_es2.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_sw.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_sw.dll new file mode 100644 index 0000000..647b6a5 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/prism_sw.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/resource.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/resource.dll new file mode 100644 index 0000000..3ff7d9f Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/resource.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmid.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmid.exe new file mode 100644 index 0000000..3d7a2b3 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmid.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmiregistry.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmiregistry.exe new file mode 100644 index 0000000..711e575 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/rmiregistry.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/servertool.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/servertool.exe new file mode 100644 index 0000000..149fe32 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/servertool.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/splashscreen.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/splashscreen.dll new file mode 100644 index 0000000..7dffb4b Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/splashscreen.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssv.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssv.dll new file mode 100644 index 0000000..70c8377 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssv.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssvagent.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssvagent.exe new file mode 100644 index 0000000..f1b0ead Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/ssvagent.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunec.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunec.dll new file mode 100644 index 0000000..34426dd Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunec.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunmscapi.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunmscapi.dll new file mode 100644 index 0000000..6ed41ba Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/sunmscapi.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/t2k.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/t2k.dll new file mode 100644 index 0000000..4b38bd4 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/t2k.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/tnameserv.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/tnameserv.exe new file mode 100644 index 0000000..237bdc5 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/tnameserv.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack.dll new file mode 100644 index 0000000..3b57cda Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack200.exe b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack200.exe new file mode 100644 index 0000000..cbc6bd3 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/unpack200.exe differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/verify.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/verify.dll new file mode 100644 index 0000000..176ef16 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/verify.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/w2k_lsa_auth.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/w2k_lsa_auth.dll new file mode 100644 index 0000000..e70ace3 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/w2k_lsa_auth.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/wsdetect.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/wsdetect.dll new file mode 100644 index 0000000..f55d4c6 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/wsdetect.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/zip.dll b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/zip.dll new file mode 100644 index 0000000..f802540 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/bin/zip.dll differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/accessibility.properties b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/accessibility.properties new file mode 100644 index 0000000..7217be0 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/accessibility.properties @@ -0,0 +1,6 @@ +# +# Load the Java Access Bridge class into the JVM +# +#assistive_technologies=com.sun.java.accessibility.AccessBridge +#screen_magnifier_present=true + diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/calendars.properties b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/calendars.properties new file mode 100644 index 0000000..87a8630 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/calendars.properties @@ -0,0 +1,60 @@ +# Copyright (c) 2005, 2013, Oracle and/or its affiliates. All rights reserved. +# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# +# + +# +# Japanese imperial calendar +# +# Meiji since 1868-01-01 00:00:00 local time (Gregorian) +# Taisho since 1912-07-30 00:00:00 local time (Gregorian) +# Showa since 1926-12-25 00:00:00 local time (Gregorian) +# Heisei since 1989-01-08 00:00:00 local time (Gregorian) +calendar.japanese.type: LocalGregorianCalendar +calendar.japanese.eras: \ + name=Meiji,abbr=M,since=-3218832000000; \ + name=Taisho,abbr=T,since=-1812153600000; \ + name=Showa,abbr=S,since=-1357603200000; \ + name=Heisei,abbr=H,since=600220800000 + +# +# Taiwanese calendar +# Minguo since 1911-01-01 00:00:00 local time (Gregorian) +calendar.taiwanese.type: LocalGregorianCalendar +calendar.taiwanese.eras: \ + name=MinGuo,since=-1830384000000 + +# +# Thai Buddhist calendar +# Buddhist Era since -542-01-01 00:00:00 local time (Gregorian) +calendar.thai-buddhist.type: LocalGregorianCalendar +calendar.thai-buddhist.eras: \ + name=BuddhistEra,abbr=B.E.,since=-79302585600000 +calendar.thai-buddhist.year-boundary: \ + day1=4-1,since=-79302585600000; \ + day1=1-1,since=-915148800000 + +# +# Hijrah calendars +# +calendar.hijrah.Hijrah-umalqura: hijrah-config-umalqura.properties +calendar.hijrah.Hijrah-umalqura.type: islamic-umalqura diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/charsets.jar b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/charsets.jar new file mode 100644 index 0000000..a7a1d29 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/charsets.jar differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/classlist b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/classlist new file mode 100644 index 0000000..06bb3ab --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/classlist @@ -0,0 +1,2378 @@ +com/sun/java/swing/SwingUtilities3 +com/sun/java/swing/plaf/windows/WindowsPopupWindow +com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI +com/sun/swing/internal/plaf/basic/resources/basic +com/sun/swing/internal/plaf/metal/resources/metal +java/applet/Applet +java/awt/AWTEvent +java/awt/AWTEvent$1 +java/awt/AWTEventMulticaster +java/awt/AWTKeyStroke +java/awt/AWTKeyStroke$1 +java/awt/ActiveEvent +java/awt/Adjustable +java/awt/AlphaComposite +java/awt/BasicStroke +java/awt/BorderLayout +java/awt/BufferCapabilities +java/awt/Canvas +java/awt/CardLayout +java/awt/CardLayout$Card +java/awt/Color +java/awt/Component +java/awt/Component$1 +java/awt/Component$3 +java/awt/Component$AWTTreeLock +java/awt/Component$AccessibleAWTComponent +java/awt/Component$BaselineResizeBehavior +java/awt/Component$BltBufferStrategy +java/awt/Component$BltSubRegionBufferStrategy +java/awt/Component$DummyRequestFocusController +java/awt/Component$FlipBufferStrategy +java/awt/ComponentOrientation +java/awt/Composite +java/awt/Conditional +java/awt/Container +java/awt/Container$1 +java/awt/Container$AccessibleAWTContainer +java/awt/ContainerOrderFocusTraversalPolicy +java/awt/Cursor +java/awt/Cursor$1 +java/awt/Cursor$CursorDisposer +java/awt/DefaultFocusTraversalPolicy +java/awt/DefaultKeyboardFocusManager +java/awt/DefaultKeyboardFocusManager$1 +java/awt/DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent +java/awt/DefaultKeyboardFocusManager$TypeAheadMarker +java/awt/Dialog +java/awt/Dialog$ModalExclusionType +java/awt/Dialog$ModalityType +java/awt/Dimension +java/awt/Event +java/awt/EventDispatchThread +java/awt/EventDispatchThread$1 +java/awt/EventDispatchThread$HierarchyEventFilter +java/awt/EventFilter +java/awt/EventFilter$FilterAction +java/awt/EventQueue +java/awt/EventQueue$1 +java/awt/EventQueue$1AWTInvocationLock +java/awt/EventQueue$2 +java/awt/EventQueue$3 +java/awt/EventQueue$4 +java/awt/EventQueue$5 +java/awt/FlowLayout +java/awt/FocusTraversalPolicy +java/awt/Font +java/awt/Font$FontAccessImpl +java/awt/FontMetrics +java/awt/Frame +java/awt/Frame$1 +java/awt/Graphics +java/awt/Graphics2D +java/awt/GraphicsCallback +java/awt/GraphicsCallback$PaintCallback +java/awt/GraphicsConfiguration +java/awt/GraphicsDevice +java/awt/GraphicsEnvironment +java/awt/GraphicsEnvironment$1 +java/awt/GridLayout +java/awt/Image +java/awt/Image$1 +java/awt/ImageCapabilities +java/awt/ImageMediaEntry +java/awt/Insets +java/awt/ItemSelectable +java/awt/KeyEventDispatcher +java/awt/KeyEventPostProcessor +java/awt/KeyboardFocusManager +java/awt/KeyboardFocusManager$1 +java/awt/KeyboardFocusManager$3 +java/awt/KeyboardFocusManager$HeavyweightFocusRequest +java/awt/KeyboardFocusManager$LightweightFocusRequest +java/awt/Label +java/awt/LayoutManager +java/awt/LayoutManager2 +java/awt/LightweightDispatcher +java/awt/LightweightDispatcher$2 +java/awt/MediaEntry +java/awt/MediaTracker +java/awt/MenuBar +java/awt/MenuComponent +java/awt/MenuContainer +java/awt/ModalEventFilter +java/awt/Paint +java/awt/Panel +java/awt/Point +java/awt/PrintGraphics +java/awt/Queue +java/awt/Rectangle +java/awt/RenderingHints +java/awt/RenderingHints$Key +java/awt/SentEvent +java/awt/SequencedEvent +java/awt/SequencedEvent$1 +java/awt/Shape +java/awt/SplashScreen +java/awt/Stroke +java/awt/Toolkit +java/awt/Toolkit$1 +java/awt/Toolkit$2 +java/awt/Toolkit$3 +java/awt/Toolkit$4 +java/awt/Toolkit$5 +java/awt/Toolkit$DesktopPropertyChangeSupport +java/awt/Toolkit$DesktopPropertyChangeSupport$1 +java/awt/Toolkit$SelectiveAWTEventListener +java/awt/Toolkit$ToolkitEventMulticaster +java/awt/Transparency +java/awt/TrayIcon +java/awt/VKCollection +java/awt/Window +java/awt/Window$1 +java/awt/Window$1DisposeAction +java/awt/Window$Type +java/awt/Window$WindowDisposerRecord +java/awt/color/ColorSpace +java/awt/color/ICC_ColorSpace +java/awt/color/ICC_Profile +java/awt/color/ICC_Profile$1 +java/awt/color/ICC_ProfileRGB +java/awt/datatransfer/ClipboardOwner +java/awt/datatransfer/FlavorMap +java/awt/datatransfer/FlavorTable +java/awt/datatransfer/SystemFlavorMap +java/awt/dnd/DropTarget +java/awt/dnd/DropTargetContext +java/awt/dnd/DropTargetListener +java/awt/dnd/peer/DragSourceContextPeer +java/awt/dnd/peer/DropTargetPeer +java/awt/event/AWTEventListener +java/awt/event/AWTEventListenerProxy +java/awt/event/ActionEvent +java/awt/event/ActionListener +java/awt/event/AdjustmentEvent +java/awt/event/AdjustmentListener +java/awt/event/ComponentAdapter +java/awt/event/ComponentEvent +java/awt/event/ComponentListener +java/awt/event/ContainerEvent +java/awt/event/ContainerListener +java/awt/event/FocusAdapter +java/awt/event/FocusEvent +java/awt/event/FocusListener +java/awt/event/HierarchyBoundsListener +java/awt/event/HierarchyListener +java/awt/event/InputEvent +java/awt/event/InputEvent$1 +java/awt/event/InputMethodEvent +java/awt/event/InputMethodListener +java/awt/event/InvocationEvent +java/awt/event/InvocationEvent$1 +java/awt/event/ItemEvent +java/awt/event/ItemListener +java/awt/event/KeyAdapter +java/awt/event/KeyEvent +java/awt/event/KeyEvent$1 +java/awt/event/KeyListener +java/awt/event/MouseAdapter +java/awt/event/MouseEvent +java/awt/event/MouseListener +java/awt/event/MouseMotionAdapter +java/awt/event/MouseMotionListener +java/awt/event/MouseWheelListener +java/awt/event/NativeLibLoader +java/awt/event/NativeLibLoader$1 +java/awt/event/PaintEvent +java/awt/event/TextListener +java/awt/event/WindowAdapter +java/awt/event/WindowEvent +java/awt/event/WindowFocusListener +java/awt/event/WindowListener +java/awt/event/WindowStateListener +java/awt/font/FontRenderContext +java/awt/font/GlyphVector +java/awt/font/LineMetrics +java/awt/font/TextAttribute +java/awt/geom/AffineTransform +java/awt/geom/Dimension2D +java/awt/geom/GeneralPath +java/awt/geom/Line2D +java/awt/geom/Line2D$Float +java/awt/geom/LineIterator +java/awt/geom/Path2D +java/awt/geom/Path2D$Float +java/awt/geom/PathIterator +java/awt/geom/Point2D +java/awt/geom/Point2D$Float +java/awt/geom/RectIterator +java/awt/geom/Rectangle2D +java/awt/geom/Rectangle2D$Float +java/awt/geom/RectangularShape +java/awt/im/InputContext +java/awt/im/InputMethodRequests +java/awt/im/spi/InputMethod +java/awt/im/spi/InputMethodContext +java/awt/im/spi/InputMethodDescriptor +java/awt/image/BufferStrategy +java/awt/image/BufferedImage +java/awt/image/BufferedImage$1 +java/awt/image/ColorModel +java/awt/image/ColorModel$1 +java/awt/image/ComponentSampleModel +java/awt/image/DataBuffer +java/awt/image/DataBuffer$1 +java/awt/image/DataBufferByte +java/awt/image/DataBufferInt +java/awt/image/DirectColorModel +java/awt/image/FilteredImageSource +java/awt/image/ImageConsumer +java/awt/image/ImageFilter +java/awt/image/ImageObserver +java/awt/image/ImageProducer +java/awt/image/IndexColorModel +java/awt/image/PackedColorModel +java/awt/image/PixelInterleavedSampleModel +java/awt/image/RGBImageFilter +java/awt/image/Raster +java/awt/image/RenderedImage +java/awt/image/SampleModel +java/awt/image/SinglePixelPackedSampleModel +java/awt/image/VolatileImage +java/awt/image/WritableRaster +java/awt/image/WritableRenderedImage +java/awt/peer/CanvasPeer +java/awt/peer/ComponentPeer +java/awt/peer/ContainerPeer +java/awt/peer/FontPeer +java/awt/peer/FramePeer +java/awt/peer/KeyboardFocusManagerPeer +java/awt/peer/LabelPeer +java/awt/peer/LightweightPeer +java/awt/peer/PanelPeer +java/awt/peer/WindowPeer +java/awt/print/PrinterGraphics +java/beans/ChangeListenerMap +java/beans/PropertyChangeEvent +java/beans/PropertyChangeListener +java/beans/PropertyChangeListenerProxy +java/beans/PropertyChangeSupport +java/beans/PropertyChangeSupport$PropertyChangeListenerMap +java/beans/VetoableChangeListener +java/io/Bits +java/io/BufferedInputStream +java/io/BufferedOutputStream +java/io/BufferedReader +java/io/BufferedWriter +java/io/ByteArrayInputStream +java/io/ByteArrayOutputStream +java/io/Closeable +java/io/DataInput +java/io/DataInputStream +java/io/DataOutput +java/io/DataOutputStream +java/io/DefaultFileSystem +java/io/EOFException +java/io/ExpiringCache +java/io/ExpiringCache$1 +java/io/ExpiringCache$Entry +java/io/Externalizable +java/io/File +java/io/File$PathStatus +java/io/FileDescriptor +java/io/FileDescriptor$1 +java/io/FileInputStream +java/io/FileInputStream$1 +java/io/FileNotFoundException +java/io/FileOutputStream +java/io/FileOutputStream$1 +java/io/FilePermission +java/io/FilePermission$1 +java/io/FilePermissionCollection +java/io/FileReader +java/io/FileSystem +java/io/FileWriter +java/io/FilenameFilter +java/io/FilterInputStream +java/io/FilterOutputStream +java/io/FilterReader +java/io/Flushable +java/io/IOException +java/io/InputStream +java/io/InputStreamReader +java/io/InterruptedIOException +java/io/ObjectInput +java/io/ObjectInputStream +java/io/ObjectInputStream$BlockDataInputStream +java/io/ObjectInputStream$GetField +java/io/ObjectInputStream$GetFieldImpl +java/io/ObjectInputStream$HandleTable +java/io/ObjectInputStream$HandleTable$HandleList +java/io/ObjectInputStream$PeekInputStream +java/io/ObjectInputStream$ValidationList +java/io/ObjectOutput +java/io/ObjectOutputStream +java/io/ObjectOutputStream$BlockDataOutputStream +java/io/ObjectOutputStream$HandleTable +java/io/ObjectOutputStream$ReplaceTable +java/io/ObjectStreamClass +java/io/ObjectStreamClass$1 +java/io/ObjectStreamClass$2 +java/io/ObjectStreamClass$3 +java/io/ObjectStreamClass$4 +java/io/ObjectStreamClass$5 +java/io/ObjectStreamClass$Caches +java/io/ObjectStreamClass$ClassDataSlot +java/io/ObjectStreamClass$EntryFuture +java/io/ObjectStreamClass$ExceptionInfo +java/io/ObjectStreamClass$FieldReflector +java/io/ObjectStreamClass$FieldReflectorKey +java/io/ObjectStreamClass$MemberSignature +java/io/ObjectStreamClass$WeakClassKey +java/io/ObjectStreamConstants +java/io/ObjectStreamField +java/io/OutputStream +java/io/OutputStreamWriter +java/io/PrintStream +java/io/PushbackInputStream +java/io/RandomAccessFile +java/io/RandomAccessFile$1 +java/io/Reader +java/io/SerialCallbackContext +java/io/Serializable +java/io/StringReader +java/io/StringWriter +java/io/UnsupportedEncodingException +java/io/WinNTFileSystem +java/io/Writer +java/lang/AbstractStringBuilder +java/lang/Appendable +java/lang/ApplicationShutdownHooks +java/lang/ApplicationShutdownHooks$1 +java/lang/ArithmeticException +java/lang/ArrayIndexOutOfBoundsException +java/lang/ArrayStoreException +java/lang/AutoCloseable +java/lang/Boolean +java/lang/BootstrapMethodError +java/lang/Byte +java/lang/CharSequence +java/lang/Character +java/lang/Character$CharacterCache +java/lang/CharacterData +java/lang/CharacterData00 +java/lang/CharacterDataLatin1 +java/lang/Class +java/lang/Class$1 +java/lang/Class$3 +java/lang/Class$4 +java/lang/Class$AnnotationData +java/lang/Class$Atomic +java/lang/Class$ReflectionData +java/lang/ClassCastException +java/lang/ClassFormatError +java/lang/ClassLoader +java/lang/ClassLoader$2 +java/lang/ClassLoader$3 +java/lang/ClassLoader$NativeLibrary +java/lang/ClassLoader$ParallelLoaders +java/lang/ClassLoaderHelper +java/lang/ClassNotFoundException +java/lang/ClassValue$ClassValueMap +java/lang/CloneNotSupportedException +java/lang/Cloneable +java/lang/Comparable +java/lang/Compiler +java/lang/Compiler$1 +java/lang/Double +java/lang/Enum +java/lang/Error +java/lang/Exception +java/lang/ExceptionInInitializerError +java/lang/Float +java/lang/IllegalAccessError +java/lang/IllegalAccessException +java/lang/IllegalArgumentException +java/lang/IllegalMonitorStateException +java/lang/IllegalStateException +java/lang/IncompatibleClassChangeError +java/lang/IndexOutOfBoundsException +java/lang/InheritableThreadLocal +java/lang/InstantiationException +java/lang/Integer +java/lang/Integer$IntegerCache +java/lang/InternalError +java/lang/InterruptedException +java/lang/Iterable +java/lang/LinkageError +java/lang/Long +java/lang/Long$LongCache +java/lang/Math +java/lang/NoClassDefFoundError +java/lang/NoSuchFieldException +java/lang/NoSuchMethodError +java/lang/NoSuchMethodException +java/lang/NullPointerException +java/lang/Number +java/lang/NumberFormatException +java/lang/Object +java/lang/OutOfMemoryError +java/lang/Package +java/lang/ProcessEnvironment +java/lang/ProcessEnvironment$CheckedEntry +java/lang/ProcessEnvironment$CheckedEntrySet +java/lang/ProcessEnvironment$CheckedEntrySet$1 +java/lang/ProcessEnvironment$EntryComparator +java/lang/ProcessEnvironment$NameComparator +java/lang/Readable +java/lang/ReflectiveOperationException +java/lang/Runnable +java/lang/Runtime +java/lang/RuntimeException +java/lang/RuntimePermission +java/lang/SecurityException +java/lang/SecurityManager +java/lang/Short +java/lang/Short$ShortCache +java/lang/Shutdown +java/lang/Shutdown$Lock +java/lang/StackOverflowError +java/lang/StackTraceElement +java/lang/StrictMath +java/lang/String +java/lang/String$CaseInsensitiveComparator +java/lang/StringBuffer +java/lang/StringBuilder +java/lang/StringCoding +java/lang/StringCoding$StringDecoder +java/lang/StringCoding$StringEncoder +java/lang/StringIndexOutOfBoundsException +java/lang/System +java/lang/System$2 +java/lang/SystemClassLoaderAction +java/lang/Terminator +java/lang/Terminator$1 +java/lang/Thread +java/lang/Thread$State +java/lang/Thread$UncaughtExceptionHandler +java/lang/ThreadDeath +java/lang/ThreadGroup +java/lang/ThreadLocal +java/lang/ThreadLocal$ThreadLocalMap +java/lang/ThreadLocal$ThreadLocalMap$Entry +java/lang/Throwable +java/lang/Throwable$PrintStreamOrWriter +java/lang/Throwable$WrappedPrintStream +java/lang/UnsatisfiedLinkError +java/lang/UnsupportedOperationException +java/lang/VirtualMachineError +java/lang/Void +java/lang/annotation/Annotation +java/lang/invoke/CallSite +java/lang/invoke/ConstantCallSite +java/lang/invoke/DirectMethodHandle +java/lang/invoke/Invokers +java/lang/invoke/LambdaForm +java/lang/invoke/LambdaForm$NamedFunction +java/lang/invoke/MemberName +java/lang/invoke/MemberName$Factory +java/lang/invoke/MethodHandle +java/lang/invoke/MethodHandleImpl +java/lang/invoke/MethodHandleNatives +java/lang/invoke/MethodHandleStatics +java/lang/invoke/MethodHandleStatics$1 +java/lang/invoke/MethodType +java/lang/invoke/MethodType$ConcurrentWeakInternSet +java/lang/invoke/MethodType$ConcurrentWeakInternSet$WeakEntry +java/lang/invoke/MethodTypeForm +java/lang/invoke/MutableCallSite +java/lang/invoke/VolatileCallSite +java/lang/ref/FinalReference +java/lang/ref/Finalizer +java/lang/ref/Finalizer$FinalizerThread +java/lang/ref/PhantomReference +java/lang/ref/Reference +java/lang/ref/Reference$Lock +java/lang/ref/Reference$ReferenceHandler +java/lang/ref/ReferenceQueue +java/lang/ref/ReferenceQueue$Lock +java/lang/ref/ReferenceQueue$Null +java/lang/ref/SoftReference +java/lang/ref/WeakReference +java/lang/reflect/AccessibleObject +java/lang/reflect/AnnotatedElement +java/lang/reflect/Array +java/lang/reflect/Constructor +java/lang/reflect/Executable +java/lang/reflect/Field +java/lang/reflect/GenericDeclaration +java/lang/reflect/InvocationHandler +java/lang/reflect/InvocationTargetException +java/lang/reflect/Member +java/lang/reflect/Method +java/lang/reflect/Modifier +java/lang/reflect/Parameter +java/lang/reflect/Proxy +java/lang/reflect/Proxy$KeyFactory +java/lang/reflect/Proxy$ProxyClassFactory +java/lang/reflect/ReflectAccess +java/lang/reflect/ReflectPermission +java/lang/reflect/Type +java/lang/reflect/WeakCache +java/math/BigInteger +java/math/BigInteger$UnsafeHolder +java/math/MutableBigInteger +java/math/RoundingMode +java/math/SignedMutableBigInteger +java/net/AbstractPlainDatagramSocketImpl +java/net/AbstractPlainDatagramSocketImpl$1 +java/net/AbstractPlainSocketImpl +java/net/AbstractPlainSocketImpl$1 +java/net/Authenticator +java/net/BindException +java/net/ConnectException +java/net/DatagramPacket +java/net/DatagramPacket$1 +java/net/DatagramSocket +java/net/DatagramSocket$1 +java/net/DatagramSocketImpl +java/net/DefaultDatagramSocketImplFactory$1 +java/net/DefaultInterface +java/net/DualStackPlainDatagramSocketImpl +java/net/DualStackPlainSocketImpl +java/net/FileNameMap +java/net/HttpURLConnection +java/net/Inet4Address +java/net/Inet4AddressImpl +java/net/Inet6Address +java/net/Inet6Address$Inet6AddressHolder +java/net/Inet6AddressImpl +java/net/InetAddress +java/net/InetAddress$1 +java/net/InetAddress$2 +java/net/InetAddress$Cache +java/net/InetAddress$Cache$Type +java/net/InetAddress$CacheEntry +java/net/InetAddress$InetAddressHolder +java/net/InetAddressImpl +java/net/InetAddressImplFactory +java/net/InetSocketAddress +java/net/InetSocketAddress$InetSocketAddressHolder +java/net/InterfaceAddress +java/net/JarURLConnection +java/net/MalformedURLException +java/net/MulticastSocket +java/net/NetworkInterface +java/net/NetworkInterface$1 +java/net/NoRouteToHostException +java/net/Parts +java/net/PlainSocketImpl +java/net/PlainSocketImpl$1 +java/net/Proxy +java/net/Proxy$Type +java/net/ProxySelector +java/net/ServerSocket +java/net/Socket +java/net/SocketAddress +java/net/SocketException +java/net/SocketImpl +java/net/SocketImplFactory +java/net/SocketOptions +java/net/SocketTimeoutException +java/net/SocksConsts +java/net/SocksSocketImpl +java/net/SocksSocketImpl$3 +java/net/TwoStacksPlainDatagramSocketImpl +java/net/URI +java/net/URI$Parser +java/net/URL +java/net/URLClassLoader +java/net/URLClassLoader$1 +java/net/URLClassLoader$2 +java/net/URLClassLoader$3 +java/net/URLClassLoader$3$1 +java/net/URLClassLoader$7 +java/net/URLConnection +java/net/URLConnection$1 +java/net/URLStreamHandler +java/net/URLStreamHandlerFactory +java/net/UnknownHostException +java/nio/Bits +java/nio/Bits$1 +java/nio/Buffer +java/nio/ByteBuffer +java/nio/ByteBufferAsCharBufferB +java/nio/ByteBufferAsIntBufferB +java/nio/ByteBufferAsShortBufferB +java/nio/ByteOrder +java/nio/CharBuffer +java/nio/DirectByteBuffer +java/nio/DirectByteBuffer$Deallocator +java/nio/DirectLongBufferU +java/nio/HeapByteBuffer +java/nio/HeapCharBuffer +java/nio/IntBuffer +java/nio/LongBuffer +java/nio/MappedByteBuffer +java/nio/ShortBuffer +java/nio/channels/ByteChannel +java/nio/channels/Channel +java/nio/channels/FileChannel +java/nio/channels/GatheringByteChannel +java/nio/channels/InterruptibleChannel +java/nio/channels/NetworkChannel +java/nio/channels/ReadableByteChannel +java/nio/channels/ScatteringByteChannel +java/nio/channels/SeekableByteChannel +java/nio/channels/SelectableChannel +java/nio/channels/SocketChannel +java/nio/channels/WritableByteChannel +java/nio/channels/spi/AbstractInterruptibleChannel +java/nio/channels/spi/AbstractInterruptibleChannel$1 +java/nio/channels/spi/AbstractSelectableChannel +java/nio/charset/Charset +java/nio/charset/CharsetDecoder +java/nio/charset/CharsetEncoder +java/nio/charset/CoderResult +java/nio/charset/CoderResult$1 +java/nio/charset/CoderResult$2 +java/nio/charset/CoderResult$Cache +java/nio/charset/CodingErrorAction +java/nio/charset/StandardCharsets +java/nio/charset/spi/CharsetProvider +java/nio/file/Path +java/nio/file/Watchable +java/nio/file/attribute/FileAttribute +java/security/AccessControlContext +java/security/AccessController +java/security/AlgorithmParameters +java/security/AlgorithmParametersSpi +java/security/AllPermission +java/security/AllPermissionCollection +java/security/BasicPermission +java/security/BasicPermissionCollection +java/security/CodeSigner +java/security/CodeSource +java/security/GeneralSecurityException +java/security/Guard +java/security/InvalidKeyException +java/security/Key +java/security/KeyException +java/security/MessageDigest +java/security/MessageDigest$Delegate +java/security/MessageDigestSpi +java/security/NoSuchAlgorithmException +java/security/Permission +java/security/PermissionCollection +java/security/Permissions +java/security/Principal +java/security/PrivateKey +java/security/PrivilegedAction +java/security/PrivilegedActionException +java/security/PrivilegedExceptionAction +java/security/ProtectionDomain +java/security/ProtectionDomain$1 +java/security/ProtectionDomain$3 +java/security/ProtectionDomain$Key +java/security/Provider +java/security/Provider$EngineDescription +java/security/Provider$Service +java/security/Provider$ServiceKey +java/security/Provider$UString +java/security/PublicKey +java/security/SecureClassLoader +java/security/Security +java/security/Security$1 +java/security/Signature +java/security/Signature$Delegate +java/security/SignatureException +java/security/SignatureSpi +java/security/UnresolvedPermission +java/security/cert/Certificate +java/security/interfaces/DSAKey +java/security/interfaces/DSAParams +java/security/interfaces/DSAPrivateKey +java/security/interfaces/DSAPublicKey +java/security/spec/AlgorithmParameterSpec +java/security/spec/DSAParameterSpec +java/text/AttributedCharacterIterator$Attribute +java/text/CharacterIterator +java/text/Collator +java/text/DateFormat +java/text/DateFormat$Field +java/text/DateFormatSymbols +java/text/DecimalFormat +java/text/DecimalFormatSymbols +java/text/DigitList +java/text/DontCareFieldPosition +java/text/DontCareFieldPosition$1 +java/text/EntryPair +java/text/FieldPosition +java/text/Format +java/text/Format$Field +java/text/Format$FieldDelegate +java/text/MergeCollation +java/text/MessageFormat +java/text/MessageFormat$Field +java/text/NumberFormat +java/text/NumberFormat$Field +java/text/ParseException +java/text/PatternEntry +java/text/PatternEntry$Parser +java/text/RBCollationTables +java/text/RBCollationTables$BuildAPI +java/text/RuleBasedCollator +java/text/SimpleDateFormat +java/text/spi/BreakIteratorProvider +java/text/spi/CollatorProvider +java/text/spi/DateFormatProvider +java/text/spi/DateFormatSymbolsProvider +java/text/spi/DecimalFormatSymbolsProvider +java/text/spi/NumberFormatProvider +java/util/AbstractCollection +java/util/AbstractList +java/util/AbstractList$Itr +java/util/AbstractList$ListItr +java/util/AbstractMap +java/util/AbstractQueue +java/util/AbstractSequentialList +java/util/AbstractSet +java/util/ArrayDeque +java/util/ArrayList +java/util/ArrayList$Itr +java/util/ArrayList$ListItr +java/util/ArrayList$SubList +java/util/ArrayList$SubList$1 +java/util/Arrays +java/util/Arrays$ArrayList +java/util/Arrays$LegacyMergeSort +java/util/BitSet +java/util/Calendar +java/util/Calendar$Builder +java/util/Collection +java/util/Collections +java/util/Collections$3 +java/util/Collections$EmptyEnumeration +java/util/Collections$EmptyIterator +java/util/Collections$EmptyList +java/util/Collections$EmptyMap +java/util/Collections$EmptySet +java/util/Collections$SetFromMap +java/util/Collections$SynchronizedCollection +java/util/Collections$SynchronizedMap +java/util/Collections$SynchronizedSet +java/util/Collections$UnmodifiableCollection +java/util/Collections$UnmodifiableCollection$1 +java/util/Collections$UnmodifiableList +java/util/Collections$UnmodifiableList$1 +java/util/Collections$UnmodifiableMap +java/util/Collections$UnmodifiableRandomAccessList +java/util/Collections$UnmodifiableSet +java/util/ComparableTimSort +java/util/Comparator +java/util/Currency +java/util/Currency$1 +java/util/Currency$CurrencyNameGetter +java/util/Date +java/util/Deque +java/util/Dictionary +java/util/Enumeration +java/util/EventListener +java/util/EventListenerProxy +java/util/EventObject +java/util/GregorianCalendar +java/util/HashMap +java/util/HashMap$EntryIterator +java/util/HashMap$EntrySet +java/util/HashMap$HashIterator +java/util/HashMap$KeyIterator +java/util/HashMap$KeySet +java/util/HashMap$Node +java/util/HashMap$TreeNode +java/util/HashMap$ValueIterator +java/util/HashMap$Values +java/util/HashSet +java/util/Hashtable +java/util/Hashtable$Entry +java/util/Hashtable$EntrySet +java/util/Hashtable$Enumerator +java/util/Hashtable$ValueCollection +java/util/IdentityHashMap +java/util/IdentityHashMap$IdentityHashMapIterator +java/util/IdentityHashMap$KeyIterator +java/util/IdentityHashMap$KeySet +java/util/IdentityHashMap$ValueIterator +java/util/IdentityHashMap$Values +java/util/Iterator +java/util/LinkedHashMap +java/util/LinkedHashMap$Entry +java/util/LinkedHashMap$LinkedEntryIterator +java/util/LinkedHashMap$LinkedEntrySet +java/util/LinkedHashMap$LinkedHashIterator +java/util/LinkedHashMap$LinkedKeyIterator +java/util/LinkedHashMap$LinkedKeySet +java/util/LinkedList +java/util/LinkedList$ListItr +java/util/LinkedList$Node +java/util/List +java/util/ListIterator +java/util/ListResourceBundle +java/util/Locale +java/util/Locale$1 +java/util/Locale$Cache +java/util/Locale$Category +java/util/Locale$LocaleKey +java/util/Map +java/util/Map$Entry +java/util/MissingResourceException +java/util/NavigableMap +java/util/Objects +java/util/PriorityQueue +java/util/Properties +java/util/Properties$LineReader +java/util/PropertyResourceBundle +java/util/Queue +java/util/Random +java/util/RandomAccess +java/util/ResourceBundle +java/util/ResourceBundle$1 +java/util/ResourceBundle$BundleReference +java/util/ResourceBundle$CacheKey +java/util/ResourceBundle$CacheKeyReference +java/util/ResourceBundle$Control +java/util/ResourceBundle$Control$1 +java/util/ResourceBundle$Control$CandidateListCache +java/util/ResourceBundle$LoaderReference +java/util/ResourceBundle$RBClassLoader +java/util/ResourceBundle$RBClassLoader$1 +java/util/ResourceBundle$SingleFormatControl +java/util/ServiceLoader +java/util/ServiceLoader$1 +java/util/ServiceLoader$LazyIterator +java/util/Set +java/util/SortedMap +java/util/Stack +java/util/StringTokenizer +java/util/TimSort +java/util/TimeZone +java/util/TimeZone$1 +java/util/TreeMap +java/util/TreeMap$Entry +java/util/Vector +java/util/Vector$1 +java/util/Vector$Itr +java/util/Vector$ListItr +java/util/WeakHashMap +java/util/WeakHashMap$Entry +java/util/WeakHashMap$KeySet +java/util/concurrent/BlockingQueue +java/util/concurrent/ConcurrentHashMap +java/util/concurrent/ConcurrentHashMap$BaseIterator +java/util/concurrent/ConcurrentHashMap$CollectionView +java/util/concurrent/ConcurrentHashMap$CounterCell +java/util/concurrent/ConcurrentHashMap$EntrySetView +java/util/concurrent/ConcurrentHashMap$ForwardingNode +java/util/concurrent/ConcurrentHashMap$KeyIterator +java/util/concurrent/ConcurrentHashMap$KeySetView +java/util/concurrent/ConcurrentHashMap$Node +java/util/concurrent/ConcurrentHashMap$Segment +java/util/concurrent/ConcurrentHashMap$Traverser +java/util/concurrent/ConcurrentHashMap$ValueIterator +java/util/concurrent/ConcurrentHashMap$ValuesView +java/util/concurrent/ConcurrentMap +java/util/concurrent/CopyOnWriteArrayList +java/util/concurrent/DelayQueue +java/util/concurrent/Delayed +java/util/concurrent/TimeUnit +java/util/concurrent/TimeUnit$1 +java/util/concurrent/TimeUnit$2 +java/util/concurrent/TimeUnit$3 +java/util/concurrent/TimeUnit$4 +java/util/concurrent/TimeUnit$5 +java/util/concurrent/TimeUnit$6 +java/util/concurrent/TimeUnit$7 +java/util/concurrent/atomic/AtomicBoolean +java/util/concurrent/atomic/AtomicInteger +java/util/concurrent/atomic/AtomicLong +java/util/concurrent/atomic/AtomicMarkableReference +java/util/concurrent/atomic/AtomicMarkableReference$Pair +java/util/concurrent/atomic/AtomicReferenceFieldUpdater +java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl +java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1 +java/util/concurrent/locks/AbstractOwnableSynchronizer +java/util/concurrent/locks/AbstractQueuedSynchronizer +java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject +java/util/concurrent/locks/AbstractQueuedSynchronizer$Node +java/util/concurrent/locks/Condition +java/util/concurrent/locks/Lock +java/util/concurrent/locks/LockSupport +java/util/concurrent/locks/ReadWriteLock +java/util/concurrent/locks/ReentrantLock +java/util/concurrent/locks/ReentrantLock$NonfairSync +java/util/concurrent/locks/ReentrantLock$Sync +java/util/concurrent/locks/ReentrantReadWriteLock +java/util/concurrent/locks/ReentrantReadWriteLock$NonfairSync +java/util/concurrent/locks/ReentrantReadWriteLock$ReadLock +java/util/concurrent/locks/ReentrantReadWriteLock$Sync +java/util/concurrent/locks/ReentrantReadWriteLock$Sync$ThreadLocalHoldCounter +java/util/concurrent/locks/ReentrantReadWriteLock$WriteLock +java/util/function/BiFunction +java/util/jar/Attributes +java/util/jar/Attributes$Name +java/util/jar/JarEntry +java/util/jar/JarFile +java/util/jar/JarFile$JarEntryIterator +java/util/jar/JarFile$JarFileEntry +java/util/jar/JarVerifier +java/util/jar/JarVerifier$3 +java/util/jar/JavaUtilJarAccessImpl +java/util/jar/Manifest +java/util/jar/Manifest$FastInputStream +java/util/logging/Handler +java/util/logging/Level +java/util/logging/Level$KnownLevel +java/util/logging/LogManager +java/util/logging/LogManager$1 +java/util/logging/LogManager$2 +java/util/logging/LogManager$3 +java/util/logging/LogManager$5 +java/util/logging/LogManager$Cleaner +java/util/logging/LogManager$LogNode +java/util/logging/LogManager$LoggerContext +java/util/logging/LogManager$LoggerContext$1 +java/util/logging/LogManager$LoggerWeakRef +java/util/logging/LogManager$RootLogger +java/util/logging/LogManager$SystemLoggerContext +java/util/logging/Logger +java/util/logging/Logger$1 +java/util/logging/LoggingPermission +java/util/logging/LoggingProxyImpl +java/util/spi/CalendarDataProvider +java/util/spi/CurrencyNameProvider +java/util/spi/LocaleNameProvider +java/util/spi/LocaleServiceProvider +java/util/spi/ResourceBundleControlProvider +java/util/spi/TimeZoneNameProvider +java/util/zip/CRC32 +java/util/zip/Checksum +java/util/zip/DeflaterOutputStream +java/util/zip/GZIPInputStream +java/util/zip/Inflater +java/util/zip/InflaterInputStream +java/util/zip/ZStreamRef +java/util/zip/ZipCoder +java/util/zip/ZipConstants +java/util/zip/ZipEntry +java/util/zip/ZipFile +java/util/zip/ZipFile$1 +java/util/zip/ZipFile$ZipEntryIterator +java/util/zip/ZipFile$ZipFileInflaterInputStream +java/util/zip/ZipFile$ZipFileInputStream +java/util/zip/ZipInputStream +java/util/zip/ZipUtils +javax/accessibility/Accessible +javax/accessibility/AccessibleAction +javax/accessibility/AccessibleBundle +javax/accessibility/AccessibleComponent +javax/accessibility/AccessibleContext +javax/accessibility/AccessibleExtendedComponent +javax/accessibility/AccessibleRelationSet +javax/accessibility/AccessibleState +javax/accessibility/AccessibleText +javax/accessibility/AccessibleValue +javax/security/auth/Destroyable +javax/sound/sampled/Control$Type +javax/sound/sampled/DataLine +javax/sound/sampled/DataLine$Info +javax/sound/sampled/FloatControl$Type +javax/sound/sampled/Line +javax/sound/sampled/Line$Info +javax/sound/sampled/LineUnavailableException +javax/sound/sampled/UnsupportedAudioFileException +javax/swing/AbstractAction +javax/swing/AbstractButton +javax/swing/AbstractButton$AccessibleAbstractButton +javax/swing/AbstractButton$Handler +javax/swing/AbstractCellEditor +javax/swing/AbstractListModel +javax/swing/Action +javax/swing/ActionMap +javax/swing/AncestorNotifier +javax/swing/ArrayTable +javax/swing/BorderFactory +javax/swing/BoundedRangeModel +javax/swing/Box +javax/swing/Box$Filler +javax/swing/BoxLayout +javax/swing/BufferStrategyPaintManager +javax/swing/BufferStrategyPaintManager$BufferInfo +javax/swing/ButtonGroup +javax/swing/ButtonModel +javax/swing/CellEditor +javax/swing/CellRendererPane +javax/swing/ClientPropertyKey +javax/swing/ClientPropertyKey$1 +javax/swing/ComboBoxEditor +javax/swing/ComboBoxModel +javax/swing/ComponentInputMap +javax/swing/DefaultBoundedRangeModel +javax/swing/DefaultButtonModel +javax/swing/DefaultCellEditor +javax/swing/DefaultCellEditor$1 +javax/swing/DefaultCellEditor$EditorDelegate +javax/swing/DefaultComboBoxModel +javax/swing/DefaultListCellRenderer +javax/swing/DefaultListCellRenderer$UIResource +javax/swing/DefaultListModel +javax/swing/DefaultListSelectionModel +javax/swing/DefaultSingleSelectionModel +javax/swing/DropMode +javax/swing/FocusManager +javax/swing/GrayFilter +javax/swing/Icon +javax/swing/ImageIcon +javax/swing/ImageIcon$1 +javax/swing/ImageIcon$2 +javax/swing/ImageIcon$2$1 +javax/swing/ImageIcon$3 +javax/swing/InputMap +javax/swing/InternalFrameFocusTraversalPolicy +javax/swing/JButton +javax/swing/JCheckBox +javax/swing/JCheckBoxMenuItem +javax/swing/JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem +javax/swing/JComboBox +javax/swing/JComboBox$1 +javax/swing/JComboBox$KeySelectionManager +javax/swing/JComponent +javax/swing/JComponent$1 +javax/swing/JComponent$2 +javax/swing/JComponent$AccessibleJComponent +javax/swing/JDialog +javax/swing/JEditorPane +javax/swing/JFrame +javax/swing/JInternalFrame +javax/swing/JLabel +javax/swing/JLayer +javax/swing/JLayeredPane +javax/swing/JList +javax/swing/JList$3 +javax/swing/JList$ListSelectionHandler +javax/swing/JMenu +javax/swing/JMenu$MenuChangeListener +javax/swing/JMenu$WinListener +javax/swing/JMenuBar +javax/swing/JMenuItem +javax/swing/JMenuItem$AccessibleJMenuItem +javax/swing/JMenuItem$MenuItemFocusListener +javax/swing/JPanel +javax/swing/JPopupMenu +javax/swing/JPopupMenu$Separator +javax/swing/JProgressBar +javax/swing/JProgressBar$ModelListener +javax/swing/JRadioButton +javax/swing/JRadioButtonMenuItem +javax/swing/JRootPane +javax/swing/JRootPane$1 +javax/swing/JRootPane$RootLayout +javax/swing/JScrollBar +javax/swing/JScrollBar$ModelListener +javax/swing/JScrollPane +javax/swing/JScrollPane$ScrollBar +javax/swing/JSeparator +javax/swing/JSlider +javax/swing/JSlider$ModelListener +javax/swing/JSplitPane +javax/swing/JTabbedPane +javax/swing/JTabbedPane$ModelListener +javax/swing/JTabbedPane$Page +javax/swing/JTable +javax/swing/JTable$2 +javax/swing/JTable$5 +javax/swing/JTable$Resizable2 +javax/swing/JTable$Resizable3 +javax/swing/JTextArea +javax/swing/JTextField +javax/swing/JTextField$NotifyAction +javax/swing/JTextField$ScrollRepainter +javax/swing/JToggleButton +javax/swing/JToggleButton$ToggleButtonModel +javax/swing/JToolBar +javax/swing/JToolBar$DefaultToolBarLayout +javax/swing/JToolBar$Separator +javax/swing/JToolTip +javax/swing/JTree +javax/swing/JTree$TreeModelHandler +javax/swing/JTree$TreeSelectionRedirector +javax/swing/JViewport +javax/swing/JViewport$ViewListener +javax/swing/JWindow +javax/swing/KeyStroke +javax/swing/KeyboardManager +javax/swing/KeyboardManager$ComponentKeyStrokePair +javax/swing/LayoutComparator +javax/swing/LayoutFocusTraversalPolicy +javax/swing/ListCellRenderer +javax/swing/ListModel +javax/swing/ListSelectionModel +javax/swing/LookAndFeel +javax/swing/MenuElement +javax/swing/MenuSelectionManager +javax/swing/MultiUIDefaults +javax/swing/MutableComboBoxModel +javax/swing/Popup$HeavyWeightWindow +javax/swing/RepaintManager +javax/swing/RepaintManager$1 +javax/swing/RepaintManager$1$1 +javax/swing/RepaintManager$2 +javax/swing/RepaintManager$3 +javax/swing/RepaintManager$DisplayChangedHandler +javax/swing/RepaintManager$PaintManager +javax/swing/RepaintManager$ProcessingRunnable +javax/swing/RootPaneContainer +javax/swing/ScrollPaneConstants +javax/swing/ScrollPaneLayout +javax/swing/ScrollPaneLayout$UIResource +javax/swing/Scrollable +javax/swing/SingleSelectionModel +javax/swing/SizeRequirements +javax/swing/SortingFocusTraversalPolicy +javax/swing/SwingConstants +javax/swing/SwingContainerOrderFocusTraversalPolicy +javax/swing/SwingDefaultFocusTraversalPolicy +javax/swing/SwingPaintEventDispatcher +javax/swing/SwingUtilities +javax/swing/SwingUtilities$SharedOwnerFrame +javax/swing/Timer +javax/swing/Timer$DoPostEvent +javax/swing/TimerQueue +javax/swing/TimerQueue$1 +javax/swing/TimerQueue$DelayedTimer +javax/swing/ToolTipManager +javax/swing/ToolTipManager$AccessibilityKeyListener +javax/swing/ToolTipManager$MoveBeforeEnterListener +javax/swing/ToolTipManager$insideTimerAction +javax/swing/ToolTipManager$outsideTimerAction +javax/swing/ToolTipManager$stillInsideTimerAction +javax/swing/TransferHandler +javax/swing/TransferHandler$DropHandler +javax/swing/TransferHandler$HasGetTransferHandler +javax/swing/TransferHandler$SwingDropTarget +javax/swing/TransferHandler$TransferAction +javax/swing/TransferHandler$TransferSupport +javax/swing/UIDefaults +javax/swing/UIDefaults$ActiveValue +javax/swing/UIDefaults$LazyInputMap +javax/swing/UIDefaults$LazyValue +javax/swing/UIDefaults$TextAndMnemonicHashMap +javax/swing/UIManager +javax/swing/UIManager$1 +javax/swing/UIManager$2 +javax/swing/UIManager$LAFState +javax/swing/UIManager$LookAndFeelInfo +javax/swing/UnsupportedLookAndFeelException +javax/swing/ViewportLayout +javax/swing/WindowConstants +javax/swing/border/AbstractBorder +javax/swing/border/BevelBorder +javax/swing/border/Border +javax/swing/border/CompoundBorder +javax/swing/border/EmptyBorder +javax/swing/border/EtchedBorder +javax/swing/border/LineBorder +javax/swing/border/MatteBorder +javax/swing/border/TitledBorder +javax/swing/event/AncestorListener +javax/swing/event/CaretEvent +javax/swing/event/CaretListener +javax/swing/event/CellEditorListener +javax/swing/event/ChangeEvent +javax/swing/event/ChangeListener +javax/swing/event/DocumentEvent +javax/swing/event/DocumentEvent$ElementChange +javax/swing/event/DocumentEvent$EventType +javax/swing/event/DocumentListener +javax/swing/event/EventListenerList +javax/swing/event/ListDataEvent +javax/swing/event/ListDataListener +javax/swing/event/ListSelectionEvent +javax/swing/event/ListSelectionListener +javax/swing/event/MenuDragMouseListener +javax/swing/event/MenuEvent +javax/swing/event/MenuKeyListener +javax/swing/event/MenuListener +javax/swing/event/MouseInputAdapter +javax/swing/event/MouseInputListener +javax/swing/event/PopupMenuListener +javax/swing/event/RowSorterListener +javax/swing/event/SwingPropertyChangeSupport +javax/swing/event/TableColumnModelEvent +javax/swing/event/TableColumnModelListener +javax/swing/event/TableModelEvent +javax/swing/event/TableModelListener +javax/swing/event/TreeExpansionListener +javax/swing/event/TreeModelEvent +javax/swing/event/TreeModelListener +javax/swing/event/TreeSelectionEvent +javax/swing/event/TreeSelectionListener +javax/swing/event/UndoableEditEvent +javax/swing/event/UndoableEditListener +javax/swing/filechooser/FileFilter +javax/swing/filechooser/FileSystemView +javax/swing/filechooser/FileSystemView$1 +javax/swing/filechooser/WindowsFileSystemView +javax/swing/plaf/ActionMapUIResource +javax/swing/plaf/BorderUIResource +javax/swing/plaf/BorderUIResource$CompoundBorderUIResource +javax/swing/plaf/BorderUIResource$EmptyBorderUIResource +javax/swing/plaf/BorderUIResource$LineBorderUIResource +javax/swing/plaf/ButtonUI +javax/swing/plaf/ColorUIResource +javax/swing/plaf/ComboBoxUI +javax/swing/plaf/ComponentInputMapUIResource +javax/swing/plaf/ComponentUI +javax/swing/plaf/DimensionUIResource +javax/swing/plaf/FontUIResource +javax/swing/plaf/InputMapUIResource +javax/swing/plaf/InsetsUIResource +javax/swing/plaf/LabelUI +javax/swing/plaf/ListUI +javax/swing/plaf/MenuBarUI +javax/swing/plaf/MenuItemUI +javax/swing/plaf/PanelUI +javax/swing/plaf/PopupMenuUI +javax/swing/plaf/ProgressBarUI +javax/swing/plaf/RootPaneUI +javax/swing/plaf/ScrollBarUI +javax/swing/plaf/ScrollPaneUI +javax/swing/plaf/SeparatorUI +javax/swing/plaf/SliderUI +javax/swing/plaf/SplitPaneUI +javax/swing/plaf/TabbedPaneUI +javax/swing/plaf/TableHeaderUI +javax/swing/plaf/TableUI +javax/swing/plaf/TextUI +javax/swing/plaf/ToolBarUI +javax/swing/plaf/TreeUI +javax/swing/plaf/UIResource +javax/swing/plaf/ViewportUI +javax/swing/plaf/basic/BasicArrowButton +javax/swing/plaf/basic/BasicBorders +javax/swing/plaf/basic/BasicBorders$ButtonBorder +javax/swing/plaf/basic/BasicBorders$MarginBorder +javax/swing/plaf/basic/BasicBorders$RadioButtonBorder +javax/swing/plaf/basic/BasicBorders$RolloverMarginBorder +javax/swing/plaf/basic/BasicBorders$SplitPaneBorder +javax/swing/plaf/basic/BasicBorders$SplitPaneDividerBorder +javax/swing/plaf/basic/BasicButtonListener +javax/swing/plaf/basic/BasicButtonUI +javax/swing/plaf/basic/BasicCheckBoxMenuItemUI +javax/swing/plaf/basic/BasicComboBoxEditor +javax/swing/plaf/basic/BasicComboBoxEditor$BorderlessTextField +javax/swing/plaf/basic/BasicComboBoxEditor$UIResource +javax/swing/plaf/basic/BasicComboBoxRenderer +javax/swing/plaf/basic/BasicComboBoxRenderer$UIResource +javax/swing/plaf/basic/BasicComboBoxUI +javax/swing/plaf/basic/BasicComboBoxUI$ComboBoxLayoutManager +javax/swing/plaf/basic/BasicComboBoxUI$DefaultKeySelectionManager +javax/swing/plaf/basic/BasicComboBoxUI$Handler +javax/swing/plaf/basic/BasicComboBoxUI$PropertyChangeHandler +javax/swing/plaf/basic/BasicComboPopup +javax/swing/plaf/basic/BasicComboPopup$1 +javax/swing/plaf/basic/BasicComboPopup$EmptyListModelClass +javax/swing/plaf/basic/BasicComboPopup$Handler +javax/swing/plaf/basic/BasicGraphicsUtils +javax/swing/plaf/basic/BasicHTML +javax/swing/plaf/basic/BasicLabelUI +javax/swing/plaf/basic/BasicListUI +javax/swing/plaf/basic/BasicListUI$Handler +javax/swing/plaf/basic/BasicListUI$ListTransferHandler +javax/swing/plaf/basic/BasicLookAndFeel +javax/swing/plaf/basic/BasicLookAndFeel$1 +javax/swing/plaf/basic/BasicLookAndFeel$2 +javax/swing/plaf/basic/BasicLookAndFeel$AWTEventHelper +javax/swing/plaf/basic/BasicMenuBarUI +javax/swing/plaf/basic/BasicMenuBarUI$Handler +javax/swing/plaf/basic/BasicMenuItemUI +javax/swing/plaf/basic/BasicMenuItemUI$Handler +javax/swing/plaf/basic/BasicMenuUI +javax/swing/plaf/basic/BasicMenuUI$Handler +javax/swing/plaf/basic/BasicPanelUI +javax/swing/plaf/basic/BasicPopupMenuUI +javax/swing/plaf/basic/BasicPopupMenuUI$BasicMenuKeyListener +javax/swing/plaf/basic/BasicPopupMenuUI$BasicPopupMenuListener +javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper +javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper$1 +javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber +javax/swing/plaf/basic/BasicProgressBarUI +javax/swing/plaf/basic/BasicProgressBarUI$Handler +javax/swing/plaf/basic/BasicRadioButtonMenuItemUI +javax/swing/plaf/basic/BasicRadioButtonUI +javax/swing/plaf/basic/BasicRootPaneUI +javax/swing/plaf/basic/BasicRootPaneUI$RootPaneInputMap +javax/swing/plaf/basic/BasicScrollBarUI +javax/swing/plaf/basic/BasicScrollBarUI$ArrowButtonListener +javax/swing/plaf/basic/BasicScrollBarUI$Handler +javax/swing/plaf/basic/BasicScrollBarUI$ModelListener +javax/swing/plaf/basic/BasicScrollBarUI$PropertyChangeHandler +javax/swing/plaf/basic/BasicScrollBarUI$ScrollListener +javax/swing/plaf/basic/BasicScrollBarUI$TrackListener +javax/swing/plaf/basic/BasicScrollPaneUI +javax/swing/plaf/basic/BasicScrollPaneUI$Handler +javax/swing/plaf/basic/BasicSeparatorUI +javax/swing/plaf/basic/BasicSliderUI +javax/swing/plaf/basic/BasicSliderUI$Actions +javax/swing/plaf/basic/BasicSliderUI$Handler +javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler +javax/swing/plaf/basic/BasicSliderUI$ScrollListener +javax/swing/plaf/basic/BasicSliderUI$TrackListener +javax/swing/plaf/basic/BasicSplitPaneDivider +javax/swing/plaf/basic/BasicSplitPaneDivider$DividerLayout +javax/swing/plaf/basic/BasicSplitPaneDivider$MouseHandler +javax/swing/plaf/basic/BasicSplitPaneDivider$OneTouchActionHandler +javax/swing/plaf/basic/BasicSplitPaneUI +javax/swing/plaf/basic/BasicSplitPaneUI$1 +javax/swing/plaf/basic/BasicSplitPaneUI$BasicHorizontalLayoutManager +javax/swing/plaf/basic/BasicSplitPaneUI$Handler +javax/swing/plaf/basic/BasicTabbedPaneUI +javax/swing/plaf/basic/BasicTabbedPaneUI$Handler +javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneLayout +javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneScrollLayout +javax/swing/plaf/basic/BasicTableHeaderUI +javax/swing/plaf/basic/BasicTableHeaderUI$1 +javax/swing/plaf/basic/BasicTableHeaderUI$MouseInputHandler +javax/swing/plaf/basic/BasicTableUI +javax/swing/plaf/basic/BasicTableUI$Handler +javax/swing/plaf/basic/BasicTableUI$TableTransferHandler +javax/swing/plaf/basic/BasicTextAreaUI +javax/swing/plaf/basic/BasicTextFieldUI +javax/swing/plaf/basic/BasicTextUI +javax/swing/plaf/basic/BasicTextUI$BasicCaret +javax/swing/plaf/basic/BasicTextUI$BasicCursor +javax/swing/plaf/basic/BasicTextUI$BasicHighlighter +javax/swing/plaf/basic/BasicTextUI$DragListener +javax/swing/plaf/basic/BasicTextUI$FocusAction +javax/swing/plaf/basic/BasicTextUI$RootView +javax/swing/plaf/basic/BasicTextUI$TextActionWrapper +javax/swing/plaf/basic/BasicTextUI$TextTransferHandler +javax/swing/plaf/basic/BasicTextUI$UpdateHandler +javax/swing/plaf/basic/BasicToggleButtonUI +javax/swing/plaf/basic/BasicToolBarSeparatorUI +javax/swing/plaf/basic/BasicToolBarUI +javax/swing/plaf/basic/BasicToolBarUI$DockingListener +javax/swing/plaf/basic/BasicToolBarUI$Handler +javax/swing/plaf/basic/BasicTreeUI +javax/swing/plaf/basic/BasicTreeUI$Actions +javax/swing/plaf/basic/BasicTreeUI$Handler +javax/swing/plaf/basic/BasicTreeUI$NodeDimensionsHandler +javax/swing/plaf/basic/BasicTreeUI$TreeTransferHandler +javax/swing/plaf/basic/BasicViewportUI +javax/swing/plaf/basic/ComboPopup +javax/swing/plaf/basic/DefaultMenuLayout +javax/swing/plaf/basic/DragRecognitionSupport$BeforeDrag +javax/swing/plaf/basic/LazyActionMap +javax/swing/plaf/metal/BumpBuffer +javax/swing/plaf/metal/DefaultMetalTheme +javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate +javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1 +javax/swing/plaf/metal/MetalBorders +javax/swing/plaf/metal/MetalBorders$ButtonBorder +javax/swing/plaf/metal/MetalBorders$Flush3DBorder +javax/swing/plaf/metal/MetalBorders$MenuBarBorder +javax/swing/plaf/metal/MetalBorders$MenuItemBorder +javax/swing/plaf/metal/MetalBorders$PopupMenuBorder +javax/swing/plaf/metal/MetalBorders$RolloverButtonBorder +javax/swing/plaf/metal/MetalBorders$RolloverMarginBorder +javax/swing/plaf/metal/MetalBorders$ScrollPaneBorder +javax/swing/plaf/metal/MetalBorders$TextFieldBorder +javax/swing/plaf/metal/MetalBorders$ToggleButtonBorder +javax/swing/plaf/metal/MetalBorders$ToolBarBorder +javax/swing/plaf/metal/MetalBumps +javax/swing/plaf/metal/MetalButtonUI +javax/swing/plaf/metal/MetalCheckBoxUI +javax/swing/plaf/metal/MetalComboBoxButton +javax/swing/plaf/metal/MetalComboBoxButton$1 +javax/swing/plaf/metal/MetalComboBoxEditor +javax/swing/plaf/metal/MetalComboBoxEditor$1 +javax/swing/plaf/metal/MetalComboBoxEditor$EditorBorder +javax/swing/plaf/metal/MetalComboBoxEditor$UIResource +javax/swing/plaf/metal/MetalComboBoxIcon +javax/swing/plaf/metal/MetalComboBoxUI +javax/swing/plaf/metal/MetalComboBoxUI$MetalComboBoxLayoutManager +javax/swing/plaf/metal/MetalComboBoxUI$MetalPropertyChangeListener +javax/swing/plaf/metal/MetalIconFactory +javax/swing/plaf/metal/MetalIconFactory$CheckBoxIcon +javax/swing/plaf/metal/MetalIconFactory$CheckBoxMenuItemIcon +javax/swing/plaf/metal/MetalIconFactory$FolderIcon16 +javax/swing/plaf/metal/MetalIconFactory$HorizontalSliderThumbIcon +javax/swing/plaf/metal/MetalIconFactory$MenuArrowIcon +javax/swing/plaf/metal/MetalIconFactory$MenuItemArrowIcon +javax/swing/plaf/metal/MetalIconFactory$RadioButtonIcon +javax/swing/plaf/metal/MetalIconFactory$RadioButtonMenuItemIcon +javax/swing/plaf/metal/MetalIconFactory$TreeFolderIcon +javax/swing/plaf/metal/MetalIconFactory$VerticalSliderThumbIcon +javax/swing/plaf/metal/MetalLabelUI +javax/swing/plaf/metal/MetalLookAndFeel +javax/swing/plaf/metal/MetalLookAndFeel$AATextListener +javax/swing/plaf/metal/MetalLookAndFeel$FontActiveValue +javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue +javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1 +javax/swing/plaf/metal/MetalPopupMenuSeparatorUI +javax/swing/plaf/metal/MetalProgressBarUI +javax/swing/plaf/metal/MetalRadioButtonUI +javax/swing/plaf/metal/MetalRootPaneUI +javax/swing/plaf/metal/MetalScrollBarUI +javax/swing/plaf/metal/MetalScrollBarUI$ScrollBarListener +javax/swing/plaf/metal/MetalScrollButton +javax/swing/plaf/metal/MetalScrollPaneUI +javax/swing/plaf/metal/MetalScrollPaneUI$1 +javax/swing/plaf/metal/MetalSeparatorUI +javax/swing/plaf/metal/MetalSliderUI +javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener +javax/swing/plaf/metal/MetalSplitPaneDivider +javax/swing/plaf/metal/MetalSplitPaneDivider$1 +javax/swing/plaf/metal/MetalSplitPaneDivider$2 +javax/swing/plaf/metal/MetalSplitPaneUI +javax/swing/plaf/metal/MetalTabbedPaneUI +javax/swing/plaf/metal/MetalTabbedPaneUI$TabbedPaneLayout +javax/swing/plaf/metal/MetalTextFieldUI +javax/swing/plaf/metal/MetalTheme +javax/swing/plaf/metal/MetalToggleButtonUI +javax/swing/plaf/metal/MetalToolBarUI +javax/swing/plaf/metal/MetalToolBarUI$MetalDockingListener +javax/swing/plaf/metal/MetalTreeUI +javax/swing/plaf/metal/MetalTreeUI$LineListener +javax/swing/plaf/metal/MetalUtils +javax/swing/plaf/metal/OceanTheme +javax/swing/plaf/metal/OceanTheme$1 +javax/swing/plaf/metal/OceanTheme$2 +javax/swing/plaf/metal/OceanTheme$3 +javax/swing/plaf/metal/OceanTheme$4 +javax/swing/plaf/metal/OceanTheme$5 +javax/swing/plaf/metal/OceanTheme$6 +javax/swing/plaf/synth/SynthConstants +javax/swing/plaf/synth/SynthUI +javax/swing/table/AbstractTableModel +javax/swing/table/DefaultTableCellRenderer +javax/swing/table/DefaultTableColumnModel +javax/swing/table/DefaultTableModel +javax/swing/table/JTableHeader +javax/swing/table/TableCellEditor +javax/swing/table/TableCellRenderer +javax/swing/table/TableColumn +javax/swing/table/TableColumnModel +javax/swing/table/TableModel +javax/swing/text/AbstractDocument +javax/swing/text/AbstractDocument$1 +javax/swing/text/AbstractDocument$AbstractElement +javax/swing/text/AbstractDocument$AttributeContext +javax/swing/text/AbstractDocument$BidiElement +javax/swing/text/AbstractDocument$BidiRootElement +javax/swing/text/AbstractDocument$BranchElement +javax/swing/text/AbstractDocument$Content +javax/swing/text/AbstractDocument$DefaultDocumentEvent +javax/swing/text/AbstractDocument$ElementEdit +javax/swing/text/AbstractDocument$InsertStringResult +javax/swing/text/AbstractDocument$LeafElement +javax/swing/text/AttributeSet +javax/swing/text/AttributeSet$CharacterAttribute +javax/swing/text/AttributeSet$ColorAttribute +javax/swing/text/AttributeSet$FontAttribute +javax/swing/text/AttributeSet$ParagraphAttribute +javax/swing/text/Caret +javax/swing/text/DefaultCaret +javax/swing/text/DefaultCaret$Handler +javax/swing/text/DefaultEditorKit +javax/swing/text/DefaultEditorKit$BeepAction +javax/swing/text/DefaultEditorKit$BeginAction +javax/swing/text/DefaultEditorKit$BeginLineAction +javax/swing/text/DefaultEditorKit$BeginParagraphAction +javax/swing/text/DefaultEditorKit$BeginWordAction +javax/swing/text/DefaultEditorKit$CopyAction +javax/swing/text/DefaultEditorKit$CutAction +javax/swing/text/DefaultEditorKit$DefaultKeyTypedAction +javax/swing/text/DefaultEditorKit$DeleteNextCharAction +javax/swing/text/DefaultEditorKit$DeletePrevCharAction +javax/swing/text/DefaultEditorKit$DeleteWordAction +javax/swing/text/DefaultEditorKit$DumpModelAction +javax/swing/text/DefaultEditorKit$EndAction +javax/swing/text/DefaultEditorKit$EndLineAction +javax/swing/text/DefaultEditorKit$EndParagraphAction +javax/swing/text/DefaultEditorKit$EndWordAction +javax/swing/text/DefaultEditorKit$InsertBreakAction +javax/swing/text/DefaultEditorKit$InsertContentAction +javax/swing/text/DefaultEditorKit$InsertTabAction +javax/swing/text/DefaultEditorKit$NextVisualPositionAction +javax/swing/text/DefaultEditorKit$NextWordAction +javax/swing/text/DefaultEditorKit$PageAction +javax/swing/text/DefaultEditorKit$PasteAction +javax/swing/text/DefaultEditorKit$PreviousWordAction +javax/swing/text/DefaultEditorKit$ReadOnlyAction +javax/swing/text/DefaultEditorKit$SelectAllAction +javax/swing/text/DefaultEditorKit$SelectLineAction +javax/swing/text/DefaultEditorKit$SelectParagraphAction +javax/swing/text/DefaultEditorKit$SelectWordAction +javax/swing/text/DefaultEditorKit$ToggleComponentOrientationAction +javax/swing/text/DefaultEditorKit$UnselectAction +javax/swing/text/DefaultEditorKit$VerticalPageAction +javax/swing/text/DefaultEditorKit$WritableAction +javax/swing/text/DefaultHighlighter +javax/swing/text/DefaultHighlighter$DefaultHighlightPainter +javax/swing/text/DefaultHighlighter$SafeDamager +javax/swing/text/Document +javax/swing/text/EditorKit +javax/swing/text/Element +javax/swing/text/FieldView +javax/swing/text/GapContent +javax/swing/text/GapContent$InsertUndo +javax/swing/text/GapContent$MarkData +javax/swing/text/GapContent$MarkVector +javax/swing/text/GapContent$StickyPosition +javax/swing/text/GapVector +javax/swing/text/Highlighter +javax/swing/text/Highlighter$Highlight +javax/swing/text/Highlighter$HighlightPainter +javax/swing/text/JTextComponent +javax/swing/text/JTextComponent$1 +javax/swing/text/JTextComponent$DefaultKeymap +javax/swing/text/JTextComponent$KeymapActionMap +javax/swing/text/JTextComponent$KeymapWrapper +javax/swing/text/JTextComponent$MutableCaretEvent +javax/swing/text/Keymap +javax/swing/text/LayeredHighlighter +javax/swing/text/LayeredHighlighter$LayerPainter +javax/swing/text/MutableAttributeSet +javax/swing/text/PlainDocument +javax/swing/text/PlainView +javax/swing/text/Position +javax/swing/text/Position$Bias +javax/swing/text/Segment +javax/swing/text/SegmentCache +javax/swing/text/SegmentCache$CachedSegment +javax/swing/text/SimpleAttributeSet +javax/swing/text/SimpleAttributeSet$EmptyAttributeSet +javax/swing/text/Style +javax/swing/text/StyleConstants +javax/swing/text/StyleConstants$CharacterConstants +javax/swing/text/StyleConstants$ColorConstants +javax/swing/text/StyleConstants$FontConstants +javax/swing/text/StyleConstants$ParagraphConstants +javax/swing/text/StyleContext +javax/swing/text/StyleContext$FontKey +javax/swing/text/StyleContext$KeyEnumeration +javax/swing/text/StyleContext$NamedStyle +javax/swing/text/StyleContext$SmallAttributeSet +javax/swing/text/TabExpander +javax/swing/text/TextAction +javax/swing/text/Utilities +javax/swing/text/View +javax/swing/text/ViewFactory +javax/swing/tree/AbstractLayoutCache +javax/swing/tree/AbstractLayoutCache$NodeDimensions +javax/swing/tree/DefaultMutableTreeNode +javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration +javax/swing/tree/DefaultTreeCellEditor +javax/swing/tree/DefaultTreeCellEditor$1 +javax/swing/tree/DefaultTreeCellEditor$DefaultTextField +javax/swing/tree/DefaultTreeCellEditor$EditorContainer +javax/swing/tree/DefaultTreeCellRenderer +javax/swing/tree/DefaultTreeModel +javax/swing/tree/DefaultTreeSelectionModel +javax/swing/tree/MutableTreeNode +javax/swing/tree/PathPlaceHolder +javax/swing/tree/RowMapper +javax/swing/tree/TreeCellEditor +javax/swing/tree/TreeCellRenderer +javax/swing/tree/TreeModel +javax/swing/tree/TreeNode +javax/swing/tree/TreePath +javax/swing/tree/TreeSelectionModel +javax/swing/tree/VariableHeightLayoutCache +javax/swing/tree/VariableHeightLayoutCache$TreeStateNode +javax/swing/undo/AbstractUndoableEdit +javax/swing/undo/CompoundEdit +javax/swing/undo/UndoableEdit +javax/xml/parsers/DocumentBuilder +javax/xml/parsers/DocumentBuilderFactory +javax/xml/parsers/FactoryFinder +javax/xml/parsers/FactoryFinder$1 +javax/xml/parsers/ParserConfigurationException +javax/xml/parsers/SecuritySupport +javax/xml/parsers/SecuritySupport$2 +javax/xml/parsers/SecuritySupport$5 +org/w3c/dom/Attr +org/w3c/dom/CDATASection +org/w3c/dom/CharacterData +org/w3c/dom/Comment +org/w3c/dom/DOMException +org/w3c/dom/Document +org/w3c/dom/DocumentFragment +org/w3c/dom/DocumentType +org/w3c/dom/Element +org/w3c/dom/Entity +org/w3c/dom/EntityReference +org/w3c/dom/NamedNodeMap +org/w3c/dom/Node +org/w3c/dom/NodeList +org/w3c/dom/Notation +org/w3c/dom/ProcessingInstruction +org/w3c/dom/Text +org/w3c/dom/events/DocumentEvent +org/w3c/dom/events/Event +org/w3c/dom/events/EventException +org/w3c/dom/events/EventTarget +org/w3c/dom/events/MutationEvent +org/w3c/dom/ranges/DocumentRange +org/w3c/dom/ranges/Range +org/w3c/dom/traversal/DocumentTraversal +org/w3c/dom/traversal/NodeIterator +org/w3c/dom/traversal/TreeWalker +org/xml/sax/AttributeList +org/xml/sax/ContentHandler +org/xml/sax/DTDHandler +org/xml/sax/EntityResolver +org/xml/sax/ErrorHandler +org/xml/sax/InputSource +org/xml/sax/Locator +org/xml/sax/SAXException +org/xml/sax/SAXNotRecognizedException +org/xml/sax/SAXNotSupportedException +org/xml/sax/SAXParseException +org/xml/sax/helpers/DefaultHandler +sun/awt/AWTAccessor +sun/awt/AWTAccessor$AWTEventAccessor +sun/awt/AWTAccessor$ClientPropertyKeyAccessor +sun/awt/AWTAccessor$ComponentAccessor +sun/awt/AWTAccessor$ContainerAccessor +sun/awt/AWTAccessor$CursorAccessor +sun/awt/AWTAccessor$DefaultKeyboardFocusManagerAccessor +sun/awt/AWTAccessor$EventQueueAccessor +sun/awt/AWTAccessor$FrameAccessor +sun/awt/AWTAccessor$InputEventAccessor +sun/awt/AWTAccessor$InvocationEventAccessor +sun/awt/AWTAccessor$KeyEventAccessor +sun/awt/AWTAccessor$KeyboardFocusManagerAccessor +sun/awt/AWTAccessor$SequencedEventAccessor +sun/awt/AWTAccessor$ToolkitAccessor +sun/awt/AWTAccessor$WindowAccessor +sun/awt/AWTAutoShutdown +sun/awt/AWTAutoShutdown$1 +sun/awt/AppContext +sun/awt/AppContext$1 +sun/awt/AppContext$2 +sun/awt/AppContext$3 +sun/awt/AppContext$6 +sun/awt/AppContext$GetAppContextLock +sun/awt/AppContext$PostShutdownEventRunnable +sun/awt/AppContext$State +sun/awt/CausedFocusEvent +sun/awt/CausedFocusEvent$Cause +sun/awt/ComponentFactory +sun/awt/ConstrainableGraphics +sun/awt/DisplayChangedListener +sun/awt/EmbeddedFrame +sun/awt/EventQueueDelegate +sun/awt/EventQueueItem +sun/awt/ExtendedKeyCodes +sun/awt/FontConfiguration +sun/awt/FontConfiguration$2 +sun/awt/FontDescriptor +sun/awt/GlobalCursorManager +sun/awt/GlobalCursorManager$NativeUpdater +sun/awt/HeadlessToolkit +sun/awt/InputMethodSupport +sun/awt/KeyboardFocusManagerPeerImpl +sun/awt/KeyboardFocusManagerPeerProvider +sun/awt/LightweightFrame +sun/awt/ModalExclude +sun/awt/ModalityListener +sun/awt/MostRecentKeyValue +sun/awt/NativeLibLoader +sun/awt/NativeLibLoader$1 +sun/awt/NullComponentPeer +sun/awt/OSInfo +sun/awt/OSInfo$1 +sun/awt/OSInfo$OSType +sun/awt/OSInfo$WindowsVersion +sun/awt/PaintEventDispatcher +sun/awt/PeerEvent +sun/awt/PlatformFont +sun/awt/PostEventQueue +sun/awt/RepaintArea +sun/awt/RequestFocusController +sun/awt/SubRegionShowable +sun/awt/SunDisplayChanger +sun/awt/SunGraphicsCallback +sun/awt/SunHints +sun/awt/SunHints$Key +sun/awt/SunHints$LCDContrastKey +sun/awt/SunHints$Value +sun/awt/SunToolkit +sun/awt/SunToolkit$ModalityListenerList +sun/awt/Symbol +sun/awt/Symbol$Encoder +sun/awt/TimedWindowEvent +sun/awt/Win32FontManager +sun/awt/Win32FontManager$1 +sun/awt/Win32FontManager$2 +sun/awt/Win32GraphicsConfig +sun/awt/Win32GraphicsDevice +sun/awt/Win32GraphicsEnvironment +sun/awt/WindowClosingListener +sun/awt/WindowClosingSupport +sun/awt/dnd/SunDragSourceContextPeer +sun/awt/dnd/SunDropTargetEvent +sun/awt/event/IgnorePaintEvent +sun/awt/geom/PathConsumer2D +sun/awt/im/ExecutableInputMethodManager +sun/awt/im/ExecutableInputMethodManager$3 +sun/awt/im/InputContext +sun/awt/im/InputMethodAdapter +sun/awt/im/InputMethodContext +sun/awt/im/InputMethodLocator +sun/awt/im/InputMethodManager +sun/awt/im/InputMethodWindow +sun/awt/image/BufImgSurfaceData +sun/awt/image/BufImgSurfaceData$ICMColorData +sun/awt/image/BufImgSurfaceManager +sun/awt/image/BufImgVolatileSurfaceManager +sun/awt/image/BufferedImageDevice +sun/awt/image/BufferedImageGraphicsConfig +sun/awt/image/ByteComponentRaster +sun/awt/image/ByteInterleavedRaster +sun/awt/image/BytePackedRaster +sun/awt/image/FetcherInfo +sun/awt/image/GifFrame +sun/awt/image/GifImageDecoder +sun/awt/image/ImageConsumerQueue +sun/awt/image/ImageDecoder +sun/awt/image/ImageDecoder$1 +sun/awt/image/ImageFetchable +sun/awt/image/ImageFetcher +sun/awt/image/ImageFetcher$1 +sun/awt/image/ImageRepresentation +sun/awt/image/ImageWatched +sun/awt/image/ImageWatched$Link +sun/awt/image/ImageWatched$WeakLink +sun/awt/image/InputStreamImageSource +sun/awt/image/IntegerComponentRaster +sun/awt/image/IntegerInterleavedRaster +sun/awt/image/NativeLibLoader +sun/awt/image/NativeLibLoader$1 +sun/awt/image/OffScreenImage +sun/awt/image/PNGFilterInputStream +sun/awt/image/PNGImageDecoder +sun/awt/image/PixelConverter +sun/awt/image/PixelConverter$Argb +sun/awt/image/PixelConverter$ArgbBm +sun/awt/image/PixelConverter$ArgbPre +sun/awt/image/PixelConverter$Bgrx +sun/awt/image/PixelConverter$ByteGray +sun/awt/image/PixelConverter$Rgba +sun/awt/image/PixelConverter$RgbaPre +sun/awt/image/PixelConverter$Rgbx +sun/awt/image/PixelConverter$Ushort4444Argb +sun/awt/image/PixelConverter$Ushort555Rgb +sun/awt/image/PixelConverter$Ushort555Rgbx +sun/awt/image/PixelConverter$Ushort565Rgb +sun/awt/image/PixelConverter$UshortGray +sun/awt/image/PixelConverter$Xbgr +sun/awt/image/PixelConverter$Xrgb +sun/awt/image/SunVolatileImage +sun/awt/image/SunWritableRaster +sun/awt/image/SunWritableRaster$DataStealer +sun/awt/image/SurfaceManager +sun/awt/image/SurfaceManager$FlushableCacheData +sun/awt/image/SurfaceManager$ImageAccessor +sun/awt/image/SurfaceManager$ProxiedGraphicsConfig +sun/awt/image/ToolkitImage +sun/awt/image/URLImageSource +sun/awt/image/VolatileSurfaceManager +sun/awt/resources/awt +sun/awt/util/IdentityArrayList +sun/awt/windows/ThemeReader +sun/awt/windows/WCanvasPeer +sun/awt/windows/WColor +sun/awt/windows/WComponentPeer +sun/awt/windows/WComponentPeer$2 +sun/awt/windows/WDesktopProperties +sun/awt/windows/WDesktopProperties$WinPlaySound +sun/awt/windows/WFontConfiguration +sun/awt/windows/WFontPeer +sun/awt/windows/WFramePeer +sun/awt/windows/WGlobalCursorManager +sun/awt/windows/WInputMethod +sun/awt/windows/WInputMethodDescriptor +sun/awt/windows/WKeyboardFocusManagerPeer +sun/awt/windows/WLabelPeer +sun/awt/windows/WObjectPeer +sun/awt/windows/WPanelPeer +sun/awt/windows/WToolkit +sun/awt/windows/WToolkit$1 +sun/awt/windows/WToolkit$2 +sun/awt/windows/WToolkit$3 +sun/awt/windows/WToolkit$3$1 +sun/awt/windows/WToolkit$ToolkitDisposer +sun/awt/windows/WWindowPeer +sun/awt/windows/WWindowPeer$ActiveWindowListener +sun/awt/windows/WWindowPeer$GuiDisposedListener +sun/awt/windows/WingDings +sun/awt/windows/WingDings$Encoder +sun/dc/DuctusRenderingEngine +sun/dc/path/PathConsumer +sun/dc/pr/PathDasher +sun/dc/pr/PathDasher$1 +sun/dc/pr/PathStroker +sun/dc/pr/PathStroker$1 +sun/font/AttributeValues +sun/font/CMap +sun/font/CMap$CMapFormat4 +sun/font/CMap$NullCMapClass +sun/font/CharToGlyphMapper +sun/font/CompositeFont +sun/font/CompositeFontDescriptor +sun/font/CompositeGlyphMapper +sun/font/CompositeStrike +sun/font/CoreMetrics +sun/font/EAttribute +sun/font/FileFont +sun/font/FileFontStrike +sun/font/Font2D +sun/font/Font2DHandle +sun/font/FontAccess +sun/font/FontDesignMetrics +sun/font/FontDesignMetrics$KeyReference +sun/font/FontDesignMetrics$MetricsKey +sun/font/FontFamily +sun/font/FontLineMetrics +sun/font/FontManager +sun/font/FontManagerFactory +sun/font/FontManagerFactory$1 +sun/font/FontManagerForSGE +sun/font/FontManagerNativeLibrary +sun/font/FontManagerNativeLibrary$1 +sun/font/FontScaler +sun/font/FontStrike +sun/font/FontStrikeDesc +sun/font/FontStrikeDisposer +sun/font/FontUtilities +sun/font/FontUtilities$1 +sun/font/GlyphList +sun/font/PhysicalFont +sun/font/PhysicalStrike +sun/font/StandardGlyphVector +sun/font/StandardGlyphVector$GlyphStrike +sun/font/StrikeCache +sun/font/StrikeCache$1 +sun/font/StrikeCache$DisposableStrike +sun/font/StrikeCache$SoftDisposerRef +sun/font/StrikeMetrics +sun/font/SunFontManager +sun/font/SunFontManager$1 +sun/font/SunFontManager$11 +sun/font/SunFontManager$12 +sun/font/SunFontManager$2 +sun/font/SunFontManager$3 +sun/font/SunFontManager$FamilyDescription +sun/font/SunFontManager$FontRegistrationInfo +sun/font/SunFontManager$T1Filter +sun/font/SunFontManager$TTFilter +sun/font/T2KFontScaler +sun/font/T2KFontScaler$1 +sun/font/TrueTypeFont +sun/font/TrueTypeFont$1 +sun/font/TrueTypeFont$DirectoryEntry +sun/font/TrueTypeFont$TTDisposerRecord +sun/font/TrueTypeGlyphMapper +sun/font/Type1Font +sun/io/Win32ErrorMode +sun/java2d/DefaultDisposerRecord +sun/java2d/DestSurfaceProvider +sun/java2d/Disposer +sun/java2d/Disposer$1 +sun/java2d/Disposer$2 +sun/java2d/Disposer$PollDisposable +sun/java2d/DisposerRecord +sun/java2d/DisposerTarget +sun/java2d/FontSupport +sun/java2d/InvalidPipeException +sun/java2d/NullSurfaceData +sun/java2d/ScreenUpdateManager +sun/java2d/StateTrackable +sun/java2d/StateTrackable$State +sun/java2d/StateTrackableDelegate +sun/java2d/StateTrackableDelegate$2 +sun/java2d/StateTracker +sun/java2d/StateTracker$1 +sun/java2d/StateTracker$2 +sun/java2d/SunGraphics2D +sun/java2d/SunGraphicsEnvironment +sun/java2d/SunGraphicsEnvironment$1 +sun/java2d/Surface +sun/java2d/SurfaceData +sun/java2d/SurfaceData$PixelToPgramLoopConverter +sun/java2d/SurfaceData$PixelToShapeLoopConverter +sun/java2d/SurfaceDataProxy +sun/java2d/SurfaceDataProxy$1 +sun/java2d/SurfaceManagerFactory +sun/java2d/WindowsSurfaceManagerFactory +sun/java2d/cmm/ProfileActivator +sun/java2d/cmm/ProfileDeferralInfo +sun/java2d/cmm/ProfileDeferralMgr +sun/java2d/d3d/D3DContext$D3DContextCaps +sun/java2d/d3d/D3DGraphicsConfig +sun/java2d/d3d/D3DGraphicsDevice +sun/java2d/d3d/D3DGraphicsDevice$1 +sun/java2d/d3d/D3DGraphicsDevice$1Result +sun/java2d/d3d/D3DRenderQueue +sun/java2d/d3d/D3DRenderQueue$1 +sun/java2d/d3d/D3DScreenUpdateManager +sun/java2d/d3d/D3DScreenUpdateManager$1 +sun/java2d/d3d/D3DScreenUpdateManager$1$1 +sun/java2d/d3d/D3DSurfaceData +sun/java2d/d3d/D3DSurfaceData$D3DWindowSurfaceData +sun/java2d/loops/Blit +sun/java2d/loops/BlitBg +sun/java2d/loops/CompositeType +sun/java2d/loops/CustomComponent +sun/java2d/loops/DrawGlyphList +sun/java2d/loops/DrawGlyphListAA +sun/java2d/loops/DrawGlyphListLCD +sun/java2d/loops/DrawLine +sun/java2d/loops/DrawParallelogram +sun/java2d/loops/DrawPath +sun/java2d/loops/DrawPolygons +sun/java2d/loops/DrawRect +sun/java2d/loops/FillParallelogram +sun/java2d/loops/FillPath +sun/java2d/loops/FillRect +sun/java2d/loops/FillSpans +sun/java2d/loops/FontInfo +sun/java2d/loops/GeneralRenderer +sun/java2d/loops/GraphicsPrimitive +sun/java2d/loops/GraphicsPrimitiveMgr +sun/java2d/loops/GraphicsPrimitiveMgr$1 +sun/java2d/loops/GraphicsPrimitiveMgr$2 +sun/java2d/loops/GraphicsPrimitiveMgr$PrimitiveSpec +sun/java2d/loops/GraphicsPrimitiveProxy +sun/java2d/loops/MaskBlit +sun/java2d/loops/MaskFill +sun/java2d/loops/RenderCache +sun/java2d/loops/RenderCache$Entry +sun/java2d/loops/RenderLoops +sun/java2d/loops/ScaledBlit +sun/java2d/loops/SurfaceType +sun/java2d/loops/TransformHelper +sun/java2d/loops/XORComposite +sun/java2d/opengl/OGLGraphicsConfig +sun/java2d/opengl/WGLGraphicsConfig +sun/java2d/pipe/AAShapePipe +sun/java2d/pipe/AATextRenderer +sun/java2d/pipe/AlphaColorPipe +sun/java2d/pipe/AlphaPaintPipe +sun/java2d/pipe/CompositePipe +sun/java2d/pipe/DrawImage +sun/java2d/pipe/DrawImagePipe +sun/java2d/pipe/GeneralCompositePipe +sun/java2d/pipe/GlyphListLoopPipe +sun/java2d/pipe/GlyphListPipe +sun/java2d/pipe/LCDTextRenderer +sun/java2d/pipe/LoopBasedPipe +sun/java2d/pipe/LoopPipe +sun/java2d/pipe/NullPipe +sun/java2d/pipe/OutlineTextRenderer +sun/java2d/pipe/ParallelogramPipe +sun/java2d/pipe/PixelDrawPipe +sun/java2d/pipe/PixelFillPipe +sun/java2d/pipe/PixelToParallelogramConverter +sun/java2d/pipe/PixelToShapeConverter +sun/java2d/pipe/Region +sun/java2d/pipe/Region$ImmutableRegion +sun/java2d/pipe/RegionIterator +sun/java2d/pipe/RenderBuffer +sun/java2d/pipe/RenderQueue +sun/java2d/pipe/RenderingEngine +sun/java2d/pipe/RenderingEngine$1 +sun/java2d/pipe/ShapeDrawPipe +sun/java2d/pipe/ShapeSpanIterator +sun/java2d/pipe/SolidTextRenderer +sun/java2d/pipe/SpanClipRenderer +sun/java2d/pipe/SpanIterator +sun/java2d/pipe/SpanShapeRenderer +sun/java2d/pipe/SpanShapeRenderer$Composite +sun/java2d/pipe/TextPipe +sun/java2d/pipe/TextRenderer +sun/java2d/pipe/ValidatePipe +sun/java2d/pipe/hw/AccelGraphicsConfig +sun/java2d/pipe/hw/AccelSurface +sun/java2d/pipe/hw/BufferedContextProvider +sun/java2d/pipe/hw/ContextCapabilities +sun/java2d/windows/GDIBlitLoops +sun/java2d/windows/GDIRenderer +sun/java2d/windows/GDIWindowSurfaceData +sun/java2d/windows/WindowsFlags +sun/java2d/windows/WindowsFlags$1 +sun/launcher/LauncherHelper +sun/launcher/LauncherHelper$FXHelper +sun/misc/ASCIICaseInsensitiveComparator +sun/misc/Cleaner +sun/misc/CompoundEnumeration +sun/misc/ExtensionDependency +sun/misc/FDBigInteger +sun/misc/FileURLMapper +sun/misc/FloatingDecimal +sun/misc/FloatingDecimal$1 +sun/misc/FloatingDecimal$ASCIIToBinaryBuffer +sun/misc/FloatingDecimal$ASCIIToBinaryConverter +sun/misc/FloatingDecimal$BinaryToASCIIBuffer +sun/misc/FloatingDecimal$BinaryToASCIIConverter +sun/misc/FloatingDecimal$ExceptionalBinaryToASCIIBuffer +sun/misc/FloatingDecimal$PreparedASCIIToBinaryBuffer +sun/misc/IOUtils +sun/misc/JarIndex +sun/misc/JavaAWTAccess +sun/misc/JavaIOFileDescriptorAccess +sun/misc/JavaLangAccess +sun/misc/JavaNetAccess +sun/misc/JavaNioAccess +sun/misc/JavaSecurityAccess +sun/misc/JavaSecurityProtectionDomainAccess +sun/misc/JavaUtilJarAccess +sun/misc/JavaUtilZipFileAccess +sun/misc/Launcher +sun/misc/Launcher$AppClassLoader +sun/misc/Launcher$AppClassLoader$1 +sun/misc/Launcher$BootClassPathHolder +sun/misc/Launcher$BootClassPathHolder$1 +sun/misc/Launcher$ExtClassLoader +sun/misc/Launcher$ExtClassLoader$1 +sun/misc/Launcher$Factory +sun/misc/MetaIndex +sun/misc/NativeSignalHandler +sun/misc/OSEnvironment +sun/misc/Perf +sun/misc/Perf$GetPerfAction +sun/misc/PerfCounter +sun/misc/PerfCounter$CoreCounters +sun/misc/PerfCounter$WindowsClientCounters +sun/misc/PerformanceLogger +sun/misc/PerformanceLogger$TimeData +sun/misc/PostVMInitHook +sun/misc/Resource +sun/misc/SharedSecrets +sun/misc/Signal +sun/misc/SignalHandler +sun/misc/SoftCache +sun/misc/SoftCache$ValueCell +sun/misc/URLClassPath +sun/misc/URLClassPath$1 +sun/misc/URLClassPath$2 +sun/misc/URLClassPath$3 +sun/misc/URLClassPath$FileLoader +sun/misc/URLClassPath$JarLoader +sun/misc/URLClassPath$JarLoader$1 +sun/misc/URLClassPath$JarLoader$2 +sun/misc/URLClassPath$Loader +sun/misc/Unsafe +sun/misc/VM +sun/misc/Version +sun/net/DefaultProgressMeteringPolicy +sun/net/InetAddressCachePolicy +sun/net/InetAddressCachePolicy$1 +sun/net/InetAddressCachePolicy$2 +sun/net/NetHooks +sun/net/NetProperties +sun/net/NetProperties$1 +sun/net/ProgressMeteringPolicy +sun/net/ProgressMonitor +sun/net/ResourceManager +sun/net/spi/DefaultProxySelector +sun/net/spi/DefaultProxySelector$1 +sun/net/spi/DefaultProxySelector$3 +sun/net/spi/DefaultProxySelector$NonProxyInfo +sun/net/spi/nameservice/NameService +sun/net/util/IPAddressUtil +sun/net/util/URLUtil +sun/net/www/MessageHeader +sun/net/www/MimeEntry +sun/net/www/MimeTable +sun/net/www/MimeTable$1 +sun/net/www/MimeTable$DefaultInstanceHolder +sun/net/www/MimeTable$DefaultInstanceHolder$1 +sun/net/www/ParseUtil +sun/net/www/URLConnection +sun/net/www/protocol/file/FileURLConnection +sun/net/www/protocol/file/Handler +sun/net/www/protocol/http/Handler +sun/net/www/protocol/jar/Handler +sun/net/www/protocol/jar/JarFileFactory +sun/net/www/protocol/jar/JarURLConnection +sun/net/www/protocol/jar/JarURLConnection$JarURLInputStream +sun/net/www/protocol/jar/URLJarFile +sun/net/www/protocol/jar/URLJarFile$URLJarFileCloseController +sun/net/www/protocol/jar/URLJarFile$URLJarFileEntry +sun/nio/ByteBuffered +sun/nio/ch/DirectBuffer +sun/nio/ch/FileChannelImpl +sun/nio/ch/FileDispatcher +sun/nio/ch/FileDispatcherImpl +sun/nio/ch/IOStatus +sun/nio/ch/IOUtil +sun/nio/ch/IOUtil$1 +sun/nio/ch/Interruptible +sun/nio/ch/NativeDispatcher +sun/nio/ch/NativeThread +sun/nio/ch/NativeThreadSet +sun/nio/ch/Util +sun/nio/ch/Util$1 +sun/nio/ch/Util$BufferCache +sun/nio/cs/ArrayDecoder +sun/nio/cs/ArrayEncoder +sun/nio/cs/FastCharsetProvider +sun/nio/cs/HistoricallyNamedCharset +sun/nio/cs/ISO_8859_1 +sun/nio/cs/MS1252 +sun/nio/cs/SingleByte +sun/nio/cs/SingleByte$Decoder +sun/nio/cs/SingleByte$Encoder +sun/nio/cs/StandardCharsets +sun/nio/cs/StandardCharsets$Aliases +sun/nio/cs/StandardCharsets$Cache +sun/nio/cs/StandardCharsets$Classes +sun/nio/cs/StreamDecoder +sun/nio/cs/StreamEncoder +sun/nio/cs/Surrogate +sun/nio/cs/Surrogate$Parser +sun/nio/cs/US_ASCII +sun/nio/cs/UTF_16 +sun/nio/cs/UTF_16$Decoder +sun/nio/cs/UTF_16BE +sun/nio/cs/UTF_16LE +sun/nio/cs/UTF_16LE$Decoder +sun/nio/cs/UTF_16LE$Encoder +sun/nio/cs/UTF_8 +sun/nio/cs/UTF_8$Decoder +sun/nio/cs/UTF_8$Encoder +sun/nio/cs/Unicode +sun/nio/cs/UnicodeDecoder +sun/nio/cs/UnicodeEncoder +sun/print/PrinterGraphicsConfig +sun/reflect/AccessorGenerator +sun/reflect/BootstrapConstructorAccessorImpl +sun/reflect/ByteVector +sun/reflect/ByteVectorFactory +sun/reflect/ByteVectorImpl +sun/reflect/CallerSensitive +sun/reflect/ClassDefiner +sun/reflect/ClassDefiner$1 +sun/reflect/ClassFileAssembler +sun/reflect/ClassFileConstants +sun/reflect/ConstantPool +sun/reflect/ConstructorAccessor +sun/reflect/ConstructorAccessorImpl +sun/reflect/DelegatingClassLoader +sun/reflect/DelegatingConstructorAccessorImpl +sun/reflect/DelegatingMethodAccessorImpl +sun/reflect/FieldAccessor +sun/reflect/FieldAccessorImpl +sun/reflect/Label +sun/reflect/Label$PatchInfo +sun/reflect/LangReflectAccess +sun/reflect/MagicAccessorImpl +sun/reflect/MethodAccessor +sun/reflect/MethodAccessorGenerator +sun/reflect/MethodAccessorGenerator$1 +sun/reflect/MethodAccessorImpl +sun/reflect/NativeConstructorAccessorImpl +sun/reflect/NativeMethodAccessorImpl +sun/reflect/Reflection +sun/reflect/ReflectionFactory +sun/reflect/ReflectionFactory$1 +sun/reflect/ReflectionFactory$GetReflectionFactoryAction +sun/reflect/SerializationConstructorAccessorImpl +sun/reflect/UTF8 +sun/reflect/UnsafeFieldAccessorFactory +sun/reflect/UnsafeFieldAccessorImpl +sun/reflect/UnsafeObjectFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl +sun/reflect/UnsafeStaticFieldAccessorImpl +sun/reflect/annotation/AnnotationType +sun/reflect/generics/repository/AbstractRepository +sun/reflect/generics/repository/ClassRepository +sun/reflect/generics/repository/GenericDeclRepository +sun/reflect/misc/MethodUtil +sun/reflect/misc/MethodUtil$1 +sun/reflect/misc/ReflectUtil +sun/security/action/GetBooleanAction +sun/security/action/GetIntegerAction +sun/security/action/GetPropertyAction +sun/security/jca/GetInstance +sun/security/jca/GetInstance$Instance +sun/security/jca/ProviderConfig +sun/security/jca/ProviderConfig$2 +sun/security/jca/ProviderList +sun/security/jca/ProviderList$1 +sun/security/jca/ProviderList$2 +sun/security/jca/ProviderList$3 +sun/security/jca/ProviderList$ServiceList +sun/security/jca/ProviderList$ServiceList$1 +sun/security/jca/Providers +sun/security/jca/ServiceId +sun/security/provider/ByteArrayAccess +sun/security/provider/DSA +sun/security/provider/DSA$LegacyDSA +sun/security/provider/DSA$SHA1withDSA +sun/security/provider/DSAParameters +sun/security/provider/DSAPublicKey +sun/security/provider/DigestBase +sun/security/provider/NativePRNG +sun/security/provider/NativePRNG$Blocking +sun/security/provider/NativePRNG$NonBlocking +sun/security/provider/SHA +sun/security/provider/Sun +sun/security/provider/SunEntries +sun/security/provider/SunEntries$1 +sun/security/util/ByteArrayLexOrder +sun/security/util/ByteArrayTagOrder +sun/security/util/Debug +sun/security/util/DerEncoder +sun/security/util/DerIndefLenConverter +sun/security/util/DerInputBuffer +sun/security/util/DerInputStream +sun/security/util/DerOutputStream +sun/security/util/DerValue +sun/security/util/ManifestEntryVerifier +sun/security/util/ObjectIdentifier +sun/security/util/SignatureFileVerifier +sun/security/x509/AlgorithmId +sun/security/x509/X509Key +sun/swing/DefaultLookup +sun/swing/ImageIconUIResource +sun/swing/JLightweightFrame +sun/swing/MenuItemLayoutHelper +sun/swing/MenuItemLayoutHelper$ColumnAlignment +sun/swing/MenuItemLayoutHelper$LayoutResult +sun/swing/MenuItemLayoutHelper$RectSize +sun/swing/PrintColorUIResource +sun/swing/StringUIClientPropertyKey +sun/swing/SwingAccessor +sun/swing/SwingAccessor$JTextComponentAccessor +sun/swing/SwingLazyValue +sun/swing/SwingLazyValue$1 +sun/swing/SwingUtilities2 +sun/swing/SwingUtilities2$2 +sun/swing/SwingUtilities2$AATextInfo +sun/swing/SwingUtilities2$LSBCacheEntry +sun/swing/UIAction +sun/swing/UIClientPropertyKey +sun/swing/table/DefaultTableCellHeaderRenderer +sun/swing/table/DefaultTableCellHeaderRenderer$EmptyIcon +sun/text/ComposedCharIter +sun/text/IntHashtable +sun/text/UCompactIntArray +sun/text/normalizer/CharTrie +sun/text/normalizer/CharTrie$FriendAgent +sun/text/normalizer/ICUBinary +sun/text/normalizer/ICUBinary$Authenticate +sun/text/normalizer/ICUData +sun/text/normalizer/IntTrie +sun/text/normalizer/NormalizerDataReader +sun/text/normalizer/NormalizerImpl +sun/text/normalizer/NormalizerImpl$AuxTrieImpl +sun/text/normalizer/NormalizerImpl$DecomposeArgs +sun/text/normalizer/NormalizerImpl$FCDTrieImpl +sun/text/normalizer/NormalizerImpl$NormTrieImpl +sun/text/normalizer/Trie +sun/text/normalizer/Trie$DataManipulate +sun/text/normalizer/UTF16 +sun/text/normalizer/UnicodeMatcher +sun/text/normalizer/UnicodeSet +sun/text/resources/CollationData +sun/text/resources/FormatData +sun/text/resources/en/FormatData_en +sun/text/resources/en/FormatData_en_US +sun/util/CoreResourceBundleControl +sun/util/PreHashedMap +sun/util/ResourceBundleEnumeration +sun/util/calendar/AbstractCalendar +sun/util/calendar/BaseCalendar +sun/util/calendar/BaseCalendar$Date +sun/util/calendar/CalendarDate +sun/util/calendar/CalendarSystem +sun/util/calendar/CalendarUtils +sun/util/calendar/Gregorian +sun/util/calendar/Gregorian$Date +sun/util/calendar/ZoneInfo +sun/util/calendar/ZoneInfoFile +sun/util/calendar/ZoneInfoFile$1 +sun/util/calendar/ZoneInfoFile$Checksum +sun/util/calendar/ZoneInfoFile$ZoneOffsetTransitionRule +sun/util/locale/BaseLocale +sun/util/locale/BaseLocale$Cache +sun/util/locale/BaseLocale$Key +sun/util/locale/InternalLocaleBuilder +sun/util/locale/InternalLocaleBuilder$CaseInsensitiveChar +sun/util/locale/LanguageTag +sun/util/locale/LocaleObjectCache +sun/util/locale/LocaleObjectCache$CacheEntry +sun/util/locale/LocaleUtils +sun/util/locale/ParseStatus +sun/util/locale/StringTokenIterator +sun/util/locale/provider/AuxLocaleProviderAdapter +sun/util/locale/provider/AuxLocaleProviderAdapter$NullProvider +sun/util/locale/provider/AvailableLanguageTags +sun/util/locale/provider/CalendarDataProviderImpl +sun/util/locale/provider/CalendarDataUtility +sun/util/locale/provider/CalendarDataUtility$CalendarWeekParameterGetter +sun/util/locale/provider/CalendarProviderImpl +sun/util/locale/provider/CollatorProviderImpl +sun/util/locale/provider/CurrencyNameProviderImpl +sun/util/locale/provider/DateFormatSymbolsProviderImpl +sun/util/locale/provider/DecimalFormatSymbolsProviderImpl +sun/util/locale/provider/JRELocaleProviderAdapter +sun/util/locale/provider/JRELocaleProviderAdapter$1 +sun/util/locale/provider/LocaleDataMetaInfo +sun/util/locale/provider/LocaleProviderAdapter +sun/util/locale/provider/LocaleProviderAdapter$1 +sun/util/locale/provider/LocaleProviderAdapter$Type +sun/util/locale/provider/LocaleResources +sun/util/locale/provider/LocaleResources$ResourceReference +sun/util/locale/provider/LocaleServiceProviderPool +sun/util/locale/provider/LocaleServiceProviderPool$LocalizedObjectGetter +sun/util/locale/provider/NumberFormatProviderImpl +sun/util/locale/provider/ResourceBundleBasedAdapter +sun/util/locale/provider/SPILocaleProviderAdapter +sun/util/locale/provider/SPILocaleProviderAdapter$1 +sun/util/locale/provider/TimeZoneNameProviderImpl +sun/util/locale/provider/TimeZoneNameUtility +sun/util/locale/provider/TimeZoneNameUtility$TimeZoneNameGetter +sun/util/logging/LoggingProxy +sun/util/logging/LoggingSupport +sun/util/logging/LoggingSupport$1 +sun/util/logging/LoggingSupport$2 +sun/util/logging/PlatformLogger +sun/util/logging/PlatformLogger$1 +sun/util/logging/PlatformLogger$DefaultLoggerProxy +sun/util/logging/PlatformLogger$JavaLoggerProxy +sun/util/logging/PlatformLogger$Level +sun/util/logging/PlatformLogger$LoggerProxy +sun/util/logging/resources/logging +sun/util/resources/CalendarData +sun/util/resources/CurrencyNames +sun/util/resources/LocaleData +sun/util/resources/LocaleData$1 +sun/util/resources/LocaleData$LocaleDataResourceBundleControl +sun/util/resources/LocaleNamesBundle +sun/util/resources/OpenListResourceBundle +sun/util/resources/ParallelListResourceBundle +sun/util/resources/ParallelListResourceBundle$KeySet +sun/util/resources/TimeZoneNames +sun/util/resources/TimeZoneNamesBundle +sun/util/resources/en/CalendarData_en +sun/util/resources/en/CurrencyNames_en_US +sun/util/resources/en/TimeZoneNames_en +sun/util/spi/CalendarProvider +# 729efa63b41fc759 diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/CIEXYZ.pf b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/CIEXYZ.pf new file mode 100644 index 0000000..db3ba20 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/CIEXYZ.pf differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/GRAY.pf b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/GRAY.pf new file mode 100644 index 0000000..e31a4a7 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/GRAY.pf differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/LINEAR_RGB.pf b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/LINEAR_RGB.pf new file mode 100644 index 0000000..eadae04 Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/LINEAR_RGB.pf differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/PYCC.pf b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/PYCC.pf new file mode 100644 index 0000000..1c49e0b Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/PYCC.pf differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/sRGB.pf b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/sRGB.pf new file mode 100644 index 0000000..7f9d18d Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/cmm/sRGB.pf differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/content-types.properties b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/content-types.properties new file mode 100644 index 0000000..8949352 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/content-types.properties @@ -0,0 +1,276 @@ +#sun.net.www MIME content-types table +# +# Property fields: +# +# ::= 'description' '=' +# ::= 'file_extensions' '=' +# ::= 'icon' '=' +# ::= 'browser' | 'application' | 'save' | 'unknown' +# ::= 'application' '=' +# + +# +# The "we don't know anything about this data" type(s). +# Used internally to mark unrecognized types. +# +content/unknown: description=Unknown Content +unknown/unknown: description=Unknown Data Type + +# +# The template we should use for temporary files when launching an application +# to view a document of given type. +# +temp.file.template: c:\\temp\\%s + +# +# The "real" types. +# +application/octet-stream: \ + description=Generic Binary Stream;\ + file_extensions=.saveme,.dump,.hqx,.arc,.obj,.lib,.bin,.exe,.zip,.gz + +application/oda: \ + description=ODA Document;\ + file_extensions=.oda + +application/pdf: \ + description=Adobe PDF Format;\ + file_extensions=.pdf + +application/postscript: \ + description=Postscript File;\ + file_extensions=.eps,.ai,.ps;\ + icon=ps + +application/rtf: \ + description=Wordpad Document;\ + file_extensions=.rtf;\ + action=application;\ + application=wordpad.exe %s + +application/x-dvi: \ + description=TeX DVI File;\ + file_extensions=.dvi + +application/x-hdf: \ + description=Hierarchical Data Format;\ + file_extensions=.hdf;\ + action=save + +application/x-latex: \ + description=LaTeX Source;\ + file_extensions=.latex + +application/x-netcdf: \ + description=Unidata netCDF Data Format;\ + file_extensions=.nc,.cdf;\ + action=save + +application/x-tex: \ + description=TeX Source;\ + file_extensions=.tex + +application/x-texinfo: \ + description=Gnu Texinfo;\ + file_extensions=.texinfo,.texi + +application/x-troff: \ + description=Troff Source;\ + file_extensions=.t,.tr,.roff + +application/x-troff-man: \ + description=Troff Manpage Source;\ + file_extensions=.man + +application/x-troff-me: \ + description=Troff ME Macros;\ + file_extensions=.me + +application/x-troff-ms: \ + description=Troff MS Macros;\ + file_extensions=.ms + +application/x-wais-source: \ + description=Wais Source;\ + file_extensions=.src,.wsrc + +application/zip: \ + description=Zip File;\ + file_extensions=.zip;\ + icon=zip;\ + action=save + +application/x-bcpio: \ + description=Old Binary CPIO Archive;\ + file_extensions=.bcpio;\ + action=save + +application/x-cpio: \ + description=Unix CPIO Archive;\ + file_extensions=.cpio;\ + action=save + +application/x-gtar: \ + description=Gnu Tar Archive;\ + file_extensions=.gtar;\ + icon=tar;\ + action=save + +application/x-shar: \ + description=Shell Archive;\ + file_extensions=.sh,.shar;\ + action=save + +application/x-sv4cpio: \ + description=SVR4 CPIO Archive;\ + file_extensions=.sv4cpio;\ + action=save + +application/x-sv4crc: \ + description=SVR4 CPIO with CRC;\ + file_extensions=.sv4crc;\ + action=save + +application/x-tar: \ + description=Tar Archive;\ + file_extensions=.tar;\ + icon=tar;\ + action=save + +application/x-ustar: \ + description=US Tar Archive;\ + file_extensions=.ustar;\ + action=save + +audio/basic: \ + description=Basic Audio;\ + file_extensions=.snd,.au;\ + icon=audio + +audio/x-aiff: \ + description=Audio Interchange Format File;\ + file_extensions=.aifc,.aif,.aiff;\ + icon=aiff + +audio/x-wav: \ + description=Wav Audio;\ + file_extensions=.wav;\ + icon=wav;\ + action=application;\ + application=mplayer.exe %s + +image/gif: \ + description=GIF Image;\ + file_extensions=.gif;\ + icon=gif;\ + action=browser + +image/ief: \ + description=Image Exchange Format;\ + file_extensions=.ief + +image/jpeg: \ + description=JPEG Image;\ + file_extensions=.jfif,.jfif-tbnl,.jpe,.jpg,.jpeg;\ + icon=jpeg;\ + action=browser + +image/tiff: \ + description=TIFF Image;\ + file_extensions=.tif,.tiff;\ + icon=tiff + +image/vnd.fpx: \ + description=FlashPix Image;\ + file_extensions=.fpx,.fpix + +image/x-cmu-rast: \ + description=CMU Raster Image;\ + file_extensions=.ras + +image/x-portable-anymap: \ + description=PBM Anymap Image;\ + file_extensions=.pnm + +image/x-portable-bitmap: \ + description=PBM Bitmap Image;\ + file_extensions=.pbm + +image/x-portable-graymap: \ + description=PBM Graymap Image;\ + file_extensions=.pgm + +image/x-portable-pixmap: \ + description=PBM Pixmap Image;\ + file_extensions=.ppm + +image/x-rgb: \ + description=RGB Image;\ + file_extensions=.rgb + +image/x-xbitmap: \ + description=X Bitmap Image;\ + file_extensions=.xbm,.xpm + +image/x-xwindowdump: \ + description=X Window Dump Image;\ + file_extensions=.xwd + +image/png: \ + description=PNG Image;\ + file_extensions=.png;\ + icon=png;\ + action=browser + +image/bmp: \ + description=Bitmap Image;\ + file_extensions=.bmp; + +text/html: \ + description=HTML Document;\ + file_extensions=.htm,.html;\ + icon=html + +text/plain: \ + description=Plain Text;\ + file_extensions=.text,.c,.cc,.c++,.h,.pl,.txt,.java,.el;\ + icon=text;\ + action=browser + +text/tab-separated-values: \ + description=Tab Separated Values Text;\ + file_extensions=.tsv + +text/x-setext: \ + description=Structure Enhanced Text;\ + file_extensions=.etx + +video/mpeg: \ + description=MPEG Video Clip;\ + file_extensions=.mpg,.mpe,.mpeg;\ + icon=mpeg + +video/quicktime: \ + description=QuickTime Video Clip;\ + file_extensions=.mov,.qt + +application/x-troff-msvideo: \ + description=AVI Video;\ + file_extensions=.avi;\ + icon=avi;\ + action=application;\ + application=mplayer.exe %s + +video/x-sgi-movie: \ + description=SGI Movie;\ + file_extensions=.movie,.mv + +message/rfc822: \ + description=Internet Email Message;\ + file_extensions=.mime + +application/xml: \ + description=XML document;\ + file_extensions=.xml + + diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/currency.data b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/currency.data new file mode 100644 index 0000000..1f8cf4b Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/currency.data differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy.jar b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy.jar new file mode 100644 index 0000000..5d589ad Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy.jar differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/ffjcext.zip b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/ffjcext.zip new file mode 100644 index 0000000..42f298c Binary files /dev/null and b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/ffjcext.zip differ diff --git a/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/messages.properties b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/messages.properties new file mode 100644 index 0000000..408b2a8 --- /dev/null +++ b/product/com.excelsior.xds.jre.feature/rootfiles.win32/jre/lib/deploy/messages.properties @@ -0,0 +1,57 @@ +# +# Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved. +# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +error.internal.badmsg=internal error, unknown message +error.badinst.nojre=Bad installation. No JRE found in configuration file +error.launch.execv=Error encountered while invoking Java Web Start (execv) +error.launch.sysexec=Error encountered while invoking Java Web Start (SysExec) +error.listener.failed=Splash: sysCreateListenerSocket failed +error.accept.failed=Splash: accept failed +error.recv.failed=Splash: recv failed +error.invalid.port=Splash: didn't revive a valid port +error.read=Read past end of buffer +error.xmlparsing=XML Parsing error: wrong kind of token found +error.splash.exit=Java Web Start splash screen process exiting .....\n +# "Last WinSock Error" means the error message for the last operation that failed. +error.winsock=\tLast WinSock Error: +error.winsock.load=Couldn't load winsock.dll +error.winsock.start=WSAStartup failed +error.badinst.nohome=Bad installation: JAVAWS_HOME not set +error.splash.noimage=Splash: couldn't load splash screen image +error.splash.socket=Splash: server socket failed +error.splash.cmnd=Splash: unrecognized command +error.splash.port=Splash: port not specified +error.splash.send=Splash: send failed +error.splash.timer=Splash: couldn't create shutdown timer +error.splash.x11.open=Splash: Can't open X11 display +error.splash.x11.connect=Splash: X11 connection failed +# Javaws usage: '\' is a joining of two sentence,which are connected including +# the invisible character '\n'. +message.javaws.usage=\n\ +Usage:\tjavaws [run-options] \n\ + \tjavaws [control-options] \n\ + \n\ +where run-options include: \n\ + -verbose \tdisplay additional output \n\ + -offline \trun the application in offline mode \n\ + -system \trun the application from the system cache only\n\ + -Xnosplash \trun without showing a splash screen \n\ + -J

+ * This method, along with the startReading + * method is used to allow OutputStreamMonitor + * to implement Runnable without publicly + * exposing a run method. + */ + private void read() { + lastSleep = System.currentTimeMillis(); + long currentTime = lastSleep; + byte[] bytes= new byte[BUFFER_SIZE]; + int read = 0; + while (read >= 0) { + try { + if (fKilled) { + break; + } + read= fStream.read(bytes); + if (read > 0) { + String text; + if (fEncoding != null) { + text = new String(bytes, 0, read, fEncoding); + } else { + text = new String(bytes, 0, read); + } + synchronized (this) { + if (isBuffered()) { + fContents.append(text); + } + fireStreamAppended(text); + } + } + } catch (IOException ioe) { + if (!fKilled) { + DebugPlugin.log(ioe); + } + return; + } catch (NullPointerException e) { + // killing the stream monitor while reading can cause an NPE + // when reading from the stream + if (!fKilled && fThread != null) { + DebugPlugin.log(e); + } + return; + } + + currentTime = System.currentTimeMillis(); + if (currentTime - lastSleep > 1000) { + lastSleep = currentTime; + try { + Thread.sleep(1); // just give up CPU to maintain UI responsiveness. + } catch (InterruptedException e) { + } + } + } + try { + fStream.close(); + } catch (IOException e) { + DebugPlugin.log(e); + } + } + + protected void kill() { + fKilled= true; + } + + /* (non-Javadoc) + * @see org.eclipse.debug.core.model.IStreamMonitor#removeListener(org.eclipse.debug.core.IStreamListener) + */ + @Override + public synchronized void removeListener(IStreamListener listener) { + fListeners.remove(listener); + } + + /** + * Starts a thread which reads from the stream + */ + protected void startMonitoring() { + if (fThread == null) { + fThread= new Thread(new Runnable() { + @Override + public void run() { + read(); + } + }, "OutputStreamMonitor"); + fThread.setDaemon(true); + fThread.setPriority(Thread.MIN_PRIORITY); + fThread.start(); + } + } + + /** + * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#setBuffered(boolean) + */ + @Override + public synchronized void setBuffered(boolean buffer) { + fBuffered = buffer; + } + + /** + * @see org.eclipse.debug.core.model.IFlushableStreamMonitor#flushContents() + */ + @Override + public synchronized void flushContents() { + fContents.setLength(0); + } + + /** + * @see IFlushableStreamMonitor#isBuffered() + */ + @Override + public synchronized boolean isBuffered() { + return fBuffered; + } + + private ContentNotifier getNotifier() { + return new ContentNotifier(); + } + + class ContentNotifier implements ISafeRunnable { + + private IStreamListener fListener; + private String fText; + + /** + * @see org.eclipse.core.runtime.ISafeRunnable#handleException(java.lang.Throwable) + */ + @Override + public void handleException(Throwable exception) { + DebugPlugin.log(exception); + } + + /** + * @see org.eclipse.core.runtime.ISafeRunnable#run() + */ + @Override + public void run() throws Exception { + fListener.streamAppended(fText, OutputStreamMonitor.this); + } + + public void notifyAppend(String text) { + if (text == null) { + return; + } + fText = text; + Object[] copiedListeners= fListeners.getListeners(); + for (int i= 0; i < copiedListeners.length; i++) { + fListener = (IStreamListener) copiedListeners[i]; + SafeRunner.run(this); + } + fListener = null; + fText = null; + } + } + + public void join() throws InterruptedException { + fThread.join(); + } +} diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/delegate/StreamsProxy.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/delegate/StreamsProxy.java new file mode 100644 index 0000000..c35caa4 --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/delegate/StreamsProxy.java @@ -0,0 +1,169 @@ +package com.excelsior.xds.launching.commons.internal.delegate; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import org.eclipse.debug.core.model.IStreamsProxy; +import org.eclipse.debug.core.model.IStreamsProxy2; + +import com.excelsior.xds.core.utils.io.StreamUtils; + +/** + * Standard implementation of a streams proxy for IStreamsProxy. + */ + +public class StreamsProxy implements IStreamsProxy, IStreamsProxy2 { + /** + * The monitor for the output stream (connected to standard out of the process) + */ + private OutputStreamMonitor fOutputMonitor; + /** + * The monitor for the error stream (connected to standard error of the process) + */ + private OutputStreamMonitor fErrorMonitor; + /** + * The monitor for the input stream (connected to standard in of the process) + */ + private InputStreamMonitor fInputMonitor; + /** + * Records the open/closed state of communications with + * the underlying streams. Note: fClosed is initialized to + * false by default. + */ + private boolean fClosed; + + + /** + * Creates a StreamsProxy on the streams + * of the given system process. + * + * @param process system process to create a streams proxy on + * @param encoding the process's encoding or null if default + */ + public StreamsProxy(Process process, String encoding) { + this(process.getInputStream(), process.getErrorStream(), process.getOutputStream(), encoding); + } + + public StreamsProxy(Process process, String stdoutPipeProxy, String stderrPipeProxy, String stdinPipeProxy, String encoding) throws FileNotFoundException { + this(createInputStream(stdoutPipeProxy, process.getInputStream()), + createInputStream(stderrPipeProxy, process.getErrorStream()), + createOutputStream(stdinPipeProxy, process.getOutputStream()), + encoding); + } + + public StreamsProxy(InputStream stdoutProxy, InputStream stderrProxy, OutputStream stdinProxy, String encoding) { + fOutputMonitor= new OutputStreamMonitor(stdoutProxy, encoding); + fErrorMonitor= new OutputStreamMonitor(stderrProxy, encoding); + fInputMonitor= new InputStreamMonitor(stdinProxy, encoding); + fOutputMonitor.startMonitoring(); + fErrorMonitor.startMonitoring(); + fInputMonitor.startMonitoring(); + } + + private static InputStream createInputStream(String pipeName, InputStream defaultStream) throws FileNotFoundException { + if (pipeName != null) { + return StreamUtils.tryOpenInputPipe(pipeName); + } + else { + return defaultStream; + } + } + + private static OutputStream createOutputStream(String pipeName, OutputStream defaultStream) throws FileNotFoundException { + if (pipeName != null) { + return StreamUtils.tryOpenOutputPipe(pipeName); + } + else { + return defaultStream; + } + } + + /** + * Causes the proxy to close all + * communications between it and the + * underlying streams after all remaining data + * in the streams is read. + */ + public void close() { + if (!isClosed(true)) { + fOutputMonitor.close(); + fErrorMonitor.close(); + fInputMonitor.close(); + } + } + + /** + * Returns whether the proxy is currently closed. This method + * synchronizes access to the fClosed flag. + * + * @param setClosed If true this method will also set the + * fClosed flag to true. Otherwise, the fClosed + * flag is not modified. + * @return Returns whether the stream proxy was already closed. + */ + private synchronized boolean isClosed(boolean setClosed) { + boolean closed = fClosed; + if (setClosed) { + fClosed = true; + } + return closed; + } + + /** + * Causes the proxy to close all + * communications between it and the + * underlying streams immediately. + * Data remaining in the streams is lost. + */ + public void kill() { + synchronized (this) { + fClosed= true; + } + fOutputMonitor.kill(); + fErrorMonitor.kill(); + fInputMonitor.close(); + } + + /** + * @see IStreamsProxy#getErrorStreamMonitor() + */ + @Override + public OutputStreamMonitor getErrorStreamMonitor() { + return fErrorMonitor; + } + + /** + * @see IStreamsProxy#getOutputStreamMonitor() + */ + @Override + public OutputStreamMonitor getOutputStreamMonitor() { + return fOutputMonitor; + } + + /** + * @see IStreamsProxy#write(String) + */ + @Override + public void write(String input) throws IOException { + if (!isClosed(false)) { + fInputMonitor.write(input); + } else { + throw new IOException(); + } + } + + /* (non-Javadoc) + * @see org.eclipse.debug.core.model.IStreamsProxy2#closeInputStream() + */ + @Override + public void closeInputStream() throws IOException { + if (!isClosed(false)) { + fInputMonitor.closeInputStream(); + } else { + throw new IOException(); + } + + } + +} diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/Messages.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/Messages.java new file mode 100644 index 0000000..80051a5 --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/Messages.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.launching.commons.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + + public static String LaunchDelegate_ExeName; + public static String LaunchDelegate_ExeNameNotSet; + public static String LaunchDelegate_ExeOrPktName; + public static String LaunchDelegate_FileIsNotExecutable; + public static String LaunchDelegate_InvalidExe; + public static String LaunchDelegate_InvalidSimulatorFileName; + public static String LaunchDelegate_ProcessFinishedWithCode; + public static String LaunchDelegate_SimulatorExe; + public static String LaunchDelegate_Launching; + public static String LaunchDelegate_DebuggerLocation; + public static String LaunchDelegate_ProfilerLocation; + public static String ConsoleType_XDS_App; + + public static String AbstractLaunchDelegate_CantDetermineWorkDir; + public static String AbstractLaunchDelegate_InvaludWorkDir; + public static String AbstractLaunchDelegate_NotSpecified; + public static String AbstractLaunchDelegate_ProblemDescriptionAndAskToEdit; + public static String AbstractLaunchDelegate_ProblemOccured; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/messages.properties b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/messages.properties new file mode 100644 index 0000000..093a229 --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/nls/messages.properties @@ -0,0 +1,19 @@ +ConsoleType_XDS_App=XDS Application + +AbstractLaunchDelegate_CantDetermineWorkDir=Can't determine working directory +AbstractLaunchDelegate_InvaludWorkDir=Invalid working directory +AbstractLaunchDelegate_NotSpecified=Not specified +AbstractLaunchDelegate_ProblemDescriptionAndAskToEdit=Launching '%s' has encountered a problem.\n\n%s\n\nDo you want to edit the run configuration? +AbstractLaunchDelegate_ProblemOccured=Problem Occurred + +LaunchDelegate_DebuggerLocation=debugger location +LaunchDelegate_Launching=Launching... +LaunchDelegate_ProcessFinishedWithCode=\nProcess finished with exit code +LaunchDelegate_ProfilerLocation=profiler location +LaunchDelegate_ExeName=executable name +LaunchDelegate_ExeNameNotSet=Application executable file name is not set. +LaunchDelegate_ExeOrPktName=executable or debugger packet name +LaunchDelegate_FileIsNotExecutable=File is not executable +LaunchDelegate_InvalidExe=Invalid application executable file +LaunchDelegate_InvalidSimulatorFileName=Invalid simulator file +LaunchDelegate_SimulatorExe=simulator location \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/plugin/LaunchingCommonsPlugin.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/plugin/LaunchingCommonsPlugin.java new file mode 100644 index 0000000..117019c --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/internal/plugin/LaunchingCommonsPlugin.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.launching.commons.internal.plugin; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.launching.commons.preferences.PreferenceKeys; + +public class LaunchingCommonsPlugin implements BundleActivator { + public static final String PLUGIN_ID = "com.excelsior.xds.launching.commons"; //$NON-NLS-1$ + + private static BundleContext context; + + public static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + LaunchingCommonsPlugin.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + LaunchingCommonsPlugin.context = null; + PreferenceKeys.flush(); + } + +} diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/preferences/PreferenceKeys.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/preferences/PreferenceKeys.java new file mode 100644 index 0000000..e734831 --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/preferences/PreferenceKeys.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.launching.commons.preferences; + +import com.excelsior.xds.core.preferences.PreferenceCommons; +import com.excelsior.xds.core.preferences.PreferenceKey; +import com.excelsior.xds.launching.commons.internal.plugin.LaunchingCommonsPlugin; + +public final class PreferenceKeys +{ + private static final String QUALIFIER = LaunchingCommonsPlugin.PLUGIN_ID; + + /** + * 'Use console debugger' default, used when new debug configuration is created. + */ + public final static PreferenceKey PKEY_USE_CONSOLE_DEBUGGER_DEFAULT = new PreferenceKey( + QUALIFIER, "use_console_debugger", false); //$NON-NLS-1$ + + public static void flush() { + PreferenceCommons.flushInstanceScope(QUALIFIER); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/services/ServiceHolder.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/services/ServiceHolder.java new file mode 100644 index 0000000..f489f2d --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/services/ServiceHolder.java @@ -0,0 +1,28 @@ +package com.excelsior.xds.launching.commons.services; + +import javax.inject.Inject; + +import com.excelsior.xds.core.console.IXdsConsoleFactory; +import com.excelsior.xds.core.dependency.injection.DependencyInjectionHelper; +import com.excelsior.xds.launching.commons.internal.plugin.LaunchingCommonsPlugin; + +public final class ServiceHolder { + @Inject + private IXdsConsoleFactory consoleFactory; + + private ServiceHolder() { + DependencyInjectionHelper.inject(this, LaunchingCommonsPlugin.getContext()); + } + + public static ServiceHolder getInstance() { + return ServiceHolderHolder.instance; + } + + public IXdsConsoleFactory getConsoleFactory() { + return consoleFactory; + } + + private static class ServiceHolderHolder { + static ServiceHolder instance = new ServiceHolder(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/utils/LaunchUtils.java b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/utils/LaunchUtils.java new file mode 100644 index 0000000..8f558ee --- /dev/null +++ b/product/com.excelsior.xds.launching.commons/src/com/excelsior/xds/launching/commons/utils/LaunchUtils.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.launching.commons.utils; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchManager; + +import com.excelsior.xds.core.project.launcher.ILaunchConfigConst; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.sdk.SdkUtils; +import com.excelsior.xds.launching.commons.preferences.PreferenceKeys; + +public final class LaunchUtils { + /** + * Determines whether this launch configuration can result in the {@link ILaunchManager#DEBUG_MODE} launch with IDE integration + * @param p + * @param configuration + * @return + * @throws CoreException + * @see ILaunchManager#DEBUG_MODE + */ + public static boolean canLaunchInIdeDebugMode(IProject p, ILaunchConfiguration configuration) throws CoreException { + Sdk sdk = SdkUtils.getProjectSdk(p); + boolean isUseIdeDebugger = !configuration.getAttribute(ILaunchConfigConst.ATTR_USE_CONSOLE_DEBUGGER, PreferenceKeys.PKEY_USE_CONSOLE_DEBUGGER_DEFAULT.getStoredBoolean()); + return isUseIdeDebugger && sdk.isDebuggerSupportsIdeIntegration(); + } + + private LaunchUtils(){ + } +} diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.classpath b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.project b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.project new file mode 100644 index 0000000..b9c362d --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.launching.debugger.ce.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d5b1be3 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.launching.debugger.ce.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.launching.debugger.ce;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Vendor: Excelsior LLC diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/build.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/build.properties new file mode 100644 index 0000000..89d57f2 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment_ru.properties,\ + plugin_ru.properties,\ + fragment.properties diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment.properties new file mode 100644 index 0000000..9837bad --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.debugger.ce Russian NLS Support diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..e97fd6d --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.launching.debugger.ce diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..b4453cd --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.launching.debugger.ce diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..70b0ada --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0434\u043b\u044f \u041e\u0431\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0412\u0435\u0440\u0441\u0438\u0438 \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..a8b2b4c --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ïîääåðæêà çàïóñêà îòëàäêè XDS Ìîäóëà-2 ïðîãðàìì äëÿ Îáùåñòâåííîé Âåðñèè \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru.properties new file mode 100644 index 0000000..72d1e02 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru.properties @@ -0,0 +1,7 @@ +LaunchDelegate_CheckingLaunchCfg=\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430... +LaunchDelegate_IncorrectProject=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 +LaunchDelegate_SdkNotConfigured=\u041d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 +LaunchDelegate_DebuggerLocation=\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 +LaunchDelegate_ProfilerLocation=\u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0444\u0438\u043b\u0438\u0440\u043e\u0432\u0449\u0438\u043a\u0430 +LaunchDelegate_Launching=\u0417\u0430\u043f\u0443\u0441\u043a... +LaunchDelegate_ProcessFinishedWithCode=\n\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d \u0441 \u043a\u043e\u0434\u043e\u043c \u0432\u043e\u0437\u0432\u0440\u0430\u0442\u0430 \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..57edfbc --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce.nl_ru/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages_ru_1251.properties @@ -0,0 +1,7 @@ +LaunchDelegate_CheckingLaunchCfg=Ïðîâåðêà êîíôèãóðàöèè çàïóñêà... +LaunchDelegate_IncorrectProject=Íåêîððåêòíûé ïðîåêò +LaunchDelegate_SdkNotConfigured=Íå ïîäêëþ÷åíà Ìîäóëà-2 ñèñòåìà ðàçðàáîòêè +LaunchDelegate_DebuggerLocation=ðàñïîëîæåíèå îòëàä÷èêà +LaunchDelegate_ProfilerLocation=ðàñïîëîæåíèå ïðîôèëèðîâùèêà +LaunchDelegate_Launching=Çàïóñê... +LaunchDelegate_ProcessFinishedWithCode=\nÏðîöåññ çàâåðøåí ñ êîäîì âîçâðàòà \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce/.classpath b/product/com.excelsior.xds.launching.debugger.ce/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.launching.debugger.ce/.project b/product/com.excelsior.xds.launching.debugger.ce/.project new file mode 100644 index 0000000..d5b7148 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.launching.debugger.ce + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.launching.debugger.ce/META-INF/MANIFEST.MF b/product/com.excelsior.xds.launching.debugger.ce/META-INF/MANIFEST.MF new file mode 100644 index 0000000..51c97ae --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.launching.debugger.ce;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.launching.debugger.ce.internal.plugin.LaunchDebuggerCePlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.core.runtime, + com.excelsior.xds.launching.commons;bundle-version="1.7.0", + org.eclipse.debug.core, + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + org.eclipse.debug.ui, + org.apache.commons.lang, + org.apache.commons.io, + org.eclipse.ui.workbench, + com.excelsior.xds.core.ide;bundle-version="1.7.0", + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.ui.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/product/com.excelsior.xds.launching.debugger.ce/build.properties b/product/com.excelsior.xds.launching.debugger.ce/build.properties new file mode 100644 index 0000000..30b2fc4 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/build.properties @@ -0,0 +1,6 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties,\ + plugin.xml diff --git a/product/com.excelsior.xds.launching.debugger.ce/plugin.properties b/product/com.excelsior.xds.launching.debugger.ce/plugin.properties new file mode 100644 index 0000000..eb5a4c9 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Application Debug Launch Support for the Community Edition \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce/plugin.xml b/product/com.excelsior.xds.launching.debugger.ce/plugin.xml new file mode 100644 index 0000000..8743b0b --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/plugin.xml @@ -0,0 +1,11 @@ + + + + + + + + diff --git a/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/delegate/LaunchDelegate.java b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/delegate/LaunchDelegate.java new file mode 100644 index 0000000..d392e6f --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/delegate/LaunchDelegate.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.launching.debugger.ce.internal.delegate; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; + +import com.excelsior.xds.core.project.NatureUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.launching.commons.delegate.AbstractLaunchDelegate; +import com.excelsior.xds.launching.debugger.ce.internal.nls.Messages; + +/** + * A launch delegate for launching Modula-2 applications. + */ +public class LaunchDelegate extends AbstractLaunchDelegate { + @Override + public void launch(ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException + { + try { + monitor.beginTask(configuration.getName() + "...", 2); //$NON-NLS-1$ + if (monitor.isCanceled()) { + return; + } + monitor.subTask(Messages.LaunchDelegate_CheckingLaunchCfg); + + IProject project = getProject(configuration); + if (!NatureUtils.hasModula2Nature(project)) { + abort(Messages.LaunchDelegate_CheckingLaunchCfg + ": " + project.getName()); //$NON-NLS-1$ + } + Sdk sdk = getProjectSdk(project); + if (sdk == null) { + abort(Messages.LaunchDelegate_SdkNotConfigured); + } + + runModulaApplication(mode, configuration, launch, project, sdk, monitor); + } + finally { + monitor.done(); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/Messages.java b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/Messages.java new file mode 100644 index 0000000..17f6914 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/Messages.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.launching.debugger.ce.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + + public static String LaunchDelegate_CantLaunchTwice; + public static String LaunchDelegate_CheckingLaunchCfg; + public static String LaunchDelegate_SdkNotConfigured; + public static String LaunchDelegate_IncorrectProject; + public static String LaunchDelegate_Launching; + public static String LaunchDelegate_ProcessFinishedWithCode; + public static String LaunchDelegate_DebuggerLocation; + public static String LaunchDelegate_ProfilerLocation; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages.properties b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages.properties new file mode 100644 index 0000000..01bf336 --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/nls/messages.properties @@ -0,0 +1,8 @@ +LaunchDelegate_CantLaunchTwice=XDS Modula-2 application is running now. Simultaneous launching of several XDS Moduila-2 applications is forbidden. +LaunchDelegate_CheckingLaunchCfg=Checking launch configuration... +LaunchDelegate_DebuggerLocation=debugger location +LaunchDelegate_IncorrectProject=Incorrect project +LaunchDelegate_Launching=Launching... +LaunchDelegate_ProcessFinishedWithCode=\nProcess finished with exit code +LaunchDelegate_ProfilerLocation=profiler location +LaunchDelegate_SdkNotConfigured=Modula-2 SDK is not configured \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/plugin/LaunchDebuggerCePlugin.java b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/plugin/LaunchDebuggerCePlugin.java new file mode 100644 index 0000000..6913efd --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.ce/src/com/excelsior/xds/launching/debugger/ce/internal/plugin/LaunchDebuggerCePlugin.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.launching.debugger.ce.internal.plugin; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class LaunchDebuggerCePlugin implements BundleActivator { + + private static BundleContext context; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + LaunchDebuggerCePlugin.context = bundleContext; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + LaunchDebuggerCePlugin.context = null; + } + +} diff --git a/product/com.excelsior.xds.launching.debugger.nl_ru/fragment.properties b/product/com.excelsior.xds.launching.debugger.nl_ru/fragment.properties new file mode 100644 index 0000000..8dff2bf --- /dev/null +++ b/product/com.excelsior.xds.launching.debugger.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.launching.debugger Russian NLS Support diff --git a/product/com.excelsior.xds.launching.nl_ru/.classpath b/product/com.excelsior.xds.launching.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.launching.nl_ru/.project b/product/com.excelsior.xds.launching.nl_ru/.project new file mode 100644 index 0000000..f2bf2f7 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.launching.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.launching.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.launching.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f335b2a --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/plugin_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.launching.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.launching.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6169698 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.launching.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.launching;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.launching.nl_ru/build.properties b/product/com.excelsior.xds.launching.nl_ru/build.properties new file mode 100644 index 0000000..0bd483e --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment.properties,\ + fragment_ru.properties + diff --git a/product/com.excelsior.xds.launching.nl_ru/fragment.properties b/product/com.excelsior.xds.launching.nl_ru/fragment.properties new file mode 100644 index 0000000..ca15f2f --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.launching Russian NLS Support diff --git a/product/com.excelsior.xds.launching.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.launching.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..9adb934 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.launching diff --git a/product/com.excelsior.xds.launching.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.launching.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..81b0368 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.launching diff --git a/product/com.excelsior.xds.launching.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.launching.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..07f3dea --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/plugin_ru.properties @@ -0,0 +1,3 @@ +pluginName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c + +common.xdsM2Application = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.launching.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..e198dd3 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,3 @@ +pluginName=Ïîääåðæêà çàïóñêà îòëàäêè XDS Ìîäóëà-2 ïðîãðàìì + +common.xdsM2Application = XDS Ìîäóëà-2 ïðîãðàììà \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru.properties b/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru.properties new file mode 100644 index 0000000..01e5f2d --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru.properties @@ -0,0 +1,3 @@ +LaunchDelegate_CheckingLaunchCfg=\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430... +LaunchDelegate_IncorrectProject=\u041d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 +LaunchDelegate_SdkNotConfigured=\u041d\u0435 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d\u0430 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \ No newline at end of file diff --git a/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru_1251.properties b/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru_1251.properties new file mode 100644 index 0000000..64a0864 --- /dev/null +++ b/product/com.excelsior.xds.launching.nl_ru/src/com/excelsior/xds/launching/nls/messages_ru_1251.properties @@ -0,0 +1,3 @@ +LaunchDelegate_CheckingLaunchCfg=Ïðîâåðêà êîíôèãóðàöèè çàïóñêà... +LaunchDelegate_IncorrectProject=Íåêîððåêòíûé ïðîåêò +LaunchDelegate_SdkNotConfigured=Íå ïîäêëþ÷åíà Ìîäóëà-2 ñèñòåìà ðàçðàáîòêè \ No newline at end of file diff --git a/product/com.excelsior.xds.launching/.classpath b/product/com.excelsior.xds.launching/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.launching/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.launching/.project b/product/com.excelsior.xds.launching/.project new file mode 100644 index 0000000..82cc38e --- /dev/null +++ b/product/com.excelsior.xds.launching/.project @@ -0,0 +1,33 @@ + + + com.excelsior.xds.launching + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + org.eclipse.pde.ds.core.builder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.launching/META-INF/MANIFEST.MF b/product/com.excelsior.xds.launching/META-INF/MANIFEST.MF new file mode 100644 index 0000000..4304d4a --- /dev/null +++ b/product/com.excelsior.xds.launching/META-INF/MANIFEST.MF @@ -0,0 +1,33 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.launching;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.launching.LaunchingPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.core.variables, + com.excelsior.xds.resources;bundle-version="1.7.0", + org.eclipse.core.resources, + org.eclipse.debug.core, + org.eclipse.debug.ui, + org.eclipse.jface, + org.apache.commons.lang, + com.excelsior.xds.builder;bundle-version="1.7.0", + org.eclipse.ui.workbench, + com.excelsior.xds.core.ide;bundle-version="1.7.0", + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + org.apache.commons.io, + org.eclipse.ui, + org.eclipse.ui.ide, + com.excelsior.xds.core.model;bundle-version="1.7.0", + com.excelsior.xds.parser;bundle-version="1.7.0", + org.eclipse.e4.core.di, + org.eclipse.e4.core.contexts, + com.google.guava, + org.eclipse.ui.console, + com.excelsior.xds.launching.commons;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/product/com.excelsior.xds.launching/build.properties b/product/com.excelsior.xds.launching/build.properties new file mode 100644 index 0000000..dc503fe --- /dev/null +++ b/product/com.excelsior.xds.launching/build.properties @@ -0,0 +1,7 @@ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties +source.. = src/ + diff --git a/product/com.excelsior.xds.launching/plugin.properties b/product/com.excelsior.xds.launching/plugin.properties new file mode 100644 index 0000000..ab377cb --- /dev/null +++ b/product/com.excelsior.xds.launching/plugin.properties @@ -0,0 +1,3 @@ +pluginName=XDS Modula-2 Application Launch Support + +common.xdsM2Application = XDS Modula-2 Application \ No newline at end of file diff --git a/product/com.excelsior.xds.launching/plugin.xml b/product/com.excelsior.xds.launching/plugin.xml new file mode 100644 index 0000000..da07453 --- /dev/null +++ b/product/com.excelsior.xds.launching/plugin.xml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/LaunchingPlugin.java b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/LaunchingPlugin.java new file mode 100644 index 0000000..312b685 --- /dev/null +++ b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/LaunchingPlugin.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.launching; + +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class LaunchingPlugin implements BundleActivator { + public static final String PLUGIN_ID = "com.excelsior.xds.launching"; //$NON-NLS-1$ + private static BundleContext context; + + public static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext bundleContext) throws Exception { + LaunchingPlugin.context = bundleContext; + }; + + /* + * (non-Javadoc) + * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + LaunchingPlugin.context = null; + } +} diff --git a/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/internal/LaunchDelegate.java b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/internal/LaunchDelegate.java new file mode 100644 index 0000000..0adafc4 --- /dev/null +++ b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/internal/LaunchDelegate.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.launching.internal; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; + +import com.excelsior.xds.core.project.NatureUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.launching.commons.delegate.AbstractLaunchDelegate; +import com.excelsior.xds.launching.nls.Messages; + +/** + * A launch delegate for launching Modula-2 applications. + */ +public class LaunchDelegate extends AbstractLaunchDelegate { + @Override + public void launch(ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException + { + try { + monitor.beginTask(configuration.getName() + "...", 2); //$NON-NLS-1$ + if (monitor.isCanceled()) { + return; + } + monitor.subTask(Messages.LaunchDelegate_CheckingLaunchCfg); + + IProject project = getProject(configuration); + if (!NatureUtils.hasModula2Nature(project)) { + abort(Messages.LaunchDelegate_IncorrectProject + ": " + project.getName()); //$NON-NLS-1$ + } + Sdk sdk = getProjectSdk(project); + if (sdk == null) { + abort(Messages.LaunchDelegate_SdkNotConfigured); + } + runModulaApplication(mode, configuration, launch, project, sdk, monitor); + } + finally { + monitor.done(); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/Messages.java b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/Messages.java new file mode 100644 index 0000000..6c6d661 --- /dev/null +++ b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/Messages.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.launching.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = Messages.class.getPackage().getName() + ".messages"; //$NON-NLS-1$ + + public static String LaunchDelegate_CheckingLaunchCfg; + public static String LaunchDelegate_IncorrectProject; + public static String LaunchDelegate_SdkNotConfigured; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/messages.properties b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/messages.properties new file mode 100644 index 0000000..88f360a --- /dev/null +++ b/product/com.excelsior.xds.launching/src/com/excelsior/xds/launching/nls/messages.properties @@ -0,0 +1,3 @@ +LaunchDelegate_CheckingLaunchCfg=Checking launch configuration... +LaunchDelegate_IncorrectProject=Incorrect project +LaunchDelegate_SdkNotConfigured=Modula-2 SDK is not configured \ No newline at end of file diff --git a/product/com.excelsior.xds.nl_ru.feature/.project b/product/com.excelsior.xds.nl_ru.feature/.project new file mode 100644 index 0000000..e25ad3e --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.nl_ru.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.nl_ru.feature/build.properties b/product/com.excelsior.xds.nl_ru.feature/build.properties new file mode 100644 index 0000000..af5287d --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/build.properties @@ -0,0 +1,3 @@ +bin.includes = feature.xml,\ + feature.properties,\ + feature_ru.properties diff --git a/product/com.excelsior.xds.nl_ru.feature/feature.properties b/product/com.excelsior.xds.nl_ru.feature/feature.properties new file mode 100644 index 0000000..3db6c5b --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/feature.properties @@ -0,0 +1 @@ +featureDesription=Russian Language Pack for Excelsior XDS Modula-2 development environment. diff --git a/product/com.excelsior.xds.nl_ru.feature/feature.xml b/product/com.excelsior.xds.nl_ru.feature/feature.xml new file mode 100644 index 0000000..78af255 --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/feature.xml @@ -0,0 +1,245 @@ + + + + + %featureDesription + + + + (c) 2014 Excelsior LLC + + + + Excelsior Freeware License Agreement + +This License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and Excelsior, LLC ("Excelsior") for the Excelsior software product identified above, which includes computer software, electronic documentation, and the associated printed materials ("Software"). By installing, copying or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, you may not install or use the Software. + +LICENSE GRANT + +Excelsior hereby grants to you a non-exclusive, transferable limited license to use the accompanying Software on the following terms: + +You may: a. install and use the Software on any computer in your possession or under your control; and b. copy and redistribute the Software provided it is not modified in any way and you do not charge for its distribution without explicit prior written permission. + +You may not: a. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), or create derivative works based on the Software; b. sell, rent, lease, or charge for access to the Software; c. remove any proprietary notices or labels on the Software. or d. distribute the Software for a fee, whether as a stand-alone product, or as part of a compilation or anthology, without Excelsior's prior written consent; + +TITLE + +Title, ownership rights, and intellectual property rights in and to the Software, and any copies of the Software shall at all times remain with Excelsior and/or its suppliers. The Software is protected by the copyright laws of the Russian Federation and international copyright treaties. + +TECHNICAL SUPPORT AND UPDATES + +This Agreement does not entitle you to receive from Excelsior printed manuals, technical support, phone support, updates, or enhancements to the Software. Excelsior may at its own discretion offer fee-based support, consulting and custom engineering services for the Software. + +NO FAIL-SAFE USES + +The Software has been created using technologies that are not fault tolerant and thus the Software is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, including, but without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the technologies employed in the Software could lead directly to death, personal injury, or severe physical or environmental damage. + +DISCLAIMER OF WARRANTY + +THE SOFTWARE IS PROVIDED TO YOU "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EXCELSIOR AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY NATURE WHATSOEVER, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE. EXCELSIOR DOES NOT WARRANT THAT ANY OR ALL FAILURES OR ERRORS IN THE SOFTWARE WILL BE CORRECTED OR WARRANT THAT THE SOFTWARE'S FUNCTIONALITY WILL MEET YOUR REQUIREMENTS OR THAT THE SOFTWARE WILL OPERATE IN COMBINATIONS YOU SELECT. NO EXCELSIOR DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS DISCLAIMER. + +LIMITATION OF LIABILITY + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL EXCELSIOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF EXCELSIOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. + +TERMINATION + +You may terminate this license at any time by destroying all copies of the Software you received or made under this Agreement. This Agreement shall terminate automatically if you fail to comply with any of its terms and conditions. On such termination, you must destroy all copies of the Software you received or made under this Agreement. The Disclaimer of Warranty and Limitation of Liability sections above shall survive termination of this Agreement. + +This Agreement is the entire Agreement between us and supersedes any other communications, advertisements, or understandings with respect to the Software. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.nl_ru.feature/feature_ru.properties b/product/com.excelsior.xds.nl_ru.feature/feature_ru.properties new file mode 100644 index 0000000..a81f3be --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/feature_ru.properties @@ -0,0 +1,3 @@ +#featureLabel=\u041f\u0430\u043a\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 + +featureDesription=\u041f\u0430\u043a\u0435\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. diff --git a/product/com.excelsior.xds.nl_ru.feature/feature_ru_1251.properties b/product/com.excelsior.xds.nl_ru.feature/feature_ru_1251.properties new file mode 100644 index 0000000..589cef1 --- /dev/null +++ b/product/com.excelsior.xds.nl_ru.feature/feature_ru_1251.properties @@ -0,0 +1,3 @@ +#featureLabel=Ïàêåò ïîääåðæêè ðóññêîãî ÿçûêà äëÿ XDS Ìîäóëà-2 + +featureDesription=Ïàêåò ïîääåðæêè ðóññêîãî ÿçûêà äëÿ ñðåäû ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì. diff --git a/product/com.excelsior.xds.parser.nl_ru/.classpath b/product/com.excelsior.xds.parser.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.parser.nl_ru/.project b/product/com.excelsior.xds.parser.nl_ru/.project new file mode 100644 index 0000000..0a8ae8f --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.parser.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.parser.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.parser.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..6b0beec --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.parser.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.parser;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.parser.nl_ru/build.properties b/product/com.excelsior.xds.parser.nl_ru/build.properties new file mode 100644 index 0000000..0bd483e --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment.properties,\ + fragment_ru.properties + diff --git a/product/com.excelsior.xds.parser.nl_ru/fragment.properties b/product/com.excelsior.xds.parser.nl_ru/fragment.properties new file mode 100644 index 0000000..f03efa5 --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.parser Russian NLS Support diff --git a/product/com.excelsior.xds.parser.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.parser.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..48454bd --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.parser diff --git a/product/com.excelsior.xds.parser.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.parser.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..62a5dc9 --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.parser diff --git a/product/com.excelsior.xds.parser.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.parser.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..1919e3e --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS \ No newline at end of file diff --git a/product/com.excelsior.xds.parser.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.parser.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..86a976f --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ñèíòàêñè÷åñêèé àíàëèçàòîð ñèñòåìû XDS \ No newline at end of file diff --git a/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru.properties b/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru.properties new file mode 100644 index 0000000..ffef95d --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru.properties @@ -0,0 +1,110 @@ +IllegalCharacter=\u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b +IllegalNumber=\u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e +IdentifierExpected=\u043e\u0436\u0438\u0434\u0430\u043b\u0441\u044f \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 +ExpectedSymbol=\u043e\u0436\u0438\u0434\u0430\u043b\u0441\u044f \u0441\u0438\u043c\u0432\u043e\u043b "{0}" + +UndeclaredIdentifier=\u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 "{0}" +IdentifierAlreadyDefined=\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 "{0}" \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d \u0432 "{1}"[{2}:{3}] + +RecursiveImportDisabled=\u0440\u0435\u043a\u0443\u0440\u0441\u0438\u0432\u043d\u044b\u0439 \u0438\u043c\u043f\u043e\u0440\u0442 \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d +UnsatisfiedExportedObject=\u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 "{0}" + +IncompatibleTypes=\u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b +IdentifierDoesNotDenoteType=\u0438\u0434\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u043e\u0440 "{0}" \u043d\u0435 \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0442\u0438\u043f +ExpectedType=\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u0442\u0438\u043f +ExpectedOrdinalType=\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432\u044b\u0439 \u0442\u0438\u043f +IllegalOpenArrayTypeUsage=\u043d\u0435\u0437\u0430\u043a\u043e\u043d\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 + +ObjectIsNotArray=\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u043c\u0430\u0441\u0441\u0438\u0432 +ObjectIsNotRecord=\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u0437\u0430\u043f\u0438\u0441\u044c +ObjectIsNotPointer=\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c +ObjectIsNotVariable=\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f + +ObjectIsNotPointerOrRecord=\u043e\u0431\u044a\u0435\u043a\u0442 \u043d\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0438 \u043d\u0435 VAR-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0442\u0438\u043f\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 + +PointerNotBoundRecord=\u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043d\u0435 \u043d\u0430 \u0437\u0430\u043f\u0438\u0441\u044c +BaseTypeOfOpenArrayAggregateShuldBeSimple=\u0431\u0430\u0437\u043e\u0432\u044b\u0439 \u0442\u0438\u043f \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0442\u043e\u0440\u0430 \u043e\u0442\u043a\u0440\u044b\u0442\u043e\u0433\u043e \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u044b\u043c +OberonTypeIsRequired=\u043d\u0435 \u041e\u0431\u0435\u0440\u043e\u043d \u0442\u0438\u043f \u043d\u0435 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0432 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0445 \u0434\u043b\u044f \u041e\u0431\u0435\u0440\u043e\u043d-2 \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f\u0445 + +ExpectedStartOfFactor=\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043c\u043d\u043e\u0436\u0438\u0442\u0435\u043b\u044f +ExpectedDeclarationStart=\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f +ExpectedTypeStart=\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u0442\u0438\u043f\u0430 +ExpectedStartOfStatement=\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u043d\u0430\u0447\u0430\u043b\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 +ProcedureNotImplemented=\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 "{0}" \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u0430 + +NotAllowedInDefinitionModule=\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435 +AllowedOnlyInGlobalScope=\u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u043c \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 +UnsatisfiedForwardType=\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0438\u043f "{0}" \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d + +IllegalDeclarationOrder=\u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0439 +ExtensionNotAllowed=\u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430 \u043d\u0435 \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u043e: {0} + +ForwardTypeCannotBeOpaque=\u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0442\u0438\u043f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0441\u043a\u0440\u044b\u0442\u044b\u043c +ExpressionForFieldWasExpected=\u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044f "%s" + +TypeIsNotDefined=\u0442\u0438\u043f "{0}" \u0435\u0449\u0435 \u043d\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d +VariantFieldsNotAllowedInOberonRecord=\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0435 \u043f\u043e\u043b\u044f \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u044b \u0432 \u041e\u0431\u0435\u0440\u043e\u043d \u0437\u0430\u043f\u0438\u0441\u0438 +ExpressionOutOfBounds=\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c\u0438 +ReadOnlyDesignator=\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f +LowBoundGreaterThanHighBound=\u043d\u0438\u0436\u043d\u044f\u044f \u0433\u0440\u0430\u043d\u0438\u0446\u0430 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0435\u0440\u0445\u043d\u0435\u0439 \u0433\u0440\u0430\u043d\u0438\u0446\u044b + +ForLoopControlVariableMustBeLocal=\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f FOR-\u0446\u0438\u043a\u043b\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 +MoreExpressionsThanFieldsInRecord=\u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043f\u043e\u043b\u0435\u0439 \u0432 \u0442\u0438\u043f\u0435 \u0437\u0430\u043f\u0438\u0441\u044c + +InterruptProceduresNotImplemented=\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u043d\u0438\u0439 \u0435\u0449\u0435 \u043d\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u044b +NotAllowedInOberon=\u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u0432 \u044f\u0437\u044b\u043a\u0435 \u041e\u0431\u0435\u0440\u043e\u043d + +ForLoopControlVariableMustNotBeFormalParameter=\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f FOR-\u0446\u0438\u043a\u043b\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c +ForLoopControlVariableCannotBeExported=\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f FOR-\u0446\u0438\u043a\u043b\u0430 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 + +InvalidLanguageValue=\u043d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u044f\u0437\u044b\u043a\u0430 +InvalidParameterSpecificationExpectedNIL=\u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430: \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c NIL +ControlVariableCannotBeVolatile=\u0443\u043f\u0440\u0430\u0432\u043b\u044f\u044e\u0449\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c 'volatile' +LanguageIsNotValidForExternalProcedure=\u0434\u0430\u043d\u043d\u0430\u044f \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044f \u044f\u0437\u044b\u043a\u0430 \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u0434\u043b\u044f \u0432\u044b\u0437\u043e\u0432\u0430 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +DirectLanguageSpecification=(\u044f\u0432\u043d\u043e\u0435 \u0443\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u044f\u0437\u044b\u043a\u0430) + +IllegalConditionCompilation=\u043d\u0435\u0432\u0435\u0440\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 +InvalidPragmaSyntax=\u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b "<* .. *>" +IllegalConditionCompilationAtPosition=\u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u0430\u044f \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043a\u043e\u043c\u0430\u043d\u0434 \u0443\u0441\u043b\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 [{0}] + +ImplicitSystemCast=\u043d\u0435\u044f\u0432\u043d\u043e\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 SYSTEM.CAST + +CaseWithoutElsePart=CASE \u043a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u0431\u0435\u0437 \u0447\u0430\u0441\u0442\u0438 ELSE +UnknownOption=\u043e\u043f\u0446\u0438\u044f "{0}" \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 +OptionAlreadyDefined=\u043e\u043f\u0446\u0438\u044f "{0}" \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0430 +UnknownEquation=\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 "{0}" \u043d\u0435 \u043e\u043f\u0438\u0441\u0430\u043d +EquationAlreadyDefined=\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 "{0}" \u0443\u0436\u0435 \u043e\u043f\u0438\u0441\u0430\u043d +ModuleConstructorWillNotBeInvoked=\u0438\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u044f "{0}" \u0441 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0435\u0439 \u0432 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0435\u0437 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 + +StringExpected=\u043e\u0436\u0438\u0434\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0442\u0435\u0440\u0430\u043b + +UnresolvedModuleName=\u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c "{0}" +CannotFindDefinitionModule=\u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 "{0}" + +ArrayRecotdSimpleAgregate=(\u043c\u0430\u0441\u0441\u0438\u0432 \u0438\u043b\u0438 \u0437\u0430\u043f\u0438\u0441\u044c \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u043e\u0439 \u0442\u0438\u043f) +ObsoleteTypeCast=(\u0443\u0441\u0442\u0430\u0440\u0435\u0432\u0448\u0435\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0442\u0438\u043f\u0430) +ReadOnlyTag=(\u043f\u0440\u0438\u0437\u043d\u0430\u043a "\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435") +SpecialKindsParameters=(\u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0434 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432) +ReadOnlyParameters=(\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 "\u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0430 \u0447\u0442\u0435\u043d\u0438\u0435") +UnusedParameters=(\u043d\u0435\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440) +ParameterValueByDefault=(\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e) +SeqParameter=(SEQ-\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440) +ArrayOfType=(\u0442\u0438\u043f ARRAY OF) +RenamingInImport=(\u043f\u0435\u0440\u0435\u0438\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0432 \u0441\u0435\u043a\u0446\u0438\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430) +ExponentiationOperator=(\u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u0432\u043e\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u0432 \u0441\u0442\u0435\u043f\u0435\u043d\u044c) +IsoPragmaSyntax=(ISO \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432) +UseOptionCppComments=, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043e\u043f\u0446\u0438\u044e CPPCOMMENTS +UseCppLineComments=, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 "//" \u0432\u043c\u0435\u0441\u0442\u043e "--" +UseCppBlockComments=, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 "/*" \u0432\u043c\u0435\u0441\u0442\u043e "*)" + +DefinitionModuleOption=\u043e\u043f\u0446\u0438\u044f "{0}" \u0440\u0430\u0437\u0440\u0435\u0448\u0435\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0432 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +KeywordDisabledByK26Option=\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 "{0}" \u0437\u0430\u043f\u0440\u0435\u0449\u0435\u043d\u043e \u043e\u043f\u0446\u0438\u0435\u0439 "K26" + +ImportFromObjectIllegal=\u0438\u043c\u043f\u043e\u0440\u0442 \u0438\u0437 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 "{0}" \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u0435\u043d + + +OutlineNodeText_ImportList=\u0441\u043f\u0438\u0441\u043e\u043a \u0438\u043c\u043f\u043e\u0440\u0442\u0430 +OutlineNodeText_VariantRecord=\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u0430\u044f \u0437\u0430\u043f\u0438\u0441\u044c +OutlineNodeText_Variant=\u0432\u0430\u0440\u0438\u0430\u043d\u0442 + +ImportCycleDetected=\u041c\u043e\u0434\u0443\u043b\u044c %s \u0443\u0447\u0430\u0441\u0442\u0432\u0443\u0435\u0442 \u0432 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0435 : %s \ No newline at end of file diff --git a/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru_1251.properties b/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru_1251.properties new file mode 100644 index 0000000..fdac850 --- /dev/null +++ b/product/com.excelsior.xds.parser.nl_ru/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages_ru_1251.properties @@ -0,0 +1,110 @@ +IllegalCharacter=íåäîïóñòèìûé ñèìâîë +IllegalNumber=íåâåðíîå ÷èñëî +IdentifierExpected=îæèäàëñÿ èäåíòèôèêàòîð +ExpectedSymbol=îæèäàëñÿ ñèìâîë "{0}" + +UndeclaredIdentifier=íå îïèñàííûé èäåíòèôèêàòîð "{0}" +IdentifierAlreadyDefined=èäåíòèôèêàòîð "{0}" óæå îïèñàí â "{1}"[{2}:{3}] + +RecursiveImportDisabled=ðåêóðñèâíûé èìïîðò çàïðåùåí +UnsatisfiedExportedObject=íå îïðåäåëåí ýêñïîðòèðóåìûé îáúåêò "{0}" + +IncompatibleTypes=íåñîâìåñòèìûå òèïû +IdentifierDoesNotDenoteType=èäåíòèôèêàòîð "{0}" íå îáîçíà÷àåò òèï +ExpectedType=îæèäàåòñÿ òèï +ExpectedOrdinalType=îæèäàåòñÿ ïîðÿäêîâûé òèï +IllegalOpenArrayTypeUsage=íåçàêîííîå èñïîëüçîâàíèå òèïà îòêðûòîãî ìàññèâà + +ObjectIsNotArray=îáúåêò íå ìàññèâ +ObjectIsNotRecord=îáúåêò íå çàïèñü +ObjectIsNotPointer=îáúåêò íå óêàçàòåëü +ObjectIsNotVariable=îáúåêò íå ïåðåìåííàÿ + +ObjectIsNotPointerOrRecord=îáúåêò íå óêàçàòåëü è íå VAR-ïàðàìåòð òèïà çàïèñè + +PointerNotBoundRecord=óêàçàòåëü íå íà çàïèñü +BaseTypeOfOpenArrayAggregateShuldBeSimple=áàçîâûé òèï êîíñòðóêòîðà îòêðûòîãî ìàññèâà äîëæåí áûòü ïðîñòûì +OberonTypeIsRequired=íå Îáåðîí òèï íå äîïóñòèì â ñïåöèôè÷íûõ äëÿ Îáåðîí-2 êîíñòðóêöèÿõ + +ExpectedStartOfFactor=îæèäàëîñü íà÷àëî ìíîæèòåëÿ +ExpectedDeclarationStart=îæèäàëîñü íà÷àëî îïèñàíèÿ +ExpectedTypeStart=îæèäàëîñü íà÷àëî òèïà +ExpectedStartOfStatement=îæèäàëîñü íà÷àëî îïåðàòîðà +ProcedureNotImplemented=ïðîöåäóðà "{0}" íå ðåàëèçîâàíà + +NotAllowedInDefinitionModule=çàïðåùåíî â îïðåäåëÿþùåì ìîäóëå +AllowedOnlyInGlobalScope=ðàçðåøåíî òîëüêî â ãëîáàëüíîì êîíòåêñòå +UnsatisfiedForwardType=ïðåäâàðèòåëüíî îáúÿâëåííûé òèï "{0}" íå îïðåäåëåí + +IllegalDeclarationOrder=íåäîïóñòèìûé ïîðÿäîê îáúÿâëåíèé +ExtensionNotAllowed=ðàñøèðåíèå ÿçûêà íå ðàçðåøåíî: {0} + +ForwardTypeCannotBeOpaque=ïðåäâàðèòåëüíî îïèñàííûé òèï íå ìîæåò áûòü ñêðûòûì +ExpressionForFieldWasExpected=îæèäàëîñü çíà÷åíèå ïîëÿ "%s" + +TypeIsNotDefined=òèï "{0}" åùå íå îïðåäåëåí +VariantFieldsNotAllowedInOberonRecord=âàðèàíòíûå ïîëÿ çàïðåùåíû â Îáåðîí çàïèñè +ExpressionOutOfBounds=âûðàæåíèå çà ãðàíèöàìè +ReadOnlyDesignator=ïåðåìåííàÿ òîëüêî äëÿ ÷òåíèÿ +LowBoundGreaterThanHighBound=íèæíÿÿ ãðàíèöà äèàïàçîíà áîëüøå âåðõíåé ãðàíèöû + +ForLoopControlVariableMustBeLocal=ïåðåìåííàÿ FOR-öèêëà äîëæíà áûòü ëîêàëüíîé +MoreExpressionsThanFieldsInRecord=âûðàæåíèé áîëüøå, ÷åì ïîëåé â òèïå çàïèñü + +InterruptProceduresNotImplemented=ïðîöåäóðû ïðåðûâàíèé åùå íå ðåàëèçîâàíû +NotAllowedInOberon=çàïðåùåíî â ÿçûêå Îáåðîí + +ForLoopControlVariableMustNotBeFormalParameter=ïåðåìåííàÿ FOR-öèêëà íå ìîæåò áûòü ôîðìàëüíûì ïàðàìåòðîì +ForLoopControlVariableCannotBeExported=ïåðåìåííàÿ FOR-öèêëà íå ìîæåò áûòü ýêñïîðòèðîâàíà + +InvalidLanguageValue=íåâåðíàÿ ñïåöèôèêàöèÿ ÿçûêà +InvalidParameterSpecificationExpectedNIL=íåâåðíûé ñïåöèàëüíûé âèä ïàðàìåòðà: îæèäàëîñü NIL +ControlVariableCannotBeVolatile=óïðàâëÿþùàÿ ïåðåìåííàÿ íå ìîæåò áûòü 'volatile' +LanguageIsNotValidForExternalProcedure=äàííàÿ ñïåöèôèêàöèÿ ÿçûêà íå ïðèìåíèìà äëÿ âûçîâà âíåøíèõ ïðîöåäóð +DirectLanguageSpecification=(ÿâíîå óêàçàíèå ÿçûêà) + +IllegalConditionCompilation=íåâåðíàÿ ñòðóêòóðà êîìàíä óñëîâíîé êîìïèëÿöèè +InvalidPragmaSyntax=íåâåðíûé ñèíòàêñèñ äèðåêòèâû "<* .. *>" +IllegalConditionCompilationAtPosition=íåêîððåêòíàÿ ñòðóêòóðà êîìàíä óñëîâíîé êîìïèëÿöèè íà÷èíàåòñÿ â [{0}] + +ImplicitSystemCast=íåÿâíîå èñïîëüçîâàíèå SYSTEM.CAST + +CaseWithoutElsePart=CASE êîíñòðóêöèÿ áåç ÷àñòè ELSE +UnknownOption=îïöèÿ "{0}" íå îïèñàíà +OptionAlreadyDefined=îïöèÿ "{0}" óæå îïèñàíà +UnknownEquation=ïàðàìåòð "{0}" íå îïèñàí +EquationAlreadyDefined=ïàðàìåòð "{0}" óæå îïèñàí +ModuleConstructorWillNotBeInvoked=èìïîðò ìîäóëÿ "{0}" ñ èíèöèàëèçàöèåé â ìîäóëü áåç èíèöèàëèçàöèè + +StringExpected=îæèäàåòñÿ ëèòåðàë + +UnresolvedModuleName=íå íàéäåí ìîäóëü "{0}" +CannotFindDefinitionModule=íå íàéäåí ìîäóëü îïðåäåëåíèé "{0}" + +ArrayRecotdSimpleAgregate=(ìàññèâ èëè çàïèñü èëè ïðîñòîé ñîñòàâíîé òèï) +ObsoleteTypeCast=(óñòàðåâøåå ïðåîáðàçîâàíèå òèïà) +ReadOnlyTag=(ïðèçíàê "òîëüêî íà ÷òåíèå") +SpecialKindsParameters=(ñïåöèàëüíûé âèä ïàðàìåòðîâ) +ReadOnlyParameters=(ïàðàìåòð "òîëüêî íà ÷òåíèå") +UnusedParameters=(íåèñïîëüçóåìûé ïàðàìåòð) +ParameterValueByDefault=(çíà÷åíèå ïàðàìåòðà ïî óìîë÷àíèþ) +SeqParameter=(SEQ-ïàðàìåòð) +ArrayOfType=(òèï ARRAY OF) +RenamingInImport=(ïåðåèìåíîâàíèå â ñåêöèè èìïîðòà) +ExponentiationOperator=(îïåðàòîð âîçâåäåíèÿ â ñòåïåíü) +IsoPragmaSyntax=(ISO ñèíòàêñèñ äèðåêòèâ) +UseOptionCppComments=, èñïîëüçóéòå îïöèþ CPPCOMMENTS +UseCppLineComments=, èñïîëüçóéòå "//" âìåñòî "--" +UseCppBlockComments=, èñïîëüçóéòå "/*" âìåñòî "*)" + +DefinitionModuleOption=îïöèÿ "{0}" ðàçðåøåíà òîëüêî â ìîäóëÿõ îïðåäåëåíèé +KeywordDisabledByK26Option=èñïîëüçîâàíèå êëþ÷åâîãî ñëîâà "{0}" çàïðåùåíî îïöèåé "K26" + +ImportFromObjectIllegal=èìïîðò èç îáúåêòà "{0}" íåâîçìîæåí + + +OutlineNodeText_ImportList=ñïèñîê èìïîðòà +OutlineNodeText_VariantRecord=âàðèàíòíàÿ çàïèñü +OutlineNodeText_Variant=âàðèàíò + +ImportCycleDetected=Ìîäóëü %s ó÷àñòâóåò â öèêëè÷åñêîì èìïîðòå : %s \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/.classpath b/product/com.excelsior.xds.parser/.classpath new file mode 100644 index 0000000..6e16b23 --- /dev/null +++ b/product/com.excelsior.xds.parser/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.parser/.project b/product/com.excelsior.xds.parser/.project new file mode 100644 index 0000000..3f50945 --- /dev/null +++ b/product/com.excelsior.xds.parser/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.parser + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.parser/META-INF/MANIFEST.MF b/product/com.excelsior.xds.parser/META-INF/MANIFEST.MF new file mode 100644 index 0000000..e9a0b65 --- /dev/null +++ b/product/com.excelsior.xds.parser/META-INF/MANIFEST.MF @@ -0,0 +1,41 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.parser;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.parser.XdsParserPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.core.runtime, + org.apache.commons.io, + org.apache.commons.collections, + org.apache.commons.lang, + com.google.guava, + org.eclipse.core.filesystem +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.parser.commons, + com.excelsior.xds.parser.commons.ast, + com.excelsior.xds.parser.commons.pst, + com.excelsior.xds.parser.commons.symbol, + com.excelsior.xds.parser.editor.model, + com.excelsior.xds.parser.indents, + com.excelsior.xds.parser.modula, + com.excelsior.xds.parser.modula.ast, + com.excelsior.xds.parser.modula.ast.constants, + com.excelsior.xds.parser.modula.ast.imports, + com.excelsior.xds.parser.modula.ast.modules, + com.excelsior.xds.parser.modula.ast.procedures, + com.excelsior.xds.parser.modula.ast.tokens, + com.excelsior.xds.parser.modula.ast.types, + com.excelsior.xds.parser.modula.ast.variables, + com.excelsior.xds.parser.modula.scanner.jflex, + com.excelsior.xds.parser.modula.symbol, + com.excelsior.xds.parser.modula.symbol.binding, + com.excelsior.xds.parser.modula.symbol.reference, + com.excelsior.xds.parser.modula.symbol.type, + com.excelsior.xds.parser.modula.type, + com.excelsior.xds.parser.modula.utils +Import-Package: org.eclipse.core.resources, + org.eclipse.jface.text diff --git a/product/com.excelsior.xds.parser/build.properties b/product/com.excelsior.xds.parser/build.properties new file mode 100644 index 0000000..aa1a008 --- /dev/null +++ b/product/com.excelsior.xds.parser/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties diff --git a/product/com.excelsior.xds.parser/plugin.properties b/product/com.excelsior.xds.parser/plugin.properties new file mode 100644 index 0000000..1c4c84a --- /dev/null +++ b/product/com.excelsior.xds.parser/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Parser diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/XdsParserPlugin.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/XdsParserPlugin.java new file mode 100644 index 0000000..4a40811 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/XdsParserPlugin.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.parser; + +import org.eclipse.core.runtime.Plugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class XdsParserPlugin extends Plugin { + + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "com.excelsior.xds.parser"; //$NON-NLS-1$ + + // The shared instance + private static XdsParserPlugin plugin; + + /** + * The constructor + */ + public XdsParserPlugin() { + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static XdsParserPlugin getDefault() { + return plugin; + } + + /* + * (non-Javadoc) + * @see org.eclipse.core.runtime.Plugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.core.runtime.Plugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ConsoleParseEventReporter.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ConsoleParseEventReporter.java new file mode 100644 index 0000000..8d06c15 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ConsoleParseEventReporter.java @@ -0,0 +1,135 @@ +package com.excelsior.xds.parser.commons; + +import java.io.PrintStream; +import java.text.MessageFormat; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + + +public class ConsoleParseEventReporter implements IParserEventListener +{ + protected int errorCount; + protected int warningCount; + protected int fatalErrorCount; + + public ConsoleParseEventReporter() { + errorCount = 0; + warningCount = 0; + fatalErrorCount = 0; + } + + public int getErrorCount() { + return errorCount; + } + + public int getWarningCount() { + return warningCount; + } + + public int getFatalErrorCount() { + return fatalErrorCount; + } + + /** + * {@inheritDoc} + */ + @Override + public void endFileParsing(IFileStore file) { + if (file != null) { + printAbsolutePath(System.out, file); + } + System.out.println( "-- Total errors: " + errorCount + " warnings: " + warningCount); + } + + + /** + * {@inheritDoc} + */ + @Override + public void taskTag( IFileStore file, TextPosition position, int endOffset + , TodoTask task, String message ) + { + if (file != null) { + printAbsolutePath(System.out, file); + } + System.out.println( "-- [" + NullParseEventReporter.positionToString(position) + ".." + endOffset //$NON-NLS-1$ //$NON-NLS-2$ + + " Todo Task] " + message + ); + } + + + /** + * {@inheritDoc} + */ + @Override + public void warning(IFileStore file, CharSequence chars, TextPosition position, int length, String message, Object... arguments) { + warningCount++; + if (file != null) { + printAbsolutePath(System.out, file); + } + System.out.println( "-- [" + NullParseEventReporter.positionToString(position) + " Warning] " + + MessageFormat.format(message, arguments) + ); + } + + private static void printAbsolutePath(PrintStream stream, IFileStore file) { + if (file != null) { + try { + stream.println( "-- [" + ResourceUtils.getAbsolutePath(file) + "]"); + } catch (CoreException e) { + e.printStackTrace(); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public void error(IFileStore file, CharSequence chars, TextPosition position, int length, String message, Object... arguments) { + errorCount++; + if (file != null) { + printAbsolutePath(System.err, file); + } + System.err.println( "-- [" + NullParseEventReporter.positionToString(position) + " Error] " + + MessageFormat.format(message, arguments) + ); + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message, Throwable exception) { + fatalErrorCount++; + if (file != null) { + printAbsolutePath(System.out, file); + } + System.out.println( "-- [ Fatal Error] " + message); + if (exception != null) { + exception.printStackTrace(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message) { + logInternalError(file, message, null); + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, Throwable exception) { + logInternalError(file, exception.getMessage(), exception); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/IParserEventListener.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/IParserEventListener.java new file mode 100644 index 0000000..c679e96 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/IParserEventListener.java @@ -0,0 +1,78 @@ +package com.excelsior.xds.parser.commons; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.text.TextPosition; + +/** + * Interface of an object listening to parser events such as errors, warnings etc. + * + * @author lsa80, lion + */ +public interface IParserEventListener extends ITodoTaskListener +{ + /** + * Notifies that parsing of some file are finished. + * + * @param file, a source file which has been parsed. + * @throws CoreException + */ + public void endFileParsing(IFileStore sourceFile); + + + /** + * Notifies that the warning in the given position has been discovered. + * + * @param file, a source file in which the warning takes place or null + * @param position position of the warning + * @param length length of invalid area + * @param message text of the warning message + * @param arguments arguments of the given warning message + * @throws CoreException + */ + public void warning( IFileStore sourceFile, CharSequence chars + , TextPosition position, int length + , String message, Object... arguments ); + + /** + * Notifies that the error in the given position has been discovered. + * + * @param file, a source file in which the error takes place or null + * @param position position of the error + * @param length length of invalid area + * @param message text of the error message + * @param arguments arguments of the given error message + * @throws CoreException + */ + public void error( IFileStore sourceFile, CharSequence chars + , TextPosition position, int length + , String message, Object... arguments ); + + + /** + * Log the specified internal error of parser and scanner. + * + * @param file, a source file in which the internal error takes place or null + * @param message, a human-readable message, localized to the current locale. + * @param exception, a low-level exception, or null if not applicable. + */ + public void logInternalError(IFileStore sourceFile, String message, Throwable exception); + + /** + * Log the specified internal error of parser and scanner. + * + * @param file, a source file in which the internal error takes place or null + * @param message, a human-readable message, localized to the current locale. + */ + public void logInternalError(IFileStore sourceFile, String message); + + /** + * Log the specified internal error of parser and scanner. + * + * @param file, a source file in which the internal error takes place or null + * @param exception, a low-level exception. + */ + public void logInternalError(IFileStore sourceFile, Throwable exception); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ITodoTaskListener.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ITodoTaskListener.java new file mode 100644 index 0000000..8f9911e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ITodoTaskListener.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.parser.commons; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + +/** + * Interface of an object listening to "to do" task entries in a source code. + * + * @author lion + */ +public interface ITodoTaskListener +{ + /** + * Notifies that the "to do" task in the given position has been discovered. + * + * @param file a source file in which the task takes place or null + * @param position a start position of the task + * @param endOffset a end offset of the task + * @param task instance of discovered task. + * @param message text of the task + */ + public void taskTag( IFileStore file, TextPosition position, int endOffset + , TodoTask task, String message ); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/MarkerCollectorParserEventListener.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/MarkerCollectorParserEventListener.java new file mode 100644 index 0000000..a8b9b28 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/MarkerCollectorParserEventListener.java @@ -0,0 +1,120 @@ +package com.excelsior.xds.parser.commons; + +import java.text.MessageFormat; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.FileMarkerInfo; +import com.excelsior.xds.core.marker.MarkerInfo; +import com.excelsior.xds.core.marker.XdsMarkerConstants; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + +/** + * Accumulates information during the parsing phase related to markers that are to be created. + * @author lsa80 + */ +public class MarkerCollectorParserEventListener implements IParserEventListener { + private final IProject iproject; + private final Map fileToMarkerInfo = new ConcurrentHashMap(); + + public MarkerCollectorParserEventListener(IProject iproject) { + this.iproject = iproject; + } + + public Map getFileToMarkerInfo() { + return fileToMarkerInfo; + } + + @Override + public void taskTag(IFileStore file, TextPosition position, int endOffset, + TodoTask task, String message) { + } + + @Override + public void endFileParsing(IFileStore file) { + getFileMarkerInfo(file); // make sure FileMarkerInfo structure is initialized, + // it is nesecarry to represent situation for the file with no errors + } + + @Override + public void warning(IFileStore file, CharSequence chars, TextPosition position, + int length, String message, Object... arguments) { + addMarkerInfo(false, file, chars, position, length, MessageFormat.format(message, arguments)); + } + + private void addMarkerInfo( boolean isError, IFileStore file, CharSequence chars + , TextPosition position, int length, String message ) + { + FileMarkerInfo fileMarkerInfo = getFileMarkerInfo(file); + if (fileMarkerInfo != null) { + MarkerInfo markerInfo = createMarkerInfo(fileMarkerInfo.getIFile(), isError, chars, position, length, message); + fileMarkerInfo.addParserMarker(markerInfo); + } + } + + @Override + public void error(IFileStore file, CharSequence chars, TextPosition position, + int length, String message, Object... arguments) { + addMarkerInfo(true, file, chars, position, length, MessageFormat.format(message, arguments)); + } + + @Override + public void logInternalError(IFileStore file, String message, Throwable exception) { + LogHelper.logError(message); + } + + @Override + public void logInternalError(IFileStore file, String message) { + LogHelper.logError(message); + } + + @Override + public void logInternalError(IFileStore file, Throwable exception) { + LogHelper.logError(exception); + } + + private FileMarkerInfo getFileMarkerInfo(IFileStore file) { + FileMarkerInfo fileMarkerInfo = fileToMarkerInfo.get(file); + if (fileMarkerInfo == null) { + IResource res; + res = ResourceUtils.getResource(iproject, file.toURI()); + if (!(res instanceof IFile)) { + return null; + } + fileMarkerInfo = new FileMarkerInfo((IFile)res); + fileToMarkerInfo.put(file, fileMarkerInfo); + } + return fileMarkerInfo; + } + + private MarkerInfo createMarkerInfo(IFile ifile, boolean isError, CharSequence chars, TextPosition position, int length, String message) { + + MarkerInfo markerInfo = new MarkerInfo(XdsMarkerConstants.PARSER_PROBLEM); + markerInfo.setAttribute(IMarker.MESSAGE, message); + + // support for source code problem markers not showed in the Problem View or Project Explorer + int markerSeverity = isError ? IMarker.SEVERITY_ERROR : IMarker.SEVERITY_WARNING; + boolean isInCompilationSet = CompilationSetManager.getInstance().isInCompilationSet(ifile); + markerInfo.setAttribute(IMarker.SEVERITY, isInCompilationSet ? markerSeverity : IMarker.SEVERITY_INFO); + markerInfo.setAttribute(XdsMarkerConstants.PARSER_PROBLEM_SEVERITY_ATTRIBUTE, markerSeverity); + + if (position != null) { + markerInfo.setAttribute(IMarker.LINE_NUMBER, position.getLine()); + int offset = position.getOffset(); + markerInfo.setAttribute(IMarker.CHAR_START, offset); + markerInfo.setAttribute(IMarker.CHAR_END, offset + length); + } + + return markerInfo; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/NullParseEventReporter.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/NullParseEventReporter.java new file mode 100644 index 0000000..6c55bc0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/NullParseEventReporter.java @@ -0,0 +1,99 @@ +package com.excelsior.xds.parser.commons; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + +/** + * A parser event listener to ignore all parser warnings, errors etc. + */ +public class NullParseEventReporter implements IParserEventListener +{ + /** + * Thread-safe singleton support. + */ + public static NullParseEventReporter getInstance() { + return NullParseWarningReporterHolder.INSTANCE; + } + + /** + * Returns a string representation of the token position. + * + * @param position token position + * @return a string representation of the token position. + */ + public static String positionToString(TextPosition position) { + if (position == null) { + return "0:0"; + } + else { + return "" + position.getLine() + ":" + position.getColumn(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void endFileParsing(IFileStore file) { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void taskTag( IFileStore file, TextPosition position, int endOffset + , TodoTask task, String message ) + { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void warning(IFileStore file, CharSequence chars, TextPosition position, int length, String message, Object... arguments) { + // do nothing + } + + /** + * {@inheritDoc} + */ + @Override + public void error(IFileStore file, CharSequence chars, TextPosition position, int lenght, String message, Object... arguments) { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message, Throwable exception) { + // do nothing + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message) { + // do nothing + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, Throwable exception) { + // do nothing + } + + private static class NullParseWarningReporterHolder { + static NullParseEventReporter INSTANCE = new NullParseEventReporter(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserCriticalErrorReporter.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserCriticalErrorReporter.java new file mode 100644 index 0000000..fe33fc7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserCriticalErrorReporter.java @@ -0,0 +1,101 @@ +package com.excelsior.xds.parser.commons; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + +/** + * A default parser warning listener implementation. + * This class cannot be used without OSGi running. + */ +public class ParserCriticalErrorReporter implements IParserEventListener +{ + /** + * Thread-safe singleton support. + */ + public static ParserCriticalErrorReporter getInstance(){ + return InternalErrorParseReporterHolder.INSTANCE; + } + + + /** + * {@inheritDoc} + */ + @Override + public void endFileParsing(IFileStore file) { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void taskTag( IFileStore file, TextPosition position, int endOffset + , TodoTask task, String message ) + { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void warning(IFileStore file, CharSequence chars, TextPosition position, int length, String message, Object... arguments) { + // do nothing + } + + /** + * {@inheritDoc} + */ + @Override + public void error(IFileStore file, CharSequence chars, TextPosition position, int length, String message, Object... arguments) { + // do nothing + } + + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message, Throwable exception) { + LogHelper.logError(getLogMessage(file, message), exception); + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, String message) { + LogHelper.logError(getLogMessage(file, message)); + } + + /** + * {@inheritDoc} + */ + @Override + public void logInternalError(IFileStore file, Throwable exception) { + LogHelper.logError(getLogMessage(file, "")); + } + + + private static String getLogMessage(IFileStore file, String message) { + if (file != null) { + try { + message = "[" + ResourceUtils.getAbsolutePath(file) + "] " + message; + } catch (CoreException e) { + LogHelper.logError(e); + } + } + return message; + } + + private static class InternalErrorParseReporterHolder{ + static ParserCriticalErrorReporter INSTANCE = new ParserCriticalErrorReporter(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserEventListenerAdapter.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserEventListenerAdapter.java new file mode 100644 index 0000000..343fce9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ParserEventListenerAdapter.java @@ -0,0 +1,40 @@ +package com.excelsior.xds.parser.commons; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; + +public class ParserEventListenerAdapter implements IParserEventListener { + + @Override + public void taskTag(IFileStore file, TextPosition position, int endOffset, + TodoTask task, String message) { + } + + @Override + public void endFileParsing(IFileStore file) { + } + + @Override + public void warning(IFileStore file, CharSequence chars, TextPosition position, + int length, String message, Object... arguments) { + } + + @Override + public void error(IFileStore file, CharSequence chars, TextPosition position, + int length, String message, Object... arguments) { + } + + @Override + public void logInternalError(IFileStore file, String message, Throwable exception) { + } + + @Override + public void logInternalError(IFileStore file, String message) { + } + + @Override + public void logInternalError(IFileStore file, Throwable exception) { + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/TodoTaskParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/TodoTaskParser.java new file mode 100644 index 0000000..17a5dc9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/TodoTaskParser.java @@ -0,0 +1,344 @@ +package com.excelsior.xds.parser.commons; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.todotask.TodoTask; +import com.excelsior.xds.core.todotask.TodoTaskManager; + +public class TodoTaskParser +{ + public static final TaskEntry[] EMPTY_TASKENTRY_ARRAY = new TaskEntry[0]; + + private final boolean isTaskCaseSensitive; + private final TodoTask[] tasks; + + + /** + * Creates a instance of "to do" task parser. + */ + public TodoTaskParser() { + isTaskCaseSensitive = TodoTaskManager.getInstance().isCaseSensitive(); + tasks = getOrderedTasks(TodoTaskManager.getInstance().getAllTasks()); + } + + + /** + * Parses comment and notifies the listener to "to do" task entries. + * + * @param file, a source file in which the comment located + * @param comment, a text of the comment with comment's opening and closing symbols + * @param commentPosition, a start position of the comment + * @param listener, an object listening to "to do" task entries + */ + public void parse( IFileStore file, CharSequence comment, TextPosition commentPosition + , ITodoTaskListener listener ) + { + TaskEntry[] taskEntries = parse(file, comment, commentPosition); + for (TaskEntry entry : taskEntries) { + listener.taskTag( + entry.getFile(), entry.getPosition(), entry.getEndOffset(), + entry.getTask(), entry.getMessage() + ); + } + } + + + /** + * Parses comment and finds "to do" task entries. + * + * @param file, a source file in which the comment located + * @param comment, a text of the comment with comment's opening and closing symbols + * @param commentPosition, a start position of the comment + * + * @return an array containing the detected "to do" task entries. + */ + public TaskEntry[] parse(IFileStore file, CharSequence comment, TextPosition commentPosition) + { + List commentEntries = new ArrayList(); + parse(file, comment, commentPosition, commentEntries); + if (commentEntries.isEmpty()) { + return EMPTY_TASKENTRY_ARRAY; + } + return commentEntries.toArray(new TaskEntry[commentEntries.size()]); + } + + + /** + * Parses comment and adds founded "to do" task entries to the list. + * + * @param file, a source file in which the comment located + * @param comment, a text of the comment with comment's opening and closing symbols + * @param commentPosition, a start position of the comment + * @param taskEntries, a storage to add the found "to do" task entries + */ + public void parse( IFileStore sourceFile, CharSequence comment, TextPosition commentPosition + , List taskEntries ) + { + int foundTaskIndex = taskEntries.size(); + findTaskEntries(sourceFile, comment, commentPosition, taskEntries); + if (foundTaskIndex < taskEntries.size()) { + retrieveTaskMessages(comment, commentPosition, taskEntries, foundTaskIndex); + } + } + + + private void retrieveTaskMessages( CharSequence comment, TextPosition commentPosition + , List taskEntries, int foundTaskIndex ) + { + boolean containsEmptyTask = false; + int commentLength = comment.length(); + + for (int i = foundTaskIndex; i < taskEntries.size(); i++) { + TaskEntry entry = taskEntries.get(i); + + // Retrieve message start and end positions + int msgStart = entry.position.getOffset() - commentPosition.getOffset() + entry.task.tag.length(); + int maxValue = i + 1 < taskEntries.size() + ? taskEntries.get(i + 1).position.getOffset() - commentPosition.getOffset() + : commentLength; + // At most beginning of next task + if (maxValue < msgStart) { + maxValue = msgStart; // Would only occur if tag is before EOF. + } + + int msgEnd = -1; + char c; + for (int j = msgStart; j < maxValue; j++) { + c = comment.charAt(j); + if (c == '\n' || c == '\r') { + msgEnd = j; + break; + } + } + if (msgEnd == -1) { + for (int j = maxValue; --j >= msgStart;) { + if ((c = comment.charAt(j)) == '*') { + msgEnd = j; + break; + } + } + if (msgEnd == -1) { + msgEnd = maxValue; + } + } + + // Trim the message + while (msgStart < msgEnd && Character.isWhitespace(comment.charAt(msgEnd - 1))) { + msgEnd--; + } + while ( msgStart < msgEnd + && ( Character.isWhitespace(comment.charAt(msgStart)) + || comment.charAt(msgStart) == ':' + ) + ) + { + msgStart++; + } + + if (msgStart == msgEnd) { + // If the description is empty, we might want to see if two tags + // are not sharing the same message. + containsEmptyTask = true; + continue; + } + + // Get the message source + entry.setMessage( comment.subSequence(msgStart, msgEnd).toString() + , commentPosition.getOffset() + msgEnd ); + } + + if (containsEmptyTask) { + processEmptyTasks(taskEntries, foundTaskIndex); + } + } + + + private void processEmptyTasks(List taskEntries, int foundTaskIndex) + { + for (int i = foundTaskIndex; i < taskEntries.size(); i++) { + TaskEntry entry1 = taskEntries.get(i); + if (entry1.message.length() == 0) { + for (int j = i + 1; j < taskEntries.size(); j++) { + TaskEntry entry2 = taskEntries.get(j); + if (entry2.message.length() != 0) { + entry1.setMessage(entry2.message, entry2.endOffset); + break; + } + + } + } + } + } + + private void findTaskEntries( IFileStore file, CharSequence comment + , TextPosition commentPosition + , List taskEntries ) + { + int commentLength = comment.length(); + + char previous = comment.charAt(0); // the character at zero index is a comment start marker + int column = commentPosition.getColumn(); + int line = commentPosition.getLine(); + + for (int i = 1; i < commentLength; i++) { + if (comment.charAt(i) == '\n') { + line++; + column = 1; + } + else { + column++; + } + nextTag: + for (TodoTask task : tasks) { + int tagLength = task.tag.length(); + + if (tagLength == 0 || i + tagLength > commentLength) + continue nextTag; + + // Ensure tag is not leaded by a letter if the tag starts with a letter. + if (isIdentifierStart(task.tag.charAt(0)) && isIdentifierPart(previous)) { + continue nextTag; + } + + for (int t = 0; t < tagLength; t++) { + int x = i + t; + if (x >= commentLength) + continue nextTag; + + char sc = comment.charAt(x); + char tc = task.tag.charAt(t); + if (sc != tc) { // case sensitive check + if (isTaskCaseSensitive || Character.toLowerCase(sc) != Character.toLowerCase(tc)) { // case insensitive check + continue nextTag; + } + } + } + + // Ensure tag is not followed by a letter if the tag ends with a letter. + if ( (i + tagLength < commentLength) + && isIdentifierPart(comment.charAt(i + tagLength - 1)) + && isIdentifierPart(comment.charAt(i + tagLength)) ) + { + continue nextTag; + } + + TextPosition position = new TextPosition( + line, column, commentPosition.getOffset() + i + ); + TaskEntry entry = new TaskEntry(file, position, task); + taskEntries.add(entry); + + i += tagLength - 1; // Will be incremented when looping + column += tagLength - 1; // Will be incremented when looping + break nextTag; + } + previous = comment.charAt(i); + } + } + + + /** + * Returns given tasks in the checking order that gives preference to + * the longest matching tag. + * + * @param tasks an array of tasks + * @return an array of ordered tasks + */ + private TodoTask[] getOrderedTasks(TodoTask[] tasks) { + if (tasks == null) { + return new TodoTask[0]; + } + + TodoTask[] orderedTasks = Arrays.copyOf(tasks, tasks.length); + + // Sort order array in reverse order of tag lengths. + // Shell sort algorithm from http://en.wikipedia.org/wiki/Shell_sort + for (int inc = orderedTasks.length / 2; inc > 0; inc /= 2) { + for (int i = inc; i < orderedTasks.length; i++) { + for ( int j = i + ; j >= inc && orderedTasks[j - inc].tag.length() < orderedTasks[j].tag.length() + ; j -= inc ) + { + TodoTask temp = orderedTasks[j]; + orderedTasks[j] = orderedTasks[j - inc]; + orderedTasks[j - inc] = temp; + } + } + } + return orderedTasks; + } + + + private static boolean isIdentifierStart(char c) { + return Character.isLetter(c) || c == '_'; + } + + private static boolean isIdentifierPart(char c) { + return Character.isLetterOrDigit(c) || c == '_'; + } + + + public static class TaskEntry + { + private final IFileStore file; + private final TextPosition position; + private final TodoTask task; + private String message; + private int endOffset; + + TaskEntry(IFileStore file, TextPosition position, TodoTask task) { + this.file = file; + this.position = position; + this.task = task; + this.message = ""; //$NON-NLS-1$ + this.endOffset = position.getOffset() + task.tag.length(); + } + + public IFileStore getFile() { + return file; + } + + /** + * Returns the start position of the task. + * + * @return start position of the task + */ + public TextPosition getPosition() { + return position; + } + + public TodoTask getTask() { + return task; + } + + /** + * Returns the message of the task + * + * @return message of the task + */ + public String getMessage() { + return message; + } + + /** + * Returns the end offset of the task + * + * @return end offset of the task + */ + public int getEndOffset() { + return endOffset; + } + + private void setMessage(String message, int endOffset) { + this.message = message; + this.endOffset = endOffset; + } + + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/Ast.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/Ast.java new file mode 100644 index 0000000..642b12b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/Ast.java @@ -0,0 +1,100 @@ +package com.excelsior.xds.parser.commons.ast; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.time.ModificationStamp; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstVisitor; + +/** + * A root element of the AST + */ +public class Ast extends PstCompositeNode { + + /** Buffer containing the text of this AST */ + private CharSequence chars; + + /** The source code file for which this AST is created */ + private IFileStore sourceFile; + + /** Modification stamp of AST creation */ + private final ModificationStamp modificationStamp = new ModificationStamp(); + + + public Ast(CharSequence chars, IFileStore sourceFile) { + super(ElementTypes.AST_ROOT); + this.chars = chars; + this.sourceFile = sourceFile; + } + + /** + * Returns creation modification stamp of this AST. + * + * @return creation modification stamp of this AST. + */ + public ModificationStamp getModificationStamp() { + return modificationStamp; + } + + /** + * Returns char sequence which is corresponding to the source file of this AST. + * File read operation may be invoked. + * + * @return char sequence which is corresponding to the source file of this AST + * @throws CoreException + */ + public CharSequence getChars() { + if (chars == null && sourceFile != null) { + try { + chars = ResourceUtils.toString(sourceFile); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + return chars; + } + + public IFileStore getSourceFile() { + return sourceFile; + } + + public AstNode getAstNode() { + return (AstNode) getChildren().get(0); + } + + /** + * Accepts the given visitor on a visit of the AST root node. + * + * @param visitor the visitor object + * @exception IllegalArgumentException if the visitor is null + */ + public void accept(AstVisitor visitor) { + AstNode node = getAstNode(); + if (node != null) { + node.doAccept(visitor); + } + } + + /** + * Minimizes the storage an AST instance (including its child items). + */ + public void trim() { + AstNode node = getAstNode(); + if (node != null) { + node.accept(new PstVisitor() { + public boolean visit(PstLeafNode node) { + return false; + } + + public void endVisit(PstCompositeNode node) { + node.trim(); + } + }); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstBuilder.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstBuilder.java new file mode 100644 index 0000000..4420351 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstBuilder.java @@ -0,0 +1,398 @@ +package com.excelsior.xds.parser.commons.ast; + +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.utils.IPredicate; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.core.utils.collections.ArrayListStack; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; + +/** + * Default implementation of the Abstract Syntax Tree (AST) builder. + */ +public class AstBuilder implements IAstBuilder +{ + private final ArrayListStack stack = new ArrayListStack(); + private final IPredicate whiteSpacePredicate; + private final IPredicate isTrailingWhiteSpaceAllowed; + + private PstCompositeNode production; + private PstLeafNode lastToken; + + /** Handler of parsing errors and warnings. */ + protected final IParserEventListener reporter; + + /** The source file to be parsed. */ + protected final IFileStore sourceFile; + + + public AstBuilder(IFileStore sourceFile, IParserEventListener reporter) { + this(sourceFile, reporter, WHITE_SPACE_PREDICATE, ALWAYS_TRUE_PREDICATE); + } + + public AstBuilder( IFileStore sourceFile + , IParserEventListener reporter + , IPredicate whiteSpacePredicate + , IPredicate isTrailingWhiteSpaceAllowed ) + { + this.sourceFile = sourceFile; + this.reporter = reporter; + this.whiteSpacePredicate = whiteSpacePredicate; + this.isTrailingWhiteSpaceAllowed = isTrailingWhiteSpaceAllowed; + } + + + /** + * {@inheritDoc} + */ + @Override + public void reset() { + production = null; + lastToken = null; + stack.clear(); + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode getAstRoot() { + if (stack.isEmpty()) { + return production; + } + else { + return stack.get(0); + } + } + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode getCurrentProduction() { + return production; + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getLastNode() { + if (lastToken != null) { + return lastToken; + } + else if (production.getChildren().isEmpty()) { + return production; + } + return production.getLastChild(); + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isCurrentProduction(ElementType elementType) { + return (production != null) + && (production.getElementType() == elementType); + } + + + /** + * Setups the given node as the current production. The previous current + * production is pushed on the stack. The second argument is assigned as + * a parent of the given node. + * All subsequent nodes will be added as children of the given node. + * + * @param node - the production to be setup as a current one + * @param parent - the node to be set as a parent of the given node + * + * @return AST node of the created production + */ + protected T beginProduction + (T node, PstCompositeNode parent) + { + if (production != null) { + production.addChild(node); + stack.push(production); + } + node.setParent(parent); + production = node; + return node; + } + + /** + * {@inheritDoc} + */ + @Override + public T beginProduction(T node) { + return beginProduction(node, production); + } + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode beginProduction(ElementType elementType) { + PstCompositeNode node = new PstCompositeNode(elementType); + return beginProduction(node); + } + + /** + * {@inheritDoc} + */ + @Override + public T beginProduction(CompositeType elementType) { + T node = elementType.createNode(); + beginProduction(node); + return node; + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode endProduction(IElementType elementType) { + if (elementType == null) { + logIncorrectEndProductionError(production, elementType); + return null; + } + else if ((production instanceof AstNode) && (production.getElementType() != elementType)) { + logIncorrectEndProductionError(production, elementType); + return null; + } + + PstCompositeNode finalizedProduction = production; + if (! stack.isEmpty()) { + PstCompositeNode parent = stack.pop(); + + List removedChildren = Collections.emptyList(); + if (!isTrailingWhiteSpaceAllowed.evaluate(production)) { + removedChildren = production.removeLastChildren(whiteSpacePredicate); + } + if (production.getChildren().isEmpty()) { + parent.removeLastChild(); + } + parent.addChildren(removedChildren); + + production = parent; + } + return finalizedProduction; + } + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode endProduction(PstCompositeNode node) { + return endProduction(node.getElementType()); + } + + + /** + * {@inheritDoc} + */ + @Override + public T endParentProduction(CompositeType elementType) { + if (stack.size() < 2) { + logIncorrectEndParentProductionError(production, elementType); + return null; + } + + PstCompositeNode currentProduction = production; + PstCompositeNode parentProduction = stack.peek(); + if (parentProduction.getElementType() != elementType) { + logIncorrectEndProductionError(production, elementType); + return null; + } + + production = stack.pop(); + production.removeLastChild(); + parentProduction = endProduction(elementType); + beginProduction(currentProduction); + + return JavaUtils.as(elementType.getNodeClass(), parentProduction); + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode changeProduction(PstCompositeNode node) { + for (PstNode child : production.getChildren()) { + node.addChild(child); + } + + if (!stack.isEmpty()) { + PstCompositeNode parent = stack.peek(); + parent.removeLastChild(); + parent.addChild(node); + } + + production = node; + return node; + } + + /** + * {@inheritDoc} + */ + @Override + public T changeProduction(CompositeType elementType) { + T node = elementType.createNode(); + changeProduction(node); + return node; + } + + + /** + * {@inheritDoc} + */ + @Override + public void dropProduction(IElementType elementType) { + if (production.getElementType() != elementType) { + logIncorrectDropProductionError(production, elementType); +// throw new IllegalArgumentException(String.format( +// "Unexpected element type %s: one should drop only the current production. Expected element type %s.", //$NON-NLS-1$ +// elementType, production.getElementType()) +// ); + } + + PstCompositeNode parent = stack.pop(); + parent.removeLastChild(); + parent.addChildren(production.getChildren()); + + production = parent; + } + + /** + * {@inheritDoc} + */ + @Override + public void dropProduction(PstCompositeNode node) { + dropProduction(node.getElementType()); + } + + + /** + * {@inheritDoc} + */ + @Override + public void addToken(TokenType token, int offset, int length) { + if (lastToken != null) { + production.addChild(lastToken); + } + lastToken = new PstLeafNode(null, token, offset, length); + } + + /** + * {@inheritDoc} + */ + @Override + public void acceptLastToken() { + if (lastToken != null) { + production.addChild(lastToken); + lastToken = null; + } + } + + + /** + * Log the incorrect end of the parent production error with specified message. + * + * @param elementType - the element type of the dropped production + * @param injuredProduction, a production with incorrect termination. + */ + private void logIncorrectEndParentProductionError( PstCompositeNode injuredProduction + , IElementType elementType ) + { + logIncorrectProductionError( + "Incorrect end of the parent of the AST production '%s' at %d by the '%s'.\nThere is no parent.", //$NON-NLS-1$ + injuredProduction, elementType + ); + } + + /** + * Log the incorrect end production error with specified message. + * + * @param elementType - the element type of the dropped production + * @param injuredProduction, a parent production with incorrect termination. + */ + private void logIncorrectEndProductionError( PstCompositeNode injuredProduction + , IElementType elementType ) + { + logIncorrectProductionError( + "Incorrect end of the AST production %s at %d by the '%s'.", //$NON-NLS-1$ + injuredProduction, elementType + ); + } + + + /** + * Log the incorrect drop production error with specified message. + * + * @param injuredProduction, a production with incorrect termination. + * @param elementType - the element type of the dropped production + */ + private void logIncorrectDropProductionError( PstCompositeNode injuredProduction + , IElementType elementType ) + { + logIncorrectProductionError( + "Incorrect drop of the AST production '%s' at %d by the '%s'.", //$NON-NLS-1$ + injuredProduction, elementType + ); + } + + /** + * Log the incorrect drop production error with specified message. + * + * @param injuredProduction, a production with incorrect termination. + * @param elementType - the element type of the dropped production + * @param message, a human-readable message. + */ + private void logIncorrectProductionError( String message + , PstCompositeNode injuredProduction + , IElementType elementType ) + { + int offset = -1; + String productionName = ""; + if (production != null) { + offset = production.getOffset(); + productionName = production.toString(); + } + String elementTypeName = ""; + if (elementType != null) { + elementTypeName = elementType.toString(); + } + message = String.format(message, productionName, offset, elementTypeName); + reporter.logInternalError(sourceFile, message); + } + + + static protected IPredicate WHITE_SPACE_PREDICATE = new IPredicate() + { + /** {@inheritDoc} */ + @Override + public boolean evaluate(PstNode node) { + return TokenTypes.WHITE_SPACE == node.getElementType(); + } + }; + + static protected IPredicate ALWAYS_TRUE_PREDICATE = new IPredicate() + { + /** {@inheritDoc} */ + @Override + public boolean evaluate(PstNode node) { + return true; + } + }; + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstNode.java new file mode 100644 index 0000000..baf3cc9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstNode.java @@ -0,0 +1,160 @@ +package com.excelsior.xds.parser.commons.ast; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.utils.IClosure; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; + +/** + * A node in the AST tree. + */ +public abstract class AstNode extends PstCompositeNode +{ + protected AstNode(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + /** + * Accepts the given visitor on a visit of the current node. + * + * @param visitor the visitor object + * @exception IllegalArgumentException if the visitor is null + */ + public final void accept(AstVisitor visitor) { + if (visitor == null) { + throw new IllegalArgumentException(); + } + // begin with the generic pre-visit + if (visitor.preVisit(this)) { + // dynamic dispatch to internal method for type-specific visit/endVisit + doAccept(visitor); + } + // end with the generic post-visit + visitor.postVisit(this); + } + + protected abstract void doAccept(AstVisitor visitor); + + + /** + * Accepts the given visitor on a visit of the current node. + *

+ * This method should be used by the concrete implementations of + * accept0 to traverse optional properties. Equivalent + * to child.accept(visitor) if child + * is not null. + *

+ * + * @param visitor the visitor object + * @param child the child AST node to dispatch too, or null + * if none + */ + protected final void acceptChild(AstVisitor visitor, AstNode child) { + if (child != null) { + child.accept(visitor); + } + } + + /** + * Accepts the given visitor on a visit of the given live list of + * child nodes. + *

+ * This method must be used by the concrete implementations of + * accept to traverse list-values properties; it + * encapsulates the proper handling of on-the-fly changes to the list. + *

+ * + * @param visitor the visitor object + * @param children the child AST node to dispatch too, or null + * if none + */ + protected final void acceptChildren( AstVisitor visitor + , List children ) + { + if (children != null) { + Iterator cursor = children.iterator(); + while (cursor.hasNext()) { + AstNode child = (AstNode) cursor.next(); + child.accept(visitor); + } + } + } + + protected static List findAstChildren( PstCompositeNode pstCompositeNode + , Class filterClass ) + { + final List astNodes = new ArrayList(); + + class CollectAstNodes implements IClosure { + @Override + public void execute(T node) { + astNodes.add(node); + } + + } + forEachChild(pstCompositeNode, filterClass, new CollectAstNodes()); + + return astNodes; + } + + protected static void visitAstChidren( PstCompositeNode pstCompositeNode + , Class filterClass + , final AstVisitor visitor ) + { + forEachChild(pstCompositeNode, filterClass, new IClosure() { + @Override + public void execute(T node) { + node.accept(visitor); + } + }); + } + + /** + * Bridge method to visit AstNode children of the PstNode using AstVisitor. + * TODO : remove when (and if) no more dumb PstCompositeNode`s left, used only as container for some AstNodes. + * @param pstCompositeNode + * @param filterClass + * @return + */ + protected static void forEachChild( + PstCompositeNode pstCompositeNode, Class filterClass, + IClosure operation) + { + if (pstCompositeNode != null) { + List pstChildren = pstCompositeNode.getChildren(); + for (PstNode pstNode : pstChildren) { + if (filterClass.isAssignableFrom(pstNode.getClass())) { + @SuppressWarnings("unchecked") + T astNode = (T)pstNode; + try { + operation.execute(astNode); + } catch (Exception e) { + //Should never get here + LogHelper.logError(e); + } + } + } + } + } + + + @SuppressWarnings("unchecked") + protected static T findAstFirtsChild( PstCompositeNode pstCompositeNode + , Class filterClass ) + { + if (pstCompositeNode != null) { + List pstChildren = pstCompositeNode.getChildren(); + for (PstNode pstNode : pstChildren) { + if (filterClass.isAssignableFrom(pstNode.getClass())) { + return (T)pstNode; + } + } + } + return null; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstVisitor.java new file mode 100644 index 0000000..48545af --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/AstVisitor.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.parser.commons.ast; + +public abstract class AstVisitor { + + /** + * Visits the given AST node prior to the type-specific visit (before visit). + *

+ *

+ * + * @param node the node to visit + * @return true if visit(node) should be called, + * and false otherwise. + */ + public boolean preVisit(AstNode node) { + return true; + } + + /** + * Visits the given AST node following the type-specific visit + * (after endVisit). + *

+ * The default implementation does nothing. + *

+ * + * @param node the node to visit + */ + public void postVisit(AstNode node) { + // default implementation: do nothing + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/CompositeType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/CompositeType.java new file mode 100644 index 0000000..8da3cde --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/CompositeType.java @@ -0,0 +1,54 @@ +package com.excelsior.xds.parser.commons.ast; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +/** + * Base class for node types in the AST tree. + */ +public class CompositeType extends ElementType { + + private final Constructor nodeConstructor; + private final Class nodeClass; + + public CompositeType(String debugName, Class nodeClass) { + super(debugName); + this.nodeClass = nodeClass; + nodeConstructor = getConstructor(nodeClass); + } + + public Class getNodeClass() { + return nodeClass; + } + + public T createNode() { + try { + return nodeConstructor.newInstance(this); + } catch (IllegalArgumentException e) { + LogHelper.logError(e); + } catch (InstantiationException e) { + LogHelper.logError(e); + } catch (IllegalAccessException e) { + LogHelper.logError(e); + } catch (InvocationTargetException e) { + LogHelper.logError(e); + } + return null; + } + + private Constructor getConstructor(Class nodeClass) { + try { + return nodeClass.getConstructor(ModulaCompositeType.class); + } catch (SecurityException e) { + LogHelper.logError(e); + } catch (NoSuchMethodException e) { + LogHelper.logError(e); + } + return null; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementType.java new file mode 100644 index 0000000..9602b9d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementType.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.commons.ast; + +/** + * Base class for token types returned from lexical analysis and for types + * of nodes in the AST tree. + */ +public class ElementType implements IElementType { + + private final String debugName; + + /** + * Creates a new element type. + * + * @param debugName the name of the element type, used for debugging purposes. + */ + public ElementType(String debugName) { + this.debugName = debugName; + } + + /** + * Returns a string representation of the element. + * + * @return a string representation of the element. + */ + @Override + public String toString() { + return debugName; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementTypes.java new file mode 100644 index 0000000..54e7078 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/ElementTypes.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.parser.commons.ast; + +public interface ElementTypes { + + ElementType AST_ROOT = new ElementType("AST_ROOT"); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstBuilder.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstBuilder.java new file mode 100644 index 0000000..8eba5f2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstBuilder.java @@ -0,0 +1,177 @@ +package com.excelsior.xds.parser.commons.ast; + +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; + +/** + * Abstract Syntax Tree (AST) builder + */ +public interface IAstBuilder +{ + /** + * Resets the mutable states of this builder. + * Resetting a builder discards all of its explicit state information. + */ + public void reset(); + + + /** + * Returns the root node of the AST. + * + * @return the root node of the AST. + */ + public PstCompositeNode getAstRoot(); + + /** + * Returns the current production. + * + * @return the current production. + */ + public PstCompositeNode getCurrentProduction(); + + /** + * Returns the last node added into the AST. + * + * @return the last added node. + */ + public PstNode getLastNode(); + + + + /** + * Check if the current production has the given element type. + * + * @param elementType + * + * @return true if the current production has the given element type, or + * false otherwise. + */ + public boolean isCurrentProduction(ElementType elementType); + + + + /** + * Setups the given node as the current production. The previous current + * production is pushed on the stack and becomes a parent of the given one. + * All subsequent nodes will be added as children of the given node. + * + * @param node - the production to be setup as a current one + * + * @return AST node of the created production + */ + public T beginProduction(T node); + + /** + * Creates new production based on the given element type and + * setups it as the current production. The previous current production + * is pushed on the stack and becomes a parent of the new one. + * All subsequent nodes will be added as children of the given node. + * + * @param elementType - the element type of the new production + * + * @return AST node of the created production + */ + public PstCompositeNode beginProduction(ElementType elementType); + + /** + * Creates new production based on the given composite element type and + * setups it as the current production. The previous current production + * is pushed on the stack and becomes a parent of the new one. + * All subsequent nodes will be added as children of the given node. + * + * @param elementType - the composite element type of the new production + * + * @return AST node which represents new production + */ + public T beginProduction(CompositeType elementType); + + + + /** + * Finalizes the current production, pops from the stack previous production + * and sets it as the current one. The finalized production must be equal + * to the passed as a argument. + * + * @param node - the production to be finalized + * + * @return AST node which represents the finalized production + */ + public PstCompositeNode endProduction(PstCompositeNode node); + + /** + * Finalizes the current production, pops from the stack previous production + * and sets it as the current one. The element type of finalized production + * must be equal to the passed as a argument. + * + * @param elementType - the element type to verify finalized production + * + * @return AST node which represents the finalized production + */ + public PstCompositeNode endProduction(IElementType elementType); + + /** + * Finalizes the current production, pops from the stack previous production + * and sets it as the current one. The element type of finalized production + * must be equal to the passed as a argument. + * + * @param elementType - the composite element type to verify finalized production + * + * @return AST node which represents the finalized production + */ + public T endParentProduction(CompositeType elementType); + + + + /** + * Changes the current production by replacing it with given one. + * All children of the current production become the children of the new one. + * + * @param node - the replacing production + */ + public PstCompositeNode changeProduction(PstCompositeNode node); + + /** + * Changes the current production by replacing it with new one corresponding + * to the composite element type. All children of the current production + * become the children of the new one. + * + * @param elementType - composite element type of the replacing production + */ + public T changeProduction(CompositeType elementType); + + + + /** + * Drops the current production from the tree. + * All children of the current production become the children of its parent. + * + * @param node - the production to be dropped + */ + public void dropProduction(PstCompositeNode node); + + /** + * Drops the current production from the tree. + * All children of the current production become the children of its parent. + * + * @param elementType - the element type of the dropped production + */ + public void dropProduction(IElementType elementType); + + + + /** + * Adds the given token to the AST + * + * @param token - the token to be added + * @param offset - offset of the token's text region + * @param length - the length of the token's text region + */ + public void addToken(TokenType token, int offset, int length); + + + /** + * Adds the last token, if it was cached, to the current production. + */ + public void acceptLastToken(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameChild.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameChild.java new file mode 100644 index 0000000..4c594ed --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameChild.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.commons.ast; + +/** + * Not all IAstFrameNode may be found in the tree as a parent of its children nodes + * (f.ex. - pragma if/elsif/end in some cases). In this case this interface may be used to + * link framed node to its IAstFrameNode + * + */ + +public interface IAstFrameChild { + + public IAstFrameNode getAstFrameNode(); + public void setAstFrameNode(IAstFrameNode frameNode); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameNode.java new file mode 100644 index 0000000..a4e8dfb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstFrameNode.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.parser.commons.ast; + +import java.util.Collection; + +import com.excelsior.xds.parser.commons.pst.PstNode; + +/** + * Frame of the AST node + */ +public interface IAstFrameNode +{ + /** + * Returns nodes which constitute the frame of this AST node. + * + * @return collection of PST nodes + */ + public Collection getFrameNodes(); + + + /** + * Adds node to the frame of this AST node. + * + * @param node + */ + public void addFrameNode(PstNode node); + + /** + * Returns name of the construction ('IF', 'PROCEDURE' etc.) + * @return + */ + public String getFrameName(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstNodeWithIdentifier.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstNodeWithIdentifier.java new file mode 100644 index 0000000..dbca4d4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IAstNodeWithIdentifier.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.parser.commons.ast; + +import com.excelsior.xds.parser.commons.pst.PstNode; + +public interface IAstNodeWithIdentifier { + public PstNode getIdentifier(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IElementType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IElementType.java new file mode 100644 index 0000000..2668cbc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/IElementType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.commons.ast; + +/** + * Tag interface for token types returned from lexical analysis and for types + * of nodes in the AST tree. + */ +public interface IElementType { + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/NullAstBuilder.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/NullAstBuilder.java new file mode 100644 index 0000000..d49af45 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/NullAstBuilder.java @@ -0,0 +1,166 @@ +package com.excelsior.xds.parser.commons.ast; + +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; + + +/** + * The Abstract Syntax Tree (AST) builder which omits AST building. + */ +public class NullAstBuilder implements IAstBuilder +{ + /** + * Thread-safe singleton support. + */ + public static NullAstBuilder getInstance() { + return NullAstBuilderHolder.INSTANCE; + } + + + private static class NullAstBuilderHolder { + static NullAstBuilder INSTANCE = new NullAstBuilder(); + } + + + /** + * {@inheritDoc} + */ + @Override + public void reset() { + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode getAstRoot() { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode getCurrentProduction() { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public PstNode getLastNode() { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isCurrentProduction(ElementType elementType) { + throw new UnsupportedOperationException("NullAstBuilder cannot check current production"); //$NON-NLS-1$ + } + + + /** + * {@inheritDoc} + */ + @Override + public T beginProduction(T node) { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode beginProduction(ElementType elementType) { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public T beginProduction(CompositeType elementType) { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode endProduction(PstCompositeNode node) { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode endProduction(IElementType elementType) { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public T endParentProduction(CompositeType elementType) { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public PstCompositeNode changeProduction(PstCompositeNode node) { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public T changeProduction(CompositeType elementType) { + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public void dropProduction(PstCompositeNode node) { + } + + /** + * {@inheritDoc} + */ + @Override + public void dropProduction(IElementType elementType) { + } + + + /** + * {@inheritDoc} + */ + @Override + public void addToken(TokenType token, int offset, int length) { + } + + + /** + * {@inheritDoc} + */ + @Override + public void acceptLastToken() { + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenType.java new file mode 100644 index 0000000..760a822 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenType.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.commons.ast; + + +/** + * The base class for standard scanner token types common to all languages. + */ +public class TokenType extends ElementType { + + private final String designator; + + /** + * Creates a new token type. + * + * @param debugName the name of the token type, used for debugging purposes. + * @param designator human readable representation of the token type. + */ + public TokenType(String debugName, String designator) { + super(debugName); + this.designator = designator; + } + + public String getDesignator() { + return designator; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenTypes.java new file mode 100644 index 0000000..6e4a9ba --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/ast/TokenTypes.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.parser.commons.ast; + +/** + * The standard scanner token types common to all languages. + */ +public interface TokenTypes { + + /** + * Token type for a character which is not valid in the position where it was encountered, + * according to the language grammar. + */ + TokenType BAD_CHARACTER = new TokenType("BAD_CHARACTER", "bad character"); //$NON-NLS-1$ + + /** + * Token type for a sequence of whitespace characters. + */ + TokenType WHITE_SPACE = new TokenType ("WHITE_SPACE", "whitespace character"); //$NON-NLS-1$ + + /** + * Standard token: End Of File. + */ + TokenType EOF = new TokenType ("EOF", "end of file"); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintPstVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintPstVisitor.java new file mode 100644 index 0000000..fc2d263 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintPstVisitor.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.parser.commons.pst; + +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; + +public class PrintPstVisitor extends PstVisitor implements ModulaTokenTypes { + + private int nestingLevel = 0; +// private CharSequence input; + + @Override + public boolean visit(PstLeafNode node) { + printIndent(); + printNode(node); + return super.visit(node); + } + + @Override + public boolean visit(PstCompositeNode node) { + printIndent(); + printNode(node); + nestingLevel++; + return super.visit(node); + } + + @Override + public void endVisit(PstCompositeNode node) { + nestingLevel--; + super.visit(node); + } + + private void printIndent() { + for (int i = 0; i < nestingLevel; i++) { + System.out.print(" "); + } + } + + private void printNode(PstNode node) { + System.out.println(node + " \toffs=" + node.getOffset() + " len=" + node.getLength()); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintSourcePstVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintSourcePstVisitor.java new file mode 100644 index 0000000..d6b59fe --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PrintSourcePstVisitor.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.commons.pst; + +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; + +public class PrintSourcePstVisitor extends PstVisitor implements ModulaTokenTypes { + + private CharSequence input; + + public PrintSourcePstVisitor(CharSequence input) { + this.input = input; + } + + @Override + public boolean visit(PstLeafNode node) { + CharSequence src = input.subSequence(node.getOffset(), node.getOffset() + node.getLength()); + System.out.print(src); + return super.visit(node); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstCompositeNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstCompositeNode.java new file mode 100644 index 0000000..c79eed8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstCompositeNode.java @@ -0,0 +1,279 @@ +package com.excelsior.xds.parser.commons.pst; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Set; + +import com.excelsior.xds.core.utils.IPredicate; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.core.utils.collections.ISearchDirector; +import com.excelsior.xds.parser.commons.ast.CompositeType; +import com.excelsior.xds.parser.commons.ast.IElementType; + +/** + * A composite node in the Program Structure Tree. + * This nodes match multiple-tokens fragments. + */ +public class PstCompositeNode extends PstNode +{ + private final List children; + + public PstCompositeNode(PstCompositeNode parent, IElementType elementType) { + super(parent, elementType); + this.children = new ArrayList(); + } + + public PstCompositeNode(IElementType elementType) { + this(null, elementType); + } + + /** + * Trims the capacity of child elements' list to be the current size. + * An application can use this operation to minimize the storage + * of a PstCompositeNode instance. + */ + public void trim() { + ((ArrayList) children).trimToSize(); + } + + /** + * {@inheritDoc} + */ + @Override + public int getOffset() { + if (!children.isEmpty()) { + return children.get(0).getOffset(); + } + return UNKNOW_OFFSET; + } + + + /** + * {@inheritDoc} + */ + @Override + public int getLength() { + int length = 0; + if (!children.isEmpty()) { + PstNode firstChild = children.get(0); + PstNode lastChild = children.get(children.size()-1); + length = lastChild.getOffset() - firstChild.getOffset() + lastChild.getLength(); + } + return length; + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getPstNodeAt(final int offset) { + PstNode node = findChildAtOffset(children, offset); + if (node != null) { + node = node.getPstNodeAt(offset); + } + return node; + } + + private static PstNode findChildAtOffset(List children, final int offset) { + PstNode node = CollectionsUtils.binarySearch(children, new ISearchDirector() { + @Override + public int direct(PstNode key) { + if (offset < key.getOffset()) { + return -1; + } + else if (offset > key.getOffset() + key.getLength() - 1) { + return 1; + } + else { // offset between [key.getOffset(), + // key.getOffset() + key.getLength() - 1] - + // i.e. inside region covered by key + return 0; + } + } + }); + return node; + } + + + /** + * Appends the specified element to the end of the children list of this node. + * + * @param child element to be appended to this list + */ + public void addChild(PstNode child) { + child.setParent(this); + children.add(child); + } + + /** + * Appends all of the elements in the specified collection to the end of + * the child list of this node, in the order that they are returned by the + * specified collection's iterator. + * + * @param children collection containing elements to be added to the child list of this node. + */ + public void addChildren(Collection children) { + if (children != null) { + for (PstNode child : children) { + addChild(child); + } + } + } + + + /** + * Inserts the specified element at the specified position in the child list + * of this node. Shifts the element currently at that position (if any) and + * any subsequent elements to the right (adds one to their indices). + * + * @param index index at which the specified element is to be inserted + * @param child element to be inserted + */ + public void insertChild(int index, PstNode child) { + child.setParent(this); + children.add(index, child); + } + + /** + * Inserts all of the elements in the specified collection into the child + * list of this node at the specified position. Shifts the element currently + * at that position (if any) and any subsequent elements to the right + * (increases their indices). The new elements will appear in this list in + * the order that they are returned by the specified collection's iterator. + * + * @param index index at which to insert the first element from the + * specified collection + * @param children collection containing elements to be added to the child list of this node. + */ + public void insertChildren(int index, Collection children) { + if (children != null) { + for (PstNode child : children) { + insertChild(index, child); + } + } + } + + + public List getChildren() { + return children; + } + + public PstNode getLastChild() { + PstNode lastChild = null; + int size = children.size(); + if (size > 0) { + lastChild = children.get(size - 1); + } + return lastChild; + } + + /** + * Removes the element at the specified position in the child list of this node. + * Shifts any subsequent elements to the left (subtracts one from their indices). + * Returns the element that was removed from the list. + * + * @param index the index of the element to be removed + * @return the element previously at the specified position + */ + public PstNode removeChild(int index) { + return children.remove(index); + } + + public PstNode removeLastChild() { + if (children.isEmpty()) { + return null; + } + else { + PstNode child = children.remove(children.size() - 1); + return child; + } + } + + public List removeLastChildren(IPredicate predicate) { + List removedChildren = new ArrayList(); + for (int i = children.size() - 1; i > -1; --i) { + PstNode child = children.get(i); + if (predicate.evaluate(child)) { + removedChildren.add(removeLastChild()); + } + else { + break; + } + } + Collections.reverse(removedChildren); + return removedChildren; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(PstVisitor visitor) { + if (visitor.visit(this)) { + for (PstNode child : children) { + child.accept(visitor); + } + } + visitor.endVisit(this); + } + + + @SuppressWarnings("unchecked") + public T findFirstChild(IElementType elementType, Class selector) { + PstNode node = null; + for (PstNode child : children) { + if (child.getElementType().equals(elementType)) { + node = child; + break; + } + } + return (T)node; + } + + @SuppressWarnings("unchecked") + public T findLastChild(IElementType elementType, Class selector) { + PstNode node = null; + for (PstNode child : children) { + if (child.getElementType().equals(elementType)) { + node = child; + } + } + return (T)node; + } + + @SuppressWarnings("unchecked") + protected List findChildren(IElementType elementType, Class selector) { + List nodes = new ArrayList(); + for (PstNode child : children) { + if (child.getElementType().equals(elementType)) { + nodes.add((T)child); + } + } + return nodes; + } + + /** This method is very alike to findChildren with single elementType parameter, but we duplicate code + * because there are very hot methods + * @param elementTypes - element types to be matched + * @param selector - lowest common denominator in the hierarchy of matched children + * @return + */ + @SuppressWarnings("unchecked") + protected List findChildren(Set elementTypes, Class selector) { + List nodes = new ArrayList(); + for (PstNode child : children) { + if (elementTypes.contains(child.getElementType())) { + nodes.add((T)child); + } + } + return nodes; + } + + public List findChildren(CompositeType elementType) { + return findChildren(elementType, elementType.getNodeClass()); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstLeafNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstLeafNode.java new file mode 100644 index 0000000..0b79a5d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstLeafNode.java @@ -0,0 +1,85 @@ +package com.excelsior.xds.parser.commons.pst; + +import com.excelsior.xds.parser.commons.ast.TokenType; + +/** + * A leaf node in the Program Structure Tree. + * This nodes match individual tokens returned by scanner. + */ +public class PstLeafNode extends PstNode { + + /** + * A character index into the original source string. + */ + private final int offset; + + /** + * A character length. + */ + private final int length; + + + private final TokenType token; + + + public PstLeafNode(PstCompositeNode parent, TokenType token, int offset, int length) { + super(parent, token); + this.token = token; + this.offset = offset; + this.length = length; + } + + + /** + * {@inheritDoc} + */ + @Override + public int getOffset() { + return offset; + } + + /** + * {@inheritDoc} + */ + @Override + public int getLength() { + return length; + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getPstNodeAt(int index) { + boolean isThisNode = (offset <= index) && (index < (offset + length)) + && (offset >= 0); + if (isThisNode) { + return this; + } + return null; + } + + + public TokenType getToken() { + return token; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(PstVisitor visitor) { + visitor.visit(this); + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return token.toString(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstNode.java new file mode 100644 index 0000000..6bd20a2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstNode.java @@ -0,0 +1,119 @@ +package com.excelsior.xds.parser.commons.pst; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.ast.IElementType; + +/** + * A node in the Program Structure Tree. + */ +public abstract class PstNode +{ + public static final int UNKNOW_OFFSET = -1; + + private PstCompositeNode parent; + + private IElementType elementType; + + + public PstNode(PstCompositeNode parent, IElementType elementType2) { + this.parent = parent; + this.elementType = elementType2; + } + + public PstNode(ElementType elementType) { + this(null, elementType); + } + + public IElementType getElementType() { + return elementType; + } + + public void setElementType(IElementType elementType) { + this.elementType = elementType; + } + + + /** + * Returns the character index into the original source file indicating + * where the source fragment corresponding to this node begins. + *

+ * The parser supplies useful well-defined source ranges to the nodes it creates. + * See {@link ASTParser#setKind(int)} for details + * on precisely where source ranges begin and end. + *

+ * + * @return the 0-based character index, or -1 + * if no source position information is recorded for this node + * @see #getLength() + * @see ASTParser + */ + public abstract int getOffset(); + + /** + * Returns the length in characters of the original source file indicating + * where the source fragment corresponding to this node ends. + *

+ * The parser supplies useful well-defined source ranges to the nodes it creates. + * See {@link ASTParser#setKind(int)} methods for details + * on precisely where source ranges begin and end. + *

+ * + * @return a (possibly 0) length, or 0 + * if no source position information is recorded for this node + * @see #getOffset() + * @see ASTParser + */ + public abstract int getLength(); + + /** + * Returns the PstNode at the specified character index + * in the original source file. + * + * @param offset the 0-based character index of the PstNode to return + * @return the PstNode at the specified character index or + * null if PstNode was not found. + */ + public abstract PstNode getPstNodeAt(int offset); + + + public PstCompositeNode getParent() { + return parent; + } + + public void setParent(PstCompositeNode parent) { + this.parent = parent; + } + + + /** + * Accepts the given visitor on a visit of the current node. + * + * @param visitor the visitor object + */ + public void accept(PstVisitor visitor) { + // begin with the generic pre-visit + if (visitor.preVisit(this)) { + // dynamic dispatch to internal method for type-specific visit/endVisit + doAccept(visitor); + } + // end with the generic post-visit + visitor.postVisit(this); + } + + /** + * Accepts the given visitor on a type-specific visit of the current node. + * This method must be implemented in all concrete PST node types. + * + * @param visitor the visitor object + */ + protected abstract void doAccept(PstVisitor visitor); + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return elementType.toString(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstVisitor.java new file mode 100644 index 0000000..52a0f49 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/pst/PstVisitor.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.commons.pst; + +public abstract class PstVisitor { + + public boolean visit(PstLeafNode node) { + return true; + } + + public boolean visit(PstCompositeNode node) { + return true; + } + + public boolean preVisit(PstNode pstNode) { + return true; + } + + public void postVisit(PstNode pstNode) { + } + + public void endVisit(PstCompositeNode node) { + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/BlockSymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/BlockSymbolTextBinding.java new file mode 100644 index 0000000..0e7faf9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/BlockSymbolTextBinding.java @@ -0,0 +1,112 @@ +package com.excelsior.xds.parser.commons.symbol; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; + +public class BlockSymbolTextBinding extends SymbolTextBinding + implements IMutableBlockSymbolTextBinding +{ + private final List nameRegions; + + /** + * Constructs an empty text binding of block symbol with an initial capacity of two. + */ + public BlockSymbolTextBinding() { + this(2); + } + + /** + * Constructs an empty text binding of block symbol with the specified initial capacity. + * + * @param initialCapacity the initial capacity of the name text regions + */ + public BlockSymbolTextBinding(int initialCapacity) { + nameRegions = new ArrayList(initialCapacity); + } + + /** + * {@inheritDoc} + */ + @Override + public void setNameTextRegion(ITextRegion region) { + super.setNameTextRegion(region); + addNameTextRegion(region); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getNameTextRegions() { + return nameRegions; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addNameTextRegion(ITextRegion region) { + if (!nameRegions.contains(region)) { + nameRegions.add(region); + } + } + + + /** + * The empty source text binding of symbol with repeated name usages (immutable). + */ + public static final IMutableBlockSymbolTextBinding EMPTY_TEXT_BINDING = new EmptyTextBinding(); + + protected static class EmptyTextBinding implements IMutableBlockSymbolTextBinding + { + @Override + public TextPosition getPosition() { + return null; + } + + @Override + public void setPosition(TextPosition defPosition) { + throw new UnsupportedOperationException("Immutable empty block symbol text binding"); //$NON-NLS-1$ + } + + + @Override + public ITextRegion getNameTextRegion() { + return null; + } + + @Override + public void setNameTextRegion(ITextRegion region) { + throw new UnsupportedOperationException("Immutable empty block symbol text binding"); //$NON-NLS-1$ + } + + + @Override + public ITextRegion getDeclarationTextRegion() { + return null; + } + + @Override + public void setDeclarationTextRegion(ITextRegion region) { + throw new UnsupportedOperationException("Immutable empty block symbol text binding"); //$NON-NLS-1$ + } + + + @Override + public Collection getNameTextRegions() { + return Collections.emptyList(); + } + + @Override + public void addNameTextRegion(ITextRegion region) { + throw new UnsupportedOperationException("Immutable empty block symbol text binding"); //$NON-NLS-1$ + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IBlockSymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IBlockSymbolTextBinding.java new file mode 100644 index 0000000..9afec3b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IBlockSymbolTextBinding.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.parser.commons.symbol; + +import java.util.Collection; + +import com.excelsior.xds.core.text.ITextRegion; + +/** + * Binds together symbol with repeated name and corresponding code where it is defined. + */ +public interface IBlockSymbolTextBinding extends ISymbolTextBinding +{ + /** + * Returns regions of the symbol name occurrences among text region defined + * by {@link #getDeclarationTextRegion() } + */ + public abstract Collection getNameTextRegions(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableBlockSymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableBlockSymbolTextBinding.java new file mode 100644 index 0000000..4e7428e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableBlockSymbolTextBinding.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.ITextRegion; + +public interface IMutableBlockSymbolTextBinding extends IBlockSymbolTextBinding + , IMutableSymbolTextBinding +{ + /** + * Appends the specified region to the collection of symbol name regions. + */ + public void addNameTextRegion(ITextRegion region); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableSymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableSymbolTextBinding.java new file mode 100644 index 0000000..248a7e7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableSymbolTextBinding.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.TextPosition; + +public interface IMutableSymbolTextBinding extends ISymbolTextBinding + , IMutableTextBinding +{ + /** + * Sets position in which symbol is defined. + * + * @param position - position in which symbol is defined. + */ + public void setPosition(TextPosition position); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableTextBinding.java new file mode 100644 index 0000000..3c131ce --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/IMutableTextBinding.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.ITextRegion; + +public interface IMutableTextBinding extends ITextBinding +{ + /** + * Sets text region in which symbol's primary identifier is located. + * + * @param region the text region in which symbol's primary identifier is located. + */ + public void setNameTextRegion(ITextRegion region); + + /** + * Sets text region in which symbol is defined. + * + * @param region the text region in which symbol is defined. + */ + public void setDeclarationTextRegion(ITextRegion region); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbol.java new file mode 100644 index 0000000..9bd2beb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbol.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.commons.symbol; + +/** + * An object that represents an entity from the source code. + */ +public interface ISymbol { + + public String getName(); + + public ISymbolScope getParentScope(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolReference.java new file mode 100644 index 0000000..adca894 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolReference.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.commons.symbol; + +/** + * Engine for the indirect access to the symbol + * + * @author lion, lsa80 + */ +public interface ISymbolReference +{ + /** + * Obtains actual symbol + */ + public T resolve(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolScope.java new file mode 100644 index 0000000..1b05911 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolScope.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.parser.commons.symbol; + +/** + * A symbol that has ability to hold other symbols. + */ +public interface ISymbolScope +{ + + public ISymbolScope getParentScope(); + + /** + * Searches for symbol in the current scope, and (recursively) in all parent scopes. + * + * @param symbolName the name of symbol which is to be searched + * @return the first symbol with specified name in this and parent scope, or + * {@code null} if there is no symbol with specified name. + */ + public ISymbol resolveName(String symbolName); + + /** + * Searches for symbol in the current scope only. + * + * @param symbolName the name of symbol which is to be searched. + * @return the first symbol with specified name in this scope, or + * {@code null} if there is no symbol with specified name. + */ + public ISymbol findSymbolInScope(String symbolName); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolTextBinding.java new file mode 100644 index 0000000..24a906b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ISymbolTextBinding.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.TextPosition; + +/** + * Binds symbol with its location in the source text. + */ +public interface ISymbolTextBinding extends ITextBinding +{ + /** + * @return position in which this symbol is defined. + */ + public TextPosition getPosition(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ITextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ITextBinding.java new file mode 100644 index 0000000..c506b6c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ITextBinding.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.ITextRegion; + +/** + * Binds element with its location in the source text. + */ +public interface ITextBinding +{ + /** + * Returns the location of element's primary identifier. + * + * @return text region with name of this symbol or null for anonymous element. + */ + public abstract ITextRegion getNameTextRegion(); + + /** + * The source text interval, where element is declared. + */ + public abstract ITextRegion getDeclarationTextRegion(); + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ParsedModuleKey.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ParsedModuleKey.java new file mode 100644 index 0000000..faebc54 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/ParsedModuleKey.java @@ -0,0 +1,97 @@ +package com.excelsior.xds.parser.commons.symbol; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IProject; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.BuildSettingsKey; +import com.excelsior.xds.core.builders.BuildSettingsKeyFactory; +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.sdk.SdkUtils; + +/** + * Context under which {@link #moduleFile} was parsed. + * Also used as the utility class to store AST or ModuleSymbol in the hash table.

+ * + * ModuleSymbols with:

+ * + * same path and created with the same {@link buildSettingsKey} are considered equal.
+ *
+ * if {@link project} is null, this means non-workspace module.

+ * + * @author lsa80 + */ +public final class ParsedModuleKey { + private final BuildSettingsKey buildSettingsKey; + public final IFileStore moduleFile; + + public ParsedModuleKey() { + this(null); + } + + public ParsedModuleKey(IFileStore moduleFile) { + this(DefaultBuildSettingsHolder.DefaultBuildSettingsKey, moduleFile); + } + + public ParsedModuleKey(BuildSettings buildSettings, IFileStore moduleFile) { + this(createBuildSettingsKey(buildSettings, moduleFile), moduleFile); + } + + public ParsedModuleKey(IProject project, IFileStore moduleFile) { + this(BuildSettingsKeyFactory.createBuildSettingsKey(project, moduleFile), moduleFile); + } + + private static BuildSettingsKey createBuildSettingsKey(BuildSettings buildSettings, IFileStore moduleFile) { + if (SdkUtils.isInsideSdkLibraryDefinitions(buildSettings.getSdk(), moduleFile)) { + return DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + } + else { + return buildSettings.createKey(); + } + } + + private ParsedModuleKey(BuildSettingsKey buildSettingsKey, IFileStore moduleFile) { + this.buildSettingsKey = buildSettingsKey != null? buildSettingsKey : DefaultBuildSettingsHolder.DefaultBuildSettingsKey; + this.moduleFile = moduleFile; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime + * result + + ((buildSettingsKey == null) ? 0 : buildSettingsKey.hashCode()); + result = prime * result + + ((moduleFile == null) ? 0 : moduleFile.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ParsedModuleKey other = (ParsedModuleKey) obj; + if (buildSettingsKey == null) { + if (other.buildSettingsKey != null) + return false; + } else if (!buildSettingsKey.equals(other.buildSettingsKey)) + return false; + if (moduleFile == null) { + if (other.moduleFile != null) + return false; + } else if (!moduleFile.equals(other.moduleFile)) + return false; + return true; + } + + @Override + public String toString() { + return String + .format("ParsedModuleKey [buildSettingsKey=%s, moduleFile=%s]", buildSettingsKey, moduleFile); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/QualifiedNameFactory.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/QualifiedNameFactory.java new file mode 100644 index 0000000..89b9478 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/QualifiedNameFactory.java @@ -0,0 +1,59 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +/** + * + * @author lsa80 + */ +public final class QualifiedNameFactory { + /** + * This class can contain only static methods + */ + private QualifiedNameFactory(){ + } + + public static String getQualifiedName(String qualifiedName, SymbolAttribute attr) { + StringBuilder qualifiedNameBuilder = new StringBuilder(qualifiedName); + + if (SymbolAttribute.FORWARD_DECLARATION.equals(attr)) { + qualifiedNameBuilder.append("@FORWARD"); //$NON-NLS-1$ + } + + return qualifiedNameBuilder.toString(); + } + + public static String getQualifiedName(IModulaSymbol s, SymbolAttribute attr) { + return getQualifiedName(s.getQualifiedName(), attr); + } + + public static String getOberonQualifiedName( String memberName + , IOberonMethodReceiverSymbol receiverSymbol + , ISymbolWithScope parentScope ) + { + String qualifiedName = null; + + if (receiverSymbol != null) { + IRecordTypeSymbol boundTypeSymbol = receiverSymbol.getBoundTypeSymbol(); + if (boundTypeSymbol != null) { + qualifiedName = boundTypeSymbol.getQualifiedName() + "."; //$NON-NLS-1$; + } + } + + if (qualifiedName == null) { + if (parentScope != null) { + qualifiedName = parentScope.getQualifiedName() + "."; //$NON-NLS-1$ + } + else { + qualifiedName = ""; //$NON-NLS-1$ + } + } + + qualifiedName += memberName; + return qualifiedName; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/Symbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/Symbol.java new file mode 100644 index 0000000..bca57dc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/Symbol.java @@ -0,0 +1,46 @@ +package com.excelsior.xds.parser.commons.symbol; + + +/** + * Base class to represents an entity from the source code. + */ +public abstract class Symbol implements ISymbol +{ + private final String name; + private final ISymbolScope parentScope; + + public Symbol(String name, ISymbolScope parentScope) { + this.name = name; + this.parentScope = parentScope; + } + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + return name; + } + + /** + * {@inheritDoc} + */ + @Override + public ISymbolScope getParentScope() { + return parentScope; + } + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + String name = getName(); + if (name == null) { + return super.toString(); + } + else { + return name; + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolScope.java new file mode 100644 index 0000000..9f559cb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolScope.java @@ -0,0 +1,59 @@ +package com.excelsior.xds.parser.commons.symbol; + +import java.util.Map; + +import org.apache.commons.collections.map.CompositeMap; + +/** + * A scope of a symbol. + */ +public class SymbolScope implements ISymbolScope +{ + private ISymbolScope parentScope; + private CompositeMap allSymbols; + + public SymbolScope(ISymbolScope parentScope) { + this.parentScope = parentScope; + allSymbols = new CompositeMap(); + } + + + /** + * {@inheritDoc} + */ + @Override + public ISymbolScope getParentScope() { + return parentScope; + } + + + public void attach(Map collection) { + allSymbols.addComposited(collection); + } + + + /** + * {@inheritDoc} + */ + @Override + public ISymbol resolveName(String name) { + ISymbol s = findSymbolInScope(name); + if (s == null) { + ISymbolScope parentScope = getParentScope(); + if (parentScope != null) { + s = parentScope.resolveName(name); + } + } + return s; + } + + + /** + * {@inheritDoc} + */ + @Override + public ISymbol findSymbolInScope(String name) { + return (ISymbol) allSymbols.get(name); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolTextBinding.java new file mode 100644 index 0000000..3240378 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/SymbolTextBinding.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.TextPosition; + +public class SymbolTextBinding extends TextBinding + implements IMutableSymbolTextBinding +{ + /** Position in which symbol is defined. */ + private TextPosition position; + + /** + * {@inheritDoc} + */ + @Override + public TextPosition getPosition() { + return position; + } + + /** + * {@inheritDoc} + */ + @Override + public void setPosition(TextPosition position) { + this.position = position; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/TextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/TextBinding.java new file mode 100644 index 0000000..77ca3a4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/commons/symbol/TextBinding.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.commons.symbol; + +import com.excelsior.xds.core.text.ITextRegion; + +public class TextBinding implements ITextBinding + , IMutableTextBinding +{ + /** Text region in which this symbol's primary identifier is located. */ + private ITextRegion nameRegion; + + /** Text region in which this symbol is declared. */ + private ITextRegion declarationRegion; + + /** + * {@inheritDoc} + */ + @Override + public ITextRegion getNameTextRegion() { + return nameRegion; + } + + /** + * {@inheritDoc} + */ + @Override + public void setNameTextRegion(ITextRegion region) { + this.nameRegion = region; + } + + + /** + * {@inheritDoc} + */ + @Override + public ITextRegion getDeclarationTextRegion() { + return declarationRegion; + } + + /** + * {@inheritDoc} + */ + @Override + public void setDeclarationTextRegion(ITextRegion region) { + this.declarationRegion = region; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/editor/model/EditorDocumentCache.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/editor/model/EditorDocumentCache.java new file mode 100644 index 0000000..92b66a1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/editor/model/EditorDocumentCache.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.parser.editor.model; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +import org.eclipse.jface.text.IDocument; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; + +public final class EditorDocumentCache { + private Map moduleKeyToDocument = new ConcurrentHashMap(); + + private EditorDocumentCache() { + } + + public void addDocument(ParsedModuleKey key, IDocument doc) { + if (doc != null) { + moduleKeyToDocument.put(key, doc); + } + } + + public IDocument getDocument(ParsedModuleKey key) { + return moduleKeyToDocument.get(key); + } + + public void removeDocument(ParsedModuleKey key) { + moduleKeyToDocument.remove(key); + } + + /** + * Method for debug purposes. Do not use! + */ + @Deprecated + public Iterable> iterable() { + return moduleKeyToDocument.entrySet(); + } + + public void clear() { + moduleKeyToDocument.clear(); + } + + public static EditorDocumentCache instance() { + return EditorDocumentCacheHolder.INSTANCE; + } + + private static final class EditorDocumentCacheHolder{ + static final EditorDocumentCache INSTANCE = new EditorDocumentCache(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentGuideDescriptor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentGuideDescriptor.java new file mode 100644 index 0000000..9402c52 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentGuideDescriptor.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.parser.indents; + +/** + * Descriptor of source code vertical indent guide. + */ +public class IndentGuideDescriptor { + + public final int indentLevel; + public final int startLine; + public final int endLine; + + public IndentGuideDescriptor (int indentLevel, int startLine, int endLine) { + this.indentLevel = indentLevel; + this.startLine = startLine; + this.endLine = endLine; + } + + @Override + public boolean equals (Object obj) { + IndentGuideDescriptor other = (IndentGuideDescriptor) obj; + return indentLevel == other.indentLevel + && startLine == other.startLine + && endLine == other.endLine; + } + + @Override + public String toString() { + return "IndentGuideDescriptor [indentLevel=" + indentLevel + + ", startLine=" + startLine + + ", endLine=" + endLine + "]"; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentsParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentsParser.java new file mode 100644 index 0000000..79ddcf2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/indents/IndentsParser.java @@ -0,0 +1,173 @@ +package com.excelsior.xds.parser.indents; + +import java.util.ArrayList; +import java.util.List; + +import com.excelsior.xds.core.utils.collections.IntStack; + +public class IndentsParser { + + public static List buildDescriptors(CharSequence chars, int tabSize, String eolPrefix) throws Exception { + if (tabSize < 1) tabSize = 1; + + LineIterator lit = new LineIterator(chars); + int lincnt = lit.lengths.size(); + + /// Calculate indents: + int lineIndents[] = new int[lincnt]; + { + + for (int i=0; i= 0) { + topIndent = lineIndents[line]; + } else { + int startLine = line; + while (line < lincnt && lineIndents[line] < 0) { + line++; + } + + int bottomIndent = line < lineIndents.length ? lineIndents[line] : topIndent; + + int indent = bottomIndent > topIndent ? 1000 : Math.min(topIndent, bottomIndent); + for (int blankLine = startLine; blankLine < line; blankLine++) { + lineIndents[blankLine] = indent; + } + + //noinspection AssignmentToForLoopParameter + line--; // will be incremented back at the end of the loop; + } + } + } + + + List descriptors = new ArrayList(); + + IntStack lines = new IntStack(); + IntStack indents = new IntStack(); + + lines.push(0); + indents.push(0); + for (int line = 1; line < lincnt; line++) { + int curIndent = lineIndents[line]; + + while (!indents.empty() && curIndent <= indents.peek()) { + final int level = indents.pop(); + int startLine = lines.pop(); + descriptors.add(createDescriptor(level, startLine, line, chars, lit)); + } + + int prevLine = line - 1; + int prevIndent = lineIndents[prevLine]; + + if (curIndent - prevIndent > 1) { + lines.push(prevLine); + indents.push(prevIndent); + } + } + + while (!indents.empty()) { + final int level = indents.pop(); + if (level > 0) { + int startLine = lines.pop(); + descriptors.add(createDescriptor(level, startLine, lincnt, chars, lit)); + } + } + return descriptors; + } + + + /** + * Returns 1st non-space char indent (with opening tabs) or -1 when line contains nothing except spaces + * Lines with EOL comments only treats as empty lines (returns -1) + */ + private static int calcLineSpace(CharSequence chars, int lineOffset, int lineLen, int tabSize, String eolPrefix) throws Exception { + int indent = 0; + for (int i=0; i= eolPrefix.length()) { + if (eolPrefix.equals(chars.subSequence(lineOffset + i, lineOffset + i + eolPrefix.length()).toString())) { + return -1; + } + } + return indent; + } + } + return -1; + } + + + private static boolean isBlankLine(CharSequence chars, int line, LineIterator lit) throws Exception { + int offs = lit.offsets.get(line); + for (int i = lit.lengths.get(line)-1; i>=0; --i) { + char ch = chars.charAt(offs + i); + if (ch != ' ' && ch != '\t') { + return false; + } + } + return true; + } + + private static IndentGuideDescriptor createDescriptor(int level, int startLine, int endLine, CharSequence chars, LineIterator lit) throws Exception { + while (startLine > 0 && isBlankLine(chars, startLine, lit)) + startLine--; + return new IndentGuideDescriptor(level, startLine, endLine); + } + + + private static class LineIterator { + + private static final char CR = 0x0D; + private static final char LF = 0x0A; + + public ArrayList offsets; + public ArrayList lengths; + + public LineIterator(CharSequence chars) { + offsets = new ArrayList(); + lengths = new ArrayList(); + int top = chars.length(); + + int nextOffset = 0; + + while (true) { + int offset = nextOffset; + + if (offset >= top) { + break; // EOF + } + + int length = 0; + + while(offset + length < top) { + char ch = chars.charAt(offset + length); + nextOffset = offset + length + 1; + if (ch == CR) { + if (nextOffset < top && chars.charAt(nextOffset) == LF) { + ++nextOffset; + } + break; + + } else if (ch == LF) { + break; + } + + ++length; + } + + offsets.add(offset); + lengths.add(length); + } + } + } + +} + diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaAstCache.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaAstCache.java new file mode 100644 index 0000000..2e22170 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaAstCache.java @@ -0,0 +1,114 @@ +package com.excelsior.xds.parser.internal.modula; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.ast.ModulaAst; + +public final class ModulaAstCache +{ + private final ReadWriteLock instanceLock = new ReentrantReadWriteLock(); + private final Map storage = new HashMap(); + + public static ModulaAst getModulaAst(ParsedModuleKey key) { + return getInstance().doGetModulaAst(key); + } + + public static void putModulaAst(ModulaAst modulaAst) { + getInstance().doPutModulaAst(modulaAst); + } + + public static void clear() { + getInstance().doClear(); + } + + /** + * Method for test purposes only, do not use + */ + @Deprecated + public static Iterable astIterator() { + return getInstance().createAstIterator(); + } + + private Iterable createAstIterator() { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return new Iterable() { + @Override + public Iterator iterator() { + return new ArrayList(storage.values()).iterator(); + } + }; + } + finally{ + readLock.unlock(); + } + } + + public static void discardModulaAst(ModulaAst modulaAst) { + getInstance().doRemoveModulaAst(modulaAst.getParsedModuleKey()); + } + + public static void discardModulaAst(ParsedModuleKey key) { + getInstance().doRemoveModulaAst(key); + } + + private ModulaAst doGetModulaAst(ParsedModuleKey key) { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return storage.get(key); + } + finally{ + readLock.unlock(); + } + } + + private void doPutModulaAst( ModulaAst modulaAst) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + ParsedModuleKey parsedModuleKey = modulaAst.getParsedModuleKey(); + storage.put(parsedModuleKey, modulaAst); + } + finally{ + writeLock.unlock(); + } + } + + private void doRemoveModulaAst(ParsedModuleKey key) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + storage.remove(key); + } + finally{ + writeLock.unlock(); + } + } + + private void doClear() { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + storage.clear(); + } + finally{ + writeLock.unlock(); + } + } + private static class ModulaAstCacheHolder{ + static ModulaAstCache INSTANCE = new ModulaAstCache(); + } + + public static ModulaAstCache getInstance(){ + return ModulaAstCacheHolder.INSTANCE; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaSymbolDeclarationTextRegionBuilder.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaSymbolDeclarationTextRegionBuilder.java new file mode 100644 index 0000000..e84dd36 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/ModulaSymbolDeclarationTextRegionBuilder.java @@ -0,0 +1,225 @@ +package com.excelsior.xds.parser.internal.modula; + +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.internal.modula.symbol.ModulaSymbol; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstFinallyBody; +import com.excelsior.xds.parser.modula.ast.modules.AstLocalModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameter; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodReceiver; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedure; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstEnumElement; +import com.excelsior.xds.parser.modula.ast.types.AstRecordField; +import com.excelsior.xds.parser.modula.ast.types.AstRecordSimpleFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantSelector; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclaration; +import com.excelsior.xds.parser.modula.ast.variables.AstVariable; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclaration; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + + +public class ModulaSymbolDeclarationTextRegionBuilder extends ModulaAstVisitor +{ + private TextRegion textRegion; + + @Override + public boolean visit(AstModule node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstLocalModule node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + + @Override + public boolean visit(AstModuleBody node) { + PstNode parent = node.getParent(); + if (parent instanceof AstModule) { + textRegion = new TextRegion(parent.getOffset(), parent.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + } + return false; + } + + @Override + public boolean visit(AstFinallyBody node) { + PstNode parent = node.getParent(); + if (parent instanceof AstModule) { + textRegion = new TextRegion(parent.getOffset(), parent.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + } + return false; + } + + + @Override + public boolean visit(AstSimpleImportStatement node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + return true; + } + + @Override + public boolean visit(AstModuleAlias node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + + @Override + public boolean visit(AstProcedureDefinition node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstProcedureDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstProcedureForwardDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstProcedureExternalSpecification node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + @Override + public boolean visit(AstFormalParameter node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + @Override + public boolean visit(AstProcedureBody node) { + PstNode parent = node.getParent(); + if (parent instanceof AstProcedure) { + textRegion = new TextRegion(parent.getOffset(), parent.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + } + return false; + } + + + @Override + public boolean visit(AstOberonMethodDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstOberonMethodForwardDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstOberonMethodReceiver node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + + @Override + public boolean visit(AstConstantDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + + + @Override + public boolean visit(AstTypeDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + setDeclarationTextRegion(node.getSymbol(), textRegion); + return true; + } + + @Override + public boolean visit(AstEnumElement node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + @Override + public boolean visit(AstRecordSimpleFieldBlock node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + return true; + } + + @Override + public boolean visit(AstRecordField node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + @Override + public boolean visit(AstRecordVariantFieldBlock node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + return true; + } + + @Override + public boolean visit(AstRecordVariantSelector node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + @Override + public boolean visit(AstVariableDeclaration node) { + textRegion = new TextRegion(node.getOffset(), node.getLength()); + return true; + } + + @Override + public boolean visit(AstVariable node) { + setDeclarationTextRegion(node.getSymbol(), textRegion); + return false; + } + + + + private void setDeclarationTextRegion(IModulaSymbol symbol, TextRegion region) { + if (symbol instanceof ModulaSymbol) { + ((ModulaSymbol)symbol).setDeclarationTextRegion(region); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/PstCommentsHandler.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/PstCommentsHandler.java new file mode 100644 index 0000000..a5c93cf --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/PstCommentsHandler.java @@ -0,0 +1,167 @@ +package com.excelsior.xds.parser.internal.modula; + +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import com.excelsior.xds.core.utils.IPredicate; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.ast.TokenTypes; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstBlock; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenSets; + +/** + * Handler to arrange leading and trailing whitespace and comments in the PST tree. + * @author lion + */ +public class PstCommentsHandler +{ + public static void arrangeComments( CharSequence chars, PstCompositeNode root + , IPredicate isTrailingWhiteSpaceAllowed ) + { + int i = 0; + List children = root.getChildren(); + while (i < children.size()) { + PstNode pstNode = children.get(i); + if (pstNode instanceof AstBlock) { + AstBlock compositeNode = (AstBlock) pstNode; + arrangeTrailingComments(chars, compositeNode, i, isTrailingWhiteSpaceAllowed); + i -= arrangeLeadingComments(chars, children, compositeNode, i); + arrangeComments(chars, compositeNode, isTrailingWhiteSpaceAllowed); + } + if (pstNode instanceof PstCompositeNode) { + PstCompositeNode compositeNode = (PstCompositeNode) pstNode; + arrangeComments(chars, compositeNode, isTrailingWhiteSpaceAllowed); + arrangeTrailingComments(chars, compositeNode, i, isTrailingWhiteSpaceAllowed); + i -= arrangeLeadingComments(chars, children, compositeNode, i); + } + i++; + } + } + + /** + * All comments which precede the given node with 0 or 1 newline delimiters + * are removed from the parent node and inserted to the beginning given one. + * + * @param chars input char sequence + * @param siblingNodes + * @param node node to be processed + * @param nodeIndex index of the node to be processed in siblingNodes + * + * @return number of nodes removed from the siblingNodes + */ + private static int arrangeLeadingComments( CharSequence chars + , List siblingNodes + , PstCompositeNode node, int nodeIndex ) + { + int removedsibling = 0; + int siblingIndex = -1; + for (int i = nodeIndex - 1; i >= 0; --i) { + PstNode siblingNode = siblingNodes.get(i); + IElementType siblingElementType = siblingNode.getElementType(); + if (ModulaTokenSets.WHITE_SPACE == siblingElementType) { + int newLineCount = newLineCount(siblingNode, chars); + if (newLineCount > 1) { + break; + } + else if (newLineCount == 0) { + // comment is located in the same line as the other element + siblingIndex = -1; + break; + } + } + else if (ModulaTokenSets.COMMENT_SET.contains(siblingElementType)) { + siblingIndex = i; + } + else { + if (i + i == siblingIndex) { + // comment is located in the same line as the other element + siblingIndex = -1; + } + break; + } + } + + if (siblingIndex > -1) { + for (int i = nodeIndex - 1; i >= siblingIndex; i--) { + PstNode siblingNode = siblingNodes.remove(i); + node.insertChild(0, siblingNode); + } + removedsibling = nodeIndex - siblingIndex; + } + return removedsibling; + } + + + /** + * All trailing comments are removed from the node to the parent if they + * separated from last non-comment node by a newline delimiter(s). + * + * @param chars input char sequence + * @param node node to be processed + * @param nodeIndex index of the node to be processed in the parent's children + */ + private static void arrangeTrailingComments( CharSequence chars, PstCompositeNode node + , int nodeIndex + , IPredicate isTrailingWhiteSpaceAllowed ) + { + if (isTrailingWhiteSpaceAllowed.evaluate(node)) { + return; + } + + List children = node.getChildren(); + int childIndex = -1; + + for (int i = children.size() - 1; i > -1; --i) { + PstNode childNode = children.get(i); + if (!ModulaTokenSets.WHITE_SPACE_AND_COMMENT_SET.contains(childNode.getElementType())) { + break; + } + childIndex = i; + } + + if (childIndex > -1) { + PstNode childNode = children.get(childIndex); + if ( (TokenTypes.WHITE_SPACE != childNode.getElementType()) + || (newLineCount(childNode, chars) == 0) ) + { + while (childIndex < children.size()) { + childNode = children.get(childIndex); + if ( (TokenTypes.WHITE_SPACE == childNode.getElementType()) + && (newLineCount(childNode, chars) > 1) ) + { + break; + } + childIndex++; + } + } + + if (childIndex < children.size()) { + PstCompositeNode root = (PstCompositeNode)node.getParent(); + for (int i = children.size() - 1; i >= childIndex; --i) { + PstNode removedNode = node.removeLastChild(); + root.insertChild(nodeIndex + 1, removedNode); + } + } + } + } + + + private static int newLineCount(PstNode node, CharSequence chars) { + int count = 0; + + if (node.getElementType() == TokenTypes.WHITE_SPACE) { + Matcher matcher = NEWLINE.matcher(chars.subSequence(node.getOffset(), node.getOffset() + node.getLength())); + while (matcher.find()) { + ++count; + } + } + + return count; + } + + private static Pattern NEWLINE = Pattern.compile("\\n+"); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/XdsMessages.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/XdsMessages.java new file mode 100644 index 0000000..1b7290b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/XdsMessages.java @@ -0,0 +1,128 @@ +package com.excelsior.xds.parser.internal.modula.nls; + +import org.eclipse.osgi.util.NLS; + +public class XdsMessages extends NLS { + + private static final String BUNDLE_NAME = "com.excelsior.xds.parser.internal.modula.nls.xds_messages"; //$NON-NLS-1$ + + public static String IllegalCharacter; // 0001 + public static String IllegalNumber; // 0003 + public static String IdentifierExpected; // 0007 + public static String ExpectedSymbol; // 0008 + + public static String UndeclaredIdentifier; // 0020 + public static String IdentifierAlreadyDefined; // 0022 + + public static String RecursiveImportDisabled; // 0024 + public static String UnsatisfiedExportedObject; // 0025 + + public static String IncompatibleTypes; // 0030 + public static String IdentifierDoesNotDenoteType; // 0031 + public static String ExpectedType; // xxxx + public static String ExpectedOrdinalType; // 0033 + public static String IllegalOpenArrayTypeUsage; // 0046 + + public static String ObjectIsNotArray; // 0050 + public static String ObjectIsNotRecord; // 0051 + public static String ObjectIsNotPointer; // 0052 + public static String ObjectIsNotVariable; // 0054 + + public static String ObjectIsNotPointerOrRecord; // 0059 + + public static String PointerNotBoundRecord; // 0062 + public static String BaseTypeOfOpenArrayAggregateShuldBeSimple; // 0064 + public static String OberonTypeIsRequired; // 0071 + + public static String ExpectedStartOfFactor; // 0081 + public static String ExpectedDeclarationStart; // 0082 + public static String ExpectedTypeStart; // 0083 + public static String ExpectedStartOfStatement; // 0086 + public static String ProcedureNotImplemented; // 0089 + + public static String NotAllowedInDefinitionModule; // 0093 + public static String AllowedOnlyInGlobalScope; // 0095 + public static String UnsatisfiedForwardType; // 0097 + + public static String IllegalDeclarationOrder; // 0100 + public static String ExtensionNotAllowed; // 0102 + + public static String ForwardTypeCannotBeOpaque; // 0109 + public static String ExpressionForFieldWasExpected; // 0109 + + public static String TypeIsNotDefined; // 0117 + public static String VariantFieldsNotAllowedInOberonRecord; // 0119 + public static String ExpressionOutOfBounds; // 0122 + public static String ReadOnlyDesignator; // 0123 + public static String LowBoundGreaterThanHighBound; // 0124 + + public static String ForLoopControlVariableMustBeLocal; // 0128 + public static String MoreExpressionsThanFieldsInRecord; // 0129 + + public static String InterruptProceduresNotImplemented; // 0140 + public static String NotAllowedInOberon; // 0143 + + public static String ForLoopControlVariableMustNotBeFormalParameter; // 0145 + public static String ForLoopControlVariableCannotBeExported; // 146 + + public static String InvalidLanguageValue; // 0150 + public static String InvalidParameterSpecificationExpectedNIL; // 0160 + public static String ControlVariableCannotBeVolatile; // 0163 + public static String LanguageIsNotValidForExternalProcedure; // 0164 + public static String DirectLanguageSpecification; // xxxx + + public static String IllegalConditionCompilation; // 0171 + public static String InvalidPragmaSyntax; // 0175 + public static String IllegalConditionCompilationAtPosition; // xxxx + + public static String ImplicitSystemCast; // 0209 + + public static String CaseWithoutElsePart; // 0319 + public static String UnknownOption; // 0320 + public static String OptionAlreadyDefined; // 0321 + public static String UnknownEquation; // 0322 + public static String EquationAlreadyDefined; // 0323 + public static String ModuleConstructorWillNotBeInvoked; // 0341 + + public static String StringExpected; // 0418 + + public static String UnresolvedModuleName; // 0470 + public static String CannotFindDefinitionModule; // 0471 + + public static String ArrayRecotdSimpleAgregate; // 0706 + public static String ObsoleteTypeCast; // 0707 + public static String ReadOnlyTag; // 0711 + public static String SpecialKindsParameters; // 0712 + public static String ReadOnlyParameters; // 0713 + public static String UnusedParameters; + public static String ParameterValueByDefault; // 0714 + public static String SeqParameter; // 0716 + public static String ArrayOfType; // 0717 + public static String RenamingInImport; // 0718 + public static String ExponentiationOperator; // 0719 + public static String IsoPragmaSyntax; // 0720 + public static String UseOptionCppComments; // 0721 + public static String UseCppLineComments; // 0722 + public static String UseCppBlockComments; // 0723 + + public static String DefinitionModuleOption; // 1022 + public static String KeywordDisabledByK26Option; // 2000 + + public static String ImportFromObjectIllegal; // xxxx + + + public static String OutlineNodeText_ImportList; + public static String OutlineNodeText_VariantRecord; + public static String OutlineNodeText_Variant; + + public static String ImportCycleDetected; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, XdsMessages.class); + } + + private XdsMessages() { + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages.properties b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages.properties new file mode 100644 index 0000000..4ea47af --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/nls/xds_messages.properties @@ -0,0 +1,110 @@ +IllegalCharacter=illegal character +IllegalNumber=illegal number +IdentifierExpected=identifier expected +ExpectedSymbol=expected symbol "{0}" + +UndeclaredIdentifier=undeclared identifier "{0}" +IdentifierAlreadyDefined=identifier "{0}" was already defined at "{1}"[{2}:{3}] + +RecursiveImportDisabled=recursive import not allowed +UnsatisfiedExportedObject=unsatisfied exported object "{0}" + +IncompatibleTypes=incompatible types +IdentifierDoesNotDenoteType=identifier "{0}" does not denote a type +ExpectedType=type expected +ExpectedOrdinalType=ordinal type expected +IllegalOpenArrayTypeUsage=illegal usage of open array type + +ObjectIsNotArray=object is not array +ObjectIsNotRecord=object is not record +ObjectIsNotPointer=object is not pointer +ObjectIsNotVariable=object is not variable + +ObjectIsNotPointerOrRecord=object is neither a pointer nor a VAR-parameter record + +PointerNotBoundRecord=pointer not bound to record +BaseTypeOfOpenArrayAggregateShuldBeSimple=base type of open array aggregate should be a simple type +OberonTypeIsRequired=non-Oberon type cannot be used in specific Oberon-2 construct + +ExpectedStartOfFactor=expected start of factor +ExpectedDeclarationStart=expected start of declaration +ExpectedTypeStart=expected start of type +ExpectedStartOfStatement=expected start of statement +ProcedureNotImplemented=procedure not implemented "{0}" + +NotAllowedInDefinitionModule=not allowed in definition module +AllowedOnlyInGlobalScope=allowed only in global scope +UnsatisfiedForwardType=unsatisfied forward type "{0}" + +IllegalDeclarationOrder=illegal order of declarations +ExtensionNotAllowed=language extension is not allowed {0} + +ForwardTypeCannotBeOpaque=forward type cannot be opaque +ExpressionForFieldWasExpected=expression for field "{0}" was expected + +TypeIsNotDefined=type of "{0}" is not defined yet +VariantFieldsNotAllowedInOberonRecord=variant fields are not allowed in Oberon record +ExpressionOutOfBounds=expression out of bounds +ReadOnlyDesignator=designator is read-only +LowBoundGreaterThanHighBound=low bound greater than high bound + +ForLoopControlVariableMustBeLocal=FOR-loop control variable must be declared in the local scope +MoreExpressionsThanFieldsInRecord=more expressions than fields in a record type + +InterruptProceduresNotImplemented=interrupt procedures are not implemented yet +NotAllowedInOberon=not allowed in Oberon + +ForLoopControlVariableMustNotBeFormalParameter=FOR-loop control variable must not be a formal parameter +ForLoopControlVariableCannotBeExported=control variable cannot be exported + +InvalidLanguageValue=invalid value of explicit language specification +InvalidParameterSpecificationExpectedNIL=invalid parameter specification: expected NIL +ControlVariableCannotBeVolatile=control variable can not be volatile +LanguageIsNotValidForExternalProcedure=Language is not valid for external procedure +DirectLanguageSpecification=(direct language specification) + +IllegalConditionCompilation=illegal structure of conditional compilation commands +InvalidPragmaSyntax=invalid pragma syntax +IllegalConditionCompilationAtPosition=illegal structure of conditional compilation commands started at [{0}] + +ImplicitSystemCast=implicit usage of the SYSTEM.CAST + +CaseWithoutElsePart=CASE statement without ELSE +UnknownOption=undeclared option "{0}" +OptionAlreadyDefined=option "{0}" is already defined +UnknownEquation=undeclared equation "{0}" +EquationAlreadyDefined=equation "{0}" is already defined +ModuleConstructorWillNotBeInvoked=Import of module "{0}" with body to module without body + +StringExpected=string expected + +UnresolvedModuleName=cannot resolve module name "{0}" +CannotFindDefinitionModule=cannot find defintion module "{0}" + +ArrayRecotdSimpleAgregate=(array or record or simple aggregate) +ObsoleteTypeCast=(obsolete type cast) +ReadOnlyTag=(read-only tag) +SpecialKindsParameters=(special kinds of parameters) +ReadOnlyParameters=(read-only parameters) +UnusedParameters=(unused parameters) +ParameterValueByDefault=(parameter value by default) +SeqParameter=(SEQ parameter) +ArrayOfType=(ARRAY OF type) +RenamingInImport=(renaming in import) +ExponentiationOperator=(exponentiation operator) +IsoPragmaSyntax=(ISO pragma syntax) +UseOptionCppComments=, use the CPPCOMMENTS option +UseCppLineComments=, use "//" instead of "--" +UseCppBlockComments=, use "/*" instead of "*)" + +DefinitionModuleOption=option "{0}" is allowed only within definition module +KeywordDisabledByK26Option=usage of "{0}" keyword is disabled by "K26" option + +ImportFromObjectIllegal=import from object "{0}" is illegal + + +OutlineNodeText_ImportList=import list +OutlineNodeText_VariantRecord=variant record +OutlineNodeText_Variant=variant + +ImportCycleDetected=Module %s participate in import cycle : %s \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BlockBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BlockBodySymbol.java new file mode 100644 index 0000000..9169cd6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BlockBodySymbol.java @@ -0,0 +1,59 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.IBlockBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +/** + * Base symbol for special procedures (BEGIN, FINALLY). + * Created for the purpose of the AST access unification (from Outline view). + * + * Direct symbol reference is used, since it cannot be changed from outside + * - so we don't use IModulaSymbolReference here + * + * @author lion + */ +public abstract class BlockBodySymbol extends SymbolWithScope + implements IBlockBodySymbol +{ + private final ProcedureTypeSymbol typeSymbol; + + public BlockBodySymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + typeSymbol = new ProcedureTypeSymbol(name, parentScope); + } + + //-------------------------------------------------------------------------- + // Implementation of IProcedureSymbol interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol getTypeSymbol() { + return typeSymbol; + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getParameters() { + return getTypeSymbol().getParameters(); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReturnTypeSymbol() { + return getTypeSymbol().getReturnTypeSymbol(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BooleanConstantSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BooleanConstantSymbol.java new file mode 100644 index 0000000..3a8191c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/BooleanConstantSymbol.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDefinitions; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; + +public class BooleanConstantSymbol extends ConstantSymbol { + + private final boolean value; + + public BooleanConstantSymbol( String name, ISymbolWithDefinitions parentScope + , IModulaSymbolReference typeSymbolRef + , boolean value) + { + super(name, parentScope, typeSymbolRef); + this.value = value; + } + + public boolean getValue() { + return value; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ConstantSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ConstantSymbol.java new file mode 100644 index 0000000..e245d6d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ConstantSymbol.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class ConstantSymbol extends ModulaSymbol + implements IConstantSymbol +{ + private IModulaSymbolReference typeSymbolRef; + + public ConstantSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference typeSymbolRef ) + { + super(name, parentScope); + this.typeSymbolRef = typeSymbolRef; + } + + public ConstantSymbol(String name, ISymbolWithScope parentScope) { + this(name, parentScope, null); + } + + /** + * {@inheritDoc} + */ + @Override + public T getTypeSymbol() { + return ReferenceUtils.resolve(typeSymbolRef); + } + + public void setTypeSymbol(IModulaSymbolReference typeSymbolRef) { + this.typeSymbolRef = typeSymbolRef; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/DefinitionModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/DefinitionModuleSymbol.java new file mode 100644 index 0000000..1315527 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/DefinitionModuleSymbol.java @@ -0,0 +1,255 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.symbol.BlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.reference.DefaultReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolverProvider; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.google.common.collect.Lists; + +public class DefinitionModuleSymbol extends SymbolWithDefinitions + implements IDefinitionModuleSymbol + , IReferenceResolverProvider + , IMutableBlockSymbolTextBinding +{ + private final Map> imports; + private final IModulaSymbolUsages symbolUsages; + private final IFileStore sourceFile; + + private IModulaSymbolReference implemantationModuleRef; + + private IReferenceResolver referenceResolver; + private final ParsedModuleKey key; + private final BuildSettings buildSettings; + + public DefinitionModuleSymbol( String name, XdsLanguage language, ParsedModuleKey key + , BuildSettings buildSettings, IFileStore sourceFile + , boolean reconstructed ) + { + super(name, ModulaSymbolCache.getSuperModule(language)); + setLanguage(language); + this.sourceFile = sourceFile; + this.buildSettings = buildSettings; + this.key = key; + imports = new HashMap>(); + symbolUsages = createSymbolUsages(); + referenceResolver = new DefaultReferenceResolver(); + removeAttribute(SymbolAttribute.PERVASIVE); + if (reconstructed) { + addAttribute(SymbolAttribute.RECONSTRUCTED); + } + } + + @Override + public ParsedModuleKey getKey() { + return key; + } + + @Override + public BuildSettings getBuildSettings() { + return buildSettings; + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + return getName(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + return ! isAttributeSet(SymbolAttribute.NOMODULEINIT); + } + + /** + * {@inheritDoc} + * + * TODO : remove when possible + */ + @Deprecated + public IImplemantationModuleSymbol getImplemantationModuleSymbol() { + return ReferenceUtils.resolve(implemantationModuleRef); + } + + /** + * TODO : remove when possible + */ + @Deprecated + public void setImplemantationModule(IModulaSymbolReference implemantationModuleRef) { + this.implemantationModuleRef = implemantationModuleRef; + } + + + /** + * {@inheritDoc} + */ + @Override + public IFileStore getSourceFile() { + return sourceFile; + } + + /** + * {@inheritDoc} + */ + @Override + public void addImport(IModulaSymbolReference symbolRef) { + IModulaSymbol s = ReferenceUtils.resolve(symbolRef); + if (s != null) { + imports.put(s.getName(), symbolRef); + } + } + + public Collection getImports() { + return ReferenceUtils.transformToSymbols(imports.values()); + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol symbol = super.findSymbolInScope(name); + if (symbol == null) { + symbol = ReferenceUtils.resolve(imports.get(name)); + } + return symbol; + } + + + /** + * Searches for symbol which is exported from the symbol's scope. + * + * @param symbolName the name of symbol which is to be searched + * @return the first exported symbol with specified name, or + * {@code null} if there is no such symbol. + */ + public IModulaSymbol findExportedSymbol(String name) { + IModulaSymbol symbol = ReferenceUtils.resolve(imports.get(name)); + if (symbol == null) { + symbol = findSymbolInScope(name); + } + else { + symbol = null; + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getExportedSymbols() { + return Lists.newArrayList(this); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + acceptChildren(visitor); + } + } + + /** + * ------------------------------------------------------------------------- + * Implementation of IModulaSymbolUsages interface + * ------------------------------------------------------------------------- + */ + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsedSymbols() { + return symbolUsages.getUsedSymbols(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getSymbolUsages(IModulaSymbol symbol) { + return symbolUsages.getSymbolUsages(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + symbolUsages.addSymbolUsage(symbol, usagePosition); + } + + protected IModulaSymbolUsages createSymbolUsages() { + return new ModulaSymbolUsages(); + } + + @Override + public IReferenceResolver getReferenceResolver() { + return referenceResolver; + } + + + //------------------------------------------------------------------------- + // Symbol's location in the source text + //------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + protected IMutableBlockSymbolTextBinding createSymbolTextBinding() { + return new BlockSymbolTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public IMutableBlockSymbolTextBinding getTextBinding() { + return (BlockSymbolTextBinding)super.getTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getNameTextRegions() { + return getTextBinding().getNameTextRegions(); + } + + public void addNameTextRegion(ITextRegion region) { + getTextBinding().addNameTextRegion(region); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/EnumElementSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/EnumElementSymbol.java new file mode 100644 index 0000000..f4feb09 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/EnumElementSymbol.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; + +public class EnumElementSymbol extends WholeConstantSymbol + implements IEnumElementSymbol +{ + + public EnumElementSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference typeSymbolRef + , long value ) + { + super(name, parentScope, typeSymbolRef, value); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = null; + + IEnumTypeSymbol typeSymbol = getTypeSymbol(); + if (typeSymbol != null) { + qualifiedName = typeSymbol.getQualifiedName() + "."; //$NON-NLS-1$; + } + + if (qualifiedName == null) { + ISymbolWithScope parentScope = getParentScope(); + if (parentScope != null) { + qualifiedName = parentScope.getQualifiedName() + "."; //$NON-NLS-1$ + } + else { + qualifiedName = ""; //$NON-NLS-1$ + } + } + + qualifiedName += getName() + getNameCollosionId(); + return qualifiedName; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FinallyBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FinallyBodySymbol.java new file mode 100644 index 0000000..811b0c1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FinallyBodySymbol.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IFinallyBodySymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class FinallyBodySymbol extends BlockBodySymbol + implements IFinallyBodySymbol +{ + public FinallyBodySymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + //-------------------------------------------------------------------------- + // Implementation of IProcedureSymbol interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPublic() { + return false; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FormalParameterSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FormalParameterSymbol.java new file mode 100644 index 0000000..9363674 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/FormalParameterSymbol.java @@ -0,0 +1,130 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class FormalParameterSymbol extends ModulaSymbol + implements IFormalParameterSymbol +{ + private IModulaSymbolReference typeSymbolRef; + private int number; + + public FormalParameterSymbol(String name, int number, IProcedureTypeSymbol parentScope) { + this(name, number, parentScope, null); + } + + public FormalParameterSymbol( String name, int number, IProcedureTypeSymbol parentScope + , IModulaSymbolReference typeSymbolRef ) + { + super(name, parentScope); + this.typeSymbolRef = typeSymbolRef; + this.number = number; + } + + public int getNumber() { + return number; + } + + @Override + public String getQualifiedName() { + String qualifiedName = String.format("$param(%s)", getNumber()) + getNameCollosionId(); + ISymbolWithScope parentScope = getParentScope(); + if (parentScope != null) { + qualifiedName = parentScope.getQualifiedName() + "." + qualifiedName; //$NON-NLS-1$ + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getTypeSymbol() { + return ReferenceUtils.resolve(typeSymbolRef); + } + + public void setTypeSymbol(IModulaSymbolReference typeSymbolRef) { + this.typeSymbolRef = typeSymbolRef; + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isVarParameter() { + return isAttributeSet(SymbolAttribute.VAR_PARAMETER); + } + +// public void markAsVarParameter() { +// addAttribute(SymbolAttribute.VAR_PARAMETER); +// } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isNilAllowed() { + return isAttributeSet(SymbolAttribute.NIL_ALLOWED); + } + +// public void markNilAllowed() { +// addAttribute(SymbolAttribute.NIL_ALLOWED); +// } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isSeqParameter() { + return isAttributeSet(SymbolAttribute.SEQ_PARAMETER); + } + +// public void markSeqParameter() { +// addAttribute(SymbolAttribute.SEQ_PARAMETER); +// } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isReadOnly() { + return isAttributeSet(SymbolAttribute.READ_ONLY); + } + +// public void markReadOnly() { +// addAttribute(SymbolAttribute.READ_ONLY); +// } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isDefaultValueEnabled() { + return isAttributeSet(SymbolAttribute.DEFAULT); + } + +// public void markDefaultValueEnabled() { +// addAttribute(SymbolAttribute.DEFAULT); +// } + + + public static String createAnonymousName(int parameterNumber) { + return ANONYMOUS_NAME_TAG + "Arg" + parameterNumber; //$NON-NLS-1$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ImplementationModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ImplementationModuleSymbol.java new file mode 100644 index 0000000..437c73c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ImplementationModuleSymbol.java @@ -0,0 +1,98 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class ImplementationModuleSymbol extends ProgramModuleSymbol + implements IImplemantationModuleSymbol +{ + private IModulaSymbolReference definitionModuleRef; + + public ImplementationModuleSymbol(String name, XdsLanguage language, ParsedModuleKey key, BuildSettings buildSettings, IFileStore sourceFile) { + super(name, language, key, buildSettings, sourceFile); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + DefinitionModuleSymbol definitionModule = ReferenceUtils.resolve(definitionModuleRef); + return (definitionModule == null) + || ! definitionModule.isAttributeSet(SymbolAttribute.NOMODULEINIT); + } + + + /** + * {@inheritDoc} + * TODO : remove when possible + */ + @Deprecated + public DefinitionModuleSymbol getDefinitionModule() { + return ReferenceUtils.resolve(definitionModuleRef); + } + + /** + * TODO : remove when possible + * + * @param definitionModule + */ + @Deprecated + public void setDefinitionModule(DefinitionModuleSymbol definitionModule) { + definitionModuleRef = ReferenceFactory.createRef(definitionModule); + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol symbol = super.findSymbolInScope(name); + DefinitionModuleSymbol definitionModule = ReferenceUtils.resolve(definitionModuleRef); + if ((symbol == null) && (definitionModule != null)) { + symbol = definitionModule.findExportedSymbol(name); + if (symbol instanceof IEnumElementSymbol) + symbol = null; + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getExportedSymbols() { + DefinitionModuleSymbol definitionModule = ReferenceUtils.resolve(definitionModuleRef); + if (definitionModule != null) { + return definitionModule.getExportedSymbols(); + } + return Collections.emptyList(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + super.acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/LocalModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/LocalModuleSymbol.java new file mode 100644 index 0000000..58b382d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/LocalModuleSymbol.java @@ -0,0 +1,152 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolver; +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; + +public class LocalModuleSymbol extends ProgramModuleSymbol + implements ILocalModuleSymbol +{ + private final Map exports; + + public LocalModuleSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope, new ParsedModuleKey(), DefaultBuildSettingsHolder.DefaultBuildSettings, null); + this.exports = new HashMap(); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = getName() + getNameCollosionId(); + ISymbolWithScope parentScope = getParentScope(); + if (parentScope != null) { + qualifiedName = parentScope.getQualifiedName() + "." + qualifiedName; //$NON-NLS-1$ + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isExportQualified() { + return isAttributeSet(SymbolAttribute.QUALIFIED_EXPORT); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInExport(String name) { + return exports.get(name); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getExportedSymbols() { + return exports.values(); + } + + public void addSymbolInExport(IModulaSymbol s) { + if (s != null) { + exports.put(s.getName(), s); + } + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public IFileStore getSourceFile() { + IModuleSymbol parentModule = ModulaSymbolUtils.getHostModule(getParentScope()); + if (parentModule != null) { + return parentModule.getSourceFile(); + } + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public IReferenceResolver getReferenceResolver() { + IModuleSymbol parentModule = ModulaSymbolUtils.getHostModule(getParentScope()); + if (parentModule instanceof IReferenceResolver) { + return (IReferenceResolver)parentModule; + } + return null; + } + + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolScope interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol != null) { + if (isPublic != symbol.isAttributeSet(SymbolAttribute.EXPORTED)) { + symbol = null; + } + } + return symbol; + } + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolUsages interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + * Only global module collects symbols usages information. + */ + @Override + protected IModulaSymbolUsages createSymbolUsages() { + return ModulaSymbolUsages.EMPTY_USAGES; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + super.acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/MainModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/MainModuleSymbol.java new file mode 100644 index 0000000..f3bebe3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/MainModuleSymbol.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.Collections; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IMainModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class MainModuleSymbol extends ProgramModuleSymbol + implements IMainModuleSymbol +{ + public MainModuleSymbol(String name, XdsLanguage language, ParsedModuleKey key, BuildSettings buildSettings, IFileStore sourceFile) + { + super(name, language, key, buildSettings, sourceFile); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getExportedSymbols() { + return Collections.emptyList(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + super.acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbol.java new file mode 100644 index 0000000..a7a11a1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbol.java @@ -0,0 +1,326 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.EnumSet; +import java.util.Iterator; + +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.commons.symbol.IMutableSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.Symbol; +import com.excelsior.xds.parser.commons.symbol.SymbolTextBinding; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; + +/** + * Base class to represents a Modula-2/Oberon-2 entity from the source code. + */ +public abstract class ModulaSymbol extends Symbol + implements IModulaSymbol + , IMutableSymbolTextBinding +{ + /** Binding to the location in the source text. */ + private final IMutableSymbolTextBinding textBinding; + + private XdsLanguage language; + private EnumSet attributes; + + /** unique identifier to resolve collision of qualified name */ + private String nameCollosionId = null; + + /** + * Creates new Modula-2 symbol with given name and parent scope and + * propagates attributes from the parent scope. + * + * @param name - name of the symbol + * @param parentScope - the parent scope of the symbol + */ + public ModulaSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + textBinding = createSymbolTextBinding(); + language = parentScope != null ? parentScope.getLanguage() : XdsLanguage.Modula2; + attributes = EnumSet.noneOf(SymbolAttribute.class); + if (parentScope != null) { + if (parentScope instanceof IDefinitionModuleSymbol) { + attributes.add(SymbolAttribute.PUBLIC); + } + if (parentScope instanceof IStandardModuleSymbol) { + attributes.add(SymbolAttribute.PERVASIVE); + } + if (parentScope.isAttributeSet(SymbolAttribute.RECONSTRUCTED)) { + attributes.add(SymbolAttribute.RECONSTRUCTED); + } + } + if ((name == null) || (name.contains(ANONYMOUS_NAME_TAG))) { + attributes.add(SymbolAttribute.ANONYMOUS_NAME); + } + } + + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = getName() + getNameCollosionId(); + ISymbolWithScope parentScope = getParentScope(); + if (parentScope != null) { + qualifiedName = parentScope.getQualifiedName() + "." + qualifiedName; //$NON-NLS-1$ + } + return qualifiedName; + } + + /** + * Sets unique identifier to resolve collision of qualified name. + */ + public void setNameCollosionId(int uniqueId) { + this.nameCollosionId = "#" + uniqueId; //$NON-NLS-1$; + } + + /** + * Returns unique identifier to resolve collision of qualified name. + * @return unique identifier + */ + protected String getNameCollosionId() { + if (nameCollosionId == null) { + return ""; //$NON-NLS-1$ + } + return nameCollosionId; + } + + /** + * {@inheritDoc} + */ + @Override + public ISymbolWithScope getParentScope() { + return (ISymbolWithScope)super.getParentScope(); + } + + + /** + * {@inheritDoc} + */ + @Override + public XdsLanguage getLanguage() { + return language; + } + + /** + * {@inheritDoc} + */ + @Override + public void setLanguage(XdsLanguage language) { + this.language = language; + } + + + /** + * {@inheritDoc} + */ + @Override + public EnumSet getAttributes() { + return this.attributes; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isAttributeSet(SymbolAttribute attr) { + return attributes.contains(attr); + } + + /** + * {@inheritDoc} + */ + @Override + public void addAttribute(SymbolAttribute attr) { + attributes.add(attr); + } + + /** + * {@inheritDoc} + */ + @Override + public void addAttributes(EnumSet attrs) { + this.attributes.addAll(attrs); + } + + /** + * {@inheritDoc} + */ + @Override + public void setAttributes(EnumSet attrs) { + this.attributes.clear(); + this.attributes.addAll(attrs); + } + + /** + * {@inheritDoc} + */ + @Override + public void removeAttribute(SymbolAttribute attr) { + attributes.remove(attr); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isAnonymous() { + return attributes.contains(SymbolAttribute.ANONYMOUS_NAME); + } + + + //------------------------------------------------------------------------- + // Symbol's location in the source text + //------------------------------------------------------------------------- + + protected IMutableSymbolTextBinding createSymbolTextBinding() { + return new SymbolTextBinding(); + } + + public IMutableSymbolTextBinding getTextBinding() { + return textBinding; + } + + /** + * {@inheritDoc} + */ + @Override + public TextPosition getPosition() { + return getTextBinding().getPosition(); + } + + /** + * Sets position in which symbol is defined. + * + * @param defPosition position in which symbol is defined. + */ + public void setPosition(TextPosition defPosition) { + getTextBinding().setPosition(defPosition); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITextRegion getNameTextRegion() { + ITextRegion nameRegion = getTextBinding().getNameTextRegion(); + if ((nameRegion == null) && !isAnonymous()) { + TextPosition position = getTextBinding().getPosition(); + if ((position != null) && StringUtils.isNotEmpty(getName())) { + nameRegion = new TextRegion(position.getOffset(), getName().length()); + getTextBinding().setNameTextRegion(nameRegion); + } + } + return nameRegion; + } + + /** + * {@inheritDoc} + */ + @Override + public void setNameTextRegion(ITextRegion region) { + getTextBinding().setNameTextRegion(region); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITextRegion getDeclarationTextRegion() { + return getTextBinding().getDeclarationTextRegion(); + } + + /** + * Sets text region in which symbol is defined. + * + * @param region the text region. + */ + public void setDeclarationTextRegion(ITextRegion region) { + getTextBinding().setDeclarationTextRegion(region); + } + + + /** + * Accepts the given visitor on a visit of the current node. + * + * @param visitor the visitor object + */ + public final void accept(ModulaSymbolVisitor visitor) { + if (visitor == null) { + throw new IllegalArgumentException(); + } + // begin with the generic pre-visit + if (visitor.preVisit(this)) { + // dynamic dispatch to internal method for type-specific visit/endVisit + doAccept(visitor); + } + // end with the generic post-visit + visitor.postVisit(this); + } + + /** + * Accepts the given visitor on a type-specific visit of the current node. + * This method must be implemented in all concrete PST node types. + * + * @param visitor the visitor object + */ + protected abstract void doAccept(ModulaSymbolVisitor visitor); + + /** + * Accepts the given visitor on a visit of the current node. + *

+ * This method should be used by the concrete implementations of + * doAccept to traverse optional child node. Equivalent + * to child.accept(visitor) if child + * is not null. + *

+ * + * @param visitor the visitor object + * @param child the child ModulaSymbol node to dispatch too, + * or null if none + */ + protected final void acceptChild(ModulaSymbolVisitor visitor, IModulaSymbol child) + { + if (child != null) { + child.accept(visitor); + } + } + + /** + * Accepts the given visitor on a visit of the given collection of + * child nodes. + *

+ * This method must be used by the concrete implementations of + * doAccept to traverse the collection of child nodes. + *

+ * + * @param visitor the visitor object + * @param children the collection of child ModulaSymbol node to dispatch too, + * or null if none + */ + protected final void acceptChildren( ModulaSymbolVisitor visitor + , Collection children ) + { + if (children != null) { + Iterator cursor = children.iterator(); + while (cursor.hasNext()) { + IModulaSymbol child = (IModulaSymbol) cursor.next(); + child.accept(visitor); + } + } + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbolUsages.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbolUsages.java new file mode 100644 index 0000000..0e6daf6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModulaSymbolUsages.java @@ -0,0 +1,99 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class ModulaSymbolUsages implements IModulaSymbolUsages +{ + private final Map, List> symbolUsageTable; + + public ModulaSymbolUsages() { + symbolUsageTable = new HashMap, List>(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsedSymbols() { + return ReferenceUtils.transformToSymbols(symbolUsageTable.keySet()); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getSymbolUsages(IModulaSymbol symbol) { + return internalGetSymbolUsages(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + List sumbolUsages = internalGetSymbolUsages(symbol); + if (sumbolUsages == null) { + sumbolUsages = new ArrayList(); + symbolUsageTable.put(ReferenceFactory.createRef(symbol), sumbolUsages); + } + + int idx = Collections.binarySearch(sumbolUsages, usagePosition, new Comparator() { + @Override + public int compare(TextPosition o1, TextPosition o2) { + return o1.getOffset() - o2.getOffset(); + } + }); + int insertionPoint = -(1 + idx); // maintain sorted order + sumbolUsages.add(insertionPoint, usagePosition); + } + + private List internalGetSymbolUsages(IModulaSymbol symbol) { + return symbolUsageTable.get(ReferenceFactory.createRef(symbol)); + } + + /** + * The empty symbol usages (immutable). + */ + public static final IModulaSymbolUsages EMPTY_USAGES = new EmptySymbolUsages(); + + private static class EmptySymbolUsages implements IModulaSymbolUsages + { + /** + * {@inheritDoc} + */ + @Override + public Collection getUsedSymbols() { + return Collections.emptyList(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getSymbolUsages(IModulaSymbol symbol) { + return Collections.emptyList(); + } + + /** + * {@inheritDoc} + */ + @Override + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + throw new UnsupportedOperationException("Immutable empty symbol usages information"); //$NON-NLS-1$ + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleAliasSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleAliasSymbol.java new file mode 100644 index 0000000..cb46c7e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleAliasSymbol.java @@ -0,0 +1,104 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Iterator; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class ModuleAliasSymbol extends ModulaSymbol + implements IModuleAliasSymbol +{ + private IModulaSymbolReference referenceSymbolRef; + + + public ModuleAliasSymbol(String name, IModuleSymbol parentScope) { + super(name, parentScope); + } + + /** + * {@inheritDoc} + */ + @Override + public IModuleSymbol getReference() { + return ReferenceUtils.resolve(referenceSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public void setReference(IModulaSymbolReference referenceSymbolRef) { + this.referenceSymbolRef = referenceSymbolRef; + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol resolveName(String name) { + IModulaSymbol symbol; + IModuleSymbol reference = ReferenceUtils.resolve(referenceSymbolRef); + if (reference != null) { + symbol = reference.resolveName(name); + } + else { + symbol = null; + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol symbol; + IModuleSymbol reference = ReferenceUtils.resolve(referenceSymbolRef); + if (reference != null) { + symbol = reference.findSymbolInScope(name); + } + else { + symbol = null; + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic) { + IModulaSymbol symbol; + IModuleSymbol reference = ReferenceUtils.resolve(referenceSymbolRef); + if (reference != null) { + symbol = reference.findSymbolInScope(symbolName, isPublic); + } + else { + symbol = null; + } + return symbol; + } + + @Override + public Iterator iterator() { + IModuleSymbol reference = ReferenceUtils.resolve(referenceSymbolRef); + Iterator iterator; + if (reference != null) { + iterator = reference.iterator(); + } + else { + iterator = null; + } + return iterator; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleBodySymbol.java new file mode 100644 index 0000000..57e484b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ModuleBodySymbol.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IModuleBodySymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class ModuleBodySymbol extends BlockBodySymbol + implements IModuleBodySymbol +{ + public ModuleBodySymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + + //-------------------------------------------------------------------------- + // Implementation of IProcedureSymbol interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPublic() { + return false; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDeclarationSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDeclarationSymbol.java new file mode 100644 index 0000000..b1e2df5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDeclarationSymbol.java @@ -0,0 +1,157 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.type.OberonMethodTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; + +public class OberonMethodDeclarationSymbol extends ProcedureDeclarationSymbol + implements IOberonMethodDeclarationSymbol +{ + public OberonMethodDeclarationSymbol( String name + , IModulaSymbolReference typeSymbolRef + , ISymbolWithScope parent) + { + super(name, typeSymbolRef, parent); + } + + public OberonMethodDeclarationSymbol( OberonMethodDefinitionSymbol forwarDeclaration + , ISymbolWithScope parent ) + { + super(forwarDeclaration, parent); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + IOberonMethodReceiverSymbol receiverSymbol = getReceiverSymbol(); + if (receiverSymbol == null) { + return null; + } + return QualifiedNameFactory.getOberonQualifiedName( + getName() + getNameCollosionId(), receiverSymbol, getParentScope() + ); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodTypeSymbol getTypeSymbol() { + return (IOberonMethodTypeSymbol)super.getTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return false; + } + + + /** + * {@inheritDoc} + */ + @Override + public void finalizeDeclaration (IModulaSymbolReference typeSymbolRef) throws IllegalArgumentException + { + ProcedureTypeSymbol s = ReferenceUtils.resolve(typeSymbolRef); + if (s instanceof OberonMethodTypeSymbol) { + super.finalizeDeclaration(typeSymbolRef); + } + else { + throw new IllegalArgumentException("Argument must be an instance of OberonMethodTypeSymbol"); //$NON-NLS-1$ + } + } + + /** + * {@inheritDoc} + */ + @Override + public void addForwardDeclaration(IStaticModulaSymbolReference forwardDeclSymbolRef) throws IllegalArgumentException { + ProcedureDefinitionSymbol forwardDeclSymbol = ReferenceUtils.resolve(forwardDeclSymbolRef); + if (forwardDeclSymbol instanceof IOberonMethodDefinitionSymbol) { + super.addForwardDeclaration(forwardDeclSymbolRef); + } + else { + throw new IllegalArgumentException("Argument must be an instance of IOberonMethodDefinitionSymbol"); //$NON-NLS-1$ + } + } + + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodReceiverSymbol getReceiverSymbol() { + IOberonMethodTypeSymbol typeSymbol = getTypeSymbol(); + if (typeSymbol == null) { + return null; + } + return typeSymbol.getReceiverSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodDefinitionSymbol getDefinitionSymbol() { + return (IOberonMethodDefinitionSymbol)super.getDefinitionSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public void setDefinitionSymbol(IModulaSymbolReference definitionSymbolRef) throws IllegalArgumentException + { + IProcedureDefinitionSymbol definitionSymbol = ReferenceUtils.resolve(definitionSymbolRef); + if (definitionSymbol instanceof IOberonMethodDefinitionSymbol) { + super.setDefinitionSymbol(definitionSymbolRef); + } + else { + throw new IllegalArgumentException("Argument must be an instance of IOberonMethodDefinitionSymbol"); //$NON-NLS-1$ + } + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(final String name) { + IModulaSymbol symbol = getReceiverSymbol(); + boolean notFound = (symbol == null) || !symbol.getName().equals(name); + if (notFound) { + symbol = super.findSymbolInScope(name); + } + return symbol; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + super.acceptChild(visitor, getReceiverSymbol()); + super.acceptChildren(visitor); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDefinitionSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDefinitionSymbol.java new file mode 100644 index 0000000..e85f37a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodDefinitionSymbol.java @@ -0,0 +1,112 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; + +public class OberonMethodDefinitionSymbol extends ProcedureDefinitionSymbol + implements IOberonMethodDefinitionSymbol +{ + public OberonMethodDefinitionSymbol( String name, ISymbolWithScope parent + , IStaticModulaSymbolReference typeSymbolRef ) + { + super(name, parent, typeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = QualifiedNameFactory.getOberonQualifiedName( + getName() + getNameCollosionId(), getReceiverSymbol(), getParentScope() + ); + if (isAttributeSet(SymbolAttribute.FORWARD_DECLARATION)) { + qualifiedName = QualifiedNameFactory.getQualifiedName(qualifiedName, SymbolAttribute.FORWARD_DECLARATION); + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodTypeSymbol getTypeSymbol() { + return (IOberonMethodTypeSymbol)super.getTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodReceiverSymbol getReceiverSymbol() { + return getTypeSymbol().getReceiverSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodDeclarationSymbol getDeclarationSymbol() { + return (IOberonMethodDeclarationSymbol)super.getDeclarationSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public void setDeclarationSymbol(IModulaSymbolReference declarationSymbolRef) throws IllegalArgumentException + { + IProcedureDeclarationSymbol declarationSymbol = ReferenceUtils.resolve(declarationSymbolRef); + if (declarationSymbol instanceof IOberonMethodDeclarationSymbol) { + super.setDeclarationSymbol(declarationSymbolRef); + } + else { + throw new IllegalArgumentException("Argument must be an instance of IOberonMethodDeclarationSymbol"); //$NON-NLS-1$ + } + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(final String name) { + IModulaSymbol symbol = getReceiverSymbol(); + if ((symbol == null) || !symbol.equals(name)) { + symbol = super.findSymbolInScope(name); + } + return symbol; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + super.acceptChild(visitor, getReceiverSymbol()); + super.acceptChildren(visitor); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodReceiverSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodReceiverSymbol.java new file mode 100644 index 0000000..c7614b5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/OberonMethodReceiverSymbol.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class OberonMethodReceiverSymbol extends FormalParameterSymbol + implements IOberonMethodReceiverSymbol +{ + public OberonMethodReceiverSymbol( String name + , IOberonMethodTypeSymbol parentScope + , IModulaSymbolReference typeSymbolRef ) + { + super(name, -1, parentScope, typeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol getBoundTypeSymbol() { + ITypeSymbol receiverTypeSymbol = getTypeSymbol(); + + if (receiverTypeSymbol instanceof IPointerTypeSymbol) { + receiverTypeSymbol = ((IPointerTypeSymbol)receiverTypeSymbol).getBoundTypeSymbol(); + } + + if (receiverTypeSymbol instanceof IForwardTypeSymbol) { + ITypeSymbol actialTypeSymbol = ((IForwardTypeSymbol)receiverTypeSymbol).getActualTypeSymbol(); + if (actialTypeSymbol != null) { + receiverTypeSymbol = actialTypeSymbol; + } + } + + if (receiverTypeSymbol instanceof IRecordTypeSymbol) { + return (IRecordTypeSymbol)receiverTypeSymbol; + } + return null; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureBodySymbol.java new file mode 100644 index 0000000..253e73f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureBodySymbol.java @@ -0,0 +1,53 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class ProcedureBodySymbol extends BlockBodySymbol + implements IProcedureBodySymbol +{ + public ProcedureBodySymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + + //-------------------------------------------------------------------------- + // Implementation of IProcedureSymbol interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + IModulaSymbol parentScope = getParentScope(); + if (parentScope instanceof IProcedureSymbol) { + return ((IProcedureSymbol)parentScope).isLocal(); + } + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPublic() { + IModulaSymbol parentScope = getParentScope(); + if (parentScope instanceof IProcedureSymbol) { + return ((IProcedureSymbol)parentScope).isPublic(); + } + return false; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDeclarationSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDeclarationSymbol.java new file mode 100644 index 0000000..9660dd6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDeclarationSymbol.java @@ -0,0 +1,229 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.parser.commons.symbol.BlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class ProcedureDeclarationSymbol extends SymbolWithDeclarations + implements IProcedureDeclarationSymbol + , IMutableBlockSymbolTextBinding +{ + protected IModulaSymbolReference typeSymbolRef; + private IModulaSymbolReference bodySymbolRef; + + /** Procedure forward declarations have the same life time as the procedure symbol */ + private final List> forwardDeclarations; + + protected IModulaSymbolReference definitionSymbolRef; + + private ProcedureDeclarationSymbol(String name, ISymbolWithScope parent) { + super(name, parent); + forwardDeclarations = new ArrayList>(1); + } + + public ProcedureDeclarationSymbol( String name + , IModulaSymbolReference typeSymbolRef + , ISymbolWithScope parent ) + { + this(name, parent); + finalizeDeclaration(typeSymbolRef); + } + + public ProcedureDeclarationSymbol( ProcedureDefinitionSymbol forwardDeclSymbol + , ISymbolWithScope parent ) + { + this(forwardDeclSymbol.getName(), parent); + forwardDeclarations.add(ReferenceFactory.createStaticRef(forwardDeclSymbol)); + forwardDeclSymbol.setDeclarationSymbol(ReferenceFactory.createStaticRef((IProcedureDeclarationSymbol)this)); + setDefinitionSymbol(ReferenceFactory.createStaticRef((IProcedureDefinitionSymbol)forwardDeclSymbol)); + setLanguage(forwardDeclSymbol.getLanguage()); + setAttributes(forwardDeclSymbol.getAttributes()); + } + + + /** + * {@inheritDoc} + */ + @Override + public IProcedureBodySymbol getProcedureBodySymbol() { + return ReferenceUtils.resolve(bodySymbolRef); + } + + public void setProcedureBodySymbol(IModulaSymbolReference bodySymbolRef) { + this.bodySymbolRef = bodySymbolRef; + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return getParentScope() instanceof IProcedureSymbol; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPublic() { + return isAttributeSet(SymbolAttribute.PUBLIC); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getParameters() { + ProcedureTypeSymbol typeSymbol = ReferenceUtils.resolve(typeSymbolRef); + if (typeSymbol != null) { + return typeSymbol.getParameters(); + } + return forwardDeclarations.get(0).resolve().getParameters(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol getTypeSymbol() { + ProcedureTypeSymbol typeSymbol = ReferenceUtils.resolve(typeSymbolRef); + if (typeSymbol != null) { + return typeSymbol; + } + if (forwardDeclarations.size() == 0) { + return null; + } + return forwardDeclarations.get(0).resolve().getTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReturnTypeSymbol() { + return getTypeSymbol().getReturnTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public IProcedureDefinitionSymbol getDefinitionSymbol() { + return ReferenceUtils.resolve(definitionSymbolRef); + } + + public void setDefinitionSymbol(IModulaSymbolReference definitionSymbolRef) { + this.definitionSymbolRef = definitionSymbolRef; + } + + + /* ------------------------------------------------------------------------- + * Interface used to construct symbol + * ------------------------------------------------------------------------- + */ + + public void finalizeDeclaration (IModulaSymbolReference typeSymbolRef) throws IllegalArgumentException + { + this.typeSymbolRef = typeSymbolRef; + ProcedureTypeSymbol typeSymbol = ReferenceUtils.resolve(typeSymbolRef); + typeSymbol.attach(this); + + setLanguage(typeSymbol.getLanguage()); + addAttributes(typeSymbol.getAttributes()); + removeAttribute(SymbolAttribute.ANONYMOUS_NAME); + removeAttribute(SymbolAttribute.FORWARD_DECLARATION); + } + + public boolean isForwardDeclaration() { + return (typeSymbolRef == null); + } + + public void addForwardDeclaration(IStaticModulaSymbolReference forwardDeclSymbolRef) { + forwardDeclarations.add(forwardDeclSymbolRef); + ProcedureDefinitionSymbol forwardDeclSymbol = ReferenceUtils.resolve(forwardDeclSymbolRef); + + forwardDeclSymbol.setDeclarationSymbol(ReferenceFactory.createStaticRef((IProcedureDeclarationSymbol)this)); + if (definitionSymbolRef == null) { + setDefinitionSymbol(ReferenceFactory.createStaticRef((IProcedureDefinitionSymbol)forwardDeclSymbol)); + } + } + + public Collection getForwardDeclarations() { + return forwardDeclarations.stream().map(ReferenceUtils::resolve).collect(Collectors.toList()); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + acceptChildren(visitor); + } + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + super.acceptChildren(visitor, getParameters()); + super.acceptChild(visitor, getReturnTypeSymbol()); + super.acceptChildren(visitor); + } + + + //------------------------------------------------------------------------- + // Symbol's location in the source text + //------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + protected IMutableBlockSymbolTextBinding createSymbolTextBinding() { + return new BlockSymbolTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public IMutableBlockSymbolTextBinding getTextBinding() { + return (BlockSymbolTextBinding)super.getTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getNameTextRegions() { + return getTextBinding().getNameTextRegions(); + } + + public void addNameTextRegion(ITextRegion region) { + getTextBinding().addNameTextRegion(region); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDefinitionSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDefinitionSymbol.java new file mode 100644 index 0000000..3273139 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProcedureDefinitionSymbol.java @@ -0,0 +1,121 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class ProcedureDefinitionSymbol extends SymbolWithScope + implements IProcedureDefinitionSymbol +{ + /** Procedure type symbol is implementation level entity and has the same life time as the procedure symbol */ + protected final IStaticModulaSymbolReference typeSymbolRef; + protected IModulaSymbolReference declarationSymbolRef; + + public ProcedureDefinitionSymbol( String name, ISymbolWithScope parent + , IStaticModulaSymbolReference typeSymbolRef) + { + super(name, parent); + this.typeSymbolRef = typeSymbolRef; + ProcedureTypeSymbol typeSymbol = ReferenceUtils.resolve(typeSymbolRef); + typeSymbol.attach(this); + setAttributes(typeSymbol.getAttributes()); + removeAttribute(SymbolAttribute.ANONYMOUS_NAME); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = super.getQualifiedName(); + if (isAttributeSet(SymbolAttribute.FORWARD_DECLARATION)) { + qualifiedName = QualifiedNameFactory.getQualifiedName(qualifiedName, SymbolAttribute.FORWARD_DECLARATION); + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return getParentScope() instanceof IProcedureSymbol; + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPublic() { + return isAttributeSet(SymbolAttribute.PUBLIC); + } + + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol getTypeSymbol() { + return ReferenceUtils.resolve(typeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getParameters() { + return getTypeSymbol().getParameters(); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReturnTypeSymbol() { + return getTypeSymbol().getReturnTypeSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IProcedureDeclarationSymbol getDeclarationSymbol() { + return ReferenceUtils.resolve(declarationSymbolRef); + } + + public void setDeclarationSymbol(IModulaSymbolReference declarationSymbolRef) { + this.declarationSymbolRef = declarationSymbolRef; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + acceptChildren(visitor); + } + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + super.acceptChildren(visitor, getParameters()); + super.acceptChild(visitor, getReturnTypeSymbol()); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProgramModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProgramModuleSymbol.java new file mode 100644 index 0000000..bd38cf2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/ProgramModuleSymbol.java @@ -0,0 +1,287 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import org.apache.commons.collections.iterators.FilterIterator; +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.symbol.BlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.reference.DefaultReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolverProvider; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IFinallyBodySymbol; +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; +import com.excelsior.xds.parser.modula.symbol.IModuleBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IProgramModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.google.common.collect.Lists; + +public class ProgramModuleSymbol extends SymbolWithDeclarations + implements IProgramModuleSymbol + , IReferenceResolverProvider + , IMutableBlockSymbolTextBinding +{ + private final Map localModules; + private final Map> imports; + + private final IModulaSymbolUsages symbolUsages; + private final IReferenceResolver referenceResolver; + + private IFileStore sourceFile; + + private IStaticModulaSymbolReference moduleBodySymbolRef; + private IStaticModulaSymbolReference finallyBodySymbolRef; + private final BuildSettings buildSettings; + + private final ParsedModuleKey key; + + protected ProgramModuleSymbol(String name, ISymbolWithScope parentScope, ParsedModuleKey key, BuildSettings buildSettings, IFileStore sourceFile) { + super(name, parentScope); + this.sourceFile = sourceFile; + this.buildSettings = buildSettings; + this.key = key; + localModules = new HashMap(); + imports = new HashMap>(); + attach(localModules); + symbolUsages = createSymbolUsages(); + referenceResolver = new DefaultReferenceResolver(); + removeAttribute(SymbolAttribute.PERVASIVE); + } + + public ProgramModuleSymbol(String name, XdsLanguage language, ParsedModuleKey key, BuildSettings buildSettings, IFileStore sourceFile) { + this(name, ModulaSymbolCache.getSuperModule(language), key, buildSettings, sourceFile); + setLanguage(language); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + return getName(); + } + + /** + * {@inheritDoc} + */ + @Override + public IModuleBodySymbol getModuleBodySymbol() { + return ReferenceUtils.resolve(moduleBodySymbolRef); + } + + public void setModuleBodySymbol(IModuleBodySymbol symbol) { + moduleBodySymbolRef = ReferenceFactory.createStaticRef(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public IFinallyBodySymbol getFinallyBodySymbol() { + return ReferenceUtils.resolve(finallyBodySymbolRef); + } + + public void setFinallyBodySymbol(IFinallyBodySymbol symbol) { + finallyBodySymbolRef = ReferenceFactory.createStaticRef(symbol); + } + + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + return true; + } + + /** + * {@inheritDoc} + */ + @Override + public IFileStore getSourceFile() { + return sourceFile; + } + + @Override + public ParsedModuleKey getKey() { + return key; + } + + @Override + public BuildSettings getBuildSettings() { + return buildSettings; + } + + /** + * {@inheritDoc} + */ + @Override + public void addLocalModule(ILocalModuleSymbol s) { + if (s != null) { + localModules.put(s.getName(), s); + } + } + + public Collection getLocalModules() { + return localModules.values(); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getImports() { + return ReferenceUtils.transformToSymbols(imports.values()); + } + + /** + * {@inheritDoc} + */ + @Override + public void addImport(IModulaSymbolReference ref) { + IModulaSymbol s = ReferenceUtils.resolve(ref); + if (s != null) { + imports.put(s.getName(), ref); + } + } + + + public void acceptChildren(ModulaSymbolVisitor visitor) { + super.acceptChildren(visitor); + acceptChildren(visitor, getLocalModules()); + acceptChild(visitor, getModuleBodySymbol()); + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Collection getExportedSymbols() { + Iterable iterable = () -> { + return new FilterIterator(ProgramModuleSymbol.this.iterator(), o -> !imports.containsValue(o) + && ((IModulaSymbol)o).isAttributeSet(SymbolAttribute.PUBLIC)); + }; + + return Lists.newArrayList(iterable); + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol symbol = super.findSymbolInScope(name); + if (symbol == null) { + symbol = ReferenceUtils.resolve(imports.get(name)); + } + return symbol; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + acceptChildren(visitor); + } + } + + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolUsages interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsedSymbols() { + return symbolUsages.getUsedSymbols(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getSymbolUsages(IModulaSymbol symbol) { + return symbolUsages.getSymbolUsages(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + symbolUsages.addSymbolUsage(symbol, usagePosition); + } + + protected IModulaSymbolUsages createSymbolUsages() { + return new ModulaSymbolUsages(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IReferenceResolver getReferenceResolver() { + return referenceResolver; + } + + + //------------------------------------------------------------------------- + // Symbol's location in the source text + //------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + protected IMutableBlockSymbolTextBinding createSymbolTextBinding() { + return new BlockSymbolTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public IMutableBlockSymbolTextBinding getTextBinding() { + return (BlockSymbolTextBinding)super.getTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getNameTextRegions() { + return getTextBinding().getNameTextRegions(); + } + + public void addNameTextRegion(ITextRegion region) { + getTextBinding().addNameTextRegion(region); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordFieldSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordFieldSymbol.java new file mode 100644 index 0000000..38e0a18 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordFieldSymbol.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class RecordFieldSymbol extends ModulaSymbol + implements IRecordFieldSymbol +{ + private IModulaSymbolReference typeSymbolRef; + + public RecordFieldSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getTypeSymbol() { + return ReferenceUtils.resolve(typeSymbolRef); + } + + public void setTypeSymbol(IModulaSymbolReference typeSymbolRef) { + this.typeSymbolRef = typeSymbolRef; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordVariantSelectorSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordVariantSelectorSymbol.java new file mode 100644 index 0000000..21c98f7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/RecordVariantSelectorSymbol.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; + +public class RecordVariantSelectorSymbol extends RecordFieldSymbol + implements IRecordVariantSelectorSymbol +{ + public RecordVariantSelectorSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardModuleSymbol.java new file mode 100644 index 0000000..df8629f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardModuleSymbol.java @@ -0,0 +1,211 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.symbol.BlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.reference.DefaultReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolverProvider; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; +import com.excelsior.xds.parser.modula.symbol.IStandardModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.google.common.collect.Lists; + +public class StandardModuleSymbol extends SymbolWithDefinitions + implements IStandardModuleSymbol + , IReferenceResolverProvider +{ + private final Map standardProcedures; + private final IModulaSymbolUsages symbolUsages; + private IReferenceResolver referenceResolver; + + public StandardModuleSymbol(String name, boolean isOberon) { + super(name, null); + setLanguage(isOberon ? XdsLanguage.Oberon2 : XdsLanguage.Modula2); + standardProcedures = new HashMap(); + attach(standardProcedures); + symbolUsages = createSymbolUsages(); + referenceResolver = new DefaultReferenceResolver(); + addAttribute(SymbolAttribute.PERVASIVE); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + return getName(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean hasConstructor() { + return false; + } + + /** + * {@inheritDoc} + */ + @Override + public IFileStore getSourceFile() { + return null; + } + + public void add(StandardProcedureSymbol s) { + this.standardProcedures.put(s.getName(), s); + } + + public Collection getStandardProcedures() { + return standardProcedures.values(); + } + + + /** + * ------------------------------------------------------------------------- + * Implementation of IDefinitionModuleSymbol interface + * ------------------------------------------------------------------------- + */ + + /** + * {@inheritDoc} + */ + @Override + public Collection getExportedSymbols() { + return Lists.newArrayList(this); + } + + /** + * ------------------------------------------------------------------------- + * Implementation of ISymbolWithImports interface + * ------------------------------------------------------------------------- + */ + + /** + * {@inheritDoc} + */ + @Override + public void addImport(IModulaSymbolReference ref) { + throw new UnsupportedOperationException("StandardModuleSymbol has no import section"); //$NON-NLS-1$ + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getImports() { + return Collections.emptyList(); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + acceptChildren(visitor, getStandardProcedures()); + acceptChildren(visitor); + } + } + + + /** + * ------------------------------------------------------------------------- + * Implementation of IModulaSymbolUsages interface + * ------------------------------------------------------------------------- + */ + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsedSymbols() { + return symbolUsages.getUsedSymbols(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getSymbolUsages(IModulaSymbol symbol) { + return symbolUsages.getSymbolUsages(symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + symbolUsages.addSymbolUsage(symbol, usagePosition); + } + + protected IModulaSymbolUsages createSymbolUsages() { + return ModulaSymbolUsages.EMPTY_USAGES; + } + + @Override + public IReferenceResolver getReferenceResolver() { + return referenceResolver; + } + + + //------------------------------------------------------------------------- + // Symbol's location in the source text + //------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + protected IMutableBlockSymbolTextBinding createSymbolTextBinding() { + return BlockSymbolTextBinding.EMPTY_TEXT_BINDING; + } + + /** + * {@inheritDoc} + */ + @Override + public IMutableBlockSymbolTextBinding getTextBinding() { + return (IMutableBlockSymbolTextBinding)super.getTextBinding(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getNameTextRegions() { + return getTextBinding().getNameTextRegions(); + } + + public void addNameTextRegion(ITextRegion region) { + getTextBinding().addNameTextRegion(region); + } + + @Override + public ParsedModuleKey getKey() { + return new ParsedModuleKey(getSourceFile()); + } + + @Override + public BuildSettings getBuildSettings() { + return DefaultBuildSettingsHolder.DefaultBuildSettings; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardProcedureSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardProcedureSymbol.java new file mode 100644 index 0000000..2cafe5b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/StandardProcedureSymbol.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IStandardProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class StandardProcedureSymbol extends ModulaSymbol + implements IStandardProcedureSymbol +{ + public StandardProcedureSymbol(String name, StandardModuleSymbol parentScope) { + super(name, parentScope); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDeclarations.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDeclarations.java new file mode 100644 index 0000000..0dce09c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDeclarations.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDeclarations; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public abstract class SymbolWithDeclarations extends SymbolWithDefinitions + implements ISymbolWithDeclarations +{ + private final Map localModules; + + public SymbolWithDeclarations(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + this.localModules = new LinkedHashMap(); + attach(localModules); + } + + /** + * {@inheritDoc} + */ + @Override + public void addLocalModule(ILocalModuleSymbol s) { + if (s != null) { + localModules.put(s.getName(), s); + } + } + + public Collection getLocalModules() { + return localModules.values(); + } + + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolScope interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol symbol = super.findSymbolInScope(name); + if (symbol == null) { + for (ILocalModuleSymbol localModule: getLocalModules()) { + if (!localModule.isExportQualified()) { + symbol = localModule.findSymbolInExport(name); + if (symbol != null) { + break; + } + } + } + } + return symbol; + + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + acceptChildren(visitor, getLocalModules()); + super.acceptChildren(visitor); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDefinitions.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDefinitions.java new file mode 100644 index 0000000..ab53912 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithDefinitions.java @@ -0,0 +1,129 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDefinitions; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public abstract class SymbolWithDefinitions extends SymbolWithProcedures + implements ISymbolWithDefinitions +{ + protected final Map constants; + protected final Map variables; + protected final Map types; + protected final Map enumElements; + + public SymbolWithDefinitions(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + + this.variables = new HashMap(); + this.constants = new HashMap() ; + this.types = new HashMap(); + this.enumElements = new HashMap(); + + attach(variables); + attach(types); + attach(constants); + attach(enumElements); + } + + + /** + * {@inheritDoc} + */ + @Override + public void addConstant(IConstantSymbol s) { + if (s != null) { + constants.put(s.getName(), s); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getConstants() { + return constants.values(); + } + + + /** + * {@inheritDoc} + */ + @Override + public void addEnumElements(IEnumElementSymbol s) { + if (s != null) { + enumElements.put(s.getName(), s); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getEnumElements() { + return enumElements.values(); + } + + /** + * {@inheritDoc} + */ + @Override + public void addVariable(IVariableSymbol s) { + if (s != null) { + variables.put(s.getName(), s); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getVariables() { + return variables.values(); + } + + + /** + * {@inheritDoc} + */ + @Override + public void addType(ITypeSymbol s) { + if (s != null) { + types.put(s.getName(), s); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getTypes() { + return types.values(); + } + + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolScope interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaSymbolVisitor visitor) { + acceptChildren(visitor, getConstants()); + acceptChildren(visitor, getVariables()); + acceptChildren(visitor, getTypes()); + super.acceptChildren(visitor); + } + +} + diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithProcedures.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithProcedures.java new file mode 100644 index 0000000..96eb728 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithProcedures.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithProcedures; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public abstract class SymbolWithProcedures extends SymbolWithScope + implements ISymbolWithProcedures +{ + protected final Map procedures; + + public SymbolWithProcedures(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + procedures = new HashMap(); + attach(procedures); + } + + /** + * {@inheritDoc} + */ + @Override + public void addProcedure(IProcedureSymbol s) { + if (s != null) { + procedures.put(s.getName(), s); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getProcedures() { + return procedures.values(); + } + + protected void acceptChildren(ModulaSymbolVisitor visitor) { + acceptChildren(visitor, getProcedures()); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithScope.java new file mode 100644 index 0000000..3aad764 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SymbolWithScope.java @@ -0,0 +1,77 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Iterator; +import java.util.Map; + +import org.apache.commons.collections.map.CompositeMap; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; + +/** + * A Modula-2/Oberon-2 symbol with its own scope to hold other symbols. + */ +public abstract class SymbolWithScope extends ModulaSymbol + implements ISymbolWithScope +{ + private final CompositeMap allSymbols; + + public SymbolWithScope(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + allSymbols = new CompositeMap(); + } + + public void attach(Map collection) { + allSymbols.addComposited(collection); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol resolveName(String symbolName) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol == null) { + IModulaSymbolScope parentScope = getParentScope(); + if (parentScope != null) { + symbol = parentScope.resolveName(symbolName); + } + } + return symbol; + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + return (IModulaSymbol) allSymbols.get(name); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol != null) { + if (isPublic != symbol.isAttributeSet(SymbolAttribute.PUBLIC)) { + symbol = null; + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Iterator iterator() { + return allSymbols.values().iterator(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbol.java new file mode 100644 index 0000000..ba2a35e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbol.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ISynonymSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public abstract class SynonymSymbol extends ModulaSymbol + implements ISynonymSymbol +{ + private final IModulaSymbolReference originalSymbolRef; + private final IModulaSymbolReference referencedSymbolRef; + + public SynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef + , IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope); + this.originalSymbolRef = originalSymbolRef; + this.referencedSymbolRef = referencedSymbolRef; + T originalSymbol = getOriginalSymbol(); + if (originalSymbol != null) { + setAttributes(originalSymbol.getAttributes()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public T getOriginalSymbol() { + return ReferenceUtils.resolve(originalSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol getReferencedSymbol() { + return ReferenceUtils.resolve(referencedSymbolRef); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbolWithScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbolWithScope.java new file mode 100644 index 0000000..73957f7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/SynonymSymbolWithScope.java @@ -0,0 +1,58 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Iterator; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public abstract class SynonymSymbolWithScope + extends SynonymSymbol + implements ISymbolWithScope +{ + public SynonymSymbolWithScope( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef + , IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName) { + return getOriginalSymbol().findSymbolInScope(symbolName); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic) { + return getOriginalSymbol().findSymbolInScope(symbolName, isPublic); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol resolveName(String symbolName) { + IModulaSymbol s = findSymbolInScope(symbolName); + if (s == null) { + IModulaSymbolScope parentScope = getParentScope(); + if (parentScope != null) { + s = parentScope.resolveName(symbolName); + } + } + return s; + } + + + @Override + public Iterator iterator() { + return getOriginalSymbol().iterator(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/TypeChecker.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/TypeChecker.java new file mode 100644 index 0000000..ef02854 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/TypeChecker.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; + +public class TypeChecker { + public static boolean isSignaturesMatch(IProcedureSymbol p1, IProcedureSymbol p2) { +// if (p1.getParameters().size() != p2.getParameters().size()) { +// return false; +// } +// +// List params1 = p1.getParameters(); +// for (int i = 0; i < params1.size(); i++) { +// +// } + + return true; + } + +// public static boolean isSameType(VariableSymbol var1, VariableSymbol var2) { +// TypeSymbol type1 = var1.getType(); +// TypeSymbol type2 = var2.getType(); +// } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnknownModulaSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnknownModulaSymbol.java new file mode 100644 index 0000000..0f03aa6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnknownModulaSymbol.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; + +public class UnknownModulaSymbol extends ModulaSymbol + implements IInvalidModulaSymbol +{ + public UnknownModulaSymbol(String name, IModulaSymbolScope parentScope) { + super(name, adaptToSymbolWithScope(parentScope)); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } + + static private ISymbolWithScope adaptToSymbolWithScope(IModulaSymbolScope scope) { + while (scope != null) { + if (scope instanceof ISymbolWithScope) { + return (ISymbolWithScope)scope; + } + scope = scope.getParentScope(); + } + return null; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnresovedModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnresovedModuleSymbol.java new file mode 100644 index 0000000..30be54b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/UnresovedModuleSymbol.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolUsages; + +public class UnresovedModuleSymbol extends DefinitionModuleSymbol + implements IInvalidModulaSymbol +{ + public UnresovedModuleSymbol(String name, XdsLanguage language) { + super(name, language, null, DefaultBuildSettingsHolder.DefaultBuildSettings, null, false); + } + + /** + * {@inheritDoc} + */ + @Override + protected IModulaSymbolUsages createSymbolUsages() { + return ModulaSymbolUsages.EMPTY_USAGES; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/VariableSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/VariableSymbol.java new file mode 100644 index 0000000..187971e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/VariableSymbol.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class VariableSymbol extends ModulaSymbol implements IVariableSymbol +{ + private IModulaSymbolReference typeSymbolRef; + + public VariableSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isLocal() { + return !(getParentScope() instanceof IModuleSymbol); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getTypeSymbol() { + return typeSymbolRef.resolve(); + } + + public void setTypeSymbol(IModulaSymbolReference typeSymbolRef) { + this.typeSymbolRef = typeSymbolRef; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WholeConstantSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WholeConstantSymbol.java new file mode 100644 index 0000000..bf40211 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WholeConstantSymbol.java @@ -0,0 +1,28 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.IWholeConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class WholeConstantSymbol extends ConstantSymbol + implements IWholeConstantSymbol +{ + private final long value; + + public WholeConstantSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference typeSymbolRef, long value) + { + super(name, parentScope, typeSymbolRef); + this.value = value; + } + + /** + * {@inheritDoc} + */ + @Override + public long getValue() { + return value; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WithStatementScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WithStatementScope.java new file mode 100644 index 0000000..d00c539 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/WithStatementScope.java @@ -0,0 +1,96 @@ +package com.excelsior.xds.parser.internal.modula.symbol; + +import java.util.Iterator; + +import org.apache.commons.collections.iterators.EmptyIterator; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +/** + * A scope of Modula-2 WITH statement. + */ +public class WithStatementScope implements IModulaSymbolScope +{ + private final IModulaSymbolScope parentScope; + private IModulaSymbolReference withExpressionTypeRef; + + public WithStatementScope(IModulaSymbolReference withExpressionTypeRef, IModulaSymbolScope parentScope) { + this.withExpressionTypeRef = withExpressionTypeRef; + this.parentScope = parentScope; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getParentScope() { + return parentScope; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol resolveName(String symbolName) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol == null) { + IModulaSymbolScope parentScope = getParentScope(); + if (parentScope != null) { + symbol = parentScope.resolveName(symbolName); + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName) { + IModulaSymbol symbol = null; + IRecordTypeSymbol withExpressionType = ReferenceUtils.resolve(withExpressionTypeRef); + if (withExpressionType != null) { + symbol = withExpressionType.findSymbolInScope(symbolName); + } + if (symbol == null) { + IModulaSymbolScope parentScope = getParentScope(); + if (parentScope != null) { + symbol = parentScope.findSymbolInScope(symbolName); + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol != null) { + if (isPublic != symbol.isAttributeSet(SymbolAttribute.PUBLIC)) { + symbol = null; + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @SuppressWarnings("unchecked") + @Override + public Iterator iterator() { + IRecordTypeSymbol withExpressionType = ReferenceUtils.resolve(withExpressionTypeRef); + if (withExpressionType == null) { + return EmptyIterator.INSTANCE; + } + return withExpressionType.iterator(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ChainedReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ChainedReference.java new file mode 100644 index 0000000..4c9e336 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ChainedReference.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import java.util.Collection; +import java.util.Iterator; +import java.util.LinkedList; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IChainedReference; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class ChainedReference implements IModulaSymbolReference, IChainedReference { + private final Collection> referenceChain; + + public ChainedReference(Collection> referenceChain) { + this.referenceChain = new LinkedList>(referenceChain); + } + + @Override + public T resolve() { + T symbol = null; + for (IModulaSymbolReference ref : referenceChain) { + symbol = ReferenceUtils.resolve(ref); + if (symbol != null) { + break; + } + } + return symbol; + } + + @Override + public Iterator> iterator() { + return referenceChain.iterator(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/DefaultReferenceResolver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/DefaultReferenceResolver.java new file mode 100644 index 0000000..1a27bcf --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/DefaultReferenceResolver.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import java.util.HashMap; +import java.util.Map; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public class DefaultReferenceResolver implements IReferenceResolver +{ + private Map locationToSymbol = new HashMap(); + + @Override + public IModulaSymbol resolve(ReferenceLocation location) { + return locationToSymbol.get(location); + } + + @Override + public void addSymbol(IModulaSymbol symbol) { + if (symbol != null) { + ReferenceLocation location = createReferenceLocation(symbol); + IModulaSymbol previousSymbol = locationToSymbol.put(location, symbol); + if (previousSymbol != null && previousSymbol != symbol) { + previousSymbol = (IModulaSymbol)previousSymbol; + } + } + } + + public ReferenceLocation createReferenceLocation(IModulaSymbol symbol) { + if (symbol == null) + return null; + + String refrenceKey = symbol.getQualifiedName(); + if (refrenceKey == null) { + return null; + } + return new ReferenceLocation(refrenceKey); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceFactory.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceFactory.java new file mode 100644 index 0000000..3dc66ae --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceFactory.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public interface IReferenceFactory { + IModulaSymbolReference createRef(T symbol); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolver.java new file mode 100644 index 0000000..02544b9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolver.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public interface IReferenceResolver { + IModulaSymbol resolve(ReferenceLocation location); + + ReferenceLocation createReferenceLocation(IModulaSymbol symbol); + void addSymbol(IModulaSymbol symbol); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolverProvider.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolverProvider.java new file mode 100644 index 0000000..80a0c55 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IReferenceResolverProvider.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +public interface IReferenceResolverProvider +{ + IReferenceResolver getReferenceResolver(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IStaticModulaSymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IStaticModulaSymbolReference.java new file mode 100644 index 0000000..034e3dc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/IStaticModulaSymbolReference.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public interface IStaticModulaSymbolReference extends IModulaSymbolReference +{ + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/InternalReferenceUtils.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/InternalReferenceUtils.java new file mode 100644 index 0000000..87b3420 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/InternalReferenceUtils.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public abstract class InternalReferenceUtils +{ + public static void addSymbolForResolving( IModuleSymbol moduleSymbol + , IModulaSymbol symbol ) + { + IReferenceResolver referenceResolver = getReferenceResolver(moduleSymbol); + if (referenceResolver != null) { + referenceResolver.addSymbol(symbol); + } + } + + public static IReferenceResolver getReferenceResolver(IModuleSymbol moduleSymbol) { + if (moduleSymbol instanceof IReferenceResolverProvider) { + IReferenceResolverProvider referenceResolverProvider = (IReferenceResolverProvider) moduleSymbol; + IReferenceResolver referenceResolver = referenceResolverProvider.getReferenceResolver(); + return referenceResolver; + } + return null; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModulaSymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModulaSymbolReference.java new file mode 100644 index 0000000..f175265 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModulaSymbolReference.java @@ -0,0 +1,122 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +/** + * @author lsa80 + * + * @param + */ +final class ModulaSymbolReference implements IModulaSymbolReference { + private final Class symbolClass; + + private final IModulaSymbolReference moduleReference; + private final ReferenceLocation referenceLocation; + +// private final T symbol; // TODO: symbol reference debug only + + ModulaSymbolReference(IModuleSymbol definingModule, T symbol) { +// this.symbol = symbol; + symbolClass = symbol.getClass(); + + moduleReference = ReferenceFactory.createModuleReference(definingModule); + + IReferenceResolver referenceResolver = InternalReferenceUtils.getReferenceResolver(definingModule); + if (referenceResolver != null) { + referenceLocation = referenceResolver.createReferenceLocation(symbol); + } + else{ + referenceLocation = null; + } + } + + @SuppressWarnings("unchecked") + @Override + public T resolve() { + if (referenceLocation == null) { + return null; + } + + IModuleSymbol moduleSymbol = moduleReference.resolve(); + if (moduleSymbol == null) { + return null; + } + + IReferenceResolver referenceResolver = InternalReferenceUtils.getReferenceResolver(moduleSymbol); + if (referenceResolver == null) { + return null; + } + + IModulaSymbol symbol = referenceResolver.resolve(referenceLocation); + if (symbol == null) { + return null; + } + + // if expected class is IInvalidModulaSymbol - then we are dealing with invalid symbol => dont try to check symbolClass + if (!isInvalidSymbolClass(symbolClass) && !symbolClass.isAssignableFrom(symbol.getClass())) { + return null; + } + + return (T) symbol; + } + + private static boolean isInvalidSymbolClass(Class c) { + return IInvalidModulaSymbol.class.isAssignableFrom(c); + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime + * result + + ((moduleReference == null) ? 0 : moduleReference + .hashCode()); + result = prime + * result + + ((referenceLocation == null) ? 0 : referenceLocation + .hashCode()); + result = prime * result + + ((symbolClass == null) ? 0 : symbolClass.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + @SuppressWarnings("unchecked") + ModulaSymbolReference other = (ModulaSymbolReference) obj; + if (moduleReference == null) { + if (other.moduleReference != null) + return false; + } else if (!moduleReference.equals(other.moduleReference)) + return false; + if (referenceLocation == null) { + if (other.referenceLocation != null) + return false; + } else if (!referenceLocation.equals(other.referenceLocation)) + return false; + if (symbolClass == null) { + if (other.symbolClass != null) + return false; + } else if (!symbolClass.equals(other.symbolClass)) + return false; + return true; + } + + @Override + public String toString() { + return "ModulaSymbolReference [symbolClass=" + symbolClass + + ", moduleReference=" + moduleReference + + ", referenceLocation=" + referenceLocation + "]"; + } + } \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModuleReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModuleReference.java new file mode 100644 index 0000000..ef7f092 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ModuleReference.java @@ -0,0 +1,64 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public class ModuleReference implements IModulaSymbolReference { + + private ParsedModuleKey parsedModuleKey; + private final Class symbolClass; + + ModuleReference(IModuleSymbol moduleSymbol){ + parsedModuleKey = moduleSymbol.getKey(); + symbolClass = moduleSymbol.getClass(); + } + + @Override + public IModuleSymbol resolve() { + IModuleSymbol moduleSymbol = ModulaSymbolCache.instance().getModuleSymbol(parsedModuleKey); + if (moduleSymbol == null || !symbolClass.equals(moduleSymbol.getClass())) { + return null; + } + return moduleSymbol; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((parsedModuleKey == null) ? 0 : parsedModuleKey.hashCode()); + result = prime * result + + ((symbolClass == null) ? 0 : symbolClass.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModuleReference other = (ModuleReference) obj; + if (parsedModuleKey == null) { + if (other.parsedModuleKey != null) + return false; + } else if (!parsedModuleKey.equals(other.parsedModuleKey)) + return false; + if (symbolClass == null) { + if (other.symbolClass != null) + return false; + } else if (!symbolClass.equals(other.symbolClass)) + return false; + return true; + } + + @Override + public String toString() { + return "ModuleReference [moduleFile=" + parsedModuleKey.moduleFile + "]"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/NullModulaSymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/NullModulaSymbolReference.java new file mode 100644 index 0000000..0c9f7ab --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/NullModulaSymbolReference.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +final class NullModulaSymbolReference implements IModulaSymbolReference{ + @Override + public IModulaSymbol resolve() { + return null; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ProxyReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ProxyReference.java new file mode 100644 index 0000000..63f5909 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ProxyReference.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.IProxyReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +public class ProxyReference implements IProxyReference +{ + private IModulaSymbolReference reference; + + public ProxyReference(IModulaSymbolReference reference) { + this.reference = reference; + } + + @Override + public T resolve() { + return ReferenceUtils.resolve(reference); + } + + @Override + public void setReference(IModulaSymbolReference reference) { + this.reference = reference; + } + + @Override + public IModulaSymbolReference getReference() { + return reference; + } + + @Override + public String toString() { + return String.format("ProxyReference [reference=%s]", reference); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceFactory.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceFactory.java new file mode 100644 index 0000000..775669b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceFactory.java @@ -0,0 +1,87 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import java.util.List; + +import com.excelsior.xds.parser.internal.modula.symbol.UnresovedModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IChainedReference; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.IProxyReference; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; + +public abstract class ReferenceFactory +{ + private static final NullModulaSymbolReference NULL_SYMBOL_REFERENCE = new NullModulaSymbolReference(); + + public static IModulaSymbolReference createRef(final T symbol) { + return internalCreateRefence(symbol); + } + + @SuppressWarnings("unchecked") + public static IModulaSymbolReference + createRef(final T symbol, Class resultType) + { + return (IModulaSymbolReference)internalCreateRefence(symbol); + } + + /** + * Creates reference with trivial implementation, which stores the symbol and returns it on demand. + * This will work on with immutable symbols, like one from system module. + * @param symbol + * @return + */ + public static IStaticModulaSymbolReference createStaticRef(final T symbol) { + return new StaticModulaSymbolReference(symbol); + } + + public static IProxyReference createProxyRef(IModulaSymbolReference innerReference) { + return new ProxyReference(innerReference); + } + + public static IChainedReference createChainedRef(List> refs) { + return new ChainedReference(refs); + } + + @SuppressWarnings("unchecked") + public static IModulaSymbolReference nullReference() { + return (IModulaSymbolReference)NULL_SYMBOL_REFERENCE; + } + + private static IModulaSymbolReference + internalCreateRefence(final T symbol) + { + if (symbol == null) { + return nullReference(); + } + else{ + IModuleSymbol definingModule = ModulaSymbolUtils.getHostModule(symbol); + if (definingModule == null) { // this is possible for symbols having + // parentScope = null. TODO : how this is possible + return nullReference(); + } + if (definingModule == symbol) { + return createModuleReference((IModuleSymbol)symbol); + } + return new ModulaSymbolReference(definingModule, symbol); + } + } + + @SuppressWarnings("unchecked") + static IModulaSymbolReference + createModuleReference(IModuleSymbol definingModule) + { + IModulaSymbolReference moduleReference; + boolean isStaticModeule = (definingModule instanceof IStandardModuleSymbol) + || (definingModule instanceof UnresovedModuleSymbol); + if (isStaticModeule) { + moduleReference = ReferenceFactory.createStaticRef((T)definingModule); + } + else{ + moduleReference = (IModulaSymbolReference)new ModuleReference(definingModule); + } + return moduleReference; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceLocation.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceLocation.java new file mode 100644 index 0000000..d15cd20 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/ReferenceLocation.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import org.apache.commons.lang.StringUtils; + + +public class ReferenceLocation { + private String pathInModule; + + ReferenceLocation(String pathInModule) { + this.pathInModule = pathInModule; + } + + public boolean isEmpty() { + return StringUtils.isEmpty(pathInModule); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((pathInModule == null) ? 0 : pathInModule.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ReferenceLocation other = (ReferenceLocation) obj; + if (pathInModule == null) { + if (other.pathInModule != null) + return false; + } else if (!pathInModule.equals(other.pathInModule)) + return false; + return true; + } + + @Override + public String toString() { + return "ReferenceLocation [pathInModule=" + pathInModule + "]"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticModulaSymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticModulaSymbolReference.java new file mode 100644 index 0000000..4086e2f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticModulaSymbolReference.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +final class StaticModulaSymbolReference implements IStaticModulaSymbolReference +{ + private final T symbol; + + StaticModulaSymbolReference(T symbol) { + this.symbol = symbol; + } + + @Override + public T resolve() { + return symbol; + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((symbol == null) ? 0 : symbol.hashCode()); + return result; + } + + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + @SuppressWarnings("unchecked") + StaticModulaSymbolReference other = (StaticModulaSymbolReference) obj; + if (symbol == null) { + if (other.symbol != null) + return false; + } else if (!symbol.equals(other.symbol)) + return false; + return true; + } + + @Override + public String toString() { + return "StaticModulaSymbolReference [symbol=" + symbol + "]"; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticRefFactory.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticRefFactory.java new file mode 100644 index 0000000..dbed0eb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/reference/StaticRefFactory.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.internal.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + +public final class StaticRefFactory implements IReferenceFactory { + private StaticRefFactory(){ + } + + private static class StaticRefFactoryHolder{ + static StaticRefFactory INSTANCE = new StaticRefFactory(); + } + + public static StaticRefFactory instance(){ + return StaticRefFactoryHolder.INSTANCE; + } + + @Override + public IModulaSymbolReference createRef( + T symbol) { + return ReferenceFactory.createStaticRef(symbol); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSymbol.java new file mode 100644 index 0000000..7f143c9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSymbol.java @@ -0,0 +1,95 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.ArrayType; +import com.excelsior.xds.parser.modula.type.OrdinalType; +import com.excelsior.xds.parser.modula.type.Type; + +public class ArrayTypeSymbol extends TypeSymbol + implements IArrayTypeSymbol +{ + private final IModulaSymbolReference indexTypeSymbolRef; + private final IModulaSymbolReference elementTypeSymbolRef; + + public ArrayTypeSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference indexTypeSymbolRef + , IModulaSymbolReference elementTypeSymbolRef ) + { + this( name, parentScope + , indexTypeSymbolRef, elementTypeSymbolRef + , new ArrayType( name + , getOrdinalType(indexTypeSymbolRef) + , getType(elementTypeSymbolRef) + ) + ); + } + + + protected ArrayTypeSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference indexTypeSymbolRef + , IModulaSymbolReference elementTypeSymbolRef + , ArrayType type ) + { + super(name, parentScope, type); + this.indexTypeSymbolRef = indexTypeSymbolRef; + this.elementTypeSymbolRef = elementTypeSymbolRef; + } + + @Override + public IArrayTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new ArrayTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getIndexTypeSymbol() { + return ReferenceUtils.resolve(indexTypeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getElementTypeSymbol() { + return ReferenceUtils.resolve(elementTypeSymbolRef); + } + + + protected static Type getType(IModulaSymbolReference elementTypeSymbolRef) { + ITypeSymbol elementTypeSymbol = ReferenceUtils.resolve(elementTypeSymbolRef); + return elementTypeSymbol == null + ? null : elementTypeSymbol.getType(); + } + + protected static OrdinalType getOrdinalType(IModulaSymbolReference indexTypeSymbolRef) { + IOrdinalTypeSymbol indexTypeSymbol = ReferenceUtils.resolve(indexTypeSymbolRef); + return indexTypeSymbol == null + ? null : indexTypeSymbol.getType(); + } + + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + ITypeSymbol elementType = getElementTypeSymbol(); + if (elementType != null) { + elementType.accept(visitor); + } + IOrdinalTypeSymbol indexType = getIndexTypeSymbol(); + if (indexType != null) { + indexType.accept(visitor); + } + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSynonymSymbol.java new file mode 100644 index 0000000..3ec8045 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ArrayTypeSynonymSymbol.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.ArrayType; + +public class ArrayTypeSynonymSymbol extends TypeSynonymSymbol + implements IArrayTypeSymbol +{ + public ArrayTypeSynonymSymbol( String name, ISymbolWithScope parentScope, + IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IArrayTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new ArrayTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getIndexTypeSymbol() { + return getOriginalSymbol().getIndexTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getElementTypeSymbol() { + return getOriginalSymbol().getIndexTypeSymbol(); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IArrayTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSymbol.java new file mode 100644 index 0000000..ed8b797 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSymbol.java @@ -0,0 +1,186 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; +import java.util.EnumSet; +import java.util.Iterator; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.excelsior.xds.core.utils.collections.BaseTypeIterator; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.type.EnumType; + +public class EnumTypeSymbol extends OrdinalTypeSymbol + implements IEnumTypeSymbol +{ + private final Map elements; + + public EnumTypeSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + elements = new LinkedHashMap(); + } + + @Override + public IEnumTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new EnumTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + /** + * Finalizes the symbol construction and creates type for this symbol. + */ + public void finalizeDefinition() { + setType(new EnumType(getName(), elements.size())); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getElements() { + return elements.values(); + } + + public void addElement(IEnumElementSymbol s) { + elements.put(s.getName(), s); + } + + /** + * {@inheritDoc} + */ + @Override + public int getElementCount() { + return elements.size(); + } + + + //-------------------------------------------------------------------------- + // Manipulation with attributes + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public void addAttribute(SymbolAttribute attr) { + super.addAttribute(attr); + if (attr == SymbolAttribute.PUBLIC) { + addAttributeToElements(SymbolAttribute.PUBLIC); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void addAttributes(EnumSet attrs) { + super.addAttributes(attrs); + if (attrs.contains(SymbolAttribute.PUBLIC)) { + addAttributeToElements(SymbolAttribute.PUBLIC); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void setAttributes(EnumSet attrs) { + super.setAttributes(attrs); + if (attrs.contains(SymbolAttribute.PUBLIC)) { + addAttributeToElements(SymbolAttribute.PUBLIC); + } + else { + removeAttributeFromElements(SymbolAttribute.PUBLIC); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void removeAttribute(SymbolAttribute attr) { + super.removeAttribute(attr); + if (attr == SymbolAttribute.PUBLIC) { + removeAttributeFromElements(SymbolAttribute.PUBLIC); + } + } + + private void addAttributeToElements(SymbolAttribute attr) { + for (IEnumElementSymbol element : getElements()) { + element.addAttribute(attr); + } + } + + private void removeAttributeFromElements(SymbolAttribute attr) { + for (IEnumElementSymbol element : getElements()) { + element.removeAttribute(attr); + } + } + + + //-------------------------------------------------------------------------- + // Implementation of IModulaSymbolScope interface + //-------------------------------------------------------------------------- + + @Override + public IModulaSymbol resolveName(String symbolName) { + IModulaSymbol symbol = findSymbolInScope(symbolName); + if (symbol == null) { + IModulaSymbolScope parentScope = getParentScope(); + if (parentScope != null) { + symbol = parentScope.resolveName(symbolName); + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName) { + return elements.get(symbolName); + + } + + /** + * {@inheritDoc} + */ + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName, boolean isPublic) { + IEnumElementSymbol symbol = findSymbolInScope(symbolName); + if (symbol != null) { + if (isPublic != symbol.isAttributeSet(SymbolAttribute.PUBLIC)) { + symbol = null; + } + } + return symbol; + } + + /** + * {@inheritDoc} + */ + @Override + public Iterator iterator() { + return new BaseTypeIterator(elements.values().iterator()); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + acceptChildren(visitor, getElements()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSynonymSymbol.java new file mode 100644 index 0000000..b989800 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/EnumTypeSynonymSymbol.java @@ -0,0 +1,79 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; +import java.util.Iterator; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.type.EnumType; + +public class EnumTypeSynonymSymbol extends TypeSynonymSymbol + implements IEnumTypeSymbol +{ + public EnumTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IEnumTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new EnumTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getElements() { + return getOriginalSymbol().getElements(); + } + + /** + * {@inheritDoc} + */ + @Override + public int getElementCount() { + return getOriginalSymbol().getElementCount(); + } + + //-------------------------------------------------------------------------- + // Symbol Scope operation + //-------------------------------------------------------------------------- + + @Override + public IModulaSymbol resolveName(String symbolName) { + return getOriginalSymbol().resolveName(symbolName); + } + + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName) { + return getOriginalSymbol().findSymbolInScope(symbolName); + } + + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName, boolean isPublic) { + return getOriginalSymbol().findSymbolInScope(symbolName, isPublic); + } + + @Override + public Iterator iterator() { + return getOriginalSymbol().iterator(); + } + + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IEnumTypeSymbol)this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSymbol.java new file mode 100644 index 0000000..8bf7d0e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSymbol.java @@ -0,0 +1,116 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.Type; +import com.excelsior.xds.parser.modula.type.XdsStandardTypes; + +/** + * Forward type declaration symbol. + * Forward type symbol will replace itself by the actual type symbol, + * when last one will be defined. + */ +public class ForwardTypeSymbol extends TypeSymbol + implements IForwardTypeSymbol +{ + private IModulaSymbolReference actualTypeSymbolRef; + private List usages; + + public ForwardTypeSymbol (String name, ISymbolWithScope parentScope) { + super(name, parentScope, XdsStandardTypes.VOID); + usages = new ArrayList(1); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + return QualifiedNameFactory.getQualifiedName(super.getQualifiedName(), SymbolAttribute.FORWARD_DECLARATION); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getActualTypeSymbol() { + return ReferenceUtils.resolve(actualTypeSymbolRef); + } + + public void setActualTypeSymbol (IModulaSymbolReference actualTypeSymbolRef) { + this.actualTypeSymbolRef = actualTypeSymbolRef; + ITypeSymbol s = ReferenceUtils.resolve(actualTypeSymbolRef); + if (s != null) { + setType(s.getType()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + ITypeSymbol typeSymbol; + ITypeSymbol actualTypeSymbol = getActualTypeSymbol(); + if (actualTypeSymbol != null) { + typeSymbol = actualTypeSymbol.createSynonym(name, parentScope, refFactory); + } + else { + typeSymbol = new ForwardTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + return typeSymbol; + } + /** + * {@inheritDoc} + */ + @Override + public void addUsage(IModulaSymbol s) { + usages.add(s); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsages() { + return usages; + } + + /** + * {@inheritDoc} + */ + @Override + public void releaseUsages() { + usages = null; + } + + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + ITypeSymbol actualType = getActualTypeSymbol(); + if (actualType != null) { + actualType.accept(visitor); + } + } + } + + @Override + public String toString() { + return "Forward@ " + super.toString(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSynonymSymbol.java new file mode 100644 index 0000000..f79d944 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ForwardTypeSynonymSymbol.java @@ -0,0 +1,91 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.Type; + +/** + * Synonym to forward type declaration symbol. + * Forward type synonym symbol will replace itself by the synonym of actual type symbol, + * when last one will be defined. + */ +public class ForwardTypeSynonymSymbol extends TypeSynonymSymbol + implements IForwardTypeSymbol +{ + private List usages; + + public ForwardTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + usages = new ArrayList(1); + ForwardTypeSymbol originalSymbol = ReferenceUtils.resolve(originalSymbolRef); + originalSymbol.addUsage(this); + } + + /** + * {@inheritDoc} + */ + @Override + public IForwardTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new ForwardTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public Type getType() { + return getOriginalSymbol().getType(); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getActualTypeSymbol() { + return getOriginalSymbol().getActualTypeSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public void addUsage(IModulaSymbol s) { + usages.add(s); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getUsages() { + return usages; + } + + + /** + * {@inheritDoc} + */ + @Override + public void releaseUsages() { + usages = null; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IForwardTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/InvalidTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/InvalidTypeSymbol.java new file mode 100644 index 0000000..da08ad4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/InvalidTypeSymbol.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.type.IInvalidTypeSymbol; +import com.excelsior.xds.parser.modula.type.VoidType; +import com.excelsior.xds.parser.modula.type.XdsStandardTypes; + +/** + * Type symbol for invalid or unknown type. + */ +public class InvalidTypeSymbol extends TypeSymbol + implements IInvalidTypeSymbol +{ + public InvalidTypeSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope, XdsStandardTypes.VOID); + } + + /** + * {@inheritDoc} + */ + @Override + public IInvalidTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new InvalidTypeSymbol(name, parentScope); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSymbol.java new file mode 100644 index 0000000..609f9b0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSymbol.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.type.INumericalTypeSymbol; +import com.excelsior.xds.parser.modula.type.NumericalType; + +public class NumericalTypeSymbol extends OrdinalTypeSymbol + implements INumericalTypeSymbol +{ + public NumericalTypeSymbol(String name, ISymbolWithScope parentScope, NumericalType type) { + super(name, parentScope, type); + } + + @Override + public INumericalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new NumericalTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSynonymSymbol.java new file mode 100644 index 0000000..b387ece --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/NumericalTypeSynonymSymbol.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.INumericalTypeSymbol; +import com.excelsior.xds.parser.modula.type.NumericalType; + +public class NumericalTypeSynonymSymbol extends TypeSynonymSymbol + implements INumericalTypeSymbol +{ + public NumericalTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public INumericalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new NumericalTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((INumericalTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OberonMethodTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OberonMethodTypeSymbol.java new file mode 100644 index 0000000..be45f7a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OberonMethodTypeSymbol.java @@ -0,0 +1,76 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; +import com.excelsior.xds.parser.modula.type.OberonMethodType; +import com.excelsior.xds.parser.modula.type.ProcedureType; + +public class OberonMethodTypeSymbol extends ProcedureTypeSymbol + implements IOberonMethodTypeSymbol +{ + private IOberonMethodReceiverSymbol receiverTypeSymbol; + + public OberonMethodTypeSymbol( String name + , IOberonMethodReceiverSymbol receiverTypeSymbol + , ISymbolWithScope parentScope ) + { + super(name, parentScope); + this.receiverTypeSymbol = receiverTypeSymbol; + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = QualifiedNameFactory.getOberonQualifiedName( + getName() + getNameCollosionId(), getReceiverSymbol(), getParentScope() + ); + if (isAttributeSet(SymbolAttribute.FORWARD_DECLARATION)) { + qualifiedName = QualifiedNameFactory.getQualifiedName(qualifiedName, SymbolAttribute.FORWARD_DECLARATION); + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public OberonMethodType getType() { + return (OberonMethodType)type; + } + + /** + * {@inheritDoc} + */ + @Override + protected ProcedureType createType(String name) { + return new OberonMethodType(name, this); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodReceiverSymbol getReceiverSymbol() { + return receiverTypeSymbol; + } + + public void setReceiverSymbol(IOberonMethodReceiverSymbol receiverTypeSymbol) { + this.receiverTypeSymbol = receiverTypeSymbol; + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSymbol: " + getName() + " [type=" + type + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSymbol.java new file mode 100644 index 0000000..7c76e29 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSymbol.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.OpaqueType; + +public class OpaqueTypeSymbol extends TypeSymbol + implements IOpaqueTypeSymbol +{ + private IModulaSymbolReference actualTypeSymbolRef; + + public OpaqueTypeSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope, new OpaqueType(name)); + getType().setSymbol(this); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getActualTypeSymbol() { + return ReferenceUtils.resolve(actualTypeSymbolRef); + } + + public void setActualTypeSymbol (ITypeSymbol actualTypeSymbol) { + this.actualTypeSymbolRef = ReferenceFactory.createRef(actualTypeSymbol); + } + + @Override + public IOpaqueTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new OpaqueTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSynonymSymbol.java new file mode 100644 index 0000000..3668bc9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpaqueTypeSynonymSymbol.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.OpaqueType; + +public class OpaqueTypeSynonymSymbol extends TypeSynonymSymbol + implements IOpaqueTypeSymbol +{ + public OpaqueTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public OpaqueType getType() { + return getOriginalSymbol().getType(); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getActualTypeSymbol() { + return getOriginalSymbol().getActualTypeSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOpaqueTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new OpaqueTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IOpaqueTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpenArrayTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpenArrayTypeSymbol.java new file mode 100644 index 0000000..8a13df8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OpenArrayTypeSymbol.java @@ -0,0 +1,77 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import org.apache.commons.lang.StringUtils; + +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.XdsStandardNames; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.OpenArrayType; + +public class OpenArrayTypeSymbol extends ArrayTypeSymbol + implements IArrayTypeSymbol +{ + public OpenArrayTypeSymbol( String name + , ISymbolWithScope parentScope + , XdsLanguage moduleLanguage + , IModulaSymbolReference elementTypeSymbolRef ) + { + this( name, parentScope + , ReferenceUtils.createStaticRef((IOrdinalTypeSymbol)ModulaSymbolCache.getSystemModule(moduleLanguage).resolveName(XdsStandardNames.INDEX)) + , elementTypeSymbolRef ); + } + + private OpenArrayTypeSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference indexTypeSymbolRef + , IModulaSymbolReference elementTypeSymbolRef ) + { + super( name, parentScope + , indexTypeSymbolRef, elementTypeSymbolRef + , new OpenArrayType( name + , getOrdinalType(indexTypeSymbolRef) + , getType(elementTypeSymbolRef) ) + ); + } + + + /** + * {@inheritDoc} + */ + @Override + public OpenArrayType getType() { + return (OpenArrayType)super.getType(); + } + + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + ITypeSymbol elementType = getElementTypeSymbol(); + if (elementType != null) { + elementType.accept(visitor); + } + } + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + OpenArrayTypeSymbol other = (OpenArrayTypeSymbol) obj; + + return StringUtils.equals(getQualifiedName(), other.getQualifiedName()); + } + + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSymbol.java new file mode 100644 index 0000000..edf45f3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSymbol.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.type.OrdinalType; + +public class OrdinalTypeSymbol extends TypeSymbol + implements IOrdinalTypeSymbol +{ + + public OrdinalTypeSymbol(String name, ISymbolWithScope parentScope) { + this(name, parentScope, null); + } + + public OrdinalTypeSymbol(String name, ISymbolWithScope parentScope, T type) { + super(name, parentScope, type); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new OrdinalTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSynonymSymbol.java new file mode 100644 index 0000000..e0cb087 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/OrdinalTypeSynonymSymbol.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.type.OrdinalType; + +public class OrdinalTypeSynonymSymbol extends TypeSynonymSymbol> + implements IOrdinalTypeSymbol +{ + public OrdinalTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference> originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new OrdinalTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IOrdinalTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSymbol.java new file mode 100644 index 0000000..ad78703 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSymbol.java @@ -0,0 +1,61 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.PointerType; + +public class PointerTypeSymbol extends TypeSymbol + implements IPointerTypeSymbol +{ + private IModulaSymbolReference boundTypeSymbolRef; + + public PointerTypeSymbol(String name, ISymbolWithScope parentScope) { + this(name, parentScope, new PointerType(name)); + getType().setSymbol(this); + } + + public PointerTypeSymbol( String name, ISymbolWithScope parentScope + , PointerType type ) + { + super(name, parentScope, type); + } + + + /** + * {@inheritDoc} + */ + @Override + public IPointerTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new PointerTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getBoundTypeSymbol() { + return ReferenceUtils.resolve(boundTypeSymbolRef); + } + + + public void setBoundType(IModulaSymbolReference boundTypeSymbolRef) { + this.boundTypeSymbolRef = boundTypeSymbolRef; + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); +// if (isVisitChildren) { +// ITypeSymbol boundType = getBoundTypeSymbol(); +// if (boundType != null) { +// boundType.accept(visitor); +// } +// } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSynonymSymbol.java new file mode 100644 index 0000000..ee95b8e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/PointerTypeSynonymSymbol.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.PointerType; + +public class PointerTypeSynonymSymbol extends TypeSynonymSymbol + implements IPointerTypeSymbol +{ + public PointerTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IPointerTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new PointerTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getBoundTypeSymbol() { + return getOriginalSymbol().getBoundTypeSymbol(); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IPointerTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSymbol.java new file mode 100644 index 0000000..907407c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSymbol.java @@ -0,0 +1,107 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.excelsior.xds.parser.commons.symbol.QualifiedNameFactory; +import com.excelsior.xds.parser.internal.modula.symbol.SymbolWithScope; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.ProcedureType; + +public class ProcedureTypeSymbol extends SymbolWithScope + implements IProcedureTypeSymbol +{ + protected final ProcedureType type; + private final Map parameters; + + private IModulaSymbolReference returnTypeSymbolRef; + + public ProcedureTypeSymbol(String name, ISymbolWithScope parentScope) { + super(name, parentScope); + parameters = new LinkedHashMap(); + attach(parameters); + type = createType(name); + } + + /** + * {@inheritDoc} + */ + @Override + public String getQualifiedName() { + String qualifiedName = super.getQualifiedName(); + if (isAttributeSet(SymbolAttribute.FORWARD_DECLARATION)) { + qualifiedName = QualifiedNameFactory.getQualifiedName(qualifiedName, SymbolAttribute.FORWARD_DECLARATION); + } + return qualifiedName; + } + + /** + * {@inheritDoc} + */ + @Override + public ProcedureType getType() { + return type; + } + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new ProcedureTypeSynonymSymbol(name, parentScope, refFactory.createRef((IProcedureTypeSymbol)this), refFactory.createRef((IModulaSymbol)this)); + } + + + public void attach (SymbolWithScope parentScope) { + parentScope.attach(parameters); + } + + + public ITypeSymbol getReturnTypeSymbol() { + return ReferenceUtils.resolve(returnTypeSymbolRef); + } + + public void setReturnTypeSymbol(IModulaSymbolReference ref) { + returnTypeSymbolRef = ref; + } + + public Collection getParameters() { + return parameters.values(); + } + + public void addParameter(IFormalParameterSymbol s) { + parameters.put(s.getName(), s); + } + + + protected ProcedureType createType(String name) { + return new ProcedureType(name, this); + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSymbol: " + getName() + " [type=" + type + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren){ + acceptChildren(visitor, getParameters()); + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSynonymSymbol.java new file mode 100644 index 0000000..6ae9443 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/ProcedureTypeSynonymSymbol.java @@ -0,0 +1,74 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.SynonymSymbolWithScope; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.ProcedureType; + +public class ProcedureTypeSynonymSymbol extends SynonymSymbolWithScope + implements IProcedureTypeSymbol +{ + + public ProcedureTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public ProcedureType getType() { + return getOriginalSymbol().getType(); + } + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new ProcedureTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReturnTypeSymbol() { + return getOriginalSymbol().getReturnTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getParameters() { + return getOriginalSymbol().getParameters(); + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSynonymSymbol: " + getName() + " [type=" + getType() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + // TODO : unclear whether should we visit structure coming from getOriginalSymbol() + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSymbol.java new file mode 100644 index 0000000..ddd3e81 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSymbol.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRangeTypeSymbol; +import com.excelsior.xds.parser.modula.type.RangeType; + +public class RangeTypeSymbol extends NumericalTypeSymbol implements IRangeTypeSymbol +{ + private IModulaSymbolReference baseTypeSymbolRef; + + public RangeTypeSymbol( String name, ISymbolWithScope parentScope + , IOrdinalTypeSymbol baseTypeSymbol + , Number minValue, Number maxValue ) + { + super(name, parentScope, new RangeType(name, baseTypeSymbol.getType(), minValue, maxValue)); + this.baseTypeSymbolRef = ReferenceFactory.createRef(baseTypeSymbol); + } + + /** + * {@inheritDoc} + */ + @Override + public IRangeTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new RangeTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getBaseTypeSymbol() { + return ReferenceUtils.resolve(baseTypeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public RangeType getType() { + return (RangeType) super.getType(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSynonymSymbol.java new file mode 100644 index 0000000..edcb894 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RangeTypeSynonymSymbol.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRangeTypeSymbol; +import com.excelsior.xds.parser.modula.type.NumericalType; +import com.excelsior.xds.parser.modula.type.RangeType; + +public class RangeTypeSynonymSymbol extends TypeSynonymSymbol + implements IRangeTypeSymbol +{ + public RangeTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public RangeType getType() { + return getOriginalSymbol().getType(); + } + + /** + * {@inheritDoc} + */ + @Override + public IRangeTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new RangeTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getBaseTypeSymbol() { + return getOriginalSymbol().getBaseTypeSymbol(); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((IRangeTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSymbol.java new file mode 100644 index 0000000..e61995b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSymbol.java @@ -0,0 +1,118 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; +import java.util.LinkedHashMap; +import java.util.Map; + +import com.excelsior.xds.parser.internal.modula.symbol.SymbolWithProcedures; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.type.RecordType; + +public class RecordTypeSymbol extends SymbolWithProcedures + implements IRecordTypeSymbol +{ + private final RecordType type; + private final Map fields; + + private final IModulaSymbolReference baseTypeSymbolRef; + + public RecordTypeSymbol( String name, IModulaSymbolReference baseTypeSymbolRef + , ISymbolWithScope parentScope ) + { + super(name, parentScope); + this.baseTypeSymbolRef = baseTypeSymbolRef; + type = new RecordType(name, this); + fields = new LinkedHashMap(); + attach(fields); + } + + + /** + * {@inheritDoc} + */ + @Override + public RecordType getType() { + return type; + } + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new RecordTypeSynonymSymbol(name, parentScope, refFactory.createRef((IRecordTypeSymbol)this), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getFields() { + return fields.values(); + } + + /** + * {@inheritDoc} + */ + @Override + public void addField(IRecordFieldSymbol s) { + fields.put(s.getName(), s); + } + + + //-------------------------------------------------------------------------- + // Oberon-2 specific part + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol getBaseTypeSymbol() { + return ReferenceUtils.resolve(baseTypeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String name) { + IModulaSymbol s = super.findSymbolInScope(name); + IRecordTypeSymbol baseTypeSymbol = ReferenceUtils.resolve(baseTypeSymbolRef); + if ((s == null) && (baseTypeSymbol != null)) { + s = baseTypeSymbol.findSymbolInScope(name); + if (s instanceof IOberonMethodSymbol) { + // Oberon-method can be overridden + s = null; + } + } + return s; + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSymbol: " + getName() + " [type=" + type + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + boolean isVisitChildren = visitor.visit(this); + if (isVisitChildren) { + acceptChildren(visitor, getFields()); + acceptChildren(visitor, getProcedures()); + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSynonymSymbol.java new file mode 100644 index 0000000..2e998f6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/RecordTypeSynonymSymbol.java @@ -0,0 +1,108 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.SynonymSymbolWithScope; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.type.RecordType; + +public class RecordTypeSynonymSymbol extends SynonymSymbolWithScope + implements IRecordTypeSymbol +{ + public RecordTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef + , IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public RecordType getType() { + return getOriginalSymbol().getType(); + } + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new RecordTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getFields() { + return getOriginalSymbol().getFields(); + } + + /** + * {@inheritDoc} + */ + @Override + public void addField(IRecordFieldSymbol s) { + getOriginalSymbol().addField(s); + } + + + //-------------------------------------------------------------------------- + // Oberon-2 specific part + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol getBaseTypeSymbol() { + IRecordTypeSymbol originalSymbol = getOriginalSymbol(); + if (originalSymbol != null) { + return originalSymbol.getBaseTypeSymbol(); + } + else{ + return null; + } + } + + + /** + * {@inheritDoc} + */ + @Override + public void addProcedure(IProcedureSymbol s) { + getOriginalSymbol().addProcedure(s); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getProcedures() { + return getOriginalSymbol().getProcedures(); + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSynonymSymbol: " + getName() + " [type=" + getType() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSymbol.java new file mode 100644 index 0000000..6dab9dd --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSymbol.java @@ -0,0 +1,56 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; +import com.excelsior.xds.parser.modula.type.SetType; + +public class SetTypeSymbol extends OrdinalTypeSymbol + implements ISetTypeSymbol +{ + private IModulaSymbolReference baseTypeSymbolRef; + private final boolean isPackedSet; + + public SetTypeSymbol(String name, ISymbolWithScope parentScope, boolean isPacked) { + super(name, parentScope); + isPackedSet = isPacked; + } + + public void setBaseTypeSymbol(IOrdinalTypeSymbol s) { + baseTypeSymbolRef = ReferenceFactory.createRef(s); + if (s != null) { + setType(new SetType(getName(), s.getType())); + } + } + + /** + * {@inheritDoc} + */ + @Override + public ISetTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new SetTypeSynonymSymbol(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getBaseTypeSymbol() { + return ReferenceUtils.resolve(baseTypeSymbolRef); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPacked() { + return isPackedSet; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSynonymSymbol.java new file mode 100644 index 0000000..df72ee3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/SetTypeSynonymSymbol.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; +import com.excelsior.xds.parser.modula.type.SetType; + +public class SetTypeSynonymSymbol extends TypeSynonymSymbol + implements ISetTypeSymbol +{ + public SetTypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef ) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + + /** + * {@inheritDoc} + */ + @Override + public ISetTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new SetTypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol getBaseTypeSymbol() { + return getOriginalSymbol().getBaseTypeSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean isPacked() { + return getOriginalSymbol().isPacked(); + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit((ISetTypeSymbol)this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSymbol.java new file mode 100644 index 0000000..1cae5df --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSymbol.java @@ -0,0 +1,60 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.ModulaSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.Type; + +/** + * Symbol which defines type. + */ +public class TypeSymbol extends ModulaSymbol + implements ITypeSymbol +{ + private T type; + + public TypeSymbol(String name, ISymbolWithScope parentScope, T type) { + super(name, parentScope); + this.type = type; + } + + + /** + * {@inheritDoc} + */ + @Override + public T getType() { + return type; + } + + public void setType(T type) { + this.type = type; + } + + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new TypeSynonymSymbol>(name, parentScope, refFactory.createRef(this), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSymbol " + getName() + " [type=" + type + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSynonymSymbol.java new file mode 100644 index 0000000..edc2fe2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/internal/modula/symbol/type/TypeSynonymSymbol.java @@ -0,0 +1,64 @@ +package com.excelsior.xds.parser.internal.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.SynonymSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ModulaSymbolVisitor; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSynonymSymbol; +import com.excelsior.xds.parser.modula.type.Type; + +public class TypeSynonymSymbol> extends SynonymSymbol + implements ITypeSynonymSymbol +{ + public TypeSynonymSymbol( String name, ISymbolWithScope parentScope + , IModulaSymbolReference originalSymbolRef, + IModulaSymbolReference referencedSymbolRef) + { + super(name, parentScope, originalSymbolRef, referencedSymbolRef); + } + + + /** + * {@inheritDoc} + */ + @Override + public T getType() { + return getOriginalSymbol().getType(); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory) { + return new TypeSynonymSymbol(name, parentScope, refFactory.createRef(getOriginalSymbol()), refFactory.createRef((IModulaSymbol)this)); + } + + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReferencedSymbol() { + return (ITypeSymbol)super.getReferencedSymbol(); + } + + + + /** + * {@inheritDoc} + */ + @Override + public String toString() { + return "TypeSynonymSymbol: " + getName() + " [type=" + getType() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + @Override + protected void doAccept(ModulaSymbolVisitor visitor) { + visitor.visit(this); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/IXdsParserMonitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/IXdsParserMonitor.java new file mode 100644 index 0000000..de4b5a2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/IXdsParserMonitor.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.parser.modula.ast.ModulaAst; + +/** + * Interface of an object that monitors a Modula-2 parsing.. + */ +public interface IXdsParserMonitor +{ + /** + * Notifies this listener that parsing of some module are finished. + * + * @param sourceFile the Modula-2 source file which has been parsed. + * @param buildSettings the XDS compiler settings which have been used to parse source file. + * @param modulaAst Modula-2 AST of the source file. + */ + public void endModuleParsing( IFileStore sourceFile + , ModulaAst modulaAst ); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsCommentParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsCommentParser.java new file mode 100644 index 0000000..c1b3f49 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsCommentParser.java @@ -0,0 +1,125 @@ +package com.excelsior.xds.parser.modula; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.TodoTaskParser; +import com.excelsior.xds.parser.commons.TodoTaskParser.TaskEntry; +import com.excelsior.xds.parser.commons.ast.TokenType; + +public class XdsCommentParser extends XdsTokenParser +{ + public static final String[] EMPTY_COMMENT_ARRAY = new String[0]; + + private final TodoTaskParser commentParser; + + private boolean isParseCommentÑontents; + + public XdsCommentParser( IFileStore sourceFile, CharSequence chars + , XdsSettings settings + , IParserEventListener reporter ) + { + super(sourceFile, chars, settings, reporter); + commentParser = new TodoTaskParser(); + this.isParseCommentÑontents = true; + } + + protected void setParseCommentÑontents(boolean isParseComments) { + this.isParseCommentÑontents = isParseComments; + } + + /** + * Parses Modula-2 text to find 'to-do' tasks in the comments. + * + * @return array of the found 'to-do' tasks. + */ + public TaskEntry[] parseTodoTaks() { + setTokenListener(NullTokenListener.INSTANCE); + reset(); + + List taskEntries = new ArrayList(); + super.nextToken(); + while (token != EOF) { + if (COMMENT_SET.contains(token)) { + int foundTaskIndex = taskEntries.size(); + commentParser.parse( + sourceFile, getTokenText(), getTokenPosition(), taskEntries + ); + if (foundTaskIndex < taskEntries.size()) { + for (int i = foundTaskIndex; i < taskEntries.size(); i++) { + TaskEntry entry = taskEntries.get(i); + reporter.taskTag( + entry.getFile(), entry.getPosition(), entry.getEndOffset(), + entry.getTask(), entry.getMessage() + ); + } + } + } + super.nextToken(); + } + + reporter.endFileParsing(sourceFile); + + if (taskEntries.isEmpty()) { + return TodoTaskParser.EMPTY_TASKENTRY_ARRAY; + } + return taskEntries.toArray(new TaskEntry[taskEntries.size()]); + } + + + /** + * Parses Modula-2 text to find comments. + * + * @return array of the found comments. + */ + public String[] parseComments() { + setTokenListener(NullTokenListener.INSTANCE); + reset(); + + List comments = new ArrayList(); + super.nextToken(); + while (token != EOF) { + if (COMMENT_SET.contains(token)) { + String comment = getTokenText(); + comments.add(comment); + if (isParseCommentÑontents) { + commentParser.parse(sourceFile, comment, getTokenPosition(), reporter); + } + } + super.nextToken(); + } + + reporter.endFileParsing(sourceFile); + + if (comments.isEmpty()) { + return EMPTY_COMMENT_ARRAY; + } + return comments.toArray(new String[comments.size()]); + } + + + /** + * {@inheritDoc} + */ + @Override + protected TokenType nextToken() { + while (true) { + super.nextToken(); + + if (COMMENT_SET.contains(token)) { + if (isParseCommentÑontents) { + commentParser.parse( + sourceFile, getTokenText(), getTokenPosition(), reporter + ); + } + } + else if (token != WHITE_SPACE) { + return token; + } + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsEquations.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsEquations.java new file mode 100644 index 0000000..98ea226 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsEquations.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula; + +/** + * Definition of XDS compiler equations. + * + * An equation is a pair (name,value), where value is in general case an arbitrary + * string. Some equations have a limited set of valid values, some may not have + * the empty string as a value. + */ +public interface XdsEquations { + + /** + * Internal compiler equation holds compiled module name. + */ + String MODULE = "MODULE"; //$NON-NLS-1$ + + /** + * Internal compiler equation holds compiled file name with path and extension. + */ + String FILE = "FILE"; //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsExpressionParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsExpressionParser.java new file mode 100644 index 0000000..ea3d11b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsExpressionParser.java @@ -0,0 +1,920 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Iterator; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.sdk.XdsOptions; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.internal.modula.nls.XdsMessages; +import com.excelsior.xds.parser.internal.modula.symbol.type.OpenArrayTypeSymbol; +import com.excelsior.xds.parser.modula.ast.AstDesignator; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.AstQualifiedName; +import com.excelsior.xds.parser.modula.ast.AstSimpleName; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.expressions.AstExpression; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.tokens.XdsParserTokenSets; +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodSymbol; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.INumericalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRangeTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class XdsExpressionParser extends XdsSymbolParser + implements XdsParserTokenSets, ModulaElementTypes +{ + protected ExpressionParser expressionParser; + + protected AstQualifiedName forwardTypeQualidentAst; + protected ITypeSymbol declaredType; + + public XdsExpressionParser( IFileStore sourceFile, CharSequence chars + , XdsSettings xdsSettings + , IImportResolver importResolver + , IParserEventListener reporter + , IXdsParserMonitor monitor ) + { + super(sourceFile, chars, xdsSettings, importResolver, reporter, monitor); + expressionParser = new ExpressionParser(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void reset() { + super.reset(); + declaredType = null; + forwardTypeQualidentAst = null; + } + + protected IModulaSymbol parseDesignator(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + AstDesignator designatorAst = builder.beginProduction(DESIGNATOR); + IModulaSymbol designatior = null; + + if (token != IDENTIFIER) { + error(XdsMessages.IdentifierExpected); + expressionParser.parseExpression(scope, typeResolver); + } + else { + designatior = parseQualident(scope, typeResolver); + designatior = extendDesignator(designatior, scope, typeResolver); + setAstSymbol(designatorAst, designatior); + } + + builder.endProduction(designatorAst); + return designatior; + } + + protected IModulaSymbol extendDesignator( IModulaSymbol designator + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + while (token != EOF) + { + if (BAR == token) { + if (designator instanceof IOberonMethodSymbol) { +//TODO check_super_call(designator) + nextToken(); + break; + } + designator = makeDereference(designator); + nextToken(); + } + else if (DOT == token) + { + if (settings.isOberon()) { + designator = makeAutoDereference(designator); + } + nextToken(); + if (token == IDENTIFIER) { + AstSimpleName nameSymbol = builder.beginProduction(SIMPLE_NAME); + String accessedName = getTokenText(); + designator = makeAccess(designator, accessedName); + setAstSymbol(nameSymbol, designator); + addSymbolUsage(designator); + + nextToken(); + builder.endProduction(nameSymbol); + } + else { + designator = null; + error(XdsMessages.IdentifierExpected); + } + } + else if (LBRACKET == token) + { + if (settings.isOberon()) { + designator = makeAutoDereference(designator); + } + nextToken(); + expressionParser.parseExpression(scope, typeResolver); + designator = makeIndex(designator); + if (token == COMMA) { + token = LBRACKET; + } + else { + parseToken(RBRACKET); + } + } + else if (LPARENTH == token) + { + designator = expressionParser.parseProcedureCall(designator, scope, typeResolver); +// if (settings.isOberon()) { +// nextToken(); +// parseTypeQualident(false); +// parseToken(RPARENTH); +// } +// else { +// return; +// } + } + else { + break; + } + } + return designator; + } + + + + protected ITypeSymbol parseTypeQualident( IModulaSymbolScope scope + , ISymbolWithScope typeResolver, boolean isOpenArrayEnabled ) + { + IModulaSymbol qualidentSumbol = parseQualident(scope, typeResolver); + ITypeSymbol typeSymbol = null; + if (qualidentSumbol instanceof ITypeSymbol) { + typeSymbol = (ITypeSymbol) qualidentSumbol; + if (!isOpenArrayEnabled) { + if (typeSymbol instanceof OpenArrayTypeSymbol) { + error(XdsMessages.IllegalOpenArrayTypeUsage); + } + } + } + else { +// TODO process standard procedure pcM2.type_qualident() +// error(XdsMessages.IdentifierDoesNotDenoteType); + } + return typeSymbol; + } + + + /** + * QualifiedIdentifier = {ModuleIdentifier "."} identifier
+ * ModuleIdentifier = identifier
+ * @param typeResolver + */ + protected IModulaSymbol parseQualident(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol symbol = null; + + if (token == IDENTIFIER) { + forwardTypeQualidentAst = null; + boolean isExternal = false; + IInvalidModulaSymbol invalidSymbol = null; + AstQualifiedName qualidentAst = builder.beginProduction(QUALIFIED_NAME); + + String symbolName = getTokenText(); + symbol = typeResolver.resolveName(symbolName); + + IModuleSymbol moduleSymbol = null; + if (symbol == null) { + if ((declaredType != null) && symbolName.equals(declaredType.getName())) { + symbol = declaredType; + } + } + else if (symbol instanceof IForwardTypeSymbol) { + if ((declaredType != null) && symbolName.equals(declaredType.getName())) { + symbol = declaredType; + } + } + else if (symbol instanceof IModuleSymbol) { + AstModuleName moduleNameAst = builder.beginProduction(MODULE_NAME); + + isExternal = true; + moduleSymbol = (IModuleSymbol)symbol; + setAstSymbol(moduleNameAst, moduleSymbol); + + builder.acceptLastToken(); + builder.endProduction(moduleNameAst); + } + else if (symbol instanceof IModuleAliasSymbol) { + AstModuleAlias moduleAliasAst = builder.beginProduction(MODULE_ALIAS_NAME); + + isExternal = true; + moduleSymbol = ((IModuleAliasSymbol)symbol).getReference(); + if (moduleSymbol == null) { + // there is no chance to find anything in unresolved module + symbol = null; + } + else { + setAstSymbol(moduleAliasAst, (IModuleAliasSymbol)symbol); + } + + builder.acceptLastToken(); + builder.endProduction(moduleAliasAst); + } + else if (symbol != null) { + AstSimpleName simpleNameAst = builder.beginProduction(SIMPLE_NAME); + setAstSymbol(simpleNameAst, symbol); + builder.acceptLastToken(); + builder.endProduction(simpleNameAst); + } + + if (symbol != null) { + addSymbolUsage(symbol); + } + else { + invalidSymbol = createUnknownSymbol(symbolName, scope); + } + nextToken(); + + while (token == DOT) { + if (symbol == null) { + nextToken(); + + if (token != IDENTIFIER) { + error(XdsMessages.IdentifierExpected); + } + else { + invalidSymbol = createUnknownSymbol(getTokenText(), scope); + nextToken(); + } + } + else if (moduleSymbol != null) { + nextToken(); + + if (token != IDENTIFIER) { + error(XdsMessages.IdentifierExpected); + moduleSymbol = null; + } + else { + symbolName = getTokenText(); + symbol = moduleSymbol.findSymbolInScope(symbolName, true); + + if (symbol instanceof IModuleSymbol) { + AstModuleName moduleNameAst = builder.beginProduction(MODULE_NAME); + + moduleSymbol = (IModuleSymbol)symbol; + setAstSymbol(moduleNameAst, moduleSymbol); + + builder.acceptLastToken(); + builder.endProduction(moduleNameAst); + } + else { + AstSimpleName simpleNameAst = builder.beginProduction(SIMPLE_NAME); + moduleSymbol = null; + if (symbol == null) { +//TODO support of all types is required +// error(XdsMessages.UndeclaredIdentifier, symbolName); + } + else { + setAstSymbol(simpleNameAst, symbol); + } + builder.acceptLastToken(); + builder.endProduction(simpleNameAst); + } + + addSymbolUsage(symbol); + nextToken(); + } + } + else { + break; + } + } + + if (symbol != null) { + setAstSymbol(qualidentAst, symbol); + } + else if (!isExternal) { + forwardTypeQualidentAst = qualidentAst; + } + + if (symbol == null) { + symbol = invalidSymbol; + } + builder.endProduction(qualidentAst); + } + + return symbol; + } + + + /** + * Parser of Modula-2/Oberon-2 expression statement. + */ + final class ExpressionParser { + + private long value; + + // TODO : rename to getLongValue + public long getIntegerValue() { + return value; + } + + + public void parseBooleanExpression(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + parseExpression(scope, typeResolver); + } + + public IModulaSymbol parseExpression(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + return parseExpression(EXPRESSION, scope, typeResolver); + } + + public IModulaSymbol parseConstantExpression(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + return parseExpression(CONSTANT_EXPRESSION, scope, typeResolver); + } + + public IModulaSymbol parseExpression + ( ModulaCompositeType expression, IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + value = 0; + IModulaSymbol resultSymbol = null; + + builder.beginProduction(expression); + + resultSymbol = parseSimpleExpression(scope, typeResolver); + + if ( (EQU == token) + || (NEQ == token) + || (LSS == token) + || (GTR == token) + || (LTEQ == token) + || (GTEQ == token)) + { + nextToken(); + parseSimpleExpression(scope, typeResolver); + resultSymbol = getStandardSymbol(XdsStandardNames.BOOLEAN); + } + else if (IN_KEYWORD == token) { + nextToken(); + parseSimpleExpression(scope, typeResolver); + resultSymbol = getStandardSymbol(XdsStandardNames.BOOLEAN); + } + else if (IS_KEYWORD == token) { + nextToken(); + parseTypeQualident(scope, typeResolver, false); + resultSymbol = getStandardSymbol(XdsStandardNames.BOOLEAN); + } + + builder.endProduction(expression); + return resultSymbol; + } + + private IModulaSymbol parseSimpleExpression(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol resultSymbol = null; + if (PLUS == token) { + nextToken(); + resultSymbol = parseTerm(scope, typeResolver); + value = +value; + } + else if (MINUS == token) { + nextToken(); + resultSymbol = parseTerm(scope, typeResolver); + value = -value; + } + else { + resultSymbol = parseTerm(scope, typeResolver); + } + + while (true) { + if (PLUS == token) { + nextToken(); + resultSymbol = parseTerm(scope, typeResolver); + } + else if (MINUS == token) { + nextToken(); + resultSymbol = parseTerm(scope, typeResolver); + } + else if (OR_KEYWORD == token) { + nextToken(); + resultSymbol = parseTerm(scope, typeResolver); + } + else { + return resultSymbol; + } + } + } + + + private IModulaSymbol parseTerm(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol resultSymbol = null; + builder.beginProduction(TERM); + + resultSymbol = parseExponent(scope, typeResolver); + while (token != EOF) { + if (!TERM_LEVEL_OPERATION_SET.contains(token)) { + break; + } + nextToken(); + resultSymbol = parseExponent(scope, typeResolver); + } + + builder.endProduction(TERM); + return resultSymbol; + } + + + private IModulaSymbol parseExponent(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol resultSymbol = null; + resultSymbol = parseFactor(scope, typeResolver); + if (token == EXPONENT) { + nextToken(); + resultSymbol = parseExponent(scope, typeResolver); + } + return resultSymbol; + } + + + private IModulaSymbol parseFactor(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol resultSymbol = null; + builder.beginProduction(FACTOR); + + if (LITERAL_SET.contains(token)) { + if (INTEGER_LITERAL_SET.contains(token)) { + try { + value = getTokenIntegerValue(); + } catch (NumberFormatException e) { + value = 0; + logInternalError(e); + } + resultSymbol = getStandardSymbol(XdsStandardNames.INTEGER); + } + nextToken(); + } + else { + if (LPARENTH == token) { + nextToken(); + resultSymbol = parseExpression(scope, typeResolver); + parseToken(RPARENTH); + } + else if (IDENTIFIER == token) { + resultSymbol = parseIdentifier(scope, typeResolver); + } + else if (LBRACE == token) { + ISetTypeSymbol typeSymbol = getStandardSymbol( + XdsStandardNames.BITSET, ISetTypeSymbol.class + ); + parseSetConstructor(typeSymbol, scope, typeResolver); + } + else if (NOT == token) { + nextToken(); + resultSymbol = parseFactor(scope, typeResolver); + } + else if (ARRAY_KEYWORD == token) { + nextToken(); + parseToken(OF_KEYWORD); + ITypeSymbol itemTypeSymbol = parseTypeQualident(scope, typeResolver, false); + parseOpenArrayConstructor(itemTypeSymbol, scope, typeResolver); + } + else { + error(XdsMessages.ExpectedStartOfFactor); + skipToToken(FACTOR_SYNCHRONIZATION_SET); + } + } + + builder.endProduction(FACTOR); + return resultSymbol; + } + + + private IModulaSymbol parseIdentifier(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + IModulaSymbol resultSymbol = parseDesignator(scope, typeResolver); + if (LPARENTH == token) + { + if (resultSymbol instanceof ITypeSymbol) { + if (!(settings.xdsExtensions() || settings.topSpeedExtensions())) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ObsoleteTypeCast); + } + else if (! settings.getOption(XdsOptions.PIMCAST)) { + warning(XdsMessages.ImplicitSystemCast); + } + + nextToken(); + parseExpression(scope, typeResolver); + parseToken(RPARENTH); + + if ((settings.isEnhancedDereference()) && (BAR == token)) { + resultSymbol = extendDesignator(resultSymbol, scope, typeResolver); + } + } + else { + resultSymbol = parseProcedureCall(resultSymbol, scope, typeResolver); + if (settings.xdsExtensions()) { +//TODO extract return type from the designator + resultSymbol = extendDesignator(resultSymbol, scope, typeResolver); + } + } + } + else if (LBRACE == token) { + if (resultSymbol instanceof ITypeSymbol) { + parseConstructor((ITypeSymbol)resultSymbol, scope, typeResolver); + } + else { + if (resultSymbol != null) { + String symbolName = resultSymbol.getName(); + error( resultSymbol.getPosition(), symbolName.length() + , XdsMessages.IdentifierDoesNotDenoteType, symbolName ); + } + else { + error(XdsMessages.ExpectedType); + } + skipConstructor(); + } + } + return resultSymbol; + } + + + private void parseConstructor( ITypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + if (typeSymbol instanceof ISetTypeSymbol) { + parseSetConstructor((ISetTypeSymbol)typeSymbol, scope, typeResolver); + } + else { + if (settings.isOberon() && !settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ArrayRecotdSimpleAgregate); + } + if (typeSymbol instanceof IArrayTypeSymbol) { + IArrayTypeSymbol arrayTypeSymbol = (IArrayTypeSymbol)typeSymbol; + if (typeSymbol instanceof OpenArrayTypeSymbol) { + parseOpenArrayConstructor(arrayTypeSymbol.getElementTypeSymbol(), scope, typeResolver); + } + else { + parseArrayConstructor(arrayTypeSymbol, scope, typeResolver); + } + } + else if (typeSymbol instanceof IRecordTypeSymbol) { + parseRecordConstructor((IRecordTypeSymbol)typeSymbol, scope, typeResolver); + } + else if (typeSymbol instanceof INumericalTypeSymbol) { + if (typeSymbol instanceof IRangeTypeSymbol) { + typeSymbol = ((IRangeTypeSymbol)typeSymbol).getBaseTypeSymbol(); + } + parseSimpleConstructor(typeSymbol, scope, typeResolver); + + } + else { + skipConstructor(); + } + } + } + + private void skipConstructor() { + int nestingLevel = 0; + do { + if (LBRACE == token) { + nestingLevel++; + } + else if (RBRACE == token) { + nestingLevel--; + } + nextToken(); + } while ((nestingLevel > 0) && !SKIP_CONSTRUCTOR_SET.contains(token) && (token != EOF)); + } + + + private void parseSimpleConstructor( ITypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + if (LBRACE != token) { + errorExpectedSymbol(LBRACE); + return; + } + nextToken(); + + parseConstantExpression(scope, typeResolver); + + parseToken(RBRACE); + } + + + /* + * See pcM2.Expr.record_constructor() + */ + private void parseRecordConstructor( IRecordTypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + if (LBRACE != token) { + errorExpectedSymbol(LBRACE); + return; + } + nextToken(); + +// while ((RBRACE != token) && (EOF != token)) { +// if (LBRACE == token) { +// skipConstructor(); +// } +// else { +// parseConstantExpression(scope); +// } +// if (COMMA == token) { +// nextToken(); +// } +// } + parseRecordFieldsConstructor(typeSymbol, scope, typeResolver); + + if (RBRACE == token) { + nextToken(); + } + else { + error(XdsMessages.MoreExpressionsThanFieldsInRecord); + skipConstructor(); + } + } + + /* + * See pcM2.Expr.fields_list() + */ + private void parseRecordFieldsConstructor( IRecordTypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + Iterator fieldsIterator = typeSymbol.getFields().iterator(); + if ((RBRACE != token) && fieldsIterator.hasNext()) { + IRecordFieldSymbol fieldSymbol = fieldsIterator.next(); + + if (typeSymbol.isAttributeSet(SymbolAttribute.VARIANT_RECORD)) { + // TODO: workaround for record variant fields + // unnamed variant selector doen't included in the record's field list + fieldsIterator = null; + fieldSymbol = null; + } + do { + if (LBRACE == token) { + if (fieldSymbol != null) { + parseConstructor(fieldSymbol.getTypeSymbol(), scope, typeResolver); + } + else { + skipConstructor(); // workaround for record variant fields + } + } + else { + parseConstantExpression(scope, typeResolver); + } + // TODO check expression and field's type compatibility + +// if (fieldSymbol instanceof IRecordVariantSelectorSymbol) { +// // workaround for record variant fields +// fieldsIterator = null; +// fieldSymbol = null; +// } + if (COMMA != token) { + break; + } + if (fieldsIterator != null) { + if (fieldsIterator.hasNext()) { + fieldSymbol = fieldsIterator.next(); + } + else { + break; + } + } + nextToken(); + } while ((RBRACE != token) && (EOF != token)); + } + if ((fieldsIterator != null) && fieldsIterator.hasNext()) { + IRecordFieldSymbol fieldSymbol = fieldsIterator.next(); + error(XdsMessages.ExpressionForFieldWasExpected, fieldSymbol.getName()); + } + } + + + private void parseArrayConstructor( IArrayTypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + parseArrayLiteral(typeSymbol.getElementTypeSymbol(), scope, typeResolver); + // TODO check the number of elements in the constructed array + } + + private void parseOpenArrayConstructor( ITypeSymbol itemTypeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + boolean isCompound = (itemTypeSymbol instanceof IArrayTypeSymbol) + || (itemTypeSymbol instanceof IRecordTypeSymbol); + if (isCompound) { + error(XdsMessages.BaseTypeOfOpenArrayAggregateShuldBeSimple); + } + parseArrayLiteral(itemTypeSymbol, scope, typeResolver); + } + + private void parseArrayLiteral( ITypeSymbol itemTypeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + if (token != LBRACE) { + errorExpectedSymbol(LBRACE); + return; + } + nextToken(); + + while (token != EOF) + { + parseRepeatedArrayLiteralItem(itemTypeSymbol, scope, typeResolver); + + if (RBRACE == token) { + nextToken(); + break; + } + else if (COMMA == token) { + nextToken(); + } + else { + errorExpectedSymbol(RBRACE); + break; + } + } + } + + private void parseRepeatedArrayLiteralItem( ITypeSymbol itemTypeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + if (LBRACE == token) { + parseConstructor(itemTypeSymbol, scope, typeResolver); + } + else { + parseExpression(scope, typeResolver); + } + + if (BY_KEYWORD == token) { + nextToken(); + parseExpression(scope, typeResolver); + } + } + + + private void parseSetConstructor( ISetTypeSymbol typeSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + nextToken(); + if (token != RBRACE) { + while (token != EOF) + { + parseExpression(scope, typeResolver); + if (RANGE == token) { + nextToken(); + parseExpression(scope, typeResolver); + } + + if (RBRACE == token) { + nextToken(); + break; + } + else if (COMMA == token) { + nextToken(); + } + else { + errorExpectedSymbol(RBRACE); + break; + } + } + } + else { + nextToken(); + } + } + + + + private ITypeSymbol parseProcedureCall( IModulaSymbol callSymbol + , IModulaSymbolScope scope, ISymbolWithScope typeResolver ) + { + ITypeSymbol returnTypeSymbol = null; + ITypeSymbol typeSymbol = getSymbolType(callSymbol); + if (typeSymbol instanceof IProcedureTypeSymbol) { + returnTypeSymbol = ((IProcedureTypeSymbol)typeSymbol).getReturnTypeSymbol(); + parseProcedureParameters(scope, typeResolver); + } + else { + skipParameters(scope, typeResolver); + } + return returnTypeSymbol; + } + + private void parseProcedureParameters(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + if (token == LPARENTH) { + nextToken(); + if (token != RPARENTH) { + boolean exit = false; + while (!exit && (token != EOF)) { + if ((token != COMMA) && (token != RPARENTH)) { + parseExpression(scope, typeResolver); + } + if (token == COMMA) { + nextToken(); + } + else { + exit = true; + } + } + } + parseToken(RPARENTH); + } + } + + } + + + //-------------------------------------------------------------------------- + // Common Token Operation + //-------------------------------------------------------------------------- + + protected void skipParameters(IModulaSymbolScope scope, ISymbolWithScope typeResolver) { + if (token == LPARENTH) { + nextToken(); + + while (token != EOF) { + if ((token == RPARENTH) || (token == END_KEYWORD)) { + break; + } + + expressionParser.parseExpression(scope, typeResolver); + + if (token == COMMA) { + nextToken(); + } + else { + break; + } + } + + if (token == RPARENTH) { + nextToken(); + } + } + } + + + protected void recoverOnUnexpectedToken(TokenType expectedToken) { + if (expectedToken == IDENTIFIER) { + error(XdsMessages.IdentifierExpected); + } + else { + errorExpectedSymbol(expectedToken); + } + + if ((expectedToken != SEMICOLON) || !KEYWORD_SET.contains(token)) { + nextToken(); + } + if (token == expectedToken) { + nextToken(); + } + } + + + protected void parseRepeatingToken(TokenType expectedToken) { + if (token == expectedToken) { + do { + nextToken(); + } while (token == expectedToken); + } + else { + recoverOnUnexpectedToken(expectedToken); + } + } + + + protected void parseToken(TokenType expectedToken) { + if (token == expectedToken) { + nextToken(); + } + else { + recoverOnUnexpectedToken(expectedToken); + } + } + + + protected void parseTokenStrictly(TokenType expectedToken) { + if (token == expectedToken) { + nextToken(); + } + else { + if (expectedToken == IDENTIFIER) { + error(XdsMessages.IdentifierExpected); + } + else { + errorExpectedSymbol(expectedToken); + } + skipToToken(expectedToken); + if (token == expectedToken) { + nextToken(); + } + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsLanguage.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsLanguage.java new file mode 100644 index 0000000..f0d3fda --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsLanguage.java @@ -0,0 +1,62 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Languages and calling conventions are supported by XDS compiler. + * + * The compiler must know the implementation language of a module to take into + * account different semantics of different languages and to produce correct code. + * + * In some cases, it is necessary for a procedure or data type to be implemented + * according to the rules of a language other than that of the whole module. + * In XDS, it is possible to explicitly specify the language of a type or object. + * + * Language can be a string or integer constant expression. + */ +public enum XdsLanguage { + Oberon2 ("Oberon", 0), //$NON-NLS-1$ + Modula2 ("Modula", 1), //$NON-NLS-1$ + C ("C", 2), //$NON-NLS-1$ +// Java, +// JBC, // used only in project system to distinguish Java FEs +// SL1, +// Pascal, +// BNRPascal, + StdCall ("StdCall", 8), //$NON-NLS-1$ // Win32 system call + SysCall ("SysCall", 9), //$NON-NLS-1$ // OS/2 system call + OSCall ("OSCall", 10), //$NON-NLS-1$ // K26 system call + RtsCall ("RtsCall", 11), //$NON-NLS-1$ // XDS run-time call + ; + + private final String name; + private final long index; + + private XdsLanguage(String name, long index) { + this.name = name; + this.index = index; + } + + public static final Map NAME_TO_LANGUAGE = new HashMap(); + static { + for (XdsLanguage language: XdsLanguage.values()) { + NAME_TO_LANGUAGE.put(language.name, language); + } + }; + + public static final Map INDEX_TO_LANGUAGE = new HashMap(); + static { + for (XdsLanguage language: XdsLanguage.values()) { + INDEX_TO_LANGUAGE.put(language.index, language); + } + }; + + public static final Set EXTERNAL_PROCEDURES = new HashSet(Arrays.asList( + C, StdCall, SysCall, OSCall + )); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParser.java new file mode 100644 index 0000000..7c168fc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParser.java @@ -0,0 +1,3625 @@ +package com.excelsior.xds.parser.modula; + +import static com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory.createStaticRef; + +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.sdk.XdsOptions; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.utils.collections.Pair; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.ast.AstNode; +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.internal.modula.ModulaSymbolDeclarationTextRegionBuilder; +import com.excelsior.xds.parser.internal.modula.PstCommentsHandler; +import com.excelsior.xds.parser.internal.modula.nls.XdsMessages; +import com.excelsior.xds.parser.internal.modula.symbol.ConstantSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.EnumElementSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.FinallyBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.FormalParameterSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.LocalModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ModuleAliasSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ModuleBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodDeclarationSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodDefinitionSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodReceiverSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureDeclarationSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureDefinitionSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.RecordFieldSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.RecordVariantSelectorSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.VariableSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.EnumTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.EnumTypeSynonymSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ForwardTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.InvalidTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.OberonMethodTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.OpaqueTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.PointerTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.RangeTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.RecordTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.SetTypeSymbol; +import com.excelsior.xds.parser.modula.ast.AstBlock; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.AstSimpleName; +import com.excelsior.xds.parser.modula.ast.AstStatementBlock; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstImportStatement; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.modules.AstExportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstFinallyBody; +import com.excelsior.xds.parser.modula.ast.modules.AstModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameter; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodReceiver; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedure; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstResultType; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstModulaWithStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstStatement; +import com.excelsior.xds.parser.modula.ast.tokens.XdsParserTokenSets; +import com.excelsior.xds.parser.modula.ast.types.AstArrayType; +import com.excelsior.xds.parser.modula.ast.types.AstEnumElement; +import com.excelsior.xds.parser.modula.ast.types.AstEnumerationType; +import com.excelsior.xds.parser.modula.ast.types.AstFormalParameterType; +import com.excelsior.xds.parser.modula.ast.types.AstOpenArrayType; +import com.excelsior.xds.parser.modula.ast.types.AstPointerType; +import com.excelsior.xds.parser.modula.ast.types.AstProcedureType; +import com.excelsior.xds.parser.modula.ast.types.AstProcedureTypeOberon; +import com.excelsior.xds.parser.modula.ast.types.AstRangeType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordField; +import com.excelsior.xds.parser.modula.ast.types.AstRecordType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabel; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantSelector; +import com.excelsior.xds.parser.modula.ast.types.AstSetType; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclaration; +import com.excelsior.xds.parser.modula.ast.variables.AstVariable; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDefinitions; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithProcedures; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRangeTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.XdsStandardTypes; + +/** + * XDS Modula-2/Oberon-2 source code parser. + * + * ISO/IEC DIS 10514:1994, Section 6.2 Definitions and Declarations + * Definitions and declarations serve to introduce the identifiers of a module or + * procedure into their scope. Definitions appear in definition modules; declarations + * appear in program modules, implementation modules, local modules and procedures. + */ +public class XdsParser extends XdsExpressionParser + implements XdsParserTokenSets, ModulaElementTypes +{ + public static boolean IS_DEBUG_PRINT = false; + + /** Handler of parsing events */ + private final IXdsParserMonitor parserMonitor; + + private final ModifierParser modifierParser; + + // there was IMPORT SYSTEM in current module + private boolean isSystemImported; + + private boolean isOberonMethod; + + public XdsParser( IFileStore sourceFile, CharSequence chars + , XdsSettings xdsSettings + , IImportResolver importResolver + , IParserEventListener reporter + , IXdsParserMonitor monitor ) + { + super(sourceFile, chars, xdsSettings, importResolver, reporter, monitor); + parserMonitor = monitor; + modifierParser = new ModifierParser(); + settings.updateHeaderOptions(); + setParseCommentÑontents(false); + } + + + public XdsParser( IFileStore sourceFile, CharSequence chars + , XdsSettings xdsSettings + , IImportResolver importResolver + , IParserEventListener reporter ) + { + this(sourceFile, chars, xdsSettings, importResolver, reporter, null); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void reset() { + super.reset(); + isDefinitionModule = false; + isSystemImported = false; + } + + /** + * Parses first several lines of the source fail and returns module name. + * + * @return module name + */ + public String getModuleName() { + reset(); + ModulaAst ast = new ModulaAst(chars, sourceFile); + builder.beginProduction(ast); + builder.beginProduction(PROGRAM_MODULE); + + nextToken(); + settings.updateHeaderOptions(); + + if (settings.isOdfSource()) { + if (DEFINITION_KEYWORD == token) { + isDefinitionModule = true; + nextToken(); + } + else { + skipToToken(DEFINITION_KEYWORD); + } + } else { + if (! settings.isOberon()) { + if (DEFINITION_KEYWORD == token) { + isDefinitionModule = true; + nextToken(); + } + else { + if (IMPLEMENTATION_KEYWORD == token) { + nextToken(); + } + } + } + parseTokenStrictly(MODULE_KEYWORD); + } + + modifierParser.setDefaultModuleLanguage(); + if (isDefinitionModule) { + modifierParser.parseDirectLanguageSpec(ModulaSymbolCache.getModulaSuperModule(), + ModulaSymbolCache.getModulaSuperModule(), + modifierParser.defaultModuleLanguage()); + settings.setLanguage(modifierParser.language); + } + + String moduleName = null; + if (token == IDENTIFIER) { + moduleName = getTokenText(); + } + + return moduleName; + } + + + /** + * CompilationModule = DefinitionModule | ["IMPLEMENTATION"] ProgramModule
+ * + * ProgramModule = "MODULE" ModuleIdentifier [Protection] ";"
+ * ImportLists ModuleBlock ModuleIdentifier "."
+ * + * DefinitionModule = "DEFINITION" "MODULE" ModuleIdentifier ";"
+ * ImportLists Definitions "END" ModuleIdentifier "."
+ * + * ModuleIdentifier = Identifier + * @throws CoreException + */ + public ModulaAst parseModule() throws CoreException { + reset(); + if (IS_DEBUG_PRINT) { + System.out.println("<> " + sourceFile.getName()); + } + + ModulaAst ast = new ModulaAst(chars, sourceFile); + builder.beginProduction(ast); + AstModule moduleAst = builder.beginProduction(PROGRAM_MODULE); + + nextToken(); + settings.updateHeaderOptions(); + + boolean isImplementation = false; + PstNode defOrImplKeywordNode = null; + PstNode moduleKeywordNode = null; + if (settings.isOdfSource()) { + if (DEFINITION_KEYWORD == token) { + isDefinitionModule = true; + defOrImplKeywordNode = builder.getLastNode(); + nextToken(); + } + else { + errorExpectedSymbol(DEFINITION_KEYWORD); + skipToToken(DEFINITION_KEYWORD); + } + } else { + if (! settings.isOberon()) { + if (DEFINITION_KEYWORD == token) { + isDefinitionModule = true; + defOrImplKeywordNode = builder.getLastNode(); + nextToken(); + } + else { + if (IMPLEMENTATION_KEYWORD == token) { + isImplementation = true; + defOrImplKeywordNode = builder.getLastNode(); + nextToken(); + } + if (settings.getOption(XdsOptions.NOMODULEINIT)) + warning(XdsMessages.DefinitionModuleOption, XdsOptions.NOMODULEINIT); + } + } + + moduleKeywordNode = builder.getLastNode(); + parseTokenStrictly(MODULE_KEYWORD); + } + if (isDefinitionModule) { + moduleAst = builder.changeProduction(DEFINITION_MODULE); + } + + if (defOrImplKeywordNode != null) { + ((IAstFrameNode)(builder.getCurrentProduction())).addFrameNode(defOrImplKeywordNode); + } + if (moduleKeywordNode != null) { + ((IAstFrameNode)(builder.getCurrentProduction())).addFrameNode(moduleKeywordNode); + } + + modifierParser.setDefaultModuleLanguage(); + if (isDefinitionModule) { + modifierParser.parseDirectLanguageSpec( + ModulaSymbolCache.getModulaSuperModule(), + ModulaSymbolCache.getModulaSuperModule(), + modifierParser.defaultModuleLanguage()); + settings.setLanguage(modifierParser.language); + } + XdsLanguage moduleLanguage = modifierParser.language; + + String moduleName; + final TextPosition modulePosition = getTokenPosition(); + if (token == IDENTIFIER) { + builder.beginProduction(MODULE_IDENTIFIER); + moduleName = getTokenText(); + nextToken(); + builder.endProduction(MODULE_IDENTIFIER); + } + else { + moduleName = ""; //$NON-NLS-1$ + error(XdsMessages.IdentifierExpected); + } + settings.addEquation(XdsEquations.MODULE, moduleName); + + createHostModule( moduleName, isImplementation, moduleLanguage + , parserMonitor, modulePosition ); + + setAstSymbol(moduleAst, hostModuleSymbol); + ast.setModuleSymbol(hostModuleSymbol); + + parseToken(SEMICOLON); + parseImport(hostModuleSymbol); + +// debugPrintln(chars.toString()); + + parseModuleBlock(hostModuleSymbol, hostModuleSymbol); + parseToken(DOT); + + builder.endProduction(moduleAst); + skipToToken(EOF); + + builder.endProduction(ast); + + finalizeHostModule(); + + PstCommentsHandler.arrangeComments(chars, ast.getAstNode(), IS_TRAILING_WHITE_SPACE_ALLOWED); + ast.accept(new ModulaSymbolDeclarationTextRegionBuilder()); + ast.setInactiveCodeRegions(getInactiveCodeRegions()); + + if (hostModuleSymbol.getSourceFile() != null) { + ModulaSymbolCache.instance().addModule(hostModuleSymbol); + } + replaceStaticRefs(); + hostModuleSymbol = null; + + if (parserMonitor != null) { + parserMonitor.endModuleParsing(sourceFile, ast); + } + if (reporter != null) { + reporter.endFileParsing(sourceFile); + } + + return ast; + } + + + private void parseModuleBlock(IModuleSymbol parentScope, ISymbolWithScope typeResolver) { + parseBlock(parentScope, typeResolver, true); + } + + private void parseProcedureBlock(ISymbolWithDefinitions parentScope, ISymbolWithScope typeResolver) { + parseBlock(parentScope, typeResolver, false); + } + + private void parseBlock(ISymbolWithDefinitions parentScope, ISymbolWithScope typeResolver, boolean isModuleBlock) + { + AstBlock blockAst = isDefinitionModule ? builder.beginProduction(DEFINITIONS) + : builder.beginProduction(DECLARATIONS); + int procCount = 0; + boolean wasDeclaration = false; + while (true) + { + boolean invalidDeclOrder = settings.isOberon() & (procCount > 0) + & ! settings.xdsExtensions() + & CONST_VAR_TYPE_SET.contains(token); + if (invalidDeclOrder) { + error(XdsMessages.IllegalDeclarationOrder); + procCount = Integer.MIN_VALUE; // to suppress duplication of error + } + + wasDeclaration &= DECLARATION_SET.contains(token); + + if (EOF == token) { + break; + } + else if (PROCEDURE_KEYWORD == token) { + procCount++; + parseProcedureDeclaration(parentScope, typeResolver); + } + else if ((BEGIN_KEYWORD == token) || (END_KEYWORD == token)) + { + break; + } + else if (VAR_KEYWORD == token) { + parseVariableDeclaration(parentScope, typeResolver); + } + else if (CONST_KEYWORD == token) { + parseConstantDeclaration(parentScope, typeResolver); + } + else if (TYPE_KEYWORD == token) { + parseTypeDeclaration(parentScope, typeResolver); + } + else if (MODULE_KEYWORD == token) { + parseLocalModuleDeclaration(parentScope, typeResolver); + } + else if (LABEL_KEYWORD == token) { + parseLabelDeclaration(); + } + else { + error(XdsMessages.ExpectedDeclarationStart); + if (isModuleBlock) { + skipToToken(MODULE_DECLARATION_SYNCHRONIZATION_SET); + if ((token == IMPORT_KEYWORD) || (token == FROM_KEYWORD)) { + if (wasDeclaration) { + error(XdsMessages.IllegalDeclarationOrder); + } + if (parentScope instanceof ILocalModuleSymbol) { + parseLocalModuleImport((ILocalModuleSymbol)parentScope); + } + else if (parentScope instanceof IModuleSymbol) { + parseImport((IModuleSymbol)parentScope); + } + } + } + else { + skipToToken(DECLARATION_SYNCHRONIZATION_SET); + } + } + } + builder.endProduction(blockAst); + + checkForwardSymbols(parentScope); + if (EOF == token) { + return; + } + + AstStatementBlock blockBodyAst = null; + if (BEGIN_KEYWORD == token) { + String bodyName = BEGIN_KEYWORD.getDesignator(); + if (isModuleBlock) { + AstModuleBody moduleBodyAst = builder.beginProduction(MODULE_BODY); + addModuleFrameNode(BEGIN_KEYWORD); + ModuleBodySymbol bodySymbol = createModuleBodySymbol(parentScope, bodyName); + blockBodyAst = moduleBodyAst; + setAstSymbol(moduleBodyAst, bodySymbol); + addSymbolForResolving(bodySymbol); + } + else { + AstProcedureBody procedureBodyAst = builder.beginProduction(PROCEDURE_BODY); + addProcedureFrameNode(BEGIN_KEYWORD); + ProcedureBodySymbol bodySymbol = createProcedureBodySymbol(parentScope, bodyName); + setAstSymbol(procedureBodyAst, bodySymbol); + addSymbolForResolving(bodySymbol); + blockBodyAst = procedureBodyAst; + } + + parseBlockBody(parentScope, typeResolver, isModuleBlock); + } + + if (FINALLY_KEYWORD == token) { + if (isModuleBlock) { + addModuleFrameNode(FINALLY_KEYWORD); + } + AstFinallyBody finallyBodyAst = builder.beginProduction(FINALLY_BODY); + FinallyBodySymbol bodySymbol = createFinallyBodySymbol(parentScope); + setAstSymbol(finallyBodyAst, bodySymbol); + addSymbolForResolving(bodySymbol); + parseBlockBody(parentScope , typeResolver, isModuleBlock); + builder.endProduction(finallyBodyAst); + } + + if (isModuleBlock) { + addModuleFrameNode(END_KEYWORD); + } else { + addProcedureFrameNode(END_KEYWORD); + } + parseToken(END_KEYWORD); + + if (blockBodyAst != null) { + builder.endProduction(blockBodyAst); + } + + if (IDENTIFIER == token) { + if (parentScope instanceof IMutableBlockSymbolTextBinding) { + addNameRegion( (IMutableBlockSymbolTextBinding)parentScope + , getTokenText(), getTokenPosition() ); + } + ElementType nameType = (isModuleBlock) ? MODULE_IDENTIFIER + : PROCEDURE_IDENTIFIER; + builder.beginProduction(nameType); + nextToken(); + builder.endProduction(nameType); + } + else { + error(XdsMessages.IdentifierExpected); + } + } + + private void parseBlockBody(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver, boolean isModuleBlock) { + if (token == FINALLY_KEYWORD) { + if (settings.getOption(XdsOptions.K26)) { + warning(XdsMessages.KeywordDisabledByK26Option, FINALLY_KEYWORD.getDesignator()); + } + } + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + + if (token == EXCEPT_KEYWORD) { + if (isModuleBlock) { + addModuleFrameNode(EXCEPT_KEYWORD); + } else { + addProcedureFrameNode(EXCEPT_KEYWORD); + } + + builder.beginProduction(EXCEPT_BLOCK); + + if (settings.getOption(XdsOptions.K26)) { + warning(XdsMessages.KeywordDisabledByK26Option, EXCEPT_KEYWORD.getDesignator()); + } + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + + builder.endProduction(EXCEPT_BLOCK); + } + } + + + private void parseStamentSequence(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + builder.beginProduction(STATEMENT_LIST); + ElementType statementType = null; + AstStatement statementAst = null; + + while (token != EOF) { + if (SEMICOLON != token) { + if (IDENTIFIER == token) + { + statementType = ASSIGMENT_STATEMENT; + builder.beginProduction(statementType); + parseDesignator(parentSymbol, typeResolver); + if (BECOMES == token) { + parseAssignment(parentSymbol, typeResolver); + } + else if (COLON == token) { + nextToken(); + } + else if (EQU == token) { + error(XdsMessages.StringExpected, BECOMES.getDesignator()); + nextToken(); + expressionParser.parseExpression(parentSymbol, typeResolver); + } + else { + statementType = CALL_EXPRESSION; + skipParameters(parentSymbol, typeResolver); + } + + } + else if (IF_KEYWORD == token) + { + statementAst = builder.beginProduction(IF_STATEMENT); + addFrameNode(IF_KEYWORD, IF_STATEMENT); + nextToken(); + while (token != EOF) + { + expressionParser.parseBooleanExpression(parentSymbol, typeResolver); + addFrameNode(THEN_KEYWORD, IF_STATEMENT); + parseToken(THEN_KEYWORD); + parseStamentSequence(parentSymbol, typeResolver); + if (token == ELSIF_KEYWORD) { + addFrameNode(ELSIF_KEYWORD, IF_STATEMENT); + nextToken(); + } + else { + if (token == ELSE_KEYWORD) { + addFrameNode(ELSE_KEYWORD, IF_STATEMENT); + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + } + break; + } + } + addFrameNode(END_KEYWORD, IF_STATEMENT); + nextToken(); + + } + else if (WHILE_KEYWORD == token) + { + statementAst = builder.beginProduction(WHILE_STATEMENT); + addFrameNode(WHILE_KEYWORD, WHILE_STATEMENT); + nextToken(); + expressionParser.parseBooleanExpression(parentSymbol, typeResolver); + addFrameNode(DO_KEYWORD, WHILE_STATEMENT); + parseToken(DO_KEYWORD); + parseStamentSequence(parentSymbol, typeResolver); + addFrameNode(END_KEYWORD, WHILE_STATEMENT); + parseToken(END_KEYWORD); + + } + else if (REPEAT_KEYWORD == token) + { + statementAst = builder.beginProduction(REPEAT_STATEMENT); + addFrameNode(REPEAT_KEYWORD, REPEAT_STATEMENT); + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + addFrameNode(UNTIL_KEYWORD, REPEAT_STATEMENT); + parseToken(UNTIL_KEYWORD); + expressionParser.parseBooleanExpression(parentSymbol, typeResolver); + + } + else if (LOOP_KEYWORD == token) + { + statementAst = builder.beginProduction(LOOP_STATEMENT); + addFrameNode(LOOP_KEYWORD, LOOP_STATEMENT); + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + addFrameNode(END_KEYWORD, LOOP_STATEMENT); + parseToken(END_KEYWORD); + + } + else if (EXIT_KEYWORD == token) + { + statementType = EXIT_STATEMENT; + builder.beginProduction(statementType); + addFrameNode(EXIT_KEYWORD, LOOP_STATEMENT); + nextToken(); + + } + else if (RETURN_KEYWORD == token) + { + statementType = RETURN_STATEMENT; + builder.beginProduction(statementType); + addProcedureFrameNode(RETURN_KEYWORD); + nextToken(); + if (!RETURN_TERMINATION_SET.contains(token)) { + expressionParser.parseExpression(parentSymbol, typeResolver); + } + + } + else if (GOTO_KEYWORD == token) + { + statementType = GOTO_STATEMENT; + builder.beginProduction(statementType); + parseGotoStatement(); + + } + else if (FOR_KEYWORD == token) + { + statementAst = builder.beginProduction(FOR_STATEMENT); + parseForStatement(parentSymbol, typeResolver); + + } + else if (CASE_KEYWORD == token) + { + statementAst = parseCaseStatement(parentSymbol, typeResolver); + + } + else if (WITH_KEYWORD == token) + { + if (settings.isOberon()) { + statementType = OBERON_WITH_STATEMENT; + builder.beginProduction(statementType); + parseOberonWithStatement(parentSymbol, typeResolver); + } + else { + statementType = MODULA_WITH_STATEMENT; + AstModulaWithStatement withStmtAst = builder.beginProduction(MODULA_WITH_STATEMENT); + parseModulaWithStatement(withStmtAst, parentSymbol, typeResolver); + } + + } + else if (RETRY_KEYWORD == token) + { + statementType = RETRY_STATEMENT; + builder.beginProduction(statementType); + nextToken(); + + } + else if (ASM_KEYWORD == token) + { + statementAst = builder.beginProduction(ASM_STATEMENT); + addFrameNode(ASM_KEYWORD, ASM_STATEMENT); + parseAsmBlock(); + nextToken(); + + } + else if (STATEMENT_TERMINATION_SET.contains(token)) + { + break; + + } + else { + error(XdsMessages.ExpectedStartOfStatement); + nextToken(); + } + } + + if (SEMICOLON == token) { + nextToken(); + } + else if (STATEMENT_TERMINATION_SET.contains(token)) { + if (statementAst != null) { + builder.endProduction(statementAst); + statementAst = null; + } + else if (statementType != null) { + builder.endProduction(statementType); + statementType = null; + } + break; + } + else { + errorExpectedSymbol(SEMICOLON); + } + + if (statementAst != null) { + builder.endProduction(statementAst); + statementAst = null; + } + else if (statementType != null) { + builder.endProduction(statementType); + statementType = null; + } + } + + builder.endProduction(STATEMENT_LIST); + } + + + private void parseAsmBlock() { + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, ""); + } + skipToToken(END_KEYWORD); + addFrameNode(END_KEYWORD, ASM_STATEMENT); + } + + + /** + * WithStatement = "WITH" RecordDesignator "DO" StatementSequence "END"
+ * RecordDesignator = VariableDesignator | ValueDesignator
+ */ + private void parseModulaWithStatement( AstModulaWithStatement withStmtAst + , IModulaSymbolScope parentScope, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == WITH_KEYWORD); + addFrameNode(WITH_KEYWORD, MODULA_WITH_STATEMENT); + nextToken(); + IModulaSymbol recordDesignatorSymbol = expressionParser.parseExpression(parentScope, typeResolver); + parentScope = createWithStatementScope(parentScope, recordDesignatorSymbol); + if (withStmtAst != null) { + withStmtAst.setScope(parentScope); + } + + addFrameNode(DO_KEYWORD, MODULA_WITH_STATEMENT); + parseToken(DO_KEYWORD); + parseStamentSequence(parentScope, typeResolver); + addFrameNode(END_KEYWORD, MODULA_WITH_STATEMENT); + parseToken(END_KEYWORD); + } + + private void parseOberonWithStatement(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + nextToken(); + boolean exit = false; + while (!exit && (token != EOF)) { + parseOberonWithVariant(parentSymbol , typeResolver); + if (token == SEP) { + nextToken(); + } + else { + exit = true; + } + } + if (token == ELSE_KEYWORD) { + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + } + nextToken(); + } + + + private void parseOberonWithVariant(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + parseDesignator(parentSymbol, typeResolver); + parseToken(COLON); + parseTypeQualident(parentSymbol, typeResolver, false); + parseToken(DO_KEYWORD); + parseStamentSequence(parentSymbol, typeResolver); + } + + + /** + * CaseStatement = "CASE" CaseSelector "OF" CaseVariantList "END"
+ * CaseSelector = OrdinalExpression
+ * CaseVariantList = CaseVariant {"|" CaseVariant} [CaseElsePart]
+ * + * CaseVariant = [CaseLabelList ":" StatementSequence]
+ * CaseLabelList = CaseLabel {"," CaseLabel}
+ * CaseLabel = ConstantExpression [".." ConstantExpression]
+ */ + private AstCaseStatement parseCaseStatement(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + Assert.isTrue(token == CASE_KEYWORD); + AstCaseStatement statementAst = builder.beginProduction(CASE_STATEMENT); + addFrameNode(CASE_KEYWORD, CASE_STATEMENT); + + nextToken(); + expressionParser.parseExpression(CASE_VARIANT_SELECTOR, parentSymbol, typeResolver); + + addFrameNode(OF_KEYWORD, CASE_STATEMENT); + parseToken(OF_KEYWORD); + + builder.beginProduction(CASE_VARIANT_LIST); + while ((token != END_KEYWORD) && (token != ELSE_KEYWORD) && (token != EOF)) { + if (token == SEP) { + addFrameNode(SEP, CASE_STATEMENT); + nextToken(); + } + else { + parseCaseStatementVariant(parentSymbol, typeResolver); + } + } + + if (token == ELSE_KEYWORD) { + addFrameNode(ELSE_KEYWORD, CASE_STATEMENT); + builder.beginProduction(CASE_ELSE_PART); + nextToken(); + parseStamentSequence(parentSymbol, typeResolver); + builder.endProduction(CASE_ELSE_PART); + } + else { +// KIDE-333: Ëèøíåå ïðåäóïðåæäåíèå 'CASE statement without ELSE' +// TODO: to show this warning we must be sure that there is at last one untreated CASE-variant. +// warning(XdsMessages.CaseWithoutElsePart); + } + builder.endProduction(CASE_VARIANT_LIST); + + addFrameNode(END_KEYWORD, CASE_STATEMENT); + parseToken(END_KEYWORD); + return statementAst; + } + + + /** + * CaseVariant = [CaseLabelList ":" StatementSequence]
+ * CaseLabelList = CaseLabel {"," CaseLabel}
+ * CaseLabel = ConstantExpression [".." ConstantExpression]
+ */ + private void parseCaseStatementVariant(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + builder.beginProduction(CASE_VARIANT); + + builder.beginProduction(CASE_LABEL_LIST); + while (token != EOF) { + builder.beginProduction(CASE_LABEL); + expressionParser.parseConstantExpression(parentSymbol, typeResolver); + if (token == RANGE) { + nextToken(); + expressionParser.parseConstantExpression(parentSymbol, typeResolver); + } + builder.endProduction(CASE_LABEL); + + if (token == COMMA) { + nextToken(); + } + else { + break; + } + } + builder.endProduction(CASE_LABEL_LIST); + + addFrameNode(COLON, CASE_STATEMENT); + parseToken(COLON); + parseStamentSequence(parentSymbol, typeResolver); + + builder.endProduction(CASE_VARIANT); + if ((token != ELSE_KEYWORD) && (token != END_KEYWORD)) { + addFrameNode(SEP, CASE_STATEMENT); + parseToken(SEP); + } + } + + + private void parseForStatement(IModulaSymbolScope parentScope, ISymbolWithScope typeResolver) { + Assert.isTrue(token == FOR_KEYWORD); + addFrameNode(FOR_KEYWORD, FOR_STATEMENT); + nextToken(); + + AstSimpleName controlVariableAst = builder.beginProduction(SIMPLE_NAME); + if (token == IDENTIFIER) { + String controlVariableName = getTokenText(); + IModulaSymbol controlVariableSymbol = resolveForLoopControlVariable( + controlVariableName, parentScope + ); + if (controlVariableSymbol != null) { + setAstSymbol(controlVariableAst, controlVariableSymbol); + addSymbolUsage(controlVariableSymbol); + } + nextToken(); + } + else { + error(XdsMessages.IdentifierExpected); + } + builder.endProduction(controlVariableAst); + + parseToken(BECOMES); + expressionParser.parseExpression(parentScope, typeResolver); + + addFrameNode(TO_KEYWORD, FOR_STATEMENT); + parseToken(TO_KEYWORD); + expressionParser.parseExpression(parentScope, typeResolver); + + if (token == BY_KEYWORD) { + addFrameNode(BY_KEYWORD, FOR_STATEMENT); + nextToken(); + expressionParser.parseExpression(parentScope, typeResolver); + } + + addFrameNode(DO_KEYWORD, FOR_STATEMENT); + parseToken(DO_KEYWORD); + parseStamentSequence(parentScope, typeResolver); + addFrameNode(END_KEYWORD, FOR_STATEMENT); + parseToken(END_KEYWORD); + } + + + private void parseGotoStatement() { + nextToken(); + if (token == IDENTIFIER) { + nextToken(); + } + else { + error(XdsMessages.IdentifierExpected); + } + } + + + private void parseAssignment(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + nextToken(); + expressionParser.parseExpression(parentSymbol, typeResolver); + } + + + private void parseLabelDeclaration() { + Assert.isTrue(token == LABEL_KEYWORD); + + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + + nextToken(); + while (token == IDENTIFIER) { + @SuppressWarnings("unused") + String labelName = getTokenText(); + nextToken(); + if (SEMICOLON == token) + { + nextToken(); + break; + } + else if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(SEMICOLON); + } + else { + errorExpectedSymbol(SEMICOLON); + break; + } + } + } + + + private void parseConstantDeclaration(ISymbolWithDefinitions parentSymbol, ISymbolWithScope typeResolver) { + Assert.isTrue(token == CONST_KEYWORD); + builder.beginProduction(CONSTANT_DECLARATION_BLOCK); + + nextToken(); + while (token == IDENTIFIER) { + AstConstantDeclaration constantAst; + constantAst = builder.beginProduction(CONSTANT_DECLARATION); + + builder.beginProduction(DECORATED_IDENTIFIER); + + final String constantName = getTokenText(); +// TODO : ---- BEGIN Code below should be moved to the XdsSymbolParser? + ConstantSymbol constantSymbol = createConstantSymbol(parentSymbol, constantName); + + boolean alreadyDefined = checkSymbolAlreadyDefined(constantName, parentSymbol); + + nextToken(); + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + constantSymbol.setLanguage(modifierParser.language); + + EnumSet attributes = parseExportMarker(true); + constantSymbol.addAttributes(attributes); + + setAstSymbol(constantAst, constantSymbol); +// TODO : ---- END Code below should be moved to the XdsSymbolParser? + + builder.endProduction(DECORATED_IDENTIFIER); + + if (EQU == token) + { + nextToken(); + setTypeOfConstantSymbol(constantSymbol, parentSymbol, typeResolver); + } + else if (ALIAS == token) + { + nextToken(); + parseQualident(parentSymbol, typeResolver); + } + else + { + errorExpectedSymbol(EQU); + builder.endProduction(CONSTANT_DECLARATION); + break; + } + + if (alreadyDefined) { + markAsAlreadyDefined(constantSymbol); + } else { + parentSymbol.addConstant(constantSymbol); + } + addSymbolForResolving(constantSymbol); + + if (SEMICOLON == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(SEMICOLON); + } + else { + errorExpectedSymbol(SEMICOLON); + builder.endProduction(CONSTANT_DECLARATION); + break; + } + builder.endProduction(CONSTANT_DECLARATION); + } + + builder.endProduction(CONSTANT_DECLARATION_BLOCK); + } + + + private void parseVariableDeclaration(ISymbolWithDefinitions parentSymbol, ISymbolWithScope typeResolver) { + Assert.isTrue(token == VAR_KEYWORD); + builder.beginProduction(VARIABLE_DECLARATION_BLOCK); + nextToken(); + + boolean wasSlash = false; + while ((token == IDENTIFIER) || (token == SLASH)) { + if (token == SLASH) { + wasSlash = true; + nextToken(); + } + else { + builder.beginProduction(VARIABLE_DECLARATION); + builder.beginProduction(VARIABLE_LIST); + + String hostName = null; + List allVariableSymbols = new ArrayList(32); + while (token != EOF) + { + if (token == IDENTIFIER) { + AstVariable variableAst = builder.beginProduction(VARIABLE); + + String variableName = getTokenText(); + if (hostName == null) { + hostName = variableName; + } + VariableSymbol variableSymbol = createVariableSymbol(variableName, parentSymbol); + + if (wasSlash) { + variableSymbol.addAttribute(SymbolAttribute.EXTERNAL); + wasSlash = false; + } + + boolean alreadyDefined = checkSymbolAlreadyDefined(variableName, parentSymbol); + if (alreadyDefined) { + markAsAlreadyDefined(variableSymbol); + } + else { + parentSymbol.addVariable(variableSymbol); + } + + allVariableSymbols.add(variableSymbol); + setAstSymbol(variableAst, variableSymbol); + + nextToken(); + modifierParser.parseAbsoluteAddress(parentSymbol, typeResolver); + + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + variableSymbol.setLanguage(modifierParser.language); + + EnumSet attributes = parseExportMarker(true); + variableSymbol.addAttributes(attributes); + + addSymbolForResolving(variableSymbol); + builder.endProduction(variableAst); + } + else { + parseToken(IDENTIFIER); + } + + if (token == COMMA) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + builder.endProduction(VARIABLE_LIST); + + if (settings.xdsExtensions() && (token == SEP)) { + nextToken(); + } + + boolean needType = true; + ITypeSymbol typeSymbol; + + if (settings.xdsExtensions() && (token == BECOMES)) { + nextToken(); + expressionParser.parseExpression(parentSymbol, typeResolver); + if (token == COLON) { + nextToken(); + } + else { + needType = false; + } + } + else { + parseToken(COLON); + } + + if (needType) { + typeSymbol = parseTypeDefinition(null, hostName, parentSymbol, parentSymbol, false, false); + } + else { + // TODO TypeSymbol must be extracted from expression + typeSymbol = null; + } + + for (VariableSymbol variableSymbol : allVariableSymbols) { + setTypeSymbol(variableSymbol, typeSymbol); + } + + parseToken(SEMICOLON); + builder.endProduction(VARIABLE_DECLARATION); + wasSlash = false; + } + } + + builder.endProduction(VARIABLE_DECLARATION_BLOCK); + } + + + /** + * TypeDefinition = SimpleType | ArrayType | RecordType | SetType | PointerType | ProcedureType + * + * @param typeName - the name of defined type, may be null + * @param hostName - the name of host symbol, used to construct name of anonymous type + */ + private ITypeSymbol parseTypeDefinition( String typeName, String hostName + , ISymbolWithScope parentSymbol + , ISymbolWithScope typeResolver + , boolean isOpenArrayEnabled + , boolean isForwardDeclarationEnabled ) + { + return parseTypeDefinition( typeName, hostName, parentSymbol, typeResolver + , isOpenArrayEnabled, isForwardDeclarationEnabled + , TYPE_ELEMENT ); + } + + + /** + * TypeDefinition = SimpleType | ArrayType | RecordType | SetType | PointerType | ProcedureType + * + * @param typeName - the name of defined type, may be null + * @param hostName - the name of host symbol, used to construct name of anonymous type + */ + private ITypeSymbol parseTypeDefinition( String typeName, String hostName + , ISymbolWithScope parentScope + , ISymbolWithScope typeResolver + , boolean isOpenArrayEnabled + , boolean isForwardDeclarationEnabled + , ModulaCompositeType astNodeType ) + { + builder.beginProduction(astNodeType); + ITypeSymbol typeSymbol = null; + if (IDENTIFIER == token) + { + final String identifier = getTokenText(); + final TextPosition forwardTypePosition = getTokenPosition(); + + AstRangeType typeAst = builder.beginProduction(RANGE_TYPE_DEFINITION); + typeSymbol = parseTypeQualident(parentScope, typeResolver, isOpenArrayEnabled); + if (token == LBRACKET) { + IOrdinalTypeSymbol baseTypeSymbol; + if (typeSymbol instanceof IOrdinalTypeSymbol) { + baseTypeSymbol = (IOrdinalTypeSymbol)typeSymbol; + } + else { + baseTypeSymbol = null; + error(XdsMessages.ExpectedOrdinalType); + } + IRangeTypeSymbol rangeTypeSymbol = parseRangeTypeDefinition( + typeName, hostName, parentScope, typeResolver, baseTypeSymbol + ); + + builder.endProduction(typeAst); + setAstSymbol(typeAst, rangeTypeSymbol); + addSymbolForResolving(rangeTypeSymbol); + typeSymbol = rangeTypeSymbol; + } + else { + builder.dropProduction(RANGE_TYPE_DEFINITION); + if (typeSymbol == null) { + if (isForwardDeclarationEnabled) { + IForwardTypeSymbol forwardTypeSymbol = createAndRegisterForwardType(identifier, parentScope); + setSymbolPosition(forwardTypeSymbol, forwardTypePosition); + addSymbolUsage(forwardTypeSymbol, forwardTypePosition); + if (forwardTypeQualidentAst != null) { + setAstSymbol(forwardTypeQualidentAst, forwardTypeSymbol); + addSymbolForResolving(forwardTypeSymbol); + } + typeSymbol = forwardTypeSymbol; + } + else { +// TODO +// error(XdsMessages.TypeIsNotDefined, identifier); + } + } + else { + if (typeName != null) { + typeSymbol = typeSymbol.createSynonym(typeName, parentScope, refFactory); + } + } + } + } + else if (LBRACKET == token) { + AstRangeType typeAst; + typeAst = builder.beginProduction(RANGE_TYPE_DEFINITION); + + IRangeTypeSymbol rangeTypeSymbol = parseRangeTypeDefinition( + typeName, hostName, parentScope, typeResolver, null + ); + setAstSymbol(typeAst, rangeTypeSymbol); + addSymbolForResolving(rangeTypeSymbol); + typeSymbol = rangeTypeSymbol; + + builder.endProduction(typeAst); + } + else if (LPARENTH == token) { + typeSymbol = parseEnumerationTypeDefinition(typeName, hostName, parentScope); + } + else if (PROCEDURE_KEYWORD == token) + { + if (settings.isOdfSource()) { + typeSymbol = parseProcedureTypeDefinition(typeName, hostName, parentScope, typeResolver); + } + else if (settings.isOberon()) { + typeSymbol = parseProcedureTypeOberonDefinition(typeName, hostName, parentScope, typeResolver); + } + else { + typeSymbol = parseProcedureTypeDefinition(typeName, hostName, parentScope, typeResolver); + } + } + else if (RECORD_KEYWORD == token) { + typeSymbol = parseRecordTypeDefinition(typeName, hostName, parentScope, typeResolver); + } + else if (ARRAY_KEYWORD == token) { + typeSymbol = parseArrayTypeDefinition(typeName, hostName, isOpenArrayEnabled, parentScope, typeResolver); + } + else if (SET_KEYWORD == token) { + typeSymbol = parseSetTypeDefinition(typeName, hostName, false, parentScope, typeResolver); + } + else if (PACKEDSET_KEYWORD == token) { + typeSymbol = parseSetTypeDefinition(typeName, hostName, true, parentScope, typeResolver); + } + else if (POINTER_KEYWORD == token) { + typeSymbol = parsePointerTypeDefinition(typeName, hostName, parentScope, typeResolver); + } + else { + error(XdsMessages.ExpectedTypeStart); + } + + if (typeSymbol != null && typeSymbol.isAnonymous() ) { + addSymbolForResolving(typeSymbol); + } + + builder.endProduction(astNodeType); + return typeSymbol; + } + + + /** + * PointerType = "POINTER" [DirectLanguageSpec] "TO" BoundType
+ * BoundType = TypeIdentifier | NewType
+ */ + private IPointerTypeSymbol parsePointerTypeDefinition( String typeName + , String hostName + , ISymbolWithScope scope, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == POINTER_KEYWORD); + AstPointerType typeAst = builder.beginProduction(POINTER_TYPE_DEFINITION); + + boolean isTypeDeclaration = (typeName != null); + + PointerTypeSymbol typeSymbol = createPointerTypeSymbol( + typeName, hostName, scope, typeAst + ); + typeName = typeSymbol.getName(); + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + nextToken(); + + modifierParser.parseDirectLanguageSpec(scope, typeResolver); + typeSymbol.setLanguage(modifierParser.language); + + parseToken(TO_KEYWORD); + + if (isTypeDeclaration) { + declaredType = typeSymbol; + } + + ITypeSymbol boundTypeSymbol = parseTypeDefinition(null, typeName, scope, typeResolver, true, true); + + setBoundTypeSymbol(typeSymbol, boundTypeSymbol); + + builder.endProduction(typeAst); + return typeSymbol; + } + + + /** + * SetType = "SET" "OF" BaseType
+ * BaseType = OrdinalTypeIdentifier | NewOrdinalType
+ * + * OrdinalTypeIdentifier = TypeIdentifier
+ * NewOrdinalType = EnumerationType | SubrangeType
+ */ + private ISetTypeSymbol parseSetTypeDefinition( String typeName + , String hostName + , boolean isPacked + , ISymbolWithScope scope, ISymbolWithScope typeResolver ) + { + Assert.isTrue((token == SET_KEYWORD) || (token == PACKEDSET_KEYWORD)); + AstSetType typeAst; + typeAst = builder.beginProduction(SET_TYPE_DEFINITION); + + SetTypeSymbol typeSymbol = null; + if (settings.isOberon() && !isPacked) { + typeSymbol = (SetTypeSymbol)ModulaSymbolCache.getOberonSuperModule().resolveName("SET"); //$NON-NLS-1$ + nextToken(); + } + else { + nextToken(); + parseToken(OF_KEYWORD); + + typeName = generateNameIfNull(typeName, hostName, "SetType", scope); //$NON-NLS-1$ + ITypeSymbol baseTypeSymbol = parseTypeDefinition(null, typeName, scope, typeResolver, false, false); + + typeSymbol = createSetTypeSymbol( + typeName, hostName, isPacked, baseTypeSymbol, scope + ); + } + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + builder.endProduction(typeAst); + return typeSymbol; + } + + /** + * ModulaArrayType = "ARRAY" IndexType {"," IndexType} "OF" ComponentType
+ * ModulaOpenArrayFormalType = "ARRAY" "OF" {"ARRAY" "OF"} TypeIdentifier
+ * + * IndexType = Ordinal TypeDenoter
+ * + * OberonArrayType = "ARRAY" [ConstExpr {"," ConstExpr}] "OF" Type
+ */ + private IArrayTypeSymbol parseArrayTypeDefinition( String typeName + , String hostName + , boolean openArrayEnabled + , ISymbolWithScope scope, ISymbolWithScope typeResolver ) + { + AstArrayType typeAst = builder.beginProduction(ARRAY_TYPE_DEFINITION); + typeName = generateNameIfNull(typeName, hostName, "ArrayType", scope); //$NON-NLS-1$ + + nextToken(); + + IArrayTypeSymbol typeSymbol = null; + if (token == OF_KEYWORD) { + typeAst = builder.changeProduction(OPEN_ARRAY_TYPE_DEFINITION); + if (!settings.isOberon() && !settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ArrayOfType); + } + if (!openArrayEnabled) { + error(XdsMessages.IllegalOpenArrayTypeUsage); + } + nextToken(); + ITypeSymbol elementTypeSymbol = parseTypeDefinition(null, typeName, scope, typeResolver, true, false); + + typeSymbol = createOpenArrayTypeSymbol( + typeName, hostName, elementTypeSymbol, scope + ); + } + else { + IOrdinalTypeSymbol indexTypeSymbol = null; + if (settings.isOberon() && !settings.isOdfSource()) { + expressionParser.parseConstantExpression(scope, typeResolver); + + indexTypeSymbol = (IOrdinalTypeSymbol)ModulaSymbolCache.getOberonSystemModule().resolveName(XdsStandardNames.INDEX); + } + else { + ITypeSymbol parsedIndexTypeSymbol = parseTypeDefinition(null, typeName, scope, typeResolver, false, false, INDEX_TYPE); + + if (parsedIndexTypeSymbol instanceof IOrdinalTypeSymbol) { + indexTypeSymbol = (IOrdinalTypeSymbol)parsedIndexTypeSymbol; + } + } + + if (token == COMMA) { + builder.acceptLastToken(); + token = ARRAY_KEYWORD; + } else { + parseToken(OF_KEYWORD); + } + + ITypeSymbol elementTypeSymbol = parseTypeDefinition(null, typeName, scope, typeResolver, false, false); + + typeSymbol = createArrayTypeSymbol( + typeName, hostName, elementTypeSymbol, indexTypeSymbol, scope + ); + } + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + builder.endProduction(typeAst); + return typeSymbol; + } + + + /** + * RecordType = "RECORD" [BaseTypeDeclaration] FieldListSequence "END"
+ * BaseTypeDeclaration = "(" RecordType ")"
+ */ + private IRecordTypeSymbol parseRecordTypeDefinition( String typeName + , String hostName + , ISymbolWithScope parentSymbol, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == RECORD_KEYWORD); + AstRecordType typeAst = builder.beginProduction(RECORD_TYPE_DEFINITION); + addFrameNode(RECORD_KEYWORD, RECORD_TYPE_DEFINITION); + + boolean isTypeDeclaration = (typeName != null); + + nextToken(); + + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + XdsLanguage language = modifierParser.language; + + RecordTypeSymbol typeSymbol = null; + if ((token == LPARENTH) && (settings.isOberon() || settings.xdsExtensions())) { + IRecordTypeSymbol baseTypeSymbol = parseBaseTypeDeclaration(parentSymbol, typeResolver); + typeSymbol = createRecordTypeSymbol( + typeName, hostName, baseTypeSymbol, "OberonRecord", parentSymbol //$NON-NLS-1$ + ); + } + else { + typeSymbol = createRecordTypeSymbol( + typeName, hostName, null, "Record", parentSymbol //$NON-NLS-1$ + ); + } + + typeSymbol.setLanguage(language); + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + if (isTypeDeclaration) { + declaredType = typeSymbol; + } + + parseRecordFieldsDefintion(language, typeSymbol, typeResolver); + addFrameNode(END_KEYWORD, RECORD_TYPE_DEFINITION); + parseToken(END_KEYWORD); + + builder.endProduction(typeAst); + return typeSymbol; + } + + + /** + * FieldListSequence = FieldList {";" FieldList}
+ * FieldList = SimpleFields | VariantFields
+ */ + private void parseRecordFieldsDefintion( XdsLanguage language + , RecordTypeSymbol parentScope, ISymbolWithScope typeResolver ) + { + builder.beginProduction(RECORD_FIELD_BLOCK_LIST); + while (token != EOF) + { + if (IDENTIFIER == token) { + parseRecordSimpleFieldDefinition(parentScope, typeResolver); + } + else if (CASE_KEYWORD == token) { + parseRecordVariantFieldDefinition(language, parentScope, typeResolver); + } + else if (END_ELSE_SEP_SET.contains(token)) { + break; + } + else if (settings.isOdfSource() && (PROCEDURE_KEYWORD == token)) { + parseProcedureDeclaration(parentScope, typeResolver); + } + else if (token != SEMICOLON) { + errorExpectedSymbol(END_KEYWORD); + skipToToken(END_KEYWORD); + break; + } + else { + parseToken(SEMICOLON); + } + } + builder.endProduction(RECORD_FIELD_BLOCK_LIST); + } + + + /** + * VariantFields = "CASE" [Identifier] ":" OrdinalTypeidentifier "OF" VariantList "END"
+ * VariantList = Variant {"|" Variant}
+ */ + private void parseRecordVariantFieldDefinition( XdsLanguage language + , RecordTypeSymbol parentSymbol, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == CASE_KEYWORD); + builder.beginProduction(RECORD_VARIANT_FIELD_BLOCK); + addFrameNode(CASE_KEYWORD, RECORD_VARIANT_FIELD_BLOCK); + + parentSymbol.addAttribute(SymbolAttribute.VARIANT_RECORD); + if (XdsLanguage.Oberon2 == language) { + error(XdsMessages.VariantFieldsNotAllowedInOberonRecord); + } + + nextToken(); + + AstRecordVariantSelector selectorAst = builder.beginProduction(RECORD_VARIANT_SELECTOR); + String selectorName = null; + boolean alreadyDefined = true; + + final TextPosition selectorPosition = getTokenPosition(); + if (token == COLON) { + // unnamed tag + } + else if (token == IDENTIFIER) { + selectorName = getTokenText(); + alreadyDefined = checkSymbolAlreadyDefined(selectorName, parentSymbol); + + nextToken(); + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + parseExportMarker(true); + } + else { + error(XdsMessages.IdentifierExpected); + builder.endProduction(selectorAst); + builder.endProduction(RECORD_VARIANT_FIELD_BLOCK); + skipToToken(END_KEYWORD); + return; + } + + parseToken(COLON); + ITypeSymbol selectorTypeSymbol = parseTypeQualident(parentSymbol, typeResolver, false); + + RecordVariantSelectorSymbol selectorSymbol = createRecordVariantSelectorSymbol( + selectorName, selectorTypeSymbol, selectorPosition, parentSymbol + ); + + if (alreadyDefined) { + markAsAlreadyDefined(selectorSymbol); + } + else { + parentSymbol.addField(selectorSymbol); + } + + setAstSymbol(selectorAst, selectorSymbol); + addSymbolForResolving(selectorSymbol); + builder.endProduction(selectorAst); + + addFrameNode(OF_KEYWORD, RECORD_VARIANT_FIELD_BLOCK); + parseToken(OF_KEYWORD); + + builder.beginProduction(RECORD_VARIANT_LIST); + while ((token != END_KEYWORD) && (token != EOF)) { + if (token == SEP) { + addFrameNode(SEP, RECORD_VARIANT_FIELD_BLOCK); + nextToken(); + } + else { + parseRecordVariant(language, parentSymbol, typeResolver); + } + } + addFrameNode(END_KEYWORD, RECORD_VARIANT_FIELD_BLOCK); + builder.endProduction(RECORD_VARIANT_LIST); + + nextToken(); + + if (!END_ELSE_SEP_SET.contains(token)) { + parseRepeatingToken(SEMICOLON); + } + + builder.endProduction(RECORD_VARIANT_FIELD_BLOCK); + } + + + /** + * RecordVariant = "ELSE" FieldListSequence | RecordVariantLabelList ":" FieldListSequence
+ * RecordVariantLabelList = RecordVariantLabels {"," CaseLabels}
+ * RecordVariantLabels = ConstExpression [".." ConstExpression]
+ */ + private void parseRecordVariant( XdsLanguage language + , RecordTypeSymbol parentSymbol, ISymbolWithScope typeResolver) + { + if (token == ELSE_KEYWORD) { + addFrameNode(ELSE_KEYWORD, RECORD_VARIANT_FIELD_BLOCK); + builder.beginProduction(RECORD_VARIANT_ELSE_PART); + nextToken(); + parseRecordFieldsDefintion(language, parentSymbol, typeResolver); + builder.endProduction(RECORD_VARIANT_ELSE_PART); + } + else { + builder.beginProduction(RECORD_VARIANT); + builder.beginProduction(RECORD_VARIANT_LABEL_LIST); + while (token != EOF) + { + parseVariantLabel(parentSymbol, typeResolver); + if (COLON == token) { + addFrameNode(COLON, RECORD_VARIANT_FIELD_BLOCK); + break; + } + else if (COMMA == token) { + nextToken(); + } + else { + parseToken(COMMA); + break; + } + } + builder.endProduction(RECORD_VARIANT_LABEL_LIST); + + nextToken(); + parseRecordFieldsDefintion(language, parentSymbol, typeResolver); + + if ((token != ELSE_KEYWORD) && (token != END_KEYWORD)) { + addFrameNode(SEP, RECORD_VARIANT_FIELD_BLOCK); + parseToken(SEP); + } + builder.endProduction(RECORD_VARIANT); + } + } + + + /** + * RecordVariantLabel = ConstantExpression [".." ConstantExpression]
+ */ + private void parseVariantLabel(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + AstRecordVariantLabel labelAst = builder.beginProduction(RECORD_VARIANT_LABEL); + expressionParser.parseExpression(CONSTANT_EXPRESSION, parentSymbol, typeResolver); + if (token == RANGE) { + nextToken(); + expressionParser.parseExpression(CONSTANT_EXPRESSION, parentSymbol, typeResolver); + } + if (labelAst != null) { + String labelText = chars.subSequence( + labelAst.getOffset(), labelAst.getOffset() + labelAst.getLength() + ).toString(); + labelAst.setText(labelText); + } + builder.endProduction(labelAst); + } + + /** + * SimpleFields = IdentifierList ":" TypeDefinition
+ * IdentifierList = Identifier {"," Identifier}
+ */ + private void parseRecordSimpleFieldDefinition(IRecordTypeSymbol parentSymbol, ISymbolWithScope typeResolver) { + builder.beginProduction(RECORD_SIMPLE_FIELD_BLOCK); + builder.beginProduction(RECORD_FIELD_LIST); + + List declaredSymbols = new ArrayList(8); + String hostName = null; + while (true) { + if (IDENTIFIER == token) { + AstRecordField fieldAst = builder.beginProduction(RECORD_FIELD); + + String fieldName = getTokenText(); + if (hostName == null) { + hostName = fieldName; + } + RecordFieldSymbol fieldSymbol = createRecordFieldSymbol(fieldName, parentSymbol); + setAstSymbol(fieldAst, fieldSymbol); + + boolean alreadyDefined = checkSymbolAlreadyDefined(fieldName, parentSymbol, declaredSymbols); + if (alreadyDefined) { + markAsAlreadyDefined(fieldSymbol); + } + declaredSymbols.add(fieldSymbol); + + nextToken(); + + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + fieldSymbol.setLanguage(modifierParser.language); + + EnumSet attributes = parseExportMarker(true); + fieldSymbol.addAttributes(attributes); + + addSymbolForResolving(fieldSymbol); + builder.endProduction(fieldAst); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + builder.endProduction(RECORD_FIELD_LIST); + + parseToken(COLON); + + ITypeSymbol typeSymbol = parseTypeDefinition(null, hostName, parentSymbol, typeResolver, false, false); + + for (RecordFieldSymbol fieldSymbol : declaredSymbols) { + fieldSymbol.setTypeSymbol(createRef(typeSymbol)); + if (!fieldSymbol.isAttributeSet(SymbolAttribute.ALREADY_DEFINED)) { + parentSymbol.addField(fieldSymbol); + } + } + + if (!END_ELSE_SEP_SET.contains(token)) { + parseRepeatingToken(SEMICOLON); + } + + builder.endProduction(RECORD_SIMPLE_FIELD_BLOCK); + } + + /** + * BaseTypeDeclaration = "(" RecordType ")"
+ */ + private IRecordTypeSymbol parseBaseTypeDeclaration(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) + { + builder.beginProduction(BASE_TYPE); + + nextToken(); + ITypeSymbol typeSymbol = parseTypeQualident(parentSymbol, typeResolver, true); + + IRecordTypeSymbol recordTypeSymbol = null; + if (typeSymbol instanceof IRecordTypeSymbol) { + recordTypeSymbol = (IRecordTypeSymbol)typeSymbol; + } + else { + error(XdsMessages.ObjectIsNotRecord); + } + parseToken(RPARENTH); + + builder.endProduction(BASE_TYPE); + return recordTypeSymbol; + } + + + + /** + * ProcedureType = "PROCEDURE" ["(" [FormalParameterTypeList] ")"] [":" ResultType]
+ * FormalParameterTypeListt = FormalParameterType {"," FormalParameterType}
+ * FormalParameterType = ["VAR" ["[NIL]"]] FormalType
+ */ + private IProcedureTypeSymbol parseProcedureTypeDefinition( String typeName + , String hostName + , ISymbolWithScope parentScope, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == PROCEDURE_KEYWORD); + AstProcedureType typeAst = builder.beginProduction(PROCEDURE_TYPE_DEFINITION); + + ProcedureTypeSymbol typeSymbol = createProcedureTypeSymbol(typeName, hostName, parentScope); + + nextToken(); + + modifierParser.parseDirectLanguageSpec(parentScope, typeResolver); + XdsLanguage language = modifierParser.language; + + if (token == LPARENTH) { + builder.beginProduction(FORMAL_PARAMETER_TYPE_LIST); + + nextToken(); + + if (token != RPARENTH) { + int parameterCount = typeSymbol.getParameters().size() + 1; + while (token != EOF) { + if (SEQ_KEYWORD == token) { + break; + } + else { + AstFormalParameterType parameterAst = builder.beginProduction(FORMAL_PARAMETER_TYPE); + EnumSet attributes = SymbolAttribute.createEmptySet(); + + if (VAR_KEYWORD == token) { + attributes.add(SymbolAttribute.VAR_PARAMETER); + + nextToken(); + parseVarParameterAttributes(attributes); + } + + if ( (IDENTIFIER == token) + || (ARRAY_KEYWORD == token) ) + { + String parameterName = FormalParameterSymbol.createAnonymousName(parameterCount); + ITypeSymbol parameterTypeSymbol = parseFormalType(parameterName, typeSymbol, typeResolver); + + FormalParameterSymbol parameterSymbol = createFormalParameterSymbol( + parameterName, parameterCount, parameterTypeSymbol, typeSymbol + ); + parameterCount++; + parameterSymbol.addAttributes(attributes); + setAstSymbol(parameterAst, parameterSymbol); + addSymbolForResolving(parameterSymbol); + } + else { + error(XdsMessages.IdentifierExpected); + } + + if ((RPARENTH == token) || (SEQ_KEYWORD == token)) { + builder.endProduction(parameterAst); + break; + } + else { + parseToken(COMMA); + builder.endProduction(parameterAst); + } + } + } + + if (SEQ_KEYWORD == token) { + AstFormalParameterType parameterAst = builder.beginProduction(FORMAL_PARAMETER_TYPE); + + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.SeqParameter); + } + nextToken(); + + ITypeSymbol parameterTypeSymbol = parseTypeQualident(parentScope, typeResolver, true); + + FormalParameterSymbol parameterSymbol = createFormalParameterSymbol( + FormalParameterSymbol.createAnonymousName(parameterCount), parameterCount, parameterTypeSymbol, typeSymbol); + parameterCount++; + + parameterSymbol.addAttribute(SymbolAttribute.SEQ_PARAMETER); + setAstSymbol(parameterAst, parameterSymbol); + addSymbolForResolving(parameterSymbol); + + builder.endProduction(parameterAst); + } + } + parseToken(RPARENTH); + + builder.endProduction(FORMAL_PARAMETER_TYPE_LIST); + + if (COLON == token) { + nextToken(); + ITypeSymbol returnTypeSymbol = parseTypeQualident(parentScope, typeResolver, false); + typeSymbol.setReturnTypeSymbol(createRef(returnTypeSymbol)); + } + } + + typeSymbol.setLanguage(language); + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + builder.endProduction(typeAst); + return typeSymbol; + } + + + private IProcedureTypeSymbol parseProcedureTypeOberonDefinition( String typeName + , String hostName + , ISymbolWithScope scope, ISymbolWithScope typeResolver ) + { + Assert.isTrue(token == PROCEDURE_KEYWORD); + AstProcedureTypeOberon typeAst = builder.beginProduction(PROCEDURE_TYPE_OBERON_DEFINITION); + + ProcedureTypeSymbol typeSymbol = createProcedureTypeSymbol(typeName, hostName, scope); + + nextToken(); + + modifierParser.parseDirectLanguageSpec(scope, typeResolver); + parseProcedureHeader(typeSymbol, typeResolver); + + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + builder.endProduction(typeAst); + return typeSymbol; + } + + + /** + * ProcedureHeader = FormalParameters ":" TypeQualident
+ * FormalParameters = "(" FormalParameterList ")"
+ * FormalParameterList = FormalParameter {";" FormalParameter}
+ * FormalParameter = ["VAR"] IdentifierList ":" FormalType
+ */ + private void parseProcedureHeader(ProcedureTypeSymbol parentSymbol, ISymbolWithScope typeResolver) { + if (token == LPARENTH) { + builder.beginProduction(FORMAL_PARAMETER_BLOCK); + nextToken(); + + + if (token != RPARENTH) { + int parameterNo = parentSymbol.getParameters().size() + 1; + while (token != EOF) + { + if (SEQ_KEYWORD == token) { + break; + } + else if (RPARENTH == token) { + error(XdsMessages.IdentifierExpected); + break; + } + + builder.beginProduction(FORMAL_PARAMETER_DECLARATION); + EnumSet attributes = SymbolAttribute.createEmptySet(); + + if (VAR_KEYWORD == token) { + attributes.add(SymbolAttribute.VAR_PARAMETER); + + nextToken(); + parseVarParameterAttributes(attributes); + } + + builder.beginProduction(FORMAL_PARAMETER_LIST); + + List declaredSymbols = new ArrayList(8); + String hostName = null; + while (true) + { + if (IDENTIFIER == token) { + AstFormalParameter parameterAst = builder.beginProduction(FORMAL_PARAMETER); + + String parameterName = getTokenText(); + if (hostName == null) { + hostName = parameterName; + } + FormalParameterSymbol parameterSymbol = createFormalParameterSymbol(parameterName, parameterNo++, parentSymbol); + parameterSymbol.addAttributes(attributes); + + setAstSymbol(parameterAst, parameterSymbol); + + boolean alreadyDefined = checkSymbolAlreadyDefined(parameterName, parentSymbol, declaredSymbols); + if (alreadyDefined) { + markAsAlreadyDefined(parameterSymbol); + } + declaredSymbols.add(parameterSymbol); + + nextToken(); + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + parameterSymbol.setLanguage(modifierParser.language); + + if (token == MINUS) { + parameterSymbol.addAttribute(SymbolAttribute.READ_ONLY); + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ReadOnlyParameters); + } + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + nextToken(); + } + if (NEQ == token) { + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.UnusedParameters); + } + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + nextToken(); + } + if (token == BECOMES) { + parameterSymbol.addAttribute(SymbolAttribute.DEFAULT); + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ParameterValueByDefault); + } + nextToken(); + expressionParser.parseExpression(parentSymbol, typeResolver); + } + + addSymbolForResolving(parameterSymbol); + builder.endProduction(parameterAst); + } + else { + parseToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + builder.endProduction(FORMAL_PARAMETER_LIST); + + parseToken(COLON); + ITypeSymbol parameterTypeSymbol; + if (settings.isOberon()) { + parameterTypeSymbol = parseTypeDefinition(null, hostName, parentSymbol, typeResolver, true, false); + } + else { + parameterTypeSymbol = parseFormalType(hostName, parentSymbol, typeResolver); + } + + for (FormalParameterSymbol parameterSymbol : declaredSymbols) { + setTypeSymbol(parameterSymbol, parameterTypeSymbol); + if (!parameterSymbol.isAttributeSet(SymbolAttribute.ALREADY_DEFINED)) { + parentSymbol.addParameter(parameterSymbol); + } + } + + if (token == RPARENTH) { + builder.endProduction(FORMAL_PARAMETER_DECLARATION); + break; + } + else { + parseToken(SEMICOLON); + } + builder.endProduction(FORMAL_PARAMETER_DECLARATION); + } + + if (SEQ_KEYWORD == token) { + builder.beginProduction(FORMAL_PARAMETER_DECLARATION); + + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.SeqParameter); + } + nextToken(); + if (IDENTIFIER == token) { + AstFormalParameter parameterAst = builder.beginProduction(FORMAL_PARAMETER); + + String parameterName = getTokenText(); + + FormalParameterSymbol parameterSymbol = createFormalParameterSymbol(parameterName, parameterNo++, parentSymbol); + setSymbolCurrentPosition(parameterSymbol); + parameterSymbol.addAttribute(SymbolAttribute.SEQ_PARAMETER); + + setAstSymbol(parameterAst, parameterSymbol); + boolean alreadyDefined = checkSymbolAlreadyDefined(parameterName, parentSymbol); + if (alreadyDefined) { + markAsAlreadyDefined(parameterSymbol); + } + else { + parentSymbol.addParameter(parameterSymbol); + } + + nextToken(); + modifierParser.parseDirectLanguageSpec(parentSymbol, typeResolver); + parameterSymbol.setLanguage(modifierParser.language); + + addSymbolForResolving(parameterSymbol); + builder.endProduction(parameterAst); + + parseToken(COLON); + + ITypeSymbol parameterTypeSymbol; + if (settings.isOberon()) { + parameterTypeSymbol = parseTypeDefinition(null, parameterName, parentSymbol, typeResolver, false, false); + } + else { + parameterTypeSymbol = parseTypeQualident(parentSymbol, typeResolver, false); + } + parameterSymbol.setTypeSymbol(createStaticRef(parameterTypeSymbol)); + } + else { + error(XdsMessages.IdentifierExpected); + } + builder.endProduction(FORMAL_PARAMETER_DECLARATION); + } + } + + parseToken(RPARENTH); + builder.endProduction(FORMAL_PARAMETER_BLOCK); + + if (COLON == token) { + AstResultType resultTypeAst = builder.beginProduction(RESULT_TYPE); + + nextToken(); + + ITypeSymbol returnTypeSymbol; + if (settings.isOberon()) { + returnTypeSymbol = parseTypeDefinition(null, parentSymbol.getName(), parentSymbol, typeResolver, false, false); + } + else { + returnTypeSymbol = parseTypeQualident(parentSymbol, typeResolver, false); + } + parentSymbol.setReturnTypeSymbol(createRef(returnTypeSymbol)); + setAstSymbol(resultTypeAst, returnTypeSymbol); + addSymbolForResolving(returnTypeSymbol); + + builder.endProduction(resultTypeAst); + } + } + } + + + /** + * FormalType = TypeQualident | OpenArrayFormalType
+ * OpenArrayFormalType = "ARRAY" "OF" {"ARRAY" "OF"} TypeQualident
+ */ + private ITypeSymbol parseFormalType(String hostName, ISymbolWithScope scope, ISymbolWithScope typeResolver) + { + builder.beginProduction(FORMAL_TYPE); + + List typeAstList = new ArrayList(); + @SuppressWarnings("unused") + int dim1 = 0; + + while (ARRAY_KEYWORD == token) { + AstOpenArrayType typeAst = builder.beginProduction(OPEN_ARRAY_TYPE_DEFINITION); + typeAstList.add(typeAst); + + nextToken(); + parseToken(OF_KEYWORD); + dim1++; + } + ITypeSymbol typeSymbol = parseTypeQualident(scope, typeResolver, true); + + for (int i = typeAstList.size() - 1; i >= 0; i--) { + IArrayTypeSymbol arrayTypeSymbol = createOpenArrayTypeSymbol( + null, hostName, typeSymbol, scope + ); + AstArrayType typeAst = typeAstList.get(i); + setAstSymbol(typeAst, arrayTypeSymbol); + addSymbolForResolving(arrayTypeSymbol); + builder.endProduction(typeAst); + + typeSymbol = arrayTypeSymbol; + } + + builder.endProduction(FORMAL_TYPE); + return typeSymbol; + } + + + private void parseVarParameterAttributes(EnumSet attributes) { + if (token == LBRACKET) { + nextToken(); + if (!isSystemImported && !settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.SpecialKindsParameters); + } + if (token == IDENTIFIER) { + String name = getTokenText(); + if ("NIL".equals(name)) { + // object is special VAR parameter, may be NIL + attributes.add(SymbolAttribute.NIL_ALLOWED); + } + else { + error(XdsMessages.InvalidParameterSpecificationExpectedNIL); + } + nextToken(); + } + else { + error(XdsMessages.IdentifierExpected); + } + parseToken(RBRACKET); + } + } + + + /** + * EnumerationType = "(" IdentifierList ")"
+ * IdentifierList = Identifier {"," Identifier}
+ * + * @param typeSymbolResult + */ + private IEnumTypeSymbol parseEnumerationTypeDefinition( String typeName + , String hostName + , ISymbolWithScope parentScope ) + { + Assert.isTrue(token == LPARENTH); + AstEnumerationType typeAst = builder.beginProduction(ENUMERATION_TYPE_DEFINITION); + + if (settings.isOberon() && !settings.xdsExtensions()) { + error(XdsMessages.NotAllowedInOberon); + } + + EnumTypeSymbol typeSymbol = createEnumTypeSymbol(typeName, hostName, parentScope); + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + nextToken(); + if (token == RPARENTH) { + error(XdsMessages.IdentifierExpected); + } + else { + ISymbolWithDefinitions symbolWithDefinitions = getParentScopeWithSymbolDefinitions(parentScope); + + while (true) + { + if (token == IDENTIFIER) { + AstEnumElement enumElementAst; + enumElementAst = builder.beginProduction(ENUM_ELEMENT); + + String enumElementName = getTokenText(); + EnumElementSymbol enumElementSymbol = createEnumElementSymbol(enumElementName, typeSymbol); + + setAstSymbol(enumElementAst, enumElementSymbol); + + boolean alreadyDefined = checkSymbolAlreadyDefined(enumElementName, parentScope); + if (alreadyDefined) { + markAsAlreadyDefined(enumElementSymbol); + } + else if (symbolWithDefinitions != null) { + symbolWithDefinitions.addEnumElements(enumElementSymbol); + } + + nextToken(); + + addSymbolForResolving(enumElementSymbol); + builder.endProduction(enumElementAst); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (RPARENTH == token) { + break; + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + } + parseToken(RPARENTH); + + builder.endProduction(typeAst); + typeSymbol.finalizeDefinition(); + return typeSymbol; + } + + + /** + * RangeType = [OrdinalTypeIdentifier] "[" ConstExpression ".." ConstExpression "]"
+ * OrdinalTypeIdentifier = TypeIdentifier
+ */ + private IRangeTypeSymbol parseRangeTypeDefinition( String typeName + , String hostName + , ISymbolWithScope scope + , ISymbolWithScope typeResolver + , IOrdinalTypeSymbol baseTypeSymbol ) + { + if (settings.isOberon() && !settings.xdsExtensions()) { + error(XdsMessages.NotAllowedInOberon); + } + + if (baseTypeSymbol != null) { + checkOrdinalTypeSymbol(baseTypeSymbol); + } + + nextToken(); + expressionParser.parseConstantExpression(scope, typeResolver); + Long lowBound = expressionParser.getIntegerValue(); + + parseToken(RANGE); + + expressionParser.parseConstantExpression(scope, typeResolver); + Long highBound = expressionParser.getIntegerValue(); + + parseToken(RBRACKET); + + if (baseTypeSymbol == null) { + //TODO process case when bounds is a CHAR. + if (lowBound < 0) { + if (!settings.xdsExtensions()) { + baseTypeSymbol = (IOrdinalTypeSymbol) scope.resolveName(XdsStandardNames.INTEGER); + } + else { + String baseTypeName; + if (highBound > XdsStandardTypes.INT32.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.INT64; + } + else if (highBound > XdsStandardTypes.INT16.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.INT32; + } + else if (highBound > XdsStandardTypes.INT8.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.INT16; + } + else { + baseTypeName = XdsStandardNames.INT8; + } + baseTypeSymbol = (IOrdinalTypeSymbol)getStandardSymbol(baseTypeName); + } + } + else { + if (!settings.xdsExtensions()) { + baseTypeSymbol = (IOrdinalTypeSymbol)getStandardSymbol(XdsStandardNames.CARDINAL); + } + else { + String baseTypeName; + if (highBound > XdsStandardTypes.CARD32.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.CARD64; + } + else if (highBound > XdsStandardTypes.CARD16.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.CARD32; + } + else if (highBound > XdsStandardTypes.CARD8.getMaxValue().longValue()) { + baseTypeName = XdsStandardNames.CARD16; + } + else { + baseTypeName = XdsStandardNames.CARD8; + } + baseTypeSymbol = (IOrdinalTypeSymbol)getStandardSymbol(baseTypeName); + } + } + + boolean isOutOfBounds = (lowBound < baseTypeSymbol.getType().getMinValue().longValue()) + || (highBound > baseTypeSymbol.getType().getMaxValue().longValue()); + if (isOutOfBounds) { + error(XdsMessages.ExpressionOutOfBounds); + } + } + else { + //TODO check that bounds are compatible with the base type. + } + + if (lowBound > highBound) { +//TODO expression value is required +// error(XdsMessages.LowBoundGreaterThanHighBound); + } + + typeName = generateNameIfNull(typeName, hostName, "Range", scope); //$NON-NLS-1$ + RangeTypeSymbol typeSymbol = new RangeTypeSymbol(typeName, scope, baseTypeSymbol, lowBound, highBound); + return typeSymbol; + } + + + private void parseLocalModuleDeclaration(ISymbolWithDefinitions parentScope, ISymbolWithScope typeResolver) { + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + if (settings.isOberon()) { + error(XdsMessages.NotAllowedInOberon); + } + + AstModule localModuleAst = builder.beginProduction(LOCAL_MODULE); + addModuleFrameNode(MODULE_KEYWORD); + + nextToken(); + + String moduleName = ""; + boolean alreadyDefined = false; + final TextPosition modulePosition = getTokenPosition(); + + if (IDENTIFIER == token) { + builder.beginProduction(MODULE_IDENTIFIER); + + moduleName = getTokenText(); + alreadyDefined = checkSymbolAlreadyDefined(moduleName, parentScope); + + nextToken(); + builder.endProduction(MODULE_IDENTIFIER); + } + else { + error(XdsMessages.IdentifierExpected); + } + + modifierParser.parseProtection(parentScope, typeResolver); + parseToken(SEMICOLON); + + LocalModuleSymbol localModuleSymbol = createLocalModuleSymbol( + moduleName, modulePosition, alreadyDefined, parentScope + ); + if (alreadyDefined) { + markAsAlreadyDefined(localModuleSymbol); + } + + setAstSymbol(localModuleAst, localModuleSymbol); + addSymbolForResolving(localModuleSymbol); + + parseLocalModuleImport(localModuleSymbol); + + // ExportList = UnqualifiedExport | QualifiedExport + // UnqualifiedExport = "EXPORT" IdentifierList semicolon + // QualifiedExport = "EXPORT" "QUALIFIED" IdentifierList ";" + AstExportStatement exportAst = builder.beginProduction(UNQUALIFIED_EXPORT); + Map> exportedIdentifiers = new HashMap>(); + if (EXPORT_KEYWORD == token) { + nextToken(); + + boolean isExportQualifed = false; + if (QUALIFIED_KEYWORD == token) { + exportAst = builder.changeProduction(QUALIFIED_EXPORT); + localModuleSymbol.addAttribute(SymbolAttribute.QUALIFIED_EXPORT); + isExportQualifed = true; + nextToken(); + } + + builder.beginProduction(IDENTIFIER_LIST); + while (token != EOF) { + if (IDENTIFIER == token) { + AstSimpleName exportNameAst = builder.beginProduction(SIMPLE_NAME); + + String identifier = getTokenText(); + + Pair pair = Pair.create(exportNameAst, getTokenPosition()); + exportedIdentifiers.put(identifier, pair); + if (!isExportQualifed) { + checkSymbolAlreadyDefined(identifier, parentScope); + } + + nextToken(); + builder.endProduction(exportNameAst); + } + else { + parseToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (SEMICOLON == token) { + break; + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + builder.endProduction(IDENTIFIER_LIST); + + parseToken(SEMICOLON); + } + builder.endProduction(exportAst); + + parseModuleBlock(localModuleSymbol, localModuleSymbol); + + processLocalModuleExport(localModuleSymbol, exportedIdentifiers); + + parseToken(SEMICOLON); + builder.endProduction(LOCAL_MODULE); + } + + + /** + * ProcDecl = PROCEDURE [Receiver] IdentDef [FormalPars] ";" DeclSeq ["BEGIN" StatementSeq] "END" identifier
+ * Receiver = "(" ["VAR"] identifier ":" identifier ")"
+ */ + private OberonReceiverInfo parseOberonMethodReceiver (ISymbolWithProcedures parentSymbol, ISymbolWithScope typeResolver) + { + isOberonMethod = false; + if (settings.isOdfSource() && (token == SLASH)) { + nextToken(); + } + if (!settings.isOberon() || (token != LPARENTH)) { + return null; + } + + AstOberonMethodReceiver receiverAst = builder.beginProduction(OBERON_METHOD_RECEIVER); + boolean isVarInstance = false; + + nextToken(); + if (token == VAR_KEYWORD) { + isVarInstance = true; + nextToken(); + } + + IOberonMethodReceiverSymbol receiverSymbol; + if (token == IDENTIFIER) { + final String receiverName = getTokenText(); + final TextPosition receiverPosition = getTokenPosition(); + + nextToken(); + parseToken(COLON); + ITypeSymbol typeSymbol = parseTypeQualident(parentSymbol, typeResolver, false); + + if (typeSymbol != null) { + if (isVarInstance) { + if (!(typeSymbol instanceof IRecordTypeSymbol)) { + error(XdsMessages.ObjectIsNotRecord); + } + } + else if (typeSymbol instanceof IPointerTypeSymbol) { + if (typeSymbol.getLanguage() == XdsLanguage.Oberon2) { + IPointerTypeSymbol pointerTypeSymbol = (IPointerTypeSymbol)typeSymbol; + ITypeSymbol boundTypeSymbol = pointerTypeSymbol.getBoundTypeSymbol(); + + if (settings.isOdfSource() && boundTypeSymbol instanceof IForwardTypeSymbol) { + // old format of odf-files allows declare methods inside record type declaration + // TYPE ListenerObj* = RECORD + // PROCEDURE (this: Listener) TextChanged*(from,to: INTEGER); + // END; + if (parentSymbol instanceof IRecordTypeSymbol) { + String name = parentSymbol.getName(); + boolean isParentActualType = StringUtils.isNotEmpty(name) + && StringUtils.equals(name, boundTypeSymbol.getName()) + && parentSymbol.getParentScope() == boundTypeSymbol.getParentScope(); + if (isParentActualType) { + ITypeSymbol actualTypeSymbol = (IRecordTypeSymbol)parentSymbol; + ((ForwardTypeSymbol)boundTypeSymbol).setActualTypeSymbol(createRef(actualTypeSymbol)); + boundTypeSymbol = actualTypeSymbol; + } + } + } + + if (!(boundTypeSymbol instanceof IRecordTypeSymbol)) { + error(XdsMessages.PointerNotBoundRecord); + } + } + else { + error(XdsMessages.OberonTypeIsRequired); + } + } + else { + error(XdsMessages.ObjectIsNotPointerOrRecord); + } + } + + // this is temporary symbol, it will not resolve correctly, since it has no parentScope. + receiverSymbol = createOberonMethodReceiverSymbol( + receiverName, receiverPosition, isVarInstance, typeSymbol + ); + + isOberonMethod = true; + } + else { + receiverSymbol = null; + error(XdsMessages.IdentifierExpected); + skipToToken(OBERON_PROCEDURE_SYNCHRONIZATION_SET); + } + + parseToken(RPARENTH); + + builder.endProduction(receiverAst); + return new OberonReceiverInfo(receiverAst, receiverSymbol); + } + + + /** + * ProcedureOberonDeclaration = "PROCEDURE" [Receiver] IdentDef [FormalPars] ";" ProcedureBlock Identifier
+ * ProcedureOberonForwardDeclaration = "PROCEDURE" "^" [Receiver] IdentDef [FormalPars]
+ * IdentDef = Identifier [" * " | "-"]
+ */ + private AstProcedure + parseOberonMethodDeclaration( ISymbolWithProcedures parentSymbol + , ISymbolWithScope typeResolver + , OberonReceiverInfo receviverInfo + , XdsLanguage language + , boolean isForwardDeclaration + , PstNode procKeyword ) + { + AstProcedure procedureAst; + AstOberonMethodReceiver receiverAst = receviverInfo.getAstNode(); + IOberonMethodReceiverSymbol receiverSymbol = receviverInfo.getSymbol(); + IRecordTypeSymbol typeBoundSymbol = null; + if (receiverSymbol != null) { + typeBoundSymbol = receiverSymbol.getBoundTypeSymbol(); + } + IModulaSymbol symbolInScope = null; + String procedureName; + final TextPosition procedurePosition = getTokenPosition(); + + if (token == IDENTIFIER) { + builder.beginProduction(PROCEDURE_IDENTIFIER); + + procedureName = getTokenText(); + if (typeBoundSymbol != null) { + symbolInScope = typeBoundSymbol.findSymbolInScope(procedureName); + } + + if (symbolInScope != null) { + if (!(symbolInScope instanceof IOberonMethodSymbol)) { + errorIdentifierAlreadyDefined(symbolInScope); + } + } + + nextToken(); + + builder.endProduction(PROCEDURE_IDENTIFIER); + } + else { + error(XdsMessages.IdentifierExpected); + procedureName = null; + symbolInScope = null; + } + + EnumSet attributes = parseExportMarker(false); + + modifierParser.parseProtection(parentSymbol, typeResolver); + + OberonMethodTypeSymbol procedureTypeSymbol = createOberonMethodTypeSymbol( + procedureName, language, attributes, + receiverSymbol, parentSymbol + ); + + // Oberon-2 method scope is not defined when receiver symbol was parsed + if (receiverSymbol != null) { + OberonMethodReceiverSymbol newReceiverSymbol = recreateOberonMethodReceiverSymbol( + receiverSymbol, procedureTypeSymbol + ); + setAstSymbol(receiverAst, newReceiverSymbol); + receiverSymbol = newReceiverSymbol; + } + + parseProcedureHeader(procedureTypeSymbol, typeResolver); + + parseToken(SEMICOLON); + + if (isForwardDeclaration) { + procedureTypeSymbol.addAttribute(SymbolAttribute.FORWARD_DECLARATION); + AstOberonMethodForwardDeclaration procedureForwarDeclAst; + procedureForwarDeclAst = builder.changeProduction(OBERON_METHOD_FORWARD_DECLARATION); + procedureAst = procedureForwarDeclAst; + + OberonMethodDefinitionSymbol procedureDefSymbol = createOberonMethodDefinitionSymbol( + procedureName, procedurePosition, procedureTypeSymbol, parentSymbol + ); + procedureDefSymbol.addAttribute(SymbolAttribute.FORWARD_DECLARATION); + + setAstSymbol(procedureForwarDeclAst, procedureDefSymbol); + addSymbolForResolving(procedureDefSymbol); + if (procedureName != null) { + registerOberonMethodForwardDeclarationSymbol( + procedureDefSymbol, procedurePosition, symbolInScope, typeBoundSymbol, + parentSymbol + ); + } + } + else { + // parse procedure body + AstOberonMethodDeclaration procedureDeclAst; + procedureDeclAst = builder.changeProduction(OBERON_METHOD_DECLARATION); + procedureAst = procedureDeclAst; + addProcedureFrameNode(procedureDeclAst, procKeyword); + + OberonMethodDeclarationSymbol procedureDeclSymbol; + procedureDeclSymbol = provideOberonMethodDeclarationSymbol( + procedureName, procedurePosition, procedureTypeSymbol, + symbolInScope, typeBoundSymbol, parentSymbol + ); + setSymbolPosition(procedureDeclSymbol, procedurePosition); + addNameRegion(procedureDeclSymbol, procedureName, procedurePosition); + + setAstSymbol(procedureDeclAst, procedureDeclSymbol); + addSymbolForResolving(procedureDeclSymbol); + + // only odf-files include method declarations without body + if (!settings.isOdfSource()) { + parseProcedureBlock(procedureDeclSymbol, procedureDeclSymbol); + parseToken(SEMICOLON); + } + } + + return procedureAst; + } + + + /** + * ProcedureDeclaration = ProcedureHeading ";"
+ * ( ProcedureBlock ProcedureIdentifier | "FORWARD" ) ";"
+ * + * ProcedureHeading = "PROCEDURE" ProcedureIdentifier
+ * ( [FormalParameters] | FormalParameters ":" ResultType )
+ * ProcedureIdentifier = identifier
+ * + * ProcedureOberonDeclaration = "PROCEDURE" [Receiver] IdentDef [FormalPars] ";" ProcedureBlock Identifier
+ * ProcedureOberonForwardDeclaration = "PROCEDURE" "^" [Receiver] IdentDef [FormalPars]
+ * IdentDef = Identifier [" * " | "-"]
+ */ + private void parseProcedureDeclaration(ISymbolWithProcedures parentScope, ISymbolWithScope typeResolver) { + Assert.isTrue(PROCEDURE_KEYWORD == token); + PstNode procKeyword = builder.getLastNode(); + boolean hasBody = !isDefinitionModule; + boolean isOberonForwardDeclaration = false; + + AstProcedureDefinition procedureDefAst = builder.beginProduction(PROCEDURE_DEFINITION); + AstProcedure procedureAst = procedureDefAst; + + nextToken(); + + modifierParser.parseProcedureModifiers(parentScope, typeResolver); + XdsLanguage language = modifierParser.language; + if (language == XdsLanguage.Oberon2) { + language = XdsLanguage.Modula2; + } + + if ((BAR == token) && settings.isOberon()) { + isOberonForwardDeclaration = true; + hasBody = false; + nextToken(); + } + + OberonReceiverInfo receviverInfo = parseOberonMethodReceiver(parentScope, typeResolver); + + if (isOberonMethod) { + procedureAst = parseOberonMethodDeclaration( + parentScope, typeResolver, receviverInfo, language, + isOberonForwardDeclaration, procKeyword + ); + } + else { + boolean isExtenal = false; + // parse general procedure declaration + if (MINUS == token) { + // TODO mark as code procedure + nextToken(); + } + else if (PLUS == token) { + error(XdsMessages.InterruptProceduresNotImplemented); + nextToken(); + } + else if (SLASH == token) { + if (!settings.xdsExtensions() && !XdsLanguage.EXTERNAL_PROCEDURES.contains(language)) { + error(XdsMessages.LanguageIsNotValidForExternalProcedure); + } + procedureDefAst = builder.changeProduction(PROCEDURE_EXTERNAL_SPECIFICATION); + procedureAst = procedureDefAst; + + isExtenal = true; + hasBody = false; + nextToken(); + } + else if (TIMES == token) { + nextToken(); + } + + IModulaSymbol symbolInScope; + String procedureName; + final TextPosition procedurePosition = getTokenPosition(); + if (token == IDENTIFIER) { + builder.beginProduction(PROCEDURE_IDENTIFIER); + + procedureName = getTokenText(); + symbolInScope = parentScope.findSymbolInScope(procedureName); + + if (symbolInScope != null) { + if (isDefinitionModule || !(symbolInScope instanceof IProcedureSymbol)) { +// TODO required to support of Oberon methods +// TODO actual position is required +// error(XdsMessages.IdentifierAlreadyDefined, procedureName, "???", -1, -1); + } + } + + nextToken(); + + builder.endProduction(PROCEDURE_IDENTIFIER); + } + else { + error(XdsMessages.IdentifierExpected); + procedureName = null; + symbolInScope = null; + } + + EnumSet attributes = parseExportMarker(false); + + modifierParser.parseProtection(parentScope, typeResolver); + + ProcedureTypeSymbol procedureTypeSymbol = createProcedureTypeSymbol( + procedureName, procedurePosition, language, attributes, parentScope + ); + + parseProcedureHeader(procedureTypeSymbol, typeResolver); + + parseToken(SEMICOLON); + + if ((FORWARD_KEYWORD == token) || isOberonForwardDeclaration) { + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + procedureTypeSymbol.addAttribute(SymbolAttribute.FORWARD_DECLARATION); + AstProcedureForwardDeclaration procedureForwardDeclAst; + procedureForwardDeclAst = builder.changeProduction(PROCEDURE_FORWARD_DECLARATION); + procedureAst = procedureForwardDeclAst; + + ProcedureDefinitionSymbol procedureForwardDeclSymbol = createProcedureDefinitionSymbol( + procedureName, procedurePosition, procedureTypeSymbol, parentScope + ); + procedureForwardDeclSymbol.addAttribute(SymbolAttribute.FORWARD_DECLARATION); + + setAstSymbol(procedureForwardDeclAst, procedureForwardDeclSymbol); + addSymbolForResolving(procedureForwardDeclSymbol); + if (procedureName != null) { + registerProcedureForwardDeclarationSymbol( + procedureForwardDeclSymbol, procedurePosition, symbolInScope, parentScope + ); + } + + if (!isOberonForwardDeclaration) { + nextToken(); + parseToken(SEMICOLON); + } + } + else if (hasBody) { + // parse procedure body + AstProcedureDeclaration procedureDeclAst = builder.changeProduction(PROCEDURE_DECLARATION); + procedureAst = procedureDeclAst; + addProcedureFrameNode(procedureDeclAst, procKeyword); + + ProcedureDeclarationSymbol procedureDeclSymbol = provideProcedureDeclarationSymbol( + procedureName, procedurePosition, procedureTypeSymbol, symbolInScope, parentScope + ); + setSymbolPosition(procedureDeclSymbol, procedurePosition); + addNameRegion(procedureDeclSymbol, procedureName, procedurePosition); + + setAstSymbol(procedureDeclAst, procedureDeclSymbol); + addSymbolForResolving(procedureDeclSymbol); + + parseProcedureBlock(procedureDeclSymbol, procedureDeclSymbol); + parseToken(SEMICOLON); + } + else { + ProcedureDefinitionSymbol procedureDefSymbol = createProcedureDefinitionSymbol( + procedureName, procedurePosition, procedureTypeSymbol, parentScope + ); + setAstSymbol(procedureDefAst, procedureDefSymbol); + addSymbolForResolving(procedureDefSymbol); + + if (procedureName != null) { + if (isDefinitionModule) { + if (symbolInScope == null) { + parentScope.addProcedure(procedureDefSymbol); + } + } + else if (isExtenal) { + procedureDefSymbol.addAttribute(SymbolAttribute.EXTERNAL); + if (symbolInScope == null) { + parentScope.addProcedure(procedureDefSymbol); + } + } + } + } + } + + builder.endProduction(procedureAst); + } + + + /** + * TypeDeclaration = "TYPE" identifier "=" TypeDefinition | OpaqueTypeDefinition
+ * OpaqueTypeDefinition = identifier
+ */ + private void parseTypeDeclaration(ISymbolWithDefinitions parentScope, ISymbolWithScope typeResolver) { + Assert.isTrue(token == TYPE_KEYWORD); + builder.beginProduction(TYPE_DECLARATION_BLOCK); + declaredType = null; + + nextToken(); + + while (token == IDENTIFIER) { + AstTypeDeclaration typeAst = builder.beginProduction(TYPE_DECLARATION); + + builder.beginProduction(DECORATED_IDENTIFIER); + + final String typeName = getTokenText(); + final TextPosition typePosition = getTokenPosition(); + + IModulaSymbol symbolInScope = parentScope.findSymbolInScope(typeName); + boolean isNewType = (symbolInScope == null); + if (!isNewType) { + if (!(symbolInScope instanceof ForwardTypeSymbol) && !(symbolInScope instanceof OpaqueTypeSymbol)) { + errorIdentifierAlreadyDefined(symbolInScope); + } + } + + nextToken(); + + modifierParser.parseDirectLanguageSpec(parentScope, typeResolver); + XdsLanguage language = modifierParser.language; + + EnumSet attributes = parseExportMarker(false); + + builder.endProduction(DECORATED_IDENTIFIER); + + ITypeSymbol typeSymbol = null; + if (token == EQU) { + if (isNewType) { + nextToken(); + typeSymbol = parseTypeDefinition(typeName, null, parentScope, parentScope, true, false); + if (typeSymbol instanceof EnumTypeSynonymSymbol) { + processEnumTypeSynonymDeclaration(parentScope, (EnumTypeSynonymSymbol)typeSymbol); + } + } + else if (symbolInScope instanceof ForwardTypeSymbol) { + nextToken(); + typeSymbol = parseTypeDefinition(typeName, null, parentScope, parentScope, true, false); + + if (typeSymbol instanceof IOpaqueTypeSymbol) { + error(XdsMessages.ForwardTypeCannotBeOpaque); + typeSymbol = null; + } + else { + ((ForwardTypeSymbol)symbolInScope).setActualTypeSymbol(createRef(typeSymbol)); + replaceForwardTypeSymbol((ForwardTypeSymbol)symbolInScope, typeSymbol); + parentScope.addType(typeSymbol); + } + } + else if (symbolInScope instanceof OpaqueTypeSymbol) { + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + nextToken(); + typeSymbol = parseTypeDefinition(typeName, null, parentScope, parentScope, false, false); + + if ((typeSymbol instanceof IPointerTypeSymbol) || (typeSymbol instanceof IOpaqueTypeSymbol)) { + ((OpaqueTypeSymbol)symbolInScope).setActualTypeSymbol(typeSymbol); + parentScope.addType(typeSymbol); + } + else { + error(XdsMessages.ObjectIsNotPointer); + } + } + else { + nextToken(); + typeSymbol = parseTypeDefinition(typeName, null, parentScope, parentScope, true, false); + } + } + else if ((token == SEMICOLON) && isDefinitionModule && isNewType) { + typeSymbol = new OpaqueTypeSymbol(typeName, parentScope); + } + else { + errorExpectedSymbol(EQU); + } + + if (typeSymbol == null) { + typeSymbol = new InvalidTypeSymbol(typeName, parentScope); + } + typeSymbol.setLanguage(language); + typeSymbol.addAttributes(attributes); + setSymbolPosition(typeSymbol, typePosition); + setAstSymbol(typeAst, typeSymbol); + addSymbolForResolving(typeSymbol); + + if (isNewType) { + parentScope.addType(typeSymbol); + } + + parseToken(SEMICOLON); + declaredType = null; + + builder.endProduction(typeAst); + } + + declaredType = null; + builder.endProduction(TYPE_DECLARATION_BLOCK); + } + + + /** + * Import = SimpleImport | UnqualifiedImport
+ * SimpleImport = "IMPORT" ModuleIdentList ";"
+ * UnqualifiedImport = "FROM" identifier "IMPORT" IdentList ";"
+ *
+ * ModuleIdentList = ModuleIdent {"," ModuleIdent}
+ * ModuleIdent = [ModuleAlias ":="] identifier
+ * ModuleAlias = identifier
+ *
+ * IdentList = identifier {"," identifier}
+ * + * @param parentSymbol current module + */ + private void parseImport(IModuleSymbol parentSymbol) { + builder.beginProduction(IMPORTS); + + while ((token == IMPORT_KEYWORD) || (token == FROM_KEYWORD)) { + AstImportStatement importStatementAst = null; + IModuleSymbol importedModuleSymbol = null; + + boolean isFromClause = (FROM_KEYWORD == token); + if (isFromClause) { + importStatementAst = builder.beginProduction(UNQUALIFIED_IMPORT); + + nextToken(); + if (token == IDENTIFIER) { + AstModuleName importedModuleAst; + importedModuleAst = builder.beginProduction(MODULE_NAME); + + final String importedModuleName = getTokenText(); + importedModuleSymbol = resolveImport( + parentSymbol, importedModuleName, parserMonitor + ); + checkImport(parentSymbol, importedModuleSymbol); + setAstSymbol(importedModuleAst, importedModuleSymbol); + addSymbolUsage(importedModuleSymbol); + + nextToken(); + + builder.endProduction(importedModuleAst); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + } + else { + importStatementAst = builder.beginProduction(SIMPLE_IMPORT); + } + + parseToken(IMPORT_KEYWORD); + builder.beginProduction(IMPORT_FRAGMENT_LIST); + + while (true) { + if (token == IDENTIFIER) { + AstImportFragment importFragmentAst; + if (isFromClause) { + importFragmentAst = builder.beginProduction(UNQUALIFIED_IMPORT_FRAGMENT); + + AstSimpleName importedEntityAst; + importedEntityAst = builder.beginProduction(SIMPLE_NAME); + + final String importedEntityName = getTokenText(); + if (importedModuleSymbol != null) { + IModulaSymbol symbol = importedModuleSymbol.findSymbolInScope(importedEntityName, true); + if (symbol != null) { + addImport(symbol, parentSymbol); + } + else { + symbol = createUnresolvedModuleSymbol(importedEntityName); + } + setAstSymbol(importFragmentAst, symbol); + setAstSymbol(importedEntityAst, symbol); + addSymbolUsage(symbol); + } + + nextToken(); + + builder.endProduction(importedEntityAst); + } + else { + importFragmentAst = builder.beginProduction(SIMPLE_IMPORT_FRAGMENT); + + builder.beginProduction(ALIAS_DECLARATION); + AstModuleAlias aliasNameAst = builder.beginProduction(MODULE_ALIAS_NAME); + + String importedModuleName = getTokenText(); + final TextPosition identPosition = getTokenPosition(); + + nextToken(); + + if (token == BECOMES) { + if (!(settings.xdsExtensions() || settings.isOberon())) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.RenamingInImport); + } + String aliasModuleName = importedModuleName; + builder.endProduction(aliasNameAst); + + nextToken(); + + AstModuleName importedModuleAst = builder.beginProduction(MODULE_NAME); + + if (token == IDENTIFIER) { + importedModuleName = getTokenText(); + + if (parentSymbol.getName().equals(importedModuleName)) { + error(XdsMessages.RecursiveImportDisabled); + } + isSystemImported = isSystemImported + || XdsStandardNames.SYSTEM.equals(importedModuleName); + importedModuleSymbol = resolveImport( + parentSymbol, importedModuleName, parserMonitor + ); + checkImport(parentSymbol, importedModuleSymbol); + setAstSymbol(importedModuleAst, importedModuleSymbol); + addSymbolUsage(importedModuleSymbol); + } + + ModuleAliasSymbol moduleAliasSymbol = createModuleAliasSymbol( + aliasModuleName, identPosition, importedModuleSymbol, parentSymbol + ); + setAstSymbol(aliasNameAst, moduleAliasSymbol); + addSymbolForResolving(moduleAliasSymbol); + addImport(moduleAliasSymbol, parentSymbol); + + parseToken(IDENTIFIER); + + builder.endProduction(importedModuleAst); + builder.endProduction(ALIAS_DECLARATION); + } + else { + AstModuleName importedModuleAst = builder.changeProduction(MODULE_NAME); + + if (parentSymbol.getName().equals(importedModuleName)) { + error(XdsMessages.RecursiveImportDisabled); + } + isSystemImported = isSystemImported + || XdsStandardNames.SYSTEM.equals(importedModuleName); + importedModuleSymbol = resolveImport( + parentSymbol, importedModuleName, parserMonitor + ); + checkImport(parentSymbol, importedModuleSymbol); + + setAstSymbol(importedModuleAst, importedModuleSymbol); + addImport(importedModuleSymbol, parentSymbol); + addSymbolUsage(importedModuleSymbol, identPosition); + + builder.endProduction(importedModuleAst); + builder.dropProduction(ALIAS_DECLARATION); + } + + setAstSymbol(importFragmentAst, importedModuleSymbol); + } + builder.endProduction(importFragmentAst); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + + builder.endProduction(IMPORT_FRAGMENT_LIST); + + parseToken(SEMICOLON); + builder.endProduction(importStatementAst); + } + builder.endProduction(IMPORTS); + } + + + private void parseLocalModuleImport(ILocalModuleSymbol parentSymbol) { + boolean isFromClause; + + while ((token == IMPORT_KEYWORD) || (token == FROM_KEYWORD)) { + AstImportStatement importStatementAst = null; + ISymbolWithScope importScope = null; + + isFromClause = (FROM_KEYWORD == token); + if (isFromClause) { + importStatementAst = builder.beginProduction(UNQUALIFIED_IMPORT); + + nextToken(); + if (token == IDENTIFIER) { + AstSimpleName importScopeAst; + importScopeAst = builder.beginProduction(SIMPLE_NAME); + + final String importScopeName = getTokenText(); + IModulaSymbol symbol = parentSymbol.getParentScope().findSymbolInScope(importScopeName); + if (symbol == null) { + error(XdsMessages.UndeclaredIdentifier, importScopeName); + } + else { + setAstSymbol(importScopeAst, symbol); + addSymbolUsage(symbol); + if (symbol instanceof ISymbolWithScope) { + importScope = (ISymbolWithScope)symbol; + } + else { + error(XdsMessages.ImportFromObjectIllegal, importScopeName); + } + } + nextToken(); + + builder.endProduction(importScopeAst); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + } + else { + importStatementAst = builder.beginProduction(SIMPLE_IMPORT); + } + + parseToken(IMPORT_KEYWORD); + builder.beginProduction(IMPORT_FRAGMENT_LIST); + + while (true) { + if (token == IDENTIFIER) { + IModulaSymbol symbol = null; + AstImportFragment importFragment; + AstSimpleName importedEntityAst; + + String importedEntityName = getTokenText(); + + if (isFromClause) { + importFragment = builder.beginProduction(UNQUALIFIED_IMPORT_FRAGMENT); + importedEntityAst = builder.beginProduction(SIMPLE_NAME); + + if (importScope != null) { + symbol = (importScope instanceof IDefinitionModuleSymbol) + ? importScope.findSymbolInScope(importedEntityName, true) + : importScope.findSymbolInScope(importedEntityName); + } + } + else { + importFragment = builder.beginProduction(SIMPLE_IMPORT_FRAGMENT); + importedEntityAst = builder.beginProduction(SIMPLE_NAME); + + symbol = parentSymbol.getParentScope().resolveName(importedEntityName); + } + + if (symbol != null) { + parentSymbol.addImport(createRef(symbol)); + setAstSymbol(importFragment, symbol); + setAstSymbol(importedEntityAst, symbol); + addSymbolUsage(symbol); + } + else if (importScope != null) { + error(XdsMessages.UndeclaredIdentifier, importedEntityName); + } + + nextToken(); + + builder.endProduction(importedEntityAst); + builder.endProduction(importFragment); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + + builder.endProduction(IMPORT_FRAGMENT_LIST); + + parseToken(SEMICOLON); + builder.endProduction(importStatementAst); + } + } + + + private EnumSet parseExportMarker(boolean m2ReadOnly) { + EnumSet attributes = SymbolAttribute.createEmptySet(); + builder.beginProduction(EXPORT_MARKER); + + if (isDefinitionModule) { + attributes.add(SymbolAttribute.PUBLIC); + } + + if (settings.isOberon() || settings.isOdfSource()) { + if (TIMES == token) { + attributes.add(SymbolAttribute.PUBLIC); + nextToken(); + } + else if (MINUS == token) { + attributes.add(SymbolAttribute.PUBLIC); + attributes.add(SymbolAttribute.READ_ONLY); + nextToken(); + } + } + else { + if (m2ReadOnly) { + // check Modula-2 "READ ONLY" mark + if (token == MINUS) { + if (!settings.xdsExtensions()) { + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ReadOnlyTag); + } + if (isDefinitionModule) { + attributes.add(SymbolAttribute.PUBLIC); + attributes.add(SymbolAttribute.READ_ONLY); + } + else { + error(XdsMessages.AllowedOnlyInGlobalScope); + } + nextToken(); + } + } + else if ((token == TIMES) && settings.xdsExtensions()) { + attributes.add(SymbolAttribute.PUBLIC); + nextToken(); + } + } + + builder.endProduction(EXPORT_MARKER); + return attributes; + } + + + /** + * Parser of protection expression and direct language specification. + */ + private final class ModifierParser { + + XdsLanguage language; + @SuppressWarnings("unused") + long protection; + @SuppressWarnings("unused") + XdsProcedureAttribute procedureAttribute; + + XdsLanguage defaultModuleLanguage() { + return settings.isOberon() ? XdsLanguage.Oberon2 + : XdsLanguage.Modula2; + } + + void setDefaultModuleLanguage() { + language = defaultModuleLanguage(); + } + + XdsLanguage languageOf(IModulaSymbolScope parentSymbol) { + XdsLanguage language = null; + while(parentSymbol != null) + { + if (parentSymbol instanceof ISymbolWithScope) { + ISymbolWithScope scopedSymbol = (ISymbolWithScope) parentSymbol; + language = scopedSymbol.getLanguage(); + break; + } + parentSymbol = parentSymbol.getParentScope(); + } + return language; + } + + void parseDirectLanguageSpec(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + parseDirectLanguageSpec(parentSymbol, typeResolver, null); + } + + /** + * The desired language can be specified as "[" language "]", where + * language can be a string or integer constant expression. + * @param parentSymbol + */ + void parseDirectLanguageSpec(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver, XdsLanguage defaultLanguage) { + XdsLanguage language = null; + + if (token == LBRACKET) { + builder.beginProduction(DIRECT_LANGUAGE_SPEC); + nextToken(); + + if (!isSystemImported && !settings.xdsExtensions()) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.DirectLanguageSpecification); + + if (token == STRING_LITERAL) { + String text = getTokenText(); + language = XdsLanguage.NAME_TO_LANGUAGE.get(text); + if (language == null) { + error(XdsMessages.InvalidLanguageValue); + } + nextToken(); + } + else if (INTEGER_LITERAL_SET.contains(token)) { + TextPosition expressionPosition = getTokenPosition(); + expressionParser.parseConstantExpression(parentSymbol, typeResolver); + long index = expressionParser.getIntegerValue(); + language = XdsLanguage.INDEX_TO_LANGUAGE.get(index); + if (language == null) { + error(expressionPosition, XdsMessages.InvalidLanguageValue); + } + } + else { + expressionParser.parseConstantExpression(parentSymbol, typeResolver); +//TODO error(XdsMessages.IncompatibleTypes); + } + + parseToken(RBRACKET); + builder.endProduction(DIRECT_LANGUAGE_SPEC); + } + + if (language != null) { + this.language = language; + } + else { + this.language = defaultLanguage != null? defaultLanguage : languageOf(parentSymbol); + } + } + + void parseProcedureModifiers(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + setDefaultModuleLanguage(); + procedureAttribute = XdsProcedureAttribute.Default; + + if (token == LBRACKET) { + nextToken(); + + if (!isSystemImported && !settings.xdsExtensions()) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.DirectLanguageSpecification); + + do { + if (token == STRING_LITERAL) { + String text = getTokenText(); + if (XdsLanguage.NAME_TO_LANGUAGE.containsKey(text)) { + language = XdsLanguage.NAME_TO_LANGUAGE.get(text); + } + else { + XdsProcedureAttribute attribute = XdsProcedureAttribute.parseText(text); + if (attribute != null) { + if (isDefinitionModule) { + error(XdsMessages.NotAllowedInDefinitionModule); + } + procedureAttribute = attribute; + } + else { + error(XdsMessages.InvalidLanguageValue); + } + } + + nextToken(); + } + else if (INTEGER_LITERAL_SET.contains(token)) { + TextPosition expressionPosition = getTokenPosition(); + expressionParser.parseConstantExpression(parentSymbol, typeResolver); + long index = expressionParser.getIntegerValue(); + language = XdsLanguage.INDEX_TO_LANGUAGE.get(index); + if (language == null) { + error(expressionPosition, XdsMessages.InvalidLanguageValue); + } + } + else { + expressionParser.parseConstantExpression(parentSymbol, typeResolver); +//TODO error(XdsMessages.IncompatibleTypes); + } + + + } while (token == COMMA); + + parseToken(RBRACKET); + } + } + + + /** + * A program module, implementation module or local module may specify, by including + * protection in its heading, that execution of the enclosed statement sequence is + * protected. + * + * ModuleHeading = MODULE ident [ Protection ] ";"
+ * Protection = "[" ConstExpression "]"
+ * + * The protection expression should be of the PROTECTION type. The PROTECTION type + * is an elementary type with at least two values: INTERRUPTIBLE and UNINTERRUPTIBLE. + * + * @param parentSymbol + */ + void parseProtection(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + if (token == LBRACKET) { + nextToken(); + if (token != RBRACKET) { + expressionParser.parseConstantExpression(parentSymbol, typeResolver); + protection = expressionParser.getIntegerValue(); + } + parseToken(RBRACKET); + } + if (token == LBRACKET) { + parseDirectLanguageSpec(parentSymbol, typeResolver); + } + } + + + /** + * In ISO Modula-2, an absolute address may be specified for a variable + * after its name in square brackets. + * + * AbsoluteAddress = "[" AddressTypeValue "]"
+ * AddressTypeValue = ConstExpression
+ * + * @param parentSymbol + */ + public void parseAbsoluteAddress(IModulaSymbolScope parentSymbol, ISymbolWithScope typeResolver) { + if (token == LBRACKET) { + nextToken(); + if (token != RBRACKET) { + expressionParser.parseExpression(parentSymbol, typeResolver); + } + parseToken(RBRACKET); + } + } + + + } + + private void setTypeOfConstantSymbol( ConstantSymbol constantSymbol + , ISymbolWithDefinitions parentSymbol, ISymbolWithScope typeResolver ) + { + IModulaSymbol valueSymbol = expressionParser.parseConstantExpression(parentSymbol, typeResolver); + ITypeSymbol constantTypeSymbol = getSymbolType(valueSymbol); + if (constantTypeSymbol != null) { + IModulaSymbolReference ref = createRef(constantTypeSymbol); + constantSymbol.setTypeSymbol(ref); + } + } + + + + /** + * If last node is 'expectedToken' and it is inside 'nodeType' parent + * then adds this node to this parent frame list. + * + * @param expectedToken + * @param nodeType - must be instance of IAstFrameNode + */ + private void addFrameNode(TokenType expectedToken, ModulaCompositeType nodeType) { + Object nodeClass = nodeType.getNodeClass(); + PstNode node = builder.getLastNode(); + if ((node != null) && (node.getElementType() == expectedToken)) { + PstNode parent = builder.getCurrentProduction(); + while (parent != null) { + if (parent.getClass().equals(nodeClass) && parent instanceof IAstFrameNode) { + ((IAstFrameNode)parent).addFrameNode(node); + return; + } + parent = parent.getParent(); + } + } + } + + + private void addProcedureFrameNode(TokenType token) { + PstNode node = builder.getLastNode(); + if ((node != null) && (node.getElementType() == token)) { + PstNode parent = builder.getCurrentProduction(); + while (parent != null) { + if (parent instanceof AstProcedureDeclaration) { + AstProcedureDeclaration hostAst = (AstProcedureDeclaration)parent; + hostAst.addFrameNode(node); + return; + } + else if (parent instanceof AstOberonMethodDeclaration) { + AstOberonMethodDeclaration hostAst = (AstOberonMethodDeclaration)parent; + hostAst.addFrameNode(node); + return; + } + parent = parent.getParent(); + } + } + } + + private void addModuleFrameNode(TokenType token) { + PstNode node = builder.getLastNode(); + if ((node != null) && (node.getElementType() == token)) { + PstNode parent = builder.getCurrentProduction(); + while (parent != null) { + if (parent instanceof AstModule) { + AstModule hostAst = (AstModule)parent; + hostAst.addFrameNode(node); + return; + } + parent = parent.getParent(); + } + } + } + + + private void addProcedureFrameNode( AstProcedureDeclaration parent + , PstNode node ) + { + if (parent != null) { + parent.addFrameNode(node); + } + } + + private void addProcedureFrameNode( AstOberonMethodDeclaration parent + , PstNode node ) + { + if (parent != null) { + parent.addFrameNode(node); + } + } + + + private static class OberonReceiverInfo + { + private final AstOberonMethodReceiver astNode; + private final IOberonMethodReceiverSymbol symbol; + + public OberonReceiverInfo( AstOberonMethodReceiver astNode + , IOberonMethodReceiverSymbol symbol ) + { + this.astNode = astNode; + this.symbol = symbol; + } + + public AstOberonMethodReceiver getAstNode() { + return astNode; + } + + public IOberonMethodReceiverSymbol getSymbol() { + return symbol; + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserManager.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserManager.java new file mode 100644 index 0000000..acc7de1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserManager.java @@ -0,0 +1,173 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Objects; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.collections.Pair; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.NullParseEventReporter; +import com.excelsior.xds.parser.commons.TodoTaskParser.TaskEntry; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.ModulaAstCache; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.DefaultImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.utils.ModulaFileUtils; + +/** + * This class manages invocation of Modula-2 parser. + */ +public final class XdsParserManager +{ + private XdsParserManager() { + } + + /** + * Invokes 'to-do' tasks parser on the given Modula-2 source file. + * @throws CoreException + */ + public static TaskEntry[] parseTodoTaks( IFileStore sourceFile, CharSequence sourceText + , BuildSettings buildSettings + , IParserEventListener reporter ) + { + XdsSourceType sourceType = ModulaFileUtils.getSourceType(sourceFile.getName()); + XdsCommentParser commentParser = new XdsCommentParser( + sourceFile, sourceText, new XdsSettings(buildSettings, sourceType), reporter + ); + return commentParser.parseTodoTaks(); + } + + /** + * Returns module name without full parsing of the module. + */ + public static String getModuleName( XdsSourceType sourceType + , CharSequence sourceText + , BuildSettings buildSettings) + { + IParserEventListener reporter = NullParseEventReporter.getInstance(); + IImportResolver importResolver = new DefaultImportResolver(buildSettings, reporter, null); + XdsParser parser = new XdsParser( null, sourceText + , new XdsSettings(buildSettings, sourceType), importResolver + , reporter ); + return parser.getModuleName(); + } + + /** + * Invokes Modula-2 parser on the given source file and updates XDS model. + * @throws CoreException + */ + public static ModulaAst parseModule( IFile sourceIFile, IImportResolver importResolver, BuildSettings buildSettings, IParserEventListener reporter ) throws CoreException + { + IFileStore fileStore = ResourceUtils.toFileStore(sourceIFile); + return parseModule(fileStore, ResourceUtils.toString(fileStore), importResolver, buildSettings, reporter); + } + + /** + * Invokes Modula-2 parser on the given source file and updates XDS model. + * @throws CoreException + */ + public static ModulaAst parseModule( IFileStore sourceFile, CharSequence sourceText, IImportResolver importResolver + , BuildSettings buildSettings + , IParserEventListener reporter ) throws CoreException + { + return parseModule(sourceFile, sourceText, importResolver, buildSettings, reporter, false); + } + + public static ModulaAst parseModule( IFileStore sourceFile, CharSequence sourceText, IImportResolver importResolver + , BuildSettings buildSettings + , IParserEventListener reporter + , boolean isCacheModulaAst ) throws CoreException + { + XdsSourceType sourceType = ModulaFileUtils.getSourceType(sourceFile.getName()); + ParserMonitor parserMonitor = null; + if (isCacheModulaAst) { + parserMonitor = new ParserMonitor(sourceFile); + } + + XdsParser parser = new XdsParser( sourceFile, sourceText + , new XdsSettings(buildSettings, sourceType), importResolver + , reporter, parserMonitor ); + return parser.parseModule(); + } + + /** + * A monitor of completion of a Modula-2 source files parsing. + */ + private static class ParserMonitor implements IXdsParserMonitor + { + private final IFileStore sourceFile; + + public ParserMonitor(IFileStore sourceFile) { + this.sourceFile = sourceFile; + } + + /** + * {@inheritDoc} + */ + @Override + public void endModuleParsing( IFileStore sourceFile + , ModulaAst modulaAst ) + { + boolean isCacheModulaAst = (this.sourceFile != null) + && Objects.equals(this.sourceFile, sourceFile); + if (isCacheModulaAst) { + putModulaAst(modulaAst); + } + } + } + + public static IModuleSymbol getModulaSymbol(ParsedModuleKey moduleKey) { + return ModulaSymbolCache.instance().getModuleSymbol(moduleKey); + } + + public static ModulaAst getModulaAst(ParsedModuleKey moduleKey) { + return ModulaAstCache.getModulaAst(moduleKey); + } + + public static void putModulaAst(ModulaAst modulaAst) { + ModulaAstCache.putModulaAst(modulaAst); + } + + public static void discardModulaAst(ModulaAst modulaAst) { + if (modulaAst != null) { + ModulaAstCache.discardModulaAst(modulaAst.getParsedModuleKey()); + } + } + + public static void discardModulaAst(ParsedModuleKey key) { + if (key != null) { + ModulaAstCache.discardModulaAst(key); + } + } + + public static Pair getParsedModule(ParsedModuleKey key, boolean isNeedAst){ + ModulaAst modulaAst = null; + if (isNeedAst) { + modulaAst = ModulaAstCache.getModulaAst(key); + } + return Pair.create(ModulaSymbolCache.instance().getModuleSymbol(key), modulaAst); + } + + public static void clearModulaAstCache() { + ModulaAstCache.clear(); + } + + /** + * Method for test purposes only, do not use + */ + @Deprecated + public static Iterable astIterator() { + return ModulaAstCache.astIterator(); + } + + public static void turnOnDebugPrint(boolean isOn) { + XdsParser.IS_DEBUG_PRINT = isOn; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserState.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserState.java new file mode 100644 index 0000000..bd5d3d2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsParserState.java @@ -0,0 +1,106 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.utils.IPredicate; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.NullParseEventReporter; +import com.excelsior.xds.parser.commons.ast.AstBuilder; +import com.excelsior.xds.parser.commons.ast.IAstBuilder; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.ast.NullAstBuilder; +import com.excelsior.xds.parser.commons.ast.TokenTypes; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +class XdsParserState +{ + protected static boolean CHECK_REFERENCE_INTEGRITY = true; + + /* -------------------------------------------------------------------------- + * Immutable states + * -------------------------------------------------------------------------- + */ + + /** The source file to be parsed. */ + protected final IFileStore sourceFile; + + /** Buffer containing the text to be parsed */ + protected final CharSequence chars; + + + /** Parser configuration settings */ + protected final XdsSettings settings; + + + /** Handler of parsing errors, warnings etc. */ + protected final IParserEventListener reporter; + + + /** Program Structure Tree builder */ + protected final IAstBuilder builder; + + XdsParserState( IFileStore sourceFile, CharSequence chars + , XdsSettings settings + , IParserEventListener reporter ) + { + this.sourceFile = sourceFile; + this.chars = chars; + + if (reporter == null) { + reporter = NullParseEventReporter.getInstance(); + } + this.reporter = reporter; + + this.settings = settings; + + this.builder = settings.isBuildAst()? new AstBuilder( + sourceFile, reporter, WHITE_SPACE_PREDICATE, IS_TRAILING_WHITE_SPACE_ALLOWED + ) : NullAstBuilder.getInstance(); + } + + + /** + * Resets the mutable states of this parser. + * Resetting a parser discards all of its explicit state information. + */ + protected void reset() { + builder.reset(); + } + + + protected static IPredicate IS_TRAILING_WHITE_SPACE_ALLOWED = new IPredicate() + { + /** {@inheritDoc} */ + @Override + public boolean evaluate(PstNode node) { + return (node == null) + || (ModulaElementTypes.INACTIVE_CODE == node.getElementType()); + } + }; + + protected static IPredicate WHITE_SPACE_PREDICATE = new IPredicate() + { + /** {@inheritDoc} */ + @Override + public boolean evaluate(PstNode node) { + return (TokenTypes.WHITE_SPACE == node.getElementType()) + || ( PRAGMA_CONDITIONAL_STATEMENT_SET.contains(node.getElementType()) + && (node.getParent() != null) + && (ModulaElementTypes.INACTIVE_CODE != node.getParent().getElementType()) + ); + } + }; + + private static Set PRAGMA_CONDITIONAL_STATEMENT_SET = new HashSet(Arrays.asList( + ModulaElementTypes.PRAGMA_IF_STATEMENT, + ModulaElementTypes.PRAGMA_ELSIF_STATEMENT, + ModulaElementTypes.PRAGMA_ELSE_STATEMENT, + ModulaElementTypes.PRAGMA_END_STATEMENT + )); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsPragmaParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsPragmaParser.java new file mode 100644 index 0000000..223e202 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsPragmaParser.java @@ -0,0 +1,787 @@ +package com.excelsior.xds.parser.modula; + +import java.util.ArrayList; +import java.util.List; +import java.util.Stack; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.NullParseEventReporter; +import com.excelsior.xds.parser.commons.ast.IAstFrameChild; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.internal.modula.nls.XdsMessages; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.pragmas.AstInactiveCode; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragma; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; + +/** + * Parser of XDS Modula-2/Oberon-2 source code directives <* ... *>. + * + *

+ * Source code directives (or pragmas) are used to set compilation options in the source text and + * to select specific pieces of the source text to be compiled (conditional compilation). + * The ISO Modula-2 standard does not describe pragma syntax. XDS supports source code + * directives in both Modula-2 and Oberon-2. The syntax described in The Oakwood Guidelines + * for the Oberon-2 Compiler Developers is used. + *

+ * + *

+ * NOTE: pragma nodes are rearranged by (AstBuilder.endProduction(CompositeType). + *

+ */ +public class XdsPragmaParser extends XdsCommentParser + implements PragmaTokenTypes, ModulaElementTypes +{ + /** The list of text locations ignored by the conditional compilation pragmas */ + private final List inactiveCodeRegions = new ArrayList(8); + + private ConditionalCompilationState ccState; + private final Stack ccStack = new Stack(); + + private PragmaExpressionParser pragmaExpressionParser; + + private boolean modeScan; + + private TextPosition pragmaBeginPosition; + + + public XdsPragmaParser( IFileStore sourceFile, CharSequence chars + , XdsSettings settings + , IParserEventListener reporter ) + { + super(sourceFile, chars, settings, reporter); + pragmaExpressionParser = new PragmaExpressionParser(); + modeScan = true; + } + + /** + * {@inheritDoc} + */ + @Override + protected void reset() { + super.reset(); + modeScan = true; + ccState = null; + ccStack.clear(); + pragmaBeginPosition = null; + } + + /** + * Returns the next non-pragma token in the input char sequence. + * + * @return the next token + */ + @Override + protected TokenType nextToken() { + while (true) { + super.nextToken(); + + if (PRAGMA_BEGIN == token) { + pragmaBeginPosition = getTokenPosition(); + parsePragmaBlock(false); + } + else if (PRAGMA_POP == token) { + builder.beginProduction(PRAGMA_INLINE_SETTINGS); + popSettings(); + endPragmaProduction(PRAGMA_INLINE_SETTINGS); + } + else if (PRAGMA_PUSH == token) { + builder.beginProduction(PRAGMA_INLINE_SETTINGS); + pushSettings(); + endPragmaProduction(PRAGMA_INLINE_SETTINGS); + } + else if (PRAGMA_ARGS_BEGIN == token) { + parsePragmaArgs(); + } + else if (PRAGMA_ARGS_POP_BEGIN == token) { + popSettings(); + parsePragmaArgs(); + } + else if (PRAGMA_ARGS_PUSH_BEGIN == token) { + pushSettings(); + parsePragmaArgs(); + } + else if (PRAGMA_ARGS_POPPUSH_BEGIN == token) { + popSettings(); + pushSettings(); + parsePragmaArgs(); + } + else if (EOF == token) { + return token; + } + else if (BAD_CHARACTER == token) { + error(XdsMessages.IllegalCharacter); + } + else { + return token; + } + } + } + + + /** + * Checks consistency of conditional compilation state. + */ + public void checkConsistency() { + if (ccState != null) { + error( XdsMessages.IllegalConditionCompilationAtPosition + , NullParseEventReporter.positionToString(ccState.position) ); + ccState = null; + } + } + + + /** + * Returns the list of text locations ignored by the conditional compilation pragmas. + * + * @return list of text locations ignored by the conditional compilation pragmas. + */ + public List getInactiveCodeRegions() { + return inactiveCodeRegions; + } + + + protected void onInactiveBlock(AstInactiveCode inactiveCodeAst) { + if (inactiveCodeAst != null) { + ITextRegion textRegion = new TextRegion ( + inactiveCodeAst.getOffset(), inactiveCodeAst.getLength() + ); + inactiveCodeRegions.add(textRegion); + } + } + + /** + * "<*$" ["<" | ">" | "|"] ... "*>" + * ^ start from this position + */ + private void parsePragmaArgs() { + builder.beginProduction(PRAGMA_INLINE_SETTINGS); + do { + nextPragmaToken(); + if (token == IDENTIFIER) { + String optionName = getTokenText(); + nextPragmaToken(); + + if (PLUS == token) { + setOption(optionName, true); + } + else if (MINUS == token) { + setOption(optionName, false); + } + else { + errorInvalidPragmaSyntax(); + break; + } + } + else { + break; + } + } while (true); + + if (token != PRAGMA_END) { + errorInvalidPragmaSyntax(); + skipToToken(PRAGMA_END); + } + endPragmaProduction(PRAGMA_INLINE_SETTINGS); + } + + + /** + * "<*" ... "*>" + * ^ start from this position + */ + protected boolean parsePragmaBlock(boolean insedIgnoredText) { + boolean isSkipTokenRequired = false; + boolean endConditionStatement = false; + + AstPragma pragmaAst = builder.beginProduction(PRAGMA); + nextPragmaToken(); + + if ((PLUS == token) || (MINUS == token)) + { + pragmaAst = builder.changeProduction(PRAGMA_INLINE_SETTINGS); + boolean enabled = (token == PLUS); + nextPragmaToken(); + if (token == IDENTIFIER) { + setOption(getTokenText(), enabled); + } else { + error(XdsMessages.IdentifierExpected); + } + nextPragmaToken(); + } + else if (IF_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_IF_STATEMENT); + parseConditionStatement(true); + isSkipTokenRequired = true; + } + else if (ELSIF_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_ELSIF_STATEMENT); + setFrameNode(); + if (insedIgnoredText) { + endParentProduction_INACTIVE_CODE(); + } + parseConditionStatement(false); + isSkipTokenRequired = true; + endConditionStatement = true; + } + else if (ELSE_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_ELSE_STATEMENT); + setFrameNode(); + addFrameNode(ELSE_KEYWORD); + if (insedIgnoredText) { + endParentProduction_INACTIVE_CODE(); + } + processPragmaStatementELSE(); + nextPragmaToken(); + isSkipTokenRequired = true; + endConditionStatement = true; + } + else if (END_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_END_STATEMENT); + setFrameNode(); + addFrameNode(END_KEYWORD); + if (insedIgnoredText) { + endParentProduction_INACTIVE_CODE(); + } + processPragmaStatementEND(); + nextPragmaToken(); + endConditionStatement = true; + } + else if (POP_PRAGMA_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_INLINE_SETTINGS); + popSettings(); + nextPragmaToken(); + } + else if (PUSH_PRAGMA_KEYWORD == token) + { + pragmaAst = builder.changeProduction(PRAGMA_INLINE_SETTINGS); + pushSettings(); + nextPragmaToken(); + } + else if (NEW_PRAGMA_KEYWORD == token) + { + // [ NEW ] identifier [ "+" | "-" | "=" string ] + pragmaAst = builder.changeProduction(PRAGMA_INLINE_SETTINGS); + nextPragmaToken(); + if (token == IDENTIFIER) { + parseNewStyleInlineSetting(getTokenText(), true); + } else { + error(XdsMessages.IdentifierExpected); + } + } + else if (IDENTIFIER == token) + { + // identifier [ "+" | "-" | "=" string ] + pragmaAst = builder.changeProduction(PRAGMA_INLINE_SETTINGS); + parseNewStyleInlineSetting(getTokenText(), false); + } + else { + error(XdsMessages.IdentifierExpected); + } + + if (token != PRAGMA_END) { + errorInvalidPragmaSyntax(); + skipToToken(PRAGMA_END); + } + + if (isSkipTokenRequired) { + skipTokens(); + } + + if (pragmaAst != null) { + builder.acceptLastToken(); + builder.endProduction(pragmaAst); + } + return endConditionStatement; + } + + + /** + * The syntax of the conditional compilation IF statement follows: + * + * IfStatement = <* IF Expression THEN *> text + * { <* ELSIF Expression THEN *> text } + * [ <* ELSE *> text ] + * <* END *> + * Expression = SimpleExpression + * [ ("=" | "#") SimpleExpression]. + * SimpleExpression = Term { "OR" Term}. + * Term = Factor { "&" Factor}. + * Factor = Ident | string | + * "DEFINED" "(" Ident ")" | + * "(" Expression ")" | + * "~" Factor | "NOT" Factor. + * Ident = option | equation. + * + */ + private void parseConditionStatement(boolean newLevel) { + if (newLevel) { + if (ccState != null) { + ccStack.push(ccState); + } + ccState = new ConditionalCompilationState(modeScan, builder.getCurrentProduction()); + addFrameNode(IF_KEYWORD); + } + else if (ccState == null) { + error(XdsMessages.IllegalConditionCompilation); + ccState = new ConditionalCompilationState(modeScan, null); + ccState.setClause(ELSIF_KEYWORD); + } + else { + if ((ccState.clause != IF_KEYWORD) && (ccState.clause != ELSIF_KEYWORD)) { + error( XdsMessages.IllegalConditionCompilationAtPosition + , NullParseEventReporter.positionToString(ccState.position) ); + } + else { + ccState.setClause(ELSIF_KEYWORD); + if (modeScan && ccState.isActive) { + ccState.isActive = false; + } + addFrameNode(ELSIF_KEYWORD); + } + + modeScan = ccState.modeScan; + } + + nextPragmaToken(); + + pragmaExpressionParser.parseExpression(); + boolean value = pragmaExpressionParser.getBooleanValue(); + + if (token == THEN_KEYWORD) { + addFrameNode(THEN_KEYWORD); + } + nextPragmaToken(THEN_KEYWORD); + + modeScan = value && (ccState != null) && ccState.isActive; + } + + + protected void processPragmaStatementELSE() { + if (ccState == null) { + error(XdsMessages.IllegalConditionCompilation); + } + else if ((ccState.clause != IF_KEYWORD) && (ccState.clause != ELSIF_KEYWORD)) { + error( XdsMessages.IllegalConditionCompilationAtPosition + , NullParseEventReporter.positionToString(ccState.position) ); + } + else { + ccState.setClause(ELSE_KEYWORD); + modeScan = ! modeScan && ccState.isActive; + } + } + + protected void processPragmaStatementEND() { + if (ccState != null) { + modeScan = ccState.modeScan; + ccState = ccStack.isEmpty() ? null : ccStack.pop(); + } + else { + error(XdsMessages.IllegalConditionCompilation); + } + } + + + + /** + * Parses an inline options and equations which is defined in the NewStyle. + * NewStyle is proposed as the Oakwood standard for Oberon-2. + * + * XDS allows options to be changed in the source text by using standard + * ISO pseudo comments <* ... *>. + * + * The format of an inline option or equation setting is described by the following syntax: + * + * Pragma = "<*" PragmaBody "*>" + * PragmaBody = PUSH | POP | NewStyle | OldStyle + * NewStyle = [ NEW ] name [ "+" | "-" | "=" string ] + * OldStyle = ("+" | "-") name + * + * @param name the name of inline option and equation. + * @param create option and equation is defined as NEW + */ + private void parseNewStyleInlineSetting(String name, boolean create) { + nextPragmaToken(); + if ((PLUS == token) || (MINUS == token)) + { + boolean enabled = (token == PLUS); + if (create) { + addOption(name, enabled); + } + else { + setOption(name, enabled); + } + nextPragmaToken(); + } + else if (EQU == token) + { + nextPragmaToken(); + if (STRING_LITERAL_SET.contains(token)) { + if (create) { + addEquation(name, getTokenText()); + } + else { + setEquation(name, getTokenText()); + } + nextPragmaToken(); + } + else { + error(XdsMessages.StringExpected); + } + } + else + { + if (create) { + addOption(name, false); + } else if (token == PRAGMA_END) { + errorInvalidPragmaSyntax(); + } + } + } + + + private void setOption(String name, boolean enabled) { + if (modeScan) { + if (! settings.isOptionDefined(name)) { + warning(XdsMessages.UnknownOption, name); + } + settings.addOption(name, enabled); + } + } + + private void addOption(String name, boolean enabled) { + if (modeScan) { + if (settings.isOptionDefined(name)) { + warning(XdsMessages.OptionAlreadyDefined, name); + } + settings.addOption(name, enabled); + } + } + + private void setEquation(String name, String value) { + if (modeScan) { + if (! settings.isEquationDefined(name)) { + warning(XdsMessages.UnknownEquation, name); + } + settings.addEquation(name, value); + } + } + + private void addEquation(String name, String value) { + if (modeScan) { + if (settings.isEquationDefined(name)) { + warning(XdsMessages.EquationAlreadyDefined, name); + } + settings.addEquation(name, value); + } + } + + private boolean isDefined(String name) { + return settings.isOptionDefined(name) + || settings.isEquationDefined(name); + } + + + private void popSettings() { + if (modeScan) { + settings.popSettings(); + } + } + + private void pushSettings() { + if (modeScan) { + settings.pushSettings(); + } + } + + + private TokenType nextPragmaToken() { + while (true) { + super.nextToken(); + + if (BAD_CHARACTER == token) { + error(XdsMessages.IllegalCharacter); + } + else { + return token; + } + } + } + + private TokenType nextPragmaToken(TokenType expectedToken) { + if (token == expectedToken) + return nextPragmaToken(); + else + errorExpectedSymbol(expectedToken); + return token; + } + + + private void skipTokens() { + if (!modeScan) { + AstInactiveCode ignoredTextAst = beginProduction_INACTIVE_CODE(); + + while (!modeScan) { + super.nextToken(); + + if (PRAGMA_BEGIN == token) + { + pragmaBeginPosition = getTokenPosition(); + if (parsePragmaBlock(true)) { + break; + } + } + else if (EOF == token) + { + if (ignoredTextAst != null) { + builder.endProduction(INACTIVE_CODE); + onInactiveBlock(ignoredTextAst); + } + break; + } + } + } + } + + + private AstInactiveCode beginProduction_INACTIVE_CODE() { + AstInactiveCode ignoredTextAst = null; + if (ccState != null && ccState.modeScan) { + builder.acceptLastToken(); + ignoredTextAst = builder.beginProduction(INACTIVE_CODE); + } + return ignoredTextAst; + } + + private void endParentProduction_INACTIVE_CODE() { + if (ccState != null && ccState.modeScan) { + AstInactiveCode ignoredTextAst = builder.endParentProduction(INACTIVE_CODE); + onInactiveBlock(ignoredTextAst); + } + } + + private void endPragmaProduction(ModulaCompositeType pragma) + { + builder.acceptLastToken(); + builder.endProduction(pragma); + } + + + private final class ConditionalCompilationState { + boolean modeScan; + boolean isActive; + + TokenType clause; + TextPosition position; + PstCompositeNode ifNode; + + ConditionalCompilationState (boolean modeScan, PstCompositeNode ifNode) { + this.modeScan = modeScan; + this.ifNode = ifNode; + this.isActive = modeScan; + clause = IF_KEYWORD; + position = getTokenPosition(); + } + + void setClause(TokenType newClause) { + clause = newClause; + position = getTokenPosition(); + } + } + + + /** + * Parser of XDS pragma expression statement. + */ + private final class PragmaExpressionParser { + + private String value; + + public boolean getBooleanValue() { + return toBoolean(value, true); + } + + public void parseExpression() { + parseExpression(true); + } + + /** + * Expression = SimpleExpression [ ("=" | "#") SimpleExpression ]. + */ + private void parseExpression(boolean resolve) { + parseSimpleExpression(resolve); + String leftValue = value; + if ( (EQU == token) + || (NEQ == token) ) + { + boolean not = (token == NEQ); + nextPragmaToken(); + parseSimpleExpression(resolve); + String rightValue = value; + value = Boolean.toString(not != leftValue.equals(rightValue)); + } + } + + + /** + * SimpleExpression = Term { "OR" Term}. + */ + private void parseSimpleExpression(boolean resolve) { + parsTerm(resolve); + String leftValue = value; + while (token == OR_KEYWORD) { + nextPragmaToken(); + boolean res = toBoolean(leftValue, resolve); + parsTerm(!res); + String rightValue = value; + leftValue = Boolean.toString(res || toBoolean(rightValue, resolve)); + } + value = leftValue; + } + + /** + * Term = Factor { "&" Factor}. + */ + private void parsTerm(boolean resolve) { + parseFactor(resolve); + String leftValue = value; + while (token == AND) { + nextPragmaToken(); + boolean res = toBoolean(leftValue, resolve); + parseFactor(res); + String rightValue = value; + leftValue = Boolean.toString(res && toBoolean(rightValue, resolve)); + } + value = leftValue; + } + + /** + * Factor = Ident | string | + * "DEFINED" "(" Ident ")" | + * "(" Expression ")" | + * "~" Factor | "NOT" Factor. + */ + private void parseFactor(boolean resolve) { + if (LPARENTH == token) + { + nextPragmaToken(); + parseExpression(resolve); + nextPragmaToken(RPARENTH); + + } + else if ( (NOT == token) + || (NOT_KEYWORD == token) ) + { + nextPragmaToken(); + parseFactor(resolve); + value = Boolean.toString(! toBoolean(value, true)); + + } + else if (DEFINED_PRAGMA_KEYWORD == token) + { + nextPragmaToken(); + nextPragmaToken(LPARENTH); + + if (token == IDENTIFIER) { + value = Boolean.toString(isDefined(getTokenText())); + nextPragmaToken(); + } + else { + value = ""; + error(XdsMessages.IdentifierExpected); + } + + nextPragmaToken(RPARENTH); + + } + else + { + if (STRING_LITERAL_SET.contains(token)) { + value = getTokenText(); + nextPragmaToken(); + } + else + parseIndentifier(resolve); + } + } + + /** + * Ident = option | equation. + */ + private void parseIndentifier(boolean resolve) { + value = ""; + if (token == IDENTIFIER) { + String name = getTokenText(); + if (settings.isOptionDefined(name)) { + value = Boolean.toString(settings.getOption(name)); + } + else if (settings.isEquationDefined(name)){ + value = settings.getEquation(name); + if (value == null) + value = ""; + } + else { + value = Boolean.toString(false); + if (modeScan && resolve) + warning(XdsMessages.UnknownOption, name); + } + nextPragmaToken(); + } + else { + error(XdsMessages.IdentifierExpected); + } + } + + private boolean toBoolean(String value, boolean resolve) { + if ("false".equals(value)) + return false; + if ("true".equals(value)) + return true; + if (modeScan && resolve) + error(XdsMessages.IncompatibleTypes); + return false; + } + + } + + private void addFrameNode(TokenType expectedToken) { + PstNode node = builder.getLastNode(); + if ((node != null) && (node.getElementType() == expectedToken)) { + if (ccState != null && (ccState.ifNode instanceof IAstFrameNode)) { + ((IAstFrameNode)(ccState.ifNode)).addFrameNode(node); + } + } + } + + private void setFrameNode() { + PstCompositeNode n = builder.getCurrentProduction(); + if (n instanceof IAstFrameChild) { + if (ccState != null && (ccState.ifNode instanceof IAstFrameNode)) { + ((IAstFrameChild)n).setAstFrameNode((IAstFrameNode)(ccState.ifNode)); + } + } + } + + + private void errorInvalidPragmaSyntax() { + int length = (getTokenPosition().getOffset() - pragmaBeginPosition.getOffset()) + + getTokenLength(); + error(pragmaBeginPosition, length, XdsMessages.InvalidPragmaSyntax); + + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsProcedureAttribute.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsProcedureAttribute.java new file mode 100644 index 0000000..e451e29 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsProcedureAttribute.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.parser.modula; + +public enum XdsProcedureAttribute { + + Default (""), + AlwaysInline ("AlwaysInline"), + NeverInline ("NeverInline"), + NoSaveRestore ("NoSaveRestore"); + + public final String designator; + private final String altenativeDesignator; + + XdsProcedureAttribute(String text){ + designator = text; + altenativeDesignator = text.toLowerCase(); + } + + public static XdsProcedureAttribute parseText(String text) { + for(XdsProcedureAttribute attribute : XdsProcedureAttribute.values()) { + if (attribute != Default) { + if (attribute.designator.equals(text) || attribute.altenativeDesignator.equals(text)) { + return attribute; + } + } + } + return null; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSettings.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSettings.java new file mode 100644 index 0000000..9124c01 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSettings.java @@ -0,0 +1,279 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Stack; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.sdk.XdsOptions; + +/** + * Configuration layer of XDS development system. + */ +public final class XdsSettings +{ + private BuildSettings settings; + private Stack stack; + + private boolean oberon; + private final boolean odfSource; + + private boolean isoPragma; + private boolean oberonNumExt; + private boolean gotoExtension; + private boolean enhancedDereference; + + public final XdsSourceType sourceType; + + private boolean isBuildAst = true; + + public XdsSettings(BuildSettings settings, XdsSourceType sourceType) + { + odfSource = (sourceType == XdsSourceType.OdfFile); + this.sourceType = sourceType; + this.oberon = (sourceType == XdsSourceType.Oberon) || odfSource; + this.settings = (settings == null) + ? DefaultBuildSettingsHolder.DefaultBuildSettings.clone() + : settings.clone(); + updateHeaderOptions(); + } + + public BuildSettings getSettings() { + return settings; + } + + public boolean isBuildAst() { + return isBuildAst; + } + + public void setBuildAst(boolean isBuildAst) { + this.isBuildAst = isBuildAst; + } + + public void updateHeaderOptions() { + if (odfSource) { + settings.addOption(XdsOptions.M2EXTENSIONS, true); + settings.addOption(XdsOptions.M2ADDTYPES, true); + settings.addOption(XdsOptions.O2ISOPRAGMA, true); + settings.addOption(XdsOptions.O2EXTENSIONS, true); + settings.addOption(XdsOptions.O2ADDKWD, true); + } + + isoPragma = !oberon || getOption(XdsOptions.O2ISOPRAGMA); + oberonNumExt = getOption(XdsOptions.O2NUMEXT); + gotoExtension = topSpeedExtensions() || getOption(XdsOptions.M2GOTO); + enhancedDereference = topSpeedExtensions() || m2Extensions(); + } + + public void popSettings() { + if ((stack != null) && !stack.isEmpty()) { + settings = stack.pop(); + } + } + + public void pushSettings() { + if (stack == null) { + stack = new Stack(); + } + stack.push(settings); + settings = settings.clone(); + } + + /** + * Adds the specified option to this compiler settings. If the settings + * previously contained the option, the old value is replaced by the + * specified value. + * + * @param name + * the unique option name + * @param enabled + * the initial enabled state + * + * @return the previous value associated with the option, or {@code null} if + * there was no this option in the settings. + */ + public Boolean addOption(String name, boolean enabled) { + return settings.addOption(name, enabled); + } + + /** + * Returns true if this compiler settings contains the specified + * option. + * + * @param name + * the option name whose presence in this settings is to be + * tested + * + * @return true if this settings contains the specified option + */ + public boolean isOptionDefined(String name) { + return settings.isOptionDefined(name) || isMessageControlOption(name); + } + + /** + * Returns the enabled state of the specified option, or {@code false} if + * this settings contains no such option. + * + * @param name + * the option name whose value is to be returned + * + * @return the enabled sate of the specified option, or {@code false} if + * this settings contains no such option + */ + public boolean getOption(String name) { + return settings.getOption(name); + } + + /** + * Adds the specified option to this compiler settings if it is not already + * present. If this settings already contains the option, the call leaves + * the settings unchanged and returns false. + * + * @param name + * the unique equation name + * @param value + * the initial value of equation. + * + * @return the previous value associated with the equation, or null + * if there was no this equation in the settings. + */ + public String addEquation(String name, String value) { + return settings.addEquation(name, value); + } + + /** + * Returns the value of the specified equation, or {@code false} if this + * settings contains no such equation. + * + * @param name + * the equation name whose value is to be returned + * + * @return the value of the specified equation, or {@code false} if this + * settings contains no such equation + */ + public String getEquation(String name) { + return settings.getEquation(name); + } + + /** + * Returns true if this compiler settings contains the specified + * equation. + * + * @param name + * the equation name whose presence in this settings is to be + * tested + * + * @return true if this settings contains the specified equation + */ + public boolean isEquationDefined(String name) { + return settings.isEquationDefined(name); + } + + /** XDS language extensions */ + public boolean xdsExtensions() { + return (oberon && getOption(XdsOptions.O2EXTENSIONS)) + || getOption(XdsOptions.M2EXTENSIONS); + } + + /** TopSpeed Modula-2 extensions */ + public boolean topSpeedExtensions() { + return !oberon && getOption(XdsOptions.TOPSPEED); + } + + /** TopSpeed Modula-2 extensions */ + public boolean m2Extensions() { + return !oberon && getOption(XdsOptions.M2EXTENSIONS); + } + + /** + * Sets language mode of the module. + * + * @param language + * the module language. + */ + public final void setLanguage(XdsLanguage language) { + oberon = (XdsLanguage.Oberon2 == language); + } + + /** + * Returns true if the Oberon-2 language is enabled. + * + * @return the Oberon-2 language enabled state + */ + public final boolean isOberon() { + return oberon; + } + + /** + * Returns true if the Oberon-2 definition source file is + * enabled. + * + * @return the Oberon-2 definition source file enabled state. + */ + public final boolean isOdfSource() { + return odfSource; + } + + /** + * Returns true if the Oberon-2 scientific extensions are + * enabled. + * + * @return the Oberon-2 scientific extensions enabled state. + */ + public final boolean isOberonScientificExtensions() { + return oberonNumExt; + } + + /** + * Returns true if the ISO Modula-2 pragmas in Oberon are + * enabled. + * + * @return the ISO Modula-2 pragmas in Oberon enabled state. + */ + public final boolean isIsoPragma() { + return isoPragma; + } + + /** + * Returns true if the support of GOTO statement is enabled. + * + * @return the support of GOTO statement enabled state. + */ + public final boolean isGotoExtension() { + return gotoExtension; + } + + public final boolean isEnhancedDereference() { + return enhancedDereference; + } + + + private static final String WOFF = "WOFF"; //$NON-NLS-1$ + private static final String WON = "WON"; //$NON-NLS-1$ + private static final String WERR = "WERR"; //$NON-NLS-1$ + + private boolean isMessageControlOption(String name) { + name = name.trim().toUpperCase(); + String option = null; + if (name.startsWith(WOFF)) { + option = WOFF; + } + else if (name.startsWith(WERR)) { + option = WERR; + } + else if (name.startsWith(WON)) { + option = WON; + } + else { + return false; + } + + String messageId = name.substring(option.length()); + for (char ch: messageId.toCharArray()) { + if (!Character.isDigit(ch)) { + return false; + } + } + return true; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSourceType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSourceType.java new file mode 100644 index 0000000..4d54035 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSourceType.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.parser.modula; + +public enum XdsSourceType +{ + /** + * Modula-2 source code received from *.def, *.mod files + */ + Modula, + + /** + * Oberon-2 source code received from *.ob2 files + */ + Oberon, + + /** + * Oberon-2/Modula-2 definition received from *.odf files + */ + OdfFile; + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsStandardNames.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsStandardNames.java new file mode 100644 index 0000000..a06188d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsStandardNames.java @@ -0,0 +1,159 @@ +package com.excelsior.xds.parser.modula; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +public interface XdsStandardNames +{ + public String OBERON_SUPERMODULE = "#OBERON_SUPERMODULE#"; //$NON-NLS-1$ + public String MODULA_SUPERMODULE = "#MODULA_SUPERMODULE#"; //$NON-NLS-1$ + public String COMPILER = "COMPILER"; //$NON-NLS-1$ + public String SYSTEM = "SYSTEM"; //$NON-NLS-1$ + + public String INDEX = "INDEX"; //$NON-NLS-1$ + + public String INTEGER = "INTEGER"; //$NON-NLS-1$ + public String CARDINAL = "CARDINAL"; //$NON-NLS-1$ + public String M2ADDTYPES = "M2ADDTYPES"; //$NON-NLS-1$ + public String SHORTINT = "SHORTINT"; //$NON-NLS-1$ + public String LONGINT = "LONGINT"; //$NON-NLS-1$ + public String LONGLONGINT = "LONGLONGINT"; //$NON-NLS-1$ + public String SHORTCARD = "SHORTCARD"; //$NON-NLS-1$ + public String LONGCARD = "LONGCARD"; //$NON-NLS-1$ + public String LONGLONGCARD = "LONGLONGCARD"; //$NON-NLS-1$ + public String BOOLEAN = "BOOLEAN"; //$NON-NLS-1$ + public String CHAR = "CHAR"; //$NON-NLS-1$ + public String REAL = "REAL"; //$NON-NLS-1$ + public String LONGREAL = "LONGREAL"; //$NON-NLS-1$ + public String LONGLONGREAL = "LONGLONGREAL"; //$NON-NLS-1$ + + /** + * The standard type PROC denotes a parameterless procedure, defined as PROC = PROCEDURE. + */ + public String PROC = "PROC"; //$NON-NLS-1$ + + public String BITSET = "BITSET"; //$NON-NLS-1$ + public String BITSET64 = "BITSET64"; //$NON-NLS-1$ + public String PROTECTION = "PROTECTION"; //$NON-NLS-1$ + public String COMPLEX = "COMPLEX"; //$NON-NLS-1$ + public String LONGCOMPLEX = "LONGCOMPLEX"; //$NON-NLS-1$ + public String SET = "SET"; //$NON-NLS-1$ + public String CARD8 = "CARD8"; //$NON-NLS-1$ + + public String LOC = "LOC"; //$NON-NLS-1$ + public String WORD = "WORD"; //$NON-NLS-1$ + public String ADDRESS = "ADDRESS"; //$NON-NLS-1$ + public String BYTE = "BYTE"; //$NON-NLS-1$ + + public String INT8 = "INT8"; //$NON-NLS-1$ + public String INT16 = "INT16"; //$NON-NLS-1$ + public String CARD16 = "CARD16"; //$NON-NLS-1$ + public String INT32 = "INT32"; //$NON-NLS-1$ + public String CARD32 = "CARD32"; //$NON-NLS-1$ + public String SET8 = "SET8"; //$NON-NLS-1$ + public String SET16 = "SET16"; //$NON-NLS-1$ + public String SET32 = "SET32"; //$NON-NLS-1$ + public String SET64 = "SET64"; //$NON-NLS-1$ + public String BOOL8 = "BOOL8"; //$NON-NLS-1$ + public String BOOL16 = "BOOL16"; //$NON-NLS-1$ + public String BOOL32 = "BOOL32"; //$NON-NLS-1$ + public String Int = "int"; //$NON-NLS-1$ + public String Unsigned = "unsigned"; //$NON-NLS-1$ + public String Size_t = "size_t"; //$NON-NLS-1$ + public String Void = "void"; //$NON-NLS-1$ + public String INT = "INT"; //$NON-NLS-1$ + public String CARD = "CARD"; //$NON-NLS-1$ + public String INT64 = "INT64"; //$NON-NLS-1$ + public String CARD64 = "CARD64"; //$NON-NLS-1$ + + public String BITSPERLOC = "BITSPERLOC"; //$NON-NLS-1$ + public String LOCSPERWORD = "LOCSPERWORD"; //$NON-NLS-1$ + public String LOCSPERBYTE = "LOCSPERBYTE"; //$NON-NLS-1$ + + public String ADDADR = "ADDADR"; //$NON-NLS-1$ + public String SUBADR = "SUBADR"; //$NON-NLS-1$ + public String DIFADR = "DIFADR"; //$NON-NLS-1$ + public String DIFADRC = "DIFADRC"; //$NON-NLS-1$ + public String MAKEADR = "MAKEADR"; //$NON-NLS-1$ + public String ADR = "ADR"; //$NON-NLS-1$ + public String M2ADR = "M2ADR"; //$NON-NLS-1$ + public String SHIFT = "SHIFT"; //$NON-NLS-1$ + public String ROTATE = "ROTATE"; //$NON-NLS-1$ + public String CAST = "CAST"; //$NON-NLS-1$ + public String TSIZE = "TSIZE"; //$NON-NLS-1$ + public String ROT = "ROT"; //$NON-NLS-1$ + public String LSH = "LSH"; //$NON-NLS-1$ + public String NEW = "NEW"; //$NON-NLS-1$ + public String DISPOSE = "DISPOSE"; //$NON-NLS-1$ + public String PTR = "PTR"; //$NON-NLS-1$ + + public String CC = "CC"; //$NON-NLS-1$ + public String BIT = "BIT"; //$NON-NLS-1$ + public String VAL = "VAL"; //$NON-NLS-1$ + public String GET = "GET"; //$NON-NLS-1$ + public String GETREG = "GETREG"; //$NON-NLS-1$ + public String PUT = "PUT"; //$NON-NLS-1$ + public String PUTREG = "PUTREG"; //$NON-NLS-1$ + public String MOVE = "MOVE"; //$NON-NLS-1$ + public String CODE = "CODE"; //$NON-NLS-1$ + public String BYTES = "BYTES"; //$NON-NLS-1$ + public String BITS = "BITS"; //$NON-NLS-1$ + public String REF = "REF"; //$NON-NLS-1$ + public String VALID = "VALID"; //$NON-NLS-1$ + public String FILL = "FILL"; //$NON-NLS-1$ + public String EVAL = "EVAL"; //$NON-NLS-1$ + public String FIELDOFS = "FIELDOFS"; //$NON-NLS-1$ + public String PRED = "PRED"; //$NON-NLS-1$ + public String SUCC = "SUCC"; //$NON-NLS-1$ + public String TARGET = "TARGET"; //$NON-NLS-1$ + public String OPTION = "OPTION"; //$NON-NLS-1$ + public String EQUATION = "EQUATION"; //$NON-NLS-1$ + public String TIMESTAMP = "TIMESTAMP"; //$NON-NLS-1$ + + public String TRUE = "TRUE"; //$NON-NLS-1$ + public String FALSE = "FALSE"; //$NON-NLS-1$ + public String NIL = "NIL"; //$NON-NLS-1$ + + public String INTERRUPTIBLE = "INTERRUPTIBLE"; //$NON-NLS-1$ + public String UNINTERRUPTIBLE = "UNINTERRUPTIBLE"; //$NON-NLS-1$ + + public String ABS = "ABS"; //$NON-NLS-1$ + public String DEC = "DEC"; //$NON-NLS-1$ + public String INC = "INC"; //$NON-NLS-1$ + public String INCL = "INCL"; //$NON-NLS-1$ + public String EXCL = "EXCL"; //$NON-NLS-1$ + public String HALT = "HALT"; //$NON-NLS-1$ + public String ASSERT = "ASSERT"; //$NON-NLS-1$ + public String COPY = "COPY"; //$NON-NLS-1$ + public String RESIZE = "RESIZE"; //$NON-NLS-1$ + public String CAP = "CAP"; //$NON-NLS-1$ + public String CHR = "CHR"; //$NON-NLS-1$ + public String FLOAT = "FLOAT"; //$NON-NLS-1$ + public String HIGH = "HIGH"; //$NON-NLS-1$ + public String PROT = "PROT"; //$NON-NLS-1$ + public String LFLOAT = "LFLOAT"; //$NON-NLS-1$ + public String CMPLX = "CMPLX"; //$NON-NLS-1$ + public String IM = "IM"; //$NON-NLS-1$ + public String RE = "RE"; //$NON-NLS-1$ + public String MAX = "MAX"; //$NON-NLS-1$ + public String MIN = "MIN"; //$NON-NLS-1$ + public String ODD = "ODD"; //$NON-NLS-1$ + public String ORD = "ORD"; //$NON-NLS-1$ + public String SIZE = "SIZE"; //$NON-NLS-1$ + public String TRUNC = "TRUNC"; //$NON-NLS-1$ + public String LENGTH = "LENGTH"; //$NON-NLS-1$ + public String ASH = "ASH"; //$NON-NLS-1$ + public String LEN = "LEN"; //$NON-NLS-1$ + public String ENTIER = "ENTIER"; //$NON-NLS-1$ + public String LONG = "LONG"; //$NON-NLS-1$ + public String SHORT = "SHORT"; //$NON-NLS-1$ + public String FieldOfs = "FieldOfs"; //$NON-NLS-1$ + + + Set STANDART_MODULE_SET = new HashSet(Arrays.asList( + SYSTEM, + COMPILER + )); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSymbolParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSymbolParser.java new file mode 100644 index 0000000..17b7682 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsSymbolParser.java @@ -0,0 +1,1569 @@ +package com.excelsior.xds.parser.modula; + +import static com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory.createStaticRef; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.EnumSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.apache.commons.lang.ObjectUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.Assert; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.sdk.XdsOptions; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.core.utils.collections.Pair; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.symbol.IMutableBlockSymbolTextBinding; +import com.excelsior.xds.parser.internal.modula.nls.XdsMessages; +import com.excelsior.xds.parser.internal.modula.symbol.ConstantSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.DefinitionModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.EnumElementSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.FinallyBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.FormalParameterSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ImplementationModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.LocalModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.MainModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ModulaSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ModuleAliasSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ModuleBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodDeclarationSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodDefinitionSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.OberonMethodReceiverSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureBodySymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureDeclarationSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProcedureDefinitionSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ProgramModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.RecordFieldSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.RecordVariantSelectorSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.StandardModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.UnknownModulaSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.UnresovedModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.VariableSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.WithStatementScope; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceResolver; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.reference.InternalReferenceUtils; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceLocation; +import com.excelsior.xds.parser.internal.modula.symbol.type.ArrayTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.EnumTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.EnumTypeSynonymSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ForwardTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ForwardTypeSynonymSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.OberonMethodTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.OpenArrayTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.PointerTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.RecordTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.SetTypeSymbol; +import com.excelsior.xds.parser.modula.ast.AstBody; +import com.excelsior.xds.parser.modula.ast.AstSimpleName; +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.types.AstPointerType; +import com.excelsior.xds.parser.modula.symbol.IBlockBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureBodySymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDeclarations; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithDefinitions; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithProcedures; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithType; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.SymbolAttribute; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.ModulaSymbolCache; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.IProxyReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; + +/** + * The parser layer to perform verification of compatibility rules and + * manipulate IModulaSymbol. + */ +public class XdsSymbolParser extends XdsPragmaParser +{ + // used for unit tests + public static final String REFERENCE_IS_RESOLVED_INCORRECTLY_MSG_BASE = "Reference is resolved incorrectly"; //$NON-NLS-1$ + + private static final String REFERENCE_IS_RESOLVED_INCORRECTLY_MSG_DETAILS = " \n%s\nexpected: %s\nresolved: %s\n"; //$NON-NLS-1$ + + /** Initial XDS compiler settings. They are used to parse imported modules. */ + private final BuildSettings buildSettings; + + private final IImportResolver importResolver; + + /** Current module is a definition module. */ + protected boolean isDefinitionModule; + + /** The top level module is being parsed. */ + protected IModuleSymbol hostModuleSymbol; + + /** Number of anonymous symbol to resolve collision of anonymous names */ + private int anonymousSymbolNumber; + + /** Number of symbol collisions to resolve collision of names */ + private int symbolCollisionNumber; + + private final List foreignEnumTypeSynonyms; + + private List declaredSymbols = new ArrayList(); + + private List> symbolReferences = new ArrayList>(); + + protected IReferenceFactory refFactory = new LocalReferenceFactory(); + + public XdsSymbolParser( IFileStore sourceFile, CharSequence chars + , XdsSettings xdsSettings + , IImportResolver importResolver + , IParserEventListener reporter + , IXdsParserMonitor monitor ) + { + super(sourceFile, chars, xdsSettings, reporter); + this.foreignEnumTypeSynonyms = new ArrayList(4); + /** Initial XDS compiler settings. They are used to parse imported modules. */ + this.buildSettings = xdsSettings.getSettings(); + this.importResolver = importResolver; + } + + /** + * {@inheritDoc} + */ + @Override + protected void reset() { + super.reset(); + anonymousSymbolNumber = 0; + symbolCollisionNumber = 0; + hostModuleSymbol = null; + foreignEnumTypeSynonyms.clear(); + declaredSymbols.clear(); + symbolReferences.clear(); + } + + /** + * Finalize construction of the parsed top level module. + * Definition module exports enumeration type elements of synonyms to foreign + * enumeration types. It is a feature of XDS sym-file reader. + */ + protected void finalizeHostModule() { + if (isDefinitionModule) { + for (IEnumTypeSymbol typeSymbol : foreignEnumTypeSynonyms) { + addEnumConstants(hostModuleSymbol, typeSymbol); + } + } + + IReferenceResolver referenceResolver = InternalReferenceUtils.getReferenceResolver(hostModuleSymbol); + if (referenceResolver != null) { + for (IModulaSymbol symbol : declaredSymbols) { + ReferenceLocation referenceLocation = referenceResolver.createReferenceLocation(symbol); + IModulaSymbol resolvedSymbol = referenceResolver.resolve(referenceLocation); + if ((resolvedSymbol != null) & (symbol != resolvedSymbol)) { + markAsAlreadyDefined(symbol); + } + + InternalReferenceUtils.addSymbolForResolving(hostModuleSymbol, symbol); + } + } + } + + + /** + * Checks that a symbol is defined outside of the parsed module or its local modules. + * + * @param symbol, a symbol to be checked + * + * @return @true if symbol is defined inside given module. + */ + protected boolean isForeignSymbol(IModulaSymbol symbol) { + return !ModulaSymbolUtils.isSymbolFromModule(hostModuleSymbol, symbol); + } + + + /** + * Returns language of the current module. + */ + protected XdsLanguage getModuleLaguage() { + XdsLanguage moduleLanguage = XdsLanguage.Modula2; + if (hostModuleSymbol != null) { + moduleLanguage = hostModuleSymbol.getLanguage(); + } + else if (settings.isOberon()) { + moduleLanguage = XdsLanguage.Oberon2; + } + return moduleLanguage; + } + + /** + * Returns symbol from the standard module: super and SYSTEM module. + */ + protected IModulaSymbol getStandardSymbol(String name) { + IModulaSymbol symbol = null; + StandardModuleSymbol moduleSymbol = ModulaSymbolCache.getSuperModule(getModuleLaguage()); + symbol = moduleSymbol.resolveName(name); + if (symbol == null) { + moduleSymbol = ModulaSymbolCache.getSystemModule(getModuleLaguage()); + symbol = moduleSymbol.resolveName(name); + } + return symbol; + } + + /** + * Returns symbol from the standard module: super and SYSTEM module in the type-safe way. + */ + @SuppressWarnings("unchecked") + protected T getStandardSymbol(String name, Class targetClass) + { + IModulaSymbol symbol = getStandardSymbol(name); + if ((symbol != null) && targetClass.isAssignableFrom(symbol.getClass())) { + return (T)symbol; + } + return null; + } + + protected String createAnonymousName( String hostName, String qualifier + , ISymbolWithScope parentScope ) + { + String name; + if (hostName != null) { + name = hostName; + } + else { + name = parentScope.getName() + IModulaSymbol.ANONYMOUS_NAME_TAG; + } + name += IModulaSymbol.ANONYMOUS_NAME_TAG + qualifier; + + if (parentScope.findSymbolInScope(name) != null) { + anonymousSymbolNumber++; + name = name + anonymousSymbolNumber; + } + return name; + } + + + protected void markAsAlreadyDefined(IModulaSymbol symbol) { + symbol.addAttribute(SymbolAttribute.ALREADY_DEFINED); + if (symbol instanceof ModulaSymbol) { + symbolCollisionNumber++; + ((ModulaSymbol)symbol).setNameCollosionId(symbolCollisionNumber); + } + } + + + + /** + * Generates unique anonymous name, if the given one is null. + * + * @param name - original name, my be null. + * @param hostName - the name of host symbol, my be null, used to construct name of anonymous type. + * @param qualifier - suffix to construct anonymous name, must not be null + * @param parentScope - parent scope to check unique of anonymous name + * + * @return original or generated unique name. + */ + protected String generateNameIfNull( String name, String hostName, String qualifier + , ISymbolWithScope parentScope ) + { + if (name == null) { + name = createAnonymousName(hostName, qualifier, parentScope); + } +// if (name == null) { +// anonymousEntityNumber++; +// name = parentScope.getName() + "_" + qualifier //$NON-NLS-1$ +// + IModulaSymbol.ANONYMOUS_NAME_TAG +// + anonymousEntityNumber; +// } + return name; + } + + + /** + * Adds enumeration type elements as constants to the given scope. + * Elements of enumeration types will be added to the scope, + * if such identifier was not already registered. + * + * @param destinationScope - scope to be updated + * @param typeSymbol - enumeration type to be processed. + */ + private void addEnumConstants( ISymbolWithDefinitions destinationScope + , IEnumTypeSymbol typeSymbol ) + { + Collection elements = typeSymbol.getElements(); + for (IEnumElementSymbol element : elements) { + // Elements of enumeration types should be imported in the module scope + // if such identifier was not already registered. + boolean alreadyDefined = destinationScope.findSymbolInScope(element.getName()) != null; + if (! alreadyDefined) { + destinationScope.addEnumElements(element); + } + } + } + + /** + * Adds enumeration type elements from synonym declaration of enumeration type, + * if it is required. + * + * @param destinationScope - scope to be updated + * @param typeSymbol - enumeration type to be processed. + */ + protected void processEnumTypeSynonymDeclaration( ISymbolWithDefinitions destinationScope + , EnumTypeSynonymSymbol typeSymbol ) + { + if (isForeignSymbol(typeSymbol.getOriginalSymbol())) { + if (settings.topSpeedExtensions()) { + addEnumConstants(destinationScope, typeSymbol); + } + else if (isDefinitionModule) { + foreignEnumTypeSynonyms.add(typeSymbol); + } + } + } + + + /** + * Returns the nearest parent scope with symbol definitions ability. + */ + protected static ISymbolWithDefinitions getParentScopeWithSymbolDefinitions(ISymbolWithScope parentSymbol) + { + do { + if (parentSymbol instanceof ISymbolWithDefinitions) { + return (ISymbolWithDefinitions) parentSymbol; + } + parentSymbol = parentSymbol.getParentScope(); + } while (parentSymbol != null); + return null; + } + + /** + * Adds symbol to the import slot of the module's symbol. + * + * @param importedSymbol - symbol to be added to the import slot. + * @param moduleSymbol - scope to be updated + */ + protected void addImport(IModulaSymbol importedSymbol, IModuleSymbol moduleSymbol) + { + boolean alreadyDefined = checkSymbolAlreadyDefined(importedSymbol, moduleSymbol); + if (! alreadyDefined) { + moduleSymbol.addImport(createRef(importedSymbol)); + if (importedSymbol instanceof IEnumTypeSymbol) { + IEnumTypeSymbol enumTypeSymbol = (IEnumTypeSymbol)importedSymbol; + Collection elements = enumTypeSymbol.getElements(); + for (IEnumElementSymbol element : elements) { + // Elements of enumeration types should be imported in the module scope + // if such identifier was not already registered. + alreadyDefined = moduleSymbol.findSymbolInScope(element.getName()) != null; + if (! alreadyDefined) { + moduleSymbol.addImport(createRef((IModulaSymbol)element)); + } + } + } + } + } + + /** + * Appends the current token position to the list of usages of the specified symbol. + * + * @param symbol the symbol with which the specified position is to be associated. + */ + protected void addSymbolUsage(IModulaSymbol symbol) { + addSymbolUsage(symbol, getTokenPosition()); + } + + /** + * Appends the specified position to the list of usages of the specified symbol. + * + * @param symbol the symbol with which the specified position is to be associated. + * @param usagePosition position to be associated with the specified symbol. + */ + protected void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition) { + if (symbol != null) { + hostModuleSymbol.addSymbolUsage(symbol, usagePosition); + } + } + + + protected void addSymbolForResolving(IModulaSymbol symbol) { + if (symbol != null) { + declaredSymbols.add(symbol); + } + } + + + protected IModuleSymbol resolveModuleSymbol( String moduleName + , XdsLanguage language + , IXdsParserMonitor monitor ) + { + IModuleSymbol moduleSymbol = importResolver.resolveModuleSymbol(language, moduleName, sourceFile); + return moduleSymbol; + } + + /** + * @param parentSymbol current module + * @param importedModuleName - name of imported module + * @param monitor - handler of parsing events + * @return symbol of imported module, or null if module was not found + */ + protected IModuleSymbol resolveImport( IModuleSymbol parentSymbol + , String importedModuleName + , IXdsParserMonitor monitor ) + { + IModuleSymbol moduleSymbol = null; + if (parentSymbol.getName().equals(importedModuleName)) { + error(XdsMessages.RecursiveImportDisabled); + } + else { + XdsLanguage language = parentSymbol.getLanguage(); + moduleSymbol = resolveModuleSymbol(importedModuleName, language, monitor); + if (moduleSymbol == null) { + error(XdsMessages.UnresolvedModuleName, importedModuleName); + moduleSymbol = new UnresovedModuleSymbol(importedModuleName, language); + setSymbolCurrentPosition(moduleSymbol); + } + else if (moduleSymbol.getLanguage() == XdsLanguage.Oberon2) { + } + } + return moduleSymbol; + } + + + /** + * Exports symbols from local module to the parent scope. + * + * @param localModuleSymbol + * @param exportedIdentifiers identifiers to be exported + */ + protected void processLocalModuleExport( LocalModuleSymbol localModuleSymbol + , Map> exportedIdentifiers ) + { + for (Entry> exportedIdentifierEntry : exportedIdentifiers.entrySet()) { + String identifier = exportedIdentifierEntry.getKey(); + AstSimpleName identifierAst = exportedIdentifierEntry.getValue().getFirst(); + TextPosition position = exportedIdentifierEntry.getValue().getSecond(); + IModulaSymbol exportedSymbol = localModuleSymbol.findSymbolInScope(identifier); + if (exportedSymbol != null) { + exportedSymbol.addAttribute(SymbolAttribute.EXPORTED); + localModuleSymbol.addSymbolInExport(exportedSymbol); + addSymbolUsage(exportedSymbol, position); + + setAstSymbol(identifierAst, exportedSymbol); + + if (exportedSymbol instanceof IEnumTypeSymbol) { + // Elements of enumeration types should be exported in the module scope + // if such identifier was not already registered. + IEnumTypeSymbol enumTypeSymbol = (IEnumTypeSymbol)exportedSymbol; + Collection elements = enumTypeSymbol.getElements(); + for (IEnumElementSymbol element : elements) { + element.addAttribute(SymbolAttribute.EXPORTED); + localModuleSymbol.addSymbolInExport(element); + } + } + } + else { + error(XdsMessages.UnsatisfiedExportedObject, identifier); + } + } + } + + protected void replaceForwardTypeSymbol( IForwardTypeSymbol forwardTypeSymbol + , ITypeSymbol actualTypesymbol ) + { + if (forwardTypeSymbol instanceof ForwardTypeSynonymSymbol) { + actualTypesymbol = actualTypesymbol.createSynonym( actualTypesymbol.getName() + , actualTypesymbol.getParentScope(), refFactory ); + } + + Collection usagesInSymbols = forwardTypeSymbol.getUsages(); + for (IModulaSymbol usage : usagesInSymbols) { + if (usage instanceof PointerTypeSymbol) { + setBoundTypeSymbol((PointerTypeSymbol)usage, actualTypesymbol); + } + else if (usage instanceof VariableSymbol) { + setTypeSymbol((VariableSymbol)usage, actualTypesymbol); + } + else if (usage instanceof FormalParameterSymbol) { + setTypeSymbol((FormalParameterSymbol)usage, actualTypesymbol); + } + else if (usage instanceof ForwardTypeSynonymSymbol) { + replaceForwardTypeSymbol((ForwardTypeSynonymSymbol)usage, actualTypesymbol); + } + } + + Collection usagesInText = hostModuleSymbol.getSymbolUsages(forwardTypeSymbol); + if (usagesInText != null) { + for (TextPosition tokenPosition : usagesInText) { + addSymbolUsage(actualTypesymbol, tokenPosition); + } + } + + forwardTypeSymbol.releaseUsages(); + } + + + protected IForwardTypeSymbol createAndRegisterForwardType( String name + , ISymbolWithScope parentScope ) + { + IModulaSymbolScope scope = parentScope; + while (scope instanceof IRecordTypeSymbol) { + scope = scope.getParentScope(); + } + + IForwardTypeSymbol typeSymbol = new ForwardTypeSymbol(name, parentScope); + if (scope instanceof ISymbolWithDefinitions) { + ((ISymbolWithDefinitions)scope).addType(typeSymbol); + } + + return typeSymbol; + } + + + + /** + * This routine must be called only when parsing program module + */ + protected void registerProcedureForwardDeclarationSymbol( ProcedureDefinitionSymbol procDefSymbol + , TextPosition position + , IModulaSymbol symbolInScope + , ISymbolWithProcedures parentSymbol ) + { + if (symbolInScope == null) { + // it is the first FORWARD procedure declaration + ProcedureDeclarationSymbol procDeclSymbol = + new ProcedureDeclarationSymbol(procDefSymbol, parentSymbol); + setSymbolPosition(procDeclSymbol, position); + parentSymbol.addProcedure(procDeclSymbol); + } + else if (symbolInScope instanceof ProcedureDeclarationSymbol) { + // it seems that 'symbolInScope' is the FORWARD procedure declaration + ProcedureDeclarationSymbol procDeclSymbol = ((ProcedureDeclarationSymbol)symbolInScope); + if (procDeclSymbol.isForwardDeclaration()) { + // TODO check procedure signature + procDeclSymbol.addForwardDeclaration(createStaticRef(procDefSymbol)); + } + else { + errorIdentifierAlreadyDefined(symbolInScope); + } + } + else if (symbolInScope instanceof ProcedureDefinitionSymbol) { + if (isForeignSymbol(symbolInScope)) { + // it is the first FORWARD procedure declaration. + // 'symbolInScope' comes from definition module + // FORWARD procedure declaration is redundant + // TODO check procedure signature + ProcedureDeclarationSymbol procDeclSymbol = + new ProcedureDeclarationSymbol(procDefSymbol, parentSymbol); + setSymbolPosition(procDeclSymbol, position); + parentSymbol.addProcedure(procDeclSymbol); + + procDefSymbol.addAttributes(symbolInScope.getAttributes()); + procDeclSymbol.addAttributes(symbolInScope.getAttributes()); + procDeclSymbol.setDefinitionSymbol(createRef((IProcedureDefinitionSymbol)symbolInScope)); + + ((ProcedureDefinitionSymbol)symbolInScope).setDeclarationSymbol(createRef((IProcedureDeclarationSymbol)procDeclSymbol)); + } + } + } + + /** + * This routine must be called only when parsing program module + */ + protected void registerOberonMethodForwardDeclarationSymbol( OberonMethodDefinitionSymbol procDefSymbol + , TextPosition position + , IModulaSymbol symbolInScope + , IRecordTypeSymbol typeBoundSymbol + , ISymbolWithProcedures parentSymbol ) + { + if (symbolInScope == null) { + // this it the first FORWARD procedure declaration + OberonMethodDeclarationSymbol procDeclSymbol = + new OberonMethodDeclarationSymbol(procDefSymbol, parentSymbol); + setSymbolPosition(procDeclSymbol, position); + if (typeBoundSymbol != null) { + typeBoundSymbol.addProcedure(procDeclSymbol); + } + } + else if (symbolInScope instanceof OberonMethodDeclarationSymbol) { + // it seems that 'symbolInScope' is the FORWARD procedure declaration + OberonMethodDeclarationSymbol procDeclSymbol = ((OberonMethodDeclarationSymbol)symbolInScope); + if (procDeclSymbol.isForwardDeclaration()) { + // TODO check procedure signature + procDeclSymbol.addForwardDeclaration(createStaticRef((ProcedureDefinitionSymbol)procDefSymbol)); + } + else { + errorIdentifierAlreadyDefined(symbolInScope); + } + } + } + + + /** + * Called for procedures with body only. + * + * @param typeSymbol - type symbol of currently parsed procedure + * @param symbolInScope - symbol with the same name as procHeaderSymbol.getName() + * @param parentSymbol - procedure or module symbol + * @return + */ + protected ProcedureDeclarationSymbol provideProcedureDeclarationSymbol + ( String procedureName + , TextPosition position + , ProcedureTypeSymbol typeSymbol + , IModulaSymbol symbolInScope + , ISymbolWithProcedures parentSymbol ) + { + ProcedureDeclarationSymbol procDeclSymbol; + + if (symbolInScope instanceof ProcedureDeclarationSymbol) { + // it seems that 'symbolInScope' is the FORWARD procedure declaration + procDeclSymbol = ((ProcedureDeclarationSymbol) symbolInScope); + if (procDeclSymbol.isForwardDeclaration()) { + // TODO check procedure signature + procDeclSymbol.finalizeDeclaration(createRef(typeSymbol)); + } + else { + errorIdentifierAlreadyDefined(symbolInScope, position); + markAsAlreadyDefined(typeSymbol); + procDeclSymbol = new ProcedureDeclarationSymbol( + procedureName, createRef(typeSymbol), parentSymbol + ); + markAsAlreadyDefined(procDeclSymbol); + } + } + else { + // 'symbolInScope' is null or non procedure declaration symbol (the latter case is already reported) + procDeclSymbol = new ProcedureDeclarationSymbol( + procedureName, createRef(typeSymbol), parentSymbol + ); + if (isDefinitionModule) { + // we are in the definition module + error(XdsMessages.NotAllowedInDefinitionModule); + } + else { + // we are in the implementation module + if (symbolInScope == null) { + parentSymbol.addProcedure(procDeclSymbol); + } + else if (symbolInScope instanceof ProcedureDefinitionSymbol) { + // it seems that 'symbolInScope' comes from definition module + // TODO check procedure signature + ProcedureDefinitionSymbol definitionSymbol = ((ProcedureDefinitionSymbol)symbolInScope); + procDeclSymbol.addAttributes(definitionSymbol.getAttributes()); + definitionSymbol.setDeclarationSymbol(createRef((IProcedureDeclarationSymbol)procDeclSymbol)); + procDeclSymbol.setDefinitionSymbol(createRef((IProcedureDefinitionSymbol)definitionSymbol)); + parentSymbol.addProcedure(procDeclSymbol); + } + } + } + + return procDeclSymbol; + } + + + /** + * Called for procedures with body only. + * + * @param typeSymbol - currently parsed procedure + * @param symbolInScope - symbol with the same name as procHeaderSymbol.getName() + * @param scope - parent procedure or module symbol + * @return + */ + protected OberonMethodDeclarationSymbol provideOberonMethodDeclarationSymbol + ( String procedureName + , TextPosition procedurePosition + , OberonMethodTypeSymbol typeSymbol + , IModulaSymbol symbolInScope + , IRecordTypeSymbol typeBoundSymbol + , ISymbolWithProcedures scope ) + { + OberonMethodDeclarationSymbol procDeclSymbol; + + if (symbolInScope instanceof OberonMethodDeclarationSymbol) { + // it seems that 'symbolInScope' is the FORWARD procedure declaration + procDeclSymbol = ((OberonMethodDeclarationSymbol) symbolInScope); + if (procDeclSymbol.isForwardDeclaration()) { + // TODO check procedure signature + procDeclSymbol.finalizeDeclaration(createRef((ProcedureTypeSymbol)typeSymbol)); + } + else { + errorIdentifierAlreadyDefined(symbolInScope, procedurePosition); + markAsAlreadyDefined(typeSymbol); + procDeclSymbol = new OberonMethodDeclarationSymbol( + procedureName, createRef((ProcedureTypeSymbol)typeSymbol), scope + ); + markAsAlreadyDefined(procDeclSymbol); + } + } + else { + // 'symbolInScope' is null or non procedure declaration symbol (the latter case is already reported) + procDeclSymbol = new OberonMethodDeclarationSymbol( + procedureName, createRef((ProcedureTypeSymbol)typeSymbol), scope + ); + if (symbolInScope == null) { + if (typeBoundSymbol != null) { + typeBoundSymbol.addProcedure(procDeclSymbol); + } + } + } + + return procDeclSymbol; + } + + + + /** + * Verifies whether a symbol was already defined in the given scope. + * The error be reported if symbol was already defined. + */ + protected boolean checkSymbolAlreadyDefined( IModulaSymbol symbol + , ISymbolWithScope parentScope ) + { + if (symbol != null) { + return checkSymbolAlreadyDefined(symbol.getName(), parentScope); + } + return true; // may be it prevent parser for other manipulation with null. + } + + + /** + * Verifies whether a symbol with this name was already defined in the given scope. + * The error be reported if symbol with this name was already defined. + */ + protected boolean checkSymbolAlreadyDefined( String symbolName + , ISymbolWithScope parentScope ) + { + IModulaSymbol symbolInScope = parentScope.findSymbolInScope(symbolName); + boolean alreadyDefined = (symbolInScope != null); + if (alreadyDefined) { + errorIdentifierAlreadyDefined(symbolInScope); + } + return alreadyDefined; + } + + + /** + * Verifies whether a symbol with this name was already defined in + * the current declaration statement or in the given scope. + * The error be reported if symbol with this name was already defined. + */ + protected boolean checkSymbolAlreadyDefined( String symbolName + , ISymbolWithScope parentScope + , List symbolsInDeclaration ) + { + for (IModulaSymbol declaredSymbol : symbolsInDeclaration) { + if (symbolName.equals(declaredSymbol.getName())) { + errorIdentifierAlreadyDefined(declaredSymbol); + return true; + } + } + return checkSymbolAlreadyDefined(symbolName, parentScope); + } + + + /** + * Casts the type symbol to the IOrdinalTypeSymbol and reports + * a error if it is impossible. + * + * @param typeSymbol - symbol to be verified + * + * @return IOrdinalTypeSymbol or null + */ + protected IOrdinalTypeSymbol checkOrdinalTypeSymbol(ITypeSymbol typeSymbol) { + if (typeSymbol instanceof IOrdinalTypeSymbol) { + return (IOrdinalTypeSymbol)typeSymbol; + } + else { + error(XdsMessages.ExpectedOrdinalType); + return null; + } + } + + /** + * Verifies and reports the presence of initialization problem of imported module. + */ + protected void checkImport( IModuleSymbol currentModuleSymbol + , IModuleSymbol importedModule ) + { + boolean raiseModuleInitIssue = ! currentModuleSymbol.hasConstructor() + && (importedModule != null) + && importedModule.hasConstructor(); + if (raiseModuleInitIssue) { + warning(XdsMessages.ModuleConstructorWillNotBeInvoked, importedModule.getName()); + } + } + + + protected ITypeSymbol getSymbolType(IModulaSymbol symbol) { + ITypeSymbol typeSymbol = null; + + if (!(symbol instanceof IInvalidModulaSymbol)) { + if (symbol instanceof ITypeSymbol) { + typeSymbol = (ITypeSymbol)symbol; + } + else if (symbol instanceof ISymbolWithType) { + typeSymbol = ((ISymbolWithType)symbol).getTypeSymbol(); + } + } + + return typeSymbol; + } + + + protected IModulaSymbol makeAutoDereference(IModulaSymbol symbol) { + ITypeSymbol typeSymbol = getSymbolType(symbol); + boolean isDerefenceRequired = (typeSymbol instanceof IPointerTypeSymbol) + || (typeSymbol instanceof IOpaqueTypeSymbol); + if (isDerefenceRequired) { + symbol = makeDereference(symbol); + } + return symbol; + } + + protected ITypeSymbol makeDereference(IModulaSymbol symbol) { + ITypeSymbol referedSymbol = null; + if ((symbol != null) && !(symbol instanceof IInvalidModulaSymbol)) { + ITypeSymbol typeSymbol = getSymbolType(symbol); + if (typeSymbol instanceof IPointerTypeSymbol) { +//TODO Check that this pointer is not a forward type, error 97 + referedSymbol = ((IPointerTypeSymbol)typeSymbol).getBoundTypeSymbol(); + } + else { +//TODO support of expressions is required +// error(XdsMessages.ObjectIsNotPointer); + } + } + return referedSymbol; + } + + + protected IModulaSymbol makeAccess(IModulaSymbol symbol, String accessedName) { + IModulaSymbol accessedSymbol = null; + + ITypeSymbol typeSymbol = getSymbolType(symbol); + if ((typeSymbol != null) && !(typeSymbol instanceof IInvalidModulaSymbol)) { + if (typeSymbol instanceof IRecordTypeSymbol) { + accessedSymbol = ((IRecordTypeSymbol)typeSymbol).resolveName(accessedName); + if (accessedSymbol != null) { +//TODO check PUBLIC attribute for symbols from foreign modules. + } + else { +//TODO support of expressions is required +// error(XdsMessages.UndeclaredIdentifier, accessedName); + } + } + else { +//TODO support of expressions is required +// error(XdsMessages.ObjectIsNotRecord); + } + } + + return accessedSymbol; + } + + + protected ITypeSymbol makeIndex(IModulaSymbol symbol) { + ITypeSymbol elementTypeSymbol = null; + + ITypeSymbol typeSymbol = getSymbolType(symbol); + if ((typeSymbol != null) && !(typeSymbol instanceof IInvalidModulaSymbol)) { + if (typeSymbol instanceof IArrayTypeSymbol) { +//TODO check index type compatibility. + elementTypeSymbol = ((IArrayTypeSymbol)typeSymbol).getElementTypeSymbol(); + } + else { +//TODO support of expressions is required +// error(XdsMessages.ObjectIsNotArray); + } + } + + return elementTypeSymbol; + } + + + /** + * Appends the text region to the collection of symbol name regions. + */ + protected void addNameRegion( IMutableBlockSymbolTextBinding symbol + , String name, TextPosition position ) + { + if ((symbol != null) && (position != null) && StringUtils.isNotEmpty(name)) + { + ITextRegion region = new TextRegion(position.getOffset(), name.length()); + symbol.addNameTextRegion(region); + } + } + + + /** + * Sets position in which symbol is defined. + * + * @param symbol symbol to be updated + * @param position position of symbol's name + */ + protected void setSymbolPosition(IModulaSymbol symbol, TextPosition position) { + if (symbol instanceof ModulaSymbol) { + ((ModulaSymbol) symbol).setPosition(position); + } + } + + /** + * Sets the current position of token as position in which symbol is defined. + * + * @param symbol symbol to be updated + */ + protected void setSymbolCurrentPosition(IModulaSymbol symbol) { + setSymbolPosition(symbol, getTokenPosition()); + } + + + protected void setAstSymbol(AstSymbolRef nodeAst, T symbol) { + if (nodeAst != null) { + nodeAst.setSymbol(createRef(symbol)); + } + } + + protected void setAstSymbol(AstBody nodeAst, T symbol) { + if (nodeAst != null) { + nodeAst.setSymbol(symbol); + } + } + + + protected void setTypeSymbol(VariableSymbol variableSymbol, ITypeSymbol typeSymbol) { + variableSymbol.setTypeSymbol(createRef(typeSymbol)); + if (typeSymbol instanceof IForwardTypeSymbol) { + ((IForwardTypeSymbol)typeSymbol).addUsage(variableSymbol); + } + } + + protected void setTypeSymbol(FormalParameterSymbol parameterSymbol, ITypeSymbol typeSymbol) { + parameterSymbol.setTypeSymbol(createRef(typeSymbol)); + if (typeSymbol instanceof IForwardTypeSymbol) { + ((IForwardTypeSymbol)typeSymbol).addUsage(parameterSymbol); + } + } + + protected void setBoundTypeSymbol(PointerTypeSymbol pointerTypeSymbol, ITypeSymbol typeSymbol) { + pointerTypeSymbol.setBoundType(createRef(typeSymbol)); + if (typeSymbol instanceof IForwardTypeSymbol) { + ((IForwardTypeSymbol)typeSymbol).addUsage(pointerTypeSymbol); + } + } + + + /** + * Searches for symbol in the given scope, and (recursively) in all parent scopes. + * Reports the "undeclared identifier" error if there is no symbol with specified name. + * + * @param symbolName the name of symbol which is to be searched + * @param parentScope - scope to be used to search the symbol + * @return the first symbol with specified name in this and parent scope, or + * {@code null} if there is no symbol with specified name. + */ + protected IModulaSymbol resolveName(String symbolName, IModulaSymbolScope parentScope) + { + IModulaSymbol symbol = parentScope.resolveName(symbolName); + if (symbol == null) { + error(XdsMessages.UndeclaredIdentifier, symbolName); + } + return symbol; + } + + /** + * Searches for FOR-loop control variable in the given scope, and (recursively) + * in all parent scopes and verifies its correctness. + * + * @param name the name of FOR-loop control variable which is to be searched + * @param parentScope - scope to be used to search the FOR-loop control variable + * @return the first symbol with specified name in this and parent scope, or + * {@code null} if there is no symbol with specified name. + */ + protected IModulaSymbol resolveForLoopControlVariable( String name + , IModulaSymbolScope parentScope ) + { + IModulaSymbol controlVariableSymbol = resolveName(name, parentScope); + if (controlVariableSymbol != null) { + while (parentScope instanceof WithStatementScope) { + parentScope = parentScope.getParentScope(); + } + if (controlVariableSymbol instanceof IFormalParameterSymbol) { + error(XdsMessages.ForLoopControlVariableMustNotBeFormalParameter); + } + else if (!(controlVariableSymbol instanceof IVariableSymbol)) { + error(XdsMessages.ObjectIsNotVariable); + } + else if (parentScope != controlVariableSymbol.getParentScope()) { + error(XdsMessages.ForLoopControlVariableMustBeLocal); + } + else if (controlVariableSymbol.isAttributeSet(SymbolAttribute.EXPORTED)) { + error(XdsMessages.ForLoopControlVariableCannotBeExported); + } + else if (controlVariableSymbol.isAttributeSet(SymbolAttribute.READ_ONLY)) { + error(XdsMessages.ReadOnlyDesignator); + } + else if (controlVariableSymbol.isAttributeSet(SymbolAttribute.VOLATILE)) { + error(XdsMessages.ControlVariableCannotBeVolatile); + } + + if (controlVariableSymbol instanceof IVariableSymbol) { + IVariableSymbol variableSymbol = ((IVariableSymbol)controlVariableSymbol); + checkOrdinalTypeSymbol(variableSymbol.getTypeSymbol()); + } + } + return controlVariableSymbol; + } + + /** + * Reports the current identifier is already defined for the given symbol. + * + * @param symbol already defined symbol + */ + protected void errorIdentifierAlreadyDefined (IModulaSymbol symbol) { + errorIdentifierAlreadyDefined(symbol, getTokenPosition()); + } + + + /** + * Reports the identifier is already defined for the given symbol. + * + * @param symbol the already defined symbol + * @param position the position of duplicated identifier + */ + protected void errorIdentifierAlreadyDefined( IModulaSymbol symbol + , TextPosition position ) + { + String moduleFileName = ""; + IFileStore sourceFileStore = ModulaSymbolUtils.getSourceFileStore(symbol); + if (sourceFileStore != null) { + moduleFileName = sourceFileStore.getName(); + } + + int line = 0; + int column = 0; + TextPosition symbolPosition = symbol.getPosition(); + if (symbolPosition != null) { + line = symbolPosition.getLine(); + column = symbolPosition.getColumn(); + } + String name = symbol.getName(); + error( position, name.length(), XdsMessages.IdentifierAlreadyDefined + , name, moduleFileName, line, column ); + } + + /** + * Checks and reports unresolved FORWARD declarations in the given scope. + * + * @param scope - scope to be verify + */ + protected void checkForwardSymbols(IModulaSymbolScope scope) + { + for (IModulaSymbol symbol : scope) { + if (symbol instanceof ProcedureDeclarationSymbol) { + ProcedureDeclarationSymbol procDecl = (ProcedureDeclarationSymbol)symbol; + if (procDecl.isForwardDeclaration()) { + String procName = procDecl.getName(); + error( procDecl.getPosition(), procName.length() + , XdsMessages.ProcedureNotImplemented, procName ); + procDecl.removeAttribute(SymbolAttribute.FORWARD_DECLARATION); + addSymbolForResolving(procDecl); + procDecl.addAttribute(SymbolAttribute.FORWARD_DECLARATION); + } + } + else if (symbol instanceof IForwardTypeSymbol) { + IForwardTypeSymbol forwardType = (IForwardTypeSymbol)symbol; + if (forwardType.getActualTypeSymbol() == null) { + String typeName = forwardType.getName(); + error( forwardType.getPosition(), typeName.length() + , XdsMessages.UnsatisfiedForwardType, typeName ); + } + } + else if (symbol instanceof IRecordTypeSymbol) { + IRecordTypeSymbol recordType = (IRecordTypeSymbol)symbol; + checkForwardSymbols(recordType); + } + } + } + + public static void clearGlobalTables() { + ModulaSymbolCache.instance().clear(); + } + + @SuppressWarnings("unchecked") + protected IModulaSymbolReference createRef(T symbol) { + IStaticModulaSymbolReference staticRef = ReferenceUtils.createStaticRef(symbol); + + IProxyReference ref = ReferenceFactory.createProxyRef(staticRef); + symbolReferences.add((IProxyReference) ref); + return ref; + } + + /** + * Replaces static reference to the symbols by the dynamic ones. + */ + protected void replaceStaticRefs() { + for (IProxyReference proxyRef : symbolReferences) { + Assert.isTrue(proxyRef.getReference() instanceof IStaticModulaSymbolReference); + + IModulaSymbol staticSymbol = proxyRef.resolve(); + IModulaSymbolReference dynamicRef = ReferenceFactory.createRef(staticSymbol); + proxyRef.setReference(dynamicRef); + + if (CHECK_REFERENCE_INTEGRITY) { + IModulaSymbol dynamicSymbol = ReferenceUtils.resolve(dynamicRef); + if (!(staticSymbol instanceof IInvalidModulaSymbol) && !ObjectUtils.equals(staticSymbol, dynamicSymbol)) { + System.out.println("-- staticSymbol: " + staticSymbol.getQualifiedName() ); + String message = String.format( + REFERENCE_IS_RESOLVED_INCORRECTLY_MSG_BASE + REFERENCE_IS_RESOLVED_INCORRECTLY_MSG_DETAILS, + dynamicRef, staticSymbol, dynamicSymbol + ); + error(staticSymbol.getPosition(), staticSymbol.getName().length(), message); + } + } + } + symbolReferences.clear(); + } + + protected void createHostModule( String moduleName + , boolean isImplementation + , XdsLanguage moduleLanguage + , IXdsParserMonitor parserMonitor + , TextPosition modulePosition ) + { + if (isDefinitionModule) { + hostModuleSymbol = new DefinitionModuleSymbol( + moduleName, moduleLanguage, importResolver.createModuleKey(sourceFile), buildSettings, sourceFile, settings.isOdfSource() + ); + } + else if (isImplementation) { + hostModuleSymbol = new ImplementationModuleSymbol(moduleName, moduleLanguage, importResolver.createModuleKey(sourceFile), buildSettings, sourceFile); + + IModuleSymbol definitionModuleSymbol = resolveModuleSymbol( + moduleName, moduleLanguage, parserMonitor + ); + if (definitionModuleSymbol instanceof DefinitionModuleSymbol) { + ImplementationModuleSymbol implementationModuleSymbol = ((ImplementationModuleSymbol)hostModuleSymbol); + implementationModuleSymbol.setDefinitionModule((DefinitionModuleSymbol)definitionModuleSymbol); + IModulaSymbolReference ref = createRef((IImplemantationModuleSymbol)implementationModuleSymbol); + ((DefinitionModuleSymbol)definitionModuleSymbol).setImplemantationModule(ref); + } + else { + error(XdsMessages.CannotFindDefinitionModule, moduleName); + } + } + else if (settings.isOberon()) { + if (settings.getOption(XdsOptions.MAIN)) { + hostModuleSymbol = new MainModuleSymbol(moduleName, moduleLanguage, importResolver.createModuleKey(sourceFile), buildSettings, sourceFile); + } + else { + hostModuleSymbol = new ProgramModuleSymbol(moduleName, moduleLanguage, importResolver.createModuleKey(sourceFile), buildSettings, sourceFile); + } + } + else { + hostModuleSymbol = new MainModuleSymbol(moduleName, moduleLanguage, importResolver.createModuleKey(sourceFile), buildSettings, sourceFile); + } + + setSymbolPosition(hostModuleSymbol, modulePosition); + if (settings.getOption(XdsOptions.NOMODULEINIT)) { + hostModuleSymbol.addAttribute(SymbolAttribute.NOMODULEINIT); + } + + if (hostModuleSymbol instanceof IMutableBlockSymbolTextBinding) { + if (StringUtils.isNotEmpty(moduleName)) { + ITextRegion region = new TextRegion(modulePosition.getOffset(), moduleName.length()); + ((IMutableBlockSymbolTextBinding)hostModuleSymbol).setNameTextRegion(region); + ((IMutableBlockSymbolTextBinding)hostModuleSymbol).addNameTextRegion(region); + } + } + } + + protected ModuleBodySymbol createModuleBodySymbol( ISymbolWithDefinitions parentScope + , String bodyName ) + { + ModuleBodySymbol bodySymbol = new ModuleBodySymbol(bodyName, parentScope); + if (parentScope instanceof ProgramModuleSymbol) { + ((ProgramModuleSymbol)parentScope).setModuleBodySymbol(bodySymbol); + } + return bodySymbol; + } + + protected ProcedureBodySymbol createProcedureBodySymbol( ISymbolWithDefinitions parentScope + , String bodyName ) + { + ProcedureBodySymbol bodySymbol = new ProcedureBodySymbol(bodyName, parentScope); + setSymbolCurrentPosition(bodySymbol); + if (parentScope instanceof ProcedureDeclarationSymbol) { + IModulaSymbolReference ref = createRef((IProcedureBodySymbol)bodySymbol); + ((ProcedureDeclarationSymbol)parentScope).setProcedureBodySymbol(ref); + } + return bodySymbol; + } + + protected FinallyBodySymbol createFinallyBodySymbol(ISymbolWithDefinitions parentScope) + { + FinallyBodySymbol bodySymbol = new FinallyBodySymbol( + FINALLY_KEYWORD.getDesignator(), parentScope + ); + if (parentScope instanceof ProgramModuleSymbol) { + ((ProgramModuleSymbol)parentScope).setFinallyBodySymbol(bodySymbol); + } + return bodySymbol; + } + + protected IModulaSymbolScope createWithStatementScope( IModulaSymbolScope parentScope + , IModulaSymbol recordDesignatorSymbol ) + { + ITypeSymbol recordTypeSymbol = getSymbolType(recordDesignatorSymbol); + if (recordTypeSymbol instanceof IRecordTypeSymbol) { + parentScope = new WithStatementScope(createRef((IRecordTypeSymbol)recordTypeSymbol), parentScope); + } + return parentScope; + } + + protected ConstantSymbol createConstantSymbol + ( ISymbolWithDefinitions parentScope + , String constantName ) + { + ConstantSymbol constantSymbol = new ConstantSymbol( + constantName, parentScope + ); + setSymbolCurrentPosition(constantSymbol); + return constantSymbol; + } + + protected VariableSymbol createVariableSymbol( String variableName + , ISymbolWithDefinitions scope ) + { + VariableSymbol variableSymbol = new VariableSymbol(variableName, scope); + setSymbolCurrentPosition(variableSymbol); + return variableSymbol; + } + + protected PointerTypeSymbol createPointerTypeSymbol( String typeName + , String hostName + , ISymbolWithScope parentScope + , AstPointerType typeAst) + { + String symbolTypeName = generateNameIfNull( + typeName, hostName, "PointerType", parentScope //$NON-NLS-1$ + ); + PointerTypeSymbol typeSymbol = new PointerTypeSymbol(symbolTypeName, parentScope); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected SetTypeSymbol createSetTypeSymbol( String typeName + , String hostName + , boolean isPacked + , ITypeSymbol baseTypeSymbol + , ISymbolWithScope parentScope ) + { + SetTypeSymbol typeSymbol = new SetTypeSymbol(typeName, parentScope, isPacked); + typeSymbol.setBaseTypeSymbol(checkOrdinalTypeSymbol(baseTypeSymbol)); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected IArrayTypeSymbol createOpenArrayTypeSymbol( String typeName + , String hostName + , ITypeSymbol elementTypeSymbol + , ISymbolWithScope parentScope ) + { + typeName = generateNameIfNull(typeName, hostName, "OpenArrayType", parentScope); //$NON-NLS-1$ + IArrayTypeSymbol typeSymbol = new OpenArrayTypeSymbol( + typeName, parentScope, getModuleLaguage(), createRef(elementTypeSymbol) + ); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected IArrayTypeSymbol createArrayTypeSymbol( String typeName + , String hostName + , ITypeSymbol elementTypeSymbol + , IOrdinalTypeSymbol indexTypeSymbol + , ISymbolWithScope parentScope ) + { + IArrayTypeSymbol typeSymbol; + typeName = generateNameIfNull(typeName, hostName, "ArrayType", parentScope); //$NON-NLS-1$ + typeSymbol = new ArrayTypeSymbol(typeName, parentScope, createRef(indexTypeSymbol), createRef(elementTypeSymbol)); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected RecordTypeSymbol createRecordTypeSymbol( String typeName + , String hostName + , IRecordTypeSymbol baseTypeSymbol + , String qualifier + , ISymbolWithScope parentScope ) + { + RecordTypeSymbol typeSymbol; + typeName = generateNameIfNull(typeName, hostName, qualifier, parentScope); //$NON-NLS-1$ + typeSymbol = new RecordTypeSymbol(typeName, createRef(baseTypeSymbol), parentScope); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected RecordVariantSelectorSymbol createRecordVariantSelectorSymbol + ( String name + , ITypeSymbol typeSymbol + , TextPosition position + , RecordTypeSymbol parentScope ) + { + RecordVariantSelectorSymbol selectorSymbol = new RecordVariantSelectorSymbol(name, parentScope); + setSymbolPosition(selectorSymbol, position); + if (isDefinitionModule) { + selectorSymbol.addAttribute(SymbolAttribute.PUBLIC); + } + selectorSymbol.setTypeSymbol(createStaticRef(typeSymbol)); + setSymbolCurrentPosition(selectorSymbol); + return selectorSymbol; + } + + protected RecordFieldSymbol createRecordFieldSymbol( String name + , IRecordTypeSymbol parentScope ) + { + RecordFieldSymbol fieldSymbol = new RecordFieldSymbol(name, parentScope); + setSymbolCurrentPosition(fieldSymbol); + return fieldSymbol; + } + + protected FormalParameterSymbol createFormalParameterSymbol + ( String name + , int number + , ITypeSymbol parameterTypeSymbol + , ProcedureTypeSymbol parentScope ) + { + FormalParameterSymbol parameterSymbol = new FormalParameterSymbol( + name, number, parentScope, createRef(parameterTypeSymbol) + ); + parentScope.addParameter(parameterSymbol); + setSymbolCurrentPosition(parameterSymbol); + return parameterSymbol; + } + + protected FormalParameterSymbol createFormalParameterSymbol + ( String name + , int number + , ProcedureTypeSymbol parentScope ) + { + FormalParameterSymbol parameterSymbol = new FormalParameterSymbol(name, number, parentScope); + setSymbolCurrentPosition(parameterSymbol); + return parameterSymbol; + } + + protected EnumElementSymbol createEnumElementSymbol( String elementName + , EnumTypeSymbol enumTypeSymbol ) + { + EnumElementSymbol enumElementSymbol = new EnumElementSymbol( + elementName, enumTypeSymbol.getParentScope(), + createRef((IEnumTypeSymbol)enumTypeSymbol), + enumTypeSymbol.getElementCount() + ); + setSymbolCurrentPosition(enumElementSymbol); + if (enumTypeSymbol.findSymbolInScope(elementName) == null) { + enumTypeSymbol.addElement(enumElementSymbol); + } + return enumElementSymbol; + } + + protected EnumTypeSymbol createEnumTypeSymbol( String typeName + , String hostName + , ISymbolWithScope parentScope ) + { + EnumTypeSymbol typeSymbol; + typeName = generateNameIfNull(typeName, hostName, "EnumType", parentScope); //$NON-NLS-1$ + typeSymbol = new EnumTypeSymbol(typeName, parentScope); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected LocalModuleSymbol createLocalModuleSymbol + ( String moduleName + , TextPosition modulePosition + , boolean alreadyDefined + , ISymbolWithDefinitions scope ) + { + LocalModuleSymbol localModuleSymbol = new LocalModuleSymbol(moduleName, scope); + setSymbolPosition(localModuleSymbol, modulePosition); + + if (!alreadyDefined && !StringUtils.isEmpty(moduleName)) { + if (scope instanceof ISymbolWithDeclarations) { + ((ISymbolWithDeclarations)scope).addLocalModule(localModuleSymbol); + } + } + + if (settings.getOption(XdsOptions.NOMODULEINIT)) { + localModuleSymbol.addAttribute(SymbolAttribute.NOMODULEINIT); + } + return localModuleSymbol; + } + + protected IOberonMethodReceiverSymbol createOberonMethodReceiverSymbol + ( String name + , TextPosition position + , boolean isVarInstance + , ITypeSymbol typeSymbol ) + { + IOberonMethodReceiverSymbol receiverSymbol = new OberonMethodReceiverSymbol( + name, null, createRef(typeSymbol) + ); + setSymbolPosition(receiverSymbol, position); + if (isVarInstance) { + receiverSymbol.addAttribute(SymbolAttribute.VAR_PARAMETER); + } + return receiverSymbol; + } + + protected OberonMethodDefinitionSymbol createOberonMethodDefinitionSymbol + ( String procedureName + , TextPosition position + , OberonMethodTypeSymbol procedureTypeSymbol + , ISymbolWithProcedures parentScope ) + { + OberonMethodDefinitionSymbol procedureDefSymbol; + procedureDefSymbol = new OberonMethodDefinitionSymbol( + procedureName, parentScope, + createStaticRef((ProcedureTypeSymbol)procedureTypeSymbol) + ); + setSymbolPosition(procedureDefSymbol, position); + return procedureDefSymbol; + } + + + protected OberonMethodReceiverSymbol recreateOberonMethodReceiverSymbol + ( IOberonMethodReceiverSymbol receiverSymbol + , OberonMethodTypeSymbol procedureTypeSymbol ) + { + OberonMethodReceiverSymbol newReceiverSymbol = new OberonMethodReceiverSymbol( + receiverSymbol.getName(), procedureTypeSymbol, + createRef(receiverSymbol.getTypeSymbol()) + ); + setSymbolPosition(newReceiverSymbol, receiverSymbol.getPosition()); + newReceiverSymbol.setAttributes(receiverSymbol.getAttributes()); + addSymbolForResolving(newReceiverSymbol); + procedureTypeSymbol.setReceiverSymbol(newReceiverSymbol); + return newReceiverSymbol; + } + + + protected OberonMethodTypeSymbol createOberonMethodTypeSymbol + ( String procedureName + , XdsLanguage language + , EnumSet attributes + , IOberonMethodReceiverSymbol receiverSymbol + , ISymbolWithProcedures parentScope ) + { + String procedureTypeName = createAnonymousName( + procedureName, "OberonMethodType", parentScope //$NON-NLS-1$ + ); + OberonMethodTypeSymbol procedureTypeSymbol = new OberonMethodTypeSymbol( + procedureTypeName, receiverSymbol, parentScope + ); + setSymbolCurrentPosition(procedureTypeSymbol); + procedureTypeSymbol.setLanguage(language); + procedureTypeSymbol.addAttributes(attributes); + addSymbolForResolving(procedureTypeSymbol); + return procedureTypeSymbol; + } + + protected ProcedureDefinitionSymbol createProcedureDefinitionSymbol + ( String procedureName + , TextPosition position + , ProcedureTypeSymbol typeSymbol + , ISymbolWithProcedures parentScope ) + { + ProcedureDefinitionSymbol symbol = new ProcedureDefinitionSymbol( + procedureName, parentScope, createStaticRef(typeSymbol) + ); + setSymbolPosition(symbol, position); + return symbol; + } + + + protected ProcedureTypeSymbol createProcedureTypeSymbol( String typeName + , String hostName + , ISymbolWithScope parentScope ) + { + typeName = generateNameIfNull(typeName, hostName, "ProcedureType", parentScope); //$NON-NLS-1$ + ProcedureTypeSymbol typeSymbol = new ProcedureTypeSymbol(typeName, parentScope); + setSymbolCurrentPosition(typeSymbol); + return typeSymbol; + } + + protected ProcedureTypeSymbol createProcedureTypeSymbol( String hostSymbolName + , TextPosition procedurePosition + , XdsLanguage language + , EnumSet attributes + , ISymbolWithProcedures parentScope ) + { + ProcedureTypeSymbol procedureTypeSymbol = createProcedureTypeSymbol( + null, hostSymbolName, parentScope + ); + setSymbolPosition(procedureTypeSymbol, procedurePosition); + procedureTypeSymbol.setLanguage(language); + procedureTypeSymbol.addAttributes(attributes); + addSymbolForResolving(procedureTypeSymbol); + return procedureTypeSymbol; + } + + protected ModuleAliasSymbol createModuleAliasSymbol( String aliasModuleName + , TextPosition position + , IModuleSymbol importedModuleSymbol + , IModuleSymbol parentScope ) + { + ModuleAliasSymbol moduleAliasSymbol = new ModuleAliasSymbol(aliasModuleName, parentScope); + IModulaSymbolReference ref = createRef(importedModuleSymbol); + moduleAliasSymbol.setReference(ref); + setSymbolPosition(moduleAliasSymbol, position); + return moduleAliasSymbol; + } + + + protected IModulaSymbol createUnresolvedModuleSymbol(String importedEntityName) + { + IModulaSymbol symbol; + symbol = new UnresovedModuleSymbol(importedEntityName, getModuleLaguage()); + setSymbolCurrentPosition(symbol); + return symbol; + } + + protected UnknownModulaSymbol createUnknownSymbol( String symbolName + , IModulaSymbolScope scope ) + { + UnknownModulaSymbol symbol = new UnknownModulaSymbol(symbolName, scope); + setSymbolCurrentPosition(symbol); + return symbol; + } + + + private class LocalReferenceFactory implements IReferenceFactory { + @Override + public IModulaSymbolReference createRef( + T symbol) { + return XdsSymbolParser.this.createRef(symbol); + } + + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsTokenParser.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsTokenParser.java new file mode 100644 index 0000000..fae45fc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/XdsTokenParser.java @@ -0,0 +1,482 @@ +package com.excelsior.xds.parser.modula; + +import java.io.IOException; +import java.util.Set; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.sdk.XdsOptions; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.internal.modula.nls.XdsMessages; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenSets; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; + +/** + * The first stage of the source code parsing. It interacts with tokens' scanner, + * converts tokens according to the build settings and processes reports of errors. + */ +public class XdsTokenParser extends XdsParserState + implements ModulaTokenSets, PragmaTokenTypes +{ + /** The token of the matched text region */ + protected TokenType token; + + /** Cached text representation of the current token */ + private String text; + + /** Low-level handler of a matched tokens */ + private TokenListener tokenListener; + + /** Input source text */ + private final _XdsFlexScanner input; + + + public XdsTokenParser( IFileStore sourceFile, CharSequence chars + , XdsSettings settings + , IParserEventListener reporter ) + { + super(sourceFile, chars, settings, reporter); + + tokenListener = new DefaultTokenListener(); + + input = new _XdsFlexScanner(); + input.reset(chars); + } + + /** + * Set the given listener for token match events. + * + * @param tokenHandler the listener of new tokens + */ + protected void setTokenListener(TokenListener tokenHandler) { + this.tokenListener = tokenHandler; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void reset() { + super.reset(); + token = null; + input.reset(chars); + } + + /** + * Returns the token of the last matched text region. + * + * @return the last matched token. + */ + protected TokenType getToken() { + return token; + } + + + /** + * Returns the number of characters up to the start of the matched text. + */ + protected int getTokenOffset() { + return input.getTokenOffset(); + } + + /** + * Returns the length of the matched text region. + */ + protected int getTokenLength() { + return input.yylength(); + } + + /** + * Returns the position of the last matched token. + * + * @return position of the last matched token. + */ + protected TextPosition getTokenPosition() { + return input.getTokenPosition(); + } + + + /** + * Returns the processed text of the last matched token. + * + * @return the processed text of the last matched token. + */ + protected String getTokenText() { + if (text == null) { + CharSequence tokenText = input.yytext(); + + if (token == STRING_LITERAL) + { + // text of the string literal without quotes + text = tokenText.subSequence(1, tokenText.length() - 1).toString(); + + } + else if ( (OCT_INTEGER_LITERAL == token) + || (HEX_INTEGER_LITERAL == token) + || (COMPLEX_LITERAL == token) + || (LONG_COMPLEX_LITERAL == token) + || (CHAR_HEX_LITERAL == token) ) + { + // text without last character + text = tokenText.subSequence(0, tokenText.length() - 1).toString(); + + } + else if (token == CHAR_OCT_LITERAL) + { + // the character by its octal ASCII code + tokenText = tokenText.subSequence(0, tokenText.length() - 1); + int charCode = Integer.parseInt(tokenText.toString(), 8); + text = Character.toString((char)charCode); + + } + else { + text = tokenText.toString(); + } + } + return text; + } + + + protected long getTokenIntegerValue() throws NumberFormatException { + if (DEC_INTEGER_LITERAL == token) + { + return Long.parseLong(getTokenText(), 10); + + } + else if (OCT_INTEGER_LITERAL == token) + { + return Long.parseLong(getTokenText(), 8); + + } + else if ( (HEX_INTEGER_LITERAL == token) + || (CHAR_HEX_LITERAL == token) ) + { + return Long.parseLong(getTokenText(), 16); + + } + else { + throw new NumberFormatException("Wrong number format"); + } + } + + + + /** + * Resumes scanning until the next token is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token in the input char sequence. + * @throws CoreException + */ + protected TokenType nextToken() { + text = null; + try { + token = input.nextToken(); + } catch (IOException e) { + logInternalError(e); + return EOF; + } + + if (WHITE_SPACE != token) { + if (END_OF_LINE_COMMENT == token) + { + if (settings.getOption(XdsOptions.CPPCOMMENTS)) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.UseCppLineComments); + else if (!settings.xdsExtensions()) + error(XdsMessages.ExtensionNotAllowed, ""); //$NON-NLS-1$ + + } + else if (BLOCK_COMMENT == token) + { + if (settings.getOption(XdsOptions.CPPCOMMENTS)) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.UseCppBlockComments); + + } + else if ( (CPP_BLOCK_COMMENT == token) + || (CPP_END_OF_LINE_COMMENT == token) ) + { + if (!settings.getOption(XdsOptions.CPPCOMMENTS)) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.UseOptionCppComments); + + } + else if (OCT_INTEGER_LITERAL == token) + { + if (settings.isOberon() && !settings.xdsExtensions()) + error(XdsMessages.IllegalNumber); + + } + else if ( (LONG_REAL_LITERAL == token) + || (COMPLEX_LITERAL == token) + || (LONG_COMPLEX_LITERAL == token) ) + { + if (!settings.isOberon()) + error(XdsMessages.IllegalNumber); + + } + else if (CHAR_HEX_LITERAL == token) + { + if (!settings.isOberon() && !settings.xdsExtensions()) + error(XdsMessages.IllegalNumber); + + } + else if (CHAR_OCT_LITERAL == token) + { + if (settings.isOberon() && !settings.xdsExtensions()) + error(XdsMessages.IllegalNumber); + + } + else if ( (LEFT_SHIFT == token) + || (RIGHT_SHIFT == token) ) + { + if (!settings.xdsExtensions() && !settings.topSpeedExtensions()) + error(XdsMessages.ExtensionNotAllowed, ""); //$NON-NLS-1$); + + } + else if (ALIAS == token) + { + if (!settings.topSpeedExtensions()) + error(XdsMessages.ExtensionNotAllowed, ""); //$NON-NLS-1$ + + } + else if (EXPONENT == token) + { + if ( (!settings.isOberon() && !settings.xdsExtensions()) + || ( settings.isOberon() && !settings.isOberonScientificExtensions()) + ) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.ExponentiationOperator); + + } + else if ( (PRAGMA_BEGIN == token) + || (PRAGMA_POP == token) + || (PRAGMA_PUSH == token) ) + { + if (!settings.isIsoPragma()) + error(XdsMessages.ExtensionNotAllowed, XdsMessages.IsoPragmaSyntax); + + } + else if (AND_KEYWORD == token) + { + if (settings.isOberon() && !settings.xdsExtensions()) + token = IDENTIFIER; + else + token = AND; + + } + else if (ASM_KEYWORD == token) + { + if (!settings.xdsExtensions()) + token = IDENTIFIER; + + } + else if (NON_OBERON_KEYWORD_SET.contains(token)) + { + if (settings.sourceType == XdsSourceType.Oberon) + token = IDENTIFIER; + + } + else if ( (EXCEPT_KEYWORD == token) + || (FINALLY_KEYWORD == token) + || (FROM_KEYWORD == token) + || (RETRY_KEYWORD == token) ) + { + if (settings.isOberon() && !settings.getOption(XdsOptions.O2ADDKWD)) + token = IDENTIFIER; + + } + else if ( (GOTO_KEYWORD == token) + || (LABEL_KEYWORD == token) ) + { + if ((settings.isOberon()) || !settings.isGotoExtension()) + token = IDENTIFIER; + + } + else if (IS_KEYWORD == token) + { + if (!settings.isOberon()) + token = IDENTIFIER; + + } + else if (SET_KEYWORD == token) + { + if (settings.isOberon()) + token = IDENTIFIER; + + } + else if (NOT_KEYWORD == token) + { + if (settings.isOberon() && !settings.xdsExtensions()) + token = IDENTIFIER; + else + token = NOT; + + } + else if (PACKEDSET_KEYWORD == token) + { + if (settings.isOberon() && !settings.xdsExtensions()) + token = IDENTIFIER; + + } + else if (SEQ_KEYWORD == token) + { + if (!settings.xdsExtensions()) + token = IDENTIFIER; + } + } + + tokenListener.addToken(token, getTokenOffset(), getTokenLength()); + + return token; + } + + + protected TokenType skipToToken (TokenType expectedToken) { + while ((token != expectedToken) && (token != EOF)) { + token = nextToken(); + } + return token; + } + + + protected TokenType skipToToken (Set expectedTokens) { + while (!expectedTokens.contains(token) && (token != EOF)) { + token = nextToken(); + } + return token; + } + + + /** + * Reports the specified warning for the current position of source code. + * + * @param message text of the warning message + * @param arguments arguments of the given warning message + * @throws CoreException + */ + protected void warning(String message, Object... arguments) { + warning(getTokenPosition(), getTokenLength(), message, arguments); + } + + /** + * Reports the specified warning for the given position in the source code. + * + * @param position position of the warning + * @param length length of invalid area + * @param message text of the warning message + * @param arguments arguments of the given warning message + * @throws CoreException + */ + protected void warning(TextPosition position, int length, String message, Object... arguments) { + reporter.warning(sourceFile, chars, position, length, message, arguments); + } + + + /** + * Reports the specified error for the current position of source code. + * It is assumed the invalid area ends in the position of the current token. + * + * @param message text of the error message + * @param arguments arguments of the given error message + * @throws CoreException + */ + protected void error(String message, Object... arguments) { + error(getTokenPosition(), getTokenLength(), message, arguments); + } + + /** + * Reports the specified error for the given position in the source code. + * + * @param position position of the error + * @param message text of the error message + * @param arguments arguments of the given error message + * @throws CoreException + */ + protected void error(TextPosition position, String message, Object... arguments) { + int length = getTokenPosition().getOffset() - position.getOffset(); + error(position, length, message, arguments); + } + + /** + * Reports the specified error for the given position and length in the source code. + * + * @param position position of the error + * @param length length of invalid area + * @param message text of the error message + * @param arguments arguments of the given error message + * @throws CoreException + */ + protected void error(TextPosition position, int length, String message, Object... arguments) { + reporter.error(sourceFile, chars, position, length, message, arguments); + } + + + /** + * Reports the expected symbol for the given token. + * + * @param token expected token + * @throws CoreException + */ + protected void errorExpectedSymbol (TokenType token) { + error(XdsMessages.ExpectedSymbol, token.getDesignator()); + } + + + /** + * Log the specified internal error of parser and scanner. + * + * @param exception, a low-level exception. + */ + protected void logInternalError(Throwable exception) { + reporter.logInternalError(sourceFile, exception); + } + + /** + * Log the specified internal error of parser and scanner. + * + * @param message, a human-readable message, localized to the + * current locale. + */ + protected void logInternalError(String message) { + reporter.logInternalError(sourceFile, message); + } + + /** + * Log the specified internal error of parser and scanner. + * + * @param message, a human-readable message, localized to the + * current locale. + * @param exception, a low-level exception, or null + * if not applicable. + */ + protected void logInternalError(String message, Throwable exception) { + reporter.logInternalError(sourceFile, message, exception); + } + + /** + * A token listener is notified of a new token is matched. + */ + protected interface TokenListener { + public void addToken(TokenType token, int offset, int length); + } + + protected class DefaultTokenListener implements TokenListener { + public void addToken(TokenType token, int offset, int length) { + builder.addToken(token, offset, length); + } + } + + protected static class NullTokenListener implements TokenListener { + public static final NullTokenListener INSTANCE = new NullTokenListener(); + + private NullTokenListener() { + } + public void addToken(TokenType token, int offset, int length) { + // do nothing + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBlock.java new file mode 100644 index 0000000..8cc6ede --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBlock.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; + +/** + * Base class for a nodes which are used to group other nodes into big blocks + * to simplify differentiation of nodes. + */ +public class AstBlock extends ModulaAstNode +{ + public AstBlock(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBody.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBody.java new file mode 100644 index 0000000..51a51ff --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstBody.java @@ -0,0 +1,46 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.symbol.IBlockBodySymbol; + +/** + * Base class for module initialization, module finalization and procedure body. + * + * @param the type of referenced symbol + */ +public abstract class AstBody extends AstStatementBlock + implements IAstSymbolRef +{ + private T symbol; + + protected AstBody(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + //-------------------------------------------------------------------------- + // Implementation of IAstSymbolRef interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + T s = getSymbol(); + return (s != null) ? s.getName() : ""; //$NON-NLS-1$ + } + + /** + * {@inheritDoc} + */ + @Override + public T getSymbol() { + return symbol; + } + + public void setSymbol(T symbol) { + this.symbol = symbol; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDeclarations.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDeclarations.java new file mode 100644 index 0000000..063503a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDeclarations.java @@ -0,0 +1,76 @@ +package com.excelsior.xds.parser.modula.ast; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.modules.AstLocalModule; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclarationBlock; + +public class AstDeclarations extends AstBlock +{ + public AstDeclarations(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstConstantDeclarationBlocks() { + return findChildren(ModulaElementTypes.CONSTANT_DECLARATION_BLOCK, AstConstantDeclarationBlock.class); + } + + public List getAstVariableDeclarationBlocks() { + return findChildren(ModulaElementTypes.VARIABLE_DECLARATION_BLOCK); + } + + public List getAstTypeDeclarationBlocks() { + return findChildren(ModulaElementTypes.TYPE_DECLARATION_BLOCK); + } + + public List getLocalModules() { + return findChildren(ModulaElementTypes.LOCAL_MODULE); + } + + public List getProcedureDeclarations() { + return findChildren(ModulaElementTypes.PROCEDURE_DECLARATION); + } + + public List getProcedureForwardDeclarations() { + return findChildren(ModulaElementTypes.PROCEDURE_FORWARD_DECLARATION); + } + + public List getProcedureExternalSpecifications() { + return findChildren(ModulaElementTypes.PROCEDURE_EXTERNAL_SPECIFICATION); + } + + public List getOberonMethodForwardDeclarations() { + return findChildren(ModulaElementTypes.OBERON_METHOD_FORWARD_DECLARATION); + } + + public List getOberonMethodDeclarations() { + return findChildren(ModulaElementTypes.OBERON_METHOD_DECLARATION); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstConstantDeclarationBlocks()); + acceptChildren(visitor, getAstTypeDeclarationBlocks()); + acceptChildren(visitor, getAstVariableDeclarationBlocks()); + acceptChildren(visitor, getLocalModules()); + acceptChildren(visitor, getProcedureExternalSpecifications()); + acceptChildren(visitor, getProcedureDeclarations()); + acceptChildren(visitor, getProcedureForwardDeclarations()); + acceptChildren(visitor, getOberonMethodDeclarations()); + acceptChildren(visitor, getOberonMethodForwardDeclarations()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedIdentifier.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedIdentifier.java new file mode 100644 index 0000000..019b88e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedIdentifier.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; + +public class AstDecoratedIdentifier extends ModulaAstNode +{ + public AstDecoratedIdentifier(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedName.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedName.java new file mode 100644 index 0000000..716f8bb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDecoratedName.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public class AstDecoratedName extends AstName { + + public AstDecoratedName(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDefinitions.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDefinitions.java new file mode 100644 index 0000000..66fcd82 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDefinitions.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.parser.modula.ast; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclarationBlock; + +public class AstDefinitions extends AstBlock +{ + public AstDefinitions(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstConstantDeclarationBlocks() { + return findChildren(ModulaElementTypes.CONSTANT_DECLARATION_BLOCK); + } + + public List getAstVariableDeclarationBlocks() { + return findChildren(ModulaElementTypes.VARIABLE_DECLARATION_BLOCK); + } + + public List getAstTypeDeclarationBlocks() { + return findChildren(ModulaElementTypes.TYPE_DECLARATION_BLOCK); + } + + public List getProcedureDefinitions() { + return findChildren(ModulaElementTypes.PROCEDURE_DEFINITION); + } + + public List getProcedureExternalSpecifications() { + return findChildren(ModulaElementTypes.PROCEDURE_EXTERNAL_SPECIFICATION); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstConstantDeclarationBlocks()); + acceptChildren(visitor, getAstTypeDeclarationBlocks()); + acceptChildren(visitor, getAstVariableDeclarationBlocks()); + acceptChildren(visitor, getProcedureExternalSpecifications()); + acceptChildren(visitor, getProcedureDefinitions()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDesignator.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDesignator.java new file mode 100644 index 0000000..9b23564 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstDesignator.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public class AstDesignator extends AstSymbolRef +{ + public AstDesignator(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstExceptBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstExceptBlock.java new file mode 100644 index 0000000..bbe0e20 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstExceptBlock.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast; + +/** + * "EXCEPT"-block of the module and procedure body. + */ +public class AstExceptBlock extends AstStatementBlock { + + public AstExceptBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstModuleName.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstModuleName.java new file mode 100644 index 0000000..5aec1f0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstModuleName.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public class AstModuleName extends AstName +{ + public AstModuleName(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstName.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstName.java new file mode 100644 index 0000000..e84642f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstName.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public abstract class AstName extends AstSymbolRef { + + public AstName(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstNameAlias.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstNameAlias.java new file mode 100644 index 0000000..f863754 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstNameAlias.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public abstract class AstNameAlias extends AstName +{ + protected AstNameAlias(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstQualifiedName.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstQualifiedName.java new file mode 100644 index 0000000..92c6fe2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstQualifiedName.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.ast; + +public class AstQualifiedName extends AstSimpleName +{ + public AstQualifiedName(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSimpleName.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSimpleName.java new file mode 100644 index 0000000..a1c6d7f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSimpleName.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public class AstSimpleName extends AstName +{ + public AstSimpleName(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstStatementBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstStatementBlock.java new file mode 100644 index 0000000..19df95c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstStatementBlock.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.AstNode; +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; + +/** + * Base class for the block of statements. + * It usually includes list of statements as a child element. + */ +public abstract class AstStatementBlock extends ModulaAstNode +{ + protected AstStatementBlock(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + public PstCompositeNode getStatementList() { + return findFirstChild(ModulaElementTypes.STATEMENT_LIST, PstCompositeNode.class); + } + + protected void visitStatementList(ModulaAstVisitor visitor) { + visitAstChidren(getStatementList(), AstNode.class, visitor); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolDef.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolDef.java new file mode 100644 index 0000000..b218705 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolDef.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public abstract class AstSymbolDef extends AstSymbolRef +{ + public AstSymbolDef(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolRef.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolRef.java new file mode 100644 index 0000000..431493c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/AstSymbolRef.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; +import com.excelsior.xds.parser.modula.symbol.reference.ReferenceUtils; + +/** + * AST node with reference to a Modula-2/Oberon-2 symbol. + * + * @param the type of referenced symbol + */ +public abstract class AstSymbolRef extends ModulaAstNode + implements IAstSymbolRef +{ + private IModulaSymbolReference symbolRef; + + public AstSymbolRef(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + //-------------------------------------------------------------------------- + // Implementation of IAstSymbolRef interface + //-------------------------------------------------------------------------- + + /** + * {@inheritDoc} + */ + @Override + public String getName() { + T s = getSymbol(); + return (s != null) ? s.getName() : ""; //$NON-NLS-1$ + } + + /** + * {@inheritDoc} + */ + @Override + public T getSymbol() { + return ReferenceUtils.resolve(symbolRef); + } + public void setSymbol(IModulaSymbolReference symbolRef) { + this.symbolRef = symbolRef; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolRef.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolRef.java new file mode 100644 index 0000000..7068865 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolRef.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +/** + * AST node with reference to a Modula-2/Oberon-2 symbol. + * + * @param the type of referenced symbol + */ +public interface IAstSymbolRef +{ + /** + * Returns the name of symbol which is bound with this node. + * + * @return name of symbol which is bound with this node, + * or empty string if symbol was not bound with node. + */ + public String getName(); + + /** + * Returns the symbol which is bound with this node. + * + * @return symbol bound with this node. + */ + public IModulaSymbol getSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolScope.java new file mode 100644 index 0000000..77b9832 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IAstSymbolScope.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; + +/** + * AST node corresponding to a Modula-2/Oberon-2 scope. + */ +public interface IAstSymbolScope +{ + public IModulaSymbolScope getScope(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IModulaElementType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IModulaElementType.java new file mode 100644 index 0000000..ddd0051 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/IModulaElementType.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.IElementType; + +/** + * Tag interface for token types and types of AST nodes specific for + * Modula-2/Oberon-2 languages. + */ +public interface IModulaElementType extends IElementType { + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAst.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAst.java new file mode 100644 index 0000000..fdec9e3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAst.java @@ -0,0 +1,102 @@ +package com.excelsior.xds.parser.modula.ast; + +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.DefaultBuildSettingsHolder; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.parser.commons.ast.Ast; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.ast.modules.AstModule; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +/** + * A root element of the Modula-2 AST + */ +public class ModulaAst extends Ast +{ + /** The module symbol corresponding to this AST */ + private IModuleSymbol moduleSymbol; + + /** The list of text locations ignored by the conditional compilation pragmas */ + private List inactiveTextRegions = Collections.emptyList(); + + public ModulaAst(CharSequence chars, IFileStore sourceFile) { + super(chars, sourceFile); + } + + public AstModule getAstModule() { + return (AstModule)getAstNode(); + } + + public IModuleSymbol getModuleSymbol() { + if (moduleSymbol != null) { + return moduleSymbol; + } + return getAstModule().getSymbol(); + } + + public ParsedModuleKey getParsedModuleKey() { + IModuleSymbol moduleSymbol = getModuleSymbol(); + if (moduleSymbol != null) { + return moduleSymbol.getKey(); + } + else{ + if (getSourceFile() != null) { + return new ParsedModuleKey(getSourceFile()); + } + } + return null; + } + + + public void setModuleSymbol(IModuleSymbol moduleSymbol) { + this.moduleSymbol = moduleSymbol; + } + + + @SuppressWarnings("unchecked") + public static U + findParent(T node, ModulaCompositeType parentType) + { + PstNode parent = node.getParent(); + while(parent != null) { + if (parent.getElementType() == parentType) { + return (U)parent; + } + parent = parent.getParent(); + } + return null; + } + + + /** + * Sets the list of text locations ignored by the conditional compilation pragmas. + * Sorts locations according to theirs offset. Locations should be non-overlapping. + * + * @param inactiveTextRegions list of text locations ignored by the conditional compilation pragmas. + */ + public void setInactiveCodeRegions(List inactiveTextRegions) { + this.inactiveTextRegions = inactiveTextRegions; + Collections.sort(this.inactiveTextRegions, new Comparator() { + @Override + public int compare(ITextRegion o1, ITextRegion o2) { + return o1.getOffset() - o2.getOffset(); + } + }); + } + + /** + * Returns the list of text locations ignored by the conditional compilation pragmas. + * + * @return list of text locations ignored by the conditional compilation pragmas. + */ + public List getInactiveCodeRegions() { + return inactiveTextRegions; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstNode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstNode.java new file mode 100644 index 0000000..1d86457 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstNode.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.AstNode; +import com.excelsior.xds.parser.commons.ast.AstVisitor; +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; + +/** + * A node in the Modula-2/Oberon-2 AST tree. + */ +public abstract class ModulaAstNode extends AstNode +{ + protected ModulaAstNode(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(AstVisitor visitor) { + if (visitor instanceof ModulaAstVisitor) { + doAccept((ModulaAstVisitor)visitor); + } + } + + protected void doAccept(ModulaAstVisitor visitor) { + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstVisitor.java new file mode 100644 index 0000000..e4addad --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaAstVisitor.java @@ -0,0 +1,281 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.Ast; +import com.excelsior.xds.parser.commons.ast.AstVisitor; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclaration; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.imports.AstImportAliasDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstImportFragmentList; +import com.excelsior.xds.parser.modula.ast.imports.AstImports; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportStatement; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstFinallyBody; +import com.excelsior.xds.parser.modula.ast.modules.AstLocalModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameter; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterBlock; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterList; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodReceiver; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstEnumElement; +import com.excelsior.xds.parser.modula.ast.types.AstEnumerationType; +import com.excelsior.xds.parser.modula.ast.types.AstPointerType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordField; +import com.excelsior.xds.parser.modula.ast.types.AstRecordFieldBlockList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordFieldList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordSimpleFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariant; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantElsePart; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabel; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabelList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantSelector; +import com.excelsior.xds.parser.modula.ast.types.AstSetType; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; +import com.excelsior.xds.parser.modula.ast.variables.AstVariable; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclaration; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableList; + + +public abstract class ModulaAstVisitor extends AstVisitor { + + public boolean visit(AstModule astNode) { + return true; + } + + public boolean visit(AstImports astNode) { + return true; + } + + public boolean visit(AstDeclarations astNode) { + return true; + } + + public boolean visit(AstDefinitions astNode) { + return true; + } + + + public boolean visit(AstProcedureDefinition astNode) { + return true; + } + + public boolean visit(AstProcedureDeclaration astNode) { + return true; + } + + + public boolean visit(AstFormalParameterBlock astNode) { + return true; + } + + public boolean visit(AstFormalParameterDeclaration astNode) { + return true; + } + + public boolean visit(AstFormalParameterList astNode) { + return true; + } + + public boolean visit(AstFormalParameter astNode) { + return true; + } + + + public boolean visit(AstModuleBody astNode) { + return true; + } + + public boolean visit(Ast node) { + return true; + } + + public boolean visit(AstConstantDeclaration astNode) { + return true; + } + + public boolean visit(AstConstantDeclarationBlock astNode) { + return true; + } + + public boolean visit(AstOberonMethodDeclaration astNode) { + return true; + } + + public boolean visit(AstOberonMethodReceiver astNode) { + return true; + } + + public boolean visit(AstProcedureExternalSpecification astNode) { + return true; + } + + public boolean visit(AstProcedureForwardDeclaration astNode) { + return true; + } + + public boolean visit(AstRecordType astNode) { + return true; + } + + public boolean visit(AstTypeDeclaration astNode) { + return true; + } + + public boolean visit(AstPointerType astNode) { + return true; + } + + public boolean visit(AstTypeDeclarationBlock astNode) { + return true; + } + + public boolean visit(AstSimpleImportStatement astNode) { + return true; + } + + public boolean visit(AstSimpleImportFragment astNode) { + return true; + } + + public boolean visit(AstModuleName astNode) { + return true; + } + + public boolean visit(AstImportAliasDeclaration astNode) { + return true; + } + + public boolean visit(AstImportFragmentList astNode) { + return true; + } + + public boolean visit(AstModuleAlias astNode) { + return true; + } + + public boolean visit(AstVariableDeclarationBlock astNode) { + return true; + } + + public boolean visit(AstVariableDeclaration astNode) { + return true; + } + + public boolean visit(AstVariableList astNode) { + return true; + } + + public boolean visit(AstOberonMethodForwardDeclaration astNode) { + return true; + } + + public boolean visit(AstUnqualifiedImportStatement astNode) { + return true; + } + + public boolean visit(AstUnqualifiedImportFragment astNode) { + return true; + } + + public boolean visit(AstTypeElement astNode) { + return true; + } + + public boolean visit(AstEnumerationType astNode) { + return true; + } + + public boolean visit(AstEnumElement astNode) { + return true; + } + + public boolean visit(AstSetType astNode) { + return true; + } + + public boolean visit(AstLocalModule astNode) { + return true; + } + + + public boolean visit(AstRecordSimpleFieldBlock astNode) { + return true; + } + + public boolean visit(AstRecordFieldBlockList astNode) { + return true; + } + + public boolean visit(AstRecordFieldList node) { + return true; + } + + + public boolean visit(AstRecordVariantFieldBlock astNode) { + return true; + } + + public boolean visit(AstRecordVariantList astNode) { + return true; + } + + public boolean visit(AstRecordVariant astNode) { + return true; + } + + public boolean visit(AstRecordVariantElsePart astNode) { + return true; + } + + public boolean visit(AstRecordVariantLabelList astNode) { + return true; + } + + public boolean visit(AstRecordVariantLabel astNode) { + return true; + } + + + public boolean visit(AstVariable astNode) { + return true; + } + + public boolean visit(AstRecordField astNode) { + return true; + } + + public boolean visit(AstRecordVariantSelector astNode) { + return true; + } + + + public boolean visit(AstProcedureBody astNode) { + return true; + } + + public boolean visit(AstFinallyBody astNode) { + return true; + } + + + public void postVisit(AstUnqualifiedImportStatement astNode) { + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaCompositeType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaCompositeType.java new file mode 100644 index 0000000..75ea541 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaCompositeType.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.CompositeType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; + +/** + * Base class for node types in the AST tree. + */ +public class ModulaCompositeType extends CompositeType + implements IModulaElementType +{ + public ModulaCompositeType(String debugName, Class nodeClass) { + super(debugName, nodeClass); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementType.java new file mode 100644 index 0000000..3ed984e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementType.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.commons.ast.ElementType; + +/** + * Base class for token types returned from lexical analysis and for types + * of nodes in the AST tree for Modula-2/Oberon-2 languages. + */ +public class ModulaElementType extends ElementType implements IModulaElementType { + + public ModulaElementType(String debugName) { + super(debugName); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementTypes.java new file mode 100644 index 0000000..55c3f5d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/ModulaElementTypes.java @@ -0,0 +1,249 @@ +package com.excelsior.xds.parser.modula.ast; + +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclaration; +import com.excelsior.xds.parser.modula.ast.constants.AstConstantDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.expressions.AstCaseLabel; +import com.excelsior.xds.parser.modula.ast.expressions.AstCaseVariantSelector; +import com.excelsior.xds.parser.modula.ast.expressions.AstConstantExpression; +import com.excelsior.xds.parser.modula.ast.expressions.AstExpression; +import com.excelsior.xds.parser.modula.ast.imports.AstImportAliasDeclaration; +import com.excelsior.xds.parser.modula.ast.imports.AstImportFragmentList; +import com.excelsior.xds.parser.modula.ast.imports.AstImports; +import com.excelsior.xds.parser.modula.ast.imports.AstModuleAlias; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstSimpleImportStatement; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportFragment; +import com.excelsior.xds.parser.modula.ast.imports.AstUnqualifiedImportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstDefinitionModule; +import com.excelsior.xds.parser.modula.ast.modules.AstFinallyBody; +import com.excelsior.xds.parser.modula.ast.modules.AstLocalModule; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; +import com.excelsior.xds.parser.modula.ast.modules.AstProgramModule; +import com.excelsior.xds.parser.modula.ast.modules.AstQualifiedExportStatement; +import com.excelsior.xds.parser.modula.ast.modules.AstUnqualifiedExportStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstInactiveCode; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragma; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaConditionalStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaElseStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaElsifStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaEndStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaIfStatement; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaInlineEquation; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaInlineOption; +import com.excelsior.xds.parser.modula.ast.pragmas.AstPragmaInlineSettings; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameter; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterBlock; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstFormalParameterList; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstOberonMethodReceiver; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureBody; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureDefinition; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureExternalSpecification; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedureForwardDeclaration; +import com.excelsior.xds.parser.modula.ast.procedures.AstResultType; +import com.excelsior.xds.parser.modula.ast.statements.AstAsmStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseElsePart; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseLabelList; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseVariant; +import com.excelsior.xds.parser.modula.ast.statements.AstCaseVariantList; +import com.excelsior.xds.parser.modula.ast.statements.AstForStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstIfStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstLoopStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstModulaWithStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstRepeatStatement; +import com.excelsior.xds.parser.modula.ast.statements.AstStatementList; +import com.excelsior.xds.parser.modula.ast.statements.AstWhileStatement; +import com.excelsior.xds.parser.modula.ast.types.AstArrayType; +import com.excelsior.xds.parser.modula.ast.types.AstEnumElement; +import com.excelsior.xds.parser.modula.ast.types.AstEnumerationType; +import com.excelsior.xds.parser.modula.ast.types.AstFormalParameterType; +import com.excelsior.xds.parser.modula.ast.types.AstFormalType; +import com.excelsior.xds.parser.modula.ast.types.AstFotmalParameterTypeList; +import com.excelsior.xds.parser.modula.ast.types.AstIndexType; +import com.excelsior.xds.parser.modula.ast.types.AstOpenArrayType; +import com.excelsior.xds.parser.modula.ast.types.AstPointerType; +import com.excelsior.xds.parser.modula.ast.types.AstProcedureType; +import com.excelsior.xds.parser.modula.ast.types.AstProcedureTypeOberon; +import com.excelsior.xds.parser.modula.ast.types.AstRangeType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordField; +import com.excelsior.xds.parser.modula.ast.types.AstRecordFieldBlockList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordFieldList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordSimpleFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordType; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariant; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantElsePart; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantFieldBlock; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabel; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantLabelList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantList; +import com.excelsior.xds.parser.modula.ast.types.AstRecordVariantSelector; +import com.excelsior.xds.parser.modula.ast.types.AstSetType; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclaration; +import com.excelsior.xds.parser.modula.ast.types.AstTypeDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; +import com.excelsior.xds.parser.modula.ast.variables.AstVariable; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclaration; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableDeclarationBlock; +import com.excelsior.xds.parser.modula.ast.variables.AstVariableList; + +public interface ModulaElementTypes +{ + ModulaCompositeType DEFINITION_MODULE = new ModulaCompositeType("DEFINITION_MODULE", AstDefinitionModule.class); //$NON-NLS-1$ + ModulaCompositeType PROGRAM_MODULE = new ModulaCompositeType("PROGRAM_MODULE", AstProgramModule.class); //$NON-NLS-1$ + ModulaCompositeType LOCAL_MODULE = new ModulaCompositeType("LOCAL_MODULE", AstLocalModule.class); //$NON-NLS-1$ + + ModulaCompositeType DECLARATIONS = new ModulaCompositeType("DECLARATIONS", AstDeclarations.class); //$NON-NLS-1$ + ModulaCompositeType DEFINITIONS = new ModulaCompositeType("DEFINITIONS", AstDefinitions.class); //$NON-NLS-1$ + + ModulaCompositeType MODULE_BODY = new ModulaCompositeType("MODULE_BODY", AstModuleBody.class); //$NON-NLS-1$ + ModulaCompositeType PROCEDURE_BODY = new ModulaCompositeType("PROCEDURE_BODY", AstProcedureBody.class); //$NON-NLS-1$ + ModulaCompositeType FINALLY_BODY = new ModulaCompositeType("FINALLY_BODY", AstFinallyBody.class); //$NON-NLS-1$ + ModulaCompositeType EXCEPT_BLOCK = new ModulaCompositeType("EXCEPT_BLOCK", AstExceptBlock.class); //$NON-NLS-1$ + + ModulaCompositeType IMPORTS = new ModulaCompositeType("IMPORTS", AstImports.class); //$NON-NLS-1$ + ModulaCompositeType IMPORT_FRAGMENT_LIST = new ModulaCompositeType("IMPORT_FRAGMENT_LIST", AstImportFragmentList.class); //$NON-NLS-1$ + + ModulaCompositeType SIMPLE_IMPORT = new ModulaCompositeType("SIMPLE_IMPORT", AstSimpleImportStatement.class); //$NON-NLS-1$ + ModulaCompositeType SIMPLE_IMPORT_FRAGMENT = new ModulaCompositeType("SIMPLE_IMPORT_FRAGMENT", AstSimpleImportFragment.class); //$NON-NLS-1$ + + ModulaCompositeType UNQUALIFIED_IMPORT = new ModulaCompositeType("UNQUALIFIED_IMPORT", AstUnqualifiedImportStatement.class); //$NON-NLS-1$ + ModulaCompositeType UNQUALIFIED_IMPORT_FRAGMENT = new ModulaCompositeType("UNQUALIFIED_IMPORT_FRAGMENT", AstUnqualifiedImportFragment.class); //$NON-NLS-1$ + + ModulaCompositeType ALIAS_DECLARATION = new ModulaCompositeType("ALIAS_DECLARATION", AstImportAliasDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType MODULE_ALIAS_NAME = new ModulaCompositeType("MODULE_ALIAS_NAME", AstModuleAlias.class); //$NON-NLS-1$ + + ModulaCompositeType UNQUALIFIED_EXPORT = new ModulaCompositeType("UNQUALIFIED_EXPORT", AstUnqualifiedExportStatement.class); //$NON-NLS-1$ + ModulaCompositeType QUALIFIED_EXPORT = new ModulaCompositeType("QUALIFIED_EXPORT", AstQualifiedExportStatement.class); //$NON-NLS-1$ + + + ModulaCompositeType PROCEDURE_DECLARATION = new ModulaCompositeType("PROCEDURE_DECLARATION", AstProcedureDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType PROCEDURE_FORWARD_DECLARATION = new ModulaCompositeType("PROCEDURE_FORWARD_DECLARATION", AstProcedureForwardDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType PROCEDURE_DEFINITION = new ModulaCompositeType("PROCEDURE_DEFINITION", AstProcedureDefinition.class); //$NON-NLS-1$ + ModulaCompositeType PROCEDURE_EXTERNAL_SPECIFICATION = new ModulaCompositeType("PROCEDURE_EXTERNAL_SPECIFICATION", AstProcedureExternalSpecification.class); //$NON-NLS-1$ + + ModulaCompositeType OBERON_METHOD_DECLARATION = new ModulaCompositeType("OBERON_METHOD_DECLARATION", AstOberonMethodDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType OBERON_METHOD_FORWARD_DECLARATION = new ModulaCompositeType("OBERON_METHOD_FORWARD_DECLARATION", AstOberonMethodForwardDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType OBERON_METHOD_RECEIVER = new ModulaCompositeType("OBERON_METHOD_RECEIVER", AstOberonMethodReceiver.class); //$NON-NLS-1$ + + ModulaCompositeType FORMAL_PARAMETER_BLOCK = new ModulaCompositeType("FORMAL_PARAMETER_BLOCK", AstFormalParameterBlock.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_PARAMETER_DECLARATION = new ModulaCompositeType("FORMAL_PARAMETER_DECLARATION", AstFormalParameterDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_PARAMETER_LIST = new ModulaCompositeType("FORMAL_PARAMETER_LIST", AstFormalParameterList.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_PARAMETER = new ModulaCompositeType("FORMAL_PARAMETER", AstFormalParameter.class); //$NON-NLS-1$ + ModulaCompositeType RESULT_TYPE = new ModulaCompositeType("RESULT_TYPE", AstResultType.class); //$NON-NLS-1$ + + + ModulaCompositeType VARIABLE_DECLARATION_BLOCK = new ModulaCompositeType("VARIABLE_DECLARATION_BLOCK", AstVariableDeclarationBlock.class); //$NON-NLS-1$ + ModulaCompositeType VARIABLE_DECLARATION = new ModulaCompositeType("VARIABLE_DECLARATION", AstVariableDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType VARIABLE_LIST = new ModulaCompositeType("VARIABLE_LIST", AstVariableList.class); //$NON-NLS-1$ + ModulaCompositeType VARIABLE = new ModulaCompositeType("VARIABLE", AstVariable.class); //$NON-NLS-1$ + + ModulaCompositeType CONSTANT_DECLARATION_BLOCK = new ModulaCompositeType("CONSTANT_DECLARATION_BLOCK", AstConstantDeclarationBlock.class); //$NON-NLS-1$ + ModulaCompositeType CONSTANT_DECLARATION = new ModulaCompositeType("CONSTANT_DECLARATION", AstConstantDeclaration.class); //$NON-NLS-1$ + + ModulaCompositeType TYPE_DECLARATION_BLOCK = new ModulaCompositeType("TYPE_DECLARATION_BLOCK", AstTypeDeclarationBlock.class); //$NON-NLS-1$ + ModulaCompositeType TYPE_DECLARATION = new ModulaCompositeType("TYPE_DECLARATION", AstTypeDeclaration.class); //$NON-NLS-1$ + ModulaCompositeType TYPE_ELEMENT = new ModulaCompositeType("TYPE_ELEMENT", AstTypeElement.class); //$NON-NLS-1$ + + ModulaCompositeType INDEX_TYPE = new ModulaCompositeType("INDEX_TYPE", AstIndexType.class); //$NON-NLS-1$ + ModulaElementType BASE_TYPE = new ModulaElementType("BASE_TYPE"); //$NON-NLS-1$ + + ModulaCompositeType RECORD_TYPE_DEFINITION = new ModulaCompositeType("RECORD_TYPE_DEFINITION", AstRecordType.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_FIELD_BLOCK_LIST = new ModulaCompositeType("RECORD_FIELD_BLOCK_LIST", AstRecordFieldBlockList.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_SIMPLE_FIELD_BLOCK = new ModulaCompositeType("RECORD_SIMPLE_FIELD_BLOCK", AstRecordSimpleFieldBlock.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT_FIELD_BLOCK = new ModulaCompositeType("RECORD_VARIANT_FIELD_BLOCK", AstRecordVariantFieldBlock.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT_SELECTOR = new ModulaCompositeType("RECORD_VARIANT_SELECTOR", AstRecordVariantSelector.class); //$NON-NLS-1$ + + ModulaCompositeType RECORD_FIELD_LIST = new ModulaCompositeType("RECORD_FIELD_LIST", AstRecordFieldList.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_FIELD = new ModulaCompositeType("RECORD_FIELD", AstRecordField.class); //$NON-NLS-1$ + + ModulaCompositeType RECORD_VARIANT_LIST = new ModulaCompositeType("RECORD_VARIANT_LIST", AstRecordVariantList.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT = new ModulaCompositeType("RECORD_VARIANT", AstRecordVariant.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT_LABEL_LIST = new ModulaCompositeType("RECORD_VARIANT_LABEL_LIST", AstRecordVariantLabelList.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT_LABEL = new ModulaCompositeType("RECORD_VARIANT_LABEL", AstRecordVariantLabel.class); //$NON-NLS-1$ + ModulaCompositeType RECORD_VARIANT_ELSE_PART = new ModulaCompositeType("RECORD_VARIANT_ELSE_PART", AstRecordVariantElsePart.class); //$NON-NLS-1$ + + ModulaCompositeType SET_TYPE_DEFINITION = new ModulaCompositeType("SET_TYPE_DEFINITION", AstSetType.class); //$NON-NLS-1$ + ModulaCompositeType RANGE_TYPE_DEFINITION = new ModulaCompositeType("RANGE_TYPE_DEFINITION", AstRangeType.class); //$NON-NLS-1$ + ModulaCompositeType ARRAY_TYPE_DEFINITION = new ModulaCompositeType("ARRAY_TYPE_DEFINITION", AstArrayType.class); //$NON-NLS-1$ + ModulaCompositeType POINTER_TYPE_DEFINITION = new ModulaCompositeType("POINTER_TYPE_DEFINITION", AstPointerType.class); //$NON-NLS-1$ + ModulaCompositeType OPEN_ARRAY_TYPE_DEFINITION = new ModulaCompositeType("OPEN_ARRAY_TYPE_DEFINITION", AstOpenArrayType.class); //$NON-NLS-1$ + + ModulaCompositeType PROCEDURE_TYPE_OBERON_DEFINITION = new ModulaCompositeType("PROCEDURE_TYPE_OBERON_DEFINITION", AstProcedureTypeOberon.class); //$NON-NLS-1$ + + ModulaCompositeType PROCEDURE_TYPE_DEFINITION = new ModulaCompositeType("PROCEDURE_TYPE_DEFINITION", AstProcedureType.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_PARAMETER_TYPE_LIST = new ModulaCompositeType("FORMAL_PARAMETER_TYPE_LIST", AstFotmalParameterTypeList.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_PARAMETER_TYPE = new ModulaCompositeType("FORMAL_PARAMETER_TYPE", AstFormalParameterType.class); //$NON-NLS-1$ + ModulaCompositeType FORMAL_TYPE = new ModulaCompositeType("FORMAL_TYPE", AstFormalType.class); //$NON-NLS-1$ + + ModulaCompositeType ENUMERATION_TYPE_DEFINITION = new ModulaCompositeType("ENUMERATION_TYPE_DEFINITION", AstEnumerationType.class); //$NON-NLS-1$ + ModulaCompositeType ENUM_ELEMENT = new ModulaCompositeType("ENUM_ELEMENT", AstEnumElement.class); //$NON-NLS-1$ + + ModulaCompositeType STATEMENT_LIST = new ModulaCompositeType("STATEMENT_LIST", AstStatementList.class); //$NON-NLS-1$ + + ModulaCompositeType CASE_STATEMENT = new ModulaCompositeType("CASE_STATEMENT", AstCaseStatement.class); //$NON-NLS-1$ + ModulaCompositeType CASE_VARIANT_SELECTOR = new ModulaCompositeType("CASE_VARIANT_SELECTOR", AstCaseVariantSelector.class); //$NON-NLS-1$ + ModulaCompositeType CASE_VARIANT_LIST = new ModulaCompositeType("CASE_VARIANT_LIST", AstCaseVariantList.class); //$NON-NLS-1$ + ModulaCompositeType CASE_VARIANT = new ModulaCompositeType("CASE_VARIANT", AstCaseVariant.class); //$NON-NLS-1$ + ModulaCompositeType CASE_LABEL_LIST = new ModulaCompositeType("CASE_LABEL_LIST", AstCaseLabelList.class); //$NON-NLS-1$ + ModulaCompositeType CASE_LABEL = new ModulaCompositeType("CASE_LABEL", AstCaseLabel.class); //$NON-NLS-1$ + ModulaCompositeType CASE_ELSE_PART = new ModulaCompositeType("CASE_ELSE_PART", AstCaseElsePart.class); //$NON-NLS-1$ + + ModulaCompositeType MODULA_WITH_STATEMENT = new ModulaCompositeType("MODULA_WITH_STATEMENT", AstModulaWithStatement.class); //$NON-NLS-1$ + ModulaElementType OBERON_WITH_STATEMENT = new ModulaElementType("OBERON_WITH_STATEMENT"); //$NON-NLS-1$ + + ModulaElementType ASSIGMENT_STATEMENT = new ModulaElementType("ASSIGMENT_STATEMENT"); //$NON-NLS-1$ + ModulaElementType RETURN_STATEMENT = new ModulaElementType("RETURN_STATEMENT"); //$NON-NLS-1$ + ModulaElementType EXIT_STATEMENT = new ModulaElementType("EXIT_STATEMENT"); //$NON-NLS-1$ + ModulaElementType GOTO_STATEMENT = new ModulaElementType("GOTO_STATEMENT"); //$NON-NLS-1$ + ModulaElementType RETRY_STATEMENT = new ModulaElementType("RETRY_STATEMENT"); //$NON-NLS-1$ + + ModulaCompositeType FOR_STATEMENT = new ModulaCompositeType("FOR_STATEMENT", AstForStatement.class); //$NON-NLS-1$ + ModulaCompositeType IF_STATEMENT = new ModulaCompositeType("IF_STATEMENT", AstIfStatement.class); //$NON-NLS-1$ + ModulaCompositeType LOOP_STATEMENT = new ModulaCompositeType("LOOP_STATEMENT", AstLoopStatement.class); //$NON-NLS-1$ + ModulaCompositeType REPEAT_STATEMENT = new ModulaCompositeType("REPEAT_STATEMENT", AstRepeatStatement.class); //$NON-NLS-1$ + ModulaCompositeType WHILE_STATEMENT = new ModulaCompositeType("WHILE_STATEMENT", AstWhileStatement.class); //$NON-NLS-1$ + ModulaCompositeType ASM_STATEMENT = new ModulaCompositeType("ASM_STATEMENT", AstAsmStatement.class); //$NON-NLS-1$ + + ModulaCompositeType EXPRESSION = new ModulaCompositeType("EXPRESSION", AstExpression.class); //$NON-NLS-1$ + ModulaCompositeType CONSTANT_EXPRESSION = new ModulaCompositeType("CONSTANT_EXPRESSION", AstConstantExpression.class); //$NON-NLS-1$ + ModulaElementType TERM = new ModulaElementType("TERM"); //$NON-NLS-1$ + ModulaElementType FACTOR = new ModulaElementType("FACTOR"); //$NON-NLS-1$ + ModulaElementType CALL_EXPRESSION = new ModulaElementType("CALL_EXPRESSION"); //$NON-NLS-1$ + + ModulaElementType IDENTIFIER_LIST = new ModulaElementType("IDENTIFIER_LIST"); //$NON-NLS-1$ + + ModulaCompositeType DECORATED_IDENTIFIER = new ModulaCompositeType("DECORATED_IDENTIFIER", AstDecoratedIdentifier.class); //$NON-NLS-1$ + + ModulaElementType MODULE_IDENTIFIER = new ModulaElementType("MODULE_IDENTIFIER"); //$NON-NLS-1$ + ModulaElementType PROCEDURE_IDENTIFIER = new ModulaElementType("PROCEDURE_IDENTIFIER"); //$NON-NLS-1$ + + ModulaCompositeType MODULE_NAME = new ModulaCompositeType("MODULE_NAME", AstModuleName.class); //$NON-NLS-1$ + ModulaCompositeType QUALIFIED_NAME = new ModulaCompositeType("QUALIFIED_NAME", AstQualifiedName.class); //$NON-NLS-1$ + ModulaCompositeType SIMPLE_NAME = new ModulaCompositeType("SIMPLE_NAME", AstSimpleName.class); //$NON-NLS-1$ + ModulaCompositeType DECORATED_NAME = new ModulaCompositeType("DECORATED_NAME", AstDecoratedName.class); //$NON-NLS-1$ + + ModulaCompositeType DESIGNATOR = new ModulaCompositeType("DESIGNATOR", AstDesignator.class); //$NON-NLS-1$ + + ModulaElementType DIRECT_LANGUAGE_SPEC = new ModulaElementType("DIRECT_LANGUAGE_SPEC"); //$NON-NLS-1$ + ModulaElementType EXPORT_MARKER = new ModulaElementType("EXPORT_MARKER"); //$NON-NLS-1$ + + + ModulaCompositeType PRAGMA = new ModulaCompositeType("PRAGMA", AstPragma.class); //$NON-NLS-1$ + + ModulaCompositeType PRAGMA_INLINE_SETTINGS = new ModulaCompositeType("PRAGMA_INLINE_SETTINGS", AstPragmaInlineSettings.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_INLINE_OPTION = new ModulaCompositeType("PRAGMA_INLINE_OPTION", AstPragmaInlineOption.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_INLINE_EQUATION = new ModulaCompositeType("PRAGMA_INLINE_EQUATION", AstPragmaInlineEquation.class); //$NON-NLS-1$ + + ModulaCompositeType PRAGMA_CONDITIONAL_STATEMENT = new ModulaCompositeType("PRAGMA_CONDITIONAL_STATEMENT", AstPragmaConditionalStatement.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_IF_STATEMENT = new ModulaCompositeType("PRAGMA_IF_STATEMENT", AstPragmaIfStatement.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_ELSIF_STATEMENT = new ModulaCompositeType("PRAGMA_ELSIF_STATEMENT", AstPragmaElsifStatement.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_ELSE_STATEMENT = new ModulaCompositeType("PRAGMA_ELSE_STATEMENT", AstPragmaElseStatement.class); //$NON-NLS-1$ + ModulaCompositeType PRAGMA_END_STATEMENT = new ModulaCompositeType("PRAGMA_END_STATEMENT", AstPragmaEndStatement.class); //$NON-NLS-1$ + + ModulaCompositeType INACTIVE_CODE = new ModulaCompositeType("INACTIVE_CODE", AstInactiveCode.class); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclaration.java new file mode 100644 index 0000000..bf75c0b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclaration.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.modula.ast.constants; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstDecoratedIdentifier; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; + +public class AstConstantDeclaration extends AstSymbolDef + implements IAstNodeWithIdentifier +{ + public AstConstantDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + AstDecoratedIdentifier identifierAst = findFirstChild( ModulaElementTypes.DECORATED_IDENTIFIER + , ModulaElementTypes.DECORATED_IDENTIFIER.getNodeClass() + ); + PstNode identifier = null; + if (identifierAst != null) { + identifier = identifierAst.getIdentifier(); + } + return identifier; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclarationBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclarationBlock.java new file mode 100644 index 0000000..e6c238b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/constants/AstConstantDeclarationBlock.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.parser.modula.ast.constants; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstConstantDeclarationBlock extends ModulaAstNode +{ + public AstConstantDeclarationBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getConstantDeclarations() { + return findChildren( ModulaElementTypes.CONSTANT_DECLARATION + , ModulaElementTypes.CONSTANT_DECLARATION.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getConstantDeclarations()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseLabel.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseLabel.java new file mode 100644 index 0000000..1db63ba --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseLabel.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.modula.ast.expressions; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +/** + * CaseLabel = ConstantExpression [".." ConstantExpression]
+ */ +public class AstCaseLabel extends AstConstantExpression +{ + public AstCaseLabel(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseVariantSelector.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseVariantSelector.java new file mode 100644 index 0000000..62d96bc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstCaseVariantSelector.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.modula.ast.expressions; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +/** + * CaseSelector = OrdinalExpression
+ */ +public class AstCaseVariantSelector extends AstExpression +{ + public AstCaseVariantSelector(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstConstantExpression.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstConstantExpression.java new file mode 100644 index 0000000..409b2d5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstConstantExpression.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.expressions; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstConstantExpression extends AstExpression +{ + public AstConstantExpression(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstExpression.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstExpression.java new file mode 100644 index 0000000..1903a30 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/expressions/AstExpression.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.expressions; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstExpression extends ModulaAstNode +{ + public AstExpression(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportAliasDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportAliasDeclaration.java new file mode 100644 index 0000000..0dee8a7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportAliasDeclaration.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstImportAliasDeclaration extends ModulaAstNode implements IAstNodeWithIdentifier +{ + public AstImportAliasDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstModuleAlias getModuleAlias() { + return findFirstChild( ModulaElementTypes.MODULE_ALIAS_NAME + , ModulaElementTypes.MODULE_ALIAS_NAME.getNodeClass() ); + } + + public AstModuleName getAstModuleName() { + return findFirstChild( ModulaElementTypes.MODULE_NAME + , ModulaElementTypes.MODULE_NAME.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getModuleAlias()); + acceptChild(visitor, getAstModuleName()); + } + } + + @Override + public PstNode getIdentifier() { + return getModuleAlias(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragment.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragment.java new file mode 100644 index 0000000..6277057 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragment.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public abstract class AstImportFragment extends AstSymbolRef +{ + protected AstImportFragment(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + public AstImports getImports() { + return ModulaAst.findParent(this, ModulaElementTypes.IMPORTS); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragmentList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragmentList.java new file mode 100644 index 0000000..a36c53d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportFragmentList.java @@ -0,0 +1,36 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.modules.AstModuleBody; + +public class AstImportFragmentList extends ModulaAstNode +{ + public AstImportFragmentList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getSimpleImportFragments() { + return findChildren(ModulaElementTypes.SIMPLE_IMPORT_FRAGMENT); + } + + public List getUnqualifiedImportFragments() { + return findChildren(ModulaElementTypes.UNQUALIFIED_IMPORT_FRAGMENT); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor, getSimpleImportFragments()); + acceptChildren(visitor, getUnqualifiedImportFragments()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportStatement.java new file mode 100644 index 0000000..45d440c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImportStatement.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; + +public abstract class AstImportStatement extends ModulaAstNode +{ + protected AstImportStatement(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImports.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImports.java new file mode 100644 index 0000000..b8fcb04 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstImports.java @@ -0,0 +1,43 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import com.excelsior.xds.parser.modula.ast.AstBlock; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstImports extends AstBlock +{ + public AstImports(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstImportStatements() { + return findChildren(newImportElementHasSet(), AstImportStatement.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstImportStatements()); + } + } + + + private static Set> newImportElementHasSet() + { + Set> set = + new HashSet>(); + set.add(ModulaElementTypes.SIMPLE_IMPORT); + set.add(ModulaElementTypes.UNQUALIFIED_IMPORT); + return set; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstModuleAlias.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstModuleAlias.java new file mode 100644 index 0000000..708c8dd --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstModuleAlias.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.modula.ast.AstNameAlias; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; + +public class AstModuleAlias extends AstNameAlias +{ + public AstModuleAlias(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportFragment.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportFragment.java new file mode 100644 index 0000000..352f271 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportFragment.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstSimpleImportFragment extends AstImportFragment implements IAstNodeWithIdentifier +{ + public AstSimpleImportFragment(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstModuleName getAstModuleName() { + return findFirstChild( ModulaElementTypes.MODULE_NAME + , ModulaElementTypes.MODULE_NAME.getNodeClass() ); + } + + public AstImportAliasDeclaration getImportAliasDeclaration() { + return findFirstChild( ModulaElementTypes.ALIAS_DECLARATION + , ModulaElementTypes.ALIAS_DECLARATION.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstModuleName()); + acceptChild(visitor, getImportAliasDeclaration()); + } + } + + @Override + public PstNode getIdentifier() { + return getAstModuleName(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportStatement.java new file mode 100644 index 0000000..0c3ee91 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstSimpleImportStatement.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstSimpleImportStatement extends AstImportStatement +{ + public AstSimpleImportStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + AstImportFragmentList importFragmentList = findFirstChild( + ModulaElementTypes.IMPORT_FRAGMENT_LIST, + ModulaElementTypes.IMPORT_FRAGMENT_LIST.getNodeClass() ); + acceptChild(visitor, importFragmentList); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportFragment.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportFragment.java new file mode 100644 index 0000000..6af7797 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportFragment.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSimpleName; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + + +public class AstUnqualifiedImportFragment extends AstImportFragment implements IAstNodeWithIdentifier +{ + public AstUnqualifiedImportFragment(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstSimpleName getAstSimpleName() { + return findFirstChild( ModulaElementTypes.SIMPLE_NAME + , ModulaElementTypes.SIMPLE_NAME.getNodeClass() ); + } + + public AstUnqualifiedImportStatement getUnqualifiedImportStatement() { + PstNode parent = getParent(); + while(parent != null) { + if (parent.getElementType() == ModulaElementTypes.UNQUALIFIED_IMPORT) { + return (AstUnqualifiedImportStatement)parent; + } + parent = parent.getParent(); + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstSimpleName()); + } + } + + @Override + public PstNode getIdentifier() { + return getAstSimpleName(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportStatement.java new file mode 100644 index 0000000..97797de --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/imports/AstUnqualifiedImportStatement.java @@ -0,0 +1,40 @@ +package com.excelsior.xds.parser.modula.ast.imports; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstModuleName; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + + +public class AstUnqualifiedImportStatement extends AstImportStatement implements IAstNodeWithIdentifier +{ + public AstUnqualifiedImportStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstModuleName getModuleIdentifier() { + return findFirstChild( ModulaElementTypes.MODULE_NAME + , ModulaElementTypes.MODULE_NAME.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + AstImportFragmentList importFragmentList = findFirstChild( + ModulaElementTypes.IMPORT_FRAGMENT_LIST, + ModulaElementTypes.IMPORT_FRAGMENT_LIST.getNodeClass() ); + acceptChild(visitor, importFragmentList); + } + visitor.postVisit(this); + } + + @Override + public PstNode getIdentifier() { + return getModuleIdentifier(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstDefinitionModule.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstDefinitionModule.java new file mode 100644 index 0000000..659318a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstDefinitionModule.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.modula.ast.AstDefinitions; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstDefinitionModule extends AstModule { + + public AstDefinitionModule(ModulaCompositeType elementType) { + super(elementType); + } + + public AstDefinitions getAstDefinitions() { + return findFirstChild( ModulaElementTypes.DEFINITIONS + , ModulaElementTypes.DEFINITIONS.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaAstVisitor visitor) { + super.acceptChildren(visitor); + acceptChild(visitor, getAstDefinitions()); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstExportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstExportStatement.java new file mode 100644 index 0000000..244305d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstExportStatement.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; + +public abstract class AstExportStatement extends ModulaAstNode +{ + protected AstExportStatement(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstFinallyBody.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstFinallyBody.java new file mode 100644 index 0000000..87091b2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstFinallyBody.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstBody; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IFinallyBodySymbol; + +/** + * A finalization body of the module. + * + * ModuleBody = InitializationBody [FinalizationBody]
+ * InitializationBody = "BEGIN" BlockBody
+ * FinalizationBody = "FINALLY" BlockBody
+ */ +public class AstFinallyBody extends AstBody + implements IAstNodeWithIdentifier +{ + public AstFinallyBody(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.FINALLY_KEYWORD, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + visitStatementList(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstLocalModule.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstLocalModule.java new file mode 100644 index 0000000..69a0316 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstLocalModule.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstLocalModule extends AstProgramModule +{ + public AstLocalModule(ModulaCompositeType elementType) { + super(elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModule.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModule.java new file mode 100644 index 0000000..524701a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModule.java @@ -0,0 +1,78 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.IAstSymbolScope; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.imports.AstImports; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public abstract class AstModule extends AstSymbolDef + implements IAstSymbolScope, IAstNodeWithIdentifier, IAstFrameNode +{ + private List frame = new ArrayList(4); + + protected AstModule(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstImports getAstImports() { + return findFirstChild( ModulaElementTypes.IMPORTS + , ModulaElementTypes.IMPORTS.getNodeClass() ); + } + + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaElementTypes.MODULE_IDENTIFIER, PstNode.class); + } + + protected void acceptChildren(ModulaAstVisitor visitor) { + acceptChild(visitor, getAstImports()); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getScope() { + return getSymbol(); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "MODULE"; + } + + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModuleBody.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModuleBody.java new file mode 100644 index 0000000..40e9ebe --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstModuleBody.java @@ -0,0 +1,56 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstBody; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModuleBodySymbol; + +/** + * A initialization body of a program and local module. + * + * ModuleBody = InitializationBody [FinalizationBody]
+ * InitializationBody = "BEGIN" BlockBody
+ */ +public class AstModuleBody extends AstBody + implements IAstNodeWithIdentifier +{ + + public AstModuleBody(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getBeginKeyword() { + return findFirstChild(ModulaTokenTypes.BEGIN_KEYWORD, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return getBeginKeyword(); + } + + public AstModule getModuleAst() { + AstModule astModule = null; + PstNode parent = getParent(); + if (parent instanceof AstModule) { + astModule = (AstModule) parent; + } + return astModule; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + visitStatementList(visitor); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstProgramModule.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstProgramModule.java new file mode 100644 index 0000000..7e85b53 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstProgramModule.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.modula.ast.AstDeclarations; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstProgramModule extends AstModule +{ + public AstProgramModule(ModulaCompositeType elementType) { + super(elementType); + } + + public AstModuleBody getModuleBody() { + return findFirstChild( ModulaElementTypes.MODULE_BODY + , ModulaElementTypes.MODULE_BODY.getNodeClass() ); + } + + public AstFinallyBody getFinallyBody() { + return findFirstChild( ModulaElementTypes.FINALLY_BODY + , ModulaElementTypes.FINALLY_BODY.getNodeClass() ); + } + + public AstDeclarations getAstDeclarations() { + return findFirstChild( ModulaElementTypes.DECLARATIONS + , ModulaElementTypes.DECLARATIONS.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaAstVisitor visitor) { + super.acceptChildren(visitor); + acceptChild(visitor, getAstDeclarations()); + acceptChild(visitor, getModuleBody()); + acceptChild(visitor, getFinallyBody()); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstQualifiedExportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstQualifiedExportStatement.java new file mode 100644 index 0000000..855f3d8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstQualifiedExportStatement.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstQualifiedExportStatement extends AstExportStatement { + + public AstQualifiedExportStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstUnqualifiedExportStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstUnqualifiedExportStatement.java new file mode 100644 index 0000000..df2e784 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/modules/AstUnqualifiedExportStatement.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.modules; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstUnqualifiedExportStatement extends AstExportStatement { + + public AstUnqualifiedExportStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstInactiveCode.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstInactiveCode.java new file mode 100644 index 0000000..1f22b32 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstInactiveCode.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstInactiveCode extends ModulaAstNode +{ + public AstInactiveCode(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragma.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragma.java new file mode 100644 index 0000000..6505b87 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragma.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragma extends ModulaAstNode +{ + public AstPragma(ModulaCompositeType elementType) { + super(null, elementType); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaConditionalStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaConditionalStatement.java new file mode 100644 index 0000000..50244de --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaConditionalStatement.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaConditionalStatement extends AstPragma +{ + public AstPragmaConditionalStatement(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElseStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElseStatement.java new file mode 100644 index 0000000..cab1b5a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElseStatement.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.commons.ast.IAstFrameChild; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaElseStatement extends AstPragmaConditionalStatement implements IAstFrameChild +{ + private IAstFrameNode frameNode; + + public AstPragmaElseStatement(ModulaCompositeType elementType) { + super(elementType); + } + + @Override + public IAstFrameNode getAstFrameNode() { + return frameNode; + } + + @Override + public void setAstFrameNode(IAstFrameNode frameNode) { + this.frameNode = frameNode; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElsifStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElsifStatement.java new file mode 100644 index 0000000..34479d2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaElsifStatement.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.commons.ast.IAstFrameChild; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaElsifStatement extends AstPragmaConditionalStatement implements IAstFrameChild +{ + private IAstFrameNode frameNode; + + public AstPragmaElsifStatement(ModulaCompositeType elementType) { + super(elementType); + } + + @Override + public IAstFrameNode getAstFrameNode() { + return frameNode; + } + + @Override + public void setAstFrameNode(IAstFrameNode frameNode) { + this.frameNode = frameNode; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaEndStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaEndStatement.java new file mode 100644 index 0000000..bf475d4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaEndStatement.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.commons.ast.IAstFrameChild; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaEndStatement extends AstPragmaConditionalStatement implements IAstFrameChild +{ + private IAstFrameNode frameNode; + + public AstPragmaEndStatement(ModulaCompositeType elementType) { + super(elementType); + } + + @Override + public IAstFrameNode getAstFrameNode() { + return frameNode; + } + + @Override + public void setAstFrameNode(IAstFrameNode frameNode) { + this.frameNode = frameNode; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaIfStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaIfStatement.java new file mode 100644 index 0000000..e4b4486 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaIfStatement.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaIfStatement extends AstPragmaConditionalStatement implements IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstPragmaIfStatement(ModulaCompositeType elementType) { + super(elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "IF"; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineEquation.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineEquation.java new file mode 100644 index 0000000..91f6aa2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineEquation.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaInlineEquation extends AstPragmaInlineSettings +{ + public AstPragmaInlineEquation(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineOption.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineOption.java new file mode 100644 index 0000000..e9a1a4b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineOption.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaInlineOption extends AstPragmaInlineSettings +{ + public AstPragmaInlineOption(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineSettings.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineSettings.java new file mode 100644 index 0000000..543fa4a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/pragmas/AstPragmaInlineSettings.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.pragmas; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstPragmaInlineSettings extends AstPragma +{ + public AstPragmaInlineSettings(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameter.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameter.java new file mode 100644 index 0000000..d2bb58b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameter.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; + +public class AstFormalParameter extends AstSymbolDef + implements IAstNodeWithIdentifier +{ + + public AstFormalParameter(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterBlock.java new file mode 100644 index 0000000..b222233 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterBlock.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstFormalParameterBlock extends ModulaAstNode +{ + public AstFormalParameterBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstFormalParameterDeclaration() { + return findChildren(ModulaElementTypes.FORMAL_PARAMETER_DECLARATION); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstFormalParameterDeclaration()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterDeclaration.java new file mode 100644 index 0000000..6c3f2c4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterDeclaration.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstFormalParameterDeclaration extends ModulaAstNode +{ + public AstFormalParameterDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstFormalParameterList getAstFormalParameterList() { + return findFirstChild( ModulaElementTypes.FORMAL_PARAMETER_LIST + , ModulaElementTypes.FORMAL_PARAMETER_LIST.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChild(visitor, getAstFormalParameterList()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterList.java new file mode 100644 index 0000000..c752d6a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstFormalParameterList.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstFormalParameterList extends ModulaAstNode +{ + public AstFormalParameterList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getFormalParameters() { + return findChildren(ModulaElementTypes.FORMAL_PARAMETER); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getFormalParameters()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethod.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethod.java new file mode 100644 index 0000000..3dc73fe --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethod.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodSymbol; + +public abstract class AstOberonMethod + extends AstProcedure +{ + protected AstOberonMethod(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + public AstOberonMethodReceiver getOberonMethodReceiver() { + return findFirstChild( ModulaElementTypes.OBERON_METHOD_RECEIVER + , ModulaElementTypes.OBERON_METHOD_RECEIVER.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaAstVisitor visitor) { + acceptChild(visitor, getOberonMethodReceiver()); + super.acceptChildren(visitor); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodDeclaration.java new file mode 100644 index 0000000..c7e810c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodDeclaration.java @@ -0,0 +1,80 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstDeclarations; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDeclarationSymbol; + +public class AstOberonMethodDeclaration extends AstOberonMethod + implements IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstOberonMethodDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstDeclarations getAstDeclarations() { + return findFirstChild( ModulaElementTypes.DECLARATIONS + , ModulaElementTypes.DECLARATIONS.getNodeClass() ); + } + + public AstProcedureBody getProcedureBody() { + return findFirstChild( ModulaElementTypes.PROCEDURE_BODY + , ModulaElementTypes.PROCEDURE_BODY.getNodeClass() ); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "PROCEDURE"; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaAstVisitor visitor) { + super.acceptChildren(visitor); + acceptChild(visitor, getAstDeclarations()); + acceptChild(visitor, getProcedureBody()); + } + + /** + * {@inheritDoc} + */ + @Override + public void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodForwardDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodForwardDeclaration.java new file mode 100644 index 0000000..264bf5d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodForwardDeclaration.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodDefinitionSymbol; + +public class AstOberonMethodForwardDeclaration extends AstOberonMethod +{ + public AstOberonMethodForwardDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodReceiver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodReceiver.java new file mode 100644 index 0000000..fc0601a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstOberonMethodReceiver.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; + +public class AstOberonMethodReceiver extends AstSymbolDef + implements IAstNodeWithIdentifier +{ + public AstOberonMethodReceiver(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedure.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedure.java new file mode 100644 index 0000000..15f85b8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedure.java @@ -0,0 +1,53 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.IAstSymbolScope; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; + +public abstract class AstProcedure + extends AstSymbolDef + implements IAstSymbolScope, IAstNodeWithIdentifier +{ + protected AstProcedure(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaElementTypes.PROCEDURE_IDENTIFIER, PstNode.class); + } + + public AstResultType getAstResultType() { + return findFirstChild( ModulaElementTypes.RESULT_TYPE + , ModulaElementTypes.RESULT_TYPE.getNodeClass() ); + } + + public AstFormalParameterBlock getProcedureParameters() { + return findFirstChild( ModulaElementTypes.FORMAL_PARAMETER_BLOCK + , ModulaElementTypes.FORMAL_PARAMETER_BLOCK.getNodeClass() ); + } + + protected void acceptChildren(ModulaAstVisitor visitor) { + acceptChild(visitor, getProcedureParameters()); + acceptChild(visitor, getAstResultType()); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getScope() { + return getSymbol(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureBody.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureBody.java new file mode 100644 index 0000000..9b94de6 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureBody.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstBody; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IProcedureBodySymbol; + +/** + * "BEGIN"-block of a procedure declaration. + */ +public class AstProcedureBody extends AstBody + implements IAstNodeWithIdentifier +{ + + public AstProcedureBody(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getBeginKeyword() { + return findFirstChild(ModulaTokenTypes.BEGIN_KEYWORD, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return getBeginKeyword(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + visitStatementList(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDeclaration.java new file mode 100644 index 0000000..0b5971f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDeclaration.java @@ -0,0 +1,81 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstDeclarations; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; + +public class AstProcedureDeclaration extends AstProcedure + implements IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstProcedureDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstDeclarations getAstDeclarations() { + return findFirstChild( ModulaElementTypes.DECLARATIONS + , ModulaElementTypes.DECLARATIONS.getNodeClass() ); + } + + public AstProcedureBody getProcedureBody() { + return findFirstChild( ModulaElementTypes.PROCEDURE_BODY + , ModulaElementTypes.PROCEDURE_BODY.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "PROCEDURE"; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void acceptChildren(ModulaAstVisitor visitor) { + super.acceptChildren(visitor); + acceptChild(visitor, getAstDeclarations()); + acceptChild(visitor, getProcedureBody()); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDefinition.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDefinition.java new file mode 100644 index 0000000..cbb7ea3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureDefinition.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; + +public class AstProcedureDefinition extends AstProcedure +{ + public AstProcedureDefinition(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureExternalSpecification.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureExternalSpecification.java new file mode 100644 index 0000000..05c5c27 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureExternalSpecification.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + + +public class AstProcedureExternalSpecification extends AstProcedureDefinition +{ + public AstProcedureExternalSpecification(ModulaCompositeType elementType) { + super(elementType); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureForwardDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureForwardDeclaration.java new file mode 100644 index 0000000..3e9b94e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstProcedureForwardDeclaration.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; + + +public class AstProcedureForwardDeclaration extends AstProcedure { + + public AstProcedureForwardDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ +@Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChildren(visitor); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstResultType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstResultType.java new file mode 100644 index 0000000..00dbf96 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/procedures/AstResultType.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast.procedures; + +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class AstResultType extends AstSymbolRef { + + public AstResultType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstAsmStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstAsmStatement.java new file mode 100644 index 0000000..fbc3bd7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstAsmStatement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstAsmStatement extends AstStatement +{ + public AstAsmStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "ASM"; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseElsePart.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseElsePart.java new file mode 100644 index 0000000..9aa8630 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseElsePart.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstCaseElsePart extends ModulaAstNode +{ + public AstCaseElsePart(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstStatementList getAstStatementList() { + return findFirstChild( ModulaElementTypes.STATEMENT_LIST + , ModulaElementTypes.STATEMENT_LIST.getNodeClass() ); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseLabelList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseLabelList.java new file mode 100644 index 0000000..6fa5e46 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseLabelList.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.expressions.AstCaseLabel; + +/** + * CaseLabelList = CaseLabel {"," CaseLabel}
+ */ +public class AstCaseLabelList extends ModulaAstNode +{ + public AstCaseLabelList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getCaseLabels() { + return findChildren( ModulaElementTypes.CASE_LABEL + , ModulaElementTypes.CASE_LABEL.getNodeClass() ); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseStatement.java new file mode 100644 index 0000000..8545bb0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseStatement.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +/** + * CaseStatement = "CASE" CaseSelector "OF" CaseList "END"
+ */ +public class AstCaseStatement extends AstStatement +{ + public AstCaseStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "CASE"; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariant.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariant.java new file mode 100644 index 0000000..5133116 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariant.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +/** + * CaseVariant = [CaseLabelList ":" StatementSequence]
+ */ +public class AstCaseVariant extends ModulaAstNode +{ + public AstCaseVariant(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstCaseLabelList getAstCaseVariantLabelList() { + return findFirstChild( ModulaElementTypes.CASE_LABEL_LIST + , ModulaElementTypes.CASE_LABEL_LIST.getNodeClass() ); + } + + public AstStatementList getAstStatementList() { + return findFirstChild( ModulaElementTypes.STATEMENT_LIST + , ModulaElementTypes.STATEMENT_LIST.getNodeClass() ); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariantList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariantList.java new file mode 100644 index 0000000..b6f65d9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstCaseVariantList.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +/** + * CaseVariantList = CaseVariant {"|" CaseVariant} [CaseElsePart]
+ */ +public class AstCaseVariantList extends ModulaAstNode +{ + public AstCaseVariantList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstCaseVariants() { + return findChildren(ModulaElementTypes.CASE_VARIANT); + } + + public AstCaseElsePart getAstCaseElsePart() { + return findFirstChild( ModulaElementTypes.CASE_ELSE_PART + , ModulaElementTypes.CASE_ELSE_PART.getNodeClass() ); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstForStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstForStatement.java new file mode 100644 index 0000000..94b9ef3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstForStatement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstForStatement extends AstStatement +{ + public AstForStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "FOR"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstIfStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstIfStatement.java new file mode 100644 index 0000000..37e9410 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstIfStatement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstIfStatement extends AstStatement +{ + public AstIfStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "IF"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstLoopStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstLoopStatement.java new file mode 100644 index 0000000..046a2b3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstLoopStatement.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +/** + * LoopStatement = "LOOP" StatementSequence "END"
+ */ +public class AstLoopStatement extends AstStatement +{ + public AstLoopStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstStatementList getAstStatementList() { + return findFirstChild( ModulaElementTypes.STATEMENT_LIST + , ModulaElementTypes.STATEMENT_LIST.getNodeClass() ); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "LOOP"; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstModulaWithStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstModulaWithStatement.java new file mode 100644 index 0000000..16d9953 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstModulaWithStatement.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.IAstSymbolScope; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; + +/** + * WithStatement = "WITH" RecordDesignator "DO" StatementSequence "END"
+ */ +public class AstModulaWithStatement extends AstStatement + implements IAstSymbolScope +{ + private IModulaSymbolScope scope; + + public AstModulaWithStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getScope() { + return scope; + } + + public void setScope(IModulaSymbolScope scope) { + this.scope = scope; + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "WITH"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstRepeatStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstRepeatStatement.java new file mode 100644 index 0000000..10b543a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstRepeatStatement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstRepeatStatement extends AstStatement +{ + public AstRepeatStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "REPEAT"; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatement.java new file mode 100644 index 0000000..e4a63e5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatement.java @@ -0,0 +1,40 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; + +public abstract class AstStatement extends ModulaAstNode + implements IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstStatement(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatementList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatementList.java new file mode 100644 index 0000000..d0f826b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstStatementList.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstStatementList extends ModulaAstNode +{ + public AstStatementList(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstWhileStatement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstWhileStatement.java new file mode 100644 index 0000000..1548fb7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/statements/AstWhileStatement.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.ast.statements; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstWhileStatement extends AstStatement +{ + public AstWhileStatement(ModulaCompositeType elementType) { + super(null, elementType); + } + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "WHILE"; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaKeywordType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaKeywordType.java new file mode 100644 index 0000000..41c64b7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaKeywordType.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + + +/** + * Base class for token corresponding to Modula-2/Oberon-2 keywords. + */ +public class ModulaKeywordType extends ModulaTokenType { + + public ModulaKeywordType(String debugName) { + super(debugName + "_Keyword", debugName); //$NON-NLS-1$ + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenSets.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenSets.java new file mode 100644 index 0000000..cbad923 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenSets.java @@ -0,0 +1,138 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import com.excelsior.xds.parser.commons.ast.TokenType; + +public interface ModulaTokenSets extends ModulaTokenTypes +{ + Set COMMENT_SET = new HashSet(Arrays.asList( + BLOCK_COMMENT, END_OF_LINE_COMMENT, + CPP_BLOCK_COMMENT, CPP_END_OF_LINE_COMMENT + )); + + Set WHITE_SPACE_AND_COMMENT_SET = new HashSet(Arrays.asList( + WHITE_SPACE, + BLOCK_COMMENT, END_OF_LINE_COMMENT, + CPP_BLOCK_COMMENT, CPP_END_OF_LINE_COMMENT + )); + + + Set BRACKETS_SET = new HashSet(Arrays.asList( + LBRACKET, RBRACKET, + LPARENTH, RPARENTH, + LBRACE, RBRACE + )); + + + Set STRING_LITERAL_SET = new HashSet(Arrays.asList( + CHAR_OCT_LITERAL, + STRING_LITERAL + )); + + + Set INTEGER_LITERAL_SET = new HashSet(Arrays.asList( + OCT_INTEGER_LITERAL, + DEC_INTEGER_LITERAL, + HEX_INTEGER_LITERAL + )); + + + Set REAL_LITERAL_SET = new HashSet(Arrays.asList( + REAL_LITERAL, + LONG_REAL_LITERAL + )); + + + Set COMPLEX_LITERAL_SET = new HashSet(Arrays.asList( + COMPLEX_LITERAL, + LONG_COMPLEX_LITERAL + )); + + + Set LITERAL_SET = new HashSet(Arrays.asList( + CHAR_HEX_LITERAL, + // --- STRING_LITERAL_SET + CHAR_OCT_LITERAL, + STRING_LITERAL, + // --- INTEGER_LITERAL_SET + OCT_INTEGER_LITERAL, + DEC_INTEGER_LITERAL, + HEX_INTEGER_LITERAL, + // --- REAL_LITERAL_SET + REAL_LITERAL, + LONG_REAL_LITERAL, + // --- COMPLEX_LITERAL_SET + COMPLEX_LITERAL, + LONG_COMPLEX_LITERAL + )); + + + Set NON_OBERON_KEYWORD_SET = new HashSet(Arrays.asList( + DEFINITION_KEYWORD, + EXPORT_KEYWORD, + FORWARD_KEYWORD, + IMPLEMENTATION_KEYWORD, + QUALIFIED_KEYWORD, + REM_KEYWORD + )); + + + Set KEYWORD_SET = new HashSet(Arrays.asList( + AND_KEYWORD, + ASM_KEYWORD, + ARRAY_KEYWORD, + BEGIN_KEYWORD, + BY_KEYWORD, + CASE_KEYWORD, + CONST_KEYWORD, + DEFINITION_KEYWORD, + DIV_KEYWORD, + DO_KEYWORD, + ELSE_KEYWORD, + ELSIF_KEYWORD, + END_KEYWORD, + EXCEPT_KEYWORD, + EXIT_KEYWORD, + EXPORT_KEYWORD, + FINALLY_KEYWORD, + FOR_KEYWORD, + FORWARD_KEYWORD, + FROM_KEYWORD, + IF_KEYWORD, + IMPLEMENTATION_KEYWORD, + IMPORT_KEYWORD, + IN_KEYWORD, + IS_KEYWORD, + LOOP_KEYWORD, + MOD_KEYWORD, + MODULE_KEYWORD, + NOT_KEYWORD, + OF_KEYWORD, + OR_KEYWORD, + PACKEDSET_KEYWORD, + POINTER_KEYWORD, + PROCEDURE_KEYWORD, + QUALIFIED_KEYWORD, + RECORD_KEYWORD, + REM_KEYWORD, + REPEAT_KEYWORD, + RETRY_KEYWORD, + RETURN_KEYWORD, + SEQ_KEYWORD, + SET_KEYWORD, + THEN_KEYWORD, + TO_KEYWORD, + TYPE_KEYWORD, + UNTIL_KEYWORD, + VAR_KEYWORD, + WHILE_KEYWORD, + WITH_KEYWORD, + + LABEL_KEYWORD, + GOTO_KEYWORD + )); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenType.java new file mode 100644 index 0000000..48f0120 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenType.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.IModulaElementType; + +/** + * Base class for Modula-2/Oberon-2 tokens. + */ +public class ModulaTokenType extends TokenType implements IModulaElementType { + + public ModulaTokenType(String debugName, String designator) { + super(debugName, designator); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenTypes.java new file mode 100644 index 0000000..2ab4768 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/ModulaTokenTypes.java @@ -0,0 +1,124 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.ast.TokenTypes; + +/** + * Modula-2/Oberon-2 scanner token types. + */ +public interface ModulaTokenTypes extends TokenTypes +{ + TokenType BLOCK_COMMENT = new ModulaTokenType("BLOCK_COMMENT", "block comment"); //$NON-NLS-1$ + TokenType END_OF_LINE_COMMENT = new ModulaTokenType("END_OF_LINE_COMMENT", "end of line comment"); //$NON-NLS-1$ + + TokenType CPP_BLOCK_COMMENT = new ModulaTokenType("CPP_BLOCK_COMMENT", "C++ block comment"); //$NON-NLS-1$ + TokenType CPP_END_OF_LINE_COMMENT = new ModulaTokenType("CPP_END_OF_LINE_COMMENT", "C++ end of line comment"); //$NON-NLS-1$ + + TokenType IDENTIFIER = new ModulaTokenType("Identifier", "identifier"); //$NON-NLS-1$ + + TokenType DEC_INTEGER_LITERAL = new ModulaTokenType("DEC_INTEGER_Literal", "decimal literal"); //$NON-NLS-1$ val_integer + TokenType OCT_INTEGER_LITERAL = new ModulaTokenType("OCT_INTEGER_Literal", "octal literal"); //$NON-NLS-1$ val_integer + TokenType HEX_INTEGER_LITERAL = new ModulaTokenType("HEX_INTEGER_Literal", "hexadecimal literal"); //$NON-NLS-1$ val_integer + + TokenType REAL_LITERAL = new ModulaTokenType("REAL_Literal", "real literal"); //$NON-NLS-1$ val_real + TokenType LONG_REAL_LITERAL = new ModulaTokenType("LONG_REAL_Literal", "long real literal"); //$NON-NLS-1$ val_long_real + + TokenType COMPLEX_LITERAL = new ModulaTokenType("COMPLEX_Literal", "complex literal"); //$NON-NLS-1$ val_cmplx + TokenType LONG_COMPLEX_LITERAL = new ModulaTokenType("LONG_COMPLEX_Literal", "long complex literal"); //$NON-NLS-1$ val_long_cmplx + + TokenType CHAR_HEX_LITERAL = new ModulaTokenType("CHAR_HEX_Literal", "hex code of character"); //$NON-NLS-1$ val_char + TokenType CHAR_OCT_LITERAL = new ModulaTokenType("CHAR_OCT_Literal", "octal code of character" ); //$NON-NLS-1$ val_string + + TokenType STRING_LITERAL = new ModulaTokenType("STRING_Literal", "string"); //$NON-NLS-1$ val_string + + TokenType LBRACKET = new ModulaTokenType("LBRACKET", "["); //$NON-NLS-1$ lbr + TokenType RBRACKET = new ModulaTokenType("RBRACKET", "]"); //$NON-NLS-1$ rbr + TokenType LPARENTH = new ModulaTokenType("LPARENTH", "("); //$NON-NLS-1$ lpar + TokenType RPARENTH = new ModulaTokenType("RPARENTH", ")"); //$NON-NLS-1$ rpar + TokenType LBRACE = new ModulaTokenType("LBRACE", "{"); //$NON-NLS-1$ + TokenType RBRACE = new ModulaTokenType("RBRACE", "}"); //$NON-NLS-1$ + + TokenType PLUS = new ModulaTokenType("PLUS", "+"); //$NON-NLS-1$ + TokenType MINUS = new ModulaTokenType("MINUS", "-"); //$NON-NLS-1$ + TokenType TIMES = new ModulaTokenType("TIMES", "*"); //$NON-NLS-1$ + TokenType COLON = new ModulaTokenType("COLON", ":"); //$NON-NLS-1$ + TokenType SLASH = new ModulaTokenType("SLASH", "/"); //$NON-NLS-1$ + TokenType BAR = new ModulaTokenType("BAR", "^"); //$NON-NLS-1$ '^', '@' + TokenType SEP = new ModulaTokenType("SEP", "|"); //$NON-NLS-1$ + TokenType COMMA = new ModulaTokenType("COMMA", ","); //$NON-NLS-1$ + TokenType DOT = new ModulaTokenType("DOT", "."); //$NON-NLS-1$ period + TokenType RANGE = new ModulaTokenType("RANGE", ".."); //$NON-NLS-1$ + TokenType BECOMES = new ModulaTokenType("BECOMES", ":="); //$NON-NLS-1$ + TokenType SEMICOLON = new ModulaTokenType("SEMICOLON", ";"); //$NON-NLS-1$ + + TokenType AND = new ModulaTokenType("AND", "&"); //$NON-NLS-1$ + TokenType NOT = new ModulaTokenType("NOT", "~"); //$NON-NLS-1$ + + TokenType EQU = new ModulaTokenType("EQU", "="); //$NON-NLS-1$ + TokenType NEQ = new ModulaTokenType("NEQ", "#"); //$NON-NLS-1$ '#', '<>' + TokenType LSS = new ModulaTokenType("LSS", "<"); //$NON-NLS-1$ + TokenType GTR = new ModulaTokenType("GTR", ">"); //$NON-NLS-1$ + TokenType LTEQ = new ModulaTokenType("LTEQ", "<="); //$NON-NLS-1$ + TokenType GTEQ = new ModulaTokenType("GTEQ", ">="); //$NON-NLS-1$ + + TokenType LEFT_SHIFT = new ModulaTokenType("LEFT_SHIFT", "<<"); //$NON-NLS-1$ + TokenType RIGHT_SHIFT = new ModulaTokenType("RIGHT_SHIFT", ">>"); //$NON-NLS-1$ + + TokenType EXPONENT = new ModulaTokenType("EXPONENT", "**"); //$NON-NLS-1$ + TokenType ALIAS = new ModulaTokenType("ALIAS", "::="); //$NON-NLS-1$ TopSpeed token + + + ModulaKeywordType AND_KEYWORD = new ModulaKeywordType("AND"); //$NON-NLS-1$ + ModulaKeywordType ASM_KEYWORD = new ModulaKeywordType("ASM"); //$NON-NLS-1$ + ModulaKeywordType ARRAY_KEYWORD = new ModulaKeywordType("ARRAY"); //$NON-NLS-1$ + ModulaKeywordType BEGIN_KEYWORD = new ModulaKeywordType("BEGIN"); //$NON-NLS-1$ + ModulaKeywordType BY_KEYWORD = new ModulaKeywordType("BY"); //$NON-NLS-1$ + ModulaKeywordType CASE_KEYWORD = new ModulaKeywordType("CASE"); //$NON-NLS-1$ + ModulaKeywordType CONST_KEYWORD = new ModulaKeywordType("CONST"); //$NON-NLS-1$ + ModulaKeywordType DEFINITION_KEYWORD = new ModulaKeywordType("DEFINITION"); //$NON-NLS-1$ + ModulaKeywordType DIV_KEYWORD = new ModulaKeywordType("DIV"); //$NON-NLS-1$ + ModulaKeywordType DO_KEYWORD = new ModulaKeywordType("DO"); //$NON-NLS-1$ + ModulaKeywordType ELSE_KEYWORD = new ModulaKeywordType("ELSE"); //$NON-NLS-1$ + ModulaKeywordType ELSIF_KEYWORD = new ModulaKeywordType("ELSIF"); //$NON-NLS-1$ + ModulaKeywordType END_KEYWORD = new ModulaKeywordType("END"); //$NON-NLS-1$ + ModulaKeywordType EXCEPT_KEYWORD = new ModulaKeywordType("EXCEPT"); //$NON-NLS-1$ + ModulaKeywordType EXIT_KEYWORD = new ModulaKeywordType("EXIT"); //$NON-NLS-1$ + ModulaKeywordType EXPORT_KEYWORD = new ModulaKeywordType("EXPORT"); //$NON-NLS-1$ + ModulaKeywordType FINALLY_KEYWORD = new ModulaKeywordType("FINALLY"); //$NON-NLS-1$ + ModulaKeywordType FOR_KEYWORD = new ModulaKeywordType("FOR"); //$NON-NLS-1$ + ModulaKeywordType FORWARD_KEYWORD = new ModulaKeywordType("FORWARD"); //$NON-NLS-1$ + ModulaKeywordType FROM_KEYWORD = new ModulaKeywordType("FROM"); //$NON-NLS-1$ + ModulaKeywordType IF_KEYWORD = new ModulaKeywordType("IF"); //$NON-NLS-1$ + ModulaKeywordType IMPLEMENTATION_KEYWORD = new ModulaKeywordType("IMPLEMENTATION"); //$NON-NLS-1$ + ModulaKeywordType IMPORT_KEYWORD = new ModulaKeywordType("IMPORT"); //$NON-NLS-1$ + ModulaKeywordType IN_KEYWORD = new ModulaKeywordType("IN"); //$NON-NLS-1$ + ModulaKeywordType IS_KEYWORD = new ModulaKeywordType("IS"); //$NON-NLS-1$ + ModulaKeywordType LOOP_KEYWORD = new ModulaKeywordType("LOOP"); //$NON-NLS-1$ + ModulaKeywordType MOD_KEYWORD = new ModulaKeywordType("MOD"); //$NON-NLS-1$ + ModulaKeywordType MODULE_KEYWORD = new ModulaKeywordType("MODULE"); //$NON-NLS-1$ + ModulaKeywordType NOT_KEYWORD = new ModulaKeywordType("NOT"); //$NON-NLS-1$ + ModulaKeywordType OF_KEYWORD = new ModulaKeywordType("OF"); //$NON-NLS-1$ + ModulaKeywordType OR_KEYWORD = new ModulaKeywordType("OR"); //$NON-NLS-1$ + ModulaKeywordType PACKEDSET_KEYWORD = new ModulaKeywordType("PACKEDSET"); //$NON-NLS-1$ + ModulaKeywordType POINTER_KEYWORD = new ModulaKeywordType("POINTER"); //$NON-NLS-1$ + ModulaKeywordType PROCEDURE_KEYWORD = new ModulaKeywordType("PROCEDURE"); //$NON-NLS-1$ + ModulaKeywordType QUALIFIED_KEYWORD = new ModulaKeywordType("QUALIFIED"); //$NON-NLS-1$ + ModulaKeywordType RECORD_KEYWORD = new ModulaKeywordType("RECORD"); //$NON-NLS-1$ + ModulaKeywordType REM_KEYWORD = new ModulaKeywordType("REM"); //$NON-NLS-1$ + ModulaKeywordType REPEAT_KEYWORD = new ModulaKeywordType("REPEAT"); //$NON-NLS-1$ + ModulaKeywordType RETRY_KEYWORD = new ModulaKeywordType("RETRY"); //$NON-NLS-1$ + ModulaKeywordType RETURN_KEYWORD = new ModulaKeywordType("RETURN"); //$NON-NLS-1$ + ModulaKeywordType SEQ_KEYWORD = new ModulaKeywordType("SEQ"); //$NON-NLS-1$ + ModulaKeywordType SET_KEYWORD = new ModulaKeywordType("SET"); //$NON-NLS-1$ + ModulaKeywordType THEN_KEYWORD = new ModulaKeywordType("THEN"); //$NON-NLS-1$ + ModulaKeywordType TO_KEYWORD = new ModulaKeywordType("TO"); //$NON-NLS-1$ + ModulaKeywordType TYPE_KEYWORD = new ModulaKeywordType("TYPE"); //$NON-NLS-1$ + ModulaKeywordType UNTIL_KEYWORD = new ModulaKeywordType("UNTIL"); //$NON-NLS-1$ + ModulaKeywordType VAR_KEYWORD = new ModulaKeywordType("VAR"); //$NON-NLS-1$ + ModulaKeywordType WHILE_KEYWORD = new ModulaKeywordType("WHILE"); //$NON-NLS-1$ + ModulaKeywordType WITH_KEYWORD = new ModulaKeywordType("WITH"); //$NON-NLS-1$ + + ModulaKeywordType LABEL_KEYWORD = new ModulaKeywordType("LABEL"); //$NON-NLS-1$ + ModulaKeywordType GOTO_KEYWORD = new ModulaKeywordType("GOTO"); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaKeywordType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaKeywordType.java new file mode 100644 index 0000000..202b27f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaKeywordType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +/** + * Base class for token corresponding to Modula-2/Oberon-2 compiler pragma keywords. + */ +public class PragmaKeywordType extends PragmaTokenType { + + public PragmaKeywordType(String debugName) { + super(debugName + "_PragmaKeyword", debugName); //$NON-NLS-1$ + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenType.java new file mode 100644 index 0000000..79fc9da --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +/** + * Base class for Modula-2/Oberon-2 compler pragmas. + */ +public class PragmaTokenType extends ModulaTokenType { + + public PragmaTokenType(String debugName, String designator) { + super(debugName, designator); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenTypes.java new file mode 100644 index 0000000..67f81e8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/PragmaTokenTypes.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.ast.TokenTypes; + +/** + * Modula-2/Oberon-2 scanner token types for compiler pragmas. + */ +public interface PragmaTokenTypes extends TokenTypes { + + TokenType PRAGMA_BEGIN = new PragmaTokenType("PRAGMA_BEGIN", "<*"); //$NON-NLS-1$ + TokenType PRAGMA_END = new PragmaTokenType("PRAGMA_END", "*>"); //$NON-NLS-1$ + TokenType PRAGMA_POP = new PragmaTokenType("PRAGMA_POP", "<* POP *>"); //$NON-NLS-1$ '<* POP *>' | '<*$>*>' + TokenType PRAGMA_PUSH = new PragmaTokenType("PRAGMA_PUSH", "<* PUSH *>"); //$NON-NLS-1$ '<* PUSH *>' | '<*$<*>' + + TokenType PRAGMA_ARGS_BEGIN = new PragmaTokenType("PRAGMA_ARGS_BEGIN", "<*$"); //$NON-NLS-1$ + TokenType PRAGMA_ARGS_POP_BEGIN = new PragmaTokenType("PRAGMA_ARGS_POP_BEGIN", "<*$>"); //$NON-NLS-1$ + TokenType PRAGMA_ARGS_PUSH_BEGIN = new PragmaTokenType("PRAGMA_ARGS_PUSH_BEGIN", "<*$<"); //$NON-NLS-1$ + TokenType PRAGMA_ARGS_POPPUSH_BEGIN = new PragmaTokenType("PRAGMA_ARGS_POPPUSH_BEGIN", "<*$|"); //$NON-NLS-1$ + + TokenType DEFINED_PRAGMA_KEYWORD = new PragmaKeywordType("DEFINED"); //$NON-NLS-1$ + TokenType NEW_PRAGMA_KEYWORD = new PragmaKeywordType("NEW"); //$NON-NLS-1$ + TokenType POP_PRAGMA_KEYWORD = new PragmaKeywordType("POP"); //$NON-NLS-1$ + TokenType PUSH_PRAGMA_KEYWORD = new PragmaKeywordType("PUSH"); //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/XdsParserTokenSets.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/XdsParserTokenSets.java new file mode 100644 index 0000000..ba52408 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/tokens/XdsParserTokenSets.java @@ -0,0 +1,70 @@ +package com.excelsior.xds.parser.modula.ast.tokens; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import com.excelsior.xds.parser.commons.ast.TokenType; + +public interface XdsParserTokenSets extends ModulaTokenSets +{ + Set RETURN_TERMINATION_SET = new HashSet(Arrays.asList( + END_KEYWORD, ELSE_KEYWORD, ELSIF_KEYWORD, + SEMICOLON, SEP + )); + + Set STATEMENT_TERMINATION_SET = new HashSet(Arrays.asList( + END_KEYWORD, ELSE_KEYWORD, ELSIF_KEYWORD, + UNTIL_KEYWORD, SEP, + FINALLY_KEYWORD, EXCEPT_KEYWORD + )); + + + Set TERM_LEVEL_OPERATION_SET = new HashSet(Arrays.asList( + DIV_KEYWORD, MOD_KEYWORD, REM_KEYWORD, SLASH, + TIMES, AND, LEFT_SHIFT, RIGHT_SHIFT + )); + + + Set END_ELSE_SEP_SET = new HashSet(Arrays.asList( + END_KEYWORD, ELSE_KEYWORD, SEP + )); + + Set CONST_VAR_TYPE_SET = new HashSet(Arrays.asList( + CONST_KEYWORD, VAR_KEYWORD, TYPE_KEYWORD + )); + + Set DECLARATION_SET = new HashSet(Arrays.asList( + CONST_KEYWORD, VAR_KEYWORD, TYPE_KEYWORD, + MODULE_KEYWORD, PROCEDURE_KEYWORD + )); + + + Set SKIP_CONSTRUCTOR_SET = new HashSet(Arrays.asList( + SEMICOLON, + END_KEYWORD, BEGIN_KEYWORD + )); + + + Set DECLARATION_SYNCHRONIZATION_SET = new HashSet(Arrays.asList( + CONST_KEYWORD, VAR_KEYWORD, TYPE_KEYWORD, + MODULE_KEYWORD, PROCEDURE_KEYWORD, + BEGIN_KEYWORD, END_KEYWORD + )); + + Set MODULE_DECLARATION_SYNCHRONIZATION_SET = new HashSet(Arrays.asList( + CONST_KEYWORD, VAR_KEYWORD, TYPE_KEYWORD, + MODULE_KEYWORD, PROCEDURE_KEYWORD, + BEGIN_KEYWORD, END_KEYWORD, + IMPORT_KEYWORD, FROM_KEYWORD + )); + + Set OBERON_PROCEDURE_SYNCHRONIZATION_SET = new HashSet(Arrays.asList( + END_KEYWORD, RPARENTH + )); + + Set FACTOR_SYNCHRONIZATION_SET = new HashSet(Arrays.asList( + END_KEYWORD, SEMICOLON, RPARENTH + )); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstArrayType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstArrayType.java new file mode 100644 index 0000000..fa064ca --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstArrayType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; + +public class AstArrayType extends AstTypeDef { + + public AstArrayType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumElement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumElement.java new file mode 100644 index 0000000..1b6a7c4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumElement.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; + +public class AstEnumElement extends AstSymbolDef implements IAstNodeWithIdentifier { + + public AstEnumElement(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumerationType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumerationType.java new file mode 100644 index 0000000..0123634 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstEnumerationType.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; + +public class AstEnumerationType extends AstTypeDef +{ + public AstEnumerationType(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstEnumElements() { + return findChildren(ModulaElementTypes.ENUM_ELEMENT); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstEnumElements()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalParameterType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalParameterType.java new file mode 100644 index 0000000..e2195f5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalParameterType.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; + +/** + * Type of the formal parameter in the procedure type definition. + */ +public class AstFormalParameterType extends AstSymbolRef { + + public AstFormalParameterType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalType.java new file mode 100644 index 0000000..138da3c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFormalType.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.AstSymbolRef; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +/** + * Type of the formal parameter in the procedure definition and declaration. + */ +public class AstFormalType extends AstSymbolRef { + + public AstFormalType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFotmalParameterTypeList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFotmalParameterTypeList.java new file mode 100644 index 0000000..bbe3637 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstFotmalParameterTypeList.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstFotmalParameterTypeList extends ModulaAstNode +{ + public AstFotmalParameterTypeList(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstIndexType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstIndexType.java new file mode 100644 index 0000000..3197c65 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstIndexType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstIndexType extends ModulaAstNode +{ + public AstIndexType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstOpenArrayType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstOpenArrayType.java new file mode 100644 index 0000000..23b1c04 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstOpenArrayType.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; + +public class AstOpenArrayType extends AstArrayType { + + public AstOpenArrayType(ModulaCompositeType elementType) { + super(elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstPointerType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstPointerType.java new file mode 100644 index 0000000..c48fc1d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstPointerType.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; + +public class AstPointerType extends AstTypeDef +{ + public AstPointerType(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstTypeElement getAstTypeElement() { + return findFirstChild( ModulaElementTypes.TYPE_ELEMENT + , ModulaElementTypes.TYPE_ELEMENT.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChild(visitor, getAstTypeElement()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureType.java new file mode 100644 index 0000000..a07f323 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureType.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; + +/** + * procedure type definition in Modula-2 style. + */ +public class AstProcedureType extends AstTypeDef +{ + public AstProcedureType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureTypeOberon.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureTypeOberon.java new file mode 100644 index 0000000..cd5ef20 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstProcedureTypeOberon.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; + +public class AstProcedureTypeOberon extends AstTypeDef +{ + public AstProcedureTypeOberon(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRangeType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRangeType.java new file mode 100644 index 0000000..6b70e38 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRangeType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.IRangeTypeSymbol; + +public class AstRangeType extends AstTypeDef +{ + public AstRangeType(ModulaCompositeType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordField.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordField.java new file mode 100644 index 0000000..aba6fc1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordField.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; + +public class AstRecordField extends AstSymbolDef { + + public AstRecordField(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + public AstTypeElement getAstTypeElement() { + AstTypeElement typeElementAst = null; + PstNode node = getParent(); + if (node instanceof AstRecordFieldList) { + typeElementAst = ((AstRecordFieldList)node).getAstTypeElement(); + } + return typeElementAst; + } + + public void visitTypeElement(ModulaAstVisitor visitor) { + AstTypeElement typeElementAst = getAstTypeElement(); + if (typeElementAst != null) { + typeElementAst.accept(visitor); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlock.java new file mode 100644 index 0000000..5ec96e3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlock.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; + +public abstract class AstRecordFieldBlock extends ModulaAstNode +{ + public AstRecordFieldBlock(PstCompositeNode parent, ElementType elementType) { + super(parent, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlockList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlockList.java new file mode 100644 index 0000000..a3722bf --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldBlockList.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordFieldBlockList extends ModulaAstNode +{ + public AstRecordFieldBlockList(ModulaCompositeType elementType) { + super(null, elementType); + } + + + public List getAstRecordFieldBlock() { + return findChildren(newRecordFieldBlockHasSet(), AstRecordFieldBlock.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstRecordFieldBlock()); + } + } + + + private static Set> newRecordFieldBlockHasSet() + { + Set> set = + new HashSet>(); + set.add(ModulaElementTypes.RECORD_SIMPLE_FIELD_BLOCK); + set.add(ModulaElementTypes.RECORD_VARIANT_FIELD_BLOCK); + return set; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldList.java new file mode 100644 index 0000000..ef0ad29 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordFieldList.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.List; + +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordFieldList extends ModulaAstNode +{ + public AstRecordFieldList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstRecordFields() { + return findChildren(ModulaElementTypes.RECORD_FIELD); + } + + public AstTypeElement getAstTypeElement() { + AstTypeElement typeElementAst = null; + PstNode node = getParent(); + if (node instanceof AstRecordSimpleFieldBlock) { + typeElementAst = ((AstRecordSimpleFieldBlock)node).getAstTypeElement(); + } + return typeElementAst; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstRecordFields()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordSimpleFieldBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordSimpleFieldBlock.java new file mode 100644 index 0000000..e68b91d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordSimpleFieldBlock.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordSimpleFieldBlock extends AstRecordFieldBlock +{ + public AstRecordSimpleFieldBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstRecordFieldList getAstRecordFieldList() { + return findFirstChild( ModulaElementTypes.RECORD_FIELD_LIST + , ModulaElementTypes.RECORD_FIELD_LIST.getNodeClass() ); + } + + public AstTypeElement getAstTypeElement() { + return findFirstChild( ModulaElementTypes.TYPE_ELEMENT + , ModulaElementTypes.TYPE_ELEMENT.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChild(visitor, getAstRecordFieldList()); + acceptChild(visitor, getAstTypeElement()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordType.java new file mode 100644 index 0000000..64c00e7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordType.java @@ -0,0 +1,74 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.IAstSymbolScope; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +public class AstRecordType extends AstTypeDef + implements IAstSymbolScope, IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstRecordType(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstRecordFieldBlockList getAstRecordFieldBlockList() { + return findFirstChild( ModulaElementTypes.RECORD_FIELD_BLOCK_LIST + , ModulaElementTypes.RECORD_FIELD_BLOCK_LIST.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getScope() { + return getSymbol(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstRecordFieldBlockList()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "RECORD"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariant.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariant.java new file mode 100644 index 0000000..90d587a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariant.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +/** + * RecordVariant = RecordVariantLabelList ":" FieldListSequence
+ */ +public class AstRecordVariant extends ModulaAstNode +{ + public AstRecordVariant(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstRecordVariantLabelList getAstRecordVariantLabelList() { + return findFirstChild( ModulaElementTypes.RECORD_VARIANT_LABEL_LIST + , ModulaElementTypes.RECORD_VARIANT_LABEL_LIST.getNodeClass() ); + } + + public AstRecordFieldBlockList getAstRecordFieldBlockList() { + return findFirstChild( ModulaElementTypes.RECORD_FIELD_BLOCK_LIST + , ModulaElementTypes.RECORD_FIELD_BLOCK_LIST.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstRecordVariantLabelList()); + acceptChild(visitor, getAstRecordFieldBlockList()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantElsePart.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantElsePart.java new file mode 100644 index 0000000..8c605f5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantElsePart.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; + +/** + * RecordVariantElsePart = "ELSE" FieldListSequence
+ */ +public class AstRecordVariantElsePart extends ModulaAstNode + implements IAstNodeWithIdentifier +{ + public AstRecordVariantElsePart(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstRecordFieldBlockList getAstRecordFieldBlockList() { + return findFirstChild( ModulaElementTypes.RECORD_FIELD_BLOCK_LIST + , ModulaElementTypes.RECORD_FIELD_BLOCK_LIST.getNodeClass() ); + } + + public PstLeafNode getElseKeyword() { + return findFirstChild(ModulaTokenTypes.ELSE_KEYWORD, PstLeafNode.class); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return getElseKeyword(); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstRecordFieldBlockList()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantFieldBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantFieldBlock.java new file mode 100644 index 0000000..86c8ba7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantFieldBlock.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordVariantFieldBlock extends AstRecordFieldBlock implements IAstFrameNode +{ + private List frame = new ArrayList(4); + + public AstRecordVariantFieldBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstRecordVariantSelector getAstRecordVariantSelector() { + return findFirstChild( ModulaElementTypes.RECORD_VARIANT_SELECTOR + , ModulaElementTypes.RECORD_VARIANT_SELECTOR.getNodeClass() ); + } + + public AstRecordVariantList getAstRecordVariantList() { + return findFirstChild( ModulaElementTypes.RECORD_VARIANT_LIST + , ModulaElementTypes.RECORD_VARIANT_LIST.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstRecordVariantSelector()); + acceptChild(visitor, getAstRecordVariantList()); + } + } + + /** + * {@inheritDoc} + */ + @Override + public Collection getFrameNodes() { + return frame; + } + + + /** + * {@inheritDoc} + */ + @Override + public void addFrameNode(PstNode node) { + frame.add(node); + } + + + + /** + * {@inheritDoc} + */ + @Override + public String getFrameName() { + return "CASE"; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabel.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabel.java new file mode 100644 index 0000000..aa3c7cd --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabel.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.expressions.AstConstantExpression; + +/** + * RecordVariantLabel = ConstantExpression [".." ConstantExpression]
+ */ +public class AstRecordVariantLabel extends AstConstantExpression +{ + private String text; + + public AstRecordVariantLabel(ModulaCompositeType elementType) { + super(elementType); + } + + public void setText(String labeText) { + text = labeText; + } + + public String getText() { + return text; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabelList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabelList.java new file mode 100644 index 0000000..aea84e0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantLabelList.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordVariantLabelList extends ModulaAstNode +{ + public AstRecordVariantLabelList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstRecordVariantLabes() { + return findChildren( ModulaElementTypes.RECORD_VARIANT_LABEL + , ModulaElementTypes.RECORD_VARIANT_LABEL.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstRecordVariantLabes()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantList.java new file mode 100644 index 0000000..85f529e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantList.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstRecordVariantList extends ModulaAstNode +{ + public AstRecordVariantList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getAstRecordVariants() { + return findChildren(ModulaElementTypes.RECORD_VARIANT); + } + + public AstRecordVariantElsePart getAstRecordVariantElsePart() { + return findFirstChild( ModulaElementTypes.RECORD_VARIANT_ELSE_PART + , ModulaElementTypes.RECORD_VARIANT_ELSE_PART.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getAstRecordVariants()); + acceptChild(visitor, getAstRecordVariantElsePart()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantSelector.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantSelector.java new file mode 100644 index 0000000..2271d07 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstRecordVariantSelector.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstQualifiedName; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IRecordVariantSelectorSymbol; + +public class AstRecordVariantSelector extends AstSymbolDef + implements IAstNodeWithIdentifier +{ + public AstRecordVariantSelector(ModulaCompositeType elementType) { + super(null, elementType); + } + + /** + * {@inheritDoc} + */ + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + public AstQualifiedName getAstQualident() { + return findFirstChild( ModulaElementTypes.QUALIFIED_NAME + , ModulaElementTypes.QUALIFIED_NAME.getNodeClass() ); + } + + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstSetType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstSetType.java new file mode 100644 index 0000000..e09b2c5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstSetType.java @@ -0,0 +1,28 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.type.ISetTypeSymbol; + +public class AstSetType extends AstTypeDef +{ + public AstSetType(ModulaCompositeType elementType) { + super(null, elementType); + } + + public AstTypeElement getTypeElement() { + return findFirstChild(ModulaElementTypes.TYPE_ELEMENT, ModulaElementTypes.TYPE_ELEMENT.getNodeClass()); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChild(visitor, getTypeElement()); + } + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclaration.java new file mode 100644 index 0000000..85919e5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclaration.java @@ -0,0 +1,45 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstDecoratedIdentifier; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class AstTypeDeclaration extends AstSymbolDef + implements IAstNodeWithIdentifier +{ + public AstTypeDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public PstNode getIdentifier() { + AstDecoratedIdentifier identifierAst = findFirstChild( ModulaElementTypes.DECORATED_IDENTIFIER + , ModulaElementTypes.DECORATED_IDENTIFIER.getNodeClass() ); + PstNode identifier = null; + if (identifierAst != null) { + identifier = identifierAst.getIdentifier(); + } + return identifier; + } + + + public AstTypeElement getAstTypeElement() { + return findFirstChild( ModulaElementTypes.TYPE_ELEMENT + , ModulaElementTypes.TYPE_ELEMENT.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + if (visitor.visit(this)) { + acceptChild(visitor, getAstTypeElement()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclarationBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclarationBlock.java new file mode 100644 index 0000000..93a2ae8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDeclarationBlock.java @@ -0,0 +1,32 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstTypeDeclarationBlock extends ModulaAstNode +{ + public AstTypeDeclarationBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getTypeDeclarations() { + return findChildren( ModulaElementTypes.TYPE_DECLARATION + , ModulaElementTypes.TYPE_DECLARATION.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getTypeDeclarations()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDef.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDef.java new file mode 100644 index 0000000..0eac43c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeDef.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.commons.ast.ElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public abstract class AstTypeDef extends AstSymbolDef +{ + public AstTypeDef(PstCompositeNode parent, ElementType elementType) { + super(null, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeElement.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeElement.java new file mode 100644 index 0000000..db2c5b9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/types/AstTypeElement.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.parser.modula.ast.types; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public class AstTypeElement extends ModulaAstNode +{ + public AstTypeElement(ModulaCompositeType elementType) { + super(null, elementType); + } + + @SuppressWarnings("unchecked") + public AstTypeDef getTypeDefinition() { + return findAstFirtsChild(this, AstTypeDef.class); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChild(visitor, getTypeDefinition()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariable.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariable.java new file mode 100644 index 0000000..f31e932 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariable.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.parser.modula.ast.variables; + +import com.excelsior.xds.parser.commons.ast.IAstNodeWithIdentifier; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.AstSymbolDef; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.procedures.AstProcedure; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; + +public class AstVariable extends AstSymbolDef implements IAstNodeWithIdentifier{ + + public AstVariable(ModulaCompositeType elementType) { + super(null, elementType); + } + + @Override + public PstNode getIdentifier() { + return findFirstChild(ModulaTokenTypes.IDENTIFIER, PstNode.class); + } + + public AstVariableList getVariableList() { + return ModulaAst.findParent(this, ModulaElementTypes.VARIABLE_LIST); + } + + public boolean isLocal() { + PstNode node = getParent(); + if (node instanceof AstVariableList) { + node = node.getParent(); + if (node instanceof AstVariableDeclaration) { + node = node.getParent(); + if (node instanceof AstVariableDeclarationBlock) { + node = node.getParent(); + } + } + } + return (node instanceof AstProcedure); + } + + public AstTypeElement getAstTypeElement() { + AstTypeElement typeElementAst = null; + PstNode node = getParent(); + if (node instanceof AstVariableList) { + typeElementAst = ((AstVariableList)node).getAstTypeElement(); + } + return typeElementAst; + } + + public void visitTypeElement(ModulaAstVisitor visitor) { + AstTypeElement typeElementAst = getAstTypeElement(); + if (typeElementAst != null) { + typeElementAst.accept(visitor); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + visitor.visit(this); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclaration.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclaration.java new file mode 100644 index 0000000..28dfda1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclaration.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.parser.modula.ast.variables; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; + +public class AstVariableDeclaration extends ModulaAstNode +{ + public AstVariableDeclaration(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getVariableList() { + return findChildren(ModulaElementTypes.VARIABLE_LIST); + } + + public AstTypeElement getAstTypeElement() { + return findFirstChild( ModulaElementTypes.TYPE_ELEMENT + , ModulaElementTypes.TYPE_ELEMENT.getNodeClass() ); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getVariableList()); + acceptChild(visitor, getAstTypeElement()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclarationBlock.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclarationBlock.java new file mode 100644 index 0000000..fe97722 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableDeclarationBlock.java @@ -0,0 +1,31 @@ +package com.excelsior.xds.parser.modula.ast.variables; + +import java.util.List; + +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; + +public class AstVariableDeclarationBlock extends ModulaAstNode +{ + public AstVariableDeclarationBlock(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getVariableDeclarations() { + return findChildren(ModulaElementTypes.VARIABLE_DECLARATION); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getVariableDeclarations()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableList.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableList.java new file mode 100644 index 0000000..ec685cd --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/ast/variables/AstVariableList.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.modula.ast.variables; + +import java.util.List; + +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaAstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAstVisitor; +import com.excelsior.xds.parser.modula.ast.ModulaCompositeType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.types.AstTypeElement; + +public class AstVariableList extends ModulaAstNode +{ + public AstVariableList(ModulaCompositeType elementType) { + super(null, elementType); + } + + public List getVariables() { + return findChildren(ModulaElementTypes.VARIABLE); + } + + public AstVariableDeclaration getVariableDeclaration() { + return ModulaAst.findParent(this, ModulaElementTypes.VARIABLE_DECLARATION); + } + + public AstTypeElement getAstTypeElement() { + AstTypeElement typeElementAst = null; + PstNode node = getParent(); + if (node instanceof AstVariableDeclaration) { + typeElementAst = ((AstVariableDeclaration)node).getAstTypeElement(); + } + return typeElementAst; + } + + /** + * {@inheritDoc} + */ + @Override + protected void doAccept(ModulaAstVisitor visitor) { + boolean visitChildren = visitor.visit(this); + if (visitChildren) { + acceptChildren(visitor, getVariables()); + } + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/TokenRestorePosition.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/TokenRestorePosition.java new file mode 100644 index 0000000..f59a8cb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/TokenRestorePosition.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.parser.modula.scanner.jflex; + +import com.excelsior.xds.core.text.TextPosition; + +public class TokenRestorePosition extends TextPosition +{ + /** the current lexical state */ + private final int state; + + public TokenRestorePosition (int line, int column, int offset, int state) { + super(line, column, offset); + this.state = state; + } + + /** @return lexical state of the current position */ + public int getState() { + return state; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/_XdsFlexScanner.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/_XdsFlexScanner.java new file mode 100644 index 0000000..40ef754 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/_XdsFlexScanner.java @@ -0,0 +1,1432 @@ +/* The following code was generated by JFlex 1.4.3 on 14.02.14 1:15 */ + +package com.excelsior.xds.parser.modula.scanner.jflex; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; + + +/** + * This class is a scanner generated by + * JFlex 1.4.3 + * on 14.02.14 1:15 from the specification file + * xds.flex + */ +@SuppressWarnings("unused") +public class _XdsFlexScanner implements ModulaTokenTypes, PragmaTokenTypes { + /** initial size of the lookahead buffer */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** lexical states */ + public static final int IN_BLOCK_COMMENT = 2; + public static final int YYINITIAL = 0; + public static final int IN_CPP_BLOCK_COMMENT = 4; + public static final int IN_PRAGMA_BLOCK = 6; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0, 1, 1, 2, 2, 3, 3 + }; + + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED = + "\11\0\1\2\1\1\1\0\1\2\1\1\22\0\1\2\1\66\1\25"+ + "\1\76\1\36\1\0\1\71\1\26\1\31\1\33\1\32\1\15\1\73"+ + "\1\27\1\16\1\30\10\5\2\6\1\67\1\72\1\34\1\75\1\35"+ + "\1\0\1\70\1\44\1\10\1\21\1\17\1\14\1\54\1\51\1\12"+ + "\1\52\1\3\1\60\1\56\1\46\1\45\1\41\1\40\1\61\1\47"+ + "\1\43\1\53\1\42\1\55\1\57\1\23\1\50\1\3\1\62\1\0"+ + "\1\63\1\70\1\3\1\0\1\7\1\11\1\22\3\7\1\3\1\13"+ + "\1\20\16\3\1\24\2\3\1\64\1\37\1\65\1\74\53\0\1\3"+ + "\12\0\1\3\4\0\1\3\5\0\27\3\1\0\37\3\1\0\u013f\3"+ + "\31\0\162\3\4\0\14\3\16\0\5\3\11\0\1\3\213\0\1\3"+ + "\13\0\1\3\1\0\3\3\1\0\1\3\1\0\24\3\1\0\54\3"+ + "\1\0\46\3\1\0\5\3\4\0\202\3\10\0\105\3\1\0\46\3"+ + "\2\0\2\3\6\0\20\3\41\0\46\3\2\0\1\3\7\0\47\3"+ + "\110\0\33\3\5\0\3\3\56\0\32\3\5\0\13\3\25\0\12\4"+ + "\4\0\2\3\1\0\143\3\1\0\1\3\17\0\2\3\7\0\2\3"+ + "\12\4\3\3\2\0\1\3\20\0\1\3\1\0\36\3\35\0\3\3"+ + "\60\0\46\3\13\0\1\3\u0152\0\66\3\3\0\1\3\22\0\1\3"+ + "\7\0\12\3\4\0\12\4\25\0\10\3\2\0\2\3\2\0\26\3"+ + "\1\0\7\3\1\0\1\3\3\0\4\3\3\0\1\3\36\0\2\3"+ + "\1\0\3\3\4\0\12\4\2\3\23\0\6\3\4\0\2\3\2\0"+ + "\26\3\1\0\7\3\1\0\2\3\1\0\2\3\1\0\2\3\37\0"+ + "\4\3\1\0\1\3\7\0\12\4\2\0\3\3\20\0\11\3\1\0"+ + "\3\3\1\0\26\3\1\0\7\3\1\0\2\3\1\0\5\3\3\0"+ + "\1\3\22\0\1\3\17\0\2\3\4\0\12\4\25\0\10\3\2\0"+ + "\2\3\2\0\26\3\1\0\7\3\1\0\2\3\1\0\5\3\3\0"+ + "\1\3\36\0\2\3\1\0\3\3\4\0\12\4\1\0\1\3\21\0"+ + "\1\3\1\0\6\3\3\0\3\3\1\0\4\3\3\0\2\3\1\0"+ + "\1\3\1\0\2\3\3\0\2\3\3\0\3\3\3\0\10\3\1\0"+ + "\3\3\55\0\11\4\25\0\10\3\1\0\3\3\1\0\27\3\1\0"+ + "\12\3\1\0\5\3\46\0\2\3\4\0\12\4\25\0\10\3\1\0"+ + "\3\3\1\0\27\3\1\0\12\3\1\0\5\3\3\0\1\3\40\0"+ + "\1\3\1\0\2\3\4\0\12\4\25\0\10\3\1\0\3\3\1\0"+ + "\27\3\1\0\20\3\46\0\2\3\4\0\12\4\25\0\22\3\3\0"+ + "\30\3\1\0\11\3\1\0\1\3\2\0\7\3\72\0\60\3\1\0"+ + "\2\3\14\0\7\3\11\0\12\4\47\0\2\3\1\0\1\3\2\0"+ + "\2\3\1\0\1\3\2\0\1\3\6\0\4\3\1\0\7\3\1\0"+ + "\3\3\1\0\1\3\1\0\1\3\2\0\2\3\1\0\4\3\1\0"+ + "\2\3\11\0\1\3\2\0\5\3\1\0\1\3\11\0\12\4\2\0"+ + "\2\3\42\0\1\3\37\0\12\4\26\0\10\3\1\0\42\3\35\0"+ + "\4\3\164\0\42\3\1\0\5\3\1\0\2\3\25\0\12\4\6\0"+ + "\6\3\112\0\46\3\12\0\51\3\7\0\132\3\5\0\104\3\5\0"+ + "\122\3\6\0\7\3\1\0\77\3\1\0\1\3\1\0\4\3\2\0"+ + "\7\3\1\0\1\3\1\0\4\3\2\0\47\3\1\0\1\3\1\0"+ + "\4\3\2\0\37\3\1\0\1\3\1\0\4\3\2\0\7\3\1\0"+ + "\1\3\1\0\4\3\2\0\7\3\1\0\7\3\1\0\27\3\1\0"+ + "\37\3\1\0\1\3\1\0\4\3\2\0\7\3\1\0\47\3\1\0"+ + "\23\3\16\0\11\4\56\0\125\3\14\0\u026c\3\2\0\10\3\12\0"+ + "\32\3\5\0\113\3\25\0\15\3\1\0\4\3\16\0\22\3\16\0"+ + "\22\3\16\0\15\3\1\0\3\3\17\0\64\3\43\0\1\3\4\0"+ + "\1\3\3\0\12\4\46\0\12\4\6\0\130\3\10\0\51\3\127\0"+ + "\35\3\51\0\12\4\36\3\2\0\5\3\u038b\0\154\3\224\0\234\3"+ + "\4\0\132\3\6\0\26\3\2\0\6\3\2\0\46\3\2\0\6\3"+ + "\2\0\10\3\1\0\1\3\1\0\1\3\1\0\1\3\1\0\37\3"+ + "\2\0\65\3\1\0\7\3\1\0\1\3\3\0\3\3\1\0\7\3"+ + "\3\0\4\3\2\0\6\3\4\0\15\3\5\0\3\3\1\0\7\3"+ + "\164\0\1\3\15\0\1\3\202\0\1\3\4\0\1\3\2\0\12\3"+ + "\1\0\1\3\3\0\5\3\6\0\1\3\1\0\1\3\1\0\1\3"+ + "\1\0\4\3\1\0\3\3\1\0\7\3\3\0\3\3\5\0\5\3"+ + "\u0ebb\0\2\3\52\0\5\3\5\0\2\3\4\0\126\3\6\0\3\3"+ + "\1\0\132\3\1\0\4\3\5\0\50\3\4\0\136\3\21\0\30\3"+ + "\70\0\20\3\u0200\0\u19b6\3\112\0\u51a6\3\132\0\u048d\3\u0773\0\u2ba4\3"+ + "\u215c\0\u012e\3\2\0\73\3\225\0\7\3\14\0\5\3\5\0\1\3"+ + "\1\0\12\3\1\0\15\3\1\0\5\3\1\0\1\3\1\0\2\3"+ + "\1\0\2\3\1\0\154\3\41\0\u016b\3\22\0\100\3\2\0\66\3"+ + "\50\0\14\3\164\0\5\3\1\0\207\3\23\0\12\4\7\0\32\3"+ + "\6\0\32\3\13\0\131\3\3\0\6\3\2\0\6\3\2\0\6\3"+ + "\2\0\3\3\43\0"; + + /** + * Translates characters to character classes + */ + private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + + /** + * Translates DFA states to action switch labels. + */ + private static final int [] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 = + "\4\0\1\1\1\2\1\3\2\4\2\3\1\5\1\6"+ + "\2\3\2\1\1\7\1\10\1\11\1\12\1\13\1\14"+ + "\1\15\1\16\20\3\1\17\1\20\1\21\1\22\1\16"+ + "\1\23\1\24\1\25\1\26\1\27\1\30\1\31\1\32"+ + "\4\33\1\3\1\12\1\14\2\3\1\4\1\0\1\34"+ + "\1\35\1\36\1\37\1\40\1\3\1\41\3\3\1\42"+ + "\1\3\1\43\3\3\1\0\1\44\1\0\1\45\1\46"+ + "\1\47\1\50\1\51\1\52\1\53\1\54\1\55\1\56"+ + "\3\3\1\57\1\60\11\3\1\61\1\62\1\3\1\63"+ + "\1\3\1\64\12\3\1\0\1\65\1\66\1\67\1\70"+ + "\1\3\1\71\3\3\1\36\1\0\1\72\1\0\1\73"+ + "\4\3\1\74\2\3\1\75\2\3\7\0\1\76\1\0"+ + "\4\3\1\77\1\100\1\101\1\102\1\3\1\103\1\104"+ + "\2\3\1\105\5\3\1\106\2\3\1\107\5\3\1\110"+ + "\1\3\1\111\1\3\1\112\1\36\1\0\1\113\1\0"+ + "\3\3\1\114\1\115\3\3\1\116\1\117\2\0\1\120"+ + "\1\0\1\121\1\122\1\123\2\0\12\3\1\124\2\3"+ + "\1\125\1\126\1\3\1\127\1\3\1\130\2\3\1\131"+ + "\2\3\1\132\1\133\1\134\2\3\1\135\1\3\1\136"+ + "\5\0\3\3\1\137\1\140\4\3\1\141\4\3\1\142"+ + "\1\143\2\3\1\144\1\145\1\3\1\146\1\147\3\3"+ + "\1\150\1\151\1\152\1\153\1\154\6\3\1\155\3\3"+ + "\1\156\1\157\1\3\1\160\6\3\1\161\1\162\1\3"+ + "\1\163\1\164\4\3\1\165"; + + private static int [] zzUnpackAction() { + int [] result = new int[312]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Translates a state to a row index in the transition table + */ + private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = + "\0\0\0\77\0\176\0\275\0\374\0\u013b\0\u017a\0\u01b9"+ + "\0\u01f8\0\u0237\0\u0276\0\374\0\u02b5\0\u02f4\0\u0333\0\u0372"+ + "\0\u03b1\0\u03f0\0\u042f\0\u046e\0\u04ad\0\374\0\u04ec\0\u052b"+ + "\0\374\0\u056a\0\u05a9\0\u05e8\0\u0627\0\u0666\0\u06a5\0\u06e4"+ + "\0\u0723\0\u0762\0\u07a1\0\u07e0\0\u081f\0\u085e\0\u089d\0\u08dc"+ + "\0\u091b\0\374\0\374\0\374\0\374\0\u095a\0\u0999\0\374"+ + "\0\374\0\374\0\374\0\374\0\374\0\374\0\374\0\u09d8"+ + "\0\u0a17\0\u0a56\0\u0a95\0\u0ad4\0\u0b13\0\u0b52\0\u0b91\0\u0bd0"+ + "\0\u0c0f\0\u0c0f\0\374\0\u0c4e\0\u0c0f\0\374\0\u0c8d\0\u017a"+ + "\0\u0ccc\0\u0d0b\0\u0d4a\0\374\0\u0d89\0\u017a\0\u0dc8\0\u0e07"+ + "\0\u0e46\0\u0372\0\374\0\u03b1\0\u0e85\0\u0ec4\0\u0f03\0\u0f42"+ + "\0\374\0\u0f81\0\374\0\374\0\374\0\374\0\u0fc0\0\u0fff"+ + "\0\u103e\0\u017a\0\u017a\0\u107d\0\u10bc\0\u10fb\0\u113a\0\u1179"+ + "\0\u11b8\0\u11f7\0\u1236\0\u1275\0\u017a\0\u017a\0\u12b4\0\u017a"+ + "\0\u12f3\0\u017a\0\u1332\0\u1371\0\u13b0\0\u13ef\0\u142e\0\u146d"+ + "\0\u14ac\0\u14eb\0\u152a\0\u1569\0\u15a8\0\374\0\374\0\374"+ + "\0\374\0\u15e7\0\374\0\u1626\0\u1665\0\u16a4\0\u16e3\0\u1722"+ + "\0\374\0\u1761\0\374\0\u17a0\0\u17df\0\u181e\0\u185d\0\u017a"+ + "\0\u189c\0\u18db\0\u017a\0\u191a\0\u1959\0\u0f03\0\u1998\0\u19d7"+ + "\0\u0f42\0\u1a16\0\u1a55\0\u1a94\0\u1ad3\0\u1b12\0\u1b51\0\u1b90"+ + "\0\u1bcf\0\u1c0e\0\u017a\0\u017a\0\u017a\0\u017a\0\u1c4d\0\u017a"+ + "\0\u1c8c\0\u1ccb\0\u1d0a\0\u017a\0\u1d49\0\u1d88\0\u1dc7\0\u1e06"+ + "\0\u1e45\0\u1e84\0\u1ec3\0\u1f02\0\u017a\0\u1f41\0\u1f80\0\u1fbf"+ + "\0\u1ffe\0\u203d\0\374\0\u207c\0\u017a\0\u20bb\0\u017a\0\u20fa"+ + "\0\u2139\0\u2178\0\u21b7\0\u21f6\0\u2235\0\u2274\0\u017a\0\u017a"+ + "\0\u22b3\0\u22f2\0\u2331\0\u017a\0\u0f03\0\u2370\0\u23af\0\374"+ + "\0\u1ad3\0\u23ee\0\u242d\0\374\0\u246c\0\u24ab\0\u24ea\0\u2529"+ + "\0\u2568\0\u25a7\0\u25e6\0\u2625\0\u2664\0\u26a3\0\u26e2\0\u2721"+ + "\0\u017a\0\u2760\0\u279f\0\u017a\0\u017a\0\u27de\0\u017a\0\u281d"+ + "\0\u017a\0\u285c\0\u289b\0\u017a\0\u28da\0\u2919\0\u017a\0\374"+ + "\0\u017a\0\u2958\0\u2997\0\u017a\0\u29d6\0\u017a\0\u23ee\0\u2a15"+ + "\0\u242d\0\u2a54\0\u2a93\0\u2ad2\0\u2b11\0\u2b50\0\u017a\0\u017a"+ + "\0\u2b8f\0\u2bce\0\u2c0d\0\u2c4c\0\u017a\0\u2c8b\0\u2cca\0\u2d09"+ + "\0\u2d48\0\u017a\0\u017a\0\u2d87\0\u2dc6\0\u017a\0\u017a\0\u2e05"+ + "\0\374\0\374\0\u2e44\0\u2e83\0\u2ec2\0\u017a\0\u017a\0\u017a"+ + "\0\u017a\0\u017a\0\u2f01\0\u2f40\0\u2f7f\0\u2fbe\0\u2ffd\0\u303c"+ + "\0\u017a\0\u307b\0\u30ba\0\u30f9\0\u017a\0\u017a\0\u3138\0\u017a"+ + "\0\u3177\0\u31b6\0\u31f5\0\u3234\0\u3273\0\u32b2\0\u017a\0\u017a"+ + "\0\u32f1\0\u017a\0\u017a\0\u3330\0\u336f\0\u33ae\0\u33ed\0\u017a"; + + private static int [] zzUnpackRowMap() { + int [] result = new int[312]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int [] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 = + "\1\5\2\6\1\7\1\5\1\10\1\11\1\7\1\12"+ + "\3\7\1\13\1\14\1\15\1\16\1\7\1\17\3\7"+ + "\1\20\1\21\1\22\1\23\1\24\1\25\1\26\1\27"+ + "\1\30\1\5\1\31\1\32\1\33\1\34\1\35\1\36"+ + "\1\37\1\40\1\41\1\7\1\42\1\43\1\44\1\45"+ + "\1\46\1\47\1\50\1\7\1\51\1\52\1\53\1\54"+ + "\1\55\1\56\1\57\1\60\1\61\1\62\1\63\1\64"+ + "\1\65\1\66\31\67\1\70\1\71\74\67\1\70\1\67"+ + "\1\72\44\67\1\5\2\6\1\7\1\5\1\10\1\11"+ + "\1\7\1\12\3\7\1\13\1\14\1\15\1\73\1\7"+ + "\1\17\3\7\1\20\1\21\1\22\1\23\1\24\1\74"+ + "\1\26\1\75\1\30\1\5\1\31\1\76\1\33\1\34"+ + "\1\35\1\36\1\77\1\40\1\41\1\7\1\42\1\43"+ + "\1\44\1\45\1\46\1\47\1\50\1\7\1\51\1\52"+ + "\1\53\1\54\1\55\1\56\1\57\1\60\1\61\1\62"+ + "\1\63\1\64\1\65\1\66\100\0\2\6\77\0\12\7"+ + "\2\0\6\7\13\0\22\7\22\0\1\10\1\100\1\101"+ + "\2\102\2\103\1\101\1\0\1\104\1\101\1\0\2\105"+ + "\2\106\17\0\1\101\7\0\1\101\27\0\1\11\1\100"+ + "\3\101\2\103\1\101\1\0\1\104\1\101\1\0\2\105"+ + "\2\106\17\0\1\101\7\0\1\101\25\0\11\7\1\107"+ + "\2\0\6\7\13\0\10\7\1\110\11\7\20\0\12\7"+ + "\2\0\4\7\1\111\1\7\13\0\5\7\1\112\10\7"+ + "\1\113\3\7\33\0\1\114\63\0\11\7\1\115\2\0"+ + "\6\7\13\0\1\7\1\116\10\7\1\117\7\7\20\0"+ + "\12\7\2\0\6\7\13\0\1\7\1\120\2\7\1\121"+ + "\15\7\15\0\1\122\1\123\23\122\1\123\51\122\1\124"+ + "\1\123\24\124\1\123\50\124\27\0\1\125\77\0\1\126"+ + "\1\0\1\127\76\0\1\130\33\0\1\52\1\54\41\0"+ + "\1\131\76\0\1\132\1\0\1\133\1\66\37\0\1\134"+ + "\36\0\1\135\37\0\1\136\4\0\12\7\2\0\6\7"+ + "\13\0\1\7\1\137\2\7\1\140\2\7\1\141\12\7"+ + "\20\0\12\7\2\0\6\7\13\0\7\7\1\142\4\7"+ + "\1\143\5\7\20\0\12\7\2\0\6\7\13\0\5\7"+ + "\1\144\14\7\20\0\11\7\1\145\2\0\6\7\13\0"+ + "\22\7\20\0\12\7\2\0\6\7\13\0\3\7\1\146"+ + "\1\7\1\147\1\7\1\150\12\7\20\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\151\20\7\20\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\152\20\7\20\0\11\7\1\153"+ + "\2\0\6\7\13\0\22\7\20\0\12\7\2\0\6\7"+ + "\13\0\1\7\1\154\20\7\20\0\12\7\2\0\6\7"+ + "\13\0\3\7\1\155\1\7\1\156\1\157\5\7\1\160"+ + "\5\7\20\0\7\7\1\161\2\7\2\0\6\7\13\0"+ + "\1\7\1\162\6\7\1\163\11\7\20\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\164\5\7\1\165\2\7\1\166"+ + "\7\7\20\0\12\7\2\0\6\7\13\0\4\7\1\167"+ + "\15\7\20\0\12\7\2\0\6\7\13\0\1\7\1\170"+ + "\2\7\1\171\15\7\20\0\7\7\1\172\2\7\2\0"+ + "\6\7\13\0\12\7\1\173\7\7\20\0\12\7\2\0"+ + "\6\7\13\0\2\7\1\174\17\7\50\0\1\53\132\0"+ + "\1\175\5\0\1\176\33\0\1\177\77\0\1\200\73\0"+ + "\1\201\51\0\11\7\1\202\2\0\6\7\13\0\1\7"+ + "\1\116\10\7\1\117\7\7\47\0\1\131\2\0\1\203"+ + "\75\0\1\133\1\66\37\0\1\134\4\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\204\1\205\1\7\1\140\2\7"+ + "\1\141\12\7\20\0\11\7\1\206\2\0\6\7\13\0"+ + "\1\7\1\151\20\7\22\0\2\100\3\101\2\103\1\101"+ + "\1\0\1\104\1\101\1\0\2\101\2\106\17\0\1\101"+ + "\7\0\1\101\27\0\5\101\2\103\1\101\2\0\1\101"+ + "\1\0\2\101\2\106\17\0\1\101\7\0\1\101\27\0"+ + "\2\207\5\0\1\210\1\0\1\211\1\212\1\213\61\0"+ + "\12\7\2\0\6\7\13\0\11\7\1\214\10\7\20\0"+ + "\12\7\2\0\2\7\1\215\3\7\13\0\1\216\11\7"+ + "\1\217\7\7\20\0\12\7\2\0\1\220\5\7\13\0"+ + "\22\7\20\0\12\7\2\0\6\7\13\0\3\7\1\221"+ + "\16\7\20\0\12\7\2\0\6\7\13\0\14\7\1\222"+ + "\5\7\20\0\12\7\2\0\6\7\13\0\15\7\1\223"+ + "\4\7\20\0\12\7\2\0\6\7\13\0\5\7\1\224"+ + "\14\7\20\0\12\7\2\0\6\7\13\0\3\7\1\225"+ + "\16\7\15\0\1\125\1\0\75\125\1\126\1\0\75\126"+ + "\30\226\1\227\1\226\1\230\44\226\31\231\1\232\1\233"+ + "\44\231\2\0\1\234\33\0\1\235\1\0\1\236\41\0"+ + "\12\7\2\0\6\7\13\0\12\7\1\237\7\7\20\0"+ + "\12\7\2\0\2\7\1\240\3\7\13\0\22\7\20\0"+ + "\12\7\2\0\6\7\13\0\1\7\1\241\20\7\20\0"+ + "\12\7\2\0\6\7\13\0\13\7\1\242\6\7\20\0"+ + "\12\7\2\0\6\7\13\0\13\7\1\243\5\7\1\244"+ + "\20\0\12\7\2\0\6\7\13\0\6\7\1\245\13\7"+ + "\20\0\12\7\2\0\1\246\5\7\13\0\22\7\20\0"+ + "\12\7\2\0\6\7\13\0\7\7\1\247\12\7\20\0"+ + "\12\7\2\0\6\7\13\0\13\7\1\250\6\7\20\0"+ + "\12\7\2\0\1\251\5\7\13\0\22\7\20\0\12\7"+ + "\2\0\2\7\1\252\3\7\13\0\1\253\5\7\1\254"+ + "\4\7\1\255\6\7\20\0\12\7\2\0\6\7\13\0"+ + "\13\7\1\256\6\7\20\0\12\7\2\0\6\7\13\0"+ + "\1\257\21\7\20\0\11\7\1\260\2\0\6\7\13\0"+ + "\22\7\20\0\12\7\2\0\6\7\13\0\1\261\21\7"+ + "\20\0\12\7\2\0\6\7\13\0\7\7\1\262\12\7"+ + "\20\0\12\7\2\0\6\7\13\0\1\7\1\263\20\7"+ + "\20\0\12\7\2\0\6\7\13\0\5\7\1\264\14\7"+ + "\20\0\12\7\2\0\6\7\13\0\7\7\1\265\12\7"+ + "\20\0\12\7\2\0\6\7\13\0\1\7\1\266\20\7"+ + "\20\0\5\7\1\267\4\7\2\0\6\7\13\0\22\7"+ + "\20\0\12\7\2\0\6\7\13\0\12\7\1\270\7\7"+ + "\20\0\12\7\2\0\6\7\13\0\13\7\1\271\6\7"+ + "\20\0\12\7\2\0\6\7\13\0\4\7\1\272\15\7"+ + "\112\0\1\273\4\0\12\7\2\0\6\7\13\0\14\7"+ + "\1\274\5\7\20\0\12\7\2\0\6\7\13\0\1\275"+ + "\11\7\1\237\7\7\20\0\12\7\2\0\6\7\13\0"+ + "\3\7\1\276\16\7\20\0\12\7\2\0\6\7\13\0"+ + "\17\7\1\277\2\7\22\0\2\207\5\0\1\210\2\0"+ + "\1\212\1\213\63\0\2\300\6\0\1\301\11\0\1\301"+ + "\54\0\2\302\6\0\1\303\11\0\1\303\52\0\12\7"+ + "\2\0\6\7\13\0\12\7\1\304\7\7\20\0\11\7"+ + "\1\305\2\0\6\7\13\0\22\7\20\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\306\20\7\20\0\12\7\2\0"+ + "\6\7\13\0\13\7\1\307\6\7\20\0\11\7\1\310"+ + "\2\0\6\7\13\0\12\7\1\311\7\7\20\0\12\7"+ + "\2\0\6\7\13\0\12\7\1\312\7\7\20\0\12\7"+ + "\2\0\6\7\13\0\3\7\1\313\16\7\20\0\11\7"+ + "\1\314\2\0\6\7\13\0\22\7\15\0\30\226\1\227"+ + "\1\226\1\0\74\226\1\315\1\226\1\316\1\0\43\226"+ + "\31\231\1\232\1\0\76\231\1\317\1\320\43\231\2\0"+ + "\1\234\35\0\1\236\40\0\1\321\31\0\1\322\1\323"+ + "\1\0\1\324\100\0\1\325\1\326\37\0\12\7\2\0"+ + "\6\7\13\0\5\7\1\327\14\7\20\0\12\7\2\0"+ + "\6\7\13\0\20\7\1\330\1\7\20\0\12\7\2\0"+ + "\2\7\1\331\3\7\13\0\22\7\20\0\12\7\2\0"+ + "\6\7\13\0\12\7\1\332\7\7\20\0\12\7\2\0"+ + "\6\7\13\0\4\7\1\333\15\7\20\0\12\7\2\0"+ + "\6\7\13\0\2\7\1\334\17\7\20\0\12\7\2\0"+ + "\6\7\13\0\1\7\1\335\20\7\20\0\11\7\1\336"+ + "\2\0\6\7\13\0\22\7\20\0\12\7\2\0\6\7"+ + "\13\0\2\7\1\337\4\7\1\340\12\7\20\0\12\7"+ + "\2\0\6\7\13\0\1\7\1\341\20\7\20\0\12\7"+ + "\2\0\6\7\13\0\1\7\1\342\14\7\1\343\3\7"+ + "\20\0\12\7\2\0\6\7\13\0\5\7\1\344\14\7"+ + "\20\0\11\7\1\345\2\0\6\7\13\0\22\7\20\0"+ + "\12\7\2\0\6\7\13\0\17\7\1\346\2\7\20\0"+ + "\12\7\2\0\6\7\13\0\6\7\1\347\13\7\20\0"+ + "\12\7\2\0\6\7\13\0\4\7\1\350\15\7\20\0"+ + "\12\7\2\0\6\7\13\0\1\351\21\7\20\0\11\7"+ + "\1\352\2\0\6\7\13\0\22\7\20\0\12\7\2\0"+ + "\6\7\13\0\16\7\1\353\3\7\20\0\7\7\1\354"+ + "\2\7\2\0\6\7\13\0\22\7\20\0\12\7\2\0"+ + "\6\7\13\0\16\7\1\355\3\7\20\0\12\7\2\0"+ + "\6\7\13\0\12\7\1\356\7\7\20\0\7\7\1\357"+ + "\2\7\2\0\6\7\13\0\22\7\22\0\2\300\11\0"+ + "\1\213\63\0\2\300\75\0\2\302\11\0\1\360\63\0"+ + "\2\302\73\0\12\7\2\0\6\7\13\0\5\7\1\361"+ + "\14\7\20\0\12\7\2\0\6\7\13\0\1\362\21\7"+ + "\20\0\12\7\2\0\6\7\13\0\7\7\1\363\12\7"+ + "\20\0\12\7\2\0\6\7\13\0\14\7\1\364\5\7"+ + "\20\0\12\7\2\0\6\7\13\0\5\7\1\365\14\7"+ + "\20\0\12\7\2\0\6\7\13\0\13\7\1\366\6\7"+ + "\15\0\32\226\1\316\1\0\43\226\32\231\1\317\1\0"+ + "\43\231\2\0\1\367\27\0\1\370\46\0\1\371\27\0"+ + "\1\372\104\0\1\371\101\0\1\373\36\0\12\7\2\0"+ + "\6\7\13\0\13\7\1\374\6\7\20\0\11\7\1\375"+ + "\2\0\6\7\13\0\22\7\20\0\11\7\1\376\2\0"+ + "\6\7\13\0\22\7\20\0\12\7\2\0\6\7\13\0"+ + "\16\7\1\377\3\7\20\0\12\7\2\0\6\7\13\0"+ + "\10\7\1\u0100\11\7\20\0\12\7\2\0\6\7\13\0"+ + "\16\7\1\u0101\3\7\20\0\12\7\2\0\6\7\13\0"+ + "\7\7\1\u0102\12\7\20\0\12\7\2\0\6\7\13\0"+ + "\4\7\1\u0103\15\7\20\0\12\7\2\0\6\7\13\0"+ + "\7\7\1\u0104\12\7\20\0\12\7\2\0\6\7\13\0"+ + "\10\7\1\u0105\11\7\20\0\12\7\2\0\6\7\13\0"+ + "\7\7\1\u0106\12\7\20\0\11\7\1\u0107\2\0\6\7"+ + "\13\0\22\7\20\0\12\7\2\0\6\7\13\0\4\7"+ + "\1\u0108\15\7\20\0\12\7\2\0\6\7\13\0\16\7"+ + "\1\u0109\3\7\20\0\12\7\2\0\6\7\13\0\16\7"+ + "\1\u010a\3\7\20\0\11\7\1\u010b\2\0\6\7\13\0"+ + "\22\7\20\0\12\7\2\0\6\7\13\0\12\7\1\u010c"+ + "\7\7\20\0\12\7\2\0\6\7\13\0\5\7\1\u010d"+ + "\14\7\20\0\12\7\2\0\6\7\13\0\13\7\1\u010e"+ + "\6\7\20\0\12\7\2\0\6\7\13\0\13\7\1\u010f"+ + "\6\7\20\0\12\7\2\0\6\7\13\0\12\7\1\u0110"+ + "\7\7\52\0\1\u0111\76\0\1\u0112\53\0\1\367\67\0"+ + "\11\7\1\u0113\2\0\6\7\13\0\22\7\20\0\12\7"+ + "\2\0\1\u0114\5\7\13\0\22\7\20\0\12\7\2\0"+ + "\1\u0115\5\7\13\0\22\7\20\0\11\7\1\u0116\2\0"+ + "\6\7\13\0\22\7\20\0\12\7\2\0\1\u0117\5\7"+ + "\13\0\22\7\20\0\12\7\2\0\6\7\13\0\13\7"+ + "\1\u0118\6\7\20\0\12\7\2\0\6\7\13\0\5\7"+ + "\1\u0119\14\7\20\0\12\7\2\0\6\7\13\0\13\7"+ + "\1\u011a\6\7\20\0\12\7\2\0\6\7\13\0\6\7"+ + "\1\u011b\13\7\20\0\12\7\2\0\6\7\13\0\7\7"+ + "\1\u011c\12\7\20\0\12\7\2\0\6\7\13\0\16\7"+ + "\1\u011d\3\7\20\0\12\7\2\0\6\7\13\0\14\7"+ + "\1\u011e\5\7\20\0\11\7\1\u011f\2\0\6\7\13\0"+ + "\12\7\1\u0110\7\7\20\0\12\7\2\0\6\7\13\0"+ + "\13\7\1\u0120\6\7\20\0\12\7\2\0\6\7\13\0"+ + "\7\7\1\u0121\12\7\20\0\12\7\2\0\6\7\13\0"+ + "\3\7\1\u0122\16\7\20\0\12\7\2\0\6\7\13\0"+ + "\2\7\1\u0123\17\7\20\0\11\7\1\u0124\2\0\6\7"+ + "\13\0\22\7\20\0\12\7\2\0\1\u0125\5\7\13\0"+ + "\22\7\20\0\12\7\2\0\6\7\13\0\10\7\1\u0126"+ + "\11\7\20\0\12\7\2\0\6\7\13\0\12\7\1\u0127"+ + "\7\7\20\0\12\7\2\0\1\u0128\5\7\13\0\22\7"+ + "\20\0\12\7\2\0\6\7\13\0\12\7\1\u0129\7\7"+ + "\20\0\11\7\1\u012a\2\0\6\7\13\0\22\7\20\0"+ + "\12\7\2\0\6\7\13\0\7\7\1\u012b\12\7\20\0"+ + "\12\7\2\0\6\7\13\0\5\7\1\u012c\14\7\20\0"+ + "\11\7\1\u012d\2\0\6\7\13\0\22\7\20\0\12\7"+ + "\2\0\6\7\13\0\1\7\1\u012e\20\7\20\0\12\7"+ + "\2\0\6\7\13\0\13\7\1\u012f\6\7\20\0\11\7"+ + "\1\u0130\2\0\6\7\13\0\22\7\20\0\12\7\2\0"+ + "\6\7\13\0\13\7\1\u0131\6\7\20\0\12\7\2\0"+ + "\1\u0132\5\7\13\0\22\7\20\0\12\7\2\0\6\7"+ + "\13\0\5\7\1\u0133\14\7\20\0\12\7\2\0\6\7"+ + "\13\0\4\7\1\u0134\15\7\20\0\12\7\2\0\6\7"+ + "\13\0\13\7\1\u0135\6\7\20\0\12\7\2\0\6\7"+ + "\13\0\12\7\1\u0136\7\7\20\0\12\7\2\0\6\7"+ + "\13\0\1\7\1\u0137\20\7\20\0\12\7\2\0\6\7"+ + "\13\0\5\7\1\u0138\14\7\15\0"; + + private static int [] zzUnpackTrans() { + int [] result = new int[13356]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + private static final char[] EMPTY_BUFFER = new char[0]; + private static final int YYEOF = -1; + private static java.io.Reader zzReader = null; // Fake + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 = + "\4\0\1\11\6\1\1\11\11\1\1\11\2\1\1\11"+ + "\20\1\4\11\2\1\10\11\11\1\1\0\1\1\1\11"+ + "\2\1\1\11\5\1\1\11\5\1\1\0\1\11\1\0"+ + "\4\1\1\11\1\1\4\11\36\1\1\0\4\11\1\1"+ + "\1\11\4\1\1\0\1\11\1\0\1\11\12\1\7\0"+ + "\1\1\1\0\34\1\1\11\5\1\1\0\1\1\1\0"+ + "\12\1\2\0\1\11\1\0\2\1\1\11\2\0\31\1"+ + "\1\11\6\1\5\0\25\1\2\11\46\1"; + + private static int [] zzUnpackAttribute() { + int [] result = new int[312]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the textposition at the last state to be included in yytext */ + private int zzPushbackPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** number of newlines encountered up to the start of the matched text */ + private int yyline; + + /** the number of characters up to the start of the matched text */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** nesting level of rule */ + private int nestLevel = 0; + + /** denotes if the user-EOF-code has already been executed */ + private boolean zzEOFDone; + + /* user code: */ + int startCommentPos; + int startCommentLine; + int endCommentState; + + int endPragmaState; + + public _XdsFlexScanner() { + this((java.io.Reader)null); + } + + /** + * Returns the number of characters up to the start of the matched text. + */ + public final int getTokenOffset() { + return zzStartRead; + } + + public TextPosition getTokenPosition() { + return new TextPosition(yyline + 1, yycolumn + 1, getTokenOffset()); + } + + public TokenRestorePosition getTokenRestorePosition() { + return new TokenRestorePosition(yyline, yycolumn, getTokenOffset(), yystate()); + } + + public void setPosition(TokenRestorePosition position) { + setPosition( position.getOffset() + , position.getLine(), position.getColumn() + , position.getState() ); + } + + + public _XdsFlexScanner(java.io.Reader in) { + zzReader = in; + } + + /** + * Creates a new scanner. + * There is also java.io.Reader version of this constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public _XdsFlexScanner(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char [] zzUnpackCMap(String packed) { + char [] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 1326) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } + + public final void reset(CharSequence buffer){ + reset(buffer, YYINITIAL); + } + + public final void reset(CharSequence buffer, int initialState){ + zzBuffer = buffer; + zzEndRead = buffer.length(); + setPosition(0, 0, 0, initialState); + } + + public final void setPosition(int start, int line, int column, int initialState) { + nestLevel = 0; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzPushbackPos = 0; + zzAtEOF = false; + zzAtBOL = (column == 0); + yychar = 0; + yyline = line; + yycolumn = column; + yybegin(initialState); + } + + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position pos from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + public void yypushback(int number) { + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void zzDoEOF() { + if (!zzEOFDone) { + zzEOFDone = true; + return; + + } + } + + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + public TokenType nextToken() throws java.io.IOException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + char [] zzCMapL = ZZ_CMAP; + + int [] zzTransL = ZZ_TRANS; + int [] zzRowMapL = ZZ_ROWMAP; + int [] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + boolean zzR = false; + for (zzCurrentPosL = zzStartRead; zzCurrentPosL < zzMarkedPosL; + zzCurrentPosL++) { + switch (zzBufferL.charAt(zzCurrentPosL)) { + case '\u000B': + case '\u000C': + case '\u0085': + case '\u2028': + case '\u2029': + yyline++; + yycolumn = 0; + zzR = false; + break; + case '\r': + yyline++; + yycolumn = 0; + zzR = true; + break; + case '\n': + if (zzR) + zzR = false; + else { + yyline++; + yycolumn = 0; + } + break; + default: + zzR = false; + yycolumn++; + } + } + + if (zzR) { + // peek one character ahead if it is \n (if we have counted one line too much) + boolean zzPeek; + if (zzMarkedPosL < zzEndReadL) + zzPeek = zzBufferL.charAt(zzMarkedPosL) == '\n'; + else if (zzAtEOF) + zzPeek = false; + else { + boolean eof = zzRefill(); + zzEndReadL = zzEndRead; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + if (eof) + zzPeek = false; + else + zzPeek = zzBufferL.charAt(zzMarkedPosL) == '\n'; + } + if (zzPeek) yyline--; + } + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + + zzForAction: { + while (true) { + + if (zzCurrentPosL < zzEndReadL) + zzInput = zzBufferL.charAt(zzCurrentPosL++); + else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } + else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } + else { + zzInput = zzBufferL.charAt(zzCurrentPosL++); + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; + if (zzNext == -1) break zzForAction; + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ( (zzAttributes & 1) == 1 ) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ( (zzAttributes & 8) == 8 ) break zzForAction; + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 3: + { return IDENTIFIER; + } + case 118: break; + case 80: + { return BLOCK_COMMENT; + } + case 119: break; + case 50: + { return IN_KEYWORD; + } + case 120: break; + case 55: + { nestLevel--; + if (nestLevel == 0) { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return BLOCK_COMMENT; + } + } + case 121: break; + case 115: + { return QUALIFIED_KEYWORD; + } + case 122: break; + case 21: + { return AND; + } + case 123: break; + case 97: + { return RETRY_KEYWORD; + } + case 124: break; + case 33: + { return BY_KEYWORD; + } + case 125: break; + case 116: + { return DEFINITION_KEYWORD; + } + case 126: break; + case 109: + { return POINTER_KEYWORD; + } + case 127: break; + case 105: + { return RECORD_KEYWORD; + } + case 128: break; + case 16: + { return RBRACKET; + } + case 129: break; + case 110: + { return FORWARD_KEYWORD; + } + case 130: break; + case 19: + { return COLON; + } + case 131: break; + case 48: + { return OF_KEYWORD; + } + case 132: break; + case 46: + { return GTEQ; + } + case 133: break; + case 98: + { return LABEL_KEYWORD; + } + case 134: break; + case 85: + { return THEN_KEYWORD; + } + case 135: break; + case 44: + { return LTEQ; + } + case 136: break; + case 64: + { return SEQ_KEYWORD; + } + case 137: break; + case 87: + { return FROM_KEYWORD; + } + case 138: break; + case 94: + { return CONST_KEYWORD; + } + case 139: break; + case 78: + { return CASE_KEYWORD; + } + case 140: break; + case 20: + { return BAR; + } + case 141: break; + case 102: + { return PRAGMA_PUSH; + } + case 142: break; + case 58: + { yypushback(2); + return DEC_INTEGER_LITERAL; + } + case 143: break; + case 65: + { return ASM_KEYWORD; + } + case 144: break; + case 91: + { return LONG_COMPLEX_LITERAL; + } + case 145: break; + case 96: + { return ARRAY_KEYWORD; + } + case 146: break; + case 15: + { return LBRACKET; + } + case 147: break; + case 25: + { return EQU; + } + case 148: break; + case 22: + { return SEMICOLON; + } + case 149: break; + case 41: + { return EXPONENT; + } + case 150: break; + case 83: + { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_POPPUSH_BEGIN; + } + case 151: break; + case 23: + { return COMMA; + } + case 152: break; + case 82: + { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_POP_BEGIN; + } + case 153: break; + case 89: + { return WITH_KEYWORD; + } + case 154: break; + case 59: + { return COMPLEX_LITERAL; + } + case 155: break; + case 112: + { return DEFINED_PRAGMA_KEYWORD; + } + case 156: break; + case 39: + { nestLevel = 1; + startCommentPos = zzStartRead; + startCommentLine = yyline; + endCommentState = yystate(); + yybegin(IN_CPP_BLOCK_COMMENT); + } + case 157: break; + case 100: + { return EXCEPT_KEYWORD; + } + case 158: break; + case 56: + { nestLevel--; + if (nestLevel == 0) { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return CPP_BLOCK_COMMENT; + } + } + case 159: break; + case 5: + { return PLUS; + } + case 160: break; + case 54: + { nestLevel++; + } + case 161: break; + case 1: + { return BAD_CHARACTER; + } + case 162: break; + case 36: + { return STRING_LITERAL; + } + case 163: break; + case 11: + { return RPARENTH; + } + case 164: break; + case 93: + { return ELSIF_KEYWORD; + } + case 165: break; + case 10: + { return TIMES; + } + case 166: break; + case 38: + { return CPP_END_OF_LINE_COMMENT; + } + case 167: break; + case 103: + { return PRAGMA_POP; + } + case 168: break; + case 47: + { return OR_KEYWORD; + } + case 169: break; + case 92: + { return BEGIN_KEYWORD; + } + case 170: break; + case 37: + { return END_OF_LINE_COMMENT; + } + case 171: break; + case 40: + { nestLevel = 1; + startCommentPos = zzStartRead; + startCommentLine = yyline; + endCommentState = yystate(); + yybegin(IN_BLOCK_COMMENT); + } + case 172: break; + case 31: + { return CHAR_OCT_LITERAL; + } + case 173: break; + case 60: + { return END_KEYWORD; + } + case 174: break; + case 6: + { return DOT; + } + case 175: break; + case 88: + { return LOOP_KEYWORD; + } + case 176: break; + case 66: + { return AND_KEYWORD; + } + case 177: break; + case 45: + { return RIGHT_SHIFT; + } + case 178: break; + case 28: + { return OCT_INTEGER_LITERAL; + } + case 179: break; + case 70: + { return FOR_KEYWORD; + } + case 180: break; + case 76: + { return EXIT_KEYWORD; + } + case 181: break; + case 67: + { return NOT_KEYWORD; + } + case 182: break; + case 4: + { return DEC_INTEGER_LITERAL; + } + case 183: break; + case 26: + { return NEQ; + } + case 184: break; + case 53: + { return BECOMES; + } + case 185: break; + case 18: + { return RBRACE; + } + case 186: break; + case 35: + { return DO_KEYWORD; + } + case 187: break; + case 77: + { return ELSE_KEYWORD; + } + case 188: break; + case 49: + { return IS_KEYWORD; + } + case 189: break; + case 42: + { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_BEGIN; + } + case 190: break; + case 74: + { return NEW_PRAGMA_KEYWORD; + } + case 191: break; + case 9: + { return LPARENTH; + } + case 192: break; + case 30: + { return REAL_LITERAL; + } + case 193: break; + case 81: + { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_PUSH_BEGIN; + } + case 194: break; + case 79: + { return CPP_BLOCK_COMMENT; + } + case 195: break; + case 17: + { return LBRACE; + } + case 196: break; + case 43: + { return LEFT_SHIFT; + } + case 197: break; + case 62: + { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_BEGIN; + } + case 198: break; + case 13: + { return GTR; + } + case 199: break; + case 12: + { return LSS; + } + case 200: break; + case 61: + { return DIV_KEYWORD; + } + case 201: break; + case 63: + { return SET_KEYWORD; + } + case 202: break; + case 86: + { return TYPE_KEYWORD; + } + case 203: break; + case 73: + { return POP_PRAGMA_KEYWORD; + } + case 204: break; + case 8: + { return SLASH; + } + case 205: break; + case 69: + { return REM_KEYWORD; + } + case 206: break; + case 24: + { return NOT; + } + case 207: break; + case 51: + { return IF_KEYWORD; + } + case 208: break; + case 29: + { return HEX_INTEGER_LITERAL; + } + case 209: break; + case 68: + { return MOD_KEYWORD; + } + case 210: break; + case 2: + { return WHITE_SPACE; + } + case 211: break; + case 99: + { return WHILE_KEYWORD; + } + case 212: break; + case 32: + { return CHAR_HEX_LITERAL; + } + case 213: break; + case 95: + { return UNTIL_KEYWORD; + } + case 214: break; + case 71: + { return VAR_KEYWORD; + } + case 215: break; + case 104: + { return MODULE_KEYWORD; + } + case 216: break; + case 114: + { return PROCEDURE_KEYWORD; + } + case 217: break; + case 84: + { return GOTO_KEYWORD; + } + case 218: break; + case 14: + { return SEP; + } + case 219: break; + case 52: + { return TO_KEYWORD; + } + case 220: break; + case 117: + { return IMPLEMENTATION_KEYWORD; + } + case 221: break; + case 107: + { return RETURN_KEYWORD; + } + case 222: break; + case 7: + { return MINUS; + } + case 223: break; + case 106: + { return REPEAT_KEYWORD; + } + case 224: break; + case 34: + { return RANGE; + } + case 225: break; + case 90: + { return PUSH_PRAGMA_KEYWORD; + } + case 226: break; + case 113: + { return PACKEDSET_KEYWORD; + } + case 227: break; + case 72: + { return ALIAS; + } + case 228: break; + case 75: + { return LONG_REAL_LITERAL; + } + case 229: break; + case 57: + { yybegin(endPragmaState); + return PRAGMA_END; + } + case 230: break; + case 101: + { return EXPORT_KEYWORD; + } + case 231: break; + case 111: + { return FINALLY_KEYWORD; + } + case 232: break; + case 108: + { return IMPORT_KEYWORD; + } + case 233: break; + case 27: + { + } + case 234: break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + zzDoEOF(); + switch (zzLexicalState) { + case IN_BLOCK_COMMENT: { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return BLOCK_COMMENT; + } + case 313: break; + case IN_CPP_BLOCK_COMMENT: { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return CPP_BLOCK_COMMENT; + } + case 314: break; + default: + { + return EOF; + } + } + } + else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } + + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/build.bat b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/build.bat new file mode 100644 index 0000000..a19b6a1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/build.bat @@ -0,0 +1,10 @@ +@echo off +set JAVA_HOME=%~dp0..\..\..\..\..\..\..\..\..\..\com.excelsior.xds.jre.feature\rootfiles.win32\jre +set PATH=%JAVA_HOME%\bin;%PATH% + +set JFLEX_HOME=%~dp0..\..\..\..\..\..\..\..\..\..\tools\jflex +set CLASSPATH=%CLASSPATH%;%JFLEX_HOME%\lib\JFlex.jar + +set JFLEX_SKELETON=parser-flex.skeleton + +call java JFlex.Main --charat --skel "%JFLEX_SKELETON%" %* \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/parser-flex.skeleton b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/parser-flex.skeleton new file mode 100644 index 0000000..90c3cd7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/parser-flex.skeleton @@ -0,0 +1,266 @@ + /** initial size of the lookahead buffer */ +--- private static final int ZZ_BUFFERSIZE = ...; + + /** lexical states */ +--- lexical states, charmap + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + private static final char[] EMPTY_BUFFER = new char[0]; + private static final int YYEOF = -1; + private static java.io.Reader zzReader = null; // Fake + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + +--- isFinal list + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the textposition at the last state to be included in yytext */ + private int zzPushbackPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** number of newlines encountered up to the start of the matched text */ + private int yyline; + + /** the number of characters up to the start of the matched text */ + private int yychar; + + /** + * the number of characters from the last newline up to the start of the + * matched text + */ + private int yycolumn; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** nesting level of rule */ + private int nestLevel = 0; + +--- user class code + +--- constructor declaration + + public final void reset(CharSequence buffer){ + reset(buffer, YYINITIAL); + } + + public final void reset(CharSequence buffer, int initialState){ + zzBuffer = buffer; + zzEndRead = buffer.length(); + setPosition(0, 0, 0, initialState); + } + + public final void setPosition(int start, int line, int column, int initialState) { + nestLevel = 0; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzPushbackPos = 0; + zzAtEOF = false; + zzAtBOL = (column == 0); + yychar = 0; + yyline = line; + yycolumn = column; + yybegin(initialState); + } + + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position pos from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ +--- zzScanError declaration + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + +--- throws clause + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ +--- yypushback decl (contains zzScanError exception) + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + +--- zzDoEOF + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ +--- yylex declaration + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + char [] zzCMapL = ZZ_CMAP; + +--- local declarations + + while (true) { + zzMarkedPosL = zzMarkedPos; + +--- start admin (line, char, col count) + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + +--- start admin (lexstate etc) + + zzForAction: { + while (true) { + +--- next input, line, col, char count, next transition, isFinal action + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; +--- line count update + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; +--- char count update + +--- actions + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; +--- eofvalue + } + else { +--- no match + } + } + } + } + +--- main + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/xds.flex b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/xds.flex new file mode 100644 index 0000000..e250bd7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/scanner/jflex/xds.flex @@ -0,0 +1,396 @@ +package com.excelsior.xds.parser.modula.scanner.jflex; + +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; + +%% + +//----------------------------------------------------------------------------- +// Character sets +//----------------------------------------------------------------------------- +%unicode + +//----------------------------------------------------------------------------- +// Class options +//----------------------------------------------------------------------------- + +%public +%class _XdsFlexScanner +%implements ModulaTokenTypes, PragmaTokenTypes + + +%function nextToken +%type TokenType + +%line +%column + +//%debug + + +//----------------------------------------------------------------------------- +// User Class Code +//----------------------------------------------------------------------------- + +%eof{ + return; +%eof} + +%{ + int startCommentPos; + int startCommentLine; + int endCommentState; + + int endPragmaState; + + public _XdsFlexScanner() { + this((java.io.Reader)null); + } + + /** + * Returns the number of characters up to the start of the matched text. + */ + public final int getTokenOffset() { + return zzStartRead; + } + + public TextPosition getTokenPosition() { + return new TextPosition(yyline + 1, yycolumn + 1, getTokenOffset()); + } + + public TokenRestorePosition getTokenRestorePosition() { + return new TokenRestorePosition(yyline, yycolumn, getTokenOffset(), yystate()); + } + + public void setPosition(TokenRestorePosition position) { + setPosition( position.getOffset() + , position.getLine(), position.getColumn() + , position.getState() ); + } +%} + + +//----------------------------------------------------------------------------- +// Macro definitions +//----------------------------------------------------------------------------- + +// NewLines and spaces +NewLine = [\r\n] +WhiteSpace = [\ \t\f] +NewLineWhiteSpace = {WhiteSpace} | {NewLine} + +IdentifierPart = "_" | [:letter:] | [:digit:] +Identifier = (["_"] | [:letter:])+ {IdentifierPart}* + +// Digits +OctalDigit = [0-7] +Digit = {OctalDigit} | [89] +HexDigit = {Digit} | [A-Fa-f] + +// Integer Numbers +OctalInteger = {OctalDigit}+ ("B"|"b") +DecimalInteger = {Digit}+ +HexInteger = {Digit} {HexDigit}* ("H"|"h") + +// Real Numbers +RealScaleFactor = "E" ["+""-"]? {Digit}+ +RealLiteral = {Digit}+ "." {Digit}* {RealScaleFactor}? + +LongRealScaleFactor = "D" ["+""-"]? {Digit}+ +LongRealLiteral = {Digit}+ "." {Digit}* {LongRealScaleFactor}? + +DigitRangeHack = {Digit}+ ".." + +// Complex Numbers +ComplexLiteral = {RealLiteral} "i" +LongComplexLiteral = {LongRealLiteral} "i" + +// Chars +CharOctLiteral = {Digit} {OctalDigit}* ("C"|"c") +CharHexLiteral = {Digit} {HexDigit}* ("X"|"x") + +// Strings +StringLiteralDoubleQuote = \" ( [^\"\n\r] )* (\" | {NewLine}) +StringLiteralSingleQuote = \' ( [^\'\n\r] )* (\' | {NewLine}) +StringLiteral = {StringLiteralDoubleQuote} | {StringLiteralSingleQuote} + +// Comments +EndOfLineComment = "-""-"[^\r\n]* +CppEndOfLineComment = "/""/"[^\r\n]* + +BlockCommentBegin = "(*" +BlockCommentEnd = "*)" +SimpleCommentBody = ([^"*""("]*("*"+[^"*"")"])?("("+[^"(""*"])?)* +SimpleBlockComment = {BlockCommentBegin} {SimpleCommentBody} {BlockCommentEnd} + +CppBlockCommentBegin = "/*" +CppBlockCommentEnd = "*/" +CppSimpleCommentBody = ([^"*""/"]*("*"+[^"*"")"])?("/"+[^"/""*"])?)* +CppSimpleBlockComment = {CppBlockCommentBegin} {CppSimpleCommentBody} {CppBlockCommentEnd} + + +// Compiler pragmas +PragmaBegin = "<*" +PragmaEnd = "*>" + +PragmaArgsBegin = {PragmaBegin} "$" +PopPragmaArgsBegin = {PragmaArgsBegin} {WhiteSpace}* ">" +PushPragmaArgsBegin = {PragmaArgsBegin} {WhiteSpace}* "<" +PopPushPragmaArgsBegin = {PragmaArgsBegin} {WhiteSpace}* "|" + +PopPragma = {PragmaBegin} {WhiteSpace}* "POP" {WhiteSpace}* {PragmaEnd} + | {PopPragmaArgsBegin} {WhiteSpace}* {PragmaEnd} + +PushPragma = {PragmaBegin} {WhiteSpace}* "PUSH" {WhiteSpace}* {PragmaEnd} + | {PushPragmaArgsBegin} {WhiteSpace}* {PragmaEnd} + + +//----------------------------------------------------------------------------- +// State declarations +//----------------------------------------------------------------------------- + +%xstate IN_BLOCK_COMMENT +%xstate IN_CPP_BLOCK_COMMENT + +%state IN_PRAGMA_BLOCK + + +%% +//----------------------------------------------------------------------------- +// Lexical rules +//----------------------------------------------------------------------------- + +// Keywords +"AND" { return AND_KEYWORD; } +"ASM" { return ASM_KEYWORD; } +"ARRAY" { return ARRAY_KEYWORD; } +"BEGIN" { return BEGIN_KEYWORD; } +"BY" { return BY_KEYWORD; } +"CASE" { return CASE_KEYWORD; } +"CONST" { return CONST_KEYWORD; } +"DEFINITION" { return DEFINITION_KEYWORD; } +"DIV" { return DIV_KEYWORD; } +"DO" { return DO_KEYWORD; } +"ELSE" { return ELSE_KEYWORD; } +"ELSIF" { return ELSIF_KEYWORD; } +"END" { return END_KEYWORD; } +"EXCEPT" { return EXCEPT_KEYWORD; } +"EXIT" { return EXIT_KEYWORD; } +"EXPORT" { return EXPORT_KEYWORD; } +"FINALLY" { return FINALLY_KEYWORD; } +"FOR" { return FOR_KEYWORD; } +"FORWARD" { return FORWARD_KEYWORD; } +"FROM" { return FROM_KEYWORD; } +"IF" { return IF_KEYWORD; } +"IMPLEMENTATION" { return IMPLEMENTATION_KEYWORD; } +"IMPORT" { return IMPORT_KEYWORD; } +"IN" { return IN_KEYWORD; } +"IS" { return IS_KEYWORD; } +"LOOP" { return LOOP_KEYWORD; } +"MOD" { return MOD_KEYWORD; } +"MODULE" { return MODULE_KEYWORD; } +"NOT" { return NOT_KEYWORD; } +"OF" { return OF_KEYWORD; } +"OR" { return OR_KEYWORD; } +"PACKEDSET" { return PACKEDSET_KEYWORD; } +"POINTER" { return POINTER_KEYWORD; } +"PROCEDURE" { return PROCEDURE_KEYWORD; } +"QUALIFIED" { return QUALIFIED_KEYWORD; } +"RECORD" { return RECORD_KEYWORD; } +"REM" { return REM_KEYWORD; } +"REPEAT" { return REPEAT_KEYWORD; } +"RETRY" { return RETRY_KEYWORD; } +"RETURN" { return RETURN_KEYWORD; } +"SEQ" { return SEQ_KEYWORD; } +"SET" { return SET_KEYWORD; } +"THEN" { return THEN_KEYWORD; } +"TO" { return TO_KEYWORD; } +"TYPE" { return TYPE_KEYWORD; } +"UNTIL" { return UNTIL_KEYWORD; } +"VAR" { return VAR_KEYWORD; } +"WHILE" { return WHILE_KEYWORD; } +"WITH" { return WITH_KEYWORD; } + +"LABEL" { return LABEL_KEYWORD; } +"GOTO" { return GOTO_KEYWORD; } + + +// Brackets +"[" { return LBRACKET; } +"]" { return RBRACKET; } +"(" { return LPARENTH; } +")" { return RPARENTH; } +"{" { return LBRACE; } +"}" { return RBRACE; } + +"(!" { return LBRACKET; } +"!)" { return RBRACKET; } +"(:" { return LBRACE; } + + +// Operations +"+" { return PLUS; } +"-" { return MINUS; } +"*" { return TIMES; } +":" { return COLON; } +"/" { return SLASH; } +"^" { return BAR; } +"@" { return BAR; } +"&" { return AND; } +"|" { return SEP; } +"!" { return SEP; } +";" { return SEMICOLON; } +"," { return COMMA; } +"~" { return NOT; } +"." { return DOT; } +":=" { return BECOMES; } + +"=" { return EQU; } +"#" { return NEQ; } +"<>" { return NEQ; } +"<" { return LSS; } +">" { return GTR; } +"<=" { return LTEQ; } +">=" { return GTEQ; } + +".." { return RANGE; } +"<<" { return LEFT_SHIFT; } +">>" { return RIGHT_SHIFT; } + +"**" { return EXPONENT; } +"::=" { return ALIAS; } + + +// Integer literals +{OctalInteger} { return OCT_INTEGER_LITERAL; } +{DecimalInteger} { return DEC_INTEGER_LITERAL; } +{HexInteger} { return HEX_INTEGER_LITERAL; } + +{DigitRangeHack} { yypushback(2); + return DEC_INTEGER_LITERAL; + } + +{CharOctLiteral} {return CHAR_OCT_LITERAL; } +{CharHexLiteral} {return CHAR_HEX_LITERAL; } + + +// Real literals +{RealLiteral} { return REAL_LITERAL; } +{LongRealLiteral} { return LONG_REAL_LITERAL; } + +// Complex literals +{ComplexLiteral} { return COMPLEX_LITERAL; } +{LongComplexLiteral} { return LONG_COMPLEX_LITERAL; } + + +// String literal +{StringLiteral} { return STRING_LITERAL; } + + +// Comments +{EndOfLineComment} { return END_OF_LINE_COMMENT; } +{CppEndOfLineComment} { return CPP_END_OF_LINE_COMMENT; } + +{SimpleBlockComment} { return BLOCK_COMMENT; } +{CppSimpleBlockComment} { return CPP_BLOCK_COMMENT; } + +{BlockCommentBegin} { nestLevel = 1; + startCommentPos = zzStartRead; + startCommentLine = yyline; + endCommentState = yystate(); + yybegin(IN_BLOCK_COMMENT); + } +{CppBlockCommentBegin} { nestLevel = 1; + startCommentPos = zzStartRead; + startCommentLine = yyline; + endCommentState = yystate(); + yybegin(IN_CPP_BLOCK_COMMENT); + } + + { + {BlockCommentBegin} { nestLevel++; } + {BlockCommentEnd} { nestLevel--; + if (nestLevel == 0) { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return BLOCK_COMMENT; + } + } + <> { zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return BLOCK_COMMENT; + } + [^] { } +} + + { + {CppBlockCommentBegin} { nestLevel++; } + {CppBlockCommentEnd} { nestLevel--; + if (nestLevel == 0) { + zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return CPP_BLOCK_COMMENT; + } + } + <> { zzStartRead = startCommentPos; + yyline = startCommentLine; + yybegin(endCommentState); + return CPP_BLOCK_COMMENT; + } + [^] { } +} + + +// Compiler pragmas + { + {PopPragma} { return PRAGMA_POP; } + {PushPragma} { return PRAGMA_PUSH; } + + {PragmaBegin} { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_BEGIN; + } + + {PragmaArgsBegin} { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_BEGIN; + } + {PopPragmaArgsBegin} { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_POP_BEGIN; + } + {PushPragmaArgsBegin} { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_PUSH_BEGIN; + } + {PopPushPragmaArgsBegin} { endPragmaState = yystate(); + yybegin(IN_PRAGMA_BLOCK); + return PRAGMA_ARGS_POPPUSH_BEGIN; + } + +} + + { + "DEFINED" { return DEFINED_PRAGMA_KEYWORD; } + "NEW" { return NEW_PRAGMA_KEYWORD; } + "POP" { return POP_PRAGMA_KEYWORD; } + "PUSH" { return PUSH_PRAGMA_KEYWORD; } + + {PragmaEnd} { yybegin(endPragmaState); + return PRAGMA_END; + } +} + + +// Identifier +{Identifier} { return IDENTIFIER; } + +// White spaces, end of file and un matched symbols +{NewLineWhiteSpace}+ { return WHITE_SPACE; } +<> { return EOF; } +[^] { return BAD_CHARACTER; } diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IBlockBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IBlockBodySymbol.java new file mode 100644 index 0000000..72827cc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IBlockBodySymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IBlockBodySymbol extends IProcedureSymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IConstantSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IConstantSymbol.java new file mode 100644 index 0000000..7c50d7a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IConstantSymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IConstantSymbol extends ISymbolWithType { + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IDefinitionModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IDefinitionModuleSymbol.java new file mode 100644 index 0000000..2ac8460 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IDefinitionModuleSymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IDefinitionModuleSymbol extends IModuleSymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IEnumElementSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IEnumElementSymbol.java new file mode 100644 index 0000000..b90db9d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IEnumElementSymbol.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; + +public interface IEnumElementSymbol extends IWholeConstantSymbol { + + /** + * {@inheritDoc} + */ + @Override + public IEnumTypeSymbol getTypeSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFinallyBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFinallyBodySymbol.java new file mode 100644 index 0000000..e804478 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFinallyBodySymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IFinallyBodySymbol extends IBlockBodySymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFormalParameterSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFormalParameterSymbol.java new file mode 100644 index 0000000..3af1b81 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IFormalParameterSymbol.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.symbol; + + +public interface IFormalParameterSymbol extends ISymbolWithType +{ + public boolean isVarParameter(); + + public boolean isNilAllowed(); + + public boolean isSeqParameter(); + + public boolean isReadOnly(); + + public boolean isDefaultValueEnabled(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IImplemantationModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IImplemantationModuleSymbol.java new file mode 100644 index 0000000..1197b78 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IImplemantationModuleSymbol.java @@ -0,0 +1,4 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IImplemantationModuleSymbol extends IProgramModuleSymbol { +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IInvalidModulaSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IInvalidModulaSymbol.java new file mode 100644 index 0000000..61dacc0 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IInvalidModulaSymbol.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.symbol; + +/** + * Invalid or unknown Modula-2 symbol. + */ +public interface IInvalidModulaSymbol extends IModulaSymbol +{ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ILocalModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ILocalModuleSymbol.java new file mode 100644 index 0000000..d4201de --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ILocalModuleSymbol.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.parser.modula.symbol; + + +public interface ILocalModuleSymbol extends IProgramModuleSymbol +{ + public boolean isExportQualified(); + + /** + * Searches for symbol which is exported from the symbol's scope. + * + * @param symbolName the name of symbol which is to be searched + * @return the first exported symbol with specified name, or + * {@code null} if there is no such symbol. + */ + public IModulaSymbol findSymbolInExport(String name); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IMainModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IMainModuleSymbol.java new file mode 100644 index 0000000..a735e35 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IMainModuleSymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IMainModuleSymbol extends IProgramModuleSymbol { + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbol.java new file mode 100644 index 0000000..620424e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbol.java @@ -0,0 +1,55 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.EnumSet; + +import com.excelsior.xds.parser.commons.symbol.ISymbol; +import com.excelsior.xds.parser.commons.symbol.ISymbolTextBinding; +import com.excelsior.xds.parser.modula.XdsLanguage; + +/** + * An object that represents a Modula-2/Oberon-2 entity from the source code. + */ +public interface IModulaSymbol extends ISymbol, ISymbolTextBinding +{ + /** + * {@inheritDoc} + */ + @Override + public ISymbolWithScope getParentScope(); + + + public XdsLanguage getLanguage(); + + public void setLanguage(XdsLanguage language); + + + public EnumSet getAttributes(); + + public void addAttribute(SymbolAttribute attr); + + public void addAttributes(EnumSet attrs); + + public boolean isAttributeSet(SymbolAttribute attr); + + public void setAttributes(EnumSet attrs); + + public void removeAttribute(SymbolAttribute attr); + + + /** + * @return qualified name of this symbol. + */ + public String getQualifiedName(); + + + public boolean isAnonymous(); + + /** + * Tag to mark anonymous symbols + */ + public final String ANONYMOUS_NAME_TAG = "$"; //$NON-NLS-1$ + + + public void accept(ModulaSymbolVisitor visitor); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolScope.java new file mode 100644 index 0000000..682c49e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolScope.java @@ -0,0 +1,40 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.commons.symbol.ISymbolScope; + +/** + * A scope of a Modula-2/Oberon-2 symbol. + */ +public interface IModulaSymbolScope extends ISymbolScope, Iterable +{ + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbolScope getParentScope(); + + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol resolveName(String symbolName); + + /** + * {@inheritDoc} + */ + @Override + public IModulaSymbol findSymbolInScope(String symbolName); + + + /** + * Searches for symbol in the current scope only, respecting whether it + * is public or not. + * + * @param symbolName the name of symbol which is to be searched + * @return the first symbol with specified name in this scope and required public attribute, or + * {@code null} if there is no such symbol. + */ + public IModulaSymbol findSymbolInScope(String symbolName, boolean isPublic); + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolUsages.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolUsages.java new file mode 100644 index 0000000..c5ed43b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModulaSymbolUsages.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.core.text.TextPosition; + +/** + * Interface of a Modula-2 symbol which is providing information about symbols + * are used by this symbol. + */ +public interface IModulaSymbolUsages +{ + /** + * Returns all symbols with known usage information. + * + * @return symbols with known usage information. + */ + public Collection getUsedSymbols(); + + + /** + * Returns the positions in which the specified symbol is used, + * or {@code null} if there is no usages of the symbol. + * + * @param symbol the symbol whose usages is to be returned + * @return the positions in which the specified symbol is used, or + * {@code null} if there is no usages of the symbol. + */ + public Collection getSymbolUsages(IModulaSymbol symbol); + + /** + * Appends the specified position to the list of usages of the specified symbol. + * + * @param symbol the symbol with which the specified position is to be associated. + * @param usagePosition position to be associated with the specified symbol. + */ + public void addSymbolUsage(IModulaSymbol symbol, TextPosition usagePosition); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleAliasSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleAliasSymbol.java new file mode 100644 index 0000000..0c2271d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleAliasSymbol.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + + +public interface IModuleAliasSymbol extends ISymbolWithScope { + + public IModuleSymbol getReference(); + + public void setReference(IModulaSymbolReference referenceSymbolRef); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleBodySymbol.java new file mode 100644 index 0000000..c946f8f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleBodySymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IModuleBodySymbol extends IBlockBodySymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleSymbol.java new file mode 100644 index 0000000..28958db --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IModuleSymbol.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.parser.commons.symbol.IBlockSymbolTextBinding; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; + +/** + * Base interface for definition and program Modula-2/Oberon-2 modules. + */ +public interface IModuleSymbol extends ISymbolWithScope + , ISymbolWithDefinitions + , ISymbolWithImports + , IModulaSymbolUsages + , IBlockSymbolTextBinding +{ + public boolean hasConstructor(); + + public IFileStore getSourceFile(); + + public ParsedModuleKey getKey(); + + /** + * @return build settings used to construct this module + */ + public BuildSettings getBuildSettings(); + + /** + * Returns an object to iterate a set of symbols which are exported from + * the symbol's scope. + * + * @return an object to be the target of the "foreach" statement. + */ + public Collection getExportedSymbols(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDeclarationSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDeclarationSymbol.java new file mode 100644 index 0000000..e05b272 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDeclarationSymbol.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IOberonMethodDeclarationSymbol extends IOberonMethodSymbol + , IProcedureDeclarationSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodDefinitionSymbol getDefinitionSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDefinitionSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDefinitionSymbol.java new file mode 100644 index 0000000..f62e154 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodDefinitionSymbol.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IOberonMethodDefinitionSymbol extends IOberonMethodSymbol + , IProcedureDefinitionSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodDeclarationSymbol getDeclarationSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodReceiverSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodReceiverSymbol.java new file mode 100644 index 0000000..7bd768e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodReceiverSymbol.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +public interface IOberonMethodReceiverSymbol extends IFormalParameterSymbol +{ + public IRecordTypeSymbol getBoundTypeSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodSymbol.java new file mode 100644 index 0000000..d077cd7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IOberonMethodSymbol.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; + +public interface IOberonMethodSymbol extends IProcedureSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodTypeSymbol getTypeSymbol(); + + public IOberonMethodReceiverSymbol getReceiverSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureBodySymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureBodySymbol.java new file mode 100644 index 0000000..d6cd828 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureBodySymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IProcedureBodySymbol extends IBlockBodySymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDeclarationSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDeclarationSymbol.java new file mode 100644 index 0000000..656b5c2 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDeclarationSymbol.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.commons.symbol.IBlockSymbolTextBinding; + +public interface IProcedureDeclarationSymbol extends IProcedureSymbol + , ISymbolWithDeclarations + , IBlockSymbolTextBinding +{ + public IProcedureBodySymbol getProcedureBodySymbol(); + + /** + * Returns all forward declarations related to this procedure declaration + */ + public Collection getForwardDeclarations(); + + /** + * Returns if exists the procedure definition symbol of this procedure. + * + * @return the procedure definition symbol or + * null if procedure definition doesn't exist. + */ + public IProcedureDefinitionSymbol getDefinitionSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDefinitionSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDefinitionSymbol.java new file mode 100644 index 0000000..e4da602 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureDefinitionSymbol.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IProcedureDefinitionSymbol extends IProcedureSymbol +{ + public IProcedureDeclarationSymbol getDeclarationSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbol.java new file mode 100644 index 0000000..078ec31 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbol.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +public interface IProcedureSymbol extends ISymbolWithScope + , ISymbolWithType +{ + public boolean isLocal(); + + public boolean isPublic(); + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol getTypeSymbol(); + + public Collection getParameters(); + + public ITypeSymbol getReturnTypeSymbol(); + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbolTextBinding.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbolTextBinding.java new file mode 100644 index 0000000..ce99b69 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProcedureSymbolTextBinding.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.commons.symbol.IBlockSymbolTextBinding; + +/** + * Tag interface to bing procedure symbol with its location in the source text. + */ +public interface IProcedureSymbolTextBinding extends IBlockSymbolTextBinding +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProgramModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProgramModuleSymbol.java new file mode 100644 index 0000000..f16a971 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IProgramModuleSymbol.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IProgramModuleSymbol extends IModuleSymbol + , ISymbolWithDeclarations +{ + public IModuleBodySymbol getModuleBodySymbol(); + + public IFinallyBodySymbol getFinallyBodySymbol(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordFieldSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordFieldSymbol.java new file mode 100644 index 0000000..4ed23e4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordFieldSymbol.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.parser.modula.symbol; + + +public interface IRecordFieldSymbol extends ISymbolWithType +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordVariantSelectorSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordVariantSelectorSymbol.java new file mode 100644 index 0000000..4007049 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IRecordVariantSelectorSymbol.java @@ -0,0 +1,5 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IRecordVariantSelectorSymbol extends IRecordFieldSymbol { + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardModuleSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardModuleSymbol.java new file mode 100644 index 0000000..9f3cf43 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardModuleSymbol.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol; + +/** + * Tag interface for standard modules: SYSTEM, COMPILER and base meta module. + */ +public interface IStandardModuleSymbol extends IDefinitionModuleSymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardProcedureSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardProcedureSymbol.java new file mode 100644 index 0000000..ac40408 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IStandardProcedureSymbol.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol; + +/** + * Tag interface for Modula-2/Oberon-2 standard procedures. + */ +public interface IStandardProcedureSymbol extends IModulaSymbol +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDeclarations.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDeclarations.java new file mode 100644 index 0000000..18393ab --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDeclarations.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.modula.symbol; + + + +public interface ISymbolWithDeclarations extends ISymbolWithDefinitions { + + public void addLocalModule(ILocalModuleSymbol s); + public Iterable getLocalModules(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDefinitions.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDefinitions.java new file mode 100644 index 0000000..9bc4c65 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithDefinitions.java @@ -0,0 +1,65 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +/** + * A symbols that can defines types, variables, constants and procedures. + */ +public interface ISymbolWithDefinitions extends ISymbolWithScope + , ISymbolWithProcedures +{ + + /** + * Includes the specified constant into this symbol's scope. + * @param s constant to be included to symbol's scope. + */ + public void addConstant(IConstantSymbol s); + + /** + * Returns a collection containing all of the constants defined in this symbol's scope. + * @return a collection containing all of the constants defined in this symbol's scope. + */ + public Collection getConstants(); + + + /** + * Includes the specified variable into this symbol's scope. + * @param s variable to be included to symbol's scope. + */ + public void addVariable(IVariableSymbol s); + + /** + * Returns a collection containing all of the variables defined in this symbol's scope. + * @return a collection containing all of the variables defined in this symbol's scope. + */ + public Collection getVariables(); + + + /** + * Includes the specified type into this symbol's scope. + * @param s type to be included to symbol's scope. + */ + public void addType(ITypeSymbol s); + + /** + * Returns a collection containing all of the types defined in this symbol's scope. + * @return a collection containing all of the types defined in this symbol's scope. + */ + public Collection getTypes(); + + + /** + * Includes the specified enumeration element into this symbol's scope. + * @param s enumeration element to be included to symbol's scope. + */ + public void addEnumElements(IEnumElementSymbol s); + + /** + * Returns a collection containing all of the enumeration elements defined in this symbol's scope. + * @return a collection containing all of the enumeration elements defined in this symbol's scope. + */ + public Collection getEnumElements(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithImports.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithImports.java new file mode 100644 index 0000000..3bbc60d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithImports.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.reference.IModulaSymbolReference; + + +/** + * A symbol that can import symbols from separate modules. + */ +public interface ISymbolWithImports extends ISymbolWithScope +{ + public Collection getImports(); + + public void addImport(IModulaSymbolReference symbolRef); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithProcedures.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithProcedures.java new file mode 100644 index 0000000..99d0042 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithProcedures.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.Collection; + +/** + * A symbols that can defines procedures. + */ +public interface ISymbolWithProcedures extends ISymbolWithScope +{ + /** + * Includes the specified procedure into this symbol's scope. + * @param s procedure to be included to symbol's scope. + */ + public void addProcedure(IProcedureSymbol s); + + /** + * Returns a collection containing all of the procedures defined in this symbol's scope. + * @return a collection containing all of the procedures defined in this symbol's scope. + */ + public Collection getProcedures(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithScope.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithScope.java new file mode 100644 index 0000000..cdaab6d --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithScope.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.modula.symbol; + +/** + * A Modula-2/Oberon-2 symbol with its own scope to hold other symbols. + */ +public interface ISymbolWithScope extends IModulaSymbol + , IModulaSymbolScope +{ + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithType.java new file mode 100644 index 0000000..8bfab95 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISymbolWithType.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.symbol; + +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; + +/** + * A typed symbol. A symbol that refers to a ITypeSymbol. + */ +public interface ISymbolWithType extends IModulaSymbol { + + public ITypeSymbol getTypeSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISynonymSymbol.java new file mode 100644 index 0000000..05aa616 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ISynonymSymbol.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.symbol; + + +/** + * A symbol that defines a synonym to other symbol. + */ +public interface ISynonymSymbol extends IModulaSymbol +{ + public IModulaSymbol getOriginalSymbol(); + + public IModulaSymbol getReferencedSymbol(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IVariableSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IVariableSymbol.java new file mode 100644 index 0000000..7829423 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IVariableSymbol.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol; + + +public interface IVariableSymbol extends ISymbolWithType +{ + public boolean isLocal(); + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IWholeConstantSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IWholeConstantSymbol.java new file mode 100644 index 0000000..24d3575 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/IWholeConstantSymbol.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.parser.modula.symbol; + +public interface IWholeConstantSymbol extends IConstantSymbol { + + public long getValue(); + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ModulaSymbolVisitor.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ModulaSymbolVisitor.java new file mode 100644 index 0000000..2d32dc9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/ModulaSymbolVisitor.java @@ -0,0 +1,175 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.HashSet; +import java.util.Set; + +import com.excelsior.xds.parser.internal.modula.symbol.FinallyBodySymbol; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IInvalidTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.INumericalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSynonymSymbol; +import com.excelsior.xds.parser.modula.type.NumericalType; + +public abstract class ModulaSymbolVisitor +{ + // stores already visited symbols, to handle the cyclic references + private Set visitedSymbols = new HashSet<>(); + + /** + * Must be called if the same instance is used for the traversal again. + */ + public void reset() { + visitedSymbols.clear(); + } + + public boolean preVisit(IModulaSymbol symbol) { + return visitedSymbols.add(symbol); + } + + public void postVisit(IModulaSymbol symbol) { + } + + protected boolean isVisitChildren(IModulaSymbol symbol) { + return true; + } + + public boolean visit(ITypeSynonymSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IDefinitionModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IFormalParameterSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IModuleAliasSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IOberonMethodReceiverSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IRecordFieldSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IStandardProcedureSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IProcedureDefinitionSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IProcedureTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IRecordTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IStandardModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IProcedureDeclarationSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IImplemantationModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(ILocalModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IMainModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IConstantSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IVariableSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IArrayTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(ITypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IForwardTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IInvalidTypeSymbol symbol) { + return false; + } + + public boolean visit(IOpaqueTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IOrdinalTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(INumericalTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IEnumTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IPointerTypeSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IProgramModuleSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IOberonMethodDefinitionSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IOberonMethodDeclarationSymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IModuleBodySymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IProcedureBodySymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(FinallyBodySymbol symbol) { + return isVisitChildren(symbol); + } + + public boolean visit(IInvalidModulaSymbol symbol) { + return isVisitChildren(symbol); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/SymbolAttribute.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/SymbolAttribute.java new file mode 100644 index 0000000..a360d66 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/SymbolAttribute.java @@ -0,0 +1,105 @@ +package com.excelsior.xds.parser.modula.symbol; + +import java.util.EnumSet; + +public enum SymbolAttribute { + + /** + * Symbol is to be available for use in other modules by import from this module. + */ + PUBLIC, + + /** + * Symbol is exported from local module. + */ + EXPORTED, + + /** + * Qualified Export from local module. + */ + QUALIFIED_EXPORT, + + /** + * Symbol with read-only access. + */ + READ_ONLY, + + /** + * Symbol is defined as volatile. The value of the symbol may change in a way + * that can not be determined at compile time. + */ + VOLATILE, + + /** + * Symbol is external, its declaration is located in the separate module. + */ + EXTERNAL, + + /** + * Symbol is the forward declaration of the another symbol. + */ + FORWARD_DECLARATION, + + /** + * Generation of the BEGIN-part is disabled for this module. + */ + NOMODULEINIT, + + /** + * Symbol is variable parameter. The formal parameter refers to the same variable + * as the actual, so assignments to the formal parameter also change + * the value of the variable that is passed as an actual parameter. + */ + VAR_PARAMETER, + + /** + * Value of variable parameter may be NIL. + */ + NIL_ALLOWED, + + /** + * Symbol is variable number of parameters. The last formal parameter of a procedure + * may be declared as a “sequence of bytes” (SEQ-parameter). In a procedure + * call, any (possibly empty) sequence of actual parameters of any types + * may be substituted in place of that parameter. + */ + SEQ_PARAMETER, + + /** + * Symbol is procedure parameter with default value. + */ + DEFAULT, + + /** + * The name of symbol wasn't specified. + */ + ANONYMOUS_NAME, + + /** + * Symbol with the same name was already defined in the parent scope. + */ + ALREADY_DEFINED, + + /** + * Symbol is pervasive identifier of Modula-2/Oberon-2 language or + * identifier from standard modules: SYSTEM and COMPILER. + */ + PERVASIVE, + + /** + * Symbol was reconstructed from sym-file or odf-file. + */ + RECONSTRUCTED, + + /** + * Symbol is record type with variant fields + */ + VARIANT_RECORD + ; + + + static public EnumSet createEmptySet() { + return EnumSet.noneOf(SymbolAttribute.class); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/BaseImportResolver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/BaseImportResolver.java new file mode 100644 index 0000000..48a5f4a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/BaseImportResolver.java @@ -0,0 +1,114 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.IDocument; + +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.editor.model.EditorDocumentCache; +import com.excelsior.xds.parser.modula.IXdsParserMonitor; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.XdsParser; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.parser.modula.XdsStandardNames; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaFileUtils; + +public abstract class BaseImportResolver implements IImportResolver { + protected abstract IFileStore lookupModule(String moduleName); + protected abstract XdsParser createXdsParser(IFileStore moduleFile, String fileContents, XdsSourceType sourceType); + + protected final IParserEventListener reporter; + protected final IXdsParserMonitor monitor; + + private final Set resolvingModules = new HashSet(); + + protected BaseImportResolver(IParserEventListener reporter, + IXdsParserMonitor monitor) { + this.reporter = reporter; + this.monitor = monitor; + } + + @Override + public IModuleSymbol resolveModuleSymbol( XdsLanguage language, String moduleName, IFileStore hostFile) + { + IModuleSymbol moduleSymbol = null; + if (XdsStandardNames.SYSTEM.equals(moduleName)) { + moduleSymbol = ModulaSymbolCache.getSystemModule(language); + } + else if (XdsStandardNames.COMPILER.equals(moduleName)) { + moduleSymbol = ModulaSymbolCache.getCompilerModule(); + } + else { + IFileStore moduleFile = lookupModule(moduleName); + if (moduleFile == null && hostFile != null) { + String fileExtension = (XdsLanguage.Oberon2 == language) + ? XdsFileUtils.OBERON_MODULE_FILE_EXTENSION + : XdsFileUtils.MODULA_DEFINITION_MODULE_FILE_EXTENSION; + String moduleFileName = moduleName + "." + fileExtension; + moduleFile = ResourceUtils.getSibling(hostFile, moduleFileName); + } + + if (moduleFile == null) { + return null; + } + + moduleSymbol = ModulaSymbolCache.instance().getModuleSymbol(createModuleKey(moduleFile)); + + if (moduleSymbol == null) { + if (resolvingModules.contains(moduleFile)){ + String cyclyMessage = String.format("Module %s participate in import cycle : %s", moduleFile.getName(), moduleNames()); + reporter.error(hostFile, null, new TextPosition(0, 0, 0), 1, cyclyMessage); + return null; + } + else { + resolvingModules.add(moduleFile); + } + + String fileContents = null; + XdsSourceType sourceType; + + try { + if (XdsFileUtils.isSymbolFile(moduleFile.getName())) { + sourceType = XdsSourceType.OdfFile; + fileContents = CompileDriver.decodeSymFile(ResourceUtils.getAbsolutePath(moduleFile)); + } + else if (XdsFileUtils.isDefinitionModuleOrOberonModuleFile(moduleFile.getName())) + { + sourceType = ModulaFileUtils.getSourceType(moduleFile.getName()); + if (moduleFile.fetchInfo().exists()) { + IDocument doc = EditorDocumentCache.instance().getDocument(createModuleKey(moduleFile)); + fileContents = doc != null? doc.get() : ResourceUtils.toString(moduleFile); + } + } + else { + return null; + } + + if (fileContents != null) { + XdsParser parser = createXdsParser( moduleFile, fileContents, sourceType); + moduleSymbol = parser.parseModule().getModuleSymbol(); + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + + return moduleSymbol; + } + + private List moduleNames() { + return resolvingModules.stream().map(m -> m.getName()).collect(Collectors.toList()); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/DefaultImportResolver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/DefaultImportResolver.java new file mode 100644 index 0000000..9bdaee1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/DefaultImportResolver.java @@ -0,0 +1,48 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import java.io.File; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.builders.BuildSettingsKey; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.IXdsParserMonitor; +import com.excelsior.xds.parser.modula.XdsParser; +import com.excelsior.xds.parser.modula.XdsSettings; +import com.excelsior.xds.parser.modula.XdsSourceType; + +public final class DefaultImportResolver extends BaseImportResolver +{ + private final BuildSettings buildSettings; + + public DefaultImportResolver(BuildSettings buildSettings, IParserEventListener reporter, + IXdsParserMonitor monitor) { + super(reporter, monitor); + this.buildSettings = buildSettings; + } + + @Override + protected IFileStore lookupModule(String moduleName) { + File moduleFile = null; + if (buildSettings != null) { + moduleFile = buildSettings.lookup(moduleName); + } + return ResourceUtils.toFileStore(moduleFile); + } + + @Override + public ParsedModuleKey createModuleKey(IFileStore moduleFile) { + return new ParsedModuleKey(buildSettings, moduleFile); + } + + @Override + protected XdsParser createXdsParser(IFileStore moduleFile, String fileContents, + XdsSourceType sourceType) { + XdsParser parser = new XdsParser( moduleFile, fileContents + , new XdsSettings(buildSettings, sourceType), this, reporter, monitor ); + return parser; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IImportResolver.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IImportResolver.java new file mode 100644 index 0000000..636ed2e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IImportResolver.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +/** + * @author lsa80 + */ +public interface IImportResolver extends IModuleKeyFactory{ + /** + * Obtains symbol (either by parsing or from {@link ModulaSymbolCache}) + * + * @param language - how to parse (assuming what language) + * @param moduleName - name of the module + * @param hostFile - actual source file containing the code + * @param chars + * @param i + * @return + */ + IModuleSymbol resolveModuleSymbol( XdsLanguage language, String moduleName, IFileStore sourceFile); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModulaSymbolCacheListener.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModulaSymbolCacheListener.java new file mode 100644 index 0000000..24d548f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModulaSymbolCacheListener.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public interface IModulaSymbolCacheListener { + void moduleSymbolAdded(IModuleSymbol oldSymbol, IModuleSymbol newSymbol); + void moduleSymbolRemoved(IModuleSymbol symbol); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModuleKeyFactory.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModuleKeyFactory.java new file mode 100644 index 0000000..f257aee --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/IModuleKeyFactory.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; + +/** + * Can create {@link ParsedModuleKey} + * + * @author lsa80 + */ +public interface IModuleKeyFactory { + ParsedModuleKey createModuleKey(IFileStore moduleFile); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/ModulaSymbolCache.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/ModulaSymbolCache.java new file mode 100644 index 0000000..49202ab --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/ModulaSymbolCache.java @@ -0,0 +1,231 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +import com.excelsior.xds.core.utils.time.ModificationStamp; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.internal.modula.symbol.StandardModuleSymbol; +import com.excelsior.xds.parser.modula.XdsLanguage; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +public class ModulaSymbolCache{ + + private final boolean ID_DEBUG_PRINT_CACHE_MODIFICATIONS = false; + + private final ReadWriteLock instanceLock = new ReentrantReadWriteLock(); + + private final StandardModuleSymbol modulaSuperModule; + private final StandardModuleSymbol oberonSuperModule; + + private final StandardModuleSymbol modulaSystemModule; + private final StandardModuleSymbol oberonSystemModule; + + private final StandardModuleSymbol compilerModule; + + private final Map modulePath2ModuleSymbol = new HashMap(); + + private final List listeners = new CopyOnWriteArrayList<>(); + + public ModulaSymbolCache() { + super(); + modulaSuperModule = StandardModuleBuilder.buildStandardModuleSymbol(false); + oberonSuperModule = StandardModuleBuilder.buildStandardModuleSymbol(true); + + modulaSystemModule = StandardModuleBuilder.buildSystemModuleSymbol(false); + oberonSystemModule = StandardModuleBuilder.buildSystemModuleSymbol(true); + + compilerModule = StandardModuleBuilder.buildCompilerModuleSymbol(); + } + + public void addListener(IModulaSymbolCacheListener l) { + listeners.add(l); + } + + public void removeListener(IModulaSymbolCacheListener l) { + listeners.remove(l); + } + + public static StandardModuleSymbol getCompilerModule() { + return SymbolTableHolder.INSTANCE.compilerModule; + } + + public static StandardModuleSymbol getModulaSuperModule() { + return SymbolTableHolder.INSTANCE.modulaSuperModule; + } + + public static StandardModuleSymbol getModulaSystemModule() { + return SymbolTableHolder.INSTANCE.modulaSystemModule; + } + + public static StandardModuleSymbol getOberonSuperModule() { + return SymbolTableHolder.INSTANCE.oberonSuperModule; + } + + public static StandardModuleSymbol getOberonSystemModule() { + return SymbolTableHolder.INSTANCE.oberonSystemModule; + } + + public static StandardModuleSymbol getSuperModule(XdsLanguage language) { + if (language == XdsLanguage.Oberon2) { + return getOberonSuperModule(); + } + else { + return getModulaSuperModule(); + } + } + + public static StandardModuleSymbol getSystemModule(XdsLanguage language) { + if (language == XdsLanguage.Oberon2) { + return getOberonSystemModule(); + } + else { + return getModulaSystemModule(); + } + } + + public static ModulaSymbolCache instance() { + return SymbolTableHolder.INSTANCE; + } + + public void addModule(IModuleSymbol moduleSymbol) { + Lock writeLock = instanceLock.writeLock(); + IModuleSymbol oldSymbol = null; + try{ + writeLock.lock(); + oldSymbol = modulePath2ModuleSymbol.put(moduleSymbol.getKey(), moduleSymbol); + if (ID_DEBUG_PRINT_CACHE_MODIFICATIONS) System.out.println(String.format("Added %s %s", moduleSymbol.getKey().moduleFile, new ModificationStamp())); + } + finally{ + writeLock.unlock(); + } + notifyListenersSymbolAdded(oldSymbol, moduleSymbol); + } + + public void addModule(ModulaAst ast) { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + + if ((ast != null) && (ast.getSourceFile() != null) && ast.getModuleSymbol() != null) { + addModule(ast.getModuleSymbol()); + } + } + finally{ + writeLock.unlock(); + } + } + + public boolean removeModule(ParsedModuleKey moduleKey) { + Lock writeLock = instanceLock.writeLock(); + IModuleSymbol result = null; + try{ + writeLock.lock(); + result = modulePath2ModuleSymbol.remove(moduleKey); + if (ID_DEBUG_PRINT_CACHE_MODIFICATIONS) { + if (result != null) { + System.out.println(String.format("Removed %s %s", result.getSourceFile(), new ModificationStamp())); + } + else{ + System.out.println(String.format("Nothing to remove for the %s %s", moduleKey.moduleFile, new ModificationStamp())); + } + } + } + finally { + writeLock.unlock(); + } + notifyListenersSymbolRemoved(result); + return result != null; + } + + public boolean removeModule(IModuleSymbol modulaSymbol) { + return removeModule(modulaSymbol.getKey()); + } + + public IModuleSymbol getModuleSymbol(ParsedModuleKey moduleKey) { + if (moduleKey == null) { + return null; + } + else { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return modulePath2ModuleSymbol.get(moduleKey); + } + finally{ + readLock.unlock(); + } + } + } + + public Iterable moduleIterator() { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + return new Iterable() { + @Override + public Iterator iterator() { + return new ArrayList(modulePath2ModuleSymbol.values()).iterator(); + } + }; + } + finally{ + readLock.unlock(); + } + } + + /** + * Removes all of the symbols from this symbol table. + * The symbol table will be empty after this call returns. + */ + public void clear() { + Lock writeLock = instanceLock.writeLock(); + try{ + writeLock.lock(); + modulePath2ModuleSymbol.clear(); + } + finally{ + writeLock.unlock(); + } + } + + public void debugDump() { + Lock readLock = instanceLock.readLock(); + try{ + readLock.lock(); + Iterable moduleIterator = ModulaSymbolCache.instance().moduleIterator(); + System.out.println("-=-=-=-=-=- BEGIN ModulaSymbolCache -=-=-=-=-=-"); + for (IModuleSymbol moduleSymbol : moduleIterator) { + System.out.println(moduleSymbol.getQualifiedName()); + } + System.out.println("-=-=-=-=-=- END ModulaSymbolCache -=-=-=-=-=-"); + } + finally{ + readLock.unlock(); + } + } + + private void notifyListenersSymbolAdded(IModuleSymbol oldSymbol, IModuleSymbol newSymbol) { + for (IModulaSymbolCacheListener l : listeners) { + l.moduleSymbolAdded(oldSymbol, newSymbol); + } + } + + private void notifyListenersSymbolRemoved(IModuleSymbol symbol) { + for (IModulaSymbolCacheListener l : listeners) { + l.moduleSymbolRemoved(symbol); + } + } + + private static class SymbolTableHolder{ + static ModulaSymbolCache INSTANCE = new ModulaSymbolCache(); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/StandardModuleBuilder.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/StandardModuleBuilder.java new file mode 100644 index 0000000..2519f97 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/binding/StandardModuleBuilder.java @@ -0,0 +1,426 @@ +package com.excelsior.xds.parser.modula.symbol.binding; + +import static com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory.createStaticRef; + +import com.excelsior.xds.parser.internal.modula.symbol.BooleanConstantSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.ConstantSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.StandardModuleSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.StandardProcedureSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.WholeConstantSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.reference.InternalReferenceUtils; +import com.excelsior.xds.parser.internal.modula.symbol.reference.StaticRefFactory; +import com.excelsior.xds.parser.internal.modula.symbol.type.ArrayTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.NumericalTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.OrdinalTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.PointerTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.ProcedureTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.RangeTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.SetTypeSymbol; +import com.excelsior.xds.parser.internal.modula.symbol.type.TypeSymbol; +import com.excelsior.xds.parser.modula.XdsStandardNames; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IOrdinalTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.type.NumericalType; +import com.excelsior.xds.parser.modula.type.OrdinalType; +import com.excelsior.xds.parser.modula.type.SetType; +import com.excelsior.xds.parser.modula.type.Type; +import com.excelsior.xds.parser.modula.type.XdsStandardTypes; + +abstract class StandardModuleBuilder implements XdsStandardNames +{ + private static int BITSPERLOC_VALUE = 8; + private static int LOCSPERWORD_VALUE = 4; + private static int LOCSPERBYTE_VALUE = 1; + + private static final StaticRefFactory staticRefFactory = StaticRefFactory.instance(); + + public static StandardModuleSymbol buildStandardModuleSymbol(boolean isOberon) { + StandardModuleSymbol superModule; + if (isOberon) { + superModule = new StandardModuleSymbol(OBERON_SUPERMODULE, true); + buildOberonSuperModule(superModule); + } + else { + superModule = new StandardModuleSymbol(MODULA_SUPERMODULE, false); + buildModulaSuperModule(superModule); + } + return superModule; + } + + public static StandardModuleSymbol buildSystemModuleSymbol(boolean isOberon) { + StandardModuleSymbol systemModule = new StandardModuleSymbol(SYSTEM, isOberon); + buildSystemModule(systemModule, isOberon); + return systemModule; + } + + public static StandardModuleSymbol buildCompilerModuleSymbol() { + StandardModuleSymbol compilerModule = new StandardModuleSymbol(COMPILER, false); + buildCompilerModule(compilerModule); + return compilerModule; + } + + private static void buildModulaSuperModule(StandardModuleSymbol parentModule) { + addNumericalTypeSymbol(INTEGER, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(CARDINAL, parentModule, XdsStandardTypes.CARD32); +// IF env.config.Option(M2ADDTYPES) THEN + addNumericalTypeSymbol(SHORTINT, parentModule, XdsStandardTypes.INT8); + addNumericalTypeSymbol(LONGINT, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(LONGLONGINT, parentModule, XdsStandardTypes.INT64); + + addNumericalTypeSymbol(SHORTCARD, parentModule, XdsStandardTypes.CARD8); + addNumericalTypeSymbol(LONGCARD, parentModule, XdsStandardTypes.CARD32); + addNumericalTypeSymbol(LONGLONGCARD, parentModule, XdsStandardTypes.CARD64); +// END; + addOrdinalTypeSymbol(BOOLEAN, parentModule, XdsStandardTypes.BOOLEAN); + addOrdinalTypeSymbol(CHAR, parentModule, XdsStandardTypes.CHAR); + + addNumericalTypeSymbol(REAL, parentModule, XdsStandardTypes.REAL); + addNumericalTypeSymbol(LONGREAL, parentModule, XdsStandardTypes.LONG_REAL); +// <* IF TARGET_386 OR TARGET_VAX OR MERINS THEN *> + addNumericalTypeSymbol(LONGLONGREAL, parentModule, XdsStandardTypes.LONGLONG_REAL); +// <* END *> +// IF NOT oberon THEN + addProcedureTypeSymbol(PROC, parentModule); + addBitSetTypeSymbol(BITSET, parentModule, XdsStandardTypes.SET32, SHORTCARD); +// <* IF TARGET64 THEN *> + addBitSetTypeSymbol(BITSET64, parentModule, XdsStandardTypes.SET64, SHORTCARD); +// <* END *> + addNumericalTypeSymbol(PROTECTION, parentModule, XdsStandardTypes.PROTECTION); +// END; +// IF NOT oberon OR o2_num_ext THEN + addTypeSymbol(COMPLEX, parentModule, XdsStandardTypes.COMPLEX); + addTypeSymbol(LONGCOMPLEX, parentModule, XdsStandardTypes.LONG_COMPLEX); +// END; + + addPervasiveConstants(parentModule); + addStandardProcedures(parentModule, false); + } + + private static void buildOberonSuperModule(StandardModuleSymbol parentModule) { + addNumericalTypeSymbol(SHORTINT, parentModule, XdsStandardTypes.INT8); + addNumericalTypeSymbol(INTEGER, parentModule, XdsStandardTypes.INT16); + addNumericalTypeSymbol(LONGINT, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(LONGLONGINT, parentModule, XdsStandardTypes.INT64); + addNumericalTypeSymbol(LONGLONGCARD, parentModule, XdsStandardTypes.CARD64); + + addOrdinalTypeSymbol(BOOLEAN, parentModule, XdsStandardTypes.BOOLEAN); + addOrdinalTypeSymbol(CHAR, parentModule, XdsStandardTypes.CHAR); + + addNumericalTypeSymbol(REAL, parentModule, XdsStandardTypes.REAL); + addNumericalTypeSymbol(LONGREAL, parentModule, XdsStandardTypes.LONG_REAL); +// <* IF TARGET_386 OR TARGET_VAX OR MERINS THEN *> + addNumericalTypeSymbol(LONGLONGREAL, parentModule, XdsStandardTypes.LONGLONG_REAL); +// <* END *> + addBitSetTypeSymbol(SET, parentModule, XdsStandardTypes.SET32, "#CARD8#"); //$NON-NLS-1$ +// IF NOT oberon OR o2_num_ext THEN + addTypeSymbol(COMPLEX, parentModule, XdsStandardTypes.COMPLEX); + addTypeSymbol(LONGCOMPLEX, parentModule, XdsStandardTypes.LONG_COMPLEX); +// <* END *> + + addPervasiveConstants(parentModule); + addStandardProcedures(parentModule, true); + } + + private static void buildSystemModule(StandardModuleSymbol parentModule, boolean isOberon) { + addSystemModuleTypes(parentModule, isOberon); + + IOrdinalTypeSymbol card8TypeSymbol = (IOrdinalTypeSymbol)parentModule.resolveName(CARD8); + IStaticModulaSymbolReference card8TypeSymbolRef = createStaticRef(card8TypeSymbol); + addConstant(new WholeConstantSymbol(BITSPERLOC, parentModule, card8TypeSymbolRef, BITSPERLOC_VALUE), parentModule); + addConstant(new WholeConstantSymbol(LOCSPERWORD, parentModule, card8TypeSymbolRef, LOCSPERWORD_VALUE), parentModule); + addConstant(new WholeConstantSymbol(LOCSPERBYTE, parentModule, card8TypeSymbolRef, LOCSPERBYTE_VALUE), parentModule); + + addStandardProcedure(new StandardProcedureSymbol(ADDADR, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(SUBADR, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(DIFADR, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(DIFADRC, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(MAKEADR, parentModule), parentModule); + if (isOberon){ + addStandardProcedure(new StandardProcedureSymbol(ADR, parentModule), parentModule); + } + else{ + addStandardProcedure(new StandardProcedureSymbol(ADR, parentModule), parentModule); + } + addStandardProcedure(new StandardProcedureSymbol(M2ADR, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(SHIFT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(ROTATE, parentModule), parentModule); + if (!isOberon) { + addStandardProcedure(new StandardProcedureSymbol(CAST, parentModule), parentModule); + } + addStandardProcedure(new StandardProcedureSymbol(TSIZE, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(ROT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(LSH, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(NEW, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(DISPOSE, parentModule), parentModule); + + if (isOberon) { + PointerTypeSymbol addrTypeSymbol = (PointerTypeSymbol)parentModule.resolveName(ADDRESS); + addType(parentModule, addrTypeSymbol.createSynonym(PTR, parentModule, staticRefFactory)); + } + + addStandardProcedure(new StandardProcedureSymbol(CC, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(BIT, parentModule), parentModule); + + if (isOberon) { + addStandardProcedure(new StandardProcedureSymbol(VAL, parentModule), parentModule); + } + addStandardProcedure(new StandardProcedureSymbol(GET, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(GETREG, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(PUT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(PUTREG, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(MOVE, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(CODE, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(BYTES, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(BITS, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(REF, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(VALID, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(FILL, parentModule), parentModule); + +// IF pcS.TS_ext() THEN + addStandardProcedure(new StandardProcedureSymbol(EVAL, parentModule), parentModule); +// END; + + addStandardProcedure(new StandardProcedureSymbol(FIELDOFS, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(PRED, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(SUCC, parentModule), parentModule); + } + + private static void addSystemModuleTypes(StandardModuleSymbol parentModule, boolean isOberon) { + addNumericalTypeSymbol(INT8, parentModule, XdsStandardTypes.INT8); + addNumericalTypeSymbol(CARD8, parentModule, XdsStandardTypes.CARD8); + + addNumericalTypeSymbol(INT16, parentModule, XdsStandardTypes.INT16); + addNumericalTypeSymbol(CARD16, parentModule, XdsStandardTypes.CARD16); + + addNumericalTypeSymbol(INT32, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(CARD32, parentModule, XdsStandardTypes.CARD32); + + addBitSetTypeSymbol(SET8, parentModule, XdsStandardTypes.SET8, CARD8); + addBitSetTypeSymbol(SET16, parentModule, XdsStandardTypes.SET16, CARD8); + addBitSetTypeSymbol(SET32, parentModule, XdsStandardTypes.SET32, CARD8); +// <* IF TARGET64 OR TARGET_MIPS OR TARGET_386 THEN *> + addBitSetTypeSymbol(SET64, parentModule, XdsStandardTypes.SET64, CARD8); +// <* END *> + + addOrdinalTypeSymbol(BOOL8, parentModule, XdsStandardTypes.BOOLEAN); + addOrdinalTypeSymbol(BOOL16, parentModule, XdsStandardTypes.BOOLEAN); + addOrdinalTypeSymbol(BOOL32, parentModule, XdsStandardTypes.BOOLEAN); + + addNumericalTypeSymbol(Int, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(Unsigned, parentModule, XdsStandardTypes.CARD32); + addNumericalTypeSymbol(Size_t, parentModule, XdsStandardTypes.CARD32); + addTypeSymbol(Void, parentModule, XdsStandardTypes.VOID); + + addNumericalTypeSymbol(INT, parentModule, XdsStandardTypes.INT32); + addNumericalTypeSymbol(CARD, parentModule, XdsStandardTypes.CARD32); + +// <* IF TARGET64 OR TARGET_MIPS OR TARGET_386 THEN *> + addNumericalTypeSymbol(INT64, parentModule, XdsStandardTypes.INT64); + addNumericalTypeSymbol(CARD64, parentModule, XdsStandardTypes.CARD64); +// <* END *> + + addNumericalTypeSymbol(INDEX, parentModule, XdsStandardTypes.CARD32); + addTypeSymbol(LOC, parentModule, XdsStandardTypes.LOC); + addTypeSymbol(BYTE, parentModule, XdsStandardTypes.BYTE); + addWordTypeSymbol(WORD, parentModule); + + addAddressType(ADDRESS, parentModule); + } + + private static void buildCompilerModule(StandardModuleSymbol parentModule) { + addStandardProcedure(new StandardProcedureSymbol(TARGET, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(OPTION, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(EQUATION, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(TIMESTAMP, parentModule), parentModule); + } + + private static void addPervasiveConstants(StandardModuleSymbol parentModule) { + IOrdinalTypeSymbol typeSymbol = (IOrdinalTypeSymbol)parentModule.resolveName(BOOLEAN); + IStaticModulaSymbolReference typeSymbolRef = createStaticRef(typeSymbol); + addConstant(new BooleanConstantSymbol(TRUE, parentModule, typeSymbolRef, true), parentModule); + addConstant(new BooleanConstantSymbol(FALSE, parentModule, typeSymbolRef, false), parentModule); + + typeSymbol = (IOrdinalTypeSymbol)parentModule.resolveName(PROTECTION); + typeSymbolRef = createStaticRef(typeSymbol); + addConstant(new WholeConstantSymbol(INTERRUPTIBLE, parentModule, typeSymbolRef, 0), parentModule); + addConstant(new WholeConstantSymbol(UNINTERRUPTIBLE, parentModule, typeSymbolRef, 1), parentModule); + + IPointerTypeSymbol addressTypeSymbol = (IPointerTypeSymbol)parentModule.resolveName(ADDRESS); + addConstant(new ConstantSymbol(NIL, parentModule, createStaticRef(addressTypeSymbol)), parentModule); + } + + private static void addStandardProcedures(StandardModuleSymbol parentModule, boolean isOberon) { + addStandardProcedure(new StandardProcedureSymbol(ABS, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(DEC, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(DISPOSE, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(INC, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(INCL, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(EXCL, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(NEW, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(HALT, parentModule), parentModule); + +// IF oberon OR lang_ext THEN + addStandardProcedure(new StandardProcedureSymbol(ASSERT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(COPY, parentModule), parentModule); +// END; + +// IF lang_ext THEN + addStandardProcedure(new StandardProcedureSymbol(RESIZE, parentModule), parentModule); +// END; + addStandardProcedure(new StandardProcedureSymbol(CAP, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(CHR, parentModule), parentModule); + + if (!isOberon) { + addStandardProcedure(new StandardProcedureSymbol(FLOAT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(HIGH, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(PROT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(INT, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(LFLOAT, parentModule), parentModule); + } + +// IF NOT oberon OR o2_num_ext THEN + addStandardProcedure(new StandardProcedureSymbol(CMPLX, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(IM, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(RE, parentModule), parentModule); +// END; + addStandardProcedure(new StandardProcedureSymbol(MAX, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(MIN, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(ODD, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(ORD, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(SIZE, parentModule), parentModule); + + if (!isOberon) { + addStandardProcedure(new StandardProcedureSymbol(TRUNC, parentModule), parentModule); + } + + // IF NOT oberon OR lang_ext THEN + addStandardProcedure(new StandardProcedureSymbol(LENGTH, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(VAL, parentModule), parentModule); +// END; +// IF oberon OR lang_ext THEN + addStandardProcedure(new StandardProcedureSymbol(ASH, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(LEN, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(ENTIER, parentModule), parentModule); +// END; + + if (isOberon) { + addStandardProcedure(new StandardProcedureSymbol(LONG, parentModule), parentModule); + addStandardProcedure(new StandardProcedureSymbol(SHORT, parentModule), parentModule); + } + +// IF pcS.TS_ext() THEN + addStandardProcedure(new StandardProcedureSymbol(FieldOfs, parentModule), parentModule); +// END; + } + + + private static TypeSymbol addTypeSymbol( + String typeName, StandardModuleSymbol parentModule, T type ) + { + TypeSymbol typeSymbol = new TypeSymbol(typeName, parentModule, type); + addType(parentModule, typeSymbol); + return typeSymbol; + } + + private static OrdinalTypeSymbol addOrdinalTypeSymbol( + String typeName, StandardModuleSymbol parentModule, T type ) + { + OrdinalTypeSymbol typeSymbol = new OrdinalTypeSymbol(typeName, parentModule, type); + addType(parentModule, typeSymbol); + return typeSymbol; + } + + private static void addStandardProcedure( StandardProcedureSymbol symbol + , StandardModuleSymbol parentModule ) + { + parentModule.add(symbol); + InternalReferenceUtils.addSymbolForResolving(parentModule, symbol); + } + + private static void addConstant( IConstantSymbol symbol + , StandardModuleSymbol parentModule ) + { + parentModule.addConstant(symbol); + InternalReferenceUtils.addSymbolForResolving(parentModule, symbol); + } + + private static ProcedureTypeSymbol addProcedureTypeSymbol + ( String typeName + , StandardModuleSymbol parentModule ) + { + ProcedureTypeSymbol typeSymbol = new ProcedureTypeSymbol(typeName, parentModule); + addType(parentModule, typeSymbol); + return typeSymbol; + } + + private static NumericalTypeSymbol addNumericalTypeSymbol( + String typeName, StandardModuleSymbol parentModule, NumericalType type ) + { + NumericalTypeSymbol typeSymbol = new NumericalTypeSymbol(typeName, parentModule, type); + addType(parentModule, typeSymbol); + return typeSymbol; + } + + private static SetTypeSymbol addBitSetTypeSymbol( + String typeName, StandardModuleSymbol parentModule, + SetType type, String rangeBaseTypeName ) + { + SetTypeSymbol setTypeSymbol = new SetTypeSymbol(typeName, parentModule, true); + + IOrdinalTypeSymbol rangeBaseTypeSymbol = (IOrdinalTypeSymbol)parentModule.resolveName(rangeBaseTypeName); + if (rangeBaseTypeSymbol == null) { + rangeBaseTypeSymbol = new NumericalTypeSymbol( + rangeBaseTypeName, parentModule, XdsStandardTypes.CARD8 + ); + } + + RangeTypeSymbol rangeTypeSymbol = new RangeTypeSymbol( + typeName + "_range", parentModule, rangeBaseTypeSymbol, + type.getBaseType().getMinValue(), + type.getBaseType().getMaxValue() + ); + setTypeSymbol.setBaseTypeSymbol(rangeTypeSymbol); + addType(parentModule, setTypeSymbol); + return setTypeSymbol; + } + + /** + * The type WORD is defined as + * CONST LOCSPERWORD = 4; + * TYPE WORD = ARRAY [0..LOCSPERWORD-1] OF LOC; + * and the value of the call TSIZE(WORD) is equal to LOCSPERWORD. + * The only operation directly defined for the WORD type is an assignment. + * There are special rules affecting parameter compatibility for system + * storage types. See System parameter compatibility for further details. + */ + private static void addWordTypeSymbol( String typeName + , StandardModuleSymbol parentModule ) + { + IOrdinalTypeSymbol indexBaseTypeSymbol = (IOrdinalTypeSymbol)parentModule.resolveName(INDEX); + RangeTypeSymbol indexTypeSymbol = new RangeTypeSymbol( + typeName + "_index", parentModule, indexBaseTypeSymbol, + 0, (LOCSPERWORD_VALUE - 1) + ); + + ITypeSymbol elementTypeSymbol = (ITypeSymbol) parentModule.resolveName(LOC); + + ArrayTypeSymbol wordTypeSymbol = new ArrayTypeSymbol( typeName, parentModule + , staticRefFactory.createRef((IOrdinalTypeSymbol)indexTypeSymbol) + , staticRefFactory.createRef(elementTypeSymbol) ); + addType(parentModule, wordTypeSymbol); + } + + private static void addAddressType(String typeName, StandardModuleSymbol parentModule) + { + PointerTypeSymbol addressPointerType = new PointerTypeSymbol(typeName, parentModule, XdsStandardTypes.ADDRESS); + addType(parentModule, addressPointerType); + } + + private static void addType(StandardModuleSymbol parentModule, ITypeSymbol typeSymbol) { + parentModule.addType(typeSymbol); + InternalReferenceUtils.addSymbolForResolving(parentModule, typeSymbol); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IChainedReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IChainedReference.java new file mode 100644 index 0000000..860ecd9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IChainedReference.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public interface IChainedReference extends IModulaSymbolReference + , Iterable> +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IModulaSymbolReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IModulaSymbolReference.java new file mode 100644 index 0000000..1d08e31 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IModulaSymbolReference.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.symbol.reference; + +import com.excelsior.xds.parser.commons.symbol.ISymbolReference; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +public interface IModulaSymbolReference extends ISymbolReference +{ +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IProxyReference.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IProxyReference.java new file mode 100644 index 0000000..1206a44 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/IProxyReference.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.parser.modula.symbol.reference; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +/** + * Delegates all reference resolve requests to the inner reference + */ +public interface IProxyReference extends IModulaSymbolReference +{ + void setReference(IModulaSymbolReference reference); + IModulaSymbolReference getReference(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/ReferenceUtils.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/ReferenceUtils.java new file mode 100644 index 0000000..91ba219 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/reference/ReferenceUtils.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.parser.modula.symbol.reference; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +import com.excelsior.xds.core.utils.Lambdas; +import com.excelsior.xds.parser.internal.modula.symbol.reference.IStaticModulaSymbolReference; +import com.excelsior.xds.parser.internal.modula.symbol.reference.ReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +/** + * Helpers to work with the symbol references + * @author lsa80 + */ +public class ReferenceUtils +{ + public static IModulaSymbolReference createRef(T symbol) { + return ReferenceFactory.createRef(symbol); + } + + public static IChainedReference createChainedRef(List> refs) { + return ReferenceFactory.createChainedRef(refs); + } + + public static IStaticModulaSymbolReference createStaticRef(final T symbol) { + return ReferenceFactory.createStaticRef(symbol); + } + + public static T resolve(IModulaSymbolReference ref) { + return ref != null ? ref.resolve() : null; + } + + public static Collection resolve(Collection> refs) { + return refs.stream().map(ReferenceUtils::resolve).collect(Collectors.toList()); + } + + public static Collection transformToSymbols(Collection> refs) + { + return refs.stream().map(ReferenceUtils::resolve).filter(Lambdas.nonnull()).collect(Collectors.toList()); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IArrayTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IArrayTypeSymbol.java new file mode 100644 index 0000000..1dc5f08 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IArrayTypeSymbol.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.ArrayType; + +public interface IArrayTypeSymbol extends ITypeSymbol { + + /** + * {@inheritDoc} + */ + @Override + public ArrayType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IArrayTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public IOrdinalTypeSymbol getIndexTypeSymbol(); + + public ITypeSymbol getElementTypeSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IEnumTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IEnumTypeSymbol.java new file mode 100644 index 0000000..5878e9f --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IEnumTypeSymbol.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.EnumType; + +public interface IEnumTypeSymbol extends IOrdinalTypeSymbol + , ISymbolWithScope +{ + /** + * {@inheritDoc} + */ + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName); + + /** + * {@inheritDoc} + */ + @Override + public IEnumElementSymbol findSymbolInScope(String symbolName, boolean isPublic); + + /** + * {@inheritDoc} + */ + @Override + public EnumType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IEnumTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public Collection getElements(); + + public int getElementCount(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IForwardTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IForwardTypeSymbol.java new file mode 100644 index 0000000..c67ce90 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IForwardTypeSymbol.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; + +/** + * A symbol that defines a forward type declaration. + */ +public interface IForwardTypeSymbol extends ITypeSymbol +{ + public ITypeSymbol getActualTypeSymbol(); + + public void addUsage(IModulaSymbol s); + + public Collection getUsages(); + + public void releaseUsages(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IInvalidTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IInvalidTypeSymbol.java new file mode 100644 index 0000000..eefcf73 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IInvalidTypeSymbol.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IInvalidModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.VoidType; + +/** + * Type symbol of invalid or unknown type. + */ +public interface IInvalidTypeSymbol extends ITypeSymbol, IInvalidModulaSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public VoidType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IInvalidTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/INumericalTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/INumericalTypeSymbol.java new file mode 100644 index 0000000..54f7737 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/INumericalTypeSymbol.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.NumericalType; + + +public interface INumericalTypeSymbol extends IOrdinalTypeSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public T getType(); + + /** + * {@inheritDoc} + */ + @Override + public INumericalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOberonMethodTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOberonMethodTypeSymbol.java new file mode 100644 index 0000000..bb22095 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOberonMethodTypeSymbol.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.modula.symbol.IOberonMethodReceiverSymbol; +import com.excelsior.xds.parser.modula.type.OberonMethodType; + +public interface IOberonMethodTypeSymbol extends IProcedureTypeSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public OberonMethodType getType(); + + public IOberonMethodReceiverSymbol getReceiverSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOpaqueTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOpaqueTypeSymbol.java new file mode 100644 index 0000000..efcc9df --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOpaqueTypeSymbol.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.OpaqueType; + +/** + * A symbol that defines a opaque type. + */ +public interface IOpaqueTypeSymbol extends ITypeSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public OpaqueType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IOpaqueTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public ITypeSymbol getActualTypeSymbol(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOrdinalTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOrdinalTypeSymbol.java new file mode 100644 index 0000000..e5a96cc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IOrdinalTypeSymbol.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.OrdinalType; + +public interface IOrdinalTypeSymbol extends ITypeSymbol { + + /** + * {@inheritDoc} + */ + @Override + public OrdinalType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IOrdinalTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IPointerTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IPointerTypeSymbol.java new file mode 100644 index 0000000..7d64b49 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IPointerTypeSymbol.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.PointerType; + +public interface IPointerTypeSymbol extends ITypeSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public PointerType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IPointerTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public ITypeSymbol getBoundTypeSymbol(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IProcedureTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IProcedureTypeSymbol.java new file mode 100644 index 0000000..3219265 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IProcedureTypeSymbol.java @@ -0,0 +1,36 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.ProcedureType; + +/** + * A symbol that defines a procedure type and its structure: parameters and return type. + */ +public interface IProcedureTypeSymbol extends ITypeSymbol, ISymbolWithScope +{ + /** + * {@inheritDoc} + */ + @Override + public ProcedureType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IProcedureTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + /** + * Returns a ITypeSymbol of procedure return value or null if procedure has no return value. + * + * @return type symbol of procedure return value or null. + */ + public ITypeSymbol getReturnTypeSymbol(); + + public Collection getParameters(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRangeTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRangeTypeSymbol.java new file mode 100644 index 0000000..b24f382 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRangeTypeSymbol.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.NumericalType; +import com.excelsior.xds.parser.modula.type.RangeType; + + +public interface IRangeTypeSymbol extends INumericalTypeSymbol { + + /** + * {@inheritDoc} + */ + @Override + public RangeType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IRangeTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public IOrdinalTypeSymbol getBaseTypeSymbol(); +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRecordTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRecordTypeSymbol.java new file mode 100644 index 0000000..a0e0672 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/IRecordTypeSymbol.java @@ -0,0 +1,37 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import java.util.Collection; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IRecordFieldSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithProcedures; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.RecordType; + +public interface IRecordTypeSymbol extends ITypeSymbol + , ISymbolWithProcedures +{ + /** + * {@inheritDoc} + */ + @Override + public RecordType getType(); + + /** + * {@inheritDoc} + */ + @Override + public IRecordTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public void addField(IRecordFieldSymbol s); + + public Collection getFields(); + + + //-------------------------------------------------------------------------- + // Oberon-2 specific part + //-------------------------------------------------------------------------- + + public IRecordTypeSymbol getBaseTypeSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ISetTypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ISetTypeSymbol.java new file mode 100644 index 0000000..4923698 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ISetTypeSymbol.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.SetType; + +public interface ISetTypeSymbol extends IOrdinalTypeSymbol { + + /** + * {@inheritDoc} + */ + @Override + public SetType getType(); + + /** + * {@inheritDoc} + */ + @Override + public ISetTypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + + public IOrdinalTypeSymbol getBaseTypeSymbol(); + + public boolean isPacked(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSymbol.java new file mode 100644 index 0000000..99ef172 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSymbol.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.internal.modula.symbol.reference.IReferenceFactory; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.type.Type; + +/** + * A symbol that defines a type and its structure. + */ +public interface ITypeSymbol extends IModulaSymbol { + + public Type getType(); + + public ITypeSymbol createSynonym(String name, ISymbolWithScope parentScope, IReferenceFactory refFactory); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSynonymSymbol.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSynonymSymbol.java new file mode 100644 index 0000000..32a5049 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/symbol/type/ITypeSynonymSymbol.java @@ -0,0 +1,23 @@ +package com.excelsior.xds.parser.modula.symbol.type; + +import com.excelsior.xds.parser.modula.symbol.ISynonymSymbol; + +/** + * A symbol that defines a synonym to other type symbol. + */ +public interface ITypeSynonymSymbol extends ITypeSymbol + , ISynonymSymbol +{ + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getOriginalSymbol(); + + /** + * {@inheritDoc} + */ + @Override + public ITypeSymbol getReferencedSymbol(); + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ArrayType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ArrayType.java new file mode 100644 index 0000000..5066e35 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ArrayType.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.type; + +public class ArrayType extends Type { + + private final OrdinalType indexType; + private final Type elementType; + + public ArrayType(String debugName, OrdinalType indexType, Type elementType) { + super(debugName); + this.indexType = indexType; + this.elementType = elementType; + } + + public Type getElementType() { + return elementType; + } + + public OrdinalType getIndexType() { + return indexType; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BitSetType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BitSetType.java new file mode 100644 index 0000000..9f2164c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BitSetType.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.type; + +public class BitSetType extends SetType { + + public BitSetType(String debugName, int length) { + super(debugName, createBaseType(debugName + "_range", length)); //$NON-NLS-1$ + } + + private static OrdinalType createBaseType(String debugName, int length) { + return new RangeType( debugName, XdsStandardTypes.CARD8 + , (short)0, (short)(length - 1) + ); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BooleanType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BooleanType.java new file mode 100644 index 0000000..a9da9a3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/BooleanType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class BooleanType extends OrdinalType { + + public BooleanType(String debugName) { + super(debugName, (short)0, (short)1); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CardType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CardType.java new file mode 100644 index 0000000..055f1c9 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CardType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class CardType extends NumericalType { + + public CardType(String debugName) { + super(debugName, 0, 0xFFFF); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CharType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CharType.java new file mode 100644 index 0000000..8e0322a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/CharType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class CharType extends OrdinalType { + + public CharType(String debugName) { + super(debugName, (short)0, (short)0xFF); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ComplexType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ComplexType.java new file mode 100644 index 0000000..f7f0194 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ComplexType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class ComplexType extends Type { + + public ComplexType(String debugName) { + super(debugName); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/EnumType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/EnumType.java new file mode 100644 index 0000000..94bbbbc --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/EnumType.java @@ -0,0 +1,15 @@ +package com.excelsior.xds.parser.modula.type; + +public class EnumType extends OrdinalType { + + private int elementCount; + + public EnumType(String debugName, int elementCount) { + super(debugName, 0, elementCount - 1); + } + + public int getElementCount() { + return elementCount; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/IntType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/IntType.java new file mode 100644 index 0000000..dcdc364 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/IntType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class IntType extends NumericalType { + + public IntType(String debugName) { + super(debugName, Short.MIN_VALUE, Short.MAX_VALUE); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LocType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LocType.java new file mode 100644 index 0000000..6b7bb2e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LocType.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.parser.modula.type; + +/** + * Values of the LOC type are the uninterpreted contents of the smallest + * addressable unit of a storage in implementation. + * + */ +public class LocType extends Type { + + public LocType(String debugName) { + super(debugName); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongCardType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongCardType.java new file mode 100644 index 0000000..eb2a54a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongCardType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class LongCardType extends NumericalType { + + public LongCardType(String debugName) { + super(debugName, 0L, 0xFFFFFFFFL); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongIntType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongIntType.java new file mode 100644 index 0000000..c429a3e --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongIntType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class LongIntType extends NumericalType { + + public LongIntType(String debugName) { + super(debugName, Integer.MIN_VALUE, Integer.MAX_VALUE); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongCardType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongCardType.java new file mode 100644 index 0000000..eb8f940 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongCardType.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.modula.type; + +import java.math.BigInteger; + +public class LongLongCardType extends NumericalType { + + public LongLongCardType(String debugName) { + super(debugName, BigInteger.ZERO, new BigInteger("FFFFFFFFFFFFFFFF", 16)); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongIntType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongIntType.java new file mode 100644 index 0000000..5d61ce8 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongIntType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class LongLongIntType extends NumericalType { + + public LongLongIntType(String debugName) { + super(debugName, Long.MIN_VALUE, Long.MAX_VALUE); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongRealType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongRealType.java new file mode 100644 index 0000000..cdf8439 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongLongRealType.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.parser.modula.type; + +public class LongLongRealType extends NumericalType { + + public LongLongRealType(String debugName) { + //TODO MIN and MAX value should be adjusted + super(debugName, Double.MIN_VALUE, Double.MAX_VALUE); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongRealType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongRealType.java new file mode 100644 index 0000000..a93ecf5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/LongRealType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class LongRealType extends NumericalType { + + public LongRealType(String debugName) { + super(debugName, Double.MIN_VALUE, Double.MAX_VALUE); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/NumericalType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/NumericalType.java new file mode 100644 index 0000000..b6ca3bb --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/NumericalType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class NumericalType extends OrdinalType { + + public NumericalType(String debugName, Number minValue, Number maxValue) { + super(debugName, minValue, maxValue); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OberonMethodType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OberonMethodType.java new file mode 100644 index 0000000..3964a96 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OberonMethodType.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.parser.modula.type; + +import com.excelsior.xds.parser.modula.symbol.type.IOberonMethodTypeSymbol; + +public class OberonMethodType extends ProcedureType +{ + + public OberonMethodType(String debugName, IOberonMethodTypeSymbol symbol) { + super(debugName, symbol); + } + + /** + * {@inheritDoc} + */ + @Override + public IOberonMethodTypeSymbol getSymbol() { + return (IOberonMethodTypeSymbol)super.getSymbol(); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpaqueType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpaqueType.java new file mode 100644 index 0000000..c0264b7 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpaqueType.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.type; + +import com.excelsior.xds.parser.modula.symbol.type.IOpaqueTypeSymbol; + +public class OpaqueType extends Type +{ + private IOpaqueTypeSymbol typeSymbol; + + public OpaqueType(String debugName) { + this(debugName, null); + } + + public OpaqueType(String debugName, IOpaqueTypeSymbol typeSymbol) { + super(debugName); + setSymbol(typeSymbol); + } + + public IOpaqueTypeSymbol getSymbol() { + return typeSymbol; + } + + public void setSymbol(IOpaqueTypeSymbol s) { + this.typeSymbol = s; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpenArrayType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpenArrayType.java new file mode 100644 index 0000000..64a6efa --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OpenArrayType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class OpenArrayType extends ArrayType { + + public OpenArrayType(String debugName, OrdinalType indexType, Type elementType) { + super(debugName, indexType, elementType); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OrdinalType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OrdinalType.java new file mode 100644 index 0000000..3830ba5 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/OrdinalType.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.parser.modula.type; + +public class OrdinalType extends Type { + + private final Number minValue; + private final Number maxValue; + + public OrdinalType(String debugName, Number minValue, Number maxValue) { + super(debugName); + this.minValue = minValue; + this.maxValue = maxValue; + } + + public Number getMinValue() { + return minValue; + } + + public Number getMaxValue() { + return maxValue; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/PointerType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/PointerType.java new file mode 100644 index 0000000..08d7519 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/PointerType.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.type; + +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; + +public class PointerType extends Type +{ + private IPointerTypeSymbol typeSymbol; + + public PointerType(String debugName) { + this(debugName, null); + } + + public PointerType(String debugName, IPointerTypeSymbol typeSymbol) { + super(debugName); + this.setSymbol(typeSymbol); + } + + public IPointerTypeSymbol getSymbol() { + return typeSymbol; + } + + public void setSymbol(IPointerTypeSymbol s) { + this.typeSymbol = s; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ProcedureType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ProcedureType.java new file mode 100644 index 0000000..781e4aa --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ProcedureType.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.parser.modula.type; + +import com.excelsior.xds.parser.modula.symbol.type.IProcedureTypeSymbol; + +public class ProcedureType extends Type +{ + private final IProcedureTypeSymbol typeSymbol; + + public ProcedureType(String debugName, IProcedureTypeSymbol symbol) { + super(debugName); + typeSymbol = symbol; + } + + public IProcedureTypeSymbol getSymbol() { + return typeSymbol; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RangeType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RangeType.java new file mode 100644 index 0000000..024af41 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RangeType.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.parser.modula.type; + +public class RangeType extends NumericalType { + + private OrdinalType baseType; + + public RangeType( String debugName, OrdinalType baseType + , Number minValue, Number maxValue ) + { + super(debugName, minValue, maxValue); + this.baseType = baseType; + } + + protected OrdinalType getBaseType() { + return baseType; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RealType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RealType.java new file mode 100644 index 0000000..a6dd1f3 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RealType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class RealType extends NumericalType { + + public RealType(String debugName) { + super(debugName, Float.MIN_VALUE, Float.MAX_VALUE); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RecordType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RecordType.java new file mode 100644 index 0000000..16ff18c --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/RecordType.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.parser.modula.type; + +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; + +public class RecordType extends Type { + + private IRecordTypeSymbol typeSymbol; + + public RecordType(String debugName) { + this(debugName, null); + } + + public RecordType(String debugName, IRecordTypeSymbol typeSymbol) { + super(debugName); + this.setSymbol(typeSymbol); + } + + public IRecordTypeSymbol getSymbol() { + return typeSymbol; + } + + public void setSymbol(IRecordTypeSymbol s) { + this.typeSymbol = s; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/SetType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/SetType.java new file mode 100644 index 0000000..d5505f1 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/SetType.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.parser.modula.type; + +public class SetType extends OrdinalType { + + private OrdinalType baseType; + + public SetType(String debugName, OrdinalType baseType) { + super(debugName, baseType.getMinValue(), baseType.getMaxValue()); + this.baseType = baseType; + } + + public OrdinalType getBaseType() { + return baseType; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortCardType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortCardType.java new file mode 100644 index 0000000..ce74f0b --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortCardType.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.parser.modula.type; + +public class ShortCardType extends NumericalType { + + public ShortCardType(String debugName) { + super(debugName, (short)0, (short)0xFF); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortIntType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortIntType.java new file mode 100644 index 0000000..a6533f4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/ShortIntType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class ShortIntType extends NumericalType { + + public ShortIntType(String debugName) { + super(debugName, Byte.MIN_VALUE, Byte.MAX_VALUE); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Size.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Size.java new file mode 100644 index 0000000..dd5131a --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Size.java @@ -0,0 +1,57 @@ +package com.excelsior.xds.parser.modula.type; + +import java.util.HashMap; +import java.util.Map; + +/** + * sizeof operation support + * @author lsa + * TODO : take this information from the debugger + */ +public final class Size { + private final Map type2Size = new HashMap(); + private final Map typeName2Type = new HashMap(); + + public static Integer of(Type type) { + return SizeHolder.instance.type2Size.get(type); + } + + public static Integer of(String typeName) { + Type type = SizeHolder.instance.typeName2Type.get(typeName.toLowerCase()); + return of(type); + } + + private static class SizeHolder{ + static final Size instance = new Size(); + } + + private Size() { + register(XdsStandardTypes.BOOLEAN, 1); + register(XdsStandardTypes.CHAR, 1); + register(XdsStandardTypes.INT8, 1); + register(XdsStandardTypes.INT16, 2); + register(XdsStandardTypes.INT32, 4); + register(XdsStandardTypes.INT64, 8); + register(XdsStandardTypes.CARD8, 1); + register(XdsStandardTypes.CARD16, 2); + register(XdsStandardTypes.CARD32, 4); + register(XdsStandardTypes.CARD64, 8); + + register(XdsStandardTypes.REAL, 4); + register(XdsStandardTypes.LONG_REAL, 8); + register(XdsStandardTypes.LONGLONG_REAL, 16); + + register(XdsStandardTypes.COMPLEX, 8); + register(XdsStandardTypes.LONG_COMPLEX, 16); + + register(XdsStandardTypes.SET8, 1); + register(XdsStandardTypes.SET16, 2); + register(XdsStandardTypes.SET32, 4); + register(XdsStandardTypes.SET64, 8); + } + + private void register(Type type, int size) { + typeName2Type.put(type.getName(), type); + type2Size.put(type, size); + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Type.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Type.java new file mode 100644 index 0000000..81aa0a4 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/Type.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.parser.modula.type; + +public abstract class Type { + + private final String name; + + public Type(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + @Override + public String toString() { + return "Type " + name; //$NON-NLS-1$ + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/VoidType.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/VoidType.java new file mode 100644 index 0000000..22a4e22 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/VoidType.java @@ -0,0 +1,9 @@ +package com.excelsior.xds.parser.modula.type; + +public class VoidType extends Type { + + public VoidType(String debugName) { + super(debugName); + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/XdsStandardTypes.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/XdsStandardTypes.java new file mode 100644 index 0000000..b191d85 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/type/XdsStandardTypes.java @@ -0,0 +1,58 @@ +package com.excelsior.xds.parser.modula.type; + +public interface XdsStandardTypes +{ + VoidType VOID = new VoidType("void"); //$NON-NLS-1$ + + /** + * Values of the LOC type are the uninterpreted contents of the smallest + * addressable unit of a storage in implementation. + * The value of the call TSIZE(LOC) is therefore equal to one. + */ + LocType LOC = new LocType("loc"); //$NON-NLS-1$ + + /** + * BYTE is defined as LOC and has all the properties of the type LOC. + */ + LocType BYTE = LOC; + + /** + * The ADDRESS type is an assignment compatible with all pointer types and + * vice versa (See Assignment compatibility). A formal variable parameter of + * the ADDRESS type is a parameter compatible with an actual parameter of + * any pointer type. Variables of type ADDRESS are no longer expression + * compatible with CARDINAL (as it was in PIM) and they cannot directly + * occur in expressions that include arithmetic operators. Functions ADDADR, + * SUBADR and DIFADR were introduced for address arithmetic. + */ + PointerType ADDRESS = new PointerType("address"); //$NON-NLS-1$ + + + BooleanType BOOLEAN = new BooleanType("boolean"); //$NON-NLS-1$ + CharType CHAR = new CharType("char"); //$NON-NLS-1$ + + ShortIntType INT8 = new ShortIntType("int8"); //$NON-NLS-1$ + IntType INT16 = new IntType("int16"); //$NON-NLS-1$ + LongIntType INT32 = new LongIntType("int32"); //$NON-NLS-1$ + LongLongIntType INT64 = new LongLongIntType("int64"); //$NON-NLS-1$ + + ShortCardType CARD8 = new ShortCardType("card8"); //$NON-NLS-1$ + CardType CARD16 = new CardType("card16"); //$NON-NLS-1$ + LongCardType CARD32 = new LongCardType("card32"); //$NON-NLS-1$ + LongLongCardType CARD64 = new LongLongCardType("card64"); //$NON-NLS-1$ + + RealType REAL = new RealType("real"); //$NON-NLS-1$ + LongRealType LONG_REAL = new LongRealType("longreal"); //$NON-NLS-1$ + LongLongRealType LONGLONG_REAL = new LongLongRealType("longlongreal"); //$NON-NLS-1$ + + ComplexType COMPLEX = new ComplexType("complex"); //$NON-NLS-1$ + ComplexType LONG_COMPLEX = new ComplexType("longcomplex"); //$NON-NLS-1$ + + BitSetType SET8 = new BitSetType("set8", 8); //$NON-NLS-1$ + BitSetType SET16 = new BitSetType("set16", 16); //$NON-NLS-1$ + BitSetType SET32 = new BitSetType("set16", 32); //$NON-NLS-1$ + BitSetType SET64 = new BitSetType("set64", 64); //$NON-NLS-1$ + + NumericalType PROTECTION = new NumericalType("protection", Short.MIN_VALUE, Short.MAX_VALUE); //$NON-NLS-1$ + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/AstUtils.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/AstUtils.java new file mode 100644 index 0000000..562c681 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/AstUtils.java @@ -0,0 +1,47 @@ +package com.excelsior.xds.parser.modula.utils; + +import java.util.ArrayList; +import java.util.List; + +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaElementType; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.google.common.collect.ImmutableSet; + +public abstract class AstUtils { + /** + * gets the n-th upper parent of the node + * @return + */ + public static PstNode getParent(PstNode node, int levelsUp) { + PstNode parent = node; + while(levelsUp-- > 0) { + parent = parent.getParent(); + if (parent == null) { + return null; + } + } + return parent; + } + + /** + * Get PROCEDURE_IDENTIFIER or MODULE_IDENTIFIER nodes of the containing composite + * @param node - should be name identifier of the procedure or module composite + * @return + */ + public static List getIdentifierNodesOfParent(PstNode node) { + List nodes = new ArrayList(); + PstNode parent = AstUtils.getParent(node, 2); + ImmutableSet elementTypes = ImmutableSet.of(ModulaElementTypes.PROCEDURE_IDENTIFIER, ModulaElementTypes.MODULE_IDENTIFIER); + if (parent instanceof PstCompositeNode) { + PstCompositeNode composite = (PstCompositeNode) parent; + for (PstNode child : composite.getChildren()) { + if (elementTypes.contains(child.getElementType())) { + nodes.add(child); + } + } + } + return nodes; + } +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaFileUtils.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaFileUtils.java new file mode 100644 index 0000000..7cdad81 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaFileUtils.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.parser.modula.utils; + +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.modula.XdsSourceType; + +/** + * Utility class for recognizing Modula-2 files. + */ +public final class ModulaFileUtils +{ + /** + * Only static method are allowed - this class should have no state + */ + private ModulaFileUtils() { + } + /** + * Returns type of a source file by file extension. + * + * @return type of the source file + */ + public static XdsSourceType getSourceType(String fileName) { + XdsSourceType sourceType; + String fileExtension = XdsFileUtils.getLowercasedExtension(fileName); + + if (XdsFileUtils.MODULA_FILE_EXTENSIONS.contains(fileExtension)) { + sourceType = XdsSourceType.Modula; + } + else if (XdsFileUtils.XDS_SYMBOL_FILE_EXTENSION.equals(fileExtension)) { + sourceType = XdsSourceType.OdfFile; + } + else if (XdsFileUtils.OBERON_MODULE_FILE_EXTENSION.equals(fileExtension)) { + sourceType = XdsSourceType.Oberon; + } + else if (XdsFileUtils.OBERON_DEFINITION_MODULE_FILE_EXTENSION.equals(fileExtension)) { + sourceType = XdsSourceType.OdfFile; + } + else { + sourceType = XdsSourceType.Modula; + } + + return sourceType; + } + +} diff --git a/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaSymbolUtils.java b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaSymbolUtils.java new file mode 100644 index 0000000..9e72753 --- /dev/null +++ b/product/com.excelsior.xds.parser/src/com/excelsior/xds/parser/modula/utils/ModulaSymbolUtils.java @@ -0,0 +1,292 @@ +package com.excelsior.xds.parser.modula.utils; + +import java.io.File; +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; + +import com.excelsior.xds.core.project.SpecialFolderNames; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.IAstSymbolRef; +import com.excelsior.xds.parser.modula.ast.IAstSymbolScope; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.ILocalModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardModuleSymbol; + +public abstract class ModulaSymbolUtils +{ + /** + * @param scope + * @param symbolName + * @param expectedClass expected class of found symbol + * @return + */ + @SuppressWarnings("unchecked") + public static T findSymbolInScope( IModulaSymbolScope scope + , String symbolName + , Class expectedClass ) + { + IModulaSymbol symbol = scope.findSymbolInScope(symbolName); + if (symbol != null && !expectedClass.isAssignableFrom(symbol.getClass())) { + symbol = null; + } + return (T)symbol; + } + + + /** + * Returns the parent module of the given symbol or + * null if parent module was not found. + * + * @param symbol a symbol to be analyzed + * + * @return parent module symbol + */ + public static IModuleSymbol getParentModule(IModulaSymbol symbol) { + while (symbol != null) { + symbol = symbol.getParentScope(); + if (symbol instanceof IModuleSymbol) { + return (IModuleSymbol)symbol; + } + } + return null; + } + + /** + * Checks that a symbol is defined in the given module or its local modules. + * + * @param module, the module to operate on. + * @param symbol, a symbol to be checked + * + * @return @true if symbol is defined inside given module. + */ + public static boolean isSymbolFromModule(IModuleSymbol module, IModulaSymbol symbol) + { + IModuleSymbol symbolParent = (symbol instanceof IModuleSymbol) + ? (IModuleSymbol)symbol + : getParentModule(symbol); + + if (module instanceof IStandardModuleSymbol) { + return module.equals(symbolParent); + } + else { + while (symbolParent != null) { + if (module.equals(symbolParent)) { + return true; + } + symbolParent = getParentModule(symbolParent); + } + } + + return false; + } + + /** + * Returns the source file of the given symbol or + * null if the source file was not defined for the symbol. + * + * @return the path the file system, or + * null if symbol has no associated source file + */ + public static File getSourceFile(IModulaSymbol symbol) { + while (symbol != null) { + if (symbol instanceof IModuleSymbol) { + try { + return ResourceUtils.getAbsoluteFile(((IModuleSymbol)symbol).getSourceFile()); + } catch (CoreException e) { + return null; + } + } + symbol = symbol.getParentScope(); + } + return null; + } + + /** + * Returns the source file of the given symbol or + * null if the source file was not defined for the symbol. + * + * @return the path the file system, or + * null if symbol has no associated source file + */ + public static IFileStore getSourceFileStore(IModulaSymbol symbol) { + while (symbol != null) { + if (symbol instanceof IModuleSymbol) { + return ((IModuleSymbol)symbol).getSourceFile(); + } + symbol = symbol.getParentScope(); + } + return null; + } + + /** + * Returns the handles of all files that are mapped to the source file of given symbol, filter by project, if it is not null + * + * @return the corresponding files in the workspace, or + * an empty array if none + */ + public static IFile[] findIFilesForSymbol(IProject project, IModulaSymbol symbol) { + IFile[] files; + IFileStore file = ModulaSymbolUtils.getSourceFileStore(symbol); + if (file == null) { + files = new IFile[0]; + } + else { + files = ResourceUtils.getWorkspaceRoot().findFilesForLocationURI(file.toURI()); + } + List resultIfiles = new ArrayList(); + for (IFile f : files) { + if ((project == null || f.getProject().equals(project)) && !SpecialFolderNames.isInsideIgnoredSpecialFolder(f)) { + resultIfiles.add(f); + } + } + return resultIfiles.toArray(new IFile[0]); + } + + /** + * Returns the handle of single file that is mapped to the source file of + * the given symbol. + * + * @return the corresponding file in the workspace, or + * null if none or more than one. + */ + public static IFile findFirstFileForSymbol(IProject project, IModulaSymbol symbol) { + IFile result = null; + IFile[] files = findIFilesForSymbol(project, symbol); + if (files.length > 0) { + result = files[0]; + } + return result; + } + + /** + * Returns the handle of single file that is mapped to the source file of + * the given symbol. + * + * @return the corresponding file in the workspace, or + * null if none or more than one. + */ + public static IFile findFileForSymbol(IProject project, IModulaSymbol symbol) { + IFile result = null; + IFile[] files = findIFilesForSymbol(project, symbol); + if (files.length == 1) { + result = files[0]; + } + return result; + } + + public static IModulaSymbol getSymbol(PstNode node) { + while (node != null) { + if (node instanceof IAstSymbolRef) { + return ((IAstSymbolRef)node).getSymbol(); + } + node = node.getParent(); + } + return null; + } + + + public static IModulaSymbolScope getParentScope(PstLeafNode leafNode) { + if (leafNode != null) { + PstNode parent = leafNode.getParent(); + while (parent != null) { + if (parent instanceof IAstSymbolScope) { + return ((IAstSymbolScope)parent).getScope(); + } + parent = parent.getParent(); + } + } + return null; + } + + /** + * Returns a list of enclosed scopes, containing the given leaf node. + * Last one is always super-module. + * + * @param leafNode + * @return list of enclosed scopes, containing the leaf node. + */ + public static List getAllParentScopes(PstLeafNode leafNode) { + List scopes = new ArrayList(); + + IModulaSymbolScope scope = getParentScope(leafNode); + while (scope != null) { + scopes.add(scope); + scope = scope.getParentScope(); + } + + return scopes; + } + + + /** + * Returns the host (non-local) module of the PST node. + * + * @param node the PstNode for which the host module is looked for + * @return host (non-local) module symbol + */ + public static IModuleSymbol getHostModule(PstNode node) { + while (node != null) { + if (node instanceof ModulaAst) { + return ((ModulaAst)node).getModuleSymbol(); + } + node = node.getParent(); + } + return null; + } + + + /** + * Returns name of a symbol. + * + * @param symbol the symbol to be processed, can be null + * + * @return a symbol's name or null. + */ + public static String getSymbolName(IModulaSymbol symbol) { + String name = null; + if (symbol != null) { + name = symbol.getName(); + } + return name; + } + + + /** + * Finds top-level IModuleSymbol containing IModulaSymbol (via traversing of the Parent Scope). + * + * @param symbol the symbol for which the host module is looked for + * @return host (non-local) module symbol + */ + public static IModuleSymbol getHostModule(IModulaSymbol symbol) { + while (symbol != null) { + if (isNonLocalModule(symbol)) { + return (IModuleSymbol) symbol; + } + symbol = symbol.getParentScope(); + } + return null; + } + + + /** + * Checks that a symbol is not local module. + * + * @param symbol, a symbol to be checked + * + * @return @true if symbol is not local module. + */ + public static boolean isNonLocalModule(IModulaSymbol symbol) { + return (symbol instanceof IModuleSymbol) && !(symbol instanceof ILocalModuleSymbol); + } + +} diff --git a/product/com.excelsior.xds.resources.feature/.project b/product/com.excelsior.xds.resources.feature/.project new file mode 100644 index 0000000..a91c023 --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.resources.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.resources.feature/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.resources.feature/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..1d9c803 --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/feature_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.resources.feature/build.properties b/product/com.excelsior.xds.resources.feature/build.properties new file mode 100644 index 0000000..af5287d --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/build.properties @@ -0,0 +1,3 @@ +bin.includes = feature.xml,\ + feature.properties,\ + feature_ru.properties diff --git a/product/com.excelsior.xds.resources.feature/feature.properties b/product/com.excelsior.xds.resources.feature/feature.properties new file mode 100644 index 0000000..006203c --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/feature.properties @@ -0,0 +1,3 @@ +#featureLabel=Excelsior XDS Modula-2 Resources + +featureDesription=Default files and code tempolates for Excelsior XDS Modula-2 Development Environment. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources.feature/feature.xml b/product/com.excelsior.xds.resources.feature/feature.xml new file mode 100644 index 0000000..1c98e17 --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/feature.xml @@ -0,0 +1,62 @@ + + + + + %featureDesription + + + + (c) 2014 Excelsior LLC + + + + Excelsior Freeware License Agreement + +This License Agreement ("Agreement") is a legal agreement between you (either an individual or a single entity) and Excelsior, LLC ("Excelsior") for the Excelsior software product identified above, which includes computer software, electronic documentation, and the associated printed materials ("Software"). By installing, copying or otherwise using the Software, you agree to be bound by the terms of this Agreement. If you do not agree to the terms of this Agreement, you may not install or use the Software. + +LICENSE GRANT + +Excelsior hereby grants to you a non-exclusive, transferable limited license to use the accompanying Software on the following terms: + +You may: a. install and use the Software on any computer in your possession or under your control; and b. copy and redistribute the Software provided it is not modified in any way and you do not charge for its distribution without explicit prior written permission. + +You may not: a. modify, translate, reverse engineer, decompile, disassemble (except to the extent applicable laws specifically prohibit such restriction), or create derivative works based on the Software; b. sell, rent, lease, or charge for access to the Software; c. remove any proprietary notices or labels on the Software. or d. distribute the Software for a fee, whether as a stand-alone product, or as part of a compilation or anthology, without Excelsior's prior written consent; + +TITLE + +Title, ownership rights, and intellectual property rights in and to the Software, and any copies of the Software shall at all times remain with Excelsior and/or its suppliers. The Software is protected by the copyright laws of the Russian Federation and international copyright treaties. + +TECHNICAL SUPPORT AND UPDATES + +This Agreement does not entitle you to receive from Excelsior printed manuals, technical support, phone support, updates, or enhancements to the Software. Excelsior may at its own discretion offer fee-based support, consulting and custom engineering services for the Software. + +NO FAIL-SAFE USES + +The Software has been created using technologies that are not fault tolerant and thus the Software is not designed, manufactured, or intended for use or resale as on-line control equipment in hazardous environments requiring fail-safe performance, including, but without limitation, in the operation of nuclear facilities, aircraft navigation or communication systems, air traffic control, direct life support machines, or weapons systems, in which the failure of the technologies employed in the Software could lead directly to death, personal injury, or severe physical or environmental damage. + +DISCLAIMER OF WARRANTY + +THE SOFTWARE IS PROVIDED TO YOU "AS IS". TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EXCELSIOR AND ITS SUPPLIERS DISCLAIM ALL WARRANTIES OF ANY NATURE WHATSOEVER, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY AND OF FITNESS FOR A PARTICULAR PURPOSE. EXCELSIOR DOES NOT WARRANT THAT ANY OR ALL FAILURES OR ERRORS IN THE SOFTWARE WILL BE CORRECTED OR WARRANT THAT THE SOFTWARE'S FUNCTIONALITY WILL MEET YOUR REQUIREMENTS OR THAT THE SOFTWARE WILL OPERATE IN COMBINATIONS YOU SELECT. NO EXCELSIOR DEALER, AGENT, OR EMPLOYEE IS AUTHORIZED TO MAKE ANY MODIFICATIONS, EXTENSIONS, OR ADDITIONS TO THIS DISCLAIMER. + +LIMITATION OF LIABILITY + +TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, TORT, CONTRACT, OR OTHERWISE, SHALL EXCELSIOR OR ITS SUPPLIERS OR RESELLERS BE LIABLE TO YOU OR TO ANY THIRD PARTY FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES ARISING OUT OF THE USE OF OR INABILITY TO USE THE SOFTWARE, EVEN IF EXCELSIOR SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. + +TERMINATION + +You may terminate this license at any time by destroying all copies of the Software you received or made under this Agreement. This Agreement shall terminate automatically if you fail to comply with any of its terms and conditions. On such termination, you must destroy all copies of the Software you received or made under this Agreement. The Disclaimer of Warranty and Limitation of Liability sections above shall survive termination of this Agreement. + +This Agreement is the entire Agreement between us and supersedes any other communications, advertisements, or understandings with respect to the Software. + + + + + diff --git a/product/com.excelsior.xds.resources.feature/feature_ru.properties b/product/com.excelsior.xds.resources.feature/feature_ru.properties new file mode 100644 index 0000000..4d6a9e6 --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/feature_ru.properties @@ -0,0 +1,3 @@ +#featureLabel=\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c + +featureDesription=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043d\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0448\u0430\u0431\u043b\u043e\u043d\u044b \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources.feature/feature_ru_1251.properties b/product/com.excelsior.xds.resources.feature/feature_ru_1251.properties new file mode 100644 index 0000000..20b28ea --- /dev/null +++ b/product/com.excelsior.xds.resources.feature/feature_ru_1251.properties @@ -0,0 +1,3 @@ +#featureLabel=Ðåñóðñû ñðåäû ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì + +featureDesription=Èñïîëüçóåìûå ïî óìîë÷àíèþ øàáëîíû íîâûõ ôàéëîâ è øàáëîíû êîäà äëÿ ñðåäû ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources.nl_ru/.project b/product/com.excelsior.xds.resources.nl_ru/.project new file mode 100644 index 0000000..77fdd6e --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/.project @@ -0,0 +1,22 @@ + + + com.excelsior.xds.resources.nl_ru + + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + + diff --git a/product/com.excelsior.xds.resources.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.resources.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..dbfb8a8 --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/fragment_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.resources.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.resources.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..37c8041 --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.resources.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.resources;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.resources.nl_ru/build.properties b/product/com.excelsior.xds.resources.nl_ru/build.properties new file mode 100644 index 0000000..adfae41 --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/build.properties @@ -0,0 +1,5 @@ +bin.includes = META-INF/,\ + nl/,\ + fragment.properties,\ + fragment_ru.properties,\ + plugin_ru.properties diff --git a/product/com.excelsior.xds.resources.nl_ru/fragment.properties b/product/com.excelsior.xds.resources.nl_ru/fragment.properties new file mode 100644 index 0000000..97ccbdf --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.resources Russian NLS Support diff --git a/product/com.excelsior.xds.resources.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.resources.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..c02cc5a --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.resources diff --git a/product/com.excelsior.xds.resources.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.resources.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..c129839 --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.resources diff --git a/product/com.excelsior.xds.resources.nl_ru/nl/ru/resources/templates/dbgscript_ru.xml b/product/com.excelsior.xds.resources.nl_ru/nl/ru/resources/templates/dbgscript_ru.xml new file mode 100644 index 0000000..88f756a --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/nl/ru/resources/templates/dbgscript_ru.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.resources.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.resources.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..1c3d8ea --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u0420\u0435\u0441\u0443\u0440\u0441\u044b \u0434\u043b\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c diff --git a/product/com.excelsior.xds.resources.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.resources.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..e1b6d79 --- /dev/null +++ b/product/com.excelsior.xds.resources.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ðåñóðñû äëÿ ðàçðàáîòêè XDS Ìîäóëà-2 ïðîãðàìì diff --git a/product/com.excelsior.xds.resources/.classpath b/product/com.excelsior.xds.resources/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.resources/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.resources/.project b/product/com.excelsior.xds.resources/.project new file mode 100644 index 0000000..385435c --- /dev/null +++ b/product/com.excelsior.xds.resources/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.resources + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.resources/META-INF/MANIFEST.MF b/product/com.excelsior.xds.resources/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7f3532e --- /dev/null +++ b/product/com.excelsior.xds.resources/META-INF/MANIFEST.MF @@ -0,0 +1,17 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.resources;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.resources.XdsResourcesPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.core.runtime, + org.eclipse.ui.editors, + org.apache.commons.io, + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.ui, + org.eclipse.ui.ide +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.resources diff --git a/product/com.excelsior.xds.resources/build.properties b/product/com.excelsior.xds.resources/build.properties new file mode 100644 index 0000000..ec8b0f6 --- /dev/null +++ b/product/com.excelsior.xds.resources/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + resources/,\ + plugin.properties diff --git a/product/com.excelsior.xds.resources/plugin.properties b/product/com.excelsior.xds.resources/plugin.properties new file mode 100644 index 0000000..ad436bf --- /dev/null +++ b/product/com.excelsior.xds.resources/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Framework Resources diff --git a/product/com.excelsior.xds.resources/plugin.xml b/product/com.excelsior.xds.resources/plugin.xml new file mode 100644 index 0000000..4e21e3a --- /dev/null +++ b/product/com.excelsior.xds.resources/plugin.xml @@ -0,0 +1,9 @@ + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/comp_null/xn.cfg b/product/com.excelsior.xds.resources/resources/comp_null/xn.cfg new file mode 100644 index 0000000..c8826a0 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/comp_null/xn.cfg @@ -0,0 +1,94 @@ +%========================================================================== +% Native XDS for MIPS configuration file +% Copyright (c) 2004 Excelsior LLC., Novosibirsk, Russia +%========================================================================== + +%-------------------------------------------------------------------------- +% Target program RunTime checks setup +%-------------------------------------------------------------------------- +-checkindex- +-checknil- +-checkdindex- +-checktype- +-checkrange- +-checkset- +-checkdiv- +-checkproc- +-assert- +-ioverflow- +-coverflow- +-foverflow- + +%-------------------------------------------------------------------------- +% Language extensions +%-------------------------------------------------------------------------- +-m2extensions+ +-m2addtypes- +-o2extensions- +-o2isopragma+ +-o2numext- + +%-------------------------------------------------------------------------- +% Memory usage setup +%-------------------------------------------------------------------------- + +% -- Target program memory usage setup +-heaplimit = 4000000 +-gcthreshold = 2000000 +-stacklimit = 100000 + +% -- Compiler memory usage setup +-compilerheap = 120000000 +-compilerthres = 40000000 + + +%-------------------------------------------------------------------------- +% Various filename extensions setup +%-------------------------------------------------------------------------- + +% -- Source files extensions +-code = c +-header = h +-sym = sym +-oberon = ob2 +-mod = mod +-def = def + +% -- Output files extensions +-asmext = s +-objext = o +-libext := a +-exeext := abs + +-genlib:- +-libname := default + +%-------------------------------------------------------------------------- +% Target program generation setup options +%-------------------------------------------------------------------------- +-alignment = 8 + +-longname+ +-gcauto+ + +-IEEE754_FULL:- + +%-------------------------------------------------------------------------- +% Errors limit and appearance setup +%-------------------------------------------------------------------------- +-decor = rht +-errlim = 16 + + +-werr2001 % with K26+ equation VERSION must be defined at a module ++woff2001 ++woff2003 % CRCVERSION and K26 options are independent from each other + + +-errfmt = \ +"\n* [%s",file;\ +" %d",line;\ +".%02d",column;\ +" %.1s",mode;\ +"%03d]\n",errno;\ +"* %s\n",errmsg diff --git a/product/com.excelsior.xds.resources/resources/comp_null/xn.exe b/product/com.excelsior.xds.resources/resources/comp_null/xn.exe new file mode 100644 index 0000000..2165fba Binary files /dev/null and b/product/com.excelsior.xds.resources/resources/comp_null/xn.exe differ diff --git a/product/com.excelsior.xds.resources/resources/comp_null/xn.msg b/product/com.excelsior.xds.resources/resources/comp_null/xn.msg new file mode 100644 index 0000000..7b7e706 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/comp_null/xn.msg @@ -0,0 +1,480 @@ +0000 +0001 illegal character +0002 comment not closed; started at line %d +0003 illegal number +0004 string literal not closed or too long +0005 unexpected end of file +0006 identifier too long +0007 identifier expected +0008 expected symbol %s +0009 illegal keyword usage +0010 source text read error +0011 can not determine source text language +0012 character constant too large (377C or 0FFX is maximum) + +0020 undeclared identifier "%s" +0021 type identifier "%s" shall not be used in declaring itself +0022 identifier "%s" was already defined at %s[%d.%d] +0023 procedure with forward declaration cannot be a code procedure +0024 recursive import not allowed +0025 unsatisfied exported object "%s" +0026 identifier "%s" is used in its own declaration, see %s[%d.%d] +0027 illegal usage of module identifier "%s" +0028 identifier "%s" was already defined in other module +0029 incompatible types:\n "%s"\n "%s" +0030 incompatible types +0031 identifier does not denote a type +0032 scalar type expected +0033 ordinal type expected +0034 illegal type conversion +0035 NEW: "%s" not known in this scope +0036 DISPOSE: "%s" not known in this scope +0037 procedure "%s" should be a proper procedure +0038 illegal number of parameters "%s" +0039 procedure "%s": %s parameter expected for "%s" +0040 procedure "%s": type of parameter "%s" mismatch +0041 guard or test type is not an extension of variable type + +0043 illegal result type of procedure +0044 incompatible result types + +0046 illegal usage of open array type +0047 fewer actual than formal parameters +0048 more actual than formal parameters +0049 sequence parameter should be of SYSTEM.BYTE or SYSTEM.LOC type +0050 object is not array +0051 object is not record +0052 object is not pointer +0053 object is not set +0054 object is not variable +0055 object is not procedure: %s +0056 the value of constant in sequence parameter out of bounds + +0057 a call of super method is valid in method redefinition only +0058 type-bound procedure is not defined for the base type +0059 object is neither a pointer nor a VAR-parameter record +0060 pointer not bound to record or array type +0061 dimension too large or negative +0062 pointer not bound to record + +0064 base type of open array aggregate should be a simple type +0065 the record type is from another module + +0067 receiver type should be exported %s +0068 this type-bound procedure cannot be called from a record +0069 wrong mode of receiver type + +0071 non-Oberon type cannot be used in specific Oberon-2 construct +0072 illegal order of redefinition of type-bound procedures + +0074 redefined type-bound procedure should be exported +0075 function procedure without RETURN statement +0076 value is required + +0078 SIZE (TSIZE) cannot be applied to an open array +0079 HIGH or LEN cannot be applied to a foreign open array + +0081 expected start of factor +0082 expected start of declaration +0083 expected start of type +0085 expected expression +0086 expected start of statement +0087 expression should be constant +0088 identifier does not match block name +0089 procedure not implemented "%s" +0090 proper procedure is expected +0091 call of proper procedure in expression +0092 code procedure is not allowed in definition module +0093 not allowed in definition module +0094 allowed only in definition module +0095 allowed only in global scope +0096 unsatisfied opaque type "%s" +0097 unsatisfied forward type "%s" +0098 allowed only for value parameter +0099 RETURN allowed only in procedure body +0100 illegal order of declarations + +0102 language extension is not allowed %s +0103 INTERNAL ERROR(ME): value expected +0104 INTERNAL ERROR(ME): designator expected +0105 INTERNAL ERROR(ME): statement expected +0106 INTERNAL ERROR(ME): node type = NIL +0107 shall not be less than 0 +0108 CASE in record constructor is not allowed + +0109 forward type cannot be opaque +0110 illegal length, %d was expected +0111 repetition counter must be an expression of a whole number type +0112 expression for field "%s" was expected +0113 no variant is associated with the value of the expression +0114 object "%s" is a field + +0116 field "%s" is not exported +0117 type of "%s" is not defined yet +0118 base type is allowed only for Oberon record +0119 variant fields are not allowed in Oberon record +0120 field of Oberon type is not allowed in non-Oberon record +0121 illegal use of type designator "%s" +0122 expression out of bounds +0123 designator is read-only +0124 low bound greater than high bound +0125 EXIT not within LOOP statement +0126 case label defined more than once + +0128 FOR-loop control variable must be declared in the local scope +0129 more expressions than fields in a record type + +0131 zero step in FOR statement +0132 shall be an open array designator +0133 implementation limit exceeded for set base type (length > %d) +0134 must be value of unsigned type +0135 must be value of pointer type +0136 must be type designator +0137 numeric constant does not have a defined storage size +0138 string literals are not allowed here + +0139 must be (qualified) identifier that denotes variable +0140 interrupt procedures are not implemented yet +0141 opaque type can not be defined as Oberon pointer +0142 INTERNAL ERROR(ME): can not generate code +0143 not allowed in Oberon +0144 pointer and record types are mixed in type test +0145 control variable must not be a formal parameter +0146 control variable cannot be exported +0147 threatened variable is not allowed here +0148 finalization is allowed only in module block +0149 RETRY is allowed only in exceptional part of block +0150 invalid system flag value +0151 must be of integer type +0152 incompatible calling conventions:\n "%s"\n "%s" +0153 incompatible calling conventions +0154 procedure "%s" does not match previous definition:\n was: %s\n now: %s +0155 procedure "%s" does not match previous definition +0156 procedure designator is expected +0157 object must be exported +0158 control variable "%s" is threatened here +0159 type of aggregate is not set or array or record +0160 invalid parameter specification: expected NIL +0161 VAR [NIL] parameter expected +0162 %s value should be in %{} (not "%s") +0163 control variable can not be volatile +0164 Language is not valid for external procedure + +0171 illegal structure of conditional compilation options +0172 conditional compilation option starts with incorrect symbol +0173 pragma not closed; started at line %d +0174 unexpected end of file while skipping; see at %d +0175 invalid pragma syntax +0176 "%s" illegal value for equation %s + +0190 incorrect header in symbol file "%s" +0191 incorrect version of symbol file "%s" (%d instead of %d) +0192 key inconsistency of imported module "%s" +0193 generation of new symbol file not allowed +0194 module name does not match symbol file name "%s" +0195 cannot read symbol file "%s" generated by %s +0196 INTERNAL ERROR: incorrect sym ident %d while reading symbol file "%s" +0197 INTERNAL ASSERT(%d) while reading symbol file "%s" +0198 unknown version of symbol file "%s" (%d), crash is possible + +0200 not yet implemented +0201 real overflow or underflow in constant expression +0202 integer overflow in constant expression +0203 division by zero + +0206 array length is too large or less than zero + +0208 CASE statement always fails +0209 implicit usage of SYSTEM.CAST +0210 there are no assignments to VAR-parameter "%s" +0211 variable "%s" optimized away + +0219 too many dimensions (implementation limit %d) +0220 heirarchy of record extensions too high (implementation limit %d) +0221 procedure declaration nesting limit (%d) has been exceeded + +0281 type-bound procedure is not valid as procedure value +0282 local procedure is not valid as procedure value "%s" +0283 code (or external) procedure is not valid as procedure value + +0285 label declared but not used +0286 object is not a label +0287 label is not declared in the current scope +0288 label expected +0289 label already defined + +0290 Foreign module may not have a body +0291 Address of this expression cannot be used as constant in this compiler version + +% ------- WARNINGS + +0300 variable "%s" declared but never used +0301 parameter "%s" is never used +0302 value was assigned but never used +0303 procedure "%s" declared but never used +0304 possibly used before definition "%s" +0305 constant declared but never used +0306 import of "%s" is never used + +0310 infinite loop +0311 unreachable code +0312 loop is executed exactly once + +0314 variable "%s" has compile time defined value here +0315 NIL dereference +0316 this SYSTEM procedure is not described in Modula-2 ISO standard +0317 VAR parameter is used here, check that it is not threatened inside WITH +0318 redundant FOR statement +0319 CASE statement without ELSE +0320 undeclared option "%s" +0321 option "%s" is already defined +0322 undeclared equation "%s" +0323 equation "%s" is already defined +0324 field %s alignment (%d) is greater than record alignment (%d) +0325 object %s alignment (%d) is greater then global alignment (%d) +0326 possible side effect in removed ASSERT argument + +0330 function %s inlined +0331 external function %s inlined + +0333 Mixed integer and cardinal computations + +0341 Import of module with body to module without body +0342 Unsupported MSC function "%s" + +0350 non portable type cast: size is undefined + +% ------- C backend warnings +0351 option NOHEADER is allowed only in C-modules +0352 option NOCODE is allowed only in C-modules +0353 dependence cycle in C code +0354 incorrect usage of C keyword "%s" +0355 local VOLATILE variable declared: possible de-optimization + +0390 obsolete pragma setting + +% ------- make errors + +0400 #definition or Oberon module is not found for module "%s" +0401 #implementation is not found for module "%s" +0402 #compile "%s" ("%s" not found) +0403 #compile "%s" ("%s" was modified after "%s") +0404 #compile "%s" ("%s" was modified) +0405 #compile "%s" (was modified after "%s") +0406 #undefined file extension "%s" +0407 #module not found "%s" +0408 #file "%s": definition module expected +0409 #file "%s": main module expected +0410 #file "%s": Oberon module expected +0411 #file "%s": implementation or main module expected +0412 #file "%s": module name "%s" expected, got "%s" +0413 #no modules in the project +0414 #file "%s" (line %d): %s +0415 #unknown operation mode "%s" +0416 #inconsistent set of operation modes +0417 #file "%s": module name "%s" expected (import from "%s") +0418 string expected +0419 unknown extension "%s" +0420 unknown template argument "%s" +0421 only one level of "{}" brackets is allowed +0422 inconsistent set of module kind +0423 #more than one source file for module:\n %s\n %s +0424 file creating error: %s +0425 file opening error: %s +0426 #unexpected module kind: "%s" +0427 #file "%s": error in module header or import section +0428 syntax error +0429 line too long +0430 #invalid argument (%s): %s +0431 #ERRFMT equation: wrong syntax (position %d) +0432 file closing error: %s +0433 #error in template file "%s", line %d.%d: %s +0434 #wrong value of equation "%s": "%s" is used +0435 #project is up to date +0436 #dependence cycle in import (See "%s", "%s") +0437 #too many errors +0438 is allowed only inside "{}" brackets +0439 external command fault %d:\n%s +0440 #error in template string, line %d.%d: %s\n%s +0441 #file "%s" (line %d.%02d): %s +0442 incompatible types +0443 undeclared identifier +0444 #file "%s": implementation module expected +0445 #file "%s": read error +0446 "end" missed +0447 could not execute external command:\n%s +0448 file writing error: %s +0449 object file limit (length > %d) is exceeded for name\n "%s" + +0450 compilation aborted: %s +0451 Invalid TESTCOVERAGEMASK '%s' +0452 Test Coverage System does not support multithreading + +0499 module has not neither code or date sections +0500 can not output debug info +0501 can not output object file + +0502 Compiling "%s"\n +0503 New "%s" is generated using template "%s"\n +0504 no errors +0505 errors %2d +0506 , no warnings +0507 , warnings %2d +0508 , lines %4d, time %2d.%02d +0509 , new symfile +0510 , (new def) +0513 WARNING +0514 ERROR +0515 FAULT +0520 %s\nConfiguration file is not opened: %s\n +0523 compilation aborted: %s +0524 files: %d errors: %d(%d) lines %d time: %d:%02d speed %d l/m\n +0525 \n***************************** Done *****************************\n +0526 XDEBUG option is ON ! +0527 Cannot select back-end %s +0528 Generate makefile for project "%s"\n +0529 Linking... +0530 Checking dependencies +0531 Make project "%s"\n +0532 Browser, "%s"\n +0533 Lookup, "%s"\n + +0544 There are no back-ends in compiler configuration.\n +0545 There are no front-ends in compiler configuration.\n + +% ------ MODULE xmISOFM items. +0600 wrong name format +0601 wrong flags +0602 too many open +0603 out of channels +0604 wrong permissions +0605 no room on device +0606 no such file +0607 file exists +0608 wrong file type +0609 no text operations +0610 no raw operations +0611 no mixed operations +0612 already opened +0613 other problem (no memory) +0614 unknown result + +0620 Invalid ALIGNMENT value specified +0621 ident or string +0622 ident + +% ------ 102 extensions +0701 (extended compatibility with byte) +0702 (string concatenation) +0703 (procedure comparison with NIL) +0704 (string comparison) +0705 (DISPOSE function) +0706 (array or record or simple aggregate) +0707 (obsolete type cast) +0708 (not implemented yet) +0709 (TopSpeed structured values - use curly braces instead of parentheses) +0710 (direct language specification) +0711 (read-only tag) +0712 (special kinds of parameters) +0713 (read-only parameters) +0714 (parameter value by default) +0715 (function result is array or record) +0716 (SEQ parameter) +0717 (ARRAY OF type) +0718 (renaming in import) +0719 (exponentiation operator) +0720 (ISO pragma syntax) +0721 , use CPPCOMMENTS option +0722 , use // instead of -- +0723 , use /* instead of *) + +0800 Configuration:\n +0801 Front end: %s\n +0802 Back end: %s\n +0803 Test coverage system: %s RTS v%d\n +0804 Data coverage system: %s RTS v%d\n + +0820 \nUsage:\n Make project:\n +0821 Make project database:\n +0822 Check dependencies and recompile:\n +0823 Extract definition from symbol file:\n +0824 Generate make file:\n +0825 Compile:\n +0826 \nOptional operation modes:\n +0827 =all Recompile all modules\n +0828 =batch Prepare batch file\n +0829 =equations Show equations\n +0830 =options Show options\n +0831 =help Print this text\n +0832 Lookup module (with or without extension):\n + +% ------- compiler warnings +0900 redundant code eliminated +0901 redundant code not eliminated - can raise exception +0902 constant condition eliminated +0903 function result is not used +0904 inctruction 'movf' for probably undefined values of variable(s):\n %s + +0910 realValueException will be raised here +0911 wholeValueException will be raised here +0912 wholeDivException will be raised here +0913 indexException will be raised here +0914 rangeException will be raised here +0915 invalidLocation exception will be raised here +0916 realDivException will be raised here +0917 functionException (function without RETURN statement) will be raised here + +% ------- x86 compiler errors +0920 INTERNAL ERROR: cardinal overflow +0921 invalid code procedure +0922 code procedures not supported + +% ------- x86 compiler fatal errors +0950 out of memory +0951 too complex expression +0952 that type conversion is not implemented + +0960 INTERNAL ERROR: invalid constant value +0961 INTERNAL ERROR: invalid type mode (%d) +0962 INTERNAL ERROR: invalid object mode (%d) + +% ------- C backend errors +1000 can not gen. overlapped field, GENCPP is OFF +1001 parameter "%s" is not declared +1002 can not generate recursive type definition +1003 external names conflict:\n "%s.%s" and "%s.%s" +1004 external name "%s.%s" conflicts with standard name (xm.kwd) +1005 unimplemented system procedure +1006 undefined array length for dimension %d +1007 undefined array size for dimension %d +1008 can not generate expression +1009 can not generate l-value type cast +1010 can not generate type conversion +1011 can not generate aggregate +1012 can not generate statement +1013 cannot generate constant aggregate of this type +1014 size of %s exceeds the limit +1015 too many parameters (implementation limit) +1016 can not generate type designator +1017 can not generate type declaration +1018 can not generate recursive type declaration +1019 can not generate object declaration +1020 object %s will be initialized at run-time +1021 module has a body while option NOMODULEINIT enabled +1022 NOMODULEINIT option is allowed only within definition module +1023 cannot generate initial value for %s +1024 cannot get alien module object address +1025 undifined equation %s +1026 procedure "%s" contains assemler code and will be ignoreg by Test Coverage System + +2000 usage of %s keyword is disabled by K26 option + +% ---- warning 2001 is used for implementation module only +2001 VERSION equation must be specified when K26 option is enabled + +2002 Equation MAINNAME ignored under GHS +2003 CRCVERSION option must be enabled when K26 option is enabled +2004 SOURCEID equation must be specified when K26 option is enabled + +% ---- warning 2005 is used for definition module only +2005 VERSION equation must be specified when K26 option is enabled diff --git a/product/com.excelsior.xds.resources/resources/comp_null/xn.red b/product/com.excelsior.xds.resources/resources/comp_null/xn.red new file mode 100644 index 0000000..e8f3744 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/comp_null/xn.red @@ -0,0 +1,7 @@ +xn.msg = $! +xn.cfg = $! +*.sym = . +*.def = . +*.mod = . +*.ob2 = . +*.prj = . diff --git a/product/com.excelsior.xds.resources/resources/newfiles/main.tmd b/product/com.excelsior.xds.resources/resources/newfiles/main.tmd new file mode 100644 index 0000000..221941b --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/newfiles/main.tmd @@ -0,0 +1,4 @@ +MODULE ${eclipse.ide.modulename}; + +BEGIN +END ${eclipse.ide.modulename}. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/newfiles/new_def.tmd b/product/com.excelsior.xds.resources/resources/newfiles/new_def.tmd new file mode 100644 index 0000000..fe8629c --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/newfiles/new_def.tmd @@ -0,0 +1,3 @@ +DEFINITION MODULE ${eclipse.ide.modulename}; + +END ${eclipse.ide.modulename}. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/newfiles/new_mod.tmd b/product/com.excelsior.xds.resources/resources/newfiles/new_mod.tmd new file mode 100644 index 0000000..b68021d --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/newfiles/new_mod.tmd @@ -0,0 +1,4 @@ +IMPLEMENTATION MODULE ${eclipse.ide.modulename}; + +BEGIN +END ${eclipse.ide.modulename}. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/newfiles/new_ob2.tmd b/product/com.excelsior.xds.resources/resources/newfiles/new_ob2.tmd new file mode 100644 index 0000000..1d18464 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/newfiles/new_ob2.tmd @@ -0,0 +1,4 @@ +${eclipse.ide.oberonmainpragma}MODULE ${eclipse.ide.modulename}; + +BEGIN +END ${eclipse.ide.modulename}. \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/previews/formatter/indent_preview.mod b/product/com.excelsior.xds.resources/resources/previews/formatter/indent_preview.mod new file mode 100644 index 0000000..b690268 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/previews/formatter/indent_preview.mod @@ -0,0 +1,54 @@ +(* +* A sample source file for code formatter preview +*) + +MODULE Preview; + +TYPE TREC = RECORD + F1 : INTEGER; + CASE SEL: INTEGER OF + | 1 : + C1 : CHAR; + | 2 : + I1 : INTEGER; + END; + END; + +VAR a : TREC; + +MODULE LocalMod; + +PROCEDURE getPi() : REAL; +BEGIN + RETURN 3.141592653; +END getPi; + +BEGIN +END LocalMod; + +PROCEDURE Proc(); + +VAR x : CHAR; + + PROCEDURE Local(); + BEGIN + x := a.C1; + END Local; + +BEGIN + IF a.F1 = 1 THEN + CASE (a.SEL) OF + | 1 : + a.C1 := 'x'; + | 2 : + a.I1 := 3; + ELSE + a.F1 := 1; + END; + END; + Local(); +END Proc; + +BEGIN + Proc(); +END Preview. diff --git a/product/com.excelsior.xds.resources/resources/previews/formatter/newlines_preview.mod b/product/com.excelsior.xds.resources/resources/previews/formatter/newlines_preview.mod new file mode 100644 index 0000000..db96a7a --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/previews/formatter/newlines_preview.mod @@ -0,0 +1,28 @@ +(* +* A sample source file for code formatter preview +*) + +MODULE Preview; + +IMPORT Strings; IMPORT Handlers; FROM Handlers IMPORT ExitHandler; + +CONST PI = 3.14159265; CONST CC = 10; TYPE TREC = RECORD F1 : INTEGER; CASE SEL: INTEGER OF | 1 : + C1 : CHAR; + | 2 : + I1 : INTEGER; ELSE B : BOOLEAN; END; END; VAR a : TREC; + +MODULE LocalMod; EXPORT getPi; PROCEDURE getPi() : REAL; BEGIN RETURN PI; END getPi; BEGIN END LocalMod; + +PROCEDURE Proc(); CONST CC = 10; TYPE TT = CHAR; VAR x : TT; + + PROCEDURE Local(); + BEGIN + x := a.C1; + END Local; + +BEGIN IF a.F1 = 1 THEN a.C1 := 'z'; CASE a.SEL OF | 1 : + a.C1 := 'x'; | 2 : + a.I1 := 3; ELSE a.F1 := 1; + END; ELSF a.F1 = 2 THEN a.C1 := 'r'; ELSIF a.C1 := 'q'; END; + Local(); +END Proc; BEGIN Proc(); EXCEPT ExitHandler(false); FINALLY ExitHandler(true); END Preview. diff --git a/product/com.excelsior.xds.resources/resources/templates/modula2-base.xml b/product/com.excelsior.xds.resources/resources/templates/modula2-base.xml new file mode 100644 index 0000000..c29d9ff --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/templates/modula2-base.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.resources/resources/templates/modula2.xml b/product/com.excelsior.xds.resources/resources/templates/modula2.xml new file mode 100644 index 0000000..f5e520a --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/templates/modula2.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.resources/resources/templates/templates.xsd b/product/com.excelsior.xds.resources/resources/templates/templates.xsd new file mode 100644 index 0000000..1e5f775 --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/templates/templates.xsd @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/update.xml b/product/com.excelsior.xds.resources/resources/update.xml new file mode 100644 index 0000000..415172d --- /dev/null +++ b/product/com.excelsior.xds.resources/resources/update.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.resources/resources/xdsEclipseHelper.exe b/product/com.excelsior.xds.resources/resources/xdsEclipseHelper.exe new file mode 100644 index 0000000..23963da Binary files /dev/null and b/product/com.excelsior.xds.resources/resources/xdsEclipseHelper.exe differ diff --git a/product/com.excelsior.xds.resources/src/com/excelsior/xds/resources/XdsResourcesPlugin.java b/product/com.excelsior.xds.resources/src/com/excelsior/xds/resources/XdsResourcesPlugin.java new file mode 100644 index 0000000..d0239cb --- /dev/null +++ b/product/com.excelsior.xds.resources/src/com/excelsior/xds/resources/XdsResourcesPlugin.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.resources; + +import org.eclipse.core.runtime.Plugin; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleActivator; +import org.osgi.framework.BundleContext; + +public class XdsResourcesPlugin extends AbstractUIPlugin implements + BundleActivator { + private static BundleContext context; + private static Plugin plugin; + + static BundleContext getContext() { + return context; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext + * ) + */ + public void start(BundleContext bundleContext) throws Exception { + super.start(bundleContext); + XdsResourcesPlugin.context = bundleContext; + plugin = this; + } + + /* + * (non-Javadoc) + * + * @see + * org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext bundleContext) throws Exception { + super.stop(bundleContext); + XdsResourcesPlugin.context = null; + } + + public static Plugin getDefault() { + return XdsResourcesPlugin.plugin; + } +} diff --git a/product/com.excelsior.xds.test/src/com/excelsior/xds/test/core/utils/ResourceUtilsTest.java b/product/com.excelsior.xds.test/src/com/excelsior/xds/test/core/utils/ResourceUtilsTest.java new file mode 100644 index 0000000..3f57a8d --- /dev/null +++ b/product/com.excelsior.xds.test/src/com/excelsior/xds/test/core/utils/ResourceUtilsTest.java @@ -0,0 +1,16 @@ +package com.excelsior.xds.test.core.utils; + +import org.junit.Assert; +import org.junit.Test; + +import com.excelsior.xds.core.resource.ResourceUtils; + +public class ResourceUtilsTest { + @Test + public void test() { + Assert.assertEquals("com.excelsior.xds.core\\src", ResourceUtils.getRelativePath("c:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product", "c:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product\\com.excelsior.xds.core\\src").toString()); + Assert.assertEquals("..\\..\\com.excelsior.xds.help", ResourceUtils.getRelativePath("c:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product\\com.excelsior.xds.core\\src", "c:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product\\com.excelsior.xds.help").toString()); + + System.out.println(ResourceUtils.getRelativePath("d:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product\\com.excelsior.xds.core\\src", "c:\\Lapukhov\\MyProjects\\k26\\repo\\git\\K26-IDE\\product\\com.excelsior.xds.help")); + } +} diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/.classpath b/product/com.excelsior.xds.ui.commons.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/.project b/product/com.excelsior.xds.ui.commons.nl_ru/.project new file mode 100644 index 0000000..92e0ece --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.commons.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.commons.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..f86d5cb --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.ui.commons.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.ui.commons;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/build.properties b/product/com.excelsior.xds.ui.commons.nl_ru/build.properties new file mode 100644 index 0000000..80d1fc6 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment_ru.properties,\ + fragment.properties + diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/fragment.properties b/product/com.excelsior.xds.ui.commons.nl_ru/fragment.properties new file mode 100644 index 0000000..23878bd --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.commons Russian NLS Support diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..f690887 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.ui.commons diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..1602aa4 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.ui.commons diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..c97da62 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru.properties @@ -0,0 +1 @@ +pluginName=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043e\u0431\u0449\u0435\u0433\u043e \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..9cd5af6 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/plugin_ru_1251.properties @@ -0,0 +1 @@ +pluginName=Ïîëüçîâàòåëüñêèé èíòåðôåéñ îáùåãî íàçíà÷åíèÿ \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru.properties b/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru.properties new file mode 100644 index 0000000..c0ae4dd --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru.properties @@ -0,0 +1,16 @@ +LocationSelector_ChooseADir=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 +LocationSelector_ChooseLocationRelToWspace=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 +LocationSelector_DirNotFound=\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. +LocationSelector_DirSelection=\u0412\u044b\u0431\u043e\u0440 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +LocationSelector_ErrorOccured=\u041f\u0440\u043e\u0438\u0437\u043e\u0448\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 +LocationSelector_FileNotFound=\u0423\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d. +LocationSelector_FileSystem=\u0424\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430... +LocationSelector_Location=\u0420\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435 +LocationSelector_OpenDir=\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 +LocationSelector_OpenLocation=\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f +LocationSelector_SelectAFile=\u0412\u044b\u0431\u043e\u0440 \u0444\u0430\u0439\u043b\u0430 +LocationSelector_SelectedFile=\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0444\u0430\u0439\u043b +LocationSelector_SelectFile=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0430\u0439\u043b +LocationSelector_UseDefLocation=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e +LocationSelector_Variables=\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435... +LocationSelector_Workspace=\u0420\u0430\u0431\u043e\u0447\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c... diff --git a/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..c90c14b --- /dev/null +++ b/product/com.excelsior.xds.ui.commons.nl_ru/src/com/excelsior/xds/ui/commons/internal/nls/messages_ru_1251.properties @@ -0,0 +1,16 @@ +LocationSelector_ChooseADir=Âûáåðèòå êàòàëîã +LocationSelector_ChooseLocationRelToWspace=Âûáåðèòå ðàñïîëîæåíèå îòíîñèòåëüíî ðàáî÷åé îáëàñòè +LocationSelector_DirNotFound=Óêàçàííûé êàòàëîã íå íàéäåí. +LocationSelector_DirSelection=Âûáîð êàòàëîãà +LocationSelector_ErrorOccured=Ïðîèçîøëà îøèáêà +LocationSelector_FileNotFound=Óêàçàííûé ôàéë íå íàéäåí. +LocationSelector_FileSystem=Ôàéëîâàÿ ñèñòåìà... +LocationSelector_Location=Ðàñïîëîæåíèå +LocationSelector_OpenDir=Îòêðûòèå êàòàëîãà +LocationSelector_OpenLocation=Îòêðûòèå ðàñïîëîæåíèÿ +LocationSelector_SelectAFile=Âûáîð ôàéëà +LocationSelector_SelectedFile=Âûáðàííûé ôàéë +LocationSelector_SelectFile=Âûáåðèòå ôàéë +LocationSelector_UseDefLocation=Èñïîëüçîâàòü çíà÷åíèå ïî óìîë÷àíèþ +LocationSelector_Variables=Ïåðåìåííûå... +LocationSelector_Workspace=Ðàáî÷àÿ îáëàñòü... diff --git a/product/com.excelsior.xds.ui.commons/.classpath b/product/com.excelsior.xds.ui.commons/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.commons/.project b/product/com.excelsior.xds.ui.commons/.project new file mode 100644 index 0000000..9bbfb84 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.commons + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.commons/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.commons/META-INF/MANIFEST.MF new file mode 100644 index 0000000..7cc1c0a --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/META-INF/MANIFEST.MF @@ -0,0 +1,29 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.ui.commons +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ui.commons.UiCommonsPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.jface.text, + org.eclipse.core.resources, + org.eclipse.ui.editors, + org.eclipse.ui.forms, + org.eclipse.ui.ide, + com.excelsior.xds.core;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.ui.commons.controls, + com.excelsior.xds.ui.commons.perspectives, + com.excelsior.xds.ui.commons.swt.resources, + com.excelsior.xds.ui.commons.syntaxcolor, + com.excelsior.xds.ui.commons.utils +Import-Package: org.apache.commons.lang;version="2.4.0", + org.eclipse.core.filesystem, + org.eclipse.core.variables, + org.eclipse.debug.ui diff --git a/product/com.excelsior.xds.ui.commons/build.properties b/product/com.excelsior.xds.ui.commons/build.properties new file mode 100644 index 0000000..aa1a008 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/build.properties @@ -0,0 +1,5 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.properties diff --git a/product/com.excelsior.xds.ui.commons/plugin.properties b/product/com.excelsior.xds.ui.commons/plugin.properties new file mode 100644 index 0000000..17f58fb --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/plugin.properties @@ -0,0 +1 @@ +pluginName=XDS Modula-2 Commons UI diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/UiCommonsPlugin.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/UiCommonsPlugin.java new file mode 100644 index 0000000..b54de2f --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/UiCommonsPlugin.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.commons; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class UiCommonsPlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.ui.commons"; //$NON-NLS-1$ + + // The shared instance + private static UiCommonsPlugin plugin; + + /** + * The constructor + */ + public UiCommonsPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static UiCommonsPlugin getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/LocationSelector.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/LocationSelector.java new file mode 100644 index 0000000..baa4b08 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/LocationSelector.java @@ -0,0 +1,440 @@ +package com.excelsior.xds.ui.commons.controls; + +import java.awt.event.ActionListener; +import java.io.File; +import java.io.IOException; +import java.util.ArrayList; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.filesystem.URIUtil; +import org.eclipse.core.resources.IContainer; +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.IWorkspaceRoot; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; +import org.eclipse.core.runtime.Path; +import org.eclipse.core.variables.VariablesPlugin; +import org.eclipse.debug.ui.StringVariableSelectionDialog; +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.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.program.Program; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.DirectoryDialog; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.dialogs.ElementTreeSelectionDialog; +import org.eclipse.ui.model.WorkbenchContentProvider; +import org.eclipse.ui.model.WorkbenchLabelProvider; +import org.eclipse.ui.views.navigator.ResourceComparator; + +import com.excelsior.xds.core.variables.VariableUtils; +import com.excelsior.xds.ui.commons.internal.nls.Messages; +import com.excelsior.xds.ui.commons.utils.SWTFactory; + + +/* + * Usage: + * ls = new LocationSelector(); + * ls.createControl(composite, 3, "Location title"); + * ls.setLocations("c:\\temp", "", true); + * ... + * String loc = ls.getLocation(); + * + * (control prototype - org.eclipse.pde.internal.ui.launcher.BaseBlock) + */ + +public class LocationSelector { + + private Button cbUseDefLocation; + private Link link; + private Text text; + private Button btnBrowseWorkspace; + private Button btnBrowseSystem; + private Button btnBrowseVariables; + private boolean fileMode; + private String fileBrowsePath; + private String fileBrowseExtension; + private IProject browseProject; + + private String defLocation; + private String otherLocation; + private ActionListener actionListener; + private boolean hideDefLocation; + private boolean fakeDefLocation; // def. location is some string like "" + private String linkTxt; + private String linkTxtFake; + + private boolean isEnabled; + + public LocationSelector(boolean fileMode, boolean hideDefLocation) { + this.fileMode = fileMode; + this.hideDefLocation = hideDefLocation; + isEnabled = true; + } + + /** + * Should be used after createControl() + * + * @param defLocation - default location text + * @param otherLocation - other location (may be "") + * @param useDefLocation - initial checkbox state + */ + public void setLocations(String defLocation, String otherLocation, boolean useDefLocation) { + this.defLocation = defLocation; + this.otherLocation = otherLocation; + cbUseDefLocation.setSelection(useDefLocation && !hideDefLocation); + handleCbUseDefLocation(); + } + + /** + * Should be used after createControl() + * + * @param defLocation - default location text + */ + public void setDefLocation(String defLocation) { + this.defLocation = defLocation; + if (cbUseDefLocation.getSelection()) { + text.setText(defLocation); + } + reenableAll(); + } + + + /** + * Should be used after createControl() + * + * @param fake - true => def. location is some text like "" + */ + public void setDefLocationIsFake(boolean fake) { + fakeDefLocation = fake; + reenableAll(); + } + + + /** + * Path used for file browser when no path specified in the entry filed + */ + public void setFileBrowsePath(String fileBrowsePath) { + this.fileBrowsePath = fileBrowsePath; + } + + + /** + * ~=".exe" or null to don't filter files + */ + public void setFileBrowseExtension (String fileBrowseExtension) { + this.fileBrowseExtension = fileBrowseExtension; + } + + /** + * Used to start Workspace browse from this project. + * @param prj + */ + public void setBrowseProject(IProject fileBrowseProject) { + this.browseProject = fileBrowseProject; + + } + + + /** + * Should be used after createControl() and setLocations() + * + * @return location or null when default location is selected + */ + public String getLocation() { + return cbUseDefLocation.getSelection() ? null : getLocationTxt(); + } + + + /** + * Set action listener - it is called (with null event) on every changes in the control + * + * @param al + */ + public void setActionListener(ActionListener al) { + actionListener = al; + } + + /** + * @param en - enable state + */ + public void setEnabled(boolean en) { + isEnabled = en; + reenableAll(); + } + + + /** + * + * @param parent + * @param hspan (must be >= 2 when frameText == null) + * @param frameText (null to don't create frame) + */ + public void createControl(Composite parent, int hspan, String frameText) { + if (frameText != null) { + Group gr = SWTFactory.createGroup(parent, frameText, 2, hspan, GridData.FILL_HORIZONTAL); + parent = gr; + hspan = 2; + } + cbUseDefLocation = SWTFactory.createCheckbox(parent, Messages.LocationSelector_UseDefLocation, hspan); + cbUseDefLocation.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + handleCbUseDefLocation(); + } + }); + if (hideDefLocation) { + cbUseDefLocation.setVisible(false); + GridData gd = (GridData)cbUseDefLocation.getLayoutData(); + gd.exclude = true; + cbUseDefLocation.setLayoutData(gd); + } + + link = new Link(parent, SWT.NONE); + String s = Messages.LocationSelector_Location+':'; + linkTxt = (hideDefLocation ? "" : " ") + "" + s + ""; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + linkTxtFake = (hideDefLocation ? "" : " ") + s; //$NON-NLS-1$ //$NON-NLS-2$ + link.setText(linkTxt); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + showPath(); + } + }); + + text = SWTFactory.createSingleText(parent, hspan-1); + text.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + textModified(); + } + }); + + //buttons + Composite buttonComp = SWTFactory.createComposite(parent, parent.getFont(), 3, hspan, GridData.HORIZONTAL_ALIGN_END); + GridLayout ld = (GridLayout)buttonComp.getLayout(); + ld.marginHeight = 1; + ld.marginWidth = 0; + btnBrowseWorkspace = SWTFactory.createPushButton(buttonComp, Messages.LocationSelector_Workspace, null); + btnBrowseWorkspace.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + browseWorkspace(); + } + }); + btnBrowseSystem = SWTFactory.createPushButton(buttonComp, Messages.LocationSelector_FileSystem, null); + btnBrowseSystem.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + browseFileSystem(); + } + }); + btnBrowseVariables = SWTFactory.createPushButton(buttonComp, Messages.LocationSelector_Variables, null); + btnBrowseVariables.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + browseVariables(); + } + }); + + } + + private String getLocationTxt() { + return text.getText().trim(); + } + + private void textModified() { + if (!cbUseDefLocation.getSelection()) { + otherLocation = text.getText(); + } + if (actionListener != null) { + actionListener.actionPerformed(null); + } + } + + private void handleCbUseDefLocation() { + boolean def = cbUseDefLocation.getSelection(); + text.setEditable(!def); + text.setText(def ? defLocation : otherLocation); + reenableAll(); + if (actionListener != null) { + actionListener.actionPerformed(null); + } + } + + private void reenableAll() { + boolean def = cbUseDefLocation.getSelection(); + cbUseDefLocation.setEnabled(isEnabled); + link.setEnabled(isEnabled); + text.setEnabled(isEnabled); + btnBrowseWorkspace.setEnabled(isEnabled && !def); + btnBrowseSystem.setEnabled(isEnabled && !def); + btnBrowseVariables.setEnabled(isEnabled && !def); + link.setText(fakeDefLocation && def ? linkTxtFake : linkTxt); + } + + /** + * Returns the selected workspace container,or null + */ + protected IContainer getContainer() { + String path = getLocationTxt(); + if (path.length() > 0) { + IResource res = null; + IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); + if (path.startsWith("${workspace_loc:")) { //$NON-NLS-1$ + try { + path = VariableUtils.performStringSubstitution(path, false); + IPath uriPath = new Path(path).makeAbsolute(); + IContainer[] containers = root.findContainersForLocationURI(URIUtil.toURI(uriPath)); + if (containers.length > 0) { + res = containers[0]; + } + } catch (CoreException e) { + } + } else { + res = root.findMember(path); + } + if (res instanceof IContainer) { + return (IContainer) res; + } + } + return (browseProject != null) ? browseProject : ResourcesPlugin.getWorkspace().getRoot(); + } + + private void browseWorkspace() { + if (fileMode) { + WorkbenchContentProvider wcp; + if (StringUtils.isBlank(fileBrowseExtension)) { + wcp = new WorkbenchContentProvider(); + } else { + wcp = new WorkbenchContentProvider() { + @ Override + public Object[] getChildren(Object element) { + Object[] arr = super.getChildren(element); + ArrayList al = new ArrayList(); + for (Object o : arr) { + if (o instanceof IFile) { + if (((IFile)o).getName().toLowerCase().endsWith(fileBrowseExtension.toLowerCase())) { + al.add(o); + } + } else { + al.add(o); + } + } + return al.toArray(); + } + }; + } + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(text.getShell(), new WorkbenchLabelProvider(), wcp); + dialog.setTitle(Messages.LocationSelector_SelectAFile); + dialog.setMessage(Messages.LocationSelector_ChooseLocationRelToWspace+':'); + if (browseProject != null) { + dialog.setInput(browseProject); + } else { + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + } + dialog.setComparator(new ResourceComparator(ResourceComparator.NAME)); + dialog.addFilter(new SpecialFoldersFilter(false)); + if (dialog.open() == IDialogConstants.OK_ID) { + IResource resource = (IResource) dialog.getFirstResult(); + if(resource != null) { + String arg = resource.getFullPath().toString(); + String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$ + text.setText(fileLoc); + } + } + } else { + ///////////////// + WorkbenchContentProvider wcp; + wcp = new WorkbenchContentProvider(); + ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(text.getShell(), new WorkbenchLabelProvider(), wcp); + dialog.setTitle(Messages.LocationSelector_SelectAFile); + dialog.setMessage(Messages.LocationSelector_ChooseLocationRelToWspace+':'); + if (browseProject != null) { + dialog.setInput(browseProject); + } else { + dialog.setInput(ResourcesPlugin.getWorkspace().getRoot()); + } + dialog.setComparator(new ResourceComparator(ResourceComparator.NAME)); + dialog.addFilter(new SpecialFoldersFilter(true)); + if (dialog.open() == Window.OK) { + Object o = dialog.getFirstResult(); + if (o instanceof IFolder) { + String arg = ((IFolder)o).getProjectRelativePath().makeRelative().toString(); + String fileLoc = VariablesPlugin.getDefault().getStringVariableManager().generateVariableExpression("workspace_loc", arg); //$NON-NLS-1$ + text.setText(fileLoc); + } + } + } + } + + private void browseFileSystem() { + String result = null; + if (fileMode) { + result = SWTFactory.browseFile(text.getShell(), false, + Messages.LocationSelector_SelectAFile, + new String[]{"*" + (fileBrowseExtension == null ? "" : fileBrowseExtension)}, //$NON-NLS-1$ //$NON-NLS-2$ + fileBrowsePath); + } else { + DirectoryDialog dialog = new DirectoryDialog(text.getShell()); + dialog.setFilterPath(getLocationTxt()); + dialog.setText(Messages.LocationSelector_DirSelection); + dialog.setMessage(Messages.LocationSelector_ChooseADir+':'); + result = dialog.open(); + } + if (result != null) + text.setText(result); + } + + private void browseVariables() { + StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(text.getShell()); + if (dialog.open() == Window.OK) + text.insert(dialog.getVariableExpression()); + } + + private void showPath() { + try{ + String path = VariableUtils.performStringSubstitution(getLocationTxt(), false); + File f = new File(path); + if (fileMode) { + if (f.isFile()) { + try { + ProcessBuilder builder = new ProcessBuilder(new String[] { + "explorer.exe", //$NON-NLS-1$ + "/select,\"" + f.getCanonicalPath() + "\""}); //$NON-NLS-1$ //$NON-NLS-2$ + builder.start(); + } catch (IOException exc) { + // Oops. can't show (or it is not windows?) + // Show in messagebox: + SWTFactory.ShowMessageBox(null, Messages.LocationSelector_SelectedFile, f.getCanonicalPath(), SWT.OK); + } + } else { + MessageDialog.openWarning(text.getShell(), Messages.LocationSelector_SelectFile, Messages.LocationSelector_FileNotFound); + } + } else { + if (f.isDirectory()) { + Program.launch(f.getCanonicalPath()); + } else { + MessageDialog.openWarning(text.getShell(), Messages.LocationSelector_OpenDir, Messages.LocationSelector_DirNotFound); + } + } + } catch (Exception ex) { + MessageDialog.openWarning(text.getShell(), Messages.LocationSelector_OpenLocation, Messages.LocationSelector_ErrorOccured + ": " + ex); //$NON-NLS-1$ + } + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/Separator.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/Separator.java new file mode 100644 index 0000000..76ad01e --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/Separator.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.ui.commons.controls; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; + +/** + * Dialog page separator. + */ +public class Separator { + + private Label fSeparator; + private int fStyle; + + public Separator() { + this(SWT.NONE); + } + + /** + * @param style of the separator. See Label for possible + * styles. + */ + public Separator(int style) { + fStyle= style; + } + + // ------- layout helpers + + /** + * Creates the separator and fills it in a MGridLayout. + * @param height The height of the separator + */ + public Control[] doFillIntoGrid(Composite parent, int nColumns, int height) { + Control separator= getSeparator(parent); + separator.setLayoutData(gridDataForSeperator(nColumns, height)); + + return new Control[] { separator }; + } + + public Control[] doFillIntoGrid(Composite parent, int nColumns) { + return doFillIntoGrid(parent, nColumns, 4); + } + + protected static GridData gridDataForSeperator(int span, int height) { + GridData gd= new GridData(); + gd.horizontalAlignment= GridData.FILL; + gd.verticalAlignment= GridData.BEGINNING; + gd.heightHint= height; + gd.horizontalSpan= span; + return gd; + } + + // ------- ui creation + + /** + * Creates or returns the created separator. + * @param parent The parent composite or null if the widget has + * already been created. + */ + public Control getSeparator(Composite parent) { + if (fSeparator == null) { + fSeparator= new Label(parent, fStyle); + } + return fSeparator; + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/SpecialFoldersFilter.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/SpecialFoldersFilter.java new file mode 100644 index 0000000..8bf795b --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/controls/SpecialFoldersFilter.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.ui.commons.controls; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IFolder; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.jface.viewers.ViewerFilter; + +public class SpecialFoldersFilter extends ViewerFilter { + boolean hideFiles; + + public SpecialFoldersFilter(boolean hideFiles) { + super(); + this.hideFiles = hideFiles; + } + + @Override + public boolean select(Viewer viewer, Object parentElement, Object element) { + if (element instanceof IFolder) { + if (((IFolder)element).getName().startsWith(".")) { //$NON-NLS-1$ + return false; // exclude ".externals", ".settings" and other special folders started with '.' + } + } else if (element instanceof IFile) { + if (hideFiles) { + return false; + } + } + return true; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/Messages.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/Messages.java new file mode 100644 index 0000000..51dc683 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/Messages.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.ui.commons.internal.nls; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.ui.commons.internal.nls.messages"; //$NON-NLS-1$ + + public static String LocationSelector_ChooseADir; + public static String LocationSelector_ChooseLocationRelToWspace; + public static String LocationSelector_DirNotFound; + public static String LocationSelector_DirSelection; + public static String LocationSelector_ErrorOccured; + public static String LocationSelector_FileNotFound; + public static String LocationSelector_FileSystem; + public static String LocationSelector_Location; + public static String LocationSelector_OpenDir; + public static String LocationSelector_OpenLocation; + public static String LocationSelector_SelectAFile; + public static String LocationSelector_SelectedFile; + public static String LocationSelector_SelectFile; + public static String LocationSelector_UseDefLocation; + public static String LocationSelector_Variables; + public static String LocationSelector_Workspace; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/messages.properties b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/messages.properties new file mode 100644 index 0000000..e79a014 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/internal/nls/messages.properties @@ -0,0 +1,16 @@ +LocationSelector_ChooseADir=Choose a directory +LocationSelector_ChooseLocationRelToWspace=Choose a location relative to the workspace +LocationSelector_DirNotFound=The specified directory could not be found. +LocationSelector_DirSelection=Directory Selection +LocationSelector_ErrorOccured=Error occurred +LocationSelector_FileNotFound=The specified file could not be found. +LocationSelector_FileSystem=File System... +LocationSelector_Location=Location +LocationSelector_OpenDir=Open directory +LocationSelector_OpenLocation=Open location +LocationSelector_SelectAFile=File Selection +LocationSelector_SelectedFile=Selected file +LocationSelector_SelectFile=Select file +LocationSelector_UseDefLocation=Use default location +LocationSelector_Variables=Variables... +LocationSelector_Workspace=Workspace... diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/perspectives/PerspectiveUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/perspectives/PerspectiveUtils.java new file mode 100644 index 0000000..e4e63b7 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/perspectives/PerspectiveUtils.java @@ -0,0 +1,44 @@ +package com.excelsior.xds.ui.commons.perspectives; + +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.WorkbenchException; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; + +public final class PerspectiveUtils { + public static void promptAndOpenPerspective(IWorkbench workbench, String perspectiveId, String title, String message) throws WorkbenchException { + IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow(); + + if (!perspectiveId.equals(activeWindow.getActivePage().getPerspective().getId())) { + if (MessageDialog.openConfirm(activeWindow.getShell(), title, message)) { + workbench.showPerspective(perspectiveId, activeWindow); + } + } + } + + public static void showPerspective(String perspectiveId){ + showPerspective(perspectiveId, WorkbenchUtils.getActiveWorkbenchWindow()); + } + + public static void showPerspective(String perspectiveId, IWorkbenchWindow window) { + Display.getDefault().asyncExec(() -> { + IWorkbench workbench = PlatformUI.getWorkbench(); + try { + workbench.showPerspective(perspectiveId, window); + } catch (WorkbenchException e) { + LogHelper.logError(e); + } + }); + } + + /** + * Static methods only + */ + private PerspectiveUtils(){ + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ColorRegistry.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ColorRegistry.java new file mode 100644 index 0000000..946dd42 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ColorRegistry.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.commons.swt.resources; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.widgets.Display; + +import com.excelsior.xds.core.utils.IDisposable; +import com.excelsior.xds.ui.commons.utils.UiUtils; + +/** + * Factory for the {@link Color}, create color by {@link RGB} (reusing existing color for such {@link RGB}). On disposal - dispose them at once. + * + * @author lsa80 + */ +public class ColorRegistry implements IDisposable{ + private final Map rgb2Color = new HashMap(); + private final boolean isUseCurrentDisplay; + + public ColorRegistry(boolean isUseCurrentDisplay) { + this.isUseCurrentDisplay = isUseCurrentDisplay; + } + + public ColorRegistry() { + this(true); + } + + public Color createColor(RGB rgb) { + if (rgb == null) { + return null; + } + Color color = rgb2Color.get(rgb); + if (color == null) { + color = new Color(isUseCurrentDisplay? Display.getCurrent() : Display.getDefault() , rgb); + rgb2Color.put(rgb, color); + } + return color; + } + + @Override + public void dispose() { + for (Map.Entry entry : rgb2Color.entrySet()) { + Color c = entry.getValue(); + UiUtils.dispose(c); + } + rgb2Color.clear(); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/FontRegistry.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/FontRegistry.java new file mode 100644 index 0000000..3ee60f3 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/FontRegistry.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.ui.commons.swt.resources; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; + +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.widgets.Display; + +import com.excelsior.xds.core.utils.IDisposable; +import com.excelsior.xds.ui.commons.utils.UiUtils; + +/** + * Factory for the {@link Font}, create color by {@link FontData} (reusing existing Font for such {@link FontData}). On disposal - dispose them at once. + * + * @author lsa80 + */ +public class FontRegistry implements IDisposable { + private final Map, Font> fontDatas2Font = new HashMap, Font>(); + private final boolean isUseCurrentDisplay; + + public FontRegistry(boolean isUseCurrentDisplay) { + this.isUseCurrentDisplay = isUseCurrentDisplay; + } + + public FontRegistry() { + this(true); + } + + public Font createFont(FontData[] fontDatas) { + List key = Arrays.asList(fontDatas); + Font font = fontDatas2Font.get(key); + if (font == null) { + font = new Font(isUseCurrentDisplay? Display.getCurrent() : Display.getDefault(), fontDatas); + fontDatas2Font.put(key, font); + } + return font; + } + + @Override + public void dispose() { + for (Entry, Font> entry : fontDatas2Font.entrySet()) { + Font f = entry.getValue(); + UiUtils.dispose(f); + } + fontDatas2Font.clear(); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceDisposer.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceDisposer.java new file mode 100644 index 0000000..1e4e282 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceDisposer.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.ui.commons.swt.resources; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Resource; + +import com.excelsior.xds.core.utils.IDisposable; +import com.excelsior.xds.ui.commons.utils.UiUtils; + +/** + * Manages a bunch of resources (i.e. {@link Color}, {@link Font} etc) and dispose them at once + * + * @author lsa80 + */ +public class ResourceDisposer implements IDisposable { + private boolean isDisposed; + private List resources = new ArrayList(); + + /** + * Registers resource for the future disposal + */ + public T register(T r) { + resources.add(r); + return r; + } + + @Override + public void dispose() { + if (!isDisposed) { + for (Resource r : resources) { + UiUtils.dispose(r); + } + isDisposed = true; + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceRegistry.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceRegistry.java new file mode 100644 index 0000000..c42ef87 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/swt/resources/ResourceRegistry.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.ui.commons.swt.resources; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.RGB; + +import com.excelsior.xds.core.utils.CompositedDisposable; +import com.excelsior.xds.core.utils.IDisposable; + +public class ResourceRegistry implements IDisposable{ + private final ColorRegistry colorRegistry; + private final FontRegistry fontRegistry; + private final CompositedDisposable compositedDisposable; + + public ResourceRegistry(boolean isUseCurrentDisplay) { + colorRegistry = new ColorRegistry(isUseCurrentDisplay); + fontRegistry = new FontRegistry(isUseCurrentDisplay); + compositedDisposable = new CompositedDisposable(colorRegistry, fontRegistry); + } + + public ResourceRegistry() { + this(true); + } + + public Color createColor(RGB rgb) { + return colorRegistry.createColor(rgb); + } + + public Font createFont(FontData[] fontDatas) { + return fontRegistry.createFont(fontDatas); + } + + @Override + public void dispose() { + compositedDisposable.dispose(); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/SpecialTokenDescriptors.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/SpecialTokenDescriptors.java new file mode 100644 index 0000000..302a145 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/SpecialTokenDescriptors.java @@ -0,0 +1,36 @@ +package com.excelsior.xds.ui.commons.syntaxcolor; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +/** + * static descriptors of the WHITESPACE and EOF tokens from class {@link Token} + * @author lsa80 + */ +public class SpecialTokenDescriptors { + public static final TokenDescriptor WHITESPACE = new TokenDescriptor(); + public static final TokenDescriptor EOF = new TokenDescriptor(); + + private static final Map specialsTokenDescs = new HashMap(); + + static + { + specialsTokenDescs.put(WHITESPACE, Token.WHITESPACE); + specialsTokenDescs.put(EOF, Token.EOF); + } + + public static boolean isEof(TokenDescriptor tokenDesc) { + return EOF == tokenDesc; + } + + static boolean isSpecial(TokenDescriptor tokenDesc) { + return specialsTokenDescs.containsKey(tokenDesc); + } + + static IToken createFrom(TokenDescriptor tokenDesc) { + return specialsTokenDescs.get(tokenDesc); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TextAttributeDescriptor.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TextAttributeDescriptor.java new file mode 100644 index 0000000..84686d8 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TextAttributeDescriptor.java @@ -0,0 +1,39 @@ +package com.excelsior.xds.ui.commons.syntaxcolor; + +import org.eclipse.swt.graphics.RGB; + +public class TextAttributeDescriptor { + private RGB foreground; + private RGB backrground; + private int style; + + public TextAttributeDescriptor(RGB foreground, RGB backrground, int style) { + this.foreground = foreground; + this.backrground = backrground; + this.style = style; + } + + public RGB getForeground() { + return foreground; + } + + public void setForeground(RGB foreground) { + this.foreground = foreground; + } + + public RGB getBackground() { + return backrground; + } + + public void setBackrground(RGB backrground) { + this.backrground = backrground; + } + + public int getStyle() { + return style; + } + + public void setStyle(int style) { + this.style = style; + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenDescriptor.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenDescriptor.java new file mode 100644 index 0000000..60fb772 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenDescriptor.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.ui.commons.syntaxcolor; + +import org.eclipse.swt.graphics.RGB; + +/** + * Token to hold TextAttribute as data. + */ +public class TokenDescriptor { + + protected final String name; + + private final RGB defaultRGB; + private final int defaultStyle; + + /** The default text attribute if non is returned as data by the current token */ + private final TextAttributeDescriptor defaultTextAttribute; + + private TextAttributeDescriptor textAttribute; + + /** + * Used for special tokens, note package private + */ + TokenDescriptor () { + this(null, null, 0); + } + + public TokenDescriptor (String name, RGB foregroundRgb, int style) { + defaultTextAttribute = new TextAttributeDescriptor(foregroundRgb, null, style); + + this.name = name; + defaultRGB = foregroundRgb; + defaultStyle = style; + } + + public String getName() { + return name; + } + + public RGB getDefaultRgb() { + return defaultRGB; + } + + public int getDefaultStyle() { + return defaultStyle; + } + + public void restoreDefaults() { + textAttribute = defaultTextAttribute; + } + + /** + * Returns a text attribute encoded in this token. If the token's + * data is not null and a text attribute it is assumed that + * it is the encoded text attribute. It returns the default text attribute + * if there is no encoded text attribute found. + * + * @return the token's text attribute + */ + public TextAttributeDescriptor getTextAttribute() { + if (textAttribute != null) { + return textAttribute; + } + return defaultTextAttribute; + } + + public void setTextAttribute(TextAttributeDescriptor textAttribute) { + this.textAttribute = textAttribute; + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenManager.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenManager.java new file mode 100644 index 0000000..0f956ef --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/syntaxcolor/TokenManager.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.ui.commons.syntaxcolor; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; +import org.eclipse.swt.graphics.Color; + +import com.excelsior.xds.ui.commons.swt.resources.ResourceRegistry; + +/** + * Creates {@link Token} from tokenDescriptor, and remembers all colors (see {@link Color}) that were + * created during this operation. + * + * Caches created tokens, holding Map. + * + * Please note that this class should be used from UI thread, because {@link of Display} + * + * @author lsa80 + */ +public class TokenManager extends ResourceRegistry{ + private Map tokenDescriptor2Token = new HashMap(); + + public IToken createFrom(TokenDescriptor tokenDescriptor) { + // if it is descriptor of the Token.WHITESPACE or Token.EOF return it immediately + if (SpecialTokenDescriptors.isSpecial(tokenDescriptor)) { + return SpecialTokenDescriptors.createFrom(tokenDescriptor); + } + + // try reuse existing token + Token token = tokenDescriptor2Token.get(tokenDescriptor); + if (token == null) { + TextAttributeDescriptor textAttrDesc = tokenDescriptor.getTextAttribute(); + Color backGroundColor = createColor(textAttrDesc.getBackground()); + Color foreGroundColor = createColor(textAttrDesc.getForeground()); + token = new Token(new TextAttribute(foreGroundColor, backGroundColor, textAttrDesc.getStyle())); + tokenDescriptor2Token.put(tokenDescriptor, token); + } + + return token; + } + + /** + * Clears token cache. All managed resources like colors and fonts will be disposed only when {@link #dispose()} method is called. + */ + public void clear(){ + tokenDescriptor2Token.clear(); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/DialogUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/DialogUtils.java new file mode 100644 index 0000000..8ea8bd5 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/DialogUtils.java @@ -0,0 +1,41 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.core.resources.IFolder; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.FilteredResourcesSelectionDialog; + +public abstract class DialogUtils { + public static IFolder chooseProjectFolder(Shell shell, IProject container) { + FilteredResourcesSelectionDialog dlg = new FilteredResourcesSelectionDialog(shell, false, container, IResource.FOLDER & (~IResource.HIDDEN)); + dlg.setInitialPattern("**"); //$NON-NLS-1$ + if (dlg.open() == FilteredResourcesSelectionDialog.OK ) { + return (IFolder)(dlg.getResult()[0]); + } + + return null; + } + + public static boolean openTwoChoiceDialog(Shell shell, String title, String message, String[] alternatives) { + MessageDialog dialog = new TwoChoiceDialog(shell, title, null, message, + MessageDialog.QUESTION, alternatives, 0); + return dialog.open() == 0; + } + + static class TwoChoiceDialog extends MessageDialog { + public TwoChoiceDialog(Shell parentShell, String dialogTitle, + Image dialogTitleImage, String dialogMessage, + int dialogImageType, String[] dialogButtonLabels, + int defaultIndex) { + super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, + dialogImageType, dialogButtonLabels, defaultIndex); + int style = SWT.NONE; + style &= SWT.SHEET; + setShellStyle(getShellStyle() | style); + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/HelpUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/HelpUtils.java new file mode 100644 index 0000000..dbb1a38 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/HelpUtils.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.PlatformUI; + +/** + * Common utilities that is used to access the workbench help system. + */ +public abstract class HelpUtils { + + /** + * Sets the given help context id on the given control. + * + * @param control the control on which to register the context id + * @param contextId the context id to use when F1 help is invoked + */ + public static void setHelp(Control control, String contextId) { + PlatformUI.getWorkbench().getHelpSystem().setHelp(control, contextId); + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/IconUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/IconUtils.java new file mode 100644 index 0000000..ab52345 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/IconUtils.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.PlatformObject; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.resource.LocalResourceManager; +import org.eclipse.jface.resource.ResourceManager; +import org.eclipse.swt.graphics.Image; +import org.eclipse.ui.model.IWorkbenchAdapter; + + +public class IconUtils { + + private static ResourceManager resourceManager; + + /** + * To use in LabelProvider.getImage() to get icon for resource. + */ + public static Image getImage(Object o) { + if (resourceManager == null) { + resourceManager = new LocalResourceManager(JFaceResources.getResources()); + } + + IWorkbenchAdapter adapter = (IWorkbenchAdapter)getAdapter(o, IWorkbenchAdapter.class); + if (adapter != null) { + ImageDescriptor descriptor = adapter.getImageDescriptor(o); + if (descriptor != null) { + //add any annotations to the image descriptor + return (Image) resourceManager.get(descriptor); + } + } + return null; + } + + private static Object getAdapter(Object sourceObject, Class adapterType) { + if (sourceObject == null) { + return null; + } + if (adapterType.isInstance(sourceObject)) { + return sourceObject; + } + + if (sourceObject instanceof IAdaptable) { + IAdaptable adaptable = (IAdaptable) sourceObject; + + Object result = adaptable.getAdapter(adapterType); + if (result != null) { + return result; + } + } + + if (!(sourceObject instanceof PlatformObject)) { + Object result = Platform.getAdapterManager().getAdapter(sourceObject, adapterType); + if (result != null) { + return result; + } + } + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SWTFactory.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SWTFactory.java new file mode 100644 index 0000000..1657b4c --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SWTFactory.java @@ -0,0 +1,496 @@ +package com.excelsior.xds.ui.commons.utils; + +import java.io.File; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.layout.PixelConverter; +import org.eclipse.jface.preference.ColorSelector; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.FontMetrics; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.DirectoryDialog; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Layout; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.List; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.MessageBox; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +import com.excelsior.xds.ui.commons.controls.Separator; + +/** + * Factory class to create some SWT resources. + */ +public class SWTFactory { + + private static String lastBrowsePath = "C:/"; //$NON-NLS-1$ + + + // Browse for directory starting at the default location, + // changes default location on Ok + public static String browseDirectory(Shell shell, String text, String message) { + return browseDirectory(shell, text, message, null); + } + + // Browse for directory starting near the given location (or default if it is null or can't be found) + // changes default location on Ok + public static String browseDirectory(Shell shell, String text, String message, String preferredPath) { + DirectoryDialog fd = new DirectoryDialog(shell); + fd.setText(text); + fd.setMessage(message); + fd.setFilterPath(mkPrefPath(preferredPath)); + String res = fd.open(); + if (res != null) + lastBrowsePath = res; + return res; // null => cancel + } + + + // Browse for file starting at the default location, + // changes default location on Ok + public static String browseFile(Shell shell, boolean browseForSave, String text, String[] filterExt) { + return browseFile(shell, browseForSave, text, filterExt, null); + } + + // Browse for file starting near the given location (or default if it is null or can't be found) + // changes default location on Ok + public static String browseFile(Shell shell, boolean browseForSave, String text, String[] filterExt, String preferredPath) { + FileDialog fd = new FileDialog(shell, browseForSave ? SWT.SAVE : SWT.OPEN); + fd.setText(text); + fd.setFilterPath(mkPrefPath(preferredPath)); + fd.setFilterExtensions(filterExt); + String res = fd.open(); + lastBrowsePath = fd.getFilterPath(); + return res; // null => cancel + } + + private static String mkPrefPath(String preferredPath) { + if (preferredPath == null) + return lastBrowsePath; + while (true) { + File f = new File(preferredPath); + if (f.exists() && f.isDirectory()) + return preferredPath; + preferredPath = f.getParent(); + if (preferredPath == null) { + return lastBrowsePath; + } + } + } + + + + public static void addCharsFilterValidator(Text t, final String charsToExclude) { + t.addListener(SWT.Verify, new Listener() { + public void handleEvent(Event e) { + String s = e.text; + for (int i=0; i= 0) { + e.doit = false; + return; + } + } + } + }); + } + + /** + * Play Yes/No message box in GUI thread + * @param shell - shell or null to use default + * @param caption - dialog title + * @param message - dialog text + * @return true when 'Yes' + */ + public static boolean YesNoQuestion(Shell shell, String caption, String message) { + return ShowMessageBox(shell, caption, message, SWT.YES | SWT.NO ) == SWT.YES; + } + + public static void OkMessageBox(Shell shell, String caption, String message) { + ShowMessageBox(shell, caption, message, SWT.OK ); + } + + /** + * Play message box in GUI thread + * @param shell - shell or null to use default + * @param caption - dialog title + * @param message - dialog text + * @param style - SWT styles + * @return swt style + */ + public static int ShowMessageBox(final Shell shell, final String caption, final String message, final int style) { + return new MessageBoxRunner().ShowMessageBox(shell, caption, message, style); + } + + private static class MessageBoxRunner { + private volatile int result = 0; + public int ShowMessageBox(final Shell shell, final String caption, final String message, final int style) + { + Display.getDefault().syncExec(new Runnable() { + @Override + public void run() { + MessageBox mb = new MessageBox(shell == null ? SwtUtils.getDefaultShell() : shell, style); + mb.setText(caption); + mb.setMessage(message); + result = mb.open(); + } + }); + return result; + } + } + + + // -------------------------------------------------- + // mix from org.eclipse.debug.internal.ui.SWTFactory: + // -------------------------------------------------- + + + /** + * Creates a new label widget + * @param parent the parent composite to add this label widget to + * @param text the text for the label + * @param hspan the horizontal span to take up in the parent composite + * @return the new label + */ + public static Label createLabel(Composite parent, String text, int hspan) { + return createLabel(parent, text, hspan, SWT.NONE, GridData.FILL_HORIZONTAL); + } + + /** + * Creates a new label widget + * @param parent the parent composite to add this label widget to + * @param text the text for the label + * @param hspan the horizontal span to take up in the parent composite + * @param fontstyle - SWT style + * @return the new label + */ + public static Label createLabel(Composite parent, String text, int hspan, int fontstyle) { + return createLabel(parent, text, hspan, fontstyle, GridData.FILL_HORIZONTAL); + } + + /** + * Creates a new label widget + * @param parent the parent composite to add this label widget to + * @param text the text for the label + * @param hspan the horizontal span to take up in the parent composite + * @param fontstyle - SWT style + * @param gdStyle - GridData style + * @return the new label + */ + public static Label createLabel(Composite parent, String text, int hspan, int fontstyle, int gdStyle) { + Label l = new Label(parent, SWT.NONE); + if (fontstyle != SWT.NONE){ + FontData fd = parent.getFont().getFontData()[0]; + l.setFont(new Font(Display.getDefault(), fd.getName(), fd.getHeight(), fontstyle)); + } else { + l.setFont(parent.getFont()); + } + l.setText(text); + GridData gd = new GridData(gdStyle); + gd.horizontalSpan = hspan; + gd.grabExcessHorizontalSpace = false; + l.setLayoutData(gd); + return l; + } + + + /** + * Creates a wrapping label + * @param parent the parent composite to add this label to + * @param text the text to be displayed in the label + * @param hspan the horizontal span that label should take up in the parent composite + * @param wrapwidth the width hint that the label should wrap at + * @return a new label that wraps at a specified width + */ + public static Label createWrapLabel(Composite parent, String text, int hspan, int wrapwidth) { + Label l = new Label(parent, SWT.NONE | SWT.WRAP); + l.setFont(parent.getFont()); + l.setText(text); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = hspan; + gd.widthHint = wrapwidth; + l.setLayoutData(gd); + return l; + } + + + /** + * Creates a new link widget + * @param parent the parent composite to add this link widget to + * @param text the text for the link + * @param hspan the horizontal span to take up in the parent composite + * @return the new link + */ + public static Link createLink(Composite parent, String text, int hspan, SelectionAdapter listener) { + Link l = new Link(parent, SWT.NONE); + l.setFont(parent.getFont()); + l.setText(text); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = hspan; + gd.grabExcessHorizontalSpace = false; + l.setLayoutData(gd); + l.addSelectionListener(listener); + return l; + } + + /** + * Creates a vertical spacer for separating components. If applied to a + * GridLayout, this method will automatically span all of the columns of the parent + * to make vertical space + * + * @param parent the parent composite to add this spacer to + * @param xLines - space height (in standard font height units) + */ + public static void createVerticalSpacer(Composite parent, double xLines) { + Label lbl = new Label(parent, SWT.NONE); + + GC gc = new GC(parent); + int cyLine; + try { + cyLine = gc.textExtent("Wq").y; //$NON-NLS-1$ + } finally { + gc.dispose(); + } + int cy = (int)((double)cyLine * xLines); + + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + Layout layout = parent.getLayout(); + if(layout instanceof GridLayout) { + gd.horizontalSpan = ((GridLayout)parent.getLayout()).numColumns; + } + gd.heightHint = cy; + lbl.setLayoutData(gd); + } + + + public static Text createSingleText(Composite parent, int hspan, int style) { + Text t = new Text(parent, style); + t.setFont(parent.getFont()); + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = hspan; + t.setLayoutData(gd); + return t; + } + + public static Text createSingleText(Composite parent, int hspan) { + return createSingleText(parent, hspan, SWT.SINGLE | SWT.BORDER); + } + + public static List createList(Composite parent, int hspan, int style, int nLines) { + List l = new List(parent, style); + l.setFont(parent.getFont()); + GC gc = new GC(l); + int cyLine; + try{ + cyLine = gc.textExtent("Wq").y; //$NON-NLS-1$ + } + finally{ + gc.dispose(); + } + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = hspan; + gd.heightHint = cyLine * nLines + 5; + l.setLayoutData(gd); + return l; + } + + + public static Button createPushButton(Composite parent, String label, Image image) { + return createPushButton(parent, label, 1, image); + } + + public static Button createPushButton(Composite parent, String label, int hspan, Image image) { + Button button = new Button(parent, SWT.PUSH); + button.setFont(parent.getFont()); + if (image != null) { + button.setImage(image); + } + if (label != null) { + button.setText(label); + } + GridData gd = new GridData(); + gd.horizontalSpan = hspan; + button.setLayoutData(gd); + setButtonDimensionHint(button); + return button; + } + + +public static int getButtonWidthHint(Button button) { + PixelConverter converter= new PixelConverter(button); + int widthHint= converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH); + return Math.max(widthHint, button.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).x); + } + + public static void setButtonDimensionHint(Button button) { + Assert.isNotNull(button); + Object gd= button.getLayoutData(); + if (gd instanceof GridData) { + ((GridData)gd).widthHint= getButtonWidthHint(button); + ((GridData)gd).horizontalAlignment = GridData.FILL; + } + } + + public static Combo createCombo(Composite parent, int hspan, int style) { + return createCombo(parent, hspan, style, GridData.FILL_HORIZONTAL); + } + + public static Combo createCombo(Composite parent, int hspan, int style, int gdStyle) { + Combo c = new Combo(parent, style); + c.setFont(parent.getFont()); + GridData gd = new GridData(gdStyle); + gd.horizontalSpan = hspan; + c.setLayoutData(gd); + return c; + } + + public static Button createCheckbox(Composite parent, String label, int hspan) { + Button cb = new Button(parent, SWT.CHECK); + cb.setFont(parent.getFont()); + if (label != null) { + cb.setText(label); + } + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.grabExcessHorizontalSpace = false; + gd.horizontalSpan = hspan; + cb.setLayoutData(gd); + return cb; + } + + public static Button createRadiobutton(Composite parent, String label, int hspan) { + Button cb = new Button(parent, SWT.RADIO); + cb.setFont(parent.getFont()); + if (label != null) { + cb.setText(label); + } + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.grabExcessHorizontalSpace = false; + gd.horizontalSpan = hspan; + cb.setLayoutData(gd); + return cb; + } + + /** + * Creates a Composite widget + * @param parent the parent composite to add this composite to + * @param font the font to set on the control + * @param columns the number of columns within the composite + * @param hspan the horizontal span the composite should take up on the parent + * @param fill the style for how this composite should fill into its parent + * @return the new group + */ + public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill) { + Composite g = new Composite(parent, SWT.NONE); + g.setLayout(new GridLayout(columns, false)); + g.setFont(font); + GridData gd = new GridData(fill); + gd.horizontalSpan = hspan; + g.setLayoutData(gd); + return g; + } + + /** + * Creates a Group widget + * @param parent the parent composite to add this group to + * @param text the text for the heading of the group + * @param columns the number of columns within the group + * @param hspan the horizontal span the group should take up on the parent + * @param fill the style for how this composite should fill into its parent + * @return the new group + */ + public static Group createGroup(Composite parent, String text, int columns, int hspan, int fill) { + Group g = new Group(parent, SWT.NONE); + g.setLayout(new GridLayout(columns, false)); + g.setText(text); + g.setFont(parent.getFont()); + GridData gd = new GridData(fill); + gd.horizontalSpan = hspan; + g.setLayoutData(gd); + return g; + } + + public static Composite createComposite(Composite parent, Font font, int columns, int hspan, int fill, int marginwidth, int marginheight) { + Composite g = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(columns, false); + layout.marginWidth = marginwidth; + layout.marginHeight = marginheight; + g.setLayout(layout); + if (font != null) { + g.setFont(font); + } + GridData gd = new GridData(fill); + gd.horizontalSpan = hspan; + g.setLayoutData(gd); + return g; + } + + /** + * Create empty cell for layout + * + * @param cx + * , cy - sizes + */ + public static void createFreeSpace(Composite parent, int cx, int cy, int hspan) { + Label l = new Label(parent, SWT.NONE); + GridData gd = new GridData(); + gd.horizontalSpan = hspan; + gd.grabExcessHorizontalSpace = false; + gd.widthHint = cx; + gd.heightHint = cy; + l.setLayoutData(gd); + } + + /** + * Creates a separator line. Expects a GridLayout with at least 1 column. + * + * @param composite the parent composite + * @param nColumns number of columns to span + * @param height The height of the separator + */ + public static Control createSeparator(Composite composite, int nColumns, int height) { + Separator sep = new Separator(SWT.SEPARATOR | SWT.HORIZONTAL); + sep.doFillIntoGrid(composite, nColumns, height); + return sep.getSeparator(composite); + } + + + public static ColorSelector createColorSelector(Composite composite, int hspan) { + ColorSelector cs = new ColorSelector(composite); + GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + gd.horizontalSpan = hspan; + cs.getButton().setLayoutData(gd); + return cs; + } + + + public static int getCharHeight(Control ctr) { + GC gc = new GC(ctr); + FontMetrics fm; + try { + gc.setFont(JFaceResources.getDialogFont()); + fm = gc.getFontMetrics(); + } finally { + gc.dispose(); + } + return fm.getHeight(); + } + + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SelectionUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SelectionUtils.java new file mode 100644 index 0000000..2d50089 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SelectionUtils.java @@ -0,0 +1,337 @@ +package com.excelsior.xds.ui.commons.utils; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; + +import org.eclipse.core.resources.IResource; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +import com.excelsior.xds.core.utils.AdapterUtilities; + +public final class SelectionUtils +{ + /** + * Returns the current selection in the active part. If the selection in the + * active part is undefined (the active part has no selection provider) + * the result will be null. + * + * @return the current selection, or null if undefined + */ + public static IStructuredSelection getStructuredSelection() { + ISelectionService selectionService = WorkbenchUtils.getSelectionService(); + if (selectionService != null) { + ISelection selection = selectionService.getSelection(); + if (selection instanceof IStructuredSelection) { + return (IStructuredSelection)selection; + } + } + return null; + } + + /** + * Returns first element of the {@link #getObjectsFromStructuredSelection(ISelection, Class)} + * @see {@link #getObjectsFromStructuredSelection(ISelection, Class)} + */ + public static T getObjectFromStructuredSelection( ISelection selection + , Class tagClass ) + { + List objects = getObjectsFromStructuredSelection(selection, tagClass); + if (objects.isEmpty()) { + return null; + } + return objects.get(0); + } + + /** + * Uses selection {@link getStructuredSelection()} and passes it to the {@link #getObjectFromStructuredSelection(ISelection, Class)} + * @param tagClass + * @return + * @see #getObjectFromStructuredSelection(ISelection, Class) + * @see #getStructuredSelection() + */ + public static T getObjectFromStructuredSelection( Class tagClass ) { + return getObjectFromStructuredSelection( getStructuredSelection(), tagClass); + } + + /** + * Uses selection {@link getStructuredSelection()} and passes it to the {@link #getObjectsFromStructuredSelection(ISelection, Class)} + * @param tagClass + * @return + * @see #getObjectsFromStructuredSelection(ISelection, Class) + * @see #getStructuredSelection() + */ + public static List getObjectsFromStructuredSelection( Class tagClass ){ + return getObjectsFromStructuredSelection(getStructuredSelection(), tagClass); + } + + /** + * Returns the selected elements of the given class as a unmodifiable list. + * + * @param selection - a selection containing elements. + * @param tagClass - expected class of elements in selection - only objects of this class will be returned + * @return the selected elements of given class as a immutable list + */ + public static List getObjectsFromStructuredSelection( ISelection selection + , Class tagClass ) + { + List objectList = Collections.emptyList(); + if (selection instanceof IStructuredSelection) { + IStructuredSelection structuredSelection = (IStructuredSelection)selection; + objectList = new ArrayList(structuredSelection.size()); + Iterator selectionIterator = structuredSelection.iterator(); + while (selectionIterator.hasNext()) { + Object object = selectionIterator.next(); + T adapted = AdapterUtilities.getAdapter(object, tagClass); + if (adapted != null){ + objectList.add(adapted); + } + } + } + return objectList; + } + + + private static final String tokenExpression = "[\\s\\p{Punct}&&[^_]]"; // whitespaces and punctuation except _ symbol //$NON-NLS-1$ + + /** + * Retrieves the word (sequence of symbols between the whitespace and punctuation) under cursor, + * or previous in the document, if isPrevious is true. + */ + public static WordAndRegion getWordUnderCursor(IDocument document, boolean isPrevious, ITextSelection selection) { + return getWordUnderCursor(document, isPrevious, selection, false); + + } + + /** + * Special for keyword "@ARG" in debug script language + */ + public static WordAndRegion getWordUnderCursor(IDocument document, boolean isPrevious, ITextSelection selection, boolean withSobaka) + { + try { + boolean isPunctUnderCursor = document.get(selection.getOffset(), 1).matches(tokenExpression); + int right = selection.getOffset(); + if (!isPunctUnderCursor) { + for (int i = right + 1; i < document.getLength(); i++) { + if (document.get(i, 1).matches(tokenExpression)) break; + right = i; + } + } + else { + right--; + } + int left = selection.getOffset(); + for (int i = left - 1; i > -1; i--) { + if (document.get(i, 1).matches(tokenExpression)) break; + left = i; + } + String word = document.get(left, right - left + 1); + if (word.length() == 0 // empty word OR ... + || word.matches(tokenExpression+"+")) { // ... only punctuation/spaces //$NON-NLS-1$ + return null; + } + if (withSobaka && left>0) { + if ("@".equals(document.get(left-1, 1))) { + --left; + word = "@" + word; + } + } + return new WordAndRegion(word, left, right - left + 1, selection.getOffset()); + } catch (BadLocationException e) { + } + return null; + } + +// public static CompletionContext getCompletionContext(ITextViewer viewer, +// int offset) { +// CompletionContext completionContext = new CompletionContext(); +// IDocument doc = viewer.getDocument(); +// +// int i = offset; +// +// try { +// StringBuilder sb = new StringBuilder(); +// char c; +// while(i < doc.getLength() && Character.isJavaIdentifierPart(c = doc.getChar(i))) { +// sb.append(c); +// ++i; +// } +// +// String afterCursorPart = sb.toString(); +// sb = new StringBuilder(); +// i = offset - 1; +// while(i > -1 && Character.isJavaIdentifierPart(c = doc.getChar(i))) { +// sb.append(c); +// --i; +// } +// completionContext.beforeCursorWordPart = StringUtils.reverse(sb.toString()); +// +// completionContext.currentWord = completionContext.beforeCursorWordPart + afterCursorPart; +// if (completionContext.beforeCursorWordPart.isEmpty()) { +// completionContext.beforeCursorWordPart = null; +// } +// +// while(i > -1 && Character.isWhitespace(doc.getChar(i))) { +// --i; +// } +// +// if (doc.getChar(i) == '.') { +// completionContext.isDotBeforeCursor = true; +// } +// +// if (completionContext.isDotBeforeCursor) { +// --i; +// while(i > -1 && Character.isWhitespace(doc.getChar(i))) { +// --i; +// } +// +// sb = new StringBuilder(); +// while(i > -1 && Character.isJavaIdentifierPart(c = doc.getChar(i))) { +// sb.append(c); +// --i; +// } +// +// completionContext.wordBeforeDot = StringUtils.reverse(sb.toString()); +// if (completionContext.wordBeforeDot.length() > 0) { +// completionContext.wordBeforeDotOffset = i + 1; +// } +// } +// } catch (BadLocationException e) { +// } +// +// return completionContext; +// } + + /** + * Retrieves the word (sequence of symbols between the whitespace and punctuation) + * under cursor in the active text editor. + * + * @param isPrevious retrieves the previous word. + * + * @return the word description or null + */ + public static WordAndRegion getWordUnderCursor (boolean isPrevious) { + return getWordUnderCursor (isPrevious, false); + } + + /** + * Special for keyword "@ARG" in debug script language + */ + public static WordAndRegion getWordUnderCursor (boolean isPrevious, boolean withSobaka) { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + if (selection != null) { + IDocument document = WorkbenchUtils.getActiveDocument(); + if (document != null) { + return getWordUnderCursor(document, isPrevious, selection, withSobaka); + } + } + return null; + } + + /** + * Returns the list of currently selected resources in the active workbench window, + * or empty list if none. If an editor is active, the resource adapter + * associated with the editor is returned. + * + * @return the list of selected IResource objects, or empty list if none. + */ + public static List getSelectedResources() { + if (PlatformUI.getWorkbench().getDisplay().isDisposed()) { + return Collections.emptyList(); + } + if (PlatformUI.getWorkbench().getDisplay().getThread().equals(Thread.currentThread())) { + return getSelectedResources0(); + } + else { + @SuppressWarnings("unchecked") + final List[] resources = new List[1]; + PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() { + public void run() { + resources[0] = getSelectedResources0(); + } + }); + return resources[0]; + } + } + + /** + * Underlying implementation of getSelectedResources + * + * @return the list of selected IResource objects, or empty list if none. + */ + protected static List getSelectedResources0() { + IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + List resources = new ArrayList(); + if (window != null) { + IWorkbenchPage page = window.getActivePage(); + if (page != null) { + IWorkbenchPart part = page.getActivePart(); + if (part instanceof IEditorPart) { + IEditorPart epart = (IEditorPart) part; + IResource adaptee = (IResource) epart.getEditorInput().getAdapter(IResource.class); + if (adaptee != null) { + resources.add(adaptee); + } + } + else if (part != null) { + IWorkbenchPartSite site = part.getSite(); + if(site != null) { + ISelectionProvider provider = site.getSelectionProvider(); + if (provider != null) { + ISelection selection = provider.getSelection(); + resources = getObjectsFromStructuredSelection(selection, IResource.class); + } + } + } + } + } + return resources; + } + + + /** + * Checks that the currently selected resources only and all selected + * resources are siblings. + * + * @return true if selected resources are siblings. + */ + public static boolean isSelectedSiblingResources() { + IStructuredSelection structuredSelection = getStructuredSelection(); + List selectedResources = SelectionUtils.getObjectsFromStructuredSelection(structuredSelection, IResource.class); + boolean isResourceSelected = !selectedResources.isEmpty() + && (structuredSelection.size() == selectedResources.size()); + if (isResourceSelected) { + IResource firstParent = selectedResources.get(0).getParent(); + if (firstParent == null) { + return false; + } + for (IResource resource : selectedResources) { + IResource parent = resource.getParent(); + if ((parent != null) && (!parent.equals(firstParent))) { + return false; + } + } + return true; + } + return false; + } + + /** + * This class in static methods only + */ + private SelectionUtils() { + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SwtUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SwtUtils.java new file mode 100644 index 0000000..3a43282 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/SwtUtils.java @@ -0,0 +1,293 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.TraverseEvent; +import org.eclipse.swt.events.TraverseListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Drawable; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.Resource; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Sash; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.swt.widgets.Widget; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PlatformUI; + +public final class SwtUtils { + public static GridLayout removeMargins(GridLayout layout) { + layout.marginBottom = 0; + layout.marginHeight = 0; + layout.marginLeft = 0; + layout.marginRight = 0; + layout.marginTop = 0; + layout.marginWidth = 0; + return layout; + } + + public static RowLayout removeMargins(RowLayout layout) { + layout.marginBottom = 0; + layout.marginHeight = 0; + layout.marginLeft = 0; + layout.marginRight = 0; + layout.marginTop = 0; + layout.marginWidth = 0; + return layout; + } + + public static Font modifyFont(Control c, int flags) { + Font f = c.getFont(); + String fontName = f.getFontData()[0].getName(); + int fontSize = f.getFontData()[0].getHeight(); + int fontStyle = f.getFontData()[0].getStyle() | flags; + return new Font(c.getDisplay(), new FontData(fontName, fontSize, + fontStyle)); + } + + public static Sash createSplitter(Composite parent, FormAttachment left) { + final Sash sash = new Sash(parent, SWT.VERTICAL); + FormData formData = new FormData(); + formData.top = new FormAttachment(0, 0); // Attach to top + formData.bottom = new FormAttachment(100, 0); // Attach to bottom + formData.left = left; + sash.setLayoutData(formData); + sash.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + // We reattach to the left edge, and we use the x value of the + // event to + // determine the offset from the left + ((FormData) sash.getLayoutData()).left = new FormAttachment(0, + event.x); + + // Until the parent window does a layout, the sash will not be + // redrawn + // in + // its new location. + sash.getParent().layout(); + } + }); + return sash; + } + + public static int getClickedItemColumnIndex(Table table, Point point) { + return getClickedItemColumnIndex(table, table.getItem(point), point); + } + + public static int getClickedItemColumnIndex(Table table, TableItem item, + Point point) { + int column = -1; + if (item != null) { + // Determine which column was selected + for (int i = 0, n = table.getColumnCount(); i < n; i++) { + Rectangle rect = item.getBounds(i); + if (rect.contains(point)) { + // This is the selected column + column = i; + break; + } + } + } + return column; + } + + public static void dispose(Resource r) { + if (null != r && !r.isDisposed()) { + r.dispose(); + } + } + + public static void dispose(Control c) { + if (null != c && !c.isDisposed()) { + c.dispose(); + } + } + + public static org.eclipse.swt.graphics.Color createSwtColorFromAwt( + Display display, java.awt.Color awtColor) { + return new org.eclipse.swt.graphics.Color(display, awtColor.getRed(), + awtColor.getGreen(), awtColor.getBlue()); + } + + public static java.awt.Color createAwtFromSwtColor( + org.eclipse.swt.graphics.Color swtColor) { + return new java.awt.Color(swtColor.getRed(), swtColor.getGreen(), + swtColor.getBlue()); + } + + public static void setEnabled(Table table, boolean isEnabled) { + for (int i = 0; i < table.getItemCount(); i++) { + table.getItem(i).setGrayed(!isEnabled); + } + } + + public static void resizeColumnsByCaption(Table table) { + GC gc = new GC(table); + try { + for (int i = 0; i < table.getColumnCount(); i++) { + int maxTextExtent = getColumnTextWidth(table, gc, i); + table.getColumn(i).setWidth(maxTextExtent); + } + } finally { + gc.dispose(); + } + } + + public static void resizeColumsByContent(Table table) { + for (int i = 0; i < table.getColumnCount(); i++) { + table.getColumn(i).pack(); + } + } + + public static int getColumnTextWidth(Table table, GC gc, int i) { + TableColumn tableColumn = table.getColumn(i); + int maxTextExtent = 20 + gc.textExtent(tableColumn.getText()).x; + return maxTextExtent; + } + + public static void resizeColumnByCaption(Table table, int columnIdx) { + GC gc = new GC(table); + int maxTextExtent; + try { + maxTextExtent = getColumnTextWidth(table, gc, columnIdx); + } finally { + gc.dispose(); + } + table.getColumn(columnIdx).setWidth(maxTextExtent); + } + + public static void setDataColumnBackground(Table table, int columnIdx, + Color color) { + for (int i = 0; i < table.getItemCount(); i++) { + table.getItem(i).setBackground(columnIdx, color); + } + } + + public static int getTextWidth(Drawable control, String text) { + GC gc = new GC(control); + try + { + return gc.textExtent(text).x; + } + finally{ + gc.dispose(); + } + } + + public static Boolean setEnabled(Control control, boolean isEnabled) { + if (control.isDisposed()) + return null; + + boolean isEnabledBefore = control.getEnabled(); + if (isEnabledBefore != isEnabled) { + control.setEnabled(isEnabled); + } + return isEnabledBefore; + } + + public static int getMaximumLengthOfText(int maxSize, GC gc) { + String text = "w"; //$NON-NLS-1$ + int size = 0; + while (gc.textExtent(text).x < maxSize) { + ++size; + text += "w"; //$NON-NLS-1$ + } + return size; + } + + public static Image getPlatformImage(String imageId) { + return PlatformUI.getWorkbench().getSharedImages().getImage(imageId); + } + + public static void addFocusTransfering(Control control, + final Control gainFocusControl) { + control.addFocusListener(new FocusListener() { + + @Override + public void focusLost(FocusEvent e) { + gainFocusControl.forceFocus(); + } + + @Override + public void focusGained(FocusEvent e) { + } + }); + } + + public static void disableTabTraversal(Control c) { + c.addTraverseListener(new TraverseListener() { + public void keyTraversed(TraverseEvent e) { + switch (e.detail) { + case SWT.TRAVERSE_TAB_NEXT: + case SWT.TRAVERSE_TAB_PREVIOUS: { + e.doit = false; + } + } + } + }); + } + + public static Shell getDefaultShell() { + IWorkbenchWindow window = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow(); + if (window != null) { + return window.getShell(); + } + return null; + } + + private static final String SWT_NAME_ATTRIBUTE = "name"; //$NON-NLS-1$ + + /** + * This name attribute is used by QF-test when generating name for the control + */ + public static void setNameAttribute(Object widgetCreator, Widget widget, String namePostfix) { + widget.setData(SWT_NAME_ATTRIBUTE, widgetCreator.getClass().getSimpleName() + "_" + namePostfix); //$NON-NLS-1$ + } + + /** + * Executes runnable in the UI thread. If thread is already UI - just executes it. + * @param runnable + */ + public static void executeInUiThread(Runnable runnable) { + Display current = Display.getCurrent(); + if (current == null) { + Display.getDefault().asyncExec(runnable); + } + else { + runnable.run(); + } + } + + /** + * Returns the standard display to be used. The method first checks, if the thread calling this method has an associated display. If so, this display is + * returned. Otherwise the method returns the default display. + */ + public static Display getStandardDisplay() { + Display display; + display = Display.getCurrent(); + if ( display == null ) + display = Display.getDefault(); + return display; + } + + private SwtUtils() { + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/UiUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/UiUtils.java new file mode 100644 index 0000000..56f892b --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/UiUtils.java @@ -0,0 +1,240 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.TraverseEvent; +import org.eclipse.swt.events.TraverseListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Device; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.Resource; +import org.eclipse.swt.layout.FormAttachment; +import org.eclipse.swt.layout.FormData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.layout.RowLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Sash; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableColumn; +import org.eclipse.swt.widgets.TableItem; +import org.eclipse.ui.PlatformUI; + +import com.excelsior.xds.core.utils.IDisposable; + +public class UiUtils { + public static GridLayout removeMargins(GridLayout layout) { + layout.marginBottom = 0; + layout.marginHeight = 0; + layout.marginLeft = 0; + layout.marginRight = 0; + layout.marginTop = 0; + layout.marginWidth = 0; + return layout; + } + + public static RowLayout removeMargins(RowLayout layout) { + layout.marginBottom = 0; + layout.marginHeight = 0; + layout.marginLeft = 0; + layout.marginRight = 0; + layout.marginTop = 0; + layout.marginWidth = 0; + return layout; + } + + public static Font modifyFont(Control c, int flags) { + Font f = c.getFont(); + return modifyFont(c.getDisplay(), f, flags); + } + + public static Font modifyFont(Device d, Font f, int flags) { + FontData fd = modifyFont(f.getFontData()[0], flags); + return new Font(d, fd); + } + + public static FontData modifyFont(FontData fd, int flags) { + FontData newFd = new FontData(fd.toString()); + newFd.setStyle(newFd.getStyle() | flags); + return newFd; + } + + public static Sash createSplitter(Composite parent, FormAttachment left) { + final Sash sash = new Sash(parent, SWT.VERTICAL); + FormData formData = new FormData(); + formData.top = new FormAttachment(0, 0); // Attach to top + formData.bottom = new FormAttachment(100, 0); // Attach to bottom + formData.left = left; + sash.setLayoutData(formData); + sash.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent event) { + // We reattach to the left edge, and we use the x value of the event to + // determine the offset from the left + ((FormData) sash.getLayoutData()).left = new FormAttachment(0, event.x); + + // Until the parent window does a layout, the sash will not be redrawn + // in + // its new location. + sash.getParent().layout(); + } + }); + return sash; + } + + public static int getClickedItemColumnIndex(Table table, Point point){ + return getClickedItemColumnIndex(table, table.getItem(point), point); + } + + public static int getClickedItemColumnIndex(Table table, TableItem item, + Point point){ + int column = -1; + if (item != null) { + // Determine which column was selected + for (int i = 0, n = table.getColumnCount(); i < n; i++) { + Rectangle rect = item.getBounds(i); + if (rect.contains(point)) { + // This is the selected column + column = i; + break; + } + } + } + return column; + } + + public static void dispose(Resource r) { + if (null != r && !r.isDisposed()) { + r.dispose(); + } + } + + public static void dispose(Control c) { + if (null != c && !c.isDisposed()) { + c.dispose(); + } + } + + public static void dispose(IDisposable disposable) { + if (disposable != null) { + disposable.dispose(); + } + } + + public static org.eclipse.swt.graphics.Color createSwtColorFromAwt(Display display, + java.awt.Color awtColor) { + return new org.eclipse.swt.graphics.Color(display, awtColor.getRed(), awtColor.getGreen(), + awtColor.getBlue()); + } + + public static java.awt.Color createAwtFromSwtColor(org.eclipse.swt.graphics.Color swtColor) { + return new java.awt.Color(swtColor.getRed(), swtColor.getGreen(), swtColor.getBlue()); + } + + public static void setEnabled(Table table, boolean isEnabled){ + for (int i = 0; i < table.getItemCount(); i++) { + table.getItem(i).setGrayed(!isEnabled); + } + } + + public static void resizeColumnsByCaption(Table table){ + GC gc = new GC(table); + try { + for (int i = 0; i < table.getColumnCount(); i++) { + int maxTextExtent = getColumnTextWidth(table, gc, i); + table.getColumn(i).setWidth(maxTextExtent); + } + } finally { + gc.dispose(); + } + } + + public static void resizeColumsByContent(Table table){ + for (int i = 0; i < table.getColumnCount(); i++) { + table.getColumn(i).pack(); + } + } + + public static int getColumnTextWidth(Table table, GC gc, int i) { + TableColumn tableColumn = table.getColumn(i); + int maxTextExtent = 20 + gc.textExtent(tableColumn.getText()).x; + return maxTextExtent; + } + + public static void resizeColumnByCaption(Table table, int columnIdx){ + GC gc = new GC(table); + int maxTextExtent; + try { + maxTextExtent = getColumnTextWidth(table, gc, columnIdx); + } finally { + gc.dispose(); + } + table.getColumn(columnIdx).setWidth(maxTextExtent); + } + + public static void setDataColumnBackground(Table table, int columnIdx, Color color){ + for (int i = 0; i < table.getItemCount(); i++) { + table.getItem(i).setBackground(columnIdx, color); + } + } + + public static Boolean setEnabled(Control control, boolean isEnabled){ + if (control.isDisposed()) return null; + + boolean isEnabledBefore = control.getEnabled(); + if (isEnabledBefore != isEnabled){ + control.setEnabled(isEnabled); + } + return isEnabledBefore; + } + + public static int getMaximumLengthOfText(int maxSize, GC gc){ + String text = "w"; + int size = 0; + while(gc.textExtent(text).x < maxSize ){ + ++size; + text += "w"; + } + return size; + } + + public static Image getPlatformImage(String imageId){ + return PlatformUI.getWorkbench().getSharedImages().getImage( + imageId); + } + + public static void addFocusTransfering(Control control, final Control gainFocusControl){ + control.addFocusListener(new FocusListener() { + + @Override + public void focusLost(FocusEvent e) { + gainFocusControl.forceFocus(); + } + + @Override + public void focusGained(FocusEvent e) { + } + }); + } + + public static void disableTabTraversal(Control c){ + c.addTraverseListener(new TraverseListener () { + public void keyTraversed(TraverseEvent e) { + switch (e.detail) { + case SWT.TRAVERSE_TAB_NEXT: + case SWT.TRAVERSE_TAB_PREVIOUS: { + e.doit = false; + } + } + } + }); + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WizardUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WizardUtils.java new file mode 100644 index 0000000..1053397 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WizardUtils.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.wizard.IWizard; +import org.eclipse.jface.wizard.WizardDialog; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IWorkbenchWizard; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.wizards.IWizardDescriptor; + +public abstract class WizardUtils { + + public static void openWizard(String wizardId, Shell parentShell) { + openWizard(wizardId, parentShell, null); + } + + public static void openWizard(String wizardId, Shell parentShell, ISelection selection) { + // First see if this is a "new wizard". + IWizardDescriptor descriptor = PlatformUI.getWorkbench().getNewWizardRegistry().findWizard(wizardId); + // If not check if it is an "import wizard". + if (descriptor == null) { + descriptor = PlatformUI.getWorkbench().getImportWizardRegistry().findWizard(wizardId); + } + // Or maybe an export wizard + if (descriptor == null) { + descriptor = PlatformUI.getWorkbench().getExportWizardRegistry().findWizard(wizardId); + } + try { + // Then if we have a wizard, open it. + if (descriptor != null) { + IWizard wizard = descriptor.createWizard(); + if (wizard instanceof IWorkbenchWizard) { + IStructuredSelection structuredSelection = selection instanceof IStructuredSelection? (IStructuredSelection)selection : new StructuredSelection(); + ((IWorkbenchWizard)wizard).init(PlatformUI.getWorkbench(), structuredSelection); + WizardDialog wd = new WizardDialog(parentShell, wizard); + wd.setTitle(wizard.getWindowTitle()); + wd.open(); + } + else { + Assert.isTrue(false, "Attempt to call not IWorkbenchWizard"); //$NON-NLS-1$ + } + } + } catch (CoreException e) { + e.printStackTrace(); + } + } +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WordAndRegion.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WordAndRegion.java new file mode 100644 index 0000000..e6f33ee --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WordAndRegion.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.ui.commons.utils; + +public class WordAndRegion { + + public String word; + public int begin; + public int length; + public int index; + + public WordAndRegion(String word, int begin, int length, int index) { + this.word = word; + this.begin = begin; + this.length = length; + this.index = index; + } + +} diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WorkbenchUtils.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WorkbenchUtils.java new file mode 100644 index 0000000..e88d969 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/WorkbenchUtils.java @@ -0,0 +1,472 @@ +package com.excelsior.xds.ui.commons.utils; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.Platform; +import org.eclipse.jface.action.ContributionManager; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.IStatusLineManager; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ISelectionProvider; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.window.IShellProvider; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.ISelectionService; +import org.eclipse.ui.ISourceProvider; +import org.eclipse.ui.IViewPart; +import org.eclipse.ui.IViewSite; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPage; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartSite; +import org.eclipse.ui.IWorkbenchWindow; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.commands.ICommandService; +import org.eclipse.ui.dialogs.PropertyDialogAction; +import org.eclipse.ui.forms.editor.FormEditor; +import org.eclipse.ui.internal.WorkbenchWindow; +import org.eclipse.ui.menus.IMenuService; +import org.eclipse.ui.menus.MenuUtil; +import org.eclipse.ui.services.ISourceProviderService; +import org.eclipse.ui.texteditor.IDocumentProvider; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.log.LogHelper; + +@SuppressWarnings("restriction") +public final class WorkbenchUtils +{ + /** + * Fetches the editor currently in use. If the active editor is a multi page + * editor and the param getSubEditor is true, then the editor of the active + * page is returned instead of the multi page editor. + * + * @param getSubEditor + * indicates that a sub editor should be returned + * @return the active editor or null if no editor is active + */ + public static IEditorPart getActiveEditor(boolean getSubEditor) { + IWorkbenchPage page = getActivePage(); + if (page != null) { + IEditorPart result = page.getActiveEditor(); + if (getSubEditor && (result instanceof FormEditor)) { + result = ((FormEditor) result).getActiveEditor(); + } + return result; + } + return null; + } + + public static IWorkbenchPage getActivePage() { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + return (w != null) ? w.getActivePage() : null; + } + + public static IWorkbenchPart getActivePart() { + IWorkbenchPage activePage = getActivePage(); + return activePage != null ? activePage.getActivePart() : null; + } + + public static IWorkbenchPartSite getActivePartSite() { + IWorkbenchPart activePart = getActivePart(); + return activePart != null ? activePart.getSite() : null; + } + + public static ISelectionProvider getActivePartSelectionProvider() { + IWorkbenchPartSite site = getActivePartSite(); + return site != null ? site.getSelectionProvider() : null; + } + + /** + * Fetches the text selection from the active text editor. + * + * @return the text selection or null, when there is no active + * editor or it is not a text editor + */ + public static ITextSelection getActiveTextSelection() { + IEditorPart editor = getActiveEditor(true); + if (editor instanceof ITextEditor) { + ISelection selection = ((ITextEditor) editor) + .getSelectionProvider().getSelection(); + if (selection instanceof ITextSelection) { + return (ITextSelection) selection; + } + } + return null; + } + + /** + * Fetches the document provider for the active text editor. + * + * @return the document provider or null if no active editor or + * the active editor is not a text editor + */ + public static IDocumentProvider getActiveDocumentProvider() { + IEditorPart editor = getActiveEditor(true); + if (editor instanceof ITextEditor) { + return ((ITextEditor) editor).getDocumentProvider(); + } + return null; + } + + /** + * Fetches the input under edit. + * + * @return the active input or null, when there is no active + * editor + */ + public static IEditorInput getActiveInput() { + IEditorPart editor = getActiveEditor(true); + if (editor == null) { + return null; + } + return editor.getEditorInput(); + } + + /** + * Fetches the document just edited. + * + * @return the document or null + */ + public static IDocument getActiveDocument() { + IDocumentProvider provider = getActiveDocumentProvider(); + IEditorInput input = getActiveInput(); + if ((provider != null) && (input != null)) { + return provider.getDocument(input); + } + return null; + } + + /** + * Fetches the file represented in the active editor. + * + * @return the file or null, when there is no active file + * + * NOTE that IFiles are meant to represent files within the + * workspace and will not work if the file that has been opened is + * not contained within the workspace. + */ + public static IFile getActiveFile() { + return getIFileFrom(getActiveInput()); + } + + /** + * Tries to get IFile from editor input - i.e. the IFile which can be modified by this editor + * @param input + * @return + */ + public static IFile getIFileFrom(IEditorInput input) { + if (input == null) { + return null; + } + + return (IFile) input.getAdapter(IFile.class); + } + + /** + * Fetches the currently visible status line manager. Note, that even if it + * looks like Eclipse has just one statusline this is far from beeing the + * case. Instead every editor and every view has it's own + * status line instance, Eclipse switches visibility when focus changes. + * This is important to remember when trying to clear a message, especially + * an error message, which supresses display of normal messages: you must + * remember the status line you have written the message to, else you might + * clear messages in the wrong status line. + *

+ * Note also, that the returned status line manager most often is a + * SubStatusLineManager and there seem to be views (Taskview for instance) + * that write some status to their status line and don't refreh it often, + * trusting, that nobody else destroys their message. To solve this use: + * + *

+     *     IStatusLineManager statusLine = getStatusLine();
+     *     while (statusLine instanceof SubStatusLineManager) {
+     *         IContributionManager cb =
+     *             ((SubStatusLineManager)statusLine).getParent();
+     *         if (!(cb instanceof IStatusLineManager)) {
+     *             break;
+     *         }
+     *         statusLine = (IStatusLineManager) cb;
+     *     }
+     *     statusLine.setMessage(...);
+     * 
+ * + * @return the currently active status line manager + */ + public static IStatusLineManager getStatusLine() { + IEditorSite esite = getEditorSite(false); + if (esite != null) { + return esite.getActionBars().getStatusLineManager(); + } + IViewSite vsite = getViewSite(); + if (vsite != null) { + return vsite.getActionBars().getStatusLineManager(); + } + return null; + } + + /** + * Fetches the editor site of the active editor. If the active editor is a + * multi page editor and the param getSubEditor is true, then the editor + * site of the active page is returned instead of the multi page editors + * site. + * + * @param getSubEditor + * indicates that a sub editor should be returned + * @return the editor site or null + */ + public static IEditorSite getEditorSite(boolean getSubEditor) { + IEditorPart editor = getActiveEditor(getSubEditor); + if (editor != null) { + return editor.getEditorSite(); + } + return null; + } + + /** + * Fetches the view site of the active view. + * + * @return the site or null + */ + public static IViewSite getViewSite() { + IViewPart part = getActiveView(); + if (part != null) { + return part.getViewSite(); + } + return null; + } + + /** + * Fetches the active view. + * + * @return the active view or null if no view is active + */ + public static IViewPart getActiveView() { + IWorkbenchPage page = getActivePage(); + if (page != null) { + IWorkbenchPart part = page.getActivePart(); + if (part instanceof IViewPart) { + return (IViewPart) part; + } + } + return null; + } + + /** + * Remove any message set by us from the right statusline. + */ + public static void clearStatusLine() { + IStatusLineManager statusLine = getStatusLine(); + if (statusLine != null) { + statusLine.setErrorMessage(null); + statusLine.setMessage(null); + statusLine = null; + } + } + + public static void reportToStatusLine(String message, boolean isError) { + IStatusLineManager statusLine = getStatusLine(); + if (statusLine != null) { + if (isError) { + statusLine.setErrorMessage(message); + } + statusLine.setMessage(message); + } + } + + public static Shell getActivePartShell() { + IWorkbenchPage activePage = WorkbenchUtils.getActivePage(); + if (activePage == null) { + return null; + } + IWorkbenchPart activePart = activePage.getActivePart(); + if (activePart == null) { + return null; + } + IWorkbenchPartSite site = activePart.getSite(); + if (site == null) { + return null; + } + return site.getShell(); + } + + public static Shell getWorkbenchWindowShell() { + IWorkbenchWindow activeWindow = getActiveWorkbenchWindow(); + return activeWindow != null ? activeWindow.getShell() : null; + + } + + public static IWorkbenchWindow getActiveWorkbenchWindow() { + return PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + } + + public static boolean isCaseSensitiveFilesystem() { + return Platform.OS_MACOSX.equals(Platform.getOS()) ? false : new java.io.File("a").compareTo(new java.io.File("A")) != 0; //$NON-NLS-1$ //$NON-NLS-2$ + } + + public static void refreshMainMenu() { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + WorkbenchWindow ww = (WorkbenchWindow)w; + IMenuService service = (IMenuService)w.getService(IMenuService.class); + service.populateContributionManager((ContributionManager)ww.getActionBars().getMenuManager(), MenuUtil.MAIN_MENU); + } + + public static IMenuManager getWorkbenchMenuManager() { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + WorkbenchWindow ww = (WorkbenchWindow)w; + return ww.getActionBars().getMenuManager(); + } + + public static ISelectionService getSelectionService() { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + if (w != null) { + return w.getSelectionService(); + } + return null; + } + + public static Object getService(Class api) { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + return w.getService(api); + } + + public static ICommandService getCommandService() { + return (ICommandService)getService(ICommandService.class); + } + + public static ISourceProviderService getSourceProviderService() { + return (ISourceProviderService) getService(ISourceProviderService.class); + } + + /** + * Retrieves a source provider providing the given source. This is used by + * clients who only need specific sources. + * + * @param sourceName The name of the source; must not be null. + * + * @return A source provider which provides the request source, or + * null if no such source exists. + */ + public static ISourceProvider getSourceProvider(String sourceName) { + ISourceProviderService sourceProviderService = getSourceProviderService(); + if (sourceProviderService == null) { + return null; + } + return sourceProviderService.getSourceProvider(sourceName); + } + + /** Returns selected XDS project or null + * + * @param projectNatureId - should be NatureIdRegistry.MODULA2_SOURCE_PROJECT_NATURE_ID + * + * @return + */ + public static IProject getCurrentXdsProject(String projectNatureId) { + IWorkbenchWindow w = PlatformUI.getWorkbench().getActiveWorkbenchWindow(); + IWorkbenchPage page = (w != null) ? w.getActivePage() : null; + IProject ipr = null; + if (page != null) { + // Search in selection set: + ISelection selection = page.getSelection(); + if (selection instanceof IStructuredSelection) { + IStructuredSelection ss = (IStructuredSelection)selection; + if (!ss.isEmpty()) { + Object obj = ss.getFirstElement(); + if (obj instanceof IProject) { + ipr = (IProject)obj; + } else if (obj instanceof IResource) { + ipr = ((IResource)obj).getProject(); + } + } + } + if (!isXdsProject(ipr, projectNatureId)) { + // No selections in the XDS project. May be current file is from XDS? : + IEditorPart part = page.getActiveEditor(); + if (part != null) { + IEditorInput input = part.getEditorInput(); + if (input != null) { + IFile ifile = (IFile) input.getAdapter(IFile.class); + if (ifile != null) { + ipr = ifile.getProject(); + } + } + } + } + } + return isXdsProject(ipr, projectNatureId) ? ipr : null; + } + + public static IWorkbenchWindow[] getWorkbenchWindows() { + IWorkbench workbench = PlatformUI.getWorkbench(); + return workbench.getWorkbenchWindows(); + } + + public static IWorkbench getWorkbench() { + return PlatformUI.getWorkbench(); + } + + public static IViewPart showView(String viewId) { + IViewPart viewPart = null; + IWorkbenchPage page = getActivePage(); + if (page != null) { + try { + viewPart = page.showView(viewId); + } catch (PartInitException e) { + LogHelper.logError(e); + } + } + return viewPart; + } + + // Returns false when no XDS or null + private static boolean isXdsProject(IProject prj, String projectNatureId) { + try { + return prj != null && prj.isOpen() && prj.getNature(projectNatureId) != null; + } catch (CoreException e) { + LogHelper.logError(e); + } + return false; + } + + /** + * Opens property page corresponding to the {@code element} + * @param shellProvider + * @param element element to open property page for + */ + public static void openProperties(IShellProvider shellProvider, final Object element) { + PropertyDialogAction action = new PropertyDialogAction( shellProvider, new ISelectionProvider() { + + public void addSelectionChangedListener( ISelectionChangedListener listener ) { + } + + public ISelection getSelection() { + return new StructuredSelection( element ); + } + + public void removeSelectionChangedListener( ISelectionChangedListener listener ) { + } + + public void setSelection( ISelection selection ) { + } + } ); + try{ + action.run(); + } + finally{ + action.dispose(); + } + } + + private WorkbenchUtils() { + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/XStyledString.java b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/XStyledString.java new file mode 100644 index 0000000..162d764 --- /dev/null +++ b/product/com.excelsior.xds.ui.commons/src/com/excelsior/xds/ui/commons/utils/XStyledString.java @@ -0,0 +1,188 @@ +package com.excelsior.xds.ui.commons.utils; + +import java.util.ArrayList; + +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.viewers.StyledString; +import org.eclipse.jface.viewers.StyledString.Styler; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyleRange; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.FontData; +import org.eclipse.swt.graphics.GlyphMetrics; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.graphics.TextStyle; + +import com.excelsior.xds.ui.commons.swt.resources.ResourceRegistry; + +/** + * Universal container for text and its style ranges + * + * Used in hovers, requires StyledText.addPaintObjectListener() to paint images + * in StyledText when it is need. + */ +public class XStyledString { + private StringBuilder sb = new StringBuilder(); + private ArrayList srarr = new ArrayList(); + private Object userData; + private int usedStyles = 0; + + private final ResourceRegistry resourceRegistry; + + public XStyledString(ResourceRegistry resourceRegistry) { + this.resourceRegistry = resourceRegistry; + } + + public void append(String s) { + sb.append(s); + } + + public void append(String s, int style) { + StyleRange sr = mkSRange(s, null, style); + sb.append(s); + srarr.add(sr); + } + + public void append(String s, Color fgColor) { + StyleRange sr = mkSRange(s, fgColor, SWT.NORMAL); + sr.foreground = fgColor; + sb.append(s); + srarr.add(sr); + } + + public void append(String s, Color fgColor, int style) { + StyleRange sr = mkSRange(s, fgColor, style); + sb.append(s); + srarr.add(sr); + } + + public void append(Image im) { + StyleRange sr = mkSRange(" ", null, SWT.NORMAL); + sr.data = im; + Rectangle rect = im.getBounds(); + sr.metrics = new GlyphMetrics(rect.height, 0, rect.width); + sb.append(" "); + srarr.add(sr); + } + + public void append(XStyledString ss) { + int shift = sb.length(); + for (StyleRange sr : ss.getStyleRanges()) { + sr.start += shift; + srarr.add(sr); + } + sb.append(ss.getText()); + } + + public String getText() { + return sb.toString(); + } + + /** + * + * @return style ranges. User may change settings inside ranges, it will affect on the string + */ + public ArrayList getStyleRanges() { + return srarr; + } + + public void setUserData(Object data) { + userData = data; + } + + public Object getUserData() { + return userData; + } + + public StyledString convertToStyledString(final Font font) { + Font italicFontF = null; + Font boldFontF = null; + Font boldItalicFontF = null; + + if ((usedStyles & (SWT.BOLD | SWT.ITALIC)) == SWT.ITALIC) { + if (italicFontF == null) { + FontData[] data= font.getFontData(); + for (int i= 0; i < data.length; i++) { + data[i].setStyle(SWT.ITALIC); + } + italicFontF = resourceRegistry.createFont(data); + } + } else if ((usedStyles & (SWT.BOLD | SWT.ITALIC)) == SWT.BOLD) { + if (boldFontF == null) { + FontData[] data= font.getFontData(); + for (int i= 0; i < data.length; i++) { + data[i].setStyle(SWT.BOLD); + } + boldFontF = resourceRegistry.createFont(data); + } + } else if ((usedStyles & (SWT.BOLD | SWT.ITALIC)) == (SWT.BOLD | SWT.ITALIC)) { + if (boldItalicFontF == null) { + FontData[] data= font.getFontData(); + for (int i= 0; i < data.length; i++) { + data[i].setStyle(SWT.BOLD | SWT.ITALIC); + } + boldItalicFontF = resourceRegistry.createFont(data); + } + } + + + StyledString ss = new StyledString(); + int pos = 0; + for (StyleRange sr : srarr) { + if (sr.start > pos) { + ss.append(sb.substring(pos, sr.start)); + pos = sr.start; + } + final StyleRange srF = sr; + final Font italicFont1 = italicFontF; + final Font boldFont1 = boldFontF; + final Font boldItalicFont1 = boldItalicFontF; + + ss.append(sb.substring(sr.start, sr.start + sr.length), new Styler() { + @Override + public void applyStyles(TextStyle textStyle) { + if ((srF.fontStyle & (SWT.BOLD | SWT.ITALIC)) == SWT.BOLD) { + textStyle.font = boldFont1; + } else if ((srF.fontStyle & (SWT.BOLD | SWT.ITALIC)) == SWT.ITALIC) { + textStyle.font = italicFont1; + } else if ((srF.fontStyle & (SWT.BOLD | SWT.ITALIC)) == (SWT.BOLD | SWT.ITALIC)) { + textStyle.font = boldItalicFont1; + } + if (srF.foreground != null) { + textStyle.foreground = srF.foreground; + } + if (srF.metrics != null) { + textStyle.metrics = srF.metrics; + } + if (srF.data != null) { + textStyle.data = srF.data; + } + textStyle.underline = srF.underline; + textStyle.strikeout = srF.strikeout; + textStyle.borderStyle = srF.borderStyle; + textStyle.borderColor = srF.borderColor; + } + }); + pos = ss.length(); + } + if (pos < sb.length()) { + ss.append(sb.substring(pos)); + } + return ss; + } + + private StyleRange mkSRange(String s, Color fgColor, int style) { + //NOTE: new used attributes in StyleRange must be reconcoled in convertToStyledString() + StyleRange sr = new StyleRange(); + sr.start = sb.length(); + sr.length = s.length(); + sr.foreground = fgColor; + sr.fontStyle = (style & (SWT.BOLD | SWT.ITALIC)); + sr.underline = (style & TextAttribute.UNDERLINE) != 0; + sr.strikeout = (style & TextAttribute.STRIKETHROUGH) != 0; + usedStyles |= style; + return sr; + } +} diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.classpath b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.project b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.project new file mode 100644 index 0000000..3a11c50 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.debugger.ce.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..bc00fd5 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.ui.debugger.ce.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.ui.debugger.ce;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-Vendor: Excelsior LLC diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/build.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/build.properties new file mode 100644 index 0000000..89d57f2 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment_ru.properties,\ + plugin_ru.properties,\ + fragment.properties diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment.properties new file mode 100644 index 0000000..9837bad --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.debugger.ce Russian NLS Support diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..55316f0 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.ui.debugger.ce diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..df2361a --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.ui.debugger.ce diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..d563712 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru.properties @@ -0,0 +1,3 @@ +pluginName=\u0418\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0434\u043b\u044f \u043e\u0442\u043b\u0430\u0434\u0447\u0438\u043a\u0430 +common.xdsM2Application = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 +launchConfigurationTabGroups.createDbgConfig = \u0421\u043e\u0437\u0434\u0430\u0439\u0442\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u043e\u0442\u043b\u0430\u0434\u043a\u0438. \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..eec5fd3 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,3 @@ +pluginName=Èíòåðôåéñ ïîëüçîâàòåëÿ äëÿ îòëàä÷èêà XDS Ìîäóëà-2 ïðîãðàìì +common.xdsM2Application = XDS Ìîäóëà-2 ïðîãðàììà +launchConfigurationTabGroups.createDbgConfig = Ñîçäàéòå êîíôèãóðàöèþ äëÿ çàïóñêà Ìîäóëà-2 ïðîãðàììû â ðåæèìå îòëàäêè. \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.debugger.ce.nl_ru/src/.empty b/product/com.excelsior.xds.ui.debugger.ce.nl_ru/src/.empty new file mode 100644 index 0000000..e69de29 diff --git a/product/com.excelsior.xds.ui.debugger.ce/.classpath b/product/com.excelsior.xds.ui.debugger.ce/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.debugger.ce/.project b/product/com.excelsior.xds.ui.debugger.ce/.project new file mode 100644 index 0000000..9237885 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.debugger.ce + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.debugger.ce/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.debugger.ce/META-INF/MANIFEST.MF new file mode 100644 index 0000000..c639a21 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.ui.debugger.ce;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ui.debugger.ce.internal.DebuggerUiCePlugin +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + com.excelsior.xds.ui;bundle-version="1.7.0", + com.excelsior.xds.core, + org.eclipse.debug.ui, + com.excelsior.xds.core.model;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Bundle-Vendor: Excelsior LLC diff --git a/product/com.excelsior.xds.ui.debugger.ce/build.properties b/product/com.excelsior.xds.ui.debugger.ce/build.properties new file mode 100644 index 0000000..bef8e62 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ + icons/ diff --git a/product/com.excelsior.xds.ui.debugger.ce/icons/xds16x16.gif b/product/com.excelsior.xds.ui.debugger.ce/icons/xds16x16.gif new file mode 100644 index 0000000..fe7c62c Binary files /dev/null and b/product/com.excelsior.xds.ui.debugger.ce/icons/xds16x16.gif differ diff --git a/product/com.excelsior.xds.ui.debugger.ce/plugin.properties b/product/com.excelsior.xds.ui.debugger.ce/plugin.properties new file mode 100644 index 0000000..f037a6c --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/plugin.properties @@ -0,0 +1,3 @@ +pluginName=XDS Modula-2 Debugger UI for the Community Edition debugger +common.xdsM2Application = XDS Modula-2 Application +launchConfigurationTabGroups.createDbgConfig = Create a configuration to launch Modula-2 application in debug mode. \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.debugger.ce/plugin.xml b/product/com.excelsior.xds.ui.debugger.ce/plugin.xml new file mode 100644 index 0000000..6b6b1aa --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/plugin.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/DebuggerUiCePlugin.java b/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/DebuggerUiCePlugin.java new file mode 100644 index 0000000..a1f2997 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/DebuggerUiCePlugin.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.debugger.ce.internal; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class DebuggerUiCePlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.ui.debugger.ce"; //$NON-NLS-1$ + + // The shared instance + private static DebuggerUiCePlugin plugin; + + /** + * The constructor + */ + public DebuggerUiCePlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static DebuggerUiCePlugin getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/launch/DebugModulaLaunchShortcut.java b/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/launch/DebugModulaLaunchShortcut.java new file mode 100644 index 0000000..978e6a9 --- /dev/null +++ b/product/com.excelsior.xds.ui.debugger.ce/src/com/excelsior/xds/ui/debugger/ce/internal/launch/DebugModulaLaunchShortcut.java @@ -0,0 +1,6 @@ +package com.excelsior.xds.ui.debugger.ce.internal.launch; + +import com.excelsior.xds.ui.launcher.LaunchShortcut; + +public class DebugModulaLaunchShortcut extends LaunchShortcut { +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/.classpath b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/.project b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.project new file mode 100644 index 0000000..b21a56d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor.commons.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/.settings/org.eclipse.jdt.core.prefs b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..295926d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor.commons.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..b51e000 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.ui.editor.commons.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.ui.editor.commons;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/build.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/build.properties new file mode 100644 index 0000000..192c037 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment.properties,\ + fragment_ru.properties,\ + plugin_ru.properties + diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment.properties new file mode 100644 index 0000000..5966e0a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.editor.commons Russian NLS Support diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..0747a42 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.ui.editor.commons diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..4dee9ff --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.ui.editor.commons diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..7205c51 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru.properties @@ -0,0 +1,8 @@ +pluginName=\u041e\u0431\u0449\u0430\u044f \u0424\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u0432 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c + +preferencePages.syntaxColoring = \u0420\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 +preferencePages.indentGuide = \u041e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 + +#--- Menus --- +menu.Source.label = \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 +menu.Source.mnemonic = \u0418 \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..f5f5b85 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,8 @@ +pluginName=Îáùàÿ Ôóíêöèîíàëüíîñòü Ðåäàêòîðîâ XDS Ìîäóëà-2 ïðîãðàìì + +preferencePages.syntaxColoring = Ðàñêðàñêà ñèíòàêñèñà +preferencePages.indentGuide = Îðèåíòèðû îòñòóïîâ + +#--- Menus --- +menu.Source.label = Èñõîäíûé êîä +menu.Source.mnemonic = È \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru.properties new file mode 100644 index 0000000..8cefe5b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru.properties @@ -0,0 +1,25 @@ +UpdateIndentGuides=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 + +IndentGuidePreferencePage_pageDesc=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u0442\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u043e\u0432 \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432. +IndentGuidePreferencePage_EnableIndentGuide=\u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0442\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043e\u0440\u0438\u0435\u043d\u0442\u0438\u0440\u044b \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 +IndentGuidePreferencePage_LineAttributes=\u0412\u0438\u0434 \u043b\u0438\u043d\u0438\u0439 +IndentGuidePreferencePage_Alpha_0_255=\u041d\u0435\u043f\u0440\u043e\u0437\u0440\u0430\u0447\u043d\u043e\u0441\u0442\u044c (\u043e\u0442 0 \u0434\u043e 255) +IndentGuidePreferencePage_Color=\u0426\u0432\u0435\u0442 +IndentGuidePreferencePage_SOLID=\u0441\u043f\u043b\u043e\u0448\u043d\u043e\u0439 +IndentGuidePreferencePage_DASH=\u0448\u0442\u0440\u0438\u0445\u0438 +IndentGuidePreferencePage_DASHDOT=\u0448\u0442\u0440\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 \u0442\u043e\u0447\u043a\u0443 +IndentGuidePreferencePage_DASHDOTDOT=\u0448\u0442\u0440\u0438\u0445 \u0447\u0435\u0440\u0435\u0437 2 \u0442\u043e\u0447\u043a\u0438 +IndentGuidePreferencePage_DOT=\u0442\u043e\u0447\u043a\u0438 +IndentGuidePreferencePage_Shift_1_8=\u0421\u043c\u0435\u0449\u0435\u043d\u0438\u0435 (\u043e\u0442 0 \u0434\u043e 8 \u0442\u043e\u0447\u0435\u043a) +IndentGuidePreferencePage_Style=\u0421\u0442\u0438\u043b\u044c +IndentGuidePreferencePage_Width_1_8=\u0428\u0438\u0440\u0438\u043d\u0430 (\u043e\u0442 1 \u0434\u043e 8 \u0442\u043e\u0447\u0435\u043a) + +SyntaxColoringPreferencePage_Bold=\u041f\u043e\u043b\u0443\u0436\u0438\u0440\u043d\u044b\u0439 +SyntaxColoringPreferencePage_Color=\u0426\u0432\u0435\u0442 +SyntaxColoringPreferencePage_Element=\u042d\u043b\u0435\u043c\u0435\u043d\u0442 +SyntaxColoringPreferencePage_Enable=\u0412\u043a\u043b\u044e\u0447\u0438\u0442\u044c +SyntaxColoringPreferencePage_Italic=\u041a\u0443\u0440\u0441\u0438\u0432 +SyntaxColoringPreferencePage_LinkHrefsDescription=\u0428\u0440\u0438\u0444\u0442 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438 \u0446\u0432\u0435\u0442 \u0444\u043e\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 '\u0426\u0432\u0435\u0442\u0430 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b'. +SyntaxColoringPreferencePage_Preview=\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 +SyntaxColoringPreferencePage_Strikethrough=\u041f\u0435\u0440\u0435\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 +SyntaxColoringPreferencePage_Underline=\u041f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044b\u0439 \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..a113e1c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons.nl_ru/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages_ru_1251.properties @@ -0,0 +1,25 @@ +UpdateIndentGuides=Îáíîâëåíèå âåðòèêàëüíûõ îðèåíòèðîâ îòñòóïîâ + +IndentGuidePreferencePage_pageDesc=Íàñòðîéòå îòîáðàæåíèå âåðòèêàëüíûõ îðèåíòèðîâ îòñòóïîâ. +IndentGuidePreferencePage_EnableIndentGuide=Ïîêàçûâàòü âåðòèêàëüíûå îðèåíòèðû îòñòóïîâ +IndentGuidePreferencePage_LineAttributes=Âèä ëèíèé +IndentGuidePreferencePage_Alpha_0_255=Íåïðîçðà÷íîñòü (îò 0 äî 255) +IndentGuidePreferencePage_Color=Öâåò +IndentGuidePreferencePage_SOLID=ñïëîøíîé +IndentGuidePreferencePage_DASH=øòðèõè +IndentGuidePreferencePage_DASHDOT=øòðèõ ÷åðåç òî÷êó +IndentGuidePreferencePage_DASHDOTDOT=øòðèõ ÷åðåç 2 òî÷êè +IndentGuidePreferencePage_DOT=òî÷êè +IndentGuidePreferencePage_Shift_1_8=Ñìåùåíèå (îò 0 äî 8 òî÷åê) +IndentGuidePreferencePage_Style=Ñòèëü +IndentGuidePreferencePage_Width_1_8=Øèðèíà (îò 1 äî 8 òî÷åê) + +SyntaxColoringPreferencePage_Bold=Ïîëóæèðíûé +SyntaxColoringPreferencePage_Color=Öâåò +SyntaxColoringPreferencePage_Element=Ýëåìåíò +SyntaxColoringPreferencePage_Enable=Âêëþ÷èòü +SyntaxColoringPreferencePage_Italic=Êóðñèâ +SyntaxColoringPreferencePage_LinkHrefsDescription=Øðèôò òåêñòà è öâåò ôîíà íàñòðàèâàþòñÿ íà ñòðàíèöå 'Öâåòà è øðèôòû'. +SyntaxColoringPreferencePage_Preview=Ïðåäâàðèòåëüíûé ïðîñìîòð +SyntaxColoringPreferencePage_Strikethrough=Ïåðå÷åðêíóòûé +SyntaxColoringPreferencePage_Underline=Ïîä÷åðêíóòûé diff --git a/product/com.excelsior.xds.ui.editor.commons/.classpath b/product/com.excelsior.xds.ui.editor.commons/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.commons/.project b/product/com.excelsior.xds.ui.editor.commons/.project new file mode 100644 index 0000000..1cd50dc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor.commons + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor.commons/.settings/org.eclipse.jdt.core.prefs b/product/com.excelsior.xds.ui.editor.commons/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..295926d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,7 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 +org.eclipse.jdt.core.compiler.compliance=1.8 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.8 diff --git a/product/com.excelsior.xds.ui.editor.commons/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor.commons/META-INF/MANIFEST.MF new file mode 100644 index 0000000..e37b9bf --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/META-INF/MANIFEST.MF @@ -0,0 +1,37 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.ui.editor.commons;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ui.editor.commons.plugin.EditorCommonsPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.jface.text, + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + org.eclipse.core.resources, + org.eclipse.debug.core, + org.ini4j, + org.eclipse.ui.editors, + com.excelsior.xds.core.ide;bundle-version="1.7.0", + com.excelsior.xds.parser;bundle-version="1.7.0", + org.apache.commons.collections, + com.excelsior.xds.ui, + org.apache.commons.io, + org.eclipse.core.filesystem;bundle-version="1.4.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Export-Package: com.excelsior.xds.ui.editor.commons, + com.excelsior.xds.ui.editor.commons.annotations, + com.excelsior.xds.ui.editor.commons.commands, + com.excelsior.xds.ui.editor.commons.contentassist, + com.excelsior.xds.ui.editor.commons.debug, + com.excelsior.xds.ui.editor.commons.preferences, + com.excelsior.xds.ui.editor.commons.reconciler, + com.excelsior.xds.ui.editor.commons.ruler, + com.excelsior.xds.ui.editor.commons.scanner.jflex, + com.excelsior.xds.ui.editor.commons.scanner.rules, + com.excelsior.xds.ui.editor.commons.template, + com.excelsior.xds.ui.editor.commons.text diff --git a/product/com.excelsior.xds.ui.editor.commons/build.properties b/product/com.excelsior.xds.ui.editor.commons/build.properties new file mode 100644 index 0000000..308ebe6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties + diff --git a/product/com.excelsior.xds.ui.editor.commons/plugin.properties b/product/com.excelsior.xds.ui.editor.commons/plugin.properties new file mode 100644 index 0000000..7e02197 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/plugin.properties @@ -0,0 +1,8 @@ +pluginName=XDS Modula-2 Editors Commons + +preferencePages.indentGuide = Indent Guides +preferencePages.syntaxColoring = Syntax Coloring + +#--- Menus --- +menu.Source.label = Source +menu.Source.mnemonic = S \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/plugin.xml b/product/com.excelsior.xds.ui.editor.commons/plugin.xml new file mode 100644 index 0000000..e8cf634 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/plugin.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.commons/schema/lineNumberColumnPainter.exsd b/product/com.excelsior.xds.ui.editor.commons/schema/lineNumberColumnPainter.exsd new file mode 100644 index 0000000..e0b9477 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/schema/lineNumberColumnPainter.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/product/com.excelsior.xds.ui.editor.commons/schema/syntaxColoringPreferences.exsd b/product/com.excelsior.xds.ui.editor.commons/schema/syntaxColoringPreferences.exsd new file mode 100644 index 0000000..2a57fbf --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/schema/syntaxColoringPreferences.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/AbstractSourceViewerConfiguration.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/AbstractSourceViewerConfiguration.java new file mode 100644 index 0000000..874bb62 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/AbstractSourceViewerConfiguration.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.ui.editors.text.TextSourceViewerConfiguration; + +public abstract class AbstractSourceViewerConfiguration extends + TextSourceViewerConfiguration { + + public AbstractSourceViewerConfiguration() { + super(); + } + + public AbstractSourceViewerConfiguration(IPreferenceStore preferenceStore) { + super(preferenceStore); + } + + /** + * Called in {@link SourceCodeTextEditor#refreshConfiguration()}.
+ * Hook to refresh configuration, used for example to re-create cached {@link org.eclipse.swt.graphics.Color} or other SWT resources. + */ + public abstract void refresh(); +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInfoWithText.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInfoWithText.java new file mode 100644 index 0000000..de27768 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInfoWithText.java @@ -0,0 +1,112 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.PaintObjectEvent; +import org.eclipse.swt.custom.PaintObjectListener; +import org.eclipse.swt.custom.StyleRange; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Shell; + +import com.excelsior.xds.ui.commons.utils.XStyledString; + +public class HoverInfoWithText implements IHoverInfo { + + // ---------- Hover data: + + private final XStyledString xsString; + private boolean monospace; + private int itemOffset; // -1 or position of the hovered item in the hover text. Used + // to scroll hover content to make it visible + + public HoverInfoWithText(XStyledString xsString, boolean monospace) { + this(xsString, monospace, -1); + } + + public HoverInfoWithText(XStyledString xsString, boolean monospace, int itemOffset) { + this.xsString = xsString; + this.monospace = monospace; + this.itemOffset = itemOffset; + } + + // ---------- Hover painting and functionality: + + private StyledText fText; + private Composite fParent; + private HoverInformationControl fMIControl; + + @Override + public void deferredCreateContent(Composite parent, + HoverInformationControl miControl) { + this.fParent = parent; + this.fMIControl = miControl; + + fText = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY + | fMIControl.getAdditionalTextStyles()); + fText.setForeground(parent.getForeground()); + fText.setBackground(parent.getBackground()); + fText.setFont(JFaceResources.getDialogFont()); + fText.addPaintObjectListener(new PaintObjectListener() { + public void paintObject(PaintObjectEvent event) { + StyleRange style = event.style; + Image image = (Image) style.data; + if (image != null && !image.isDisposed()) { + int x = event.x + 2; + int y = event.y + event.ascent / 2 - style.metrics.ascent + / 2 + 2; + event.gc.drawImage(image, x, y); + } + } + }); + FillLayout layout = new FillLayout(); + layout.marginHeight = 2; + layout.marginWidth = 2; + parent.setLayout(layout); + + if (monospace) { + fText.setFont(JFaceResources.getTextFont()); + } else { + fText.setFont(JFaceResources.getDialogFont()); + } + + fText.setText(xsString.getText()); + fText.setStyleRanges(xsString.getStyleRanges().toArray(new StyleRange[0])); + + parent.layout(true); + } + + @Override + public void setVisible(boolean visible) { + if (visible) { + if (fText != null) { + if( fText.getWordWrap()) { + Shell shell = fParent.getShell(); + Point currentSize = shell.getSize(); + shell.pack(true); + Point newSize = shell.getSize(); + if (newSize.x > currentSize.x || newSize.y > currentSize.y) { + shell.setSize(currentSize.x, currentSize.y); // restore + // previous + // size + } + } + // Scroll fText to make line with hovered object visible + if (itemOffset >= 0) { + int topIdx = fText.getTopIndex(); + int btmIdx = topIdx + fText.getSize().y / fText.getLineHeight(); + btmIdx = Math.max(btmIdx-1, 0); + + int line = fText.getLineAtOffset(itemOffset); + if (line > btmIdx) { + fText.setTopIndex(line - btmIdx); + } + } + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInformationControl.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInformationControl.java new file mode 100644 index 0000000..0c7d9be --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/HoverInformationControl.java @@ -0,0 +1,154 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.jface.action.ToolBarManager; +import org.eclipse.jface.text.AbstractInformationControl; +import org.eclipse.jface.text.IInformationControl; +import org.eclipse.jface.text.IInformationControlCreator; +import org.eclipse.jface.text.IInformationControlExtension2; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.commons.utils.SwtUtils; + +/** + * *FSA 16.09.13: + * Made from DefaultInformationControl.class + */ + + +public class HoverInformationControl extends AbstractInformationControl implements DisposeListener, IInformationControlExtension2 { + + private final int fAdditionalTextStyles; + private Composite fParent; + private IHoverInfo fInput; + + /** + * Creates a default information control with the given shell as parent. + * + * @param parent the parent shell + * @param statusFieldText the text to be used in the status field or null to hide the status field + */ + public HoverInformationControl(Shell parent, String statusFieldText) { + super(parent, statusFieldText); + fAdditionalTextStyles= SWT.NONE; + create(); + } + + /** + * Creates a resizable default information control with the given shell as + * parent. + * + * @param parent the parent shell + * @param toolBarManager the manager or null if toolbar is not desired + */ + private HoverInformationControl(Shell parent, ToolBarManager toolBarManager) { + super(parent, toolBarManager); + fAdditionalTextStyles= SWT.V_SCROLL | SWT.H_SCROLL; + create(); + } + + @Override + protected void createContent(Composite parent) { + fParent= parent; + } + + @Override + public void setInput(Object input) { + if (input instanceof IHoverInfo) { + fInput = (IHoverInfo)input; + fInput.deferredCreateContent(fParent, this); + } else { + LogHelper.logError(this.getClass().getName() + " setInput() : input is not instanceof IHoverInfo"); + } + } + + @Override + public void setVisible(boolean visible) { + if (fInput != null) { + fInput.setVisible(visible); + } + + if (!visible) { + Control[] children= fParent.getChildren(); + for (Control element : children) { + element.dispose(); + } + ToolBarManager toolBarManager= getToolBarManager(); + if (toolBarManager != null) { + toolBarManager.removeAll(); + } + } + + super.setVisible(visible); + } + + + @Override + public Point computeSizeHint() { + Point size = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT, true); + int wwidth = SwtUtils.getTextWidth(fParent, "W"); + size.x += wwidth * 5; // add some empty space around + size.y += wwidth * 2; + return size; + } + + @Override + public void setForegroundColor(Color foreground) { + super.setForegroundColor(foreground); + Control[] children= fParent.getChildren(); + for (Control element : children) { + element.setForeground(foreground); + } + } + + @Override + public void setBackgroundColor(Color background) { + super.setBackgroundColor(background); + Control[] children= fParent.getChildren(); + for (Control element : children) { + element.setBackground(background); + } + } + + @Override + public boolean hasContents() { + return fInput != null; + } + + @Override + public void widgetDisposed(DisposeEvent event) { + } + + /* + * @see org.eclipse.jface.text.IInformationControlExtension5#getInformationPresenterControlCreator() + * @since 3.4 + */ + @Override + public IInformationControlCreator getInformationPresenterControlCreator() { + return new IInformationControlCreator() { + /* + * @see org.eclipse.jface.text.IInformationControlCreator#createInformationControl(org.eclipse.swt.widgets.Shell) + */ + public IInformationControl createInformationControl(Shell parent) { + return new HoverInformationControl(parent, (ToolBarManager) null); + } + }; + } + + /* -------------------- IHoverInfo calls if: --------------------------- */ + + public int getAdditionalTextStyles() { + return fAdditionalTextStyles; + } + + public Point getInfoSizeConstraints() { + return super.getSizeConstraints(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/IHoverInfo.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/IHoverInfo.java new file mode 100644 index 0000000..1335426 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/IHoverInfo.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.swt.widgets.Composite; + + +public interface IHoverInfo { + + public void deferredCreateContent(Composite parent, HoverInformationControl miControl); + + public void setVisible(boolean visible); + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ITokens.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ITokens.java new file mode 100644 index 0000000..ff986f2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ITokens.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.ui.editor.commons; + +public interface ITokens { + /** + * This coloring is 'default' (associated with plain text). It is used for + * elements with 'disabled' coloring + */ + PersistentTokenDescriptor getDefaultColoring(); + + + PersistentTokenDescriptor getToken(); + + String getCategoryName(); +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PartitionUtils.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PartitionUtils.java new file mode 100644 index 0000000..7f07ea4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PartitionUtils.java @@ -0,0 +1,100 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.BadPartitioningException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentExtension3; +import org.eclipse.jface.text.IDocumentPartitioner; +import org.eclipse.jface.text.IDocumentPartitioningListener; +import org.eclipse.jface.text.ITypedRegion; + +public class PartitionUtils { + + /** + * Returns the partitioner for the given partitioning or null if + * no partitioner is registered. + * + * @param document the document to be processed + * @param partitioningType the partitioning for which to set the partitioner + * @return the partitioner for the given partitioning + * + * @see org.eclipse.jface.text.IDocumentExtension3#getDocumentPartitioner(IDocument,String) + */ + public static IDocumentPartitioner getPartitioner( IDocument document + , String partitioningType ) + { + IDocumentPartitioner result = null; + if (document instanceof IDocumentExtension3) { + IDocumentExtension3 extension = (IDocumentExtension3) document; + result = extension.getDocumentPartitioner(partitioningType); + } else if (document != null){ + result = document.getDocumentPartitioner(); + } + return result; + } + + + /** + * Sets document's partitioner. + * + * @param document the document to be processed + * @param partitioningType the partitioning for which to set the partitioner + * @param partitioner the document's new partitioner + * + * @see org.eclipse.jface.text.IDocumentExtension3#setDocumentPartitioner(IDocument,String,IDocumentPartitioner) + * @see IDocumentPartitioningListener + */ + public static void setDocumentPartitioning( IDocument document + , String partitioningType + , IDocumentPartitioner partitioner ) + { + // Setting the partitioner will trigger a partitionChanged listener that + // will attempt to use the partitioner to initialize the document's + // partitions. Therefore, need to connect first. + partitioner.connect(document); + if (document instanceof IDocumentExtension3) { + IDocumentExtension3 extension3= (IDocumentExtension3) document; + extension3.setDocumentPartitioner(partitioningType, partitioner); + } else { + document.setDocumentPartitioner(partitioner); + } + } + + + /** + * Returns the document partition of the given partitioning in which the + * given offset is located. + * + * @param document the document to be processed + * @param partitioning the partitioning + * @param offset the document offset + * @param preferOpenPartitions true if precedence should be + * given to a open partition ending at offset over a + * closed partition starting at offset + * @return a specification of the partition + * + * @see org.eclipse.jface.text.IDocumentExtension3#getPartition(IDocument,String,int,boolean) + */ + public static ITypedRegion getPartition( IDocument document + , String partitioningType + , int offset, boolean preferOpenPartition ) + { + ITypedRegion region = null; + try { + if (document instanceof IDocumentExtension3) { + IDocumentExtension3 extension = (IDocumentExtension3) document; + try { + region = extension.getPartition(partitioningType, offset, true); + } catch (BadPartitioningException e) { + // Log the error. + } + } else { + region = document.getPartition(offset); + } + } catch (BadLocationException e) { + // Log the error. + } + return region; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PersistentTokenDescriptor.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PersistentTokenDescriptor.java new file mode 100644 index 0000000..fa67489 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/PersistentTokenDescriptor.java @@ -0,0 +1,138 @@ +package com.excelsior.xds.ui.editor.commons; + +import java.util.List; + +import org.eclipse.jface.resource.StringConverter; +import org.eclipse.swt.graphics.RGB; +import org.ini4j.Config; +import org.ini4j.Ini; + +import com.excelsior.xds.ui.commons.syntaxcolor.TextAttributeDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; + +/** + * TextAttributeToken which stores its data in persistence store. + */ +public class PersistentTokenDescriptor extends TokenDescriptor { + + private final String id; + private final String colorId; + private final String styleId; + private final String disabledId; + + private int styleWhenEnabled; + private boolean isDisabled; + private RGB rgbWhenEnabled; + private ITokens iTokens; + + /** + * + * @param name - human-readable name (with localization) + * @param id - unique id for IPreferenceStore key + * @param rgb - color + * @param style - style + * @param iTokens - tokens set to ask for 'default' color for disabled elements (or null when element cat't be + * disabled) + */ + public PersistentTokenDescriptor( String name, String id + , RGB rgb, int style + , ITokens iTokens) + { + super(name, rgb, style); // default values + this.id = id; + + colorId = id + ".COLOR"; //$NON-NLS-1$ + styleId = id + ".STYLE"; //$NON-NLS-1$ + disabledId = id + ".IS_DISABLED"; //$NON-NLS-1$ + + isDisabled = false; + rgbWhenEnabled = rgb; + styleWhenEnabled = style; + this.iTokens = iTokens; + } + + public void setDisabled(boolean isDisabled) { + this.isDisabled = isDisabled; + } + + public PersistentTokenDescriptor( PersistentTokenDescriptor other){ + this(other.getName(), other.getId(), other.getDefaultRgb(), other.getDefaultStyle(), other.iTokens); + } + + public String getId() { + return id; + } + + public String getColorId() { + return colorId; + } + + public String getStyleId() { + return styleId; + } + + public String getDisabledId() { + return disabledId; + } + + public boolean mayBeDisabled() { + return iTokens != null; + } + + public boolean isDisabled() { + return isDisabled && iTokens != null; + } + + public int getStyleWhenEnabled() { + return styleWhenEnabled; + } + + public RGB getRgbWhenEnabled() { + return rgbWhenEnabled; + } + + + public void preferenciesToIni(List al, int style, boolean isDisabled, RGB rgb) { + al.add(styleId + "=" + style); //$NON-NLS-1$ + al.add(disabledId + "=" + (isDisabled ? "1" : "0")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + al.add(colorId + "=" + StringConverter.asString(rgb)); //$NON-NLS-1$ + } + + + public void preferenciesToIni(List al) { + preferenciesToIni(al, getStyleWhenEnabled(), isDisabled(), getRgbWhenEnabled()); + } + + public void preferenciesFromIni(Ini ini) { + String s = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME, styleId); + if (s != null) { + styleWhenEnabled = Integer.parseInt(s); + } else { + styleWhenEnabled = getDefaultStyle(); + } + + s = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME, disabledId); + if (s != null) { + isDisabled = (Integer.parseInt(s) != 0); + } else { + isDisabled = false; + } + + s = ini.get(Config.DEFAULT_GLOBAL_SECTION_NAME, colorId); + if (s != null) { + rgbWhenEnabled = StringConverter.asRGB(s, getDefaultRgb()); + } else { + rgbWhenEnabled = getDefaultRgb(); + } + + if (isDisabled && iTokens != null) { + PersistentTokenDescriptor pt = iTokens.getDefaultColoring(); + TextAttributeDescriptor ta = pt.getTextAttribute(); + if (ta != null) { + setTextAttribute(new TextAttributeDescriptor(ta.getForeground(), null, ta.getStyle())); + } + } else { + setTextAttribute(new TextAttributeDescriptor(rgbWhenEnabled, null, styleWhenEnabled)); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/RgbStyle.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/RgbStyle.java new file mode 100644 index 0000000..b7b4260 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/RgbStyle.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.ui.editor.commons; + +import org.eclipse.swt.graphics.RGB; + +public class RgbStyle { + public RgbStyle(RGB rgb, int style) { + this.rgb = rgb; + this.style = style; + } + public final RGB rgb; + public final int style; +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/SourceCodeTextEditor.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/SourceCodeTextEditor.java new file mode 100644 index 0000000..6ea41aa --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/SourceCodeTextEditor.java @@ -0,0 +1,357 @@ +package com.excelsior.xds.ui.editor.commons; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.jface.text.DocumentEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentListener; +import org.eclipse.jface.text.ITextInputListener; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.jface.text.source.IAnnotationAccess; +import org.eclipse.jface.text.source.IAnnotationAccessExtension; +import org.eclipse.jface.text.source.IChangeRulerColumn; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.jface.text.source.IVerticalRulerColumn; +import org.eclipse.jface.text.source.LineNumberChangeRulerColumn; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.jface.text.source.SourceViewerConfiguration; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IEditorReference; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.editors.text.TextEditor; +import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; +import org.eclipse.ui.texteditor.MarkerAnnotation; + +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.marker.XdsMarkerConstants; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.core.utils.time.ModificationStamp; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.editor.model.EditorDocumentCache; +import com.excelsior.xds.ui.editor.commons.annotations.IAnnotationPaintHandler; +import com.excelsior.xds.ui.editor.commons.internal.modula.ruler.LineNumberColumnPainterRegistry; +import com.excelsior.xds.ui.editor.commons.ruler.IRulerPainter; +import com.excelsior.xds.ui.editor.commons.text.IndentGuidesModel; +import com.excelsior.xds.ui.editor.commons.text.IndentGuidesPainter; +import com.excelsior.xds.ui.editor.commons.text.PairedBracketsMatcher; + + +/** + * Source code specific text editor. + * + * @author lion + */ +public abstract class SourceCodeTextEditor extends TextEditor +{ + protected AbstractSourceViewerConfiguration configuration; + private final IDocumentListener documentListener = new DocumentListener(); + + private final List annotationPaintHandlers = new ArrayList(); + private boolean isDisposed; + + /** + * Modification stamp of the document + */ + private ModificationStamp modificationStamp = ModificationStamp.OLDEST; + private final List rulerPainters; + private IPreferenceChangeListener corePluginPreferenceListener; + + public SourceCodeTextEditor() { + super(); + rulerPainters = LineNumberColumnPainterRegistry.get().contributions(); + + corePluginPreferenceListener = new IPreferenceChangeListener() { + @Override + public void preferenceChange(PreferenceChangeEvent event) { + String key = event.getKey(); + if (PreferenceKeys.PKEY_EXECUTABLE_SOURCE_CODE_COLOR.getKey().equals(key)) { + fLineNumberRulerColumn.redraw(); + } + } + }; + PreferenceKeys.addChangeListener(corePluginPreferenceListener); + } + + public SourceViewerConfiguration getConfiguration() { + return configuration; + } + + @Override + public void dispose() { + for (IAnnotationPaintHandler paintHandler : annotationPaintHandlers) { + paintHandler.dispose(); + } + super.dispose(); + isDisposed = true; + + if (key != null) { + EditorDocumentCache.instance().removeDocument(key); + SymbolModelManager.instance().scheduleParse(ParseTaskFactory.create(getEditorInput()), null); + } + PreferenceKeys.removeChangeListener(corePluginPreferenceListener); + } + + public boolean isDisposed() { + return isDisposed; + } + + protected void addAnnotationPaintHandler(IAnnotationPaintHandler handler) { + annotationPaintHandlers.add(handler); + } + + /** + * Mutex for the reconciler. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=63898 + * for a description of the problem. + *

+ * XXX remove once the underlying problem (https://bugs.eclipse.org/bugs/show_bug.cgi?id=66176) is solved. + *

+ */ + private final Object reconcilerLock = new Object(); + private DocumentEvent lastDocumentEvent; + private ParsedModuleKey key; + + /** + * Returns the mutex for the reconciler. See https://bugs.eclipse.org/bugs/show_bug.cgi?id=63898 + * for a description of the problem. + *

+ * XXX remove once the underlying problem (https://bugs.eclipse.org/bugs/show_bug.cgi?id=66176) is solved. + *

+ * @return the lock reconciler may use to synchronize on + */ + public Object getReconcilerLock() { + return reconcilerLock; + } + + /** + * Reloads the text editor source view configuration to refresh syntax coloring. + */ + public void refreshConfiguration() { + ISourceViewer isv = getSourceViewer(); + if (isv instanceof SourceViewer) { + SourceViewer sv = (SourceViewer)isv; + sv.unconfigure(); + configuration.refresh(); + sv.configure(configuration); + } + } + + /** + * Reloads the text editor source view configuration for all editors of given class. + */ + public static void refreshEditorsConfiguration(final Class editorClass) + { + Display.getDefault().asyncExec(() ->{ + IEditorReference editors[] = PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getActivePage().getEditorReferences(); + for (IEditorReference editorRef : editors) { + IEditorPart editorPart = editorRef.getEditor(false); + if (editorPart != null && editorClass.isInstance(editorPart)) { + ((SourceCodeTextEditor)editorPart).refreshConfiguration(); + } + } + }); + } + + @Override + protected IAnnotationAccess createAnnotationAccess() { + return new InternalMarkerAnnotationAccess(); + } + + /** + * Returns the end of line comment prefix to be used by the line-prefix operation. + * + * @return the end of line comment prefix or null if the end + * of line comment prefix operation should not be supported + */ + public String getEOLCommentPrefix() { + return null; + } + + /** + * Returns the instance of PairedBraceMatcher specific for this editor or + * null if the brace matching is not required. + * + * @return instance of PairedBraceMatcher or + * null if the brace matching is not required. + */ + protected PairedBracketsMatcher getPairedBraceMatcher() { + return null; + } + + /** + * Returns whether the vertical indent guides is supported by this editor. + * + * @return true if vertical indent guides is supported, false otherwise + */ + protected boolean isIndenGuidesSupported() { + return true; + } + + + /** + * {@inheritDoc} + */ + @Override + protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) { + final ISourceViewer viewer = super.createSourceViewer(parent, ruler, styles); + if (isIndenGuidesSupported()) { + IndentGuidesPainter.installToViewer(viewer, new IndentGuidesModel(this)); + } + + + viewer.addTextInputListener(new TextInputListener()); + + return viewer; + } + + @Override + public void createPartControl(Composite parent) { + super.createPartControl(parent); + initializeRulerPainters(); // sourceViewer needs to be initialized. + } + + private void initializeRulerPainters() { + for (IRulerPainter p : rulerPainters) { + p.setTextEditor(this); + } + } + + public boolean isSourceViewer(ITextViewer v) { + return v != null && v.equals(getSourceViewer()); + } + + public ModificationStamp getLastDocumentChangeModificationStamp() { + return modificationStamp; + } + + public DocumentEvent getLastDocumentEvent() { + return lastDocumentEvent; + } + + /** + * Listens for the SourceView`s document change. Initialize modificationStamp. + * + * @author lsa80 + */ + private final class TextInputListener implements ITextInputListener { + @Override + public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { + updateEditorDocumentCache(newInput);; + } + + @Override + public void inputDocumentAboutToBeChanged(IDocument oldInput, + IDocument newInput) { + if (oldInput != null) { + oldInput.removeDocumentListener(documentListener); + } + if (newInput != null) { + newInput.addDocumentListener(documentListener); + } + modificationStamp = ModificationStamp.OLDEST; + } + } + + private final class DocumentListener implements IDocumentListener { + @Override + public void documentChanged(DocumentEvent event) { + modificationStamp = new ModificationStamp(); + lastDocumentEvent = event; + + updateEditorDocumentCache(event.getDocument()); + } + + @Override + public void documentAboutToBeChanged(DocumentEvent event) { + } + } + + private void updateEditorDocumentCache(IDocument doc) { + if (key != null) { + EditorDocumentCache.instance().removeDocument(key); + } + key = CoreEditorUtils.editorInputToParsedModuleKey(getEditorInput()); + if (key != null) { + EditorDocumentCache.instance().addDocument(key, doc); + } + } + + private class InternalMarkerAnnotationAccess extends DefaultMarkerAnnotationAccess { + @Override + public void paint(Annotation annotation, GC gc, Canvas canvas, + Rectangle bounds) { + boolean isPaintRequestHandled = false; + for (IAnnotationPaintHandler annotationPaintHandler : annotationPaintHandlers) { + if (annotationPaintHandler.paint(SourceCodeTextEditor.this, annotation, gc, canvas, bounds)) { + isPaintRequestHandled = true; + break; + } + } + + if (!isPaintRequestHandled) { + super.paint(annotation, gc, canvas, bounds); + } + } + + @Override + public int getLayer(Annotation annotation) { + if (annotation instanceof MarkerAnnotation) { + MarkerAnnotation markerAnnotation = (MarkerAnnotation)annotation; + IMarker im = markerAnnotation.getMarker(); + try { + if (XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE.equals(im.getType()) && + im.getAttribute(XdsMarkerConstants.MARKER_GRAY_STATE, false)) + { + markerAnnotation.markDeleted(true); + return IAnnotationAccessExtension.DEFAULT_LAYER; // place gray markers under all other + } + } catch (Exception e) { // hz + } + } + return super.getLayer(annotation); + } + } // class InternalMarkerAnnotationAccess + + + @Override + protected IVerticalRulerColumn createLineNumberRulerColumn() { + fLineNumberRulerColumn= new LineNumberChangeRulerColumn(getSharedColors()){ + @Override + public void redraw() { + for (IRulerPainter p : rulerPainters) { + p.beforePaint(); + } + super.redraw(); + } + + @Override + protected void paintLine(int line, int y, int lineheight, GC gc, + Display display) { + boolean isPaintLine = true; + Rectangle r = new Rectangle(0, y, getWidth(), lineheight); + for (IRulerPainter p : rulerPainters) { + isPaintLine = isPaintLine && !p.paintLine(line, r, gc, display); + } + if (isPaintLine){ + super.paintLine(line, y, lineheight, gc, display); + } + } + }; + ((IChangeRulerColumn) fLineNumberRulerColumn).setHover(createChangeHover()); + initializeLineNumberRulerColumn(fLineNumberRulerColumn); + return fLineNumberRulerColumn; + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/IAnnotationPaintHandler.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/IAnnotationPaintHandler.java new file mode 100644 index 0000000..7e4a987 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/IAnnotationPaintHandler.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.ui.editor.commons.annotations; + +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; + +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; + +/** + * Used to custom-draw annotations in the editor + * @author lsa80 + */ +public interface IAnnotationPaintHandler { + boolean paint(SourceCodeTextEditor editor, Annotation annotation, GC gc, Canvas canvas, Rectangle bounds); + void dispose(); +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/MarkerAnnotationPaintHandler.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/MarkerAnnotationPaintHandler.java new file mode 100644 index 0000000..6645f34 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/annotations/MarkerAnnotationPaintHandler.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.ui.editor.commons.annotations; + +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.ui.texteditor.MarkerAnnotation; + +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; + +/** + * Use this annotation paint handler if you only interested in MarkerAnnotation annotations. + * @author lsa80 + */ +public abstract class MarkerAnnotationPaintHandler implements IAnnotationPaintHandler { + + @Override + public boolean paint(SourceCodeTextEditor editor, Annotation annotation, GC gc, Canvas canvas, Rectangle bounds) { + if (annotation instanceof MarkerAnnotation) { + return paint(editor, (MarkerAnnotation)annotation, gc, canvas, bounds); + } + return false; + } + + protected abstract boolean paint(SourceCodeTextEditor editor, MarkerAnnotation annotation, GC gc, Canvas canvas, Rectangle bounds); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/commands/ToggleCommentHandler.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/commands/ToggleCommentHandler.java new file mode 100644 index 0000000..bd9ad85 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/commands/ToggleCommentHandler.java @@ -0,0 +1,114 @@ +package com.excelsior.xds.ui.editor.commons.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.swt.custom.BusyIndicator; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.ITextEditorExtension; +import org.eclipse.ui.texteditor.ITextEditorExtension2; + +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; + +/** + * Command handler to toggle comment the selected lines. + * + * Comment is being toggled only for SourceViewerConfiguration which implements the method + * org.eclipse.jface.text.source.SourceViewerConfiguration#getDefaultPrefixes(org.eclipse.jface.text.source.ISourceViewer, java.lang.String) + * + * @author lion + */ +public class ToggleCommentHandler extends AbstractHandler +{ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + IDocument document = WorkbenchUtils.getActiveDocument(); + IEditorInput input = WorkbenchUtils.getActiveInput(); + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + + boolean isTextOperationAllowed = (selection != null) && (document != null) + && (input != null) && (editor != null) + && (editor instanceof SourceCodeTextEditor); + + if (isTextOperationAllowed) { + final ITextOperationTarget operationTarget = (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); + String commentPrefix = ((SourceCodeTextEditor)editor).getEOLCommentPrefix(); + isTextOperationAllowed = (operationTarget != null) + && (operationTarget instanceof TextViewer) + && (validateEditorInputState((ITextEditor)editor)) + && (commentPrefix != null); + + if ((isTextOperationAllowed)) { + final int operation = isSelectionCommented(document, selection, commentPrefix) + ? ITextOperationTarget.STRIP_PREFIX + : ITextOperationTarget.PREFIX; + + if (operationTarget.canDoOperation(operation)) { + BusyIndicator.showWhile(Display.getDefault(), new Runnable() { + public void run() { + // Really processed in TextViewer.doOperation: + operationTarget.doOperation(operation); + } + }); + } + } + } + + return null; + } + + + /** + * Checks and validates the editor's modifiable state. Returns true if an action + * can proceed modifying the editor's input, false if it should not. + * + *

If the editor implements ITextEditorExtension2, + * this method returns {@link ITextEditorExtension2#validateEditorInputState()};
else if the editor + * implements ITextEditorExtension, it returns {@link ITextEditorExtension#isEditorInputReadOnly()};
+ * else, {@link ITextEditor#isEditable()} is returned, or false if the editor is null.

+ * + *

There is only a difference to {@link #canModifyEditor()} if the editor implements + * ITextEditorExtension2.

+ * + * @return true if a modifying action can proceed to modify the underlying document, false otherwise + */ + protected boolean validateEditorInputState(ITextEditor editor) { + if (editor instanceof ITextEditorExtension2) + return ((ITextEditorExtension2) editor).validateEditorInputState(); + else if (editor instanceof ITextEditorExtension) + return !((ITextEditorExtension) editor).isEditorInputReadOnly(); + else if (editor != null) + return editor.isEditable(); + else + return false; + } + + + protected boolean isSelectionCommented(IDocument document, ITextSelection selection, String commentPrefix) + { + try { + for (int lineNum = selection.getStartLine(); lineNum <= selection.getEndLine(); ++lineNum) { + IRegion r = document.getLineInformation(lineNum); + String str = document.get(r.getOffset(), r.getLength()).trim(); + if (!str.startsWith(commentPrefix)) { + return false; + } + } + return true; + } catch (Exception x) { + } + + return false; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/BaseCompletionContext.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/BaseCompletionContext.java new file mode 100644 index 0000000..1341888 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/BaseCompletionContext.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.ui.editor.commons.contentassist; + +import org.eclipse.jface.text.ITextViewer; + +public class BaseCompletionContext { + protected final ITextViewer viewer; + protected final int offset; + + public BaseCompletionContext(ITextViewer viewer, int offset) { + this.viewer = viewer; + this.offset = offset; + } + + public ITextViewer getViewer() { + return viewer; + } + + public int getOffset() { + return offset; + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/EmptyCompletionProposal.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/EmptyCompletionProposal.java new file mode 100644 index 0000000..729d9d2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/EmptyCompletionProposal.java @@ -0,0 +1,100 @@ +package com.excelsior.xds.ui.editor.commons.contentassist; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension4; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; + +/** + * The empty proposal displayed if there is nothing else to show. + * + * @since 3.2 + */ +public final class EmptyCompletionProposal implements ICompletionProposal, ICompletionProposalExtension, ICompletionProposalExtension4 { + + private final String fDisplayString; + private final int fOffset; + private final Image image; + + public EmptyCompletionProposal(String fDisplayString, Image image, int fOffset) { + this.fDisplayString = fDisplayString; + this.fOffset = fOffset; + this.image = image; + } + + /* + * @see ICompletionProposal#apply(IDocument) + */ + public void apply(IDocument document) { + } + + /* + * @see ICompletionProposal#getSelection(IDocument) + */ + public Point getSelection(IDocument document) { + return new Point(fOffset, 0); + } + + /* + * @see ICompletionProposal#getContextInformation() + */ + public IContextInformation getContextInformation() { + return null; + } + + /* + * @see ICompletionProposal#getImage() + */ + public Image getImage() { + return image; + } + + /* + * @see ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + return fDisplayString; + } + + /* + * @see ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#apply(org.eclipse.jface.text.IDocument, char, int) + */ + public void apply(IDocument document, char trigger, int offset) { + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#isValidFor(org.eclipse.jface.text.IDocument, int) + */ + public boolean isValidFor(IDocument document, int offset) { + return false; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#getTriggerCharacters() + */ + public char[] getTriggerCharacters() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposalExtension#getContextInformationPosition() + */ + public int getContextInformationPosition() { + return -1; + } + + @Override + public boolean isAutoInsertable() { + return false; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/ICompletionContextUser.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/ICompletionContextUser.java new file mode 100644 index 0000000..7adf8db --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/ICompletionContextUser.java @@ -0,0 +1,7 @@ +package com.excelsior.xds.ui.editor.commons.contentassist; + +public interface ICompletionContextUser{ + + public void setCompletionContext(T context); + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/SourceCodeAssistProcessor.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/SourceCodeAssistProcessor.java new file mode 100644 index 0000000..8523f2f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/contentassist/SourceCodeAssistProcessor.java @@ -0,0 +1,89 @@ +package com.excelsior.xds.ui.editor.commons.contentassist; + +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.collections.CollectionUtils; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.contentassist.IContextInformationValidator; + +/** + * Content assist processor to suggest source code completions. + */ +public abstract class SourceCodeAssistProcessor implements IContentAssistProcessor { + + protected final List contentAssistProcessors; + protected final IContentAssistProcessor fastProcessor; + + /** + * @param fastProcessor null or processor to call w/o Ast. If it returns some result(s), + * the next processing is skipped + * @param contentAssistProcessors list of processors to call when Ast is ready (and was no + * results from fastProcessor) + */ + public SourceCodeAssistProcessor(IContentAssistProcessor fastProcessor, IContentAssistProcessor... contentAssistProcessors) { + this.fastProcessor = fastProcessor; + this.contentAssistProcessors = Arrays.asList(contentAssistProcessors); + } + + @SuppressWarnings("unchecked") + protected void doComputeFastCompletionProposals(T context, List completionProposals) { + if (fastProcessor != null) { + if (fastProcessor instanceof ICompletionContextUser) { + // 'context' here may be based on bad Ast + ((ICompletionContextUser)fastProcessor).setCompletionContext(context); + } + ICompletionProposal[] cp = fastProcessor.computeCompletionProposals(context.getViewer(), context.getOffset()); + CollectionUtils.addAll(completionProposals, cp); + } + } + + @SuppressWarnings("unchecked") + protected void doComputeCompletionProposals(T context, List completionProposals) { + for (IContentAssistProcessor contentAssistProcessor : contentAssistProcessors) { + if (contentAssistProcessor instanceof ICompletionContextUser) { + ((ICompletionContextUser)contentAssistProcessor).setCompletionContext(context); + } + ICompletionProposal[] cp = contentAssistProcessor.computeCompletionProposals(context.getViewer(), context.getOffset()); + CollectionUtils.addAll(completionProposals, cp); + } + } + + /** + * {@inheritDoc} + */ + public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset) { + return null; + } + + /** + * {@inheritDoc} + */ + public char[] getCompletionProposalAutoActivationCharacters() { + return null; + } + + /** + * {@inheritDoc} + */ + public char[] getContextInformationAutoActivationCharacters() { + return null; + } + + /** + * {@inheritDoc} + */ + public IContextInformationValidator getContextInformationValidator() { + return null; + } + + /** + * {@inheritDoc} + */ + public String getErrorMessage() { + return null; + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/debug/DebugCommons.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/debug/DebugCommons.java new file mode 100644 index 0000000..70892d3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/debug/DebugCommons.java @@ -0,0 +1,21 @@ +package com.excelsior.xds.ui.editor.commons.debug; + +import org.eclipse.core.resources.IProject; +import org.eclipse.debug.core.ILaunch; + +import com.excelsior.xds.core.utils.launch.LaunchConfigurationUtils; + +public final class DebugCommons { + /** + * Are any debugging sessions running for this {@link IProject} + * @param iProject + * @return + */ + public static boolean isProjectInDebug(IProject iProject) { + ILaunch launch = LaunchConfigurationUtils.getLaunch(iProject); + return launch != null && launch.getDebugTarget() != null && !launch.getDebugTarget().isTerminated(); + } + + private DebugCommons(){ + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/modula/ruler/LineNumberColumnPainterRegistry.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/modula/ruler/LineNumberColumnPainterRegistry.java new file mode 100644 index 0000000..83ab373 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/modula/ruler/LineNumberColumnPainterRegistry.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.ui.editor.commons.internal.modula.ruler; + +import com.excelsior.xds.core.extensionpoint.ExtensionRegistry; +import com.excelsior.xds.ui.editor.commons.plugin.EditorCommonsPlugin; +import com.excelsior.xds.ui.editor.commons.ruler.IRulerPainter; + +public class LineNumberColumnPainterRegistry extends ExtensionRegistry { + public static LineNumberColumnPainterRegistry get() { + return LineNumberColumnPainterRegistryHolder.instance; + } + + private static class LineNumberColumnPainterRegistryHolder { + static LineNumberColumnPainterRegistry instance = new LineNumberColumnPainterRegistry(EditorCommonsPlugin.PLUGIN_ID, "lineNumberColumnPainter", "class"); //$NON-NLS-1$ //$NON-NLS-2$ + static { + instance.contributions(); + } + } + + public LineNumberColumnPainterRegistry(String pluginId, + String extensionPointName, String executableExtensionPropertyName) { + super(pluginId, extensionPointName, executableExtensionPropertyName); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/Messages.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/Messages.java new file mode 100644 index 0000000..83a967a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/Messages.java @@ -0,0 +1,53 @@ +package com.excelsior.xds.ui.editor.commons.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.ui.editor.commons.internal.nls.messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object}); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + public static String UpdateIndentGuides; + + public static String IndentGuidePreferencePage_pageDesc; + public static String IndentGuidePreferencePage_EnableIndentGuide; + public static String IndentGuidePreferencePage_LineAttributes; + public static String IndentGuidePreferencePage_Alpha_0_255; + public static String IndentGuidePreferencePage_Color; + public static String IndentGuidePreferencePage_DASH; + public static String IndentGuidePreferencePage_DASHDOT; + public static String IndentGuidePreferencePage_DASHDOTDOT; + public static String IndentGuidePreferencePage_DOT; + public static String IndentGuidePreferencePage_Shift_1_8; + public static String IndentGuidePreferencePage_SOLID; + public static String IndentGuidePreferencePage_Style; + public static String IndentGuidePreferencePage_Width_1_8; + + public static String SyntaxColoringPreferencePage_Bold; + public static String SyntaxColoringPreferencePage_Color; + public static String SyntaxColoringPreferencePage_Element; + + public static String SyntaxColoringPreferencePage_Enable; + public static String SyntaxColoringPreferencePage_Italic; + public static String SyntaxColoringPreferencePage_LinkHrefsDescription; + public static String SyntaxColoringPreferencePage_Preview; + public static String SyntaxColoringPreferencePage_Strikethrough; + public static String SyntaxColoringPreferencePage_Underline; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages.properties b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages.properties new file mode 100644 index 0000000..d1d2226 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/nls/messages.properties @@ -0,0 +1,25 @@ +UpdateIndentGuides=Update vertical indent guides + +IndentGuidePreferencePage_pageDesc=Configure appearance of vertical indent guides in editors. +IndentGuidePreferencePage_EnableIndentGuide=Show vertical indent guides +IndentGuidePreferencePage_LineAttributes=Line attributes +IndentGuidePreferencePage_Alpha_0_255=Alpha (0=transparent to 255=opaque) +IndentGuidePreferencePage_Color=Color +IndentGuidePreferencePage_SOLID=SOLID +IndentGuidePreferencePage_DASH=DASH +IndentGuidePreferencePage_DASHDOT=DASHDOT +IndentGuidePreferencePage_DASHDOTDOT=DASHDOTDOT +IndentGuidePreferencePage_DOT=DOT +IndentGuidePreferencePage_Shift_1_8=Shift (0 to 8 pixels) +IndentGuidePreferencePage_Style=Style +IndentGuidePreferencePage_Width_1_8=Width (1 to 8 pixels) + +SyntaxColoringPreferencePage_Bold=Bold +SyntaxColoringPreferencePage_Color=Color +SyntaxColoringPreferencePage_Element=Element +SyntaxColoringPreferencePage_Enable=Enable +SyntaxColoringPreferencePage_Italic=Italic +SyntaxColoringPreferencePage_LinkHrefsDescription=Default colors and font can be configured on the 'Text Editors' and on the 'Colors and Fonts' preference page. +SyntaxColoringPreferencePage_Preview=Preview +SyntaxColoringPreferencePage_Strikethrough=Strikethrough +SyntaxColoringPreferencePage_Underline=Underline \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/IndentGuidePreferencePage.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/IndentGuidePreferencePage.java new file mode 100644 index 0000000..0df8328 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/IndentGuidePreferencePage.java @@ -0,0 +1,225 @@ +package com.excelsior.xds.ui.editor.commons.internal.preferences; + +import org.eclipse.jface.preference.ColorFieldEditor; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Spinner; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.themes.ColorUtil; + +import com.excelsior.xds.ui.editor.commons.internal.nls.Messages; +import com.excelsior.xds.ui.editor.commons.plugin.EditorCommonsPlugin; + + +public class IndentGuidePreferencePage extends PreferencePage implements + IWorkbenchPreferencePage { + + private Button enabled; + private Composite attributes; + private Spinner lineAlpha; + private Combo lineStyle; + private static final String[] styles = { + Messages.IndentGuidePreferencePage_SOLID, + Messages.IndentGuidePreferencePage_DASH, + Messages.IndentGuidePreferencePage_DOT, + Messages.IndentGuidePreferencePage_DASHDOT, + Messages.IndentGuidePreferencePage_DASHDOTDOT}; + private Spinner lineWidth; + private Spinner lineShift; + private ColorFieldEditor colorFieldEditor; + + //--- Preference store IO & color: + + private static Color color; + private static IPreferenceStore preferenceStore; + + public static IPreferenceStore staticGetPreferenceStore() { + if (preferenceStore == null) { + preferenceStore = EditorCommonsPlugin.getDefault().getPreferenceStore(); + + if (!preferenceStore.contains(PreferenceConstants.LINE_COLOR)) { + // not initialized yet: init all defaults: + PreferenceConverter.setDefault(preferenceStore, PreferenceConstants.LINE_COLOR, new RGB(128, 128, 128)); + preferenceStore.setDefault(PreferenceConstants.ENABLED, true); + preferenceStore.setDefault(PreferenceConstants.LINE_ALPHA, 100); + preferenceStore.setDefault(PreferenceConstants.LINE_STYLE, 1); + preferenceStore.setDefault(PreferenceConstants.LINE_WIDTH, 1); + preferenceStore.setDefault(PreferenceConstants.LINE_SHIFT, 3); + } + } + return preferenceStore; + } + + @Override + public IPreferenceStore getPreferenceStore() { + return staticGetPreferenceStore(); + } + + public static Color getColor() { + if (color == null) { + String colorString = staticGetPreferenceStore().getString( + PreferenceConstants.LINE_COLOR); + color = new Color(PlatformUI.getWorkbench().getDisplay(), + ColorUtil.getColorValue(colorString)); + } + return color; + } + + public static void setColor(Color clr) { + if (color != null) { + color.dispose(); + } + color = clr; + } + + + //--- Preference page: + + public IndentGuidePreferencePage() { + setPreferenceStore(EditorCommonsPlugin.getDefault().getPreferenceStore()); + setDescription(Messages.IndentGuidePreferencePage_pageDesc); + } + + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(Composite parent) { + Composite composite = new Composite(parent, SWT.NONE); + composite.setLayout(new GridLayout(1, true)); + + enabled = new Button(composite, SWT.CHECK); + enabled.setText(Messages.IndentGuidePreferencePage_EnableIndentGuide); + enabled.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + super.widgetSelected(e); + enableControls(enabled.getSelection()); + } + }); + + Group group = new Group(composite, SWT.NONE); + group.setLayoutData(new GridData(SWT.FILL, SWT.BEGINNING, true, false)); + group.setLayout(new GridLayout(1, true)); + group.setText(Messages.IndentGuidePreferencePage_LineAttributes); + attributes = new Composite(group, SWT.NONE); + GridData gridData = new GridData(SWT.FILL, SWT.BEGINNING, true, false); + gridData.horizontalIndent = 5; + attributes.setLayoutData(gridData); + attributes.setLayout(new GridLayout(2, false)); + + new Label(attributes, SWT.NONE) + .setText(Messages.IndentGuidePreferencePage_Alpha_0_255 + ':'); + lineAlpha = new Spinner(attributes, SWT.BORDER); + lineAlpha.setMinimum(0); + lineAlpha.setMaximum(255); + new Label(attributes, SWT.NONE) + .setText(Messages.IndentGuidePreferencePage_Style + ':'); + lineStyle = new Combo(attributes, SWT.READ_ONLY); + lineStyle.setItems(styles); + new Label(attributes, SWT.NONE) + .setText(Messages.IndentGuidePreferencePage_Width_1_8 + ':'); + lineWidth = new Spinner(attributes, SWT.BORDER); + lineWidth.setMinimum(1); + lineWidth.setMaximum(8); + new Label(attributes, SWT.NONE) + .setText(Messages.IndentGuidePreferencePage_Shift_1_8 + ':'); + lineShift = new Spinner(attributes, SWT.BORDER); + lineShift.setMinimum(0); + lineShift.setMaximum(8); + colorFieldEditor = new ColorFieldEditor(PreferenceConstants.LINE_COLOR, + Messages.IndentGuidePreferencePage_Color + ':', attributes); + colorFieldEditor.setPreferenceStore(getPreferenceStore()); + + loadPreferences(); + return composite; + } + + @Override + protected void performDefaults() { + super.performDefaults(); + IPreferenceStore store = getPreferenceStore(); + enabled.setSelection(store + .getDefaultBoolean(PreferenceConstants.ENABLED)); + lineAlpha.setSelection(store + .getDefaultInt(PreferenceConstants.LINE_ALPHA)); + int index = store.getDefaultInt(PreferenceConstants.LINE_STYLE) - 1; + if (index < 0 || index >= styles.length) { + index = 0; + } + lineStyle.setText(styles[index]); + lineWidth.setSelection(store + .getDefaultInt(PreferenceConstants.LINE_WIDTH)); + lineShift.setSelection(store + .getDefaultInt(PreferenceConstants.LINE_SHIFT)); + colorFieldEditor.loadDefault(); + enableControls(enabled.getSelection()); + } + + @Override + public boolean performOk() { + IPreferenceStore store = getPreferenceStore(); + store.setValue(PreferenceConstants.ENABLED, enabled.getSelection()); + store.setValue(PreferenceConstants.LINE_ALPHA, lineAlpha.getSelection()); + store.setValue(PreferenceConstants.LINE_STYLE, + lineStyle.getSelectionIndex() + 1); + store.setValue(PreferenceConstants.LINE_WIDTH, lineWidth.getSelection()); + store.setValue(PreferenceConstants.LINE_SHIFT, lineShift.getSelection()); + colorFieldEditor.store(); + RGB rgb = colorFieldEditor.getColorSelector().getColorValue(); + Color color = new Color(PlatformUI.getWorkbench().getDisplay(), rgb); + setColor(color); + return super.performOk(); + } + + private void loadPreferences() { + IPreferenceStore store = getPreferenceStore(); + enabled.setSelection(store.getBoolean(PreferenceConstants.ENABLED)); + lineAlpha.setSelection(store.getInt(PreferenceConstants.LINE_ALPHA)); + int index = store.getInt(PreferenceConstants.LINE_STYLE) - 1; + if (index < 0 || index >= styles.length) { + index = 0; + } + lineStyle.setText(styles[index]); + lineWidth.setSelection(store.getInt(PreferenceConstants.LINE_WIDTH)); + lineShift.setSelection(store.getInt(PreferenceConstants.LINE_SHIFT)); + colorFieldEditor.load(); + enableControls(enabled.getSelection()); + } + + private void enableControls(boolean enabled) { + for (Control control : attributes.getChildren()) { + control.setEnabled(enabled); + } + } + + public class PreferenceConstants { + private static final String PREFERENCIES_PREFIX = EditorCommonsPlugin.PLUGIN_ID + ".IndentGuide."; //$NON-NLS-1$ + + public static final String ENABLED = PREFERENCIES_PREFIX + "enabled"; //$NON-NLS-1$ + public static final String LINE_ALPHA = PREFERENCIES_PREFIX + "line_alpha"; //$NON-NLS-1$ + public static final String LINE_STYLE = PREFERENCIES_PREFIX + "line_style"; //$NON-NLS-1$ + public static final String LINE_WIDTH = PREFERENCIES_PREFIX + "line_width"; //$NON-NLS-1$ + public static final String LINE_SHIFT = PREFERENCIES_PREFIX + "line_shift"; //$NON-NLS-1$ + public static final String LINE_COLOR = PREFERENCIES_PREFIX + "line_color"; //$NON-NLS-1$ + + } + + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColorerPreviewer.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColorerPreviewer.java new file mode 100644 index 0000000..dde2b6c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColorerPreviewer.java @@ -0,0 +1,154 @@ +package com.excelsior.xds.ui.editor.commons.internal.preferences; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyleRange; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.texteditor.AbstractTextEditor; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.commons.utils.XStyledString; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.RgbStyle; +import com.excelsior.xds.ui.editor.commons.internal.preferences.SyntaxColoringPreferencePage.HighlightingColorTreeItem; +import com.excelsior.xds.ui.editor.commons.preferences.ISyntaxColoringPreferences; + +public class SyntaxColorerPreviewer extends StyledText { + private ISyntaxColoringPreferences syntaxColoring; + private List fListTreeItems; + private Color defBackgroundColor; + private IPreferenceStore preferenceStore; + private IPropertyChangeListener prefListener; + private TokenManager tokenManager; + + public SyntaxColorerPreviewer(Composite parent, final IPreferenceStore preferenceStore) { + super(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY); + this.preferenceStore = preferenceStore; + this.setLayoutData(new GridData(GridData.FILL_BOTH)); + + Font font= JFaceResources.getTextFont(); + this.setFont(font); + + defBackgroundColor = getEditorBackgroundColor(preferenceStore); + this.setBackground(defBackgroundColor); + + prefListener = new IPropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent event) { + try { // Widget may be disposed here + defBackgroundColor = getEditorBackgroundColor(preferenceStore); + setBackground(defBackgroundColor); + updateColors(); + } catch (Exception e) {} + } + }; + + preferenceStore.addPropertyChangeListener(prefListener); + + tokenManager = new TokenManager(); + } + + @Override + public void dispose() { + preferenceStore.removePropertyChangeListener(prefListener); + tokenManager.dispose(); + super.dispose(); + } + + + private Color getEditorBackgroundColor(IPreferenceStore preferenceStore) { + if (preferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)) { + return null; + } else { + RGB rgb = PreferenceConverter.getColor(preferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND); + return new Color(Display.getDefault(), rgb); + } + } + + + /** + * Read and parse file colorPreview_.txt + * Show its content in the colorer previviewer window + * See file syntax description in the parser + * @param contentName - content ident + * @param hcItems - list of subtree items for the given content type + */ + public void activateContent( ISyntaxColoringPreferences syntaxColoring, List hcItems) { + fListTreeItems = hcItems; + if (this.syntaxColoring == syntaxColoring) { + return; + } + this.syntaxColoring = syntaxColoring; + + String text = syntaxColoring.getTemplateText(); + if (text == null){ + text = "** Internal error, preview not available. See error log for details."; //$NON-NLS-1$ + } + this.setText(text); + } + + public void updateColors() { + try { + Map colorConvertationMap = new HashMap(); + + // Default style: + PersistentTokenDescriptor defTok = syntaxColoring.getDefaultToken().getToken(); + + int defStyle = defTok.getStyleWhenEnabled(); + RGB defRgb = defTok.getRgbWhenEnabled(); + for (HighlightingColorTreeItem hcit : fListTreeItems) { + if (hcit.getToken().getId().equals(defTok.getId())) { + defStyle = hcit.style; + defRgb = hcit.rgb; + break; + } + } + { + StyleRange sr = new StyleRange(); + sr.fontStyle = (defStyle & (SWT.BOLD | SWT.ITALIC)); + sr.underline = (defStyle & TextAttribute.UNDERLINE) != 0; + sr.strikeout = (defStyle & TextAttribute.STRIKETHROUGH) != 0; + sr.foreground = new Color(Display.getDefault(), defRgb); + sr.background = defBackgroundColor; + sr.start = 0; + sr.length = this.getText().length(); + this.setStyleRange(sr); + } + + // Color/style convertation map: + for (HighlightingColorTreeItem hcit : fListTreeItems) { + RGB rgb = hcit.rgb; + int style = hcit.style; + if (hcit.isDisabled) { + rgb = defRgb; + style = defStyle; + } + colorConvertationMap.put(hcit.getToken(), new RgbStyle(rgb, style)); + } + + XStyledString xss = syntaxColoring.doColor(tokenManager, getText(), colorConvertationMap); + this.setStyleRange(null); + for (StyleRange sr : xss.getStyleRanges()) { + this.setStyleRange(sr); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColoringPreferencePage.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColoringPreferencePage.java new file mode 100644 index 0000000..174d1ec --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/internal/preferences/SyntaxColoringPreferencePage.java @@ -0,0 +1,572 @@ +package com.excelsior.xds.ui.editor.commons.internal.preferences; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +import org.eclipse.jface.preference.ColorSelector; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.viewers.DoubleClickEvent; +import org.eclipse.jface.viewers.IDoubleClickListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.ScrollBar; +import org.eclipse.swt.widgets.Scrollable; +import org.eclipse.swt.widgets.TreeItem; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.internal.editors.text.EditorsPlugin; + +import com.excelsior.xds.core.help.IXdsHelpContextIds; +import com.excelsior.xds.ui.commons.utils.HelpUtils; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.commons.ITokens; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.internal.nls.Messages; +import com.excelsior.xds.ui.editor.commons.preferences.ISyntaxColoringPreferences; +import com.excelsior.xds.ui.editor.commons.preferences.ITokenModification; +import com.excelsior.xds.ui.editor.commons.preferences.SyntaxColoringPreferencesRegistry; + +@SuppressWarnings("restriction") +public class SyntaxColoringPreferencePage extends PreferencePage implements IWorkbenchPreferencePage { + + private TreeViewer fTreeViewer; + private java.util.List fListAllItems; + private Button fEnable; + private ColorSelector fSyntaxForegroundColorEditor; + private Button fBoldCheckBox; + private Button fItalicCheckBox; + private Button fStrikethroughCheckBox; + private Button fUnderlineCheckBox; + private SyntaxColorerPreviewer fPreviewer; + private final List syntaxColorings; + + public SyntaxColoringPreferencePage() { + this(""); //$NON-NLS-1$ + } + + public SyntaxColoringPreferencePage(String title) { + super(title); + setPreferenceStore(EditorsPlugin.getDefault().getPreferenceStore()); + syntaxColorings = SyntaxColoringPreferencesRegistry.get().contributions(); + } + + public SyntaxColoringPreferencePage(String title, ImageDescriptor image) { + super(title, image); + setPreferenceStore(EditorsPlugin.getDefault().getPreferenceStore()); + syntaxColorings = SyntaxColoringPreferencesRegistry.get().contributions(); + } + + @Override + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(final Composite parent) { + HelpUtils.setHelp(parent, IXdsHelpContextIds.MODULA2_SYNTAX_COLORING_PREFERENCE_PAGE); + + // Create tree model: + ArrayList treeModel = new ArrayList(); + fListAllItems = new ArrayList(); + int maxTreeItemWidth = 0; + + for (ISyntaxColoringPreferences syntaxColoring : syntaxColorings) { + // Add root for M2 O2 files: + RootTreeItem root = new RootTreeItem(syntaxColoring.getLanguageName(), syntaxColoring); + + HashMap catName2Root = new HashMap(); + for (ITokens modulaToken : syntaxColoring.getTokens()) { + String cat = modulaToken.getCategoryName(); + HighlightingColorTreeItem it = new HighlightingColorTreeItem(syntaxColoring, modulaToken); + if (cat == null) { + root.getItems().add(it); + } + else { + RootTreeItem catRoot = catName2Root.get(cat); + if (catRoot == null) { + catRoot = new RootTreeItem(cat, syntaxColoring); + catName2Root.put(cat, catRoot); + root.getItems().add(catRoot); + } + catRoot.getItems().add(it); + } + fListAllItems.add(it); + maxTreeItemWidth = Math.max(maxTreeItemWidth, convertWidthInCharsToPixels(it.toString().length() + 5)); + } + treeModel.add(root); + } + + Composite colorComposite= new Composite(parent, SWT.NONE); + GridLayout layout= new GridLayout(); + layout.marginHeight= 0; + layout.marginWidth= 0; + colorComposite.setLayout(layout); + + // Default colors and font can be configured on the.... + Link link= new Link(colorComposite, SWT.NONE); + link.setText(Messages.SyntaxColoringPreferencePage_LinkHrefsDescription); +// link.setText("Default colors and font can be configured on the " + +// "'Text Editors' " + +// "and on the 'Colors and Fonts' " + +// "preference page."); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + if ("org.eclipse.ui.preferencePages.GeneralTextEditor".equals(e.text)) //$NON-NLS-1$ + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null); + else if ("org.eclipse.ui.preferencePages.ColorsAndFonts".equals(e.text)) //$NON-NLS-1$ + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, "selectFont:org.eclipse.jface.textfont"); //$NON-NLS-1$ + } + }); + GridData gridData= new GridData(SWT.FILL, SWT.BEGINNING, true, false); + gridData.widthHint= 150; // only expand further if anyone else requires it + gridData.horizontalSpan= 2; + link.setLayoutData(gridData); + + // + SWTFactory.createLabel(colorComposite, "", 1); //$NON-NLS-1$ + + // Element: + SWTFactory.createLabel(colorComposite, Messages.SyntaxColoringPreferencePage_Element+':', 1); + + // 2-columns composite + Composite editorComposite= new Composite(colorComposite, SWT.NONE); + layout= new GridLayout(); + layout.numColumns= 2; + layout.marginHeight= 0; + layout.marginWidth= 0; + editorComposite.setLayout(layout); + GridData gd= new GridData(SWT.FILL, SWT.BEGINNING, true, false); + editorComposite.setLayoutData(gd); + + // Tree + fTreeViewer= new TreeViewer(editorComposite, SWT.SINGLE | SWT.BORDER); + fTreeViewer.setLabelProvider(new ColorListLabelProvider()); + fTreeViewer.setContentProvider(new ColorListContentProvider()); + fTreeViewer.setInput(treeModel); + + gd= new GridData(SWT.BEGINNING, SWT.BEGINNING, false, true); + gd.heightHint= convertHeightInCharsToPixels(9); + ScrollBar vBar= ((Scrollable) fTreeViewer.getControl()).getVerticalBar(); + if (vBar != null) + maxTreeItemWidth += vBar.getSize().x * 5; // scrollbars and tree indentation guess + gd.widthHint= maxTreeItemWidth; + + fTreeViewer.getControl().setLayoutData(gd); + installDoubleClickListener(); // will be used in real tree, just it is a list + + // Styles... + Composite stylesComposite= new Composite(editorComposite, SWT.NONE); + layout= new GridLayout(); + layout.marginHeight= 0; + layout.marginWidth= 10; + layout.numColumns= 3; + stylesComposite.setLayout(layout); + stylesComposite.setLayoutData(new GridData(GridData.FILL_BOTH)); + + // [v] Enable + fEnable = SWTFactory.createCheckbox(stylesComposite, Messages.SyntaxColoringPreferencePage_Enable, 3); + + // Color: [ ] + SWTFactory.createLabel(stylesComposite, " ", 1); //$NON-NLS-1$ + SWTFactory.createLabel(stylesComposite, Messages.SyntaxColoringPreferencePage_Color+':', 1); + + fSyntaxForegroundColorEditor= new ColorSelector(stylesComposite); //TODO use SWTFactory.createColorSelector() + Button foregroundColorButton= fSyntaxForegroundColorEditor.getButton(); + gd= new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING); + foregroundColorButton.setLayoutData(gd); + + // [v] Bold + // [v] Italic + // [v] Strikethrough + // [v] Underline + SWTFactory.createLabel(stylesComposite, " ", 1); //$NON-NLS-1$ + fBoldCheckBox = SWTFactory.createCheckbox(stylesComposite, Messages.SyntaxColoringPreferencePage_Bold, 2); + SWTFactory.createLabel(stylesComposite, " ", 1); //$NON-NLS-1$ + fItalicCheckBox = SWTFactory.createCheckbox(stylesComposite, Messages.SyntaxColoringPreferencePage_Italic, 2); + SWTFactory.createLabel(stylesComposite, " ", 1); //$NON-NLS-1$ + fStrikethroughCheckBox = SWTFactory.createCheckbox(stylesComposite, Messages.SyntaxColoringPreferencePage_Strikethrough, 2); + SWTFactory.createLabel(stylesComposite, " ", 1); //$NON-NLS-1$ + fUnderlineCheckBox = SWTFactory.createCheckbox(stylesComposite, Messages.SyntaxColoringPreferencePage_Underline, 2); + + // Editor preview... + Label label= new Label(colorComposite, SWT.LEFT); + label.setText(Messages.SyntaxColoringPreferencePage_Preview+':'); + label.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + + fPreviewer = new SyntaxColorerPreviewer(colorComposite, getPreferenceStore()); + gd= new GridData(GridData.FILL_BOTH); + gd.widthHint= convertWidthInCharsToPixels(80); + gd.heightHint= convertHeightInCharsToPixels(5); + fPreviewer.setLayoutData(gd); + + fEnable.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + it.isDisabled = !fEnable.getSelection(); + fPreviewer.updateColors(); + } + } + }); + + foregroundColorButton.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + it.rgb = fSyntaxForegroundColorEditor.getColorValue(); + fPreviewer.updateColors(); + } + } + }); + + fBoldCheckBox.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + if (fBoldCheckBox.getSelection()) { + it.style |= SWT.BOLD; + } else { + it.style &= ~SWT.BOLD; + } + fPreviewer.updateColors(); + } + } + }); + + fItalicCheckBox.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + if (fItalicCheckBox.getSelection()) { + it.style |= SWT.ITALIC; + } else { + it.style &= ~SWT.ITALIC; + } + fPreviewer.updateColors(); + } + } + }); + + fUnderlineCheckBox.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + if (fUnderlineCheckBox.getSelection()) { + it.style |= TextAttribute.UNDERLINE; + } else { + it.style &= ~TextAttribute.UNDERLINE; + } + fPreviewer.updateColors(); + } + } + }); + + fStrikethroughCheckBox.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + HighlightingColorTreeItem it = getHighlightingColorListItem(); + if (it != null) { + if (fStrikethroughCheckBox.getSelection()) { + it.style |= TextAttribute.STRIKETHROUGH; + } else { + it.style &= ~TextAttribute.STRIKETHROUGH; + } + fPreviewer.updateColors(); + } + } + }); + + fTreeViewer.getTree().addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + handleTreeSelection(); + } + }); + + TreeItem titems[] = fTreeViewer.getTree().getItems(); + if (titems.length > 0) { + fTreeViewer.getTree().select(titems[0]); + } + + handleTreeSelection(); + colorComposite.layout(false); + + return colorComposite; + } + + + private void installDoubleClickListener() { + fTreeViewer.addDoubleClickListener(new IDoubleClickListener() { + public void doubleClick(DoubleClickEvent event) { + IStructuredSelection s = (IStructuredSelection) event.getSelection(); + Object element = s.getFirstElement(); + if (fTreeViewer.isExpandable(element)) { + fTreeViewer.setExpandedState(element,!fTreeViewer.getExpandedState(element)); + } + } + }); + } + + private HighlightingColorTreeItem getHighlightingColorListItem() { + TreeItem[] sel = fTreeViewer.getTree().getSelection(); + if (sel.length > 0) { + Object ob = sel[0].getData(); + if (ob instanceof HighlightingColorTreeItem) { + return (HighlightingColorTreeItem)ob; + } + } + return null; + } + + private RootTreeItem getRootTreeItem() { + TreeItem[] sel = fTreeViewer.getTree().getSelection(); + if (sel.length > 0) { + Object ob = sel[0].getData(); + if (ob instanceof HighlightingColorTreeItem) { + ob = ((ITreeContentProvider)fTreeViewer.getContentProvider()).getParent(ob); + } else if (ob instanceof RootTreeItem) { + return (RootTreeItem)ob; + } + } + return null; + } + + private void getHLItemsFromRoot(RootTreeItem root, List dest) { + for (Object o : root.getItems()) { + if (o instanceof HighlightingColorTreeItem) { + dest.add((HighlightingColorTreeItem)o); + } else if (o instanceof RootTreeItem) { + getHLItemsFromRoot((RootTreeItem)o, dest); + } + } + } + + private void handleTreeSelection() { + RootTreeItem root = getRootTreeItem(); + if (root != null) { + List lst = new ArrayList(); + getHLItemsFromRoot(root, lst); + fPreviewer.activateContent(root.syntaxColoring, lst); + fPreviewer.updateColors(); + } + + HighlightingColorTreeItem it = getHighlightingColorListItem(); + + fEnable.setEnabled(it != null && it.mayBeDisabled); + fSyntaxForegroundColorEditor.setEnabled(it != null); + fBoldCheckBox.setEnabled(it != null); + fItalicCheckBox.setEnabled(it != null); + fStrikethroughCheckBox.setEnabled(it != null); + fUnderlineCheckBox.setEnabled(it != null); + + fEnable.setSelection(it == null || !it.isDisabled); + fSyntaxForegroundColorEditor.setColorValue(it == null ? new RGB(0x80, 0x80, 0x80) : it.rgb); + fBoldCheckBox.setSelection(it == null ? false : (it.style & SWT.BOLD) != 0); + fItalicCheckBox.setSelection(it == null ? false : (it.style & SWT.ITALIC) != 0); + fStrikethroughCheckBox.setSelection(it == null ? false : (it.style & TextAttribute.STRIKETHROUGH) != 0); + fUnderlineCheckBox.setSelection(it == null ? false : (it.style & TextAttribute.UNDERLINE) != 0); + } + + @Override + public boolean performOk() { + Map> coloring2Items = + fListAllItems.stream().collect(Collectors.groupingBy(HighlightingColorTreeItem::getSyntaxColoring)); + + coloring2Items + .entrySet() + .stream() + .forEach( + e -> { + ISyntaxColoringPreferences coloring = e.getKey(); + List modifications = e + .getValue().stream() + .map(i -> i.toTokenModification()) + .collect(Collectors.toList()); + coloring.save(modifications); + }); + return true; + } + + @Override + public void performDefaults() { + for(HighlightingColorTreeItem it : fListAllItems) { + it.setDefaultValues(); + } + handleTreeSelection(); + fPreviewer.updateColors(); + } + + + ////////////////////////////////////////////////////////////////////////////////// + // Tree contents + ///////////////////////////////////////////////////////////////////////////////// + + private static class ColorListContentProvider implements ITreeContentProvider { + + private ArrayList model; + + @Override + public void dispose() { + } + + @SuppressWarnings({ "unchecked" }) + @Override + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { + this.model = (ArrayList) newInput; + } + + @Override + public Object[] getElements(Object inputElement) { + return model.toArray(); + } + + @Override + public Object[] getChildren(Object parentElement) { + if (parentElement instanceof RootTreeItem) { + return ((RootTreeItem)parentElement).getItems().toArray(); + } + return null; + } + + private Object getParent(Object element, RootTreeItem rti) { + for (Object o : rti.getItems()) { + if (o == element) { + return rti; + } + if (o instanceof RootTreeItem) { + Object x = getParent(element, (RootTreeItem)o); + if (x != null) { + return x; + } + } + } + return null; + } + + @Override + public Object getParent(Object element) { + for (RootTreeItem r : model) { + Object x = getParent(element, r); + if (x != null) { + return x; + } + } + return null; + } + + @Override + public boolean hasChildren(Object element) { + return (element instanceof RootTreeItem); + } + } + + private static class ColorListLabelProvider extends LabelProvider { + @Override + public String getText(Object element) { + return String.valueOf(element); + } + } + + private static class RootTreeItem { + private final List items = new ArrayList(); + private String name; + + final ISyntaxColoringPreferences syntaxColoring; + + public RootTreeItem(String name, ISyntaxColoringPreferences syntaxColoring) { + this.syntaxColoring = syntaxColoring; + this.name = name; + } + + public List getItems (){ + return items; + } + + @Override + public String toString() { + return name; + } + } + + static class HighlightingColorTreeItem { + final PersistentTokenDescriptor token; + final ISyntaxColoringPreferences syntaxColoring; + ITokens iToken; + + int style; + RGB rgb; + boolean isDisabled; + final boolean mayBeDisabled; + + HighlightingColorTreeItem(ISyntaxColoringPreferences syntaxColoring, ITokens iTokens) { + this.iToken = iTokens; + this.syntaxColoring = syntaxColoring; + token = iTokens.getToken(); + mayBeDisabled = token.mayBeDisabled(); + isDisabled = token.isDisabled(); + style = token.getStyleWhenEnabled(); + rgb = token.getRgbWhenEnabled(); + } + + ISyntaxColoringPreferences getSyntaxColoring() { + return syntaxColoring; + } + + void setDefaultValues() { + style = token.getDefaultStyle(); + rgb = token.getDefaultRgb(); + } + + ITokenModification toTokenModification(){ + return new ITokenModification() { + + @Override + public boolean isDisabled() { + return isDisabled; + } + + @Override + public ITokens getToken() { + return iToken; + } + + @Override + public int getStyle() { + return style; + } + + @Override + public RGB getRgb() { + return rgb; + } + }; + } + + PersistentTokenDescriptor getToken() { + return token; + } + + @Override + public String toString() { + return token.getName(); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/plugin/EditorCommonsPlugin.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/plugin/EditorCommonsPlugin.java new file mode 100644 index 0000000..98c1a95 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/plugin/EditorCommonsPlugin.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.editor.commons.plugin; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class EditorCommonsPlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.ui.editor.commons"; //$NON-NLS-1$ + + // The shared instance + private static EditorCommonsPlugin plugin; + + /** + * The constructor + */ + public EditorCommonsPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static EditorCommonsPlugin getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/AbstractSyntaxColoring.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/AbstractSyntaxColoring.java new file mode 100644 index 0000000..e7def7d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/AbstractSyntaxColoring.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.ui.editor.commons.preferences; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.io.IOUtils; +import org.eclipse.jface.preference.IPreferenceStore; + +public abstract class AbstractSyntaxColoring implements ISyntaxColoringPreferences { + protected void doSave(IPreferenceStore store, String preferenceId, List tokenModifications) { + List lines = new ArrayList<>(); + tokenModifications.forEach(m -> { + m.getToken().getToken().preferenciesToIni(lines, m.getStyle(), m.isDisabled(), m.getRgb()); + }); + + store.setValue(preferenceId, String.join(System.lineSeparator(), lines)); + } + + protected String getTemplateText(String templateResourceName){ + try { + return IOUtils.toString(getClass().getResourceAsStream(templateResourceName)); + } catch (IOException e) { + return null; + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ISyntaxColoringPreferences.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ISyntaxColoringPreferences.java new file mode 100644 index 0000000..a6b76ae --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ISyntaxColoringPreferences.java @@ -0,0 +1,28 @@ +package com.excelsior.xds.ui.editor.commons.preferences; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.commons.utils.XStyledString; +import com.excelsior.xds.ui.editor.commons.ITokens; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.RgbStyle; + +/** + * Syntax coloring preferences support + * @author lsa80 + */ +public interface ISyntaxColoringPreferences { + String getLanguageId(); + String getLanguageName(); + String getTemplateText(); + ITokens getDefaultToken(); + List getTokens(); + + XStyledString doColor(TokenManager tokenManager, String text, + Map colorConversion) throws IOException; + + void save(List tokenModifications); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ITokenModification.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ITokenModification.java new file mode 100644 index 0000000..e34f835 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/ITokenModification.java @@ -0,0 +1,13 @@ +package com.excelsior.xds.ui.editor.commons.preferences; + +import org.eclipse.swt.graphics.RGB; + +import com.excelsior.xds.ui.editor.commons.ITokens; + +public interface ITokenModification { + ITokens getToken(); + + int getStyle(); + RGB getRgb(); + boolean isDisabled(); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/SyntaxColoringPreferencesRegistry.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/SyntaxColoringPreferencesRegistry.java new file mode 100644 index 0000000..d1fe3e2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/preferences/SyntaxColoringPreferencesRegistry.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.ui.editor.commons.preferences; + +import com.excelsior.xds.core.extensionpoint.ExtensionRegistry; +import com.excelsior.xds.ui.editor.commons.plugin.EditorCommonsPlugin; + +public class SyntaxColoringPreferencesRegistry extends ExtensionRegistry { + public static SyntaxColoringPreferencesRegistry get() { + return SyntaxColoringPreferencesRegistryHolder.instance; + } + + private static class SyntaxColoringPreferencesRegistryHolder { + static SyntaxColoringPreferencesRegistry instance = new SyntaxColoringPreferencesRegistry(EditorCommonsPlugin.PLUGIN_ID, "syntaxColoringPreferences", "class"); //$NON-NLS-1$ //$NON-NLS-2$ + static { + instance.contributions(); + } + } + + public SyntaxColoringPreferencesRegistry(String pluginId, + String extensionPointName, String executableExtensionPropertyName) { + super(pluginId, extensionPointName, executableExtensionPropertyName); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/reconciler/CompositeReconcilingStrategy.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/reconciler/CompositeReconcilingStrategy.java new file mode 100644 index 0000000..6311800 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/reconciler/CompositeReconcilingStrategy.java @@ -0,0 +1,116 @@ +package com.excelsior.xds.ui.editor.commons.reconciler; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.reconciler.DirtyRegion; +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; +import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension; + +/** + * A reconciling strategy consisting of a sequence of internal reconciling strategies. + * By default, all requests are passed on to the contained strategies. + */ +public class CompositeReconcilingStrategy implements IReconcilingStrategy + , IReconcilingStrategyExtension +{ + /** The list of internal reconciling strategies. */ + private IReconcilingStrategy[] strategies; + + + /** + * Creates a new, empty composite reconciling strategy. + */ + public CompositeReconcilingStrategy() { + } + + /** + * Sets the reconciling strategies for this composite strategy. + * + * @param strategies the strategies to be set or null + */ + public void setReconcilingStrategies(IReconcilingStrategy[] strategies) { + this.strategies = strategies; + } + + /** + * Returns the previously set strategies or null. + * + * @return the contained strategies or null + */ + public IReconcilingStrategy[] getReconcilingStrategies() { + return strategies; + } + + /** + * {@inheritDoc} + */ + @Override + public void setDocument(IDocument document) { + if (strategies == null) + return; + + for (IReconcilingStrategy strategy : strategies) { + strategy.setDocument(document); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { + if (strategies == null) + return; + + for (IReconcilingStrategy strategy : strategies) { + strategy.reconcile(dirtyRegion, subRegion); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(IRegion partition) { + if (strategies == null) + return; + + for (IReconcilingStrategy strategy : strategies) { + strategy.reconcile(partition); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void setProgressMonitor(IProgressMonitor monitor) { + if (strategies == null) + return; + + for (IReconcilingStrategy strategy : strategies) { + if (strategy instanceof IReconcilingStrategyExtension) { + IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension)strategy; + extension.setProgressMonitor(monitor); + } + } + } + + /** + * {@inheritDoc} + */ + @Override + public void initialReconcile() { + if (strategies == null) + return; + + for (IReconcilingStrategy strategy : strategies) { + if (strategy instanceof IReconcilingStrategyExtension) { + IReconcilingStrategyExtension extension = (IReconcilingStrategyExtension)strategy; + extension.initialReconcile(); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ruler/IRulerPainter.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ruler/IRulerPainter.java new file mode 100644 index 0000000..e39653f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/ruler/IRulerPainter.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.ui.editor.commons.ruler; + +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.editors.text.TextEditor; + +import com.excelsior.xds.core.utils.IDisposable; + +public interface IRulerPainter extends IDisposable { + void setTextEditor(TextEditor editor); + void beforePaint(); + boolean paintLine(int line, Rectangle bounds, GC gc, Display display); +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAdapter.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAdapter.java new file mode 100644 index 0000000..0914858 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAdapter.java @@ -0,0 +1,110 @@ +package com.excelsior.xds.ui.editor.commons.scanner.jflex; + +import java.io.IOException; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.ITokenScanner; +import org.eclipse.jface.text.rules.Token; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; + +/** + * A generic adapter for JFlex scanner to Eclipse IDocument scanner API. + * + * @author lion + */ +public class FlexAdapter implements ITokenScanner { + + final protected IFlexScanner flex; + + protected int rangeOffset; + + private TokenManager tokenManager; + + + public FlexAdapter (IFlexScanner flex, TokenManager tokenManager) { + this.flex = flex; + this.tokenManager = tokenManager; + } + + public IFlexScanner getFlexScanner() { + return flex; + } + + /** + * Configures the scanner by providing access to the document range that should + * be scanned. + * + * @param document the document to scan + * @param offset the offset of the document range to scan + * @param length the length of the document range to scan + * @param start the start offset in the document range to scan + * @param initialState initial lexical state + */ + protected void reset( IDocument document, int offset, int length + , int start, int initialState ) + { + Assert.isLegal(document != null); + checkRange(offset, length, document.getLength()); + + rangeOffset = offset; + try { + String buffer = document.get(offset, length); +// System.out.println("=== begin="+offset+", start="+start+", end="+(length-start)); +// char[] source = buffer.toCharArray(); +// for (int i=0; i< source.length; i++) { +// System.out.println(" ["+i+"] ch=" + Character.getNumericValue(source[i]) + ", val="+source[i] ); +// } +// System.out.println("==="); + flex.reset(buffer, start, length-start, initialState); + } catch (BadLocationException e) { + } + } + + @Override + public void setRange(IDocument document, int offset, int length) { + reset(document, offset, length, 0, IFlexScanner.INITIAL_STATE); + } + + @Override + public IToken nextToken() { + try { + TokenDescriptor tokenDesc = flex.nextToken(); + return tokenManager.createFrom(tokenDesc); + } + catch (IOException e) { + LogHelper.logError(e); + } + return Token.EOF; + } + + @Override + public int getTokenOffset() { + return rangeOffset + flex.getTokenOffset(); + } + + @Override + public int getTokenLength() { + return flex.yylength(); + } + + /** + * Checks that the given range is valid. + * See https://bugs.eclipse.org/bugs/show_bug.cgi?id=69292 + * + * @param offset the offset of the document range to scan + * @param length the length of the document range to scan + * @param documentLength the document's length + */ + private void checkRange(int offset, int length, int documentLength) { + Assert.isLegal(offset > -1); + Assert.isLegal(length > -1); + Assert.isLegal(offset + length <= documentLength); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAggregateAdapter.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAggregateAdapter.java new file mode 100644 index 0000000..d961b49 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexAggregateAdapter.java @@ -0,0 +1,85 @@ +package com.excelsior.xds.ui.editor.commons.scanner.jflex; + +import java.io.IOException; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; + +/** + * A adapter for JFlex scanner which returns all unmatched characters at once. + * + * NOTE: Adapted JFlex scanner must return null for unmatched characters. + * + * @author lion + */ +public class FlexAggregateAdapter extends FlexAdapter { + + /** The token to be returned by default if no rule fires */ + final protected IToken defaultReturnToken; + + private IToken token; + private int tokenOffset; + private int tokenLength; + + private TokenManager tokenManager; + + public FlexAggregateAdapter (IFlexScanner flex, IToken defaultReturnToken, TokenManager tokenManager) { + super(flex, tokenManager); + this.defaultReturnToken = defaultReturnToken; + this.token = null; + this.tokenManager = tokenManager; + } + + @Override + protected void reset( IDocument document, int offset, int length + , int start, int initialState ) + { + super.reset(document, offset, length, start, initialState); + token = null; + tokenOffset = tokenLength = 0; + } + + @Override + public IToken nextToken() { + try { + IToken returnToken; + if (token == null) { + returnToken = tokenManager.createFrom(flex.nextToken()); + tokenOffset = rangeOffset + flex.getTokenOffset(); + tokenLength = flex.yylength(); + + if (returnToken == null) { + token = tokenManager.createFrom(flex.nextToken()); + while (token == null) { + tokenLength += flex.yylength(); + token = tokenManager.createFrom(flex.nextToken()); + } + returnToken = defaultReturnToken; + } + } else { + returnToken = token; + tokenOffset = rangeOffset + flex.getTokenOffset(); + tokenLength = flex.yylength(); + token = null; + } + return returnToken; + } + catch (IOException e) { /*Can't happen*/ + } + return Token.EOF; + } + + @Override + public int getTokenOffset() { + return tokenOffset; + } + + @Override + public int getTokenLength() { + return tokenLength; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexPartitionAdapter.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexPartitionAdapter.java new file mode 100644 index 0000000..996cfab --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/FlexPartitionAdapter.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.ui.editor.commons.scanner.jflex; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.rules.IPartitionTokenScanner; +import org.eclipse.jface.text.rules.IToken; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; + +public class FlexPartitionAdapter extends FlexAggregateAdapter + implements IPartitionTokenScanner +{ + + public FlexPartitionAdapter(IFlexPartitionScanner flex, IToken defaultReturnToken, TokenManager tokenManager) { + super(flex, defaultReturnToken, tokenManager); + } + + @Override + public void setPartialRange( IDocument document, int offset, int length + , String contentType, int partitionOffset ) + { + int initial_state = ((IFlexPartitionScanner)flex).getState(contentType); + + if (partitionOffset > -1) { + int delta = offset - partitionOffset; + if (delta > 0) { + reset(document, partitionOffset, length+delta, delta, initial_state); +// setRange(document, partitionOffset, length+delta); + } + } + reset(document, offset, length, 0, initial_state); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexPartitionScanner.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexPartitionScanner.java new file mode 100644 index 0000000..81bcf15 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexPartitionScanner.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.commons.scanner.jflex; + +/** + * A JFlex partition token scanner. + * + * @author lion + */ +public interface IFlexPartitionScanner extends IFlexScanner { + + /** + * Returns the lexical state by content type. + * + * @param contentType the content type + * @return the lexical token for given content type + */ + int getState(String contentType); + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexScanner.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexScanner.java new file mode 100644 index 0000000..dd7e288 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/IFlexScanner.java @@ -0,0 +1,61 @@ +package com.excelsior.xds.ui.editor.commons.scanner.jflex; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; + +/** + * A JFlex token scanner. + * + * @author lion + */ +public interface IFlexScanner { + + static final int INITIAL_STATE = 0; + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + void yybegin(int state); + + /** + * Returns the current lexical state. + */ + int yystate(); + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + TokenDescriptor nextToken() throws java.io.IOException; + + /** + * Returns the offset of the matched text region. + * + * @return the offset of the matched text region + */ + int getTokenOffset(); + + + /** + * Returns the length of the matched text region. + * + * @return the length of the matched text region + */ + int yylength(); + + /** + * Configures the scanner by providing access to the document range that should + * be scanned. + * + * @param buffer the readable sequence of char values to scan + * @param start the offset of the document range to scan + * @param end the offset the last character in the buffer, that has been read + * @param initialState initial lexical state + */ + void reset(CharSequence buffer, int start, int end, int initialState); + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/eclipse-flex.skeleton b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/eclipse-flex.skeleton new file mode 100644 index 0000000..8291ea0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/jflex/eclipse-flex.skeleton @@ -0,0 +1,258 @@ + /** initial size of the lookahead buffer */ +--- private static final int ZZ_BUFFERSIZE = ...; + + /** lexical states */ +--- lexical states, charmap + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + private static final char[] EMPTY_BUFFER = new char[0]; + private static final int YYEOF = -1; + private static java.io.Reader zzReader = null; // Fake + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + +--- isFinal list + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the textposition at the last state to be included in yytext */ + private int zzPushbackPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** the number of characters up to the start of the matched text */ + private int yychar; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** nesting level of rule */ + private int nestLevel = 0; + +--- user class code + +--- constructor declaration + + private final void setTokenOffset(int offset){ + zzStartRead = offset; + } + + public final int getTokenOffset(){ + return zzStartRead; + } + + public final int getTokenEnd(){ + return getTokenOffset() + yylength(); + } + + public void reset(CharSequence buffer, int start, int end,int initialState){ + nestLevel = 0; + zzBuffer = buffer; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzPushbackPos = 0; + zzAtEOF = false; + zzAtBOL = true; + zzEndRead = end; + yychar = 0; + yybegin(initialState); + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position pos from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ +--- zzScanError declaration + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + +--- throws clause + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ +--- yypushback decl (contains zzScanError exception) + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + +--- zzDoEOF + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ +--- yylex declaration + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + char [] zzCMapL = ZZ_CMAP; + +--- local declarations + + while (true) { + zzMarkedPosL = zzMarkedPos; + +--- start admin (line, char, col count) + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + +--- start admin (lexstate etc) + + zzForAction: { + while (true) { + +--- next input, line, col, char count, next transition, isFinal action + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; +--- line count update + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; +--- char count update + +--- actions + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; +--- eofvalue + } + else { +--- no match + } + } + } + } + +--- main + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CharSetRule.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CharSetRule.java new file mode 100644 index 0000000..acc4d66 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CharSetRule.java @@ -0,0 +1,52 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import java.util.TreeSet; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +/** + * A rule for detecting words which contain only from restricted number of characters. + */ +public class CharSetRule implements IRule { + + /** The token to be returned on success */ + protected final IToken successToken; + + private final TreeSet charSet; + + + /** + * Creates a new char set rule. + * + * @param successToken Token to use for this rule + * @param chars characters to detect + */ + public CharSetRule (IToken successToken, char... chars) { + this.successToken = successToken; + charSet = new TreeSet(); + for (char ch : chars) { + charSet.add(ch); + } + } + + /* + * @see org.eclipse.jface.text.rules.IRule#evaluate(org.eclipse.jface.text.rules.ICharacterScanner) + */ + public IToken evaluate(ICharacterScanner scanner) { + int c = scanner.read(); + if (charSet.contains((char)c)) { + do { + c = scanner.read(); + } while ((c != ICharacterScanner.EOF) && charSet.contains((char)c)); + scanner.unread(); + return successToken; + } + + scanner.unread(); + return Token.UNDEFINED; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CommentScanner.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CommentScanner.java new file mode 100644 index 0000000..b0766d6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/CommentScanner.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.BufferedRuleBasedScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; + +public class CommentScanner extends BufferedRuleBasedScanner +{ + public CommentScanner(IToken defaultToken, IToken taskToken) { + setDefaultReturnToken(defaultToken); + setRules(new IRule[]{new TodoTaskTagRule(new TodoTaskTagDetector(), defaultToken, taskToken)}); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/MultiSuffixedWordRule.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/MultiSuffixedWordRule.java new file mode 100644 index 0000000..8e5b946 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/MultiSuffixedWordRule.java @@ -0,0 +1,71 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.IWordDetector; +import org.eclipse.jface.text.rules.Token; + +/** + * A specific single line rule which stipulates that the one of end characters + * occur within a single word, as defined by a word detector. + * + * @see IWordDetector + */ +public class MultiSuffixedWordRule implements IRule { + + /** The token to be returned on success */ + protected final IToken successToken; + + /** The word detector used by this rule. */ + protected final IWordDetector wordDetector; + + /** The rule's end characters set */ + protected final char[] endCharacters; + + /** Number of characters we had read. */ + private int readLength; + + + /** + * Creates a rule for the given ending character which, if detected, will + * return the specified token. A word detector is used to identify words. + * + * @param detector the word detector to be used + * @param endCharacter the end character of the word pattern + * @param token the token to be returned on success + */ + public MultiSuffixedWordRule(IWordDetector detector, IToken successToken, char... endCharacters) { + wordDetector = detector; + this.successToken = successToken; + this.endCharacters = endCharacters; + } + + /* + * @see IRule#evaluate(ICharacterScanner) + */ + public IToken evaluate(ICharacterScanner scanner) { + int c = scanner.read(); + if ((c != ICharacterScanner.EOF) && wordDetector.isWordStart((char)c)) { + readLength = 1; + + do { + c = scanner.read(); + readLength++; + } while ((c != ICharacterScanner.EOF) && wordDetector.isWordPart((char)c)); + for (char ch: endCharacters) { + if (c == ch) { + return successToken; + } + } + + while (readLength > 1) { + readLength--; + scanner.unread(); + } + } + scanner.unread(); + return Token.UNDEFINED; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SingleTokenScanner.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SingleTokenScanner.java new file mode 100644 index 0000000..7e9166b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SingleTokenScanner.java @@ -0,0 +1,11 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.BufferedRuleBasedScanner; +import org.eclipse.jface.text.rules.IToken; + +public class SingleTokenScanner extends BufferedRuleBasedScanner { + + public SingleTokenScanner(IToken token) { + setDefaultReturnToken(token); + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SuffixedWordRule.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SuffixedWordRule.java new file mode 100644 index 0000000..98a0897 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/SuffixedWordRule.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.IWordDetector; +import org.eclipse.jface.text.rules.Token; + +/** + * A specific single line rule which stipulates that the end character occur + * within a single word, as defined by a word detector. + * + * @see IWordDetector + */ +public class SuffixedWordRule implements IRule { + + /** The token to be returned on success */ + protected final IToken successToken; + + /** The word detector used by this rule. */ + protected final IWordDetector wordDetector; + + /** The rule's end character */ + protected final char endCharacter; + + /** Number of characters we had read. */ + private int readLength; + + + /** + * Creates a rule for the given ending character which, if detected, will + * return the specified token. A word detector is used to identify words. + * + * @param detector the word detector to be used + * @param endCharacter the end character of the word pattern + * @param token the token to be returned on success + */ + public SuffixedWordRule(IWordDetector detector, char endCharacter, IToken successToken) { + wordDetector = detector; + this.successToken = successToken; + this.endCharacter = endCharacter; + } + + /* + * @see IRule#evaluate(ICharacterScanner) + */ + public IToken evaluate(ICharacterScanner scanner) { + int c = scanner.read(); + if ((c != ICharacterScanner.EOF) && wordDetector.isWordStart((char)c)) { + readLength = 1; + + do { + c = scanner.read(); + readLength++; + } while ((c != ICharacterScanner.EOF) && wordDetector.isWordPart((char)c)); + if (c == endCharacter) { + return successToken; + } + + while (readLength > 1) { + readLength--; + scanner.unread(); + } + } + scanner.unread(); + return Token.UNDEFINED; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagDetector.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagDetector.java new file mode 100644 index 0000000..7c62e28 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagDetector.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.IWordDetector; + +/** + * "To do" task tag detector. + */ +public class TodoTaskTagDetector implements IWordDetector +{ + public boolean isWordStart(char c) { + return Character.isLetter(c) || c == '_' || c == '@' || c == '#'; + } + + public boolean isWordPart(char c) { + return Character.isLetterOrDigit(c) || c == '_' || c == '.'; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagRule.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagRule.java new file mode 100644 index 0000000..5b94c31 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/TodoTaskTagRule.java @@ -0,0 +1,35 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.IWordDetector; +import org.eclipse.jface.text.rules.WordRule; + +import com.excelsior.xds.core.todotask.TodoTask; +import com.excelsior.xds.core.todotask.TodoTaskManager; + +/** + * A rule for detecting "to-do" task tags. + */ +public class TodoTaskTagRule extends WordRule +{ + /** + * Creates a rule which, with the help of a task tag detector, will return the token + * associated with the detected task tag. If no token has been associated, the + * specified default token will be returned. + * + * @param detector the task tag detector to be used by this rule, + * may not be null + * @param defaultToken the default token to be returned on success + * if nothing else is specified, may not be null + * @param taskToken the token to be returned if the tag task has been found, + * may not be null + */ + public TodoTaskTagRule(IWordDetector detector, IToken defaultToken, IToken taskToken) + { + super(detector, defaultToken, !TodoTaskManager.getInstance().isCaseSensitive()); + for (TodoTask task : TodoTaskManager.getInstance().getAllTasks()) { + addWord(task.tag, taskToken); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WhitespaceDetector.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WhitespaceDetector.java new file mode 100644 index 0000000..3bef263 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WhitespaceDetector.java @@ -0,0 +1,17 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.IWhitespaceDetector; + +public class WhitespaceDetector implements IWhitespaceDetector { + + /** + * Returns whether the specified character is whitespace. + * + * @param c the character to be checked + * @return true if the specified character is a whitespace char + */ + public boolean isWhitespace(char c) { + return Character.isWhitespace(c); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WordDetector.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WordDetector.java new file mode 100644 index 0000000..1f4c84f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/scanner/rules/WordDetector.java @@ -0,0 +1,22 @@ +package com.excelsior.xds.ui.editor.commons.scanner.rules; + +import org.eclipse.jface.text.rules.IWordDetector; + +/** + * Word detector. + * + * An identifier is a list of alphanumeric and low line ("_") characters starting + * with a letter. The ISO Standard permits an implementation-defined set of national + * alphanumeric characters to be used in identifiers. XDS defines this set as empty. + */ +public class WordDetector implements IWordDetector +{ + public boolean isWordStart(char c) { + return Character.isLetter(c) || c == '_'; + } + + public boolean isWordPart(char c) { + return Character.isLetterOrDigit(c) || c == '_'; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/BaseSourceCodeTemplateContextType.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/BaseSourceCodeTemplateContextType.java new file mode 100644 index 0000000..f574f86 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/BaseSourceCodeTemplateContextType.java @@ -0,0 +1,108 @@ +package com.excelsior.xds.ui.editor.commons.template; + +import org.eclipse.jface.text.templates.GlobalTemplateVariables; +import org.eclipse.jface.text.templates.TemplateContext; +import org.eclipse.jface.text.templates.TemplateContextType; +import org.eclipse.jface.text.templates.TemplateVariable; + +import com.excelsior.xds.ui.editor.commons.template.BaseTemplateCompletionProcessor; +import com.excelsior.xds.ui.editor.commons.template.SourceCodeTemplateContext; + +/** + * A context type defines a context within which source code templates are resolved. + */ +public abstract class BaseSourceCodeTemplateContextType extends TemplateContextType { + public BaseSourceCodeTemplateContextType() { + addResolver(new GlobalTemplateVariables.Date()); + addResolver(new GlobalTemplateVariables.Cursor()); + addResolver(new GlobalTemplateVariables.Dollar()); + addResolver(new GlobalTemplateVariables.LineSelection()); + addResolver(new GlobalTemplateVariables.User()); + addResolver(new GlobalTemplateVariables.WordSelection()); + addResolver(new GlobalTemplateVariables.Year()); + addResolver(new GlobalTemplateVariables.Time()); + } + + @Override + public void resolve(TemplateVariable variable, TemplateContext context) { + try { // check nothing, all exceptions causes standard resolve() call + if (GlobalTemplateVariables.LineSelection.NAME.equals(variable.getType())) { + SourceCodeTemplateContext scontext = (SourceCodeTemplateContext)context; + String templateBody = scontext.getTemplateBody(); + StringBuilder sbInd = new StringBuilder(); + int voffs = variable.getOffsets()[0]; + for (int i=0; i';' or ';' and + // 'line_selection' value ends with ';' this last ';' in the value will be suppressed: + boolean suppressDup = templateBody.substring(voffs).startsWith(GlobalTemplateVariables.LineSelection.NAME + ';') + || templateBody.substring(voffs).startsWith(GlobalTemplateVariables.LineSelection.NAME + + GlobalTemplateVariables.Cursor.NAME + ';'); + + // Usual 'line_selection' value: + String selection= context.getVariable(GlobalTemplateVariables.SELECTION); + + // Suppress ';;' if need: + if (suppressDup && selection.endsWith(";")) { //$NON-NLS-1$ + selection = selection.substring(0, selection.length()-1); + } + + boolean mlsel = (selection.contains("\r") || selection.contains("\n")); //$NON-NLS-1$ //$NON-NLS-2$ + + // When 'indent' is not empty and selection is miltiline turn ON artificial intelligence: + // Lines in selection consists of some + . Replace 1st line with + // + + + // and each next line with + // + + + + // (INDENT_MAGIC indicates that this line shouldn't be indented when template + // will be inserted into the final document) + if (!indent.isEmpty() && mlsel) { + StringBuilder sb = new StringBuilder(); + int state = 0; + boolean line1 = true; + for (int i=0; i proposals) { + boolean usePrefix; + int selOffset; + int selLength; + + // For multiline selection: selection will be extended to whole lines but inserted template should be indented to + // selection start position. 'selShift' is the string to be inserted before selection lines to indent them: it + // requires to preserve tabs/spaces sequence at the start of the string: + String selShift = ""; + int docSize = 0; + boolean multilineSel = false; + String indents[] = {"",""}; + boolean cutTemplateCRLF = false; + + String selText; + { + ITextSelection selection= (ITextSelection) viewer.getSelectionProvider().getSelection(); + + // When typed prefix is used (== selection is empty) only matched to this prefix proposals + // should be returned. + // (the prefix will be deleted when template will be applied, and non-matched prefix too): + usePrefix = (selection.getLength() == 0); + + selOffset = selection.getOffset(); + selLength = selection.getLength(); + selText = selection.getText(); + + try { + IDocument document= viewer.getDocument(); + docSize = document.getLength(); + int selStartLine = selection.getStartLine(); + int selEndLine = selection.getEndLine(); + if (selEndLine > selStartLine) { + // for multilite selection extend selection to WHOLE lines + multilineSel = true; + StringBuilder sb = new StringBuilder(); + int selOffs = 0; + int selLen = 0; + for (int i=selStartLine; i<=selEndLine; ++i) { + IRegion r = document.getLineInformation(i); + String ld = document.getLineDelimiter(i); + String docstr = document.get(r.getOffset(), r.getLength()); + if (i == selStartLine) { + indents = getIndentations(docstr, selection.getOffset() - r.getOffset()); + } + sb.append(docstr); + if (ld != null) { + sb.append(ld); + } + if (i == selStartLine) { + selOffs = r.getOffset(); + for (int p=selOffs; p(p-selOffs) ? docstr.charAt(p-selOffs) : ' '; + if (ch != ' ' && ch !='\t') { // selection was started after text begins - indent anyway using spaces + ch = ' '; + } + selShift += ch; + } + } + if (i == selEndLine) { + selLen = r.getOffset() + r.getLength() - selOffs; + if (ld != null) { + selLen += ld.length(); + } + } + } // for + selText = sb.toString(); + selOffset = selOffs; + selLength = selLen; + } else { + IRegion r = document.getLineInformation(selEndLine); + String docstr = document.get(r.getOffset(), r.getLength()); + + indents = getIndentations(docstr, selection.getOffset() - r.getOffset()); + + // When template ended with CRLF is inserted into single line + // and this line has nothing but CRLF after insetrion region then + // it will produce udly empty line after insertion. + // Set 'cutTemplateCRLF' in this case: + int e = selOffset + selLength - r.getOffset(); // selection end pos in the line + cutTemplateCRLF = true; + if (e > r.getLength()) { + cutTemplateCRLF = false; // selection was up to selEndLine+1:pos=0, its CRLF will be deleted + } else if (e > 0 && e < r.getLength()) { + for (; e matches= new ArrayList(); + for (int i= 0; i < templates.length; i++) { + Template template= templates[i]; + if (!isEnabled(viewer, offset, template)) { + continue; + } + try { + context.getContextType().validate(template.getPattern()); + } catch (TemplateException e) { + continue; + } + if (template.matches(prefix, context.getContextType().getId())) { + ICompletionProposal t = createProposal(template, context, (IRegion) region, getRelevance(template, prefix)); + if (!usePrefix || ((TemplateProposal)t).getRelevance() == RELEVANCE_HIGH) { + matches.add(t); + } + } + } + + Collections.sort(matches, new Comparator() { + public int compare(ICompletionProposal t1, ICompletionProposal t2) { + return ((TemplateProposal)t2).getRelevance() - ((TemplateProposal)t1).getRelevance(); + } + }); + + proposals.addAll(matches); + } + + /** + * Subclasses override to decide, whether the given template is enabled at offset. + * @param viewer + * @param offset + * @param template + * @return + */ + protected abstract boolean isEnabled(ITextViewer viewer, int offset, Template template); + + /** + * Returns the indentation strings (withtabs and spaces). + * [0] - It is tabs and spaces from start of 'str' up to 1st non-blank char + * [1] - It is tabs and spaces from 'pos' to 1st non-blank char (or "") - it is + * used to indent 1st insertion string in case of single-line selection + * + * @return the indentation strings + */ + private String[] getIndentations(String str, int pos) { + if (pos < 0) pos = 0; + if (pos > str.length()) pos = str.length(); + int len = str.length(); + + String res[] = {"", ""}; + for (int i=0; i= pos) { + res[1] += ch; + } + } else { + break; + } + } + return res; + } + + + protected ICompletionProposal createProposal(Template template, TemplateContext context, IRegion region, int relevance) { + return new TemplateProposalExtension(template, context, region, getImage(template), relevance); + } + + class TemplateProposalExtension extends TemplateProposal implements ICompletionProposalExtension2, ICompletionProposalExtension4 { + + //XXX uncomment it to disable template animation near templat eselection dialog +// public String getAdditionalProposalInfo() { +// return null; +// } + + public TemplateProposalExtension(Template template, + TemplateContext context, IRegion region, Image image, + int relevance) { + super(template, context, region, image, relevance); + } + + public TemplateProposalExtension(Template template, + TemplateContext context, IRegion region, Image image) { + super(template, context, region, image); + } + + @Override + public void apply(ITextViewer viewer, char trigger, int stateMask, int offset) { + super.apply(viewer, trigger, stateMask, offset); + } + + protected ITextSelection getTextSelection() { + ITextSelection textSelection = null; + IEditorPart editorPart = PlatformUI.getWorkbench() + .getActiveWorkbenchWindow().getActivePage().getActiveEditor(); + if (editorPart instanceof ITextEditor) { + ITextEditor textEditor = (ITextEditor) editorPart; + ISelection selection = textEditor.getSelectionProvider() + .getSelection(); + if (selection instanceof ITextSelection) { + textSelection = (ITextSelection) selection; + } + } + return textSelection; + } + + public boolean validate(IDocument document, int offset, DocumentEvent event) { + try { + int replaceOffset= getReplaceOffset(); + if (offset >= replaceOffset) { + String content= document.get(replaceOffset, offset - replaceOffset); + int blankSpace = -1; + while(++blankSpace < content.length()) { + char c = content.charAt(blankSpace); + if (c != ' ' && c != '\t') { + break; + } + } + content = content.substring(blankSpace); + return false; +// return this.getTemplate().getName().toLowerCase().startsWith(content.toLowerCase()); + } + } catch (BadLocationException e) { + // concurrent modification - ignore + } + return false; + } + + @Override + public boolean isAutoInsertable() { + return false; + } + + } + + private final class CompletionListener implements ICompletionListener, ICompletionListenerExtension { + @Override + public void selectionChanged(ICompletionProposal proposal, + boolean smartToggle) { + } + + @Override + public void assistSessionStarted(ContentAssistEvent event) { + isAutoActivated = event.isAutoActivated; + } + + @Override + public void assistSessionEnded(ContentAssistEvent event) { + } + + @Override + public void assistSessionRestarted(ContentAssistEvent event) { + } + } +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/SourceCodeTemplateContext.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/SourceCodeTemplateContext.java new file mode 100644 index 0000000..66a2357 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/template/SourceCodeTemplateContext.java @@ -0,0 +1,362 @@ +/* + * Modification date: $date$ + * + * Copyright (C) José David Moreno Juárez + * 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 + */ +package com.excelsior.xds.ui.editor.commons.template; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.templates.DocumentTemplateContext; +import org.eclipse.jface.text.templates.Template; +import org.eclipse.jface.text.templates.TemplateBuffer; +import org.eclipse.jface.text.templates.TemplateContextType; +import org.eclipse.jface.text.templates.TemplateException; +import org.eclipse.jface.text.templates.TemplateTranslator; +import org.eclipse.jface.text.templates.TemplateVariable; + +import com.excelsior.xds.core.log.LogHelper; + +/** + * Context for source code templates. + * + * @see org.eclipse.jface.text.templates.TemplateContext + */ +public class SourceCodeTemplateContext extends DocumentTemplateContext { + + private String templateBody; + private String selShift; + private int endBackOffset; // end of the affected area == (document_length - position_after_affected_area) + private boolean multilineSel; + private String[] indents; + private boolean cutTemplateCRLF; + + /** + * Creates a new Modula2TemplateContext. + * + * @param type template context type + * @param document document of the context + * @param offset offset of the context (1st affected position) + * @param length length of the context + * @param selShift string to use for indentation when there was multiline selection ( {' '|'\t'}* ) + * @param docSize initial document size + * @param multilineSel true when selection is multiline + * @param indents[] [0] - indent, [1] indent for 1st line when selection is singleline + * @param cutTemplateCRLF cut last CRLF if any + * + */ + public SourceCodeTemplateContext(TemplateContextType type, IDocument document, int offset, int length, String selShift, int docSize, + boolean multilineSel, String indents[], boolean cutTemplateCRLF) { + super(type, document, offset, length); + this.selShift = selShift; + this.endBackOffset = docSize - (offset + length); + this.multilineSel = multilineSel; + this.indents = indents; + this.cutTemplateCRLF = cutTemplateCRLF; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.text.templates.DocumentTemplateContext#evaluate(org.eclipse.jface.text.templates.Template) + */ + @Override + public TemplateBuffer evaluate(Template template) throws BadLocationException, TemplateException { + + TemplateTranslator translator= new TemplateTranslator(); + TemplateBuffer buffer= translator.translate(template); + + templateBody = buffer.getString(); // required to process multiline 'line_selection' + + getContextType().resolve(buffer, this); + + getIndentation(); + + ///* Indents the variables */ + //TemplateVariable[] variables = indentVariableOffsets(buffer, indentation.length()); + TemplateVariable[] variables = buffer.getVariables(); + + /* Indents the template */ + String formattedTemplate = doIndent(buffer.getString(), variables, indents); + + if (cutTemplateCRLF) { + if (formattedTemplate.endsWith("\r\n")) { + formattedTemplate = formattedTemplate.substring(0, formattedTemplate.length()-2); + } else if (formattedTemplate.endsWith("\n")) { + formattedTemplate = formattedTemplate.substring(0, formattedTemplate.length()-1); + } + } + + buffer.setContent(formattedTemplate, variables); + + return buffer; + } + + /** + * Returns the indentation string (tabs and spaces) from the insertion point line. + * + * @return the indentation string + */ + private String getIndentation() { + StringBuilder res = new StringBuilder(); + IDocument document= getDocument(); + try { + IRegion region= document.getLineInformationOfOffset(getStart()); + String lineContent= document.get(region.getOffset(), region.getLength()); + for (int i=0; i0) { + // it is indent from template before 'line_selection': + sb.append(line.substring(0,p)); + line = line.substring(p); + pos +=p; + resPos += p; + p = 0; + } + // drop INDENT_MAGIC: + cx = -BaseTemplateCompletionProcessor.INDENT_MAGIC.length(); + sb.append(line.substring(-cx)); + } + // move affected variables offsets: + //System.out.println(String.format("** move: %d at resPos %d (pos %d)", cx, resPos, pos)); + for (TemplateVariable v : variables) { + int[] offsets = v.getOffsets(); + for (int k = 0; k < offsets.length; k++) { + if (cx > 0) { + if (offsets[k] >= resPos) { + //System.out.println(String.format("++ %s[%d] += %d", v.getName(), offsets[k], cx)); + offsets[k] += cx; + } + } else { + if (offsets[k] >= resPos - cx) { + //System.out.println(String.format("-- %s[%d] += %d", v.getName(), offsets[k], cx)); + offsets[k] += cx; + } + } + } + v.setOffsets(offsets); + } + pos += line.length(); + resPos += line.length()+cx; + for (char ch : line.toCharArray()) { + if (ch != ' ' && ch != '\t') { + line1=false; + break; + } + } + } + //dumpVars4dbg(sb.toString(), variables); + return sb.toString(); + } + +// private static void dumpVars4dbg(String s, TemplateVariable[] variables) { +// System.out.println("----------"); +// for (TemplateVariable v : variables) { +// System.out.println("Name='" + v.getName() + "'"); +// int[] offsets = v.getOffsets(); +// int len = v.getLength(); +// for (int k = 0; k < offsets.length; k++) { +// if (offsets[k] > s.length()) { +// System.out.println(" Offs out of str - " + offsets[k]); +// } else if (offsets[k] + len > s.length()) { +// System.out.println(" Offs+len out of str - " + offsets[k] + " " + len); +// if (offsets[k] < s.length()) { +// System.out.println(" Val[..eol] - '" + s.substring(offsets[k]) + "'"); +// } +// } else { +// System.out.println(" Offs/len - " + offsets[k] + "/" + len); +// System.out.println(" Val - '" + s.substring(offsets[k], offsets[k]+len) + "'"); +// } +// } +// } +// } + + private static String nextLine(String str, int pos) { + StringBuilder sb = new StringBuilder(); + boolean wait0xA = false; + while(pos < str.length()) { + char ch = str.charAt(pos++); + if (wait0xA && ch!=0xA) { + break; // single 0xD is a line delimiter + } + sb.append(ch); + if (ch == 0xD) { + wait0xA = true; + } else if (ch == 0xA) { + break; + } + } + return sb.toString(); + } + + /** + * Shifts the variable offsets according to the current indentation level. + * + * @param buffer template buffer + * @param currentIndentation current indentation level + * @return the variable offsets according to the current indentation level + */ + @SuppressWarnings("unused") + private static TemplateVariable[] indentVariableOffsets(TemplateBuffer buffer, int currentIndentation) { + String content = buffer.getString(); + TemplateVariable[] variables = buffer.getVariables(); + List lineBreaks = getLinebreaksList(content); + int line; + for (int j = 0; j < variables.length; j++) { + int[] offsets = variables[j].getOffsets(); + + for (int k = 0; k < offsets.length; k++) { + + line = getLineOfOffset(offsets[k], lineBreaks); + + offsets[k] = offsets[k] + (line * currentIndentation); + } + variables[j].setOffsets(offsets); + } + + return variables; + } + + /** + * Returns a list with the positions where the lines ends (with total string length as a last element). + * (i.e.: for "ABC\nDEF" it returns [3, 7], for "\nA\nB\n" it returns [0, 2, 4, 5]) + * @param string string to search for line offsets + * @return a list with the positions where the lines of the string start + */ + private static List getLinebreaksList(String string) { + final char lastEolChar = System.getProperty("line.separator").charAt(System.getProperty("line.separator").length()-1); //$NON-NLS-1$ //$NON-NLS-2$ + + List lineOffsetsList = new ArrayList(); + int len = string.length(); + for (int i=0; i lineBreaks) { + int len = lineBreaks.size(); + for (int i=0; i doclen) { + return null; + } + char begCh = 0; + int idx = -1; + if (offs > 0) { + // Try char on the left of caret: + begCh = document.getChar(offs - 1); + idx = BRACE_PAIRS.indexOf(begCh); + } + if (idx < 0) { + // No bracket on the left. Try the caret position (move offs+=1 and try it): + ++offs; + if (offs <= doclen) { + begCh = document.getChar(offs - 1); + idx = BRACE_PAIRS.indexOf(begCh); + } + } + + if (idx < 0) { + return null; + } + int pos = offs-1; + + // Bracket 'ch' found at [pos] + int pos0 = pos; + int step = ((idx & 0x1) == 0) ? 1 : -1; // open/close bracket + + ITypedRegion partition = getPartition(document, pos); + + final String partType = partition.getType(); + + // Search direction depends on step. Search area is current partition if the partition type + // is not 'CONTENT_TYPE_DEFAULT' or all document in other case + int minPos = 0; + int maxPos = doclen-1; + if (!partType.equals(fDefaultPartition)) { + minPos = Math.max(0, partition.getOffset()); + maxPos = Math.min(maxPos, partition.getOffset() + partition.getLength() - 1); + } + char pairCh = BRACE_PAIRS.charAt(idx ^ 0x1); + + fAnchor = step > 0 ? LEFT : RIGHT; + + int deep = 1; + while(true) { + pos += step; + if (pos < minPos || pos>maxPos) { + // unmatched + fMatchFlags |= MATCH_FLAG_NO_MATCH; + return new Region(pos0, 1); + } + if (getPartition(document, pos).getType().equals(partType)) { + // skip other partitions (required in default partition) + char c = document.getChar(pos); + if (c == begCh) { + ++deep; + } else if (c == pairCh) { + if (--deep == 0) { + break; + } + } + } + } // while + + // While was breaked => found: + if (step > 0) { + fAnchor = LEFT; + return new Region(pos0, pos-pos0+1); + } else { + fAnchor = RIGHT; + return new Region(pos, pos0-pos+1); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/text/PairedBracketsPainter.java b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/text/PairedBracketsPainter.java new file mode 100644 index 0000000..957fb36 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.commons/src/com/excelsior/xds/ui/editor/commons/text/PairedBracketsPainter.java @@ -0,0 +1,412 @@ +package com.excelsior.xds.ui.editor.commons.text; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IPaintPositionManager; +import org.eclipse.jface.text.IPainter; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextViewerExtension2; +import org.eclipse.jface.text.ITextViewerExtension5; +import org.eclipse.jface.text.Position; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.TextAttribute; +import org.eclipse.jface.text.source.ICharacterPairMatcher; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.RGB; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Display; + +import com.excelsior.xds.ui.commons.utils.UiUtils; + +/** + * A painter is responsible for creating, managing, updating, and removing + * visual decorations of highlighting brackets pair. + * + * @author fsa + */ +public class PairedBracketsPainter implements IPainter, PaintListener { + + /** Indicates whether this painter is active. */ + private boolean fIsActive = false; + /** The source viewer this painter is attached to. */ + private ISourceViewer fSourceViewer; + /** The viewer's widget. */ + private StyledText fTextWidget; + + private PairedBracketsMatcher fMatcher; + + private Color fColor; + private Color fNoMatchColor; + private Color fFontColor; + + private IPaintPositionManager fPaintPositionManager; + private Position fPairPosition= new Position(0, 0); + private int fAnchor; + private int fMatchFlags; + private int fFontStyle; + private RGB fLastFontRgb; + + public static final RGB DEF_RGB_MATCHED = new RGB(204, 230, 255); + public static final RGB DEF_RGB_UNMATCHED = new RGB(255, 220, 220); + + public static void installToEditor( ISourceViewer isv + , PairedBracketsMatcher matcher + , IPreferenceStore store + , String keyHighlightMatch + , String keyColor, String keyColorNoMatch ) + { + if (isv instanceof ITextViewerExtension2) { + new PainterOnOffManager(isv, matcher, store, keyHighlightMatch, keyColor, keyColorNoMatch); + } + } + + private static class PainterOnOffManager { + private PairedBracketsPainter painter; + private PairedBracketsMatcher matcher; + private ISourceViewer isv; + private IPreferenceStore store; + private final String keyHighlightMatch; + private final String keyColor, keyColorNoMatch; + + public PainterOnOffManager( ISourceViewer isv + , PairedBracketsMatcher matcher + , IPreferenceStore store + , String keyHighlightMatch + , String keyColor, String keyColorNoMatch ) + { + this.isv = isv; + this.store = store; + this.keyHighlightMatch = keyHighlightMatch; + this.keyColor = keyColor; + this.keyColorNoMatch = keyColorNoMatch; + this.matcher = matcher; + store.addPropertyChangeListener(new IPropertyChangeListener() { + @Override + public void propertyChange(PropertyChangeEvent event) { + reReadStore(event); + } + }); + reReadStore(null); + } + + private void reReadStore(PropertyChangeEvent event) { + String p = event!=null ? event.getProperty() : null; + + if (p != null && painter != null) { + if (p.equals(keyColor)) { + painter.setRgb(getRgb(keyColor, DEF_RGB_MATCHED), true); + } else if (p.equals(keyColorNoMatch)) { + painter.setNoMatchRgb(getRgb(keyColorNoMatch, DEF_RGB_UNMATCHED), true); + } + } + + if (p == null || p.equals(keyHighlightMatch)) { + if (store.getBoolean(keyHighlightMatch)) { + showMatching(); + } else { + hideMatching(); + } + } + } + + private void showMatching() { + if (painter == null) { + painter= new PairedBracketsPainter(isv, matcher); + painter.setRgb (getRgb(keyColor, DEF_RGB_MATCHED), false); + painter.setNoMatchRgb(getRgb(keyColorNoMatch, DEF_RGB_UNMATCHED), false); + ((ITextViewerExtension2)isv).addPainter(painter); + } + } + + private void hideMatching() { + if (painter != null) { + ((ITextViewerExtension2)isv).removePainter(painter); + painter.deactivate(true); + painter.dispose(); + painter= null; + } + } + + private RGB getRgb(String key, RGB defVal) { + return store.contains(key) ? PreferenceConverter.getColor(store, key) : defVal; + } + + } + + + + + private PairedBracketsPainter( ISourceViewer sourceViewer + , PairedBracketsMatcher matcher ) + { + fSourceViewer = sourceViewer; + fMatcher = matcher; + fTextWidget = sourceViewer.getTextWidget(); + fColor = new Color(Display.getDefault(), DEF_RGB_MATCHED); // to don't NPE on problems with store + } + + private void setRgb(RGB rgb, boolean redraw) { + UiUtils.dispose(fColor); + fColor = new Color(Display.getDefault(), rgb); + if (redraw) { + handleDrawRequest(null); + } + } + + private void setNoMatchRgb(RGB rgb, boolean redraw) { + UiUtils.dispose(fNoMatchColor); + fNoMatchColor = new Color(Display.getDefault(), rgb); + if (redraw) { + handleDrawRequest(null); + } + } + + /* + * @see org.eclipse.jface.text.IPainter#dispose() + */ + @Override + public void dispose() { + if (fMatcher != null) { + fMatcher.clear(); + fMatcher= null; + } + + UiUtils.dispose(fColor); + UiUtils.dispose(fNoMatchColor); + UiUtils.dispose(fFontColor); + fTextWidget = null; + fSourceViewer = null; + } + + /* + * @see org.eclipse.jface.text.IPainter#deactivate(boolean) + */ + @Override + public void deactivate(boolean redraw) { + if (fIsActive) { + fIsActive= false; + fTextWidget.removePaintListener(this); + if (fPaintPositionManager != null) + fPaintPositionManager.unmanagePosition(fPairPosition); + if (redraw) + handleDrawRequest(null); + } + } + + /* + * @see org.eclipse.swt.events.PaintListener#paintControl(org.eclipse.swt.events.PaintEvent) + */ + @Override + public void paintControl(PaintEvent event) { + if (fTextWidget != null) + handleDrawRequest(event.gc); + } + + /** + * Handles a redraw request. + * + * @param gc the GC to draw into. + */ + private void handleDrawRequest(GC gc) { + + if (fPairPosition.isDeleted) + return; + + int offset= fPairPosition.getOffset(); + int length= fPairPosition.getLength(); + if (length < 1) + return; + + if (fSourceViewer instanceof ITextViewerExtension5) { + ITextViewerExtension5 extension= (ITextViewerExtension5) fSourceViewer; + IRegion widgetRange= extension.modelRange2WidgetRange(new Region(offset, length)); + if (widgetRange == null) + return; + + try { + // don't draw if the pair position is really hidden and widgetRange just + // marks the coverage around it. + IDocument doc= fSourceViewer.getDocument(); + int startLine= doc.getLineOfOffset(offset); + int endLine= doc.getLineOfOffset(offset + length); + if (extension.modelLine2WidgetLine(startLine) == -1 || extension.modelLine2WidgetLine(endLine) == -1) + return; + } catch (BadLocationException e) { + return; + } + + offset= widgetRange.getOffset(); + length= widgetRange.getLength(); + + } else { + IRegion region= fSourceViewer.getVisibleRegion(); + if (region.getOffset() > offset || region.getOffset() + region.getLength() < offset + length) + return; + offset -= region.getOffset(); + } + + boolean digraph = ((fMatchFlags & PairedBracketsMatcher.MATCH_FLAG_DIGRAPH) != 0); + int cx = digraph ? 1 : 0; + + if (ICharacterPairMatcher.RIGHT == fAnchor) + draw(gc, offset + length -1 - cx, offset, cx); + else + draw(gc, offset, offset + length -1 - cx, cx); + } + + /** + * Highlights the given widget region. + * + * @param gc the GC to draw into + * @param curOffset - offset of the bracket near cursor position + * @param pairOffset - offset of the pair bracket + */ + private void draw(GC gc, int curOffset, int pairOffset, int cx) { + boolean isMatch = ((fMatchFlags & PairedBracketsMatcher.MATCH_FLAG_NO_MATCH) == 0); + int len = fTextWidget.getCharCount()-1; + if (len < 0) { + return; + } + int co = curOffset = Math.min(curOffset, len); + int po = pairOffset = isMatch ? Math.min(pairOffset, len) : -1; + if (po >= 0 && po < co) { + int tmp = co; + co = po; + po = tmp; + } + + if (gc != null) { + gc.setBackground(isMatch ? fColor : fNoMatchColor); + gc.setForeground(fFontColor); + + Font fontOld = gc.getFont(); + Font fontNew = UiUtils.modifyFont(gc.getDevice(), fontOld, fFontStyle); + gc.setFont(fontNew); + + for (int offs = co; offs >= 0; offs = po, po = -1) { + int ll = Math.min(offs+cx, len); + Rectangle curBounds = fTextWidget.getTextBounds(offs, ll); + + // old frame-style: + // gc.drawRectangle(curBounds.x, curBounds.y, curBounds.width - 1, curBounds.height - 1); + + gc.fillRectangle(curBounds.x, curBounds.y, curBounds.width, curBounds.height); + String txt = fTextWidget.getTextRange(offs, ll-offs+1); + gc.drawText(txt, curBounds.x, curBounds.y, SWT.DRAW_TRANSPARENT); + + if ((fFontStyle & TextAttribute.STRIKETHROUGH) != 0) { + gc.drawLine(curBounds.x, curBounds.y + curBounds.height / 2, curBounds.x + curBounds.width - 1, curBounds.y + curBounds.height / 2); + } + + if ((fFontStyle & TextAttribute.UNDERLINE) != 0) { + gc.drawLine(curBounds.x, curBounds.y + curBounds.height - 1, curBounds.x + curBounds.width - 1, curBounds.y + curBounds.height - 1); + } + + } + + gc.setFont(fontOld); + fontNew.dispose(); + } else { + int x = Math.min(1+cx, len-co); + if (x>0) { + fTextWidget.redrawRange(co, x, true); + } + if (isMatch) { + x = Math.min(1+cx, len-po); + if (x > 0) { + fTextWidget.redrawRange(po, x, true); + } + } + } + } + + /* + * @see org.eclipse.jface.text.IPainter#paint(int) + */ + @Override + public void paint(int reason) { + + IDocument document= fSourceViewer.getDocument(); + if (document == null) { + deactivate(false); + return; + } + + Point selection= fSourceViewer.getSelectedRange(); + if (selection.y > 0) { + deactivate(true); + return; + } + + IRegion pair= fMatcher.match(document, selection.x); + if (pair == null) { + deactivate(true); + return; + } + + if (fIsActive) { + + if (IPainter.CONFIGURATION == reason) { + + // redraw current highlighting + handleDrawRequest(null); + + } else if (pair.getOffset() != fPairPosition.getOffset() || + pair.getLength() != fPairPosition.getLength() || + fMatcher.getAnchor() != fAnchor || fMatcher.getMatchFlags() != fMatchFlags) + { + + // otherwise only do something if position is different + + // remove old highlighting + handleDrawRequest(null); + // update position + updatePos(pair); + // apply new highlighting + handleDrawRequest(null); + + } + } else { + fIsActive = true; + updatePos(pair); + fTextWidget.addPaintListener(this); + fPaintPositionManager.managePosition(fPairPosition); + handleDrawRequest(null); + } + } + + private void updatePos(IRegion pair) { + fPairPosition.isDeleted= false; + fPairPosition.offset= pair.getOffset(); + fPairPosition.length= pair.getLength(); + fAnchor = fMatcher.getAnchor(); + fFontStyle = fMatcher.getFontStyle(); + fMatchFlags = fMatcher.getMatchFlags(); + RGB rgb = fMatcher.getRGB(); + if (!rgb.equals(fLastFontRgb)) { + UiUtils.dispose(fFontColor); + fFontColor = new Color(Display.getDefault(), rgb); + } + } + + /* + * @see org.eclipse.jface.text.IPainter#setPositionManager(org.eclipse.jface.text.IPaintPositionManager) + */ + @Override + public void setPositionManager(IPaintPositionManager manager) { + fPaintPositionManager= manager; + } +} + diff --git a/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktContentViewerCreator.java b/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktContentViewerCreator.java new file mode 100644 index 0000000..e06adff --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktContentViewerCreator.java @@ -0,0 +1,19 @@ +package com.excelsior.xds.ui.editor.dbgscript.compare; + +import org.eclipse.compare.CompareConfiguration; +import org.eclipse.compare.IViewerCreator; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.widgets.Composite; + +public class PktContentViewerCreator implements IViewerCreator { + + public PktContentViewerCreator() { + } + + @Override + public Viewer createViewer(Composite parent, CompareConfiguration config) { + config.setLeftEditable(false); + config.setRightEditable(false); + return new PktMergeViewer(parent, config); + } +} diff --git a/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktMergeViewer.java b/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktMergeViewer.java new file mode 100644 index 0000000..91e0461 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.dbgscript/src/com/excelsior/xds/ui/editor/dbgscript/compare/PktMergeViewer.java @@ -0,0 +1,46 @@ +package com.excelsior.xds.ui.editor.dbgscript.compare; + +import org.eclipse.compare.CompareConfiguration; +import org.eclipse.compare.contentmergeviewer.TextMergeViewer; +import org.eclipse.jface.text.IDocumentPartitioner; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.jface.text.source.SourceViewerConfiguration; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.internal.editors.text.EditorsPlugin; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.editor.dbgscript.DbgScriptDocumentSetupParticipant; +import com.excelsior.xds.ui.editor.dbgscript.DbgScriptEditor; +import com.excelsior.xds.ui.editor.dbgscript.DbgScriptSourceViewerConfiguration; +import com.excelsior.xds.ui.editor.dbgscript.IDbgScriptPartitions; + +@SuppressWarnings("restriction") +public class PktMergeViewer extends TextMergeViewer{ + private final TokenManager tokenManager = new TokenManager(); + + public PktMergeViewer(Composite parent, CompareConfiguration configuration) { + super(parent, configuration); + } + + @Override + protected void configureTextViewer(TextViewer textViewer) { + if (textViewer instanceof SourceViewer) { + ((SourceViewer)textViewer).configure(getSourceViewerConfiguration()); + } + } + + @Override + protected String getDocumentPartitioning() { + return IDbgScriptPartitions.PKT_PARTITIONING; + } + + private SourceViewerConfiguration getSourceViewerConfiguration() { + return new DbgScriptSourceViewerConfiguration(tokenManager, EditorsPlugin.getDefault().getPreferenceStore(), DbgScriptEditor.eolCommentPrefix); + } + + @Override + protected IDocumentPartitioner getDocumentPartitioner() { + return DbgScriptDocumentSetupParticipant.createDocumentPartitioner(); + } +} diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/.classpath b/product/com.excelsior.xds.ui.editor.nl_ru/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/.project b/product/com.excelsior.xds.ui.editor.nl_ru/.project new file mode 100644 index 0000000..c7c37b4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/.settings/org.eclipse.core.resources.prefs b/product/com.excelsior.xds.ui.editor.nl_ru/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 0000000..f335b2a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +encoding/plugin_ru_1251.properties=cp1251 diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..95fc2a5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.ui.editor.nl_ru;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.ui.editor;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/build.properties b/product/com.excelsior.xds.ui.editor.nl_ru/build.properties new file mode 100644 index 0000000..80d1fc6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin_ru.properties,\ + fragment_ru.properties,\ + fragment.properties + diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/fragment.properties b/product/com.excelsior.xds.ui.editor.nl_ru/fragment.properties new file mode 100644 index 0000000..de7d01b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.editor Russian NLS Support diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..d5ddfc4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.ui.editor diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..1f13242 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.ui.editor diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..37c6a96 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru.properties @@ -0,0 +1,97 @@ +pluginName=XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b + +preferencePages.editor = \u0420\u0435\u0434\u0430\u043a\u0442\u043e\u0440 +preferencePages.templates = \u0428\u0430\u0431\u043b\u043e\u043d\u044b +preferencePages.codeStyle = \u0421\u0442\u0438\u043b\u044c \u043a\u043e\u0434\u0430 +preferencePages.formatter = \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 +preferencePages.markOccurrences = \u041c\u0435\u0442\u043a\u0438 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 + +editors.modEditor = \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 +editors.defEditor = \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +editors.ob2Editor = \u041e\u0431\u0435\u0440\u043e\u043d-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 +editors.odfEditor = \u041e\u0431\u0435\u0440\u043e\u043d-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0441\u0435\u0432\u0434\u043e-\u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +editors.txtTextFile = XDS p\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 +editors.prjFile = XDS \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 +editors.htmlEditor = \u0412\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u0439 Web-\u0431\u0440\u0430\u0443\u0437\u0435\u0440 +editors.symFileEditor = XDS p\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 + +contentTypes.prj = \u041f\u0440\u043e\u0435\u043a\u0442\u043d\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypes.res = \u0412\u044b\u0432\u043e\u0434 \u043f\u0430\u043a\u0435\u0442\u0430 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypes.txt = \u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypes.htm = \u0424\u0430\u0439\u043b HTML +contentTypes.ldp = \u0413\u0440\u0443\u043f\u043f\u0430 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypes.pkt = \u041f\u0430\u043a\u0435\u0442 \u043e\u0442\u043b\u0430\u0434\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b XDS +contentTypes.mod = \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c +contentTypes.def = \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 +contentTypes.ob2 = \u041e\u0431\u0435\u0440\u043e\u043d-2 \u043c\u043e\u0434\u0443\u043b\u044c +contentTypes.odf = \u041e\u0431\u0435\u0440\u043e\u043d-2 \u043f\u0441\u0435\u0432\u0434\u043e-\u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 + +templates.context.type.modula = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 + +xds.keybinding.scheme.name = XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 + +contexts.m2sources = \u0420\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0442\u0435\u043a\u0441\u0442\u0430 +contexts.m2sources.desc = \u0420\u0435\u0436\u0438\u043c \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0442\u0435\u043a\u0441\u0442\u0430 + +#--- Commands --- +commands.source.name = \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 +commands.source.desc = \u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c + +commands.toggleComment = \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0440\u0435\u0436\u0438\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f +commands.toggleComment.desc = \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0440\u0435\u0436\u0438\u043c \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a + +commands.AddBlockComment.name = \u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0431\u043b\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 +commands.AddBlockComment.desc = \u0417\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0432 \u0431\u043b\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 + +commands.RemoveBlockComment.name = \u0423\u0434\u0430\u043b\u0438\u0442\u044c \u0431\u043b\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439 +commands.RemoveBlockComment.desc = \u0423\u0434\u0430\u043b\u044f\u0435\u0442 \u0431\u043b\u043e\u0447\u043d\u044b\u0439 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0439, \u043e\u043a\u0440\u0443\u0436\u0430\u044e\u0449\u0438\u0439 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 + +commands.showHelp.name = \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 +commands.showHelp.desc = \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u043f\u0440\u0430\u0432\u043a\u0443 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043b\u044e\u0447\u0435\u0432\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 + +commands.showQuickOutline.name = \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u043c\u043e\u0434\u0443\u043b\u044f +commands.showQuickOutline.desc = \u041f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0445\u0435\u043c\u0443 \u0440\u0435\u0430\u043a\u0442\u0438\u0440\u0443\u0435\u043c\u043e\u0433\u043e \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043c\u043e\u0434\u0443\u043b\u044f + +commands.openDeclaration.name = \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 +commands.openDeclaration.desc = \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 + +commands.openCoupledModule.name = \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043f\u0430\u0440\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c +commands.openCoupledModule.desc = \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0438\u043b\u0438 \u043c\u043e\u0434\u0443\u043b\u044c \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0432 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 + +commands.modula.indent.name = \u041e\u0442\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0442\u0441\u0442\u0443\u043f\u044b +commands.modula.indent.desc = \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u0438\u0440\u0443\u0435\u0442 \u043e\u0442\u0441\u0442\u0443\u043f\u044b \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a + +commands.modula.format.name = \u041e\u0442\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c +commands.modula.format.desc = \u0424\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 + +commands.modula.toggleMarkOccurrences.name = \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 +commands.modula.toggleMarkOccurrences.desc = \u0420\u0430\u0437\u0440\u0435\u0448\u0430\u0435\u0442 \u0438\u043b\u0438 \u0437\u0430\u043f\u0440\u0435\u0449\u0430\u0435\u0442 \u043e\u0442\u043c\u0435\u0447\u0430\u0442\u044c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 \u0432 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445 +commands.modula.toggleMarkOccurrences.tooltip = \u041f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 + +commands.modula.selectEnclosingElement.name = \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u043b\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 +commands.modula.selectEnclosingElement.desc = \u0412\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043e\u0431\u044a\u0435\u043c\u043b\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445 + +commands.modula.restoreLastSelection.name = \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f +commands.modula.restoreLastSelection.desc = \u0412\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0432 \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430\u0445 + +commands.findDeclarations.name = \u041d\u0430\u0439\u0442\u0438 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f +commands.findDeclarations.desc = \u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 + +commands.findReferences.name = \u041d\u0430\u0439\u0442\u0438 \u0441\u0441\u044b\u043b\u043a\u0438 +commands.findReferences.desc = \u041d\u0430\u0445\u043e\u0434\u0438\u0442 \u0441\u0441\u044b\u043b\u043a\u0438 \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 + +#--- Hyperlinking --- +hyperlink.target.ModulaCode = \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 +hyperlink.detector.ModulaDeclaration = \u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 + +#--- Actions --- +OpenDeclarations_label=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 +OpenDeclarations_tooltip=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 + +annotation.occurrence=\u0412\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f Modula-2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 +annotation.writeOccurrence=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f Modula-2 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 +annotation.construction=\u0421\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 Modula-2 +spelling.default_engine_label=XDS \u0441\u043b\u0443\u0436\u0431\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 + +commands.toggleComment.name = \u0412\u043a\u043b/\u0412\u044b\u043a\u043b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 +commands.toggleComment.desc = \u0412\u043a\u043b/\u0412\u044b\u043a\u043b \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u0434\u043b\u044f \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..68c1b5a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,97 @@ +pluginName=XDS Ìîäóëà-2 ðåäàêòîðû + +preferencePages.editor = Ðåäàêòîð +preferencePages.templates = Øàáëîíû +preferencePages.codeStyle = Ñòèëü êîäà +preferencePages.formatter = Ôîðìàòèðîâàíèå +preferencePages.markOccurrences = Ìåòêè âõîæäåíèé + +editors.modEditor = Ìîäóëà-2 ðåäàêòîð ïðîãðàììíûõ ìîäóëåé +editors.defEditor = Ìîäóëà-2 ðåäàêòîð ìîäóëåé îïðåäåëåíèé +editors.ob2Editor = Îáåðîí-2 ðåäàêòîð ìîäóëåé +editors.odfEditor = Îáåðîí-2 ðåäàêòîð ïñåâäî-ìîäóëåé îïðåäåëåíèé +editors.txtTextFile = XDS påäàêòîð òåêñòîâûõ ôàéëîâ +editors.prjFile = XDS ðåäàêòîð ïðîåêòíûõ ôàéëîâ +editors.htmlEditor = Âíóòðåííèé Web-áðàóçåð +editors.symFileEditor = XDS påäàêòîð ñèìâîëüíûõ ôàéëîâ + +contentTypes.prj = Ïðîåêòíûé ôàéë ñèñòåìû XDS +contentTypes.res = Âûâîä ïàêåòà îòëàäêè ñèñòåìû XDS +contentTypes.txt = Òåêñòîâûé ôàéë ñèñòåìû XDS +contentTypes.htm = Ôàéë HTML +contentTypes.ldp = Ãðóïïà ïàêåòîâ îòëàäêè ñèñòåìû XDS +contentTypes.pkt = Ïàêåò îòëàäêè ñèñòåìû XDS +contentTypes.mod = Ìîäóëà-2 ïðîãðàììíûé ìîäóëü +contentTypes.def = Ìîäóëà-2 ìîäóëü îïðåäåëåíèé +contentTypes.ob2 = Îáåðîí-2 ìîäóëü +contentTypes.odf = Îáåðîí-2 ïñåâäî-ìîäóëü îïðåäåëåíèé + +templates.context.type.modula = XDS Ìîäóëà-2 + +xds.keybinding.scheme.name = XDS Ìîäóëà-2 + +contexts.m2sources = Ðåäàêòèðîâàíèå Ìîäóëà-2 òåêñòà +contexts.m2sources.desc = Ðåæèì ðåäàêòèðîâàíèÿ Ìîäóëà-2 òåêñòà + +#--- Commands --- +commands.source.name = Èñõîäíûé òåêñò +commands.source.desc = Äåéñòâèÿ äëÿ ðàáîòû ñ èñõîäíûì òåêñòîì + +commands.toggleComment = Ïåðåêëþ÷èòü ðåæèì êîììåíòàðèÿ +commands.toggleComment.desc = Ïåðåêëþ÷àåò ðåæèì êîììåíòàðèÿ äëÿ âûáðàííûõ ñòðîê + +commands.AddBlockComment.name = Äîáàâèòü áëî÷íûé êîììåíòàðèé +commands.AddBlockComment.desc = Çàêëþ÷àåò âûäåëåííûé ôðàãìåíò â áëî÷íûé êîììåíòàðèé + +commands.RemoveBlockComment.name = Óäàëèòü áëî÷íûé êîììåíòàðèé +commands.RemoveBlockComment.desc = Óäàëÿåò áëî÷íûé êîììåíòàðèé, îêðóæàþùèé âûäåëåííûé ôðàãìåíò + +commands.showHelp.name = Ïîêàçàòü ñïðàâêó êëþ÷åâîãî ñëîâà +commands.showHelp.desc = Ïîêàçûâàåò ñïðàâêó äëÿ âûáðàííîãî êëþ÷åâîãî ñëîâà + +commands.showQuickOutline.name = Ïîêàçàòü ñõåìó ìîäóëÿ +commands.showQuickOutline.desc = Ïîêàçûâàåò ñõåìó ðåàêòèðóåìîãî Ìîäóëà-2 ìîäóëÿ + +commands.openDeclaration.name = Îòêðûòü îáúÿâëåíèå +commands.openDeclaration.desc = Îòêðûâàåò â ðåäàêòîðå îáúÿâëåíèå âûáðàííîãî ýëåìåíòà + +commands.openCoupledModule.name = Îòêðûòü ïàðíûé ìîäóëü +commands.openCoupledModule.desc = Îòêðûâàåò ïàðíûé ìîäóëü îïðåäåëåíèé èëè ìîäóëü ðåàëèçàöèè â Ìîäóëà-2 ðåäàêòîðå + +commands.modula.indent.name = Îòêîððåêòèðîâàòü îòñòóïû +commands.modula.indent.desc = Êîððåêòèðóåò îòñòóïû âûäåëåííûõ ñòðîê + +commands.modula.format.name = Îòôîðìàòèðîâàòü +commands.modula.format.desc = Ôîðìàòèðóåò âûäåëåííûé òåêñò + +commands.modula.toggleMarkOccurrences.name = Ïåðåêëþ÷èòü îòîáðàæåíèå âõîæäåíèé +commands.modula.toggleMarkOccurrences.desc = Ðàçðåøàåò èëè çàïðåùàåò îòìå÷àòü âõîæäåíèÿ îáúåêòîâ â Ìîäóëà-2 ðåäàêòîðàõ +commands.modula.toggleMarkOccurrences.tooltip = Ïåðåêëþ÷èòü îòîáðàæåíèå âõîæäåíèé + +commands.modula.selectEnclosingElement.name = Âûäåëåíèå îáúåìëþùåãî ýëåìåíòà +commands.modula.selectEnclosingElement.desc = Âûäåëåíèå îáúåìëþùåãî ýëåìåíòà â Ìîäóëà-2 ðåäàêòîðàõ + +commands.modula.restoreLastSelection.name = Âîññòàíîâëåíèå âûäåëåíèÿ +commands.modula.restoreLastSelection.desc = Âîññòàíîâëåíèå âûäåëåíèÿ â Ìîäóëà-2 ðåäàêòîðàõ + +commands.findDeclarations.name = Íàéòè îáúÿâëåíèÿ +commands.findDeclarations.desc = Íàõîäèò îáúÿâëåíèÿ âûáðàííîãî ýëåìåíòà â ðàáî÷åé îáëàñòè + +commands.findReferences.name = Íàéòè ññûëêè +commands.findReferences.desc = Íàõîäèò ññûëêè íà âûáðàííûé ýëåìåíò â ðàáî÷åé îáëàñòè + +#--- Hyperlinking --- +hyperlink.target.ModulaCode = Ìîäóëà-2 ðåäàêòîð +hyperlink.detector.ModulaDeclaration = Îòêðûòü îáúÿâëåíèå + +#--- Actions --- +OpenDeclarations_label=Îòêðûòü îáúÿâëåíèå +OpenDeclarations_tooltip=Îòêðûòü â ðåäàêòîðå îáúÿâëåíèå âûáðàííîãî ýëåìåíòà + +annotation.occurrence=Âõîæäåíèÿ Modula-2 ñèìâîëà +annotation.writeOccurrence=Èçìåíåíèÿ çíà÷åíèÿ Modula-2 ñèìâîëà +annotation.construction=Ñòðóêòóðà îïåðàòîðîâ Modula-2 +spelling.default_engine_label=XDS ñëóæáà ïðîâåðêè îðôîãðàôèè + +commands.toggleComment.name = Âêë/Âûêë êîììåíòàðèè +commands.toggleComment.desc = Âêë/Âûêë êîììåíòàðèè äëÿ âûäåëåííûõ ñòðîê \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru.properties b/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru.properties new file mode 100644 index 0000000..2bb27dd --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru.properties @@ -0,0 +1,344 @@ +CodeStylePreferencePage_ExpandTreeToEdit=\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0438\u0442\u0435 \u0434\u0435\u0440\u0435\u0432\u043e \u0434\u043b\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043a \u0441\u0442\u0438\u043b\u044f \u043a\u043e\u0434\u0430 +CreateProfileDialog_InitFromProfile=\u0412\u0437\u044f\u0442\u044c \u0438\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0438\u0437 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0444\u0438\u043b\u044f +CreateProfileDialog_NameExists=\u041f\u0440\u043e\u0444\u0438\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u0438\u043c\u0435\u043d\u0435\u043c \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 +CreateProfileDialog_NewProfile=\u041d\u043e\u0432\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c +CreateProfileDialog_OpenEditDlg=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440 \u043f\u0440\u043e\u0444\u0438\u043b\u044f +CreateProfileDialog_ProfName=\u0418\u043c\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f +CreateProfileDialog_ProfNameEmpty=\u0418\u043c\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f \u043d\u0435 \u0437\u0430\u0434\u0430\u043d\u043e +MarkOccurrencesPreferencePage_LinkText=\u0412\u043d\u0435\u0448\u043d\u0438\u0439 \u0432\u0438\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0437\u043c\u0435\u043d\u0435\u043d \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 '\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438'. +MarkOccurrencesPreferencePage_MarkOccurrencesOfElement=\u041f\u043e\u043c\u0435\u0442\u0438\u0442\u044c \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u043c\u043e\u0434\u0443\u043b\u0435. +ModifyDialog_Export=\u042d\u043a\u0441\u043f\u043e\u0440\u0442... +ModifyDialog_ProfileName=\u0418\u043c\u044f \u043f\u0440\u043e\u0444\u0438\u043b\u044f + +ModulaContextualCompletionProcessor_CloseBlockComment=\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f +ModulaContextualCompletionProcessor_ClosePragma=\u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u0435 \u043f\u0440\u0430\u0433\u043c\u044b +ModulaContextualCompletionProcessor_ExternalDeps=\ - /{0}/\u0412\u043d\u0435\u0448\u043d\u0438\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 [{1}] +ModulaContextualCompletionProcessor_inProjectPath=\ - /{0}/{1} +ModulaContextualCompletionProcessor_SdkLibrary=\ - /{0}/\u0421\u0438\u0441\u0442\u0435\u043c\u043d\u0430\u044f \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 [{1}]/{2} +ModulaOccurrencesMarker_StructureOf=\u041a\u043e\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f '%s' +ModulaTokens_Text=\u041e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u043a\u0441\u0442 +ModulaTokens_Brackets=\u0421\u043a\u043e\u0431\u043a\u0438 +ModulaTokens_Numbers=\u0427\u0438\u0441\u043b\u0430 +ModulaTokens_Strings=\u0421\u0442\u0440\u043e\u043a\u0438 +ModulaTokens_SystemModuleKeywords=\u041e\u0431\u044a\u0435\u043a\u0442\u044b \u043c\u043e\u0434\u0443\u043b\u044f SYSTEM +ModulaTokens_Keywords=\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 +ModulaTokens_BuiltinConstants=\u0412\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b + +ModulaTokens_Pragmas=\u0422\u0435\u0445\u0442 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432 +ModulaTokens_PragmaKeywords=\u041a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0441\u043b\u043e\u0432\u0430 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432 +ModulaTokens_CompilerPragmas=\u041f\u0440\u0430\u0433\u043c\u044b \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 +ModulaTokens_InactiveCode=\u041d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 + +SyntaxColoringPreferencePage_Modula2=\u041c\u043e\u0434\u0443\u043b\u0430-2 + +ModulaTokens_Comments=\u041a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 +ModulaTokens_BlockComments=\u041c\u043d\u043e\u0433\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 +ModulaTokens_EndOfLineComments=\u041e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u044b\u0435 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 +ModulaTokens_TodoTask=\u0422\u0435\u0433\u0438 \u0437\u0430\u0434\u0430\u0447 + +DeclarationsSearchGroup_Declarations=\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f +EditorPreferencePage_HlghlightOperatorsStructure=\u041f\u043e\u0434\u0441\u0432\u0435\u0447\u0438\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 +EditorPreferencePage_LinkToAnnotationsPage=\u0426\u0432\u0435\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 '\u0410\u043d\u043d\u043e\u0442\u0430\u0446\u0438\u0438'. +EditorPreferencePage_LinkToColorSettingsPage=\u0426\u0432\u0435\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 '\u0420\u0430\u0441\u043a\u0440\u0430\u0441\u043a\u0430 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430'. +FindDeclarationsAction_SearchDeclsOfSelInWorkspace=\u041f\u043e\u0438\u0441\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 +FindDeclarationsAction_Workspace=\u0412 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 +FindDeclarationsProjectAction_Project=\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 +FindDeclarationsProjectAction_SearchDeclsOfSelInPrj=\u041f\u043e\u0438\u0441\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0439 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 +FindReferencesAction_SearchRefsToSelInWorkspace=\u041f\u043e\u0438\u0441\u043a \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 +FindReferencesAction_Workspace=\u0412 \u0440\u0430\u0431\u043e\u0447\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 +FindReferencesProjectAction_Project=\u0412 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 +FindReferencesProjectAction_SearchRefsToSelInPrj=\u041f\u043e\u0438\u0441\u043a \u0441\u0441\u044b\u043b\u043e\u043a \u043d\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 +FormatterModifyDialog_CantModifyDefProfile=\u041d\u0435\u043b\u044c\u0437\u044f \u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c +FormatterModifyDialog_Indentation=\u041e\u0442\u0441\u0442\u0443\u043f\u044b +FormatterModifyDialog_LineWrapping=\u041f\u0435\u0440\u0435\u043d\u043e\u0441 \u0441\u0442\u0440\u043e\u043a +FormatterModifyDialog_NewLines=\u041f\u0435\u0440\u0435\u0432\u043e\u0434\u044b \u0441\u0442\u0440\u043e\u043a +FormatterModifyDialog_WhiteSpace=\u041f\u0440\u043e\u0431\u0435\u043b\u044b +FormatterPreferencePage_ActiveProfile=\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043f\u0440\u043e\u0444\u0438\u043b\u044c +FormatterPreferencePage_Edit=&\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c +FormatterPreferencePage_ExportAll=\u042d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0441\u0435... +FormatterPreferencePage_Import=\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c... +FormatterPreferencePage_New=\u041d\u043e\u0432\u044b\u0439... +FormatterPreferencePage_Preview=\u041f\u0440\u0435\u0434\u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 +FormatterPreferencePage_Profile=\u041f\u0440\u043e\u0444\u0438\u043b\u044c '%s' +FormatterPreferencePage_Remove=\u0423\u0434\u0430\u043b\u0438\u0442\u044c +FormatterProfile_AssignInExpr=\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 ':=' +FormatterProfile_AssignInExpr2=\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 ':=' \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_AssignInModuleAlias=\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 ':=' \u0432 \u043e\u0431\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 +FormatterProfile_AssignInModuleAlias2=\u041f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0435 ':=' \u0432 \u043e\u0431\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0441\u0438\u043d\u043e\u043d\u0438\u043c\u043e\u0432 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 +FormatterProfile_BeginInMod=BEGIN \u0432 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 +FormatterProfile_BeginInProc=BEGIN +FormatterProfile_BeginInProc2=BEGIN \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445 +FormatterProfile_BinaryOps=\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 +FormatterProfile_Case=CASE +FormatterProfile_CaseInVarRec=CASE \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_CaseStatements=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b CASE +FormatterProfile_CaseStmt=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 CASE +FormatterProfile_Colon=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' +FormatterProfile_ColonFormParams=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u0432 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 +FormatterProfile_ColonFormParams2=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 +FormatterProfile_ColonInCase=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' +FormatterProfile_ColonInCase2=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 CASE +FormatterProfile_ColonInRetType=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 +FormatterProfile_ColonInRetType2=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u043f\u0435\u0440\u0435\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0438\u043f\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 +FormatterProfile_ColonInTypeDef=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 +FormatterProfile_ColonInVar=\u0414\u0432\u043e\u0435\u0442\u043e\u0447\u0438\u0435 ':' \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 +FormatterProfile_Comma=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' +FormatterProfile_CommaInEnum=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 +FormatterProfile_CommaInFormParams=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 +FormatterProfile_CommaInFormParams2=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_CommaInImportLists=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 +FormatterProfile_CommaInImportLists2=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 +FormatterProfile_CommaInMd=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' +FormatterProfile_CommaInMd2=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 +FormatterProfile_CommaInParList=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 +FormatterProfile_CommaInParList2=\u0417\u0430\u043f\u044f\u0442\u0430\u044f ',' \u0432 \u0441\u043f\u0438\u0441\u043a\u0430\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 +FormatterProfile_Constants=\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b +FormatterProfile_ConstGlob=CONST \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_ConstLoc=CONST \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_ControlStatements=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b +FormatterProfile_CtrlStmt=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b +FormatterProfile_DeclAndDefs=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f +FormatterProfile_Declarations=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f +FormatterProfile_Do=DO +FormatterProfile_Dot=\u0422\u043e\u0447\u043a\u0430 '.' +FormatterProfile_Dot2=\u0422\u043e\u0447\u043a\u0430 '.' +FormatterProfile_ElseInCase=ELSE \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 CASE +FormatterProfile_ElseInIf=ELSE \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 IF +FormatterProfile_ElseInVarRec=ELSE \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_Elsif=ELSIF +FormatterProfile_End=END +FormatterProfile_EndInMod=END +FormatterProfile_EndInMod2=END \u0432 \u043c\u043e\u0434\u0443\u043b\u044f\u0445 +FormatterProfile_EndInProc=END +FormatterProfile_EndInProc2=END \u0432 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430\u0445 +FormatterProfile_EndInRec=END \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 +FormatterProfile_EndInVarRec=END \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_EnumType=\u041f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0435 \u0442\u0438\u043f\u044b +FormatterProfile_Equ=\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e '=' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 +FormatterProfile_EquInConst=\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e '=' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 +FormatterProfile_EquInMd=\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e '=' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0442\u0438\u043f\u043e\u0432 +FormatterProfile_EquInMd2=\u0420\u0430\u0432\u0435\u043d\u0441\u0442\u0432\u043e '=' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0422\u0438\u043f\u043e\u0432 +FormatterProfile_Except=EXCEPT +FormatterProfile_Export=EXPORT +FormatterProfile_Expressions=\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f +FormatterProfile_Finally=FINALLY +FormatterProfile_For=FOR +FormatterProfile_From=FROM \u0432 \u043d\u0435\u043a\u0432\u0430\u043b\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0435 +FormatterProfile_If=IF +FormatterProfile_IfStatements=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b IF +FormatterProfile_Import=\u0418\u043c\u043f\u043e\u0440\u0442 +FormatterProfile_ImportSimple=IMPORT \u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u043c \u0438\u043c\u043f\u043e\u0440\u0442\u0435 +FormatterProfile_IndexExpr=\u0418\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f +FormatterProfile_LBracket=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '[' +FormatterProfile_LBracketInExpr=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '[' +FormatterProfile_LBracketInExpr2=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '[' \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_LBracketInRange=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '[' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 +FormatterProfile_Loop=LOOP +FormatterProfile_LParenth=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' +FormatterProfile_LParenthInEnum=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 +FormatterProfile_LParenthInExpr=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' +FormatterProfile_LParenthInExpr2=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_LParenthInProcCall=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' +FormatterProfile_LParenthInProcCall2=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' \u0432 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_LParenthInProcDecl=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' +FormatterProfile_LParenthInProcDecl2=\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' \u0432 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_Modules=\u041c\u043e\u0434\u0443\u043b\u0438 +FormatterProfile_OfInCase=OF \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 CASE +FormatterProfile_OfInVarRec=OF \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_OtherStatements=\u041f\u0440\u043e\u0447\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b +FormatterProfile_ParenthExpr=\u0421\u043a\u043e\u0431\u043a\u0438 \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_Procedure=PROCEDURE +FormatterProfile_Procedures=\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b +FormatterProfile_ProcInvoc=\u0412\u044b\u0437\u043e\u0432\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_PtrDeref=\u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f '^' +FormatterProfile_PtrDeref2=\u0420\u0430\u0437\u044b\u043c\u0435\u043d\u043e\u0432\u0430\u043d\u0438\u0435 \u0443\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044f '^' \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_Range=\u0414\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 '..' +FormatterProfile_Range2=\u0414\u0432\u0435 \u0442\u043e\u0447\u043a\u0438 '..' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 +FormatterProfile_RangeType=\u0414\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u044b +FormatterProfile_RBracket=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ']' +FormatterProfile_RBracketInExpr=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ']' +FormatterProfile_RBracketInExpr2=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ']' \u0432 \u0438\u043d\u0434\u0435\u043a\u0441\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_RBracketInRange=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043d\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ']' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u043e\u0432 +FormatterProfile_Record=RECORD +FormatterProfile_RecordType=\u0417\u0430\u043f\u0438\u0441\u0438 +FormatterProfile_Repeat=REPEAT +FormatterProfile_RParenth=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' +FormatterProfile_RParenthInEnum=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 +FormatterProfile_RParenthInExpr=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' +FormatterProfile_RParenthInExpr2=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' \u0432 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_RParenthInProcCall=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' +FormatterProfile_RParenthInProcCall2=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' \u0432 \u0432\u044b\u0437\u043e\u0432\u0430\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_RParenthInProcDecl=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' +FormatterProfile_RParenthInProcDecl2=\u0417\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' \u0432 \u043e\u0431\u044f\u043b\u0435\u043d\u0438\u044f\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +FormatterProfile_Semicolon=\u0422\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 ';' +FormatterProfile_Semicolon2=\u0422\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 ';' +FormatterProfile_SemicolonFormParams=\u0422\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 ';' \u0432 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 +FormatterProfile_SemicolonFormParams2=\u0422\u043e\u0447\u043a\u0430 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439 ';' \u0432 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 \u0444\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 +FormatterProfile_Separator=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c'|' +FormatterProfile_SeparatorInCase=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '|' +FormatterProfile_SeparatorInCase2=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '|' \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 CASE +FormatterProfile_SeparatorInRecordTypeDef=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '|' \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_SepInCase=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '|' \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 CASE +FormatterProfile_SepInVarRec=\u0420\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u044c '|' \u0432 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043d\u044b\u0445 \u0437\u0430\u043f\u0438\u0441\u044f\u0445 +FormatterProfile_SetsForAllBinaryOps=\u0411\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 +FormatterProfile_SetsForAllUnaryOps=\u0423\u043d\u0430\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 +FormatterProfile_StmtClosedParenthesis=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' +FormatterProfile_StmtClosedParenthesis2=\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u0437\u0430\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 ')' \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 +FormatterProfile_StmtOpenedParenthesis=\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' +FormatterProfile_StmtOpenedParenthesis2=\u041f\u0435\u0440\u0432\u0430\u044f \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0441\u043a\u043e\u0431\u043a\u0430 '(' \u0432 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430\u0445 +FormatterProfile_Then=THEN +FormatterProfile_TypeGlob=TYPE \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_TypeLoc=TYPE \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_Types=\u0422\u0438\u043f\u044b +FormatterProfile_UnaryOps=\u0423\u043d\u0430\u0440\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 +FormatterProfile_Until=UNTIL +FormatterProfile_VarGlob=VAR \u0432 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_Variables=\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 +FormatterProfile_VarLoc=VAR \u0432 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f\u0445 +FormatterProfile_While=WHILE +FormatterProfile_With=WITH +FormatterProfile_XdsBuiltIn=XDS [built-in] + +IndentationTabPage_DeclOfLocalMods=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 (\u0440\u0430\u0437\u043c\u0435\u0440) +IndentationTabPage_DeclOfLocalProcs=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 (\u0440\u0430\u0437\u043c\u0435\u0440) +IndentationTabPage_DeclOfRecFields=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u043b\u0435\u0439 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 +IndentationTabPage_DeclWithinModule=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043c\u043e\u0434\u0443\u043b\u044f +IndentationTabPage_DeclWithinProc=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b +IndentationTabPage_DeclWithinVCT=\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u0431\u043b\u043e\u043a\u0430 VAR/TYPE/CONST +IndentationTabPage_GeneralSettings=\u041e\u0431\u0449\u0438\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 +IndentationTabPage_Indent=\u041e\u0442\u0441\u0442\u0443\u043f +IndentationTabPage_IndentSize=\u0420\u0430\u0437\u043c\u0435\u0440 \u043e\u0442\u0441\u0442\u0443\u043f\u0430 +IndentationTabPage_Mixed=\u0421\u043c\u0435\u0448\u0430\u043d\u043d\u044b\u0439 +IndentationTabPage_Preview=\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 +IndentationTabPage_SpacesOnly=\u0422\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0431\u0435\u043b\u044b +IndentationTabPage_SpacesToWrappedLines=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u0435\u043b\u044b \u0434\u043b\u044f \u043e\u0442\u0441\u0442\u0443\u043f\u043e\u0432 \u0441\u0432\u0435\u0440\u043d\u0443\u0442\u044b\u0445 \u0441\u0442\u0440\u043e\u043a +IndentationTabPage_Statements=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0442\u0435\u043b \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432/\u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440/\u043c\u043e\u0434\u0443\u043b\u0435\u0439 +IndentationTabPage_StatementsInCase=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u043d\u0443\u0442\u0440\u0438 CASE +IndentationTabPage_StatementsInCaseAlt=\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432 CASE (\u0440\u0430\u0437\u043c\u0435\u0440) +IndentationTabPage_TabPolicy=\u0420\u0435\u0436\u0438\u043c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 +IndentationTabPage_TabSize=\u0420\u0430\u0437\u043c\u0435\u0440 \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 +IndentationTabPage_UseTabs=\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u044e + +SpellingPreferenceBlock_Advanced=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e +SpellingPreferenceBlock_BadDictFile=\u0423\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f +SpellingPreferenceBlock_Browse=\u041e\u0431\u0437\u043e\u0440... +SpellingPreferenceBlock_Dictionaries=\u0421\u043b\u043e\u0432\u0430\u0440\u0438 +SpellingPreferenceBlock_Dictionary=\u0421\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_Encoding=\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 +SpellingPreferenceBlock_IgnoreCapitalization=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 +SpellingPreferenceBlock_IgnoreM2Strings=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 Modula-2 +SpellingPreferenceBlock_IgnoreMixedCaseWords=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0441\u043b\u043e\u0432 +SpellingPreferenceBlock_IgnoreSingleLetters=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b +SpellingPreferenceBlock_IgnoreUpperCaseWords=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0431\u0443\u043a\u0432 +SpellingPreferenceBlock_IgnoreURLs=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c URL-\u044b +SpellingPreferenceBlock_IgnoreWordsWithDigits=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 +SpellingPreferenceBlock_InvalidInt='%s' \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c +SpellingPreferenceBlock_MaxProblems=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 +SpellingPreferenceBlock_MaxProposals=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 +SpellingPreferenceBlock_none=\u043d\u0435\u0442 +SpellingPreferenceBlock_NumberRequired=\u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e +SpellingPreferenceBlock_Options=\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b +SpellingPreferenceBlock_PlatformDictionary=\u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b +SpellingPreferenceBlock_RWAccessRequired=\u0424\u0430\u0439\u043b \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 +SpellingPreferenceBlock_SelectUserDictionary=\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_UserDefDictionary=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_UserDictDesc=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c - \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 +SpellingPreferenceBlock_Variables=\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435... + +XdsEditorPreferencePage_link=\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430. \u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0430 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 '\u0422\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0435 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u044b' \u0438 '\u0426\u0432\u0435\u0442\u0430 \u0438 \u0448\u0440\u0438\u0444\u0442\u044b'. +XdsEditorPreferencePage_HighlightBrackets=\u0412\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043f\u0430\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438 +XdsEditorPreferencePage_MatchedBracketsColor=\u0426\u0432\u0435\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u043f\u0430\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a +XdsEditorPreferencePage_UnmatchedBracketsColor=\u0426\u0432\u0435\u0442 \u043f\u043e\u0434\u0441\u0432\u0435\u0442\u043a\u0438 \u043d\u0435\u043f\u0430\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a +XdsEditorPreferencePage_HighlightInactiveCode=\u0412\u044b\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0435\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043a\u043e\u0434 + +XdsOutlineFilter_ConstantsName=\u041a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b +XdsOutlineFilter_ConstantsDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442 \u0438 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0438\u043c\u043e\u0433\u043e \u0442\u0438\u043f\u0430 + +XdsOutlineFilter_ImportName=\u0421\u043f\u0438\u0441\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 +XdsOutlineFilter_ImportDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0441\u0435 \u0441\u043f\u0438\u0441\u043a\u0438 \u0438\u043c\u043f\u043e\u0440\u0442\u0430 + +XdsOutlineFilter_LocModulesName=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 +XdsOutlineFilter_LocModulesDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 + +XdsOutlineFilter_ProceduresName=\u041f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u044b +XdsOutlineFilter_ProceduresDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 + +XdsOutlineFilter_FormalParametersName=\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 +XdsOutlineFilter_FormalParametersDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440 + +XdsOutlineFilter_TypesName=\u0422\u0438\u043f\u044b +XdsOutlineFilter_TypesDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0442\u0438\u043f\u043e\u0432 + +XdsOutlineFilter_RecordFieldsName=\u041f\u043e\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 +XdsOutlineFilter_RecordFieldsDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u043b\u044f \u0437\u0430\u043f\u0438\u0441\u0435\u0439 + +XdsOutlineFilter_GlobalVariablesName=\u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 +XdsOutlineFilter_GlobalVariablesDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 + +XdsOutlineFilter_LocalVariablesName=\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 +XdsOutlineFilter_LocalVariablesDesc=\u0421\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 + +XdsOutlineFiltersDialog_DeselectAll=\u041e\u0447\u0438\u0441\u0442\u0438\u0442\u044c \u0432\u0441\u0435 +XdsOutlineFiltersDialog_FilterDescription=\u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430: +XdsOutlineFiltersDialog_SelectAll=\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0432\u0441\u0435 +XdsOutlineFiltersDialog_SelectToExclude=\u0412\u044b\u0431\u0435\u0440\u0438\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0441\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0438\u0437 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430: +XdsOutlineFiltersDialog_ViewFilters=\u0424\u0438\u043b\u044c\u0442\u0440\u044b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 + +XdsOutlinePage_CollapseAll=\u0421\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 +XdsOutlinePage_ExpandAll=\u0420\u0430\u0437\u0432\u0435\u0440\u043d\u0443\u0442\u044c \u0432\u0441\u0435 +XdsOutlinePage_Filters=\u0424\u0438\u043b\u044c\u0442\u0440\u044b +XdsOutlinePage_LinkWithEditor=\u0421\u0432\u044f\u0437\u0430\u0442\u044c \u0441 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u043e\u043c +XdsOutlinePage_Sort=\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c +XdsOutlinePage_Loading=\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 ... + +XdsOutlinePageContentProvider_0=\u041f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0434\u0435\u0440\u0435\u0432\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 + +XdsQuickOutlineDialog_Filters=\u0424\u0438\u043b\u044c\u0442\u0440\u044b... +XdsQuickOutlineDialog_SortAlphabetically=\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u0443 + +UpdateModel=\u041e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 + +HyperlinkText_ModulaDeclaration=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 +ProfileManager_ExportProfile=\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u044f +ProfileManager_ExportProfiles=\u042d\u043a\u0441\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 +ProfileManager_ImportedProfiles=\u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u043e %d \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439:\n\n +ProfileManager_ImportProfiles=\u0418\u043c\u043f\u043e\u0440\u0442 \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 +ProfileManager_NoProfilesFound=\u0412 \u0444\u0430\u0439\u043b\u0435 '%s' \u043f\u0440\u043e\u0444\u0438\u043b\u0435\u0439 \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e. +ProfileManager_ReplaceQuestion=\u0424\u0430\u0439\u043b '%s' \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442.\n\u041f\u0435\u0440\u0435\u0437\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0435\u0433\u043e? +OccurrencesMarker_MarkingOccurrences=\u041f\u043e\u0438\u0441\u043a \u0432\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0441\u0438\u043c\u0432\u043e\u043b\u0430 +OccurrencesMarker_OccurrenceOf=\u0412\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 '%s' +OccurrencesMarker_WriteOccurrencesMarker=\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f '%s' +OpenDeclarations_description=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 +OpenDeclarations_label=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 +OpenDeclarations_tooltip=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 +ReferencesSearchGroup_References=\u0421\u0441\u044b\u043b\u043a\u0438 + +TabLineWrapping_GeneralSettings=\u041e\u0431\u0449\u0438\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b +TabLineWrapping_InvalidValue=\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435: \u0432\u0432\u0435\u0434\u0438\u0442\u0435 \u0447\u0438\u0441\u043b\u043e \u043e\u0442 0 \u0434\u043e 9999. +TabLineWrapping_MaxLineWidth=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u044b\u0439 \u0440\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 +TabLineWrapping_SetWidthToPreview=\u0420\u0430\u0437\u043c\u0435\u0440 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043e\u043a\u043d\u0435 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 +TabPageWhiteSpace_InsertSpace=\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u0435\u043b +TabPageWhiteSpace_InsSpaceAfter=\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u043e\u0441\u043b\u0435 +TabPageWhiteSpace_InsSpaceBefore=\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0440\u043e\u0431\u0435\u043b \u043f\u0435\u0440\u0435\u0434 + +TabPageNewLines_InsertNewLine=\u0412\u0441\u0442\u0430\u0432\u043a\u0430 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u043e\u0432 \u0441\u0442\u0440\u043e\u043a +TabPageNewLines_InsNewlineAfter=\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u043e\u0441\u043b\u0435 +TabPageNewLines_InsNewlineBefore=\u0412\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u0441\u0442\u0440\u043e\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 + +SymFileEditor_CannotOpenFile=(*\r\n * \u041d\u0435 \u0443\u0434\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440:\r\n * \u041f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0430 sym-\u0444\u0430\u0439\u043b\u043e\u0432 \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u0444\u0430\u0439\u043b.\r\n *) + +Spelling_add_askToConfigure_ignoreMessage=\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u043e" \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 +Spelling_add_askToConfigure_question=\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0439\u0447\u0430\u0441?\n +Spelling_add_askToConfigure_title=\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c +Spelling_add_info=\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u043e ''{0}'' \u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044e +Spelling_addWordProposal=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c ''{0}'' \u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044e +Spelling_case_label=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0443\u043a\u0432\u044b \u043d\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 +Spelling_correct_label=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 ''%s'' +Spelling_disable_info=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 +Spelling_disable_label=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 +Spelling_error_case_label=\u0421\u043b\u043e\u0432\u043e ''{%s}'' \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b +Spelling_error_label==\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0441\u043b\u043e\u0432\u0435 ''%s'' +Spelling_ignore_info=\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ''{0}'' \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u0435\u0430\u043d\u0441\u0435 +Spelling_ignore_label=\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ''{0}'' +ModulaEditor_GrayingMarkers=\u0421\u0431\u0440\u0430\u0441\u044b\u0432\u0430\u043d\u0438\u0435 \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u0432 \u0438\u0437\u043c\u0435\u043d\u0438\u0432\u0448\u0438\u0445\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043a\u0430\u0445 \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..5e397e0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.nl_ru/src/com/excelsior/xds/ui/editor/internal/nls/messages_ru_1251.properties @@ -0,0 +1,344 @@ +CodeStylePreferencePage_ExpandTreeToEdit=Ðàçâåðíèòå äåðåâî äëÿ ðåäàêòèðîâàíèÿ íàñòðîåê ñòèëÿ êîäà +CreateProfileDialog_InitFromProfile=Âçÿòü èñòàíîâêè èç óêàçàííîãî ïðîôèëÿ +CreateProfileDialog_NameExists=Ïðîôèëü ñ òàêèì èìåíåì óæå ñóùåñòâóåò +CreateProfileDialog_NewProfile=Íîâûé ïðîôèëü +CreateProfileDialog_OpenEditDlg=Îòêðûòü ðåäàêòîð ïðîôèëÿ +CreateProfileDialog_ProfName=Èìÿ ïðîôèëÿ +CreateProfileDialog_ProfNameEmpty=Èìÿ ïðîôèëÿ íå çàäàíî +MarkOccurrencesPreferencePage_LinkText=Âíåøíèé âèä ìîæåò áûòü èçìåíåí íà ñòðàíèöå 'Àííîòàöèè'. +MarkOccurrencesPreferencePage_MarkOccurrencesOfElement=Ïîìåòèòü âõîæäåíèÿ âûáðàííîãî ýëåìåíòà â òåêóùåì ìîäóëå. +ModifyDialog_Export=Ýêñïîðò... +ModifyDialog_ProfileName=Èìÿ ïðîôèëÿ + +ModulaContextualCompletionProcessor_CloseBlockComment=çàâåðøåíèå êîììåíòàðèÿ +ModulaContextualCompletionProcessor_ClosePragma=çàâåðøåíèå ïðàãìû +ModulaContextualCompletionProcessor_ExternalDeps=\ - /{0}/Âíåøíèå çàâèñèìîñòè [{1}] +ModulaContextualCompletionProcessor_inProjectPath=\ - /{0}/{1} +ModulaContextualCompletionProcessor_SdkLibrary=\ - /{0}/Ñèñòåìíàÿ áèáëèîòåêà [{1}]/{2} +ModulaOccurrencesMarker_StructureOf=Êîíñòðóêöèÿ '%s' +ModulaTokens_Text=Îáû÷íûé òåêñò +ModulaTokens_Brackets=Ñêîáêè +ModulaTokens_Numbers=×èñëà +ModulaTokens_Strings=Ñòðîêè +ModulaTokens_SystemModuleKeywords=Îáúåêòû ìîäóëÿ SYSTEM +ModulaTokens_Keywords=Êëþ÷åâûå ñëîâà +ModulaTokens_BuiltinConstants=Âñòðîåííûå êîíñòàíòû + +ModulaTokens_Pragmas=Òåõò äèðåêòèâ +ModulaTokens_PragmaKeywords=Êëþ÷åâûå ñëîâà äèðåêòèâ +ModulaTokens_CompilerPragmas=Ïðàãìû êîìïèëÿòîðà +ModulaTokens_InactiveCode=Íåàêòèâíûé êîä + +SyntaxColoringPreferencePage_Modula2=Ìîäóëà-2 + +ModulaTokens_Comments=Êîììåíòàðèè +ModulaTokens_BlockComments=Ìíîãîñòðî÷íûå êîììåíòàðèè +ModulaTokens_EndOfLineComments=Îäíîñòðî÷íûå êîììåíòàðèè +ModulaTokens_TodoTask=Òåãè çàäà÷ + +DeclarationsSearchGroup_Declarations=Îïðåäåëåíèÿ +EditorPreferencePage_HlghlightOperatorsStructure=Ïîäñâå÷èâàòü ñòðóêòóðó îïåðàòîðà +EditorPreferencePage_LinkToAnnotationsPage=Öâåò ïîäñâåòêè ìîæíî íàñòðîèòü íà ñòðàíèöå 'Àííîòàöèè'. +EditorPreferencePage_LinkToColorSettingsPage=Öâåò ïîäñâåòêè ìîæíî íàñòðîèòü íà ñòðàíèöå 'Ðàñêðàñêà ñèíòàêñèñà'. +FindDeclarationsAction_SearchDeclsOfSelInWorkspace=Ïîèñê îïðåäåëåíèé âûáðàííîãî ýëåìåíòà â ðàáî÷åé îáëàñòè +FindDeclarationsAction_Workspace= ðàáî÷åé îáëàñòè +FindDeclarationsProjectAction_Project= ïðîåêòå +FindDeclarationsProjectAction_SearchDeclsOfSelInPrj=Ïîèñê îïðåäåëåíèé âûáðàííîãî ýëåìåíòà â ïðîåêòå +FindReferencesAction_SearchRefsToSelInWorkspace=Ïîèñê ññûëîê íà âûáðàííûé ýëåìåíò â ðàáî÷åé îáëàñòè +FindReferencesAction_Workspace= ðàáî÷åé îáëàñòè +FindReferencesProjectAction_Project= ïðîåêòå +FindReferencesProjectAction_SearchRefsToSelInPrj=Ïîèñê ññûëîê íà âûáðàííûé ýëåìåíò â ïðîåêòå +FormatterModifyDialog_CantModifyDefProfile=Íåëüçÿ ðåäàêòèðîâàòü âñòðîåííûé ïðîôèëü +FormatterModifyDialog_Indentation=Îòñòóïû +FormatterModifyDialog_LineWrapping=Ïåðåíîñ ñòðîê +FormatterModifyDialog_NewLines=Ïåðåâîäû ñòðîê +FormatterModifyDialog_WhiteSpace=Ïðîáåëû +FormatterPreferencePage_ActiveProfile=Àêòèâíûé ïðîôèëü +FormatterPreferencePage_Edit=&Èçìåíèòü +FormatterPreferencePage_ExportAll=Ýêñïîðòèðîâàòü âñå... +FormatterPreferencePage_Import=Èìïîðòèðîâàòü... +FormatterPreferencePage_New=Íîâûé... +FormatterPreferencePage_Preview=Ïðåäïðîñìîòð +FormatterPreferencePage_Profile=Ïðîôèëü '%s' +FormatterPreferencePage_Remove=Óäàëèòü +FormatterProfile_AssignInExpr=Ïðèñâàèâàíèå ':=' +FormatterProfile_AssignInExpr2=Ïðèñâàèâàíèå ':=' â âûðàæåíèÿõ +FormatterProfile_AssignInModuleAlias=Ïðèñâàèâàíèå ':=' â îáÿâëåíèÿõ ñèíîíèìîâ ìîäóëåé +FormatterProfile_AssignInModuleAlias2=Ïðèñâàèâàíèå ':=' â îáÿâëåíèÿõ ñèíîíèìîâ ìîäóëåé +FormatterProfile_BeginInMod=BEGIN â ìîäóëÿõ +FormatterProfile_BeginInProc=BEGIN +FormatterProfile_BeginInProc2=BEGIN â ïðîöåäóðàõ +FormatterProfile_BinaryOps=Áèíàðíûå îïåðàöèè +FormatterProfile_Case=CASE +FormatterProfile_CaseInVarRec=CASE â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_CaseStatements=Îïåðàòîðû CASE +FormatterProfile_CaseStmt=Îïåðàòîð CASE +FormatterProfile_Colon=Äâîåòî÷èå ':' +FormatterProfile_ColonFormParams=Äâîåòî÷èå ':' â ôîðìàëüíûõ ïàðàìåòðàõ +FormatterProfile_ColonFormParams2=Äâîåòî÷èå ':' â îáúÿâëåíèè ôîðìàëüíûõ ïàðàìåòðîâ +FormatterProfile_ColonInCase=Äâîåòî÷èå ':' +FormatterProfile_ColonInCase2=Äâîåòî÷èå ':' â îïåðàòîðàõ CASE +FormatterProfile_ColonInRetType=Äâîåòî÷èå ':' ïåðåä îáúÿâëåíèÿìè òèïà ðåçóëüòàòà +FormatterProfile_ColonInRetType2=Äâîåòî÷èå ':' ïåðåä îáúÿâëåíèÿìè òèïà ðåçóëüòàòà +FormatterProfile_ColonInTypeDef=Äâîåòî÷èå ':' â îïðåäåëåíèÿõ çàïèñåé +FormatterProfile_ColonInVar=Äâîåòî÷èå ':' â îáúÿâëåíèÿõ ïåðåìåííûõ +FormatterProfile_Comma=Çàïÿòàÿ ',' +FormatterProfile_CommaInEnum=Çàïÿòàÿ ',' â îïðåäåëåíèÿõ ïåðå÷èñëèìûõ òèïîâ +FormatterProfile_CommaInFormParams=Çàïÿòàÿ ',' â ôîðìàëüíûõ ïàðàìåòðàõ +FormatterProfile_CommaInFormParams2=Çàïÿòàÿ ',' â îáúÿâëåíèÿõ ôîðìàëüíûõ ïàðàìåòðîâ ïðîöåäóð +FormatterProfile_CommaInImportLists=Çàïÿòàÿ ',' â ñïèñêàõ èìïîðòà +FormatterProfile_CommaInImportLists2=Çàïÿòàÿ ',' â ñïèñêàõ èìïîðòà +FormatterProfile_CommaInMd=Çàïÿòàÿ ',' +FormatterProfile_CommaInMd2=Çàïÿòàÿ ',' â îáúÿâëåíèÿõ ïåðåìåííûõ +FormatterProfile_CommaInParList=Çàïÿòàÿ ',' â ñïèñêàõ ïàðàìåòðîâ +FormatterProfile_CommaInParList2=Çàïÿòàÿ ',' â ñïèñêàõ ïàðàìåòðîâ +FormatterProfile_Constants=Êîíñòàíòû +FormatterProfile_ConstGlob=CONST â ãëîáàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_ConstLoc=CONST â ëîêàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_ControlStatements=Îïåðàòîðû +FormatterProfile_CtrlStmt=Îïåðàòîðû +FormatterProfile_DeclAndDefs=Îáúÿâëåíèÿ +FormatterProfile_Declarations=Îáúÿâëåíèÿ +FormatterProfile_Do=DO +FormatterProfile_Dot=Òî÷êà '.' +FormatterProfile_Dot2=Òî÷êà '.' +FormatterProfile_ElseInCase=ELSE â îïåðàòîðàõ CASE +FormatterProfile_ElseInIf=ELSE â îïåðàòîðàõ IF +FormatterProfile_ElseInVarRec=ELSE â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_Elsif=ELSIF +FormatterProfile_End=END +FormatterProfile_EndInMod=END +FormatterProfile_EndInMod2=END â ìîäóëÿõ +FormatterProfile_EndInProc=END +FormatterProfile_EndInProc2=END â ïðîöåäóðàõ +FormatterProfile_EndInRec=END â îáúÿâëåíèÿõ çàïèñåé +FormatterProfile_EndInVarRec=END â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_EnumType=Ïåðå÷èñëèìûå òèïû +FormatterProfile_Equ=Ðàâåíñòâî '=' â îïðåäåëåíèÿõ êîíñòàíò +FormatterProfile_EquInConst=Ðàâåíñòâî '=' â îïðåäåëåíèÿõ êîíñòàíò +FormatterProfile_EquInMd=Ðàâåíñòâî '=' â îïðåäåëåíèÿõ òèïîâ +FormatterProfile_EquInMd2=Ðàâåíñòâî '=' â îïðåäåëåíèÿõ Òèïîâ +FormatterProfile_Except=EXCEPT +FormatterProfile_Export=EXPORT +FormatterProfile_Expressions=Âûðàæåíèÿ +FormatterProfile_Finally=FINALLY +FormatterProfile_For=FOR +FormatterProfile_From=FROM â íåêâàëèôèöèðîâàííîì èìïîðòå +FormatterProfile_If=IF +FormatterProfile_IfStatements=Îïåðàòîðû IF +FormatterProfile_Import=Èìïîðò +FormatterProfile_ImportSimple=IMPORT â ïðîñòîì èìïîðòå +FormatterProfile_IndexExpr=Èíäåêñíûå âûðàæåíèÿ +FormatterProfile_LBracket=Îòêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà '[' +FormatterProfile_LBracketInExpr=Îòêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà '[' +FormatterProfile_LBracketInExpr2=Îòêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà '[' â èíäåêñíûõ âûðàæåíèÿõ +FormatterProfile_LBracketInRange=Îòêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà '[' â îïðåäåëåíèÿõ äèàïàçîíîâ +FormatterProfile_Loop=LOOP +FormatterProfile_LParenth=Îòêðûâàþùàÿ ñêîáêà '(' +FormatterProfile_LParenthInEnum=Îòêðûâàþùàÿ ñêîáêà '(' â îïðåäåëåíèÿõ ïåðå÷èñëèìûõ òèïîâ +FormatterProfile_LParenthInExpr=Îòêðûâàþùàÿ ñêîáêà '(' +FormatterProfile_LParenthInExpr2=Îòêðûâàþùàÿ ñêîáêà '(' â âûðàæåíèÿõ +FormatterProfile_LParenthInProcCall=Îòêðûâàþùàÿ ñêîáêà '(' +FormatterProfile_LParenthInProcCall2=Îòêðûâàþùàÿ ñêîáêà '(' â âûçîâàõ ïðîöåäóð +FormatterProfile_LParenthInProcDecl=Îòêðûâàþùàÿ ñêîáêà '(' +FormatterProfile_LParenthInProcDecl2=Îòêðûâàþùàÿ ñêîáêà '(' â îáúÿâëåíèÿõ ïðîöåäóð +FormatterProfile_Modules=Ìîäóëè +FormatterProfile_OfInCase=OF â îïåðàòîðàõ CASE +FormatterProfile_OfInVarRec=OF â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_OtherStatements=Ïðî÷èå îïåðàòîðû +FormatterProfile_ParenthExpr=Ñêîáêè â âûðàæåíèÿõ +FormatterProfile_Procedure=PROCEDURE +FormatterProfile_Procedures=Ïðîöåäóðû +FormatterProfile_ProcInvoc=Âûçîâû ïðîöåäóð +FormatterProfile_PtrDeref=Ðàçûìåíîâàíèå óêàçàòåëÿ '^' +FormatterProfile_PtrDeref2=Ðàçûìåíîâàíèå óêàçàòåëÿ '^' â âûðàæåíèÿõ +FormatterProfile_Range=Äâå òî÷êè '..' +FormatterProfile_Range2=Äâå òî÷êè '..' â îïðåäåëåíèÿõ äèàïàçîíîâ +FormatterProfile_RangeType=Äèàïàçîíû +FormatterProfile_RBracket=Çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà ']' +FormatterProfile_RBracketInExpr=Çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà ']' +FormatterProfile_RBracketInExpr2=Çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà ']' â èíäåêñíûõ âûðàæåíèÿõ +FormatterProfile_RBracketInRange=Çàêðûâàþùàÿ êâàäðàòíàÿ ñêîáêà ']' â îïðåäåëåíèÿõ äèàïàçîíîâ +FormatterProfile_Record=RECORD +FormatterProfile_RecordType=Çàïèñè +FormatterProfile_Repeat=REPEAT +FormatterProfile_RParenth=Çàêðûâàþùàÿ ñêîáêà ')' +FormatterProfile_RParenthInEnum=Çàêðûâàþùàÿ ñêîáêà ')' â îïðåäåëåíèÿõ ïåðå÷èñëèìûõ òèïîâ +FormatterProfile_RParenthInExpr=Çàêðûâàþùàÿ ñêîáêà ')' +FormatterProfile_RParenthInExpr2=Çàêðûâàþùàÿ ñêîáêà ')' â âûðàæåíèÿõ +FormatterProfile_RParenthInProcCall=Çàêðûâàþùàÿ ñêîáêà ')' +FormatterProfile_RParenthInProcCall2=Çàêðûâàþùàÿ ñêîáêà ')' â âûçîâàõ ïðîöåäóð +FormatterProfile_RParenthInProcDecl=Çàêðûâàþùàÿ ñêîáêà ')' +FormatterProfile_RParenthInProcDecl2=Çàêðûâàþùàÿ ñêîáêà ')' â îáÿëåíèÿõ ïðîöåäóð +FormatterProfile_Semicolon=Òî÷êà ñ çàïÿòîé ';' +FormatterProfile_Semicolon2=Òî÷êà ñ çàïÿòîé ';' +FormatterProfile_SemicolonFormParams=Òî÷êà ñ çàïÿòîé ';' â ôîðìàëüíûõ ïàðàìåòðàõ +FormatterProfile_SemicolonFormParams2=Òî÷êà ñ çàïÿòîé ';' â îïðåäåëåíèè ôîðìàëüíûõ ïàðàìåòðîâ +FormatterProfile_Separator=Ðàçäåëèòåëü'|' +FormatterProfile_SeparatorInCase=Ðàçäåëèòåëü '|' +FormatterProfile_SeparatorInCase2=Ðàçäåëèòåëü '|' â îïåðàòîðàõ CASE +FormatterProfile_SeparatorInRecordTypeDef=Ðàçäåëèòåëü '|' â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_SepInCase=Ðàçäåëèòåëü '|' â îïåðàòîðàõ CASE +FormatterProfile_SepInVarRec=Ðàçäåëèòåëü '|' â âàðèàíòíûõ çàïèñÿõ +FormatterProfile_SetsForAllBinaryOps=Áèíàðíûå îïåðàöèé +FormatterProfile_SetsForAllUnaryOps=Óíàðíûå îïåðàöèé +FormatterProfile_StmtClosedParenthesis=Ïîñëåäíÿÿ çàêðûâàþùàÿ ñêîáêà ')' +FormatterProfile_StmtClosedParenthesis2=Ïîñëåäíÿÿ çàêðûâàþùàÿ ñêîáêà ')' â îïåðàòîðàõ +FormatterProfile_StmtOpenedParenthesis=Ïåðâàÿ îòêðûâàþùàÿ ñêîáêà '(' +FormatterProfile_StmtOpenedParenthesis2=Ïåðâàÿ îòêðûâàþùàÿ ñêîáêà '(' â îïåðàòîðàõ +FormatterProfile_Then=THEN +FormatterProfile_TypeGlob=TYPE â ãëîáàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_TypeLoc=TYPE â ëîêàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_Types=Òèïû +FormatterProfile_UnaryOps=Óíàðíûå îïåðàöèè +FormatterProfile_Until=UNTIL +FormatterProfile_VarGlob=VAR â ãëîáàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_Variables=Ïåðåìåííûå +FormatterProfile_VarLoc=VAR â ëîêàëüíûõ îáúÿâëåíèÿõ +FormatterProfile_While=WHILE +FormatterProfile_With=WITH +FormatterProfile_XdsBuiltIn=XDS [built-in] + +IndentationTabPage_DeclOfLocalMods=Îáúÿâëåíèÿ ëîêàëüíûõ ìîäóëåé (ðàçìåð) +IndentationTabPage_DeclOfLocalProcs=Îáúÿâëåíèÿ ëîêàëüíûõ ïðîöåäóð (ðàçìåð) +IndentationTabPage_DeclOfRecFields=Îáúÿâëåíèÿ ïîëåé çàïèñåé +IndentationTabPage_DeclWithinModule=Îáúÿâëåíèÿ âíóòðè ìîäóëÿ +IndentationTabPage_DeclWithinProc=Îáúÿâëåíèÿ âíóòðè ïðîöåäóðû +IndentationTabPage_DeclWithinVCT=Îáúÿâëåíèÿ âíóòðè áëîêà VAR/TYPE/CONST +IndentationTabPage_GeneralSettings=Îáùèå óñòàíîâêè +IndentationTabPage_Indent=Îòñòóï +IndentationTabPage_IndentSize=Ðàçìåð îòñòóïà +IndentationTabPage_Mixed=Ñìåøàííûé +IndentationTabPage_Preview=Ïðåäâàðèòåëüíûé ïðîñìîòð +IndentationTabPage_SpacesOnly=Òîëüêî ïðîáåëû +IndentationTabPage_SpacesToWrappedLines=Èñïîëüçîâàòü ïðîáåëû äëÿ îòñòóïîâ ñâåðíóòûõ ñòðîê +IndentationTabPage_Statements=Îïåðàòîðû âíóòðè òåë îïåðàòîðîâ/ïðîöåäóð/ìîäóëåé +IndentationTabPage_StatementsInCase=Îïåðàòîðû âíóòðè CASE +IndentationTabPage_StatementsInCaseAlt=Îïåðàòîðû âíóòðè àëüòåðíàòèâ CASE (ðàçìåð) +IndentationTabPage_TabPolicy=Ðåæèì òàáóëÿöèè +IndentationTabPage_TabSize=Ðàçìåð òàáóëÿöèè +IndentationTabPage_UseTabs=Èñïîëüçîâàòü òàáóëÿöèþ + +SpellingPreferenceBlock_Advanced=Äîïîëíèòåëüíî +SpellingPreferenceBlock_BadDictFile=Óêàçàí íåâåðíûé ïóòü äî ôàéëà ñëîâàðÿ +SpellingPreferenceBlock_Browse=Îáçîð... +SpellingPreferenceBlock_Dictionaries=Ñëîâàðè +SpellingPreferenceBlock_Dictionary=Ñëîâàðü +SpellingPreferenceBlock_Encoding=Êîäèðîâêà +SpellingPreferenceBlock_IgnoreCapitalization=Èãíîðèðîâàòü ïðîïèñíûå áóêâû â íà÷àëå ïðåäëîæåíèé +SpellingPreferenceBlock_IgnoreM2Strings=Èãíîðèðîâàòü ñòðîêè Modula-2 +SpellingPreferenceBlock_IgnoreMixedCaseWords=Èãíîðèðîâàòü ñëîâà â ñìåøàííîì ðåãèñòðå +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=Èãíîðèðîâàòü íå áóêâåííûå ñèìâîëû íà ãðàíèöàõ ñëîâ +SpellingPreferenceBlock_IgnoreSingleLetters=Èãíîðèðîâàòü åäèíè÷íûå áóêâû +SpellingPreferenceBlock_IgnoreUpperCaseWords=Èãíîðèðîâàòü ñëîâà èç ïðîïèñíûõ áóêâ +SpellingPreferenceBlock_IgnoreURLs=Èãíîðèðîâàòü URL-û +SpellingPreferenceBlock_IgnoreWordsWithDigits=Èãíîðèðîâàòü ñëîâà ñ öèôðàìè +SpellingPreferenceBlock_InvalidInt='%s' íå ÿâëÿåòñÿ äîïóñòèìûì ÷èñëîì +SpellingPreferenceBlock_MaxProblems=Ìàêñèìàëüíîå ÷èñëî ñîîáùåíèé â ôàéëå +SpellingPreferenceBlock_MaxProposals=Ìàêñèìàëüíîå ÷èñëî ïðåäëàãàåìûõ âàðèàíòîâ èñïðàâëåíèé +SpellingPreferenceBlock_none=íåò +SpellingPreferenceBlock_NumberRequired=Äîëæíî áûòü óêàçàíî öåëîå ÷èñëî +SpellingPreferenceBlock_Options=Ïàðàìåòðû +SpellingPreferenceBlock_PlatformDictionary=Ñëîâàðü ïëàòôîðìû +SpellingPreferenceBlock_RWAccessRequired=Ôàéë ñëîâàðÿ äîëæåí áûòü äîñòóïåí äëÿ ÷òåíèÿ è çàïèñè +SpellingPreferenceBlock_SelectUserDictionary=Âûáðàòü ñëîâàðü +SpellingPreferenceBlock_UserDefDictionary=Ïîëüçîâàòåëüñêèé ñëîâàðü +SpellingPreferenceBlock_UserDictDesc=Ïîëüçîâàòåëüñêèé ñëîâàðü - ýòî òåêñòîâûé ôàéë ñ îäíèì ñëîâîì â êàæäîé ñòðîêå +SpellingPreferenceBlock_Variables=Ïåðåìåííûå... + +XdsEditorPreferencePage_link=Íàñòðîéêè XDS Ìîäóëà-2 ðåäàêòîðà. Îáùèå ïàðàìåòðû ðåäàêòîðà íàñòðàèâàþòñÿ íà ñòðàíèöàõ 'Òåêñòîâûå ðåäàêòîðû' è 'Öâåòà è øðèôòû'. +XdsEditorPreferencePage_HighlightBrackets=Âûäåëÿòü ïàðíûå ñêîáêè +XdsEditorPreferencePage_MatchedBracketsColor=Öâåò ïîäñâåòêè ïàðíûõ ñêîáîê +XdsEditorPreferencePage_UnmatchedBracketsColor=Öâåò ïîäñâåòêè íåïàðíûõ ñêîáîê +XdsEditorPreferencePage_HighlightInactiveCode=Âûäåëÿòü íåàêòèâíûé êîä + +XdsOutlineFilter_ConstantsName=Êîíñòàíòû +XdsOutlineFilter_ConstantsDesc=Ñêðûâàåò îïðåäåëåíèÿ êîíñòàíò è ýëåìåíòîâ ïåðå÷èñëèìîãî òèïà + +XdsOutlineFilter_ImportName=Ñïèñêè èìïîðòà +XdsOutlineFilter_ImportDesc=Ñêðûâàåò âñå ñïèñêè èìïîðòà + +XdsOutlineFilter_LocModulesName=Ëîêàëüíûå ìîäóëè +XdsOutlineFilter_LocModulesDesc=Ñêðûâàåò ëîêàëüíûå ìîäóëè + +XdsOutlineFilter_ProceduresName=Ïðîöåäóðû +XdsOutlineFilter_ProceduresDesc=Ñêðûâàåò îáúÿâëåíèÿ ïðîöåäóð + +XdsOutlineFilter_FormalParametersName=Ïàðàìåòðû ïðîöåäóð +XdsOutlineFilter_FormalParametersDesc=Ñêðûâàåò ïàðàìåòðû ïðîöåäóð + +XdsOutlineFilter_TypesName=Òèïû +XdsOutlineFilter_TypesDesc=Ñêðûâàåò îïðåäåëåíèÿ òèïîâ + +XdsOutlineFilter_RecordFieldsName=Ïîëÿ çàïèñåé +XdsOutlineFilter_RecordFieldsDesc=Ñêðûâàåò ïîëÿ çàïèñåé + +XdsOutlineFilter_GlobalVariablesName=Ãëîáàëüíûå ïåðåìåííûå +XdsOutlineFilter_GlobalVariablesDesc=Ñêðûâàåò îáúÿâëåíèÿ ãëîáàëüíûõ ïåðåìåííûõ + +XdsOutlineFilter_LocalVariablesName=Ëîêàëüíûå ïåðåìåííûå +XdsOutlineFilter_LocalVariablesDesc=Ñêðûâàåò îáúÿâëåíèÿ ëîêàëüíûõ ïåðåìåííûõ + +XdsOutlineFiltersDialog_DeselectAll=Î÷èñòèòü âñå +XdsOutlineFiltersDialog_FilterDescription=Îïèñàíèå ôèëüòðà: +XdsOutlineFiltersDialog_SelectAll=Âûáðàòü âñå +XdsOutlineFiltersDialog_SelectToExclude=Âûáåðèòå ýëåìåíòû, êîòîðûå ñëåäóåò èñêëþ÷èòü èç ïðîñìîòðà: +XdsOutlineFiltersDialog_ViewFilters=Ôèëüòðû ýëåìåíòîâ ïðîñìîòðà + +XdsOutlinePage_CollapseAll=Ñâåðíóòü âñå +XdsOutlinePage_ExpandAll=Ðàçâåðíóòü âñå +XdsOutlinePage_Filters=Ôèëüòðû +XdsOutlinePage_LinkWithEditor=Ñâÿçàòü ñ ðåäàêòîðîì +XdsOutlinePage_Sort=Ñîðòèðîâàòü +XdsOutlinePage_Loading=Çàãðóçêà ... + +XdsOutlinePageContentProvider_0=Ïîñòðîåíèå äåðåâà ìîäåëè + +XdsQuickOutlineDialog_Filters=Ôèëüòðû... +XdsQuickOutlineDialog_SortAlphabetically=Ñîðòèðîâàòü ïî àëôàâèòó + +UpdateModel=Îáíîâëåíèå ìîäåëè + +HyperlinkText_ModulaDeclaration=Îòêðûòü îáúÿâëåíèå +ProfileManager_ExportProfile=Ýêñïîðò ïðîôèëÿ +ProfileManager_ExportProfiles=Ýêñïîðò ïðîôèëåé +ProfileManager_ImportedProfiles=Èìïîðòèðîâàíî %d ïðîôèëåé:\n\n +ProfileManager_ImportProfiles=Èìïîðò ïðîôèëåé +ProfileManager_NoProfilesFound= ôàéëå '%s' ïðîôèëåé ôîðìàòèðîâàíèÿ íå íàéäåíî. +ProfileManager_ReplaceQuestion=Ôàéë '%s' óæå ñóùåñòâóåò.\nÏåðåçàïèñàòü åãî? +OccurrencesMarker_MarkingOccurrences=Ïîèñê âõîæäåíèé ñèìâîëà +OccurrencesMarker_OccurrenceOf=Âõîæäåíèå '%s' +OccurrencesMarker_WriteOccurrencesMarker=Èçìåíåíèå çíà÷åíèÿ '%s' +OpenDeclarations_description=Îòêðûòü îïðåäåëåíèå +OpenDeclarations_label=Îòêðûòü îïðåäåëåíèå +OpenDeclarations_tooltip=Îòêðûòü îïðåäåëåíèå +ReferencesSearchGroup_References=Ññûëêè + +TabLineWrapping_GeneralSettings=Îáùèå ïàðàìåòðû +TabLineWrapping_InvalidValue=Íåäîïóñòèìîå çíà÷åíèå: ââåäèòå ÷èñëî îò 0 äî 9999. +TabLineWrapping_MaxLineWidth=Ìàêñèìàëüíûé ðàçìåð ñòðîêè +TabLineWrapping_SetWidthToPreview=Ðàçìåð ñòðîêè â îêíå ïðåäâàðèòåëüíîãî ïðîñìîòðà +TabPageWhiteSpace_InsertSpace=Âñòàâëÿòü ïðîáåë +TabPageWhiteSpace_InsSpaceAfter=Âñòàâëÿòü ïðîáåë ïîñëå +TabPageWhiteSpace_InsSpaceBefore=Âñòàâëÿòü ïðîáåë ïåðåä + +TabPageNewLines_InsertNewLine=Âñòàâêà ïåðåâîäîâ ñòðîê +TabPageNewLines_InsNewlineAfter=Âñòàâëÿòü ïåðåâîä ñòðîêè ïîñëå +TabPageNewLines_InsNewlineBefore=Âñòàâëÿòü ïåðåâîä ñòðîêè ïåðåä + +SymFileEditor_CannotOpenFile=(*\r\n * Íå óäàåòñÿ îòêðûòü ðåäàêòîð:\r\n * Ïðîãðàììà ïðîñìîòðà sym-ôàéëîâ íå ìîæåò îáðàáîòàòü ýòîò ôàéë.\r\n *) + +Spelling_add_askToConfigure_ignoreMessage=Íå ïîêàçûâàòü "Äîáàâèòü ñëîâî" ïðåäëîæåíèÿ, åñëè ïîëüçîâàòåëüñêèé ñëîâàðü îòñóòñòâóåò +Spelling_add_askToConfigure_question=Íåîáõîäèì ïîëüçîâàòåëüñêèé ñëîâàðü ÷òîáû äîáàâëÿòü ñëîâà.\nÆåëàåòå ñêîíôèãóðèðîâàòü åãî ñåé÷àñ?\n +Spelling_add_askToConfigure_title=Îòñóòñòâóåò ïîëüçîâàòåëüñêèé ñëîâàðü +Spelling_add_info=Äîáàâëÿåò ñëîâî ''{0}'' ê ñëîâàðþ +Spelling_addWordProposal=Äîáàâèòü ''{0}'' ê ñëîâàðþ +Spelling_case_label=Èçìåíèòü áóêâû íà çàãëàâíûå +Spelling_correct_label=Èçìåíèòü íà ''%s'' +Spelling_disable_info=Îòêëþ÷èòü ïðîâåðêó îðôîãðàôèè +Spelling_disable_label=Îòêëþ÷èòü ïðîâåðêó îðôîãðàôèè +Spelling_error_case_label=Ñëîâî ''{%s}'' äîëæíî íà÷èíàòüñÿ ñ ïðîïèñíîé áóêâû +Spelling_error_label==Îøèáêà â ñëîâå ''%s'' +Spelling_ignore_info=Âñåãäà èãíîðèðîâàòü ''{0}'' â òåêóùåì ñåàíñå +Spelling_ignore_label=Âñåãäà èãíîðèðîâàòü ''{0}'' +ModulaEditor_GrayingMarkers=Ñáðàñûâàíèå ìàðêåðîâ â èçìåíèâøèõñÿ ñòðî÷êàõ \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/.project b/product/com.excelsior.xds.ui.editor.spellcheck.feature/.project new file mode 100644 index 0000000..1b524f8 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/.project @@ -0,0 +1,17 @@ + + + com.excelsior.xds.ui.editor.spellcheck.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/build.properties b/product/com.excelsior.xds.ui.editor.spellcheck.feature/build.properties new file mode 100644 index 0000000..86d0094 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/build.properties @@ -0,0 +1,5 @@ +bin.includes = feature.xml,\ + feature.properties,\ + feature_ru.properties + + \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.properties b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.properties new file mode 100644 index 0000000..67c95a5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.properties @@ -0,0 +1 @@ +featureDesription=Spellchecking support for the Modula-2 source editor \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.xml b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.xml new file mode 100644 index 0000000..cbec4a0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature.xml @@ -0,0 +1,27 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru.properties b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru.properties new file mode 100644 index 0000000..6e91b21 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru.properties @@ -0,0 +1 @@ +featureDesription=\u041a\u043e\u043c\u043f\u043b\u0435\u043a\u0442 \u0434\u043b\u044f \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430 \u0432 \u0440\u0435\u0434\u0430\u043a\u0442\u043e\u0440\u0435 XDS \u041c\u043e\u0434\u0443\u043b\u0430-2 \u043f\u0440\u043e\u0433\u0440\u0430\u043c \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru_1251.properties b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru_1251.properties new file mode 100644 index 0000000..6876dbb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.feature/feature_ru_1251.properties @@ -0,0 +1 @@ +featureDesription=Êîìïëåêò äëÿ èíòåãðàöèè ïîääåðæêè ïðîâåðêè ñèíòàêñèñà â ðåäàêòîðå XDS Ìîäóëà-2 ïðîãðàì \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.classpath b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.project b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.project new file mode 100644 index 0000000..4504b2b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor.spellcheck.nl_ru + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/META-INF/MANIFEST.MF new file mode 100644 index 0000000..d978d66 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/META-INF/MANIFEST.MF @@ -0,0 +1,9 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %fragmentName +Bundle-SymbolicName: com.excelsior.xds.ui.editor.spellcheck.nl_ru +Bundle-Version: 1.7.0.qualifier +Bundle-Vendor: Excelsior LLC +Bundle-Localization: fragment +Fragment-Host: com.excelsior.xds.ui.editor.spellcheck;bundle-version="1.7.0" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/build.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/build.properties new file mode 100644 index 0000000..eff42d6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + fragment_ru.properties,\ + fragment.properties,\ + plugin_ru.properties diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment.properties new file mode 100644 index 0000000..df9704a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment.properties @@ -0,0 +1 @@ +fragmentName=com.excelsior.xds.ui.editor.spellcheck Russian NLS Support diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru.properties new file mode 100644 index 0000000..3be1f7a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru.properties @@ -0,0 +1 @@ +fragmentName=\u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0440\u0443\u0441\u0441\u043a\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0434\u043b\u044f com.excelsior.xds.ui.editor.spellcheck diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru_1251.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru_1251.properties new file mode 100644 index 0000000..104d935 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/fragment_ru_1251.properties @@ -0,0 +1 @@ +fragmentName=Ïîääåðæêà ðóññêîãî ÿçûêà äëÿ com.excelsior.xds.ui.editor.spellcheck diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru.properties new file mode 100644 index 0000000..8a1c43d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru.properties @@ -0,0 +1,2 @@ +pluginName=\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 +spelling.default_engine_label=XDS \u0441\u043b\u0443\u0436\u0431\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru_1251.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru_1251.properties new file mode 100644 index 0000000..fc236d1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/plugin_ru_1251.properties @@ -0,0 +1,2 @@ +pluginName=Ïðîâåðêà îðôîãðàôèè +spelling.default_engine_label=XDS ñëóæáà ïðîâåðêè îðôîãðàôèè \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru.properties new file mode 100644 index 0000000..2599d26 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru.properties @@ -0,0 +1,39 @@ +Spelling_add_askToConfigure_ignoreMessage=\u041d\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c "\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0441\u043b\u043e\u0432\u043e" \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f, \u0435\u0441\u043b\u0438 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 +Spelling_add_askToConfigure_question=\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u043e\u0432\u0430.\n\u0416\u0435\u043b\u0430\u0435\u0442\u0435 \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0441\u0435\u0439\u0447\u0430\u0441?\n +Spelling_add_askToConfigure_title=\u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c +Spelling_add_info=\u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043b\u043e\u0432\u043e ''{0}'' \u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044e +Spelling_addWordProposal=\u0414\u043e\u0431\u0430\u0432\u0438\u0442\u044c ''{0}'' \u043a \u0441\u043b\u043e\u0432\u0430\u0440\u044e +Spelling_case_label=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0431\u0443\u043a\u0432\u044b \u043d\u0430 \u0437\u0430\u0433\u043b\u0430\u0432\u043d\u044b\u0435 +Spelling_correct_label=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 ''%s'' +Spelling_disable_info=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 +Spelling_disable_label=\u041e\u0442\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u043e\u0440\u0444\u043e\u0433\u0440\u0430\u0444\u0438\u0438 +Spelling_error_case_label=\u0421\u043b\u043e\u0432\u043e ''{%s}'' \u0434\u043e\u043b\u0436\u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0442\u044c\u0441\u044f \u0441 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u043e\u0439 \u0431\u0443\u043a\u0432\u044b +Spelling_error_label==\u041e\u0448\u0438\u0431\u043a\u0430 \u0432 \u0441\u043b\u043e\u0432\u0435 ''%s'' +Spelling_ignore_info=\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ''{0}'' \u0432 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u0441\u0435\u0430\u043d\u0441\u0435 +Spelling_ignore_label=\u0412\u0441\u0435\u0433\u0434\u0430 \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c ''{0}'' +SpellingPreferenceBlock_Advanced=\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e +SpellingPreferenceBlock_BadDictFile=\u0423\u043a\u0430\u0437\u0430\u043d \u043d\u0435\u0432\u0435\u0440\u043d\u044b\u0439 \u043f\u0443\u0442\u044c \u0434\u043e \u0444\u0430\u0439\u043b\u0430 \u0441\u043b\u043e\u0432\u0430\u0440\u044f +SpellingPreferenceBlock_Browse=\u041e\u0431\u0437\u043e\u0440... +SpellingPreferenceBlock_Dictionaries=\u0421\u043b\u043e\u0432\u0430\u0440\u0438 +SpellingPreferenceBlock_Dictionary=\u0421\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_Encoding=\u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 +SpellingPreferenceBlock_IgnoreCapitalization=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b \u0432 \u043d\u0430\u0447\u0430\u043b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u0439 +SpellingPreferenceBlock_IgnoreM2Strings=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0438 Modula-2 +SpellingPreferenceBlock_IgnoreMixedCaseWords=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0432 \u0441\u043c\u0435\u0448\u0430\u043d\u043d\u043e\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u043a\u0432\u0435\u043d\u043d\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u043d\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u0445 \u0441\u043b\u043e\u0432 +SpellingPreferenceBlock_IgnoreSingleLetters=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0435\u0434\u0438\u043d\u0438\u0447\u043d\u044b\u0435 \u0431\u0443\u043a\u0432\u044b +SpellingPreferenceBlock_IgnoreUpperCaseWords=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0438\u0437 \u043f\u0440\u043e\u043f\u0438\u0441\u043d\u044b\u0445 \u0431\u0443\u043a\u0432 +SpellingPreferenceBlock_IgnoreURLs=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c URL-\u044b +SpellingPreferenceBlock_IgnoreWordsWithDigits=\u0418\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430 \u0441 \u0446\u0438\u0444\u0440\u0430\u043c\u0438 +SpellingPreferenceBlock_InvalidInt='%s' \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c +SpellingPreferenceBlock_MaxProblems=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0439 \u0432 \u0444\u0430\u0439\u043b\u0435 +SpellingPreferenceBlock_MaxProposals=\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0447\u0438\u0441\u043b\u043e \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0439 +SpellingPreferenceBlock_none=\u043d\u0435\u0442 +SpellingPreferenceBlock_NumberRequired=\u0414\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0446\u0435\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e +SpellingPreferenceBlock_Options=\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b +SpellingPreferenceBlock_PlatformDictionary=\u0421\u043b\u043e\u0432\u0430\u0440\u044c \u043f\u043b\u0430\u0442\u0444\u043e\u0440\u043c\u044b +SpellingPreferenceBlock_RWAccessRequired=\u0424\u0430\u0439\u043b \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0438 \u0437\u0430\u043f\u0438\u0441\u0438 +SpellingPreferenceBlock_SelectUserDictionary=\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0441\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_UserDefDictionary=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c +SpellingPreferenceBlock_UserDictDesc=\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c - \u044d\u0442\u043e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0439 \u0444\u0430\u0439\u043b \u0441 \u043e\u0434\u043d\u0438\u043c \u0441\u043b\u043e\u0432\u043e\u043c \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 +SpellingPreferenceBlock_Variables=\u041f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435... \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru_1251.properties b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru_1251.properties new file mode 100644 index 0000000..7edb1cd --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck.nl_ru/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages_ru_1251.properties @@ -0,0 +1,39 @@ +Spelling_add_askToConfigure_ignoreMessage=Íå ïîêàçûâàòü "Äîáàâèòü ñëîâî" ïðåäëîæåíèÿ, åñëè ïîëüçîâàòåëüñêèé ñëîâàðü îòñóòñòâóåò +Spelling_add_askToConfigure_question=Íåîáõîäèì ïîëüçîâàòåëüñêèé ñëîâàðü ÷òîáû äîáàâëÿòü ñëîâà.\nÆåëàåòå ñêîíôèãóðèðîâàòü åãî ñåé÷àñ?\n +Spelling_add_askToConfigure_title=Îòñóòñòâóåò ïîëüçîâàòåëüñêèé ñëîâàðü +Spelling_add_info=Äîáàâëÿåò ñëîâî ''{0}'' ê ñëîâàðþ +Spelling_addWordProposal=Äîáàâèòü ''{0}'' ê ñëîâàðþ +Spelling_case_label=Èçìåíèòü áóêâû íà çàãëàâíûå +Spelling_correct_label=Èçìåíèòü íà ''%s'' +Spelling_disable_info=Îòêëþ÷èòü ïðîâåðêó îðôîãðàôèè +Spelling_disable_label=Îòêëþ÷èòü ïðîâåðêó îðôîãðàôèè +Spelling_error_case_label=Ñëîâî ''{%s}'' äîëæíî íà÷èíàòüñÿ ñ ïðîïèñíîé áóêâû +Spelling_error_label==Îøèáêà â ñëîâå ''%s'' +Spelling_ignore_info=Âñåãäà èãíîðèðîâàòü ''{0}'' â òåêóùåì ñåàíñå +Spelling_ignore_label=Âñåãäà èãíîðèðîâàòü ''{0}'' +SpellingPreferenceBlock_Advanced=Äîïîëíèòåëüíî +SpellingPreferenceBlock_BadDictFile=Óêàçàí íåâåðíûé ïóòü äî ôàéëà ñëîâàðÿ +SpellingPreferenceBlock_Browse=Îáçîð... +SpellingPreferenceBlock_Dictionaries=Ñëîâàðè +SpellingPreferenceBlock_Dictionary=Ñëîâàðü +SpellingPreferenceBlock_Encoding=Êîäèðîâêà +SpellingPreferenceBlock_IgnoreCapitalization=Èãíîðèðîâàòü ïðîïèñíûå áóêâû â íà÷àëå ïðåäëîæåíèé +SpellingPreferenceBlock_IgnoreM2Strings=Èãíîðèðîâàòü ñòðîêè Modula-2 +SpellingPreferenceBlock_IgnoreMixedCaseWords=Èãíîðèðîâàòü ñëîâà â ñìåøàííîì ðåãèñòðå +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=Èãíîðèðîâàòü íå áóêâåííûå ñèìâîëû íà ãðàíèöàõ ñëîâ +SpellingPreferenceBlock_IgnoreSingleLetters=Èãíîðèðîâàòü åäèíè÷íûå áóêâû +SpellingPreferenceBlock_IgnoreUpperCaseWords=Èãíîðèðîâàòü ñëîâà èç ïðîïèñíûõ áóêâ +SpellingPreferenceBlock_IgnoreURLs=Èãíîðèðîâàòü URL-û +SpellingPreferenceBlock_IgnoreWordsWithDigits=Èãíîðèðîâàòü ñëîâà ñ öèôðàìè +SpellingPreferenceBlock_InvalidInt='%s' íå ÿâëÿåòñÿ äîïóñòèìûì ÷èñëîì +SpellingPreferenceBlock_MaxProblems=Ìàêñèìàëüíîå ÷èñëî ñîîáùåíèé â ôàéëå +SpellingPreferenceBlock_MaxProposals=Ìàêñèìàëüíîå ÷èñëî ïðåäëàãàåìûõ âàðèàíòîâ èñïðàâëåíèé +SpellingPreferenceBlock_none=íåò +SpellingPreferenceBlock_NumberRequired=Äîëæíî áûòü óêàçàíî öåëîå ÷èñëî +SpellingPreferenceBlock_Options=Ïàðàìåòðû +SpellingPreferenceBlock_PlatformDictionary=Ñëîâàðü ïëàòôîðìû +SpellingPreferenceBlock_RWAccessRequired=Ôàéë ñëîâàðÿ äîëæåí áûòü äîñòóïåí äëÿ ÷òåíèÿ è çàïèñè +SpellingPreferenceBlock_SelectUserDictionary=Âûáðàòü ñëîâàðü +SpellingPreferenceBlock_UserDefDictionary=Ïîëüçîâàòåëüñêèé ñëîâàðü +SpellingPreferenceBlock_UserDictDesc=Ïîëüçîâàòåëüñêèé ñëîâàðü - ýòî òåêñòîâûé ôàéë ñ îäíèì ñëîâîì â êàæäîé ñòðîêå +SpellingPreferenceBlock_Variables=Ïåðåìåííûå... \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/.classpath b/product/com.excelsior.xds.ui.editor.spellcheck/.classpath new file mode 100644 index 0000000..eca7bdb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/.project b/product/com.excelsior.xds.ui.editor.spellcheck/.project new file mode 100644 index 0000000..edff7dc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor.spellcheck + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor.spellcheck/META-INF/MANIFEST.MF new file mode 100644 index 0000000..e19aefc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/META-INF/MANIFEST.MF @@ -0,0 +1,24 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.ui.editor.spellcheck;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ui.editor.spellcheck.internal.plugin.SpellcheckPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.jface.text;bundle-version="3.9.2", + org.eclipse.ui.workbench.texteditor;bundle-version="3.9.0", + com.excelsior.xds.core;bundle-version="1.7.0", + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + com.excelsior.xds.ui;bundle-version="1.7.0", + org.eclipse.ui.editors;bundle-version="3.8.200", + com.excelsior.xds.ui.editor.commons;bundle-version="1.7.0", + com.excelsior.xds.ui.editor;bundle-version="1.7.0", + org.eclipse.core.variables;bundle-version="3.2.800", + org.eclipse.core.resources;bundle-version="3.9.1", + org.eclipse.ui.ide, + org.eclipse.debug.ui +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/build.properties b/product/com.excelsior.xds.ui.editor.spellcheck/build.properties new file mode 100644 index 0000000..d128f95 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + plugin.xml,\ + plugin.properties,\ + dictionaries/ diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_GB.dictionary b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_GB.dictionary new file mode 100644 index 0000000..bb9ac9f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_GB.dictionary @@ -0,0 +1,49863 @@ +ACM +ANSI +ASAP +ASCII +ATM's +Achilles +Ada +Ada's +Afghanistan +Afghanistan's +Africa +Africa's +African +African's +Africans +Airedale +Airedale's +Alabama +Alabama's +Alabamian +Alabamian's +Alaska +Alaska's +Albania +Albania's +Albanian +Albanian's +Albanians +Alcibiades +Alden +Alden's +Algeria +Algeria's +Algerian +Algerian's +Algol +Algol's +Allah +Allah's +Alyssa +Alyssa's +Amanda +Amanda's +Amdahl +Amdahl's +Amelia +Amelia's +America +America's +American +American's +Americana +Americans +Americas +Ames +Amsterdam +Amsterdam's +Amtrak +Amtrak's +Anabaptist +Anabaptist's +Anabaptists +Andorra +Andorra's +Angeleno +Angeleno's +Angelenos +Anglican +Anglican's +Anglicanism +Anglicanism's +Anglicans +Anglophilia +Anglophilia's +Anglophobia +Anglophobia's +Angola +Angola's +Antarctica +Antarctica's +Aphrodite +Aphrodite's +Apollo +Apollo's +Apollonian +Appalachia +Appalachia's +Appalachian +Appalachian's +Appalachians +April +April's +Aprils +Aquarius +Arab +Arab's +Arabia +Arabia's +Arabian +Arabian's +Arabians +Arabic +Arabic's +Arabs +Archie +Archie's +Argentina +Argentina's +Argo +Argo's +Argos +Arianism +Arianism's +Arianist +Arianist's +Arianists +Aries +Aristotelian +Aristotelian's +Aristotle +Aristotle's +Arizona +Arizona's +Arkansas +Arkansas's +Armageddon +Armageddon's +Armenian +Armenian's +Armour +Armour's +Armstrong +Armstrong's +Artemis +Aryan +Aryan's +Aryans +Asia +Asia's +Asian +Asian's +Asians +Asiatic +Asiatic's +Asiatics +Assyrian +Assyrian's +Assyriology +Assyriology's +Athena +Athena's +Athenian +Athenian's +Athenians +Athens +Atlantic +Atlantic's +Auckland +Auckland's +Audubon +Audubon's +Augusta +Augusta's +Augusts +Austin +Austin's +Australia +Australia's +Australian +Australian's +Australians +Austria +Austria's +Austrian +Austrian's +Ave +BSD +Babel +Babel's +Bach +Bach's +Bagrodia +Bagrodia's +Bagrodias +Balkan +Balkan's +Balkans +Baltic +Baltic's +Bangladesh +Bangladesh's +Bantu +Bantu's +Bantus +Barbados +Baxter +Baxter's +Beethoven +Beethoven's +Belgian +Belgian's +Belgians +Belgium +Belgium's +Bellovin +Bellovin's +Belushi +Belushi's +Benedict +Benedict's +Benedictine +Benedictine's +Bengal +Bengal's +Bengali +Bengali's +Benzedrine +Benzedrine's +Bergsten +Bergsten's +Berkeley +Berkeley's +Berlin +Berlin's +Berliner +Berliners +Bermuda +Bermuda's +Bessel +Bessel's +Beverly +Beverly's +Bilbo +Bilbo's +Bolivia +Bolivia's +Bologna +Bologna's +Bolshevik +Bolshevik's +Bolsheviks +Bolshevism +Bolshevism's +Borneo +Borneo's +Boston +Boston's +Bostonian +Bostonian's +Bostonians +Botswana +Botswana's +Bourne +Bourne's +Brazil +Brazil's +Brazilian +Brazilian's +Bresenham +Bresenham's +Britain +Britain's +British +Britisher +Britishly +Briton +Briton's +Britons +Buehring +Buehring's +CDC +CDC's +CEO +CMOS +CPU +CPU's +CPUs +California +California's +Californian +Californian's +Californians +Cambridge +Cambridge's +Canada +Canada's +Carolina +Carolina's +Carolinas +Cartesian +Chinese +Chinese's +Christian +Christian's +Christians +Christiansen +Christmas +Cobol +Cobol's +Coleman +Coleman's +Colorado +Colorado's +Comdex +Comdex's +Cray +Cray's +Crays +Cupertino +Cupertino's +Czechoslovakian +DARPA +DARPA's +DECNET +DOS +Dan +Dan's +DeMorgan +DeMorgan's +Debbie +Debbie's +December +December's +Decembers +Delaware +Delaware's +Denmark +Denmark's +Dijkstra +Dijkstra's +Diophantine +Dylan +Dylan's +EDP +EGA +EGA's +Edsger +Edsger's +Ellen +Ellen's +Elvis +Elvis's +English +English's +Erlang +Erlang's +Ethernet +Ethernet's +Ethernets +Europe +Europe's +European +European's +Europeans +FIFO +Fairbanks +Februaries +February +February's +Felder +Florida +Florida's +Fortran +Fortran's +Fourier +Fourier's +France +France's +Frances +French +French's +Friday +Friday's +Fridays +GPSS +Galvin +Galvin's +Garfunkel +Geoff +Geoff's +Geoffrey +Geoffrey's +German +German's +Germans +Germany +Germany's +Gibson +Gibson's +Gipsies +Gipsy +Gipsy's +Godzilla +Godzilla's +Gothic +Greek +Greek's +Greeks +Greg +Greg's +Heinlein +Heinlein's +Hewlett +Hewlett's +Holland +Holland's +Hollander +Hollanders +Hollands +Honda +Honda's +Hz +I'd +I'll +I'm +I've +IBM +IBM's +IEEE +ITCorp +ITCorp's +ITcorp +ITcorp's +Illinois +Inc +India +India's +Indian +Indian's +Indiana +Indiana's +Indians +Intel +Intel's +Internet +Internet's +Iran +Iran's +Ireland +Ireland's +Israel +Israel's +Israeli +Israeli's +Israelis +Italian +Italian's +Italians +James +Januaries +January +January's +Japan +Japan's +Japanese +Japanese's +Jefferson +Jefferson's +Jill +Jill's +Johnnie +Johnnie's +Jr +Julie +Julie's +Julies +July +July's +Julys +June +June's +Junes +Klein +Klein's +Kleinrock +Kleinrock's +Kline +Kline's +Knuth +Knuth's +Kuenning +Kuenning's +LED's +LEDs +LaTeX +LaTeX's +Lagrangian +Lagrangian's +Lamport +Lamport's +Latin +Latin's +Laurie +Laurie's +Lenten +Linux +Liz +Liz's +Lyle +Lyle's +MHz +MIT +MIT's +MacDraw +MacDraw's +MacIntosh +MacIntosh's +MacPaint +MacPaint's +Mafia +Mafia's +Malibu +Malibu's +Mandelbrot +Mandelbrot's +Manhattan +Manhattan's +Manila +Manila's +Marianne +Marianne's +Mary +Mary's +Maryland +Maryland's +Marylanders +Massachusetts +Massey +Massey's +Matt +Matt's +Maxtor +Maxtor's +McElhaney +McElhaney's +McKenzie +McKenzie's +McMartin +McMartin's +Medusa +Medusa's +Michigan +Michigan's +Microport +Microport's +Microsoft +Microsoft's +Midwest +Minnesota +Minnesota's +Monday +Monday's +Mondays +Montana +Montana's +Montanan +Montanan's +Moslem +Moslem's +Moslems +Motorola +Motorola's +Mr +Mrs +Ms +Multibus +Multibus's +Multics +Munsey +Munsey's +Muslim +Muslim's +Muslims +NFS +Nazi +Nazi's +Nazis +NeWS +Nebraska +Nebraska's +Nebraskan +Nebraskan's +Negro +Negro's +Negroes +Nepal +Nepal's +Netherlands +Newtonian +November +November's +Novembers +OEM +OEM's +OEMS +OK +OS +OS's +October +October's +Octobers +Oderberg +Oderberg's +Oderbergs +Oedipus +Ohio +Ohio's +Oklahoma +Oklahoma's +Oklahoman +Oklahoman's +Oliver's +PC +PC's +PCs +PDP +Packard +Packard's +Packards +Palestinian +Pascal +Pascal's +Pennsylvania +Pennsylvania's +Peter's +Petkiewicz +Petkiewicz's +PhD +Planck +Planck's +Poland +Poland's +Popek +Popek's +Popeks +Prime's +Prokofiev +Prokofiev's +QA +RCS +ROM +RSX +Redford +Redford's +Rick +Rick's +Ritchie +Ritchie's +Robert +Robert's +Roberts +Robinson +Robinson's +Roman +Roman's +Romans +Roy +Roy's +Rubens +Russian +Russian's +Russians +SCCS +SMTP +Sally's +Salz +Salz's +Sam +Sam's +Saturday +Saturday's +Saturdays +Scotland +Scotland's +Seagate +Seagate's +September +September's +Septembers +Signor +Sikkim +Sikkim's +Sikkimese +Silverstein +Silverstein's +Singapore +Singapore's +Spafford +Spafford's +Spain +Spain's +Spanish +Spanish's +Spencer +Spencer's +Spuds +Sr +Sunday +Sunday's +Sundays +TCP +TV's +TeX +TeX's +Teflon +Teflon's +Tektronix +Tektronix's +Tennessee +Tennessee's +Texas +Texas's +Texases +Thursday +Thursday's +Thursdays +Tinseltown +Tinseltown's +Trudeau +Trudeau's +Tuesday +Tuesday's +Tuesdays +Turing +Turing's +UART +UCLA +UNIX's +USC +USC's +USG +USG's +Ultrix +Ultrix's +Unix +Unix's +Usenet +Usenet's +Usenix +Usenix's +Utah +Utah's +VAR +VCR +VMS +VMS's +Vanessa +Vanessa's +Vax +Vax's +Ventura +Ventura's +Virginia +Virginia's +Warnock +Warnock's +Washington +Washington's +Wednesday +Wednesday's +Wednesdays +Weibull +Weibull's +Wilbur +Wilbur's +Willisson +Willisson's +Wilson +Wilson's +Xenix +Xenix's +Xeroxed +Xeroxes +Xeroxing +Yamaha +Yamaha's +Yentl +Yentl's +York +York's +Yorker +Yorkers +Yorks +Zealand +Zealand's +Zulu +Zulu's +Zulus +a +aback +abaft +abandon +abandoned +abandoner +abandoning +abandonment +abandonments +abandons +abase +abased +abasement +abasements +abaser +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +abbe +abbey +abbey's +abbeys +abbot +abbot's +abbots +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +abdomen +abdomen's +abdomens +abdominal +abdominally +abduct +abducted +abducting +abduction +abduction's +abductions +abductor +abductor's +abductors +abducts +abed +aberrant +aberrantly +aberration +aberrations +abet +abets +abetted +abetter +abetting +abettor +abeyance +abhor +abhorred +abhorrent +abhorrently +abhorrer +abhorring +abhors +abide +abided +abider +abides +abiding +abidingly +abilities +ability +ability's +abject +abjection +abjections +abjectly +abjectness +abjure +abjured +abjurer +abjures +abjuring +ablate +ablated +ablates +ablating +ablation +ablative +ablatively +ablaze +able +abler +ablest +ablution +ablutions +ably +abnormal +abnormalities +abnormality +abnormally +aboard +abode +abode's +abodes +abolish +abolished +abolisher +abolishers +abolishes +abolishing +abolishment +abolishment's +abolishments +abolition +abolitionist +abolitionists +abominable +aboriginal +aboriginally +aborigine +aborigine's +aborigines +abort +aborted +aborter +aborting +abortion +abortion's +abortions +abortive +abortively +abortiveness +aborts +abound +abounded +abounding +abounds +about +above +aboveground +abrade +abraded +abrader +abrades +abrading +abrasion +abrasion's +abrasions +abreaction +abreaction's +abreactions +abreast +abridge +abridged +abridger +abridges +abridging +abridgment +abroad +abrogate +abrogated +abrogates +abrogating +abrogation +abrupt +abruptly +abruptness +abscess +abscessed +abscesses +abscissa +abscissa's +abscissas +abscond +absconded +absconder +absconding +absconds +absence +absence's +absences +absent +absented +absentee +absentee's +absenteeism +absentees +absentia +absenting +absently +absentminded +absentmindedly +absentmindedness +absents +absinthe +absolute +absolutely +absoluteness +absolutes +absolution +absolve +absolved +absolver +absolves +absolving +absorb +absorbed +absorbency +absorbent +absorbent's +absorbents +absorber +absorbing +absorbingly +absorbs +absorption +absorption's +absorptions +absorptive +abstain +abstained +abstainer +abstaining +abstains +abstention +abstentions +abstinence +abstract +abstracted +abstractedly +abstractedness +abstracter +abstracting +abstraction +abstraction's +abstractionism +abstractionist +abstractionists +abstractions +abstractive +abstractly +abstractness +abstractor +abstractor's +abstractors +abstracts +abstruse +abstrusely +abstruseness +abstrusenesses +absurd +absurdities +absurdity +absurdity's +absurdly +absurdness +abundance +abundances +abundant +abundantly +abuse +abused +abuser +abusers +abuses +abusing +abusive +abusively +abusiveness +abut +abutment +abutments +abuts +abutted +abutter +abutter's +abutters +abutting +abysmal +abysmally +abyss +abyss's +abysses +acacia +academia +academic +academically +academics +academies +academy +academy's +accede +acceded +accedes +acceding +accelerate +accelerated +accelerates +accelerating +acceleratingly +acceleration +accelerations +accelerative +accelerator +accelerators +accelerometer +accelerometer's +accelerometers +accent +accented +accenting +accents +accentual +accentually +accentuate +accentuated +accentuates +accentuating +accentuation +accept +acceptability +acceptable +acceptableness +acceptably +acceptance +acceptance's +acceptances +accepted +acceptedly +accepter +accepters +accepting +acceptingly +acceptingness +acceptive +acceptor +acceptor's +acceptors +accepts +access +accessed +accesses +accessibility +accessible +accessibly +accessing +accession +accession's +accessions +accessories +accessory +accessory's +accident +accident's +accidental +accidentally +accidentalness +accidently +accidents +acclaim +acclaimed +acclaimer +acclaiming +acclaims +acclamation +acclimate +acclimated +acclimates +acclimating +acclimation +accolade +accolades +accommodate +accommodated +accommodates +accommodating +accommodatingly +accommodation +accommodations +accommodative +accommodativeness +accompanied +accompanier +accompanies +accompaniment +accompaniment's +accompaniments +accompanist +accompanist's +accompanists +accompany +accompanying +accomplice +accomplices +accomplish +accomplished +accomplisher +accomplishers +accomplishes +accomplishing +accomplishment +accomplishment's +accomplishments +accord +accordance +accordances +accorded +accorder +accorders +according +accordingly +accordion +accordion's +accordions +accords +accost +accosted +accosting +accosts +account +accountabilities +accountability +accountable +accountableness +accountably +accountancy +accountant +accountant's +accountants +accounted +accounting +accountings +accounts +accredit +accreditation +accreditations +accredited +accretion +accretion's +accretions +accrue +accrued +accrues +accruing +acculturate +acculturated +acculturates +acculturating +acculturation +acculturative +accumulate +accumulated +accumulates +accumulating +accumulation +accumulations +accumulative +accumulatively +accumulativeness +accumulator +accumulator's +accumulators +accuracies +accuracy +accurate +accurately +accurateness +accursed +accursedly +accursedness +accusal +accusation +accusation's +accusations +accusative +accuse +accused +accuser +accusers +accuses +accusing +accusingly +accustom +accustomed +accustomedness +accustoming +accustoms +ace +ace's +aced +acer +aces +acetate +acetone +acetylene +ache +ached +aches +achievable +achieve +achieved +achievement +achievement's +achievements +achiever +achievers +achieves +achieving +aching +achingly +acid +acidic +acidities +acidity +acidly +acidness +acids +acidulous +acing +acknowledge +acknowledged +acknowledgedly +acknowledger +acknowledgers +acknowledges +acknowledging +acme +acne +acned +acolyte +acolytes +acorn +acorn's +acorns +acoustic +acoustical +acoustically +acoustician +acoustics +acquaint +acquaintance +acquaintance's +acquaintances +acquainted +acquainting +acquaints +acquiesce +acquiesced +acquiescence +acquiesces +acquiescing +acquirable +acquire +acquired +acquires +acquiring +acquisition +acquisition's +acquisitions +acquisitiveness +acquit +acquits +acquittal +acquittals +acquitted +acquitter +acquitting +acre +acre's +acreage +acres +acrid +acridly +acridness +acrimonious +acrimoniously +acrimony +acrobat +acrobat's +acrobatic +acrobatics +acrobats +acronym +acronym's +acronyms +acropolis +across +acrylic +act +acted +acting +actinium +actinometer +actinometer's +actinometers +action +action's +actions +activate +activated +activates +activating +activation +activations +activator +activator's +activators +active +actively +activeness +activism +activist +activist's +activists +activities +activity +activity's +actor +actor's +actors +actress +actress's +actresses +acts +actual +actualities +actuality +actually +actuals +actuarial +actuarially +actuate +actuated +actuates +actuating +actuation +actuator +actuator's +actuators +acuity +acumen +acute +acutely +acuteness +acuter +acutest +acyclic +acyclically +ad +adage +adages +adagio +adagios +adamant +adamantly +adapt +adaptability +adaptable +adaptation +adaptation's +adaptations +adapted +adaptedness +adapter +adapters +adapting +adaption +adaptive +adaptively +adaptiveness +adaptor +adaptors +adapts +add +added +addenda +addendum +adder +adders +addict +addicted +addicting +addiction +addiction's +addictions +addictive +addicts +adding +addition +addition's +additional +additionally +additions +additive +additive's +additively +additives +additivity +address +addressability +addressable +addressed +addressee +addressee's +addressees +addresser +addressers +addresses +addressing +adds +adduce +adduced +adducer +adduces +adducing +adduct +adducted +adducting +adduction +adductive +adductor +adducts +adept +adeptly +adeptness +adepts +adequacies +adequacy +adequate +adequately +adequateness +adhere +adhered +adherence +adherences +adherent +adherent's +adherently +adherents +adherer +adherers +adheres +adhering +adhesion +adhesions +adhesive +adhesive's +adhesively +adhesiveness +adhesives +adiabatic +adiabatically +adieu +adjacency +adjacent +adjacently +adjective +adjective's +adjectively +adjectives +adjoin +adjoined +adjoining +adjoins +adjourn +adjourned +adjourning +adjournment +adjourns +adjudge +adjudged +adjudges +adjudging +adjudicate +adjudicated +adjudicates +adjudicating +adjudication +adjudication's +adjudications +adjudicative +adjunct +adjunct's +adjunctive +adjunctly +adjuncts +adjure +adjured +adjures +adjuring +adjust +adjustable +adjustably +adjusted +adjuster +adjusters +adjusting +adjustive +adjustment +adjustment's +adjustments +adjustor +adjustor's +adjustors +adjusts +adjutant +adjutants +administer +administered +administering +administerings +administers +administration +administration's +administrations +administrative +administratively +administrator +administrator's +administrators +admirable +admirableness +admirably +admiral +admiral's +admirals +admiralty +admiration +admirations +admire +admired +admirer +admirers +admires +admiring +admiringly +admissibility +admissible +admission +admission's +admissions +admit +admits +admittance +admitted +admittedly +admitting +admix +admixed +admixes +admixture +admonish +admonished +admonisher +admonishes +admonishing +admonishingly +admonishment +admonishment's +admonishments +admonition +admonition's +admonitions +ado +adobe +adolescence +adolescent +adolescent's +adolescently +adolescents +adopt +adopted +adopter +adopters +adopting +adoption +adoption's +adoptions +adoptive +adoptively +adopts +adorable +adorableness +adoration +adore +adored +adorer +adores +adoring +adorn +adorned +adorning +adornment +adornment's +adornments +adorns +adrenal +adrenaline +adrenally +adrift +adroit +adroitly +adroitness +ads +adsorb +adsorbed +adsorbing +adsorbs +adsorption +adulate +adulating +adulation +adulations +adult +adult's +adulterate +adulterated +adulterates +adulterating +adulteration +adulterer +adulterer's +adulterers +adulterous +adulterously +adultery +adulthood +adultly +adultness +adults +adumbrate +adumbrated +adumbrates +adumbrating +adumbration +adumbrative +adumbratively +advance +advanced +advancement +advancement's +advancements +advancer +advancers +advances +advancing +advantage +advantaged +advantageous +advantageously +advantageousness +advantages +advantaging +advent +adventist +adventists +adventitious +adventitiously +adventitiousness +adventive +adventively +adventure +adventured +adventurer +adventurers +adventures +adventuring +adventurous +adventurously +adventurousness +adverb +adverb's +adverbial +adverbially +adverbs +adversaries +adversary +adversary's +adverse +adversed +adversely +adverses +adversing +adversities +adversity +advertise +advertised +advertisement +advertisement's +advertisements +advertiser +advertisers +advertises +advertising +advice +advisability +advisable +advisableness +advisably +advise +advised +advisedly +advisee +advisee's +advisees +advisement +advisements +adviser +adviser's +advisers +advises +advising +advisor +advisor's +advisors +advisory +advocacy +advocate +advocated +advocates +advocating +advocation +advocative +aegis +aerate +aerated +aerates +aerating +aeration +aerator +aerators +aerial +aerial's +aerially +aerials +aeroacoustic +aerobic +aerobics +aerodynamic +aerodynamics +aeronautic +aeronautical +aeronautically +aeronautics +aerosol +aerosols +aerospace +afar +afars +affable +affair +affair's +affairs +affect +affectation +affectation's +affectations +affected +affectedly +affectedness +affecter +affecting +affectingly +affection +affection's +affectionate +affectionately +affectioned +affections +affective +affectively +affects +afferent +afferently +affianced +affidavit +affidavit's +affidavits +affiliate +affiliated +affiliates +affiliating +affiliation +affiliations +affinities +affinity +affinity's +affirm +affirmation +affirmation's +affirmations +affirmative +affirmatively +affirmed +affirming +affirms +affix +affixed +affixes +affixing +afflict +afflicted +afflicting +affliction +affliction's +afflictions +afflictive +afflictively +afflicts +affluence +affluent +affluently +afford +affordable +afforded +affording +affords +affricate +affricates +affrication +affricative +affright +affront +affronted +affronting +affronts +afghan +afghans +aficionado +aficionados +afield +afire +aflame +afloat +afoot +afore +aforementioned +aforesaid +aforethought +afoul +afraid +afresh +aft +after +aftereffect +aftereffects +aftermath +aftermost +afternoon +afternoon's +afternoons +afters +aftershock +aftershock's +aftershocks +afterthought +afterthoughts +afterward +afterwards +again +against +agape +agar +agate +agates +age +aged +agedly +agedness +ageless +agelessly +agelessness +agencies +agency +agency's +agenda +agenda's +agendas +agent +agent's +agentive +agents +ager +agers +ages +agglomerate +agglomerated +agglomerates +agglomeration +agglomerative +agglutinate +agglutinated +agglutinates +agglutinating +agglutination +agglutinative +agglutinin +agglutinins +aggravate +aggravated +aggravates +aggravating +aggravation +aggravations +aggregate +aggregated +aggregately +aggregateness +aggregates +aggregating +aggregation +aggregations +aggregative +aggregatively +aggression +aggression's +aggressions +aggressive +aggressively +aggressiveness +aggressor +aggressors +aggrieve +aggrieved +aggrievedly +aggrieves +aggrieving +aghast +agile +agilely +agility +aging +agitate +agitated +agitatedly +agitates +agitating +agitation +agitations +agitative +agitator +agitator's +agitators +agleam +aglow +agnostic +agnostic's +agnostics +ago +agog +agonies +agony +agrarian +agree +agreeable +agreeableness +agreeably +agreed +agreeing +agreement +agreement's +agreements +agreer +agreers +agrees +agricultural +agriculturally +agriculture +ague +ah +ahead +aid +aide +aided +aider +aides +aiding +aids +ail +ailed +aileron +ailerons +ailing +ailment +ailment's +ailments +ails +aim +aimed +aimer +aimers +aiming +aimless +aimlessly +aimlessness +aims +air +airbag +airbag's +airbags +airborne +aircraft +aircrafts +airdrop +airdrops +aired +airer +airers +airfield +airfield's +airfields +airflow +airframe +airframe's +airframes +airhead +airier +airiest +airily +airiness +airing +airings +airless +airlessness +airlift +airlift's +airlifts +airline +airline's +airliner +airliner's +airliners +airlines +airlock +airlock's +airlocks +airmail +airmails +airman +airmen +airport +airport's +airports +airs +airship +airship's +airships +airspace +airspeed +airspeeds +airstrip +airstrip's +airstrips +airway +airway's +airways +airy +aisle +aisles +ajar +akimbo +akin +alabaster +alacrity +alarm +alarmed +alarming +alarmingly +alarmist +alarms +alas +alba +albacore +albeit +album +albumen +albumin +albums +alchemy +alcohol +alcohol's +alcoholic +alcoholic's +alcoholics +alcoholism +alcoholisms +alcohols +alcove +alcove's +alcoved +alcoves +alder +alderman +alderman's +aldermen +ale +alee +alert +alerted +alertedly +alerter +alerters +alerting +alertly +alertness +alerts +alfalfa +alfresco +alga +algae +algaecide +algebra +algebra's +algebraic +algebraically +algebras +alginate +alginates +algorithm +algorithm's +algorithmic +algorithmically +algorithms +alias +aliased +aliases +aliasing +alibi +alibi's +alibis +alien +alien's +alienate +alienated +alienates +alienating +alienation +aliens +alight +alighted +alighting +align +aligned +aligner +aligning +alignment +alignments +aligns +alike +alikeness +aliment +aliments +alimony +alive +aliveness +alkali +alkali's +alkaline +alkalis +alkaloid +alkaloid's +alkaloids +alkyl +all +allay +allayed +allaying +allays +allegation +allegation's +allegations +allege +alleged +allegedly +alleges +allegiance +allegiance's +allegiances +alleging +allegoric +allegorical +allegorically +allegoricalness +allegories +allegory +allegory's +allegretto +allegretto's +allegrettos +allegro +allegro's +allegros +allele +alleles +allemande +allergic +allergies +allergy +allergy's +alleviate +alleviated +alleviates +alleviating +alleviation +alleviative +alleviator +alleviator's +alleviators +alley +alley's +alleys +alleyway +alleyway's +alleyways +alliance +alliance's +alliances +allied +allier +allies +alligator +alligator's +alligatored +alligators +alliteration +alliteration's +alliterations +alliterative +alliteratively +allocate +allocated +allocates +allocating +allocation +allocation's +allocations +allocative +allocator +allocator's +allocators +allophone +allophones +allophonic +allot +alloted +allotment +allotment's +allotments +allots +allotted +allotter +allotting +allow +allowable +allowableness +allowably +allowance +allowance's +allowanced +allowances +allowancing +allowed +allowedly +allowing +allows +alloy +alloy's +alloyed +alloying +alloys +allude +alluded +alludes +alluding +allure +allured +allurement +allures +alluring +allusion +allusion's +allusions +allusive +allusively +allusiveness +ally +allying +alma +almanac +almanac's +almanacs +almightiness +almighty +almond +almond's +almonds +almoner +almost +alms +almsman +alnico +aloe +aloes +aloft +aloha +alone +aloneness +along +alongside +aloof +aloofly +aloofness +aloud +alpha +alphabet +alphabet's +alphabetic +alphabetical +alphabetically +alphabetics +alphabets +alphanumeric +alphanumerics +alpine +alps +already +also +altar +altar's +altars +alter +alterable +alteration +alteration's +alterations +altercation +altercation's +altercations +altered +alterer +alterers +altering +alternate +alternated +alternately +alternates +alternating +alternation +alternations +alternative +alternatively +alternativeness +alternatives +alternator +alternator's +alternators +alters +although +altitude +altitudes +alto +alto's +altogether +altos +altruism +altruist +altruistic +altruistically +altruists +alum +alumna +alumna's +alumnae +alumni +alumnus +alundum +alveolar +alveolarly +alveoli +alveolus +always +am +amain +amalgam +amalgam's +amalgamate +amalgamated +amalgamates +amalgamating +amalgamation +amalgamations +amalgamative +amalgams +amanuensis +amass +amassed +amasser +amasses +amassing +amateur +amateur's +amateurish +amateurishly +amateurishness +amateurism +amateurs +amatory +amaze +amazed +amazedly +amazement +amazer +amazers +amazes +amazing +amazingly +amazon +amazon's +amazons +ambassador +ambassador's +ambassadors +amber +ambiance +ambiances +ambidextrous +ambidextrously +ambient +ambiguities +ambiguity +ambiguity's +ambiguous +ambiguously +ambiguousness +ambition +ambition's +ambitions +ambitious +ambitiously +ambitiousness +ambivalence +ambivalent +ambivalently +amble +ambled +ambler +ambles +ambling +ambrosial +ambrosially +ambulance +ambulance's +ambulances +ambulatory +ambuscade +ambuscader +ambush +ambushed +ambusher +ambushes +ameliorate +ameliorated +ameliorating +amelioration +ameliorative +amen +amenable +amend +amended +amender +amending +amendment +amendment's +amendments +amends +amenities +amenity +americium +amiable +amiableness +amiabler +amiablest +amicable +amicableness +amicably +amid +amide +amidst +amigo +amino +amiss +amity +ammo +ammonia +ammoniac +ammonias +ammonium +ammunition +ammunitions +amnesty +amoeba +amoeba's +amoebas +amok +among +amongst +amoral +amorality +amorally +amorous +amorously +amorousness +amorphous +amorphously +amorphousness +amount +amounted +amounter +amounters +amounting +amounts +amour +amour's +amours +amp +ampere +amperes +ampersand +ampersand's +ampersands +amphetamine +amphetamines +amphibian +amphibian's +amphibians +amphibious +amphibiously +amphibiousness +amphibology +ample +ampleness +ampler +amplest +amplification +amplifications +amplified +amplifier +amplifiers +amplifies +amplify +amplifying +amplitude +amplitude's +amplitudes +amply +ampoule +ampoule's +ampoules +amps +amputate +amputated +amputates +amputating +amputation +ams +amulet +amulets +amuse +amused +amusedly +amusement +amusement's +amusements +amuser +amusers +amuses +amusing +amusingly +amusingness +amusive +amyl +an +anachronism +anachronism's +anachronisms +anachronistically +anaconda +anacondas +anaerobic +anagram +anagram's +anagrams +anal +analogical +analogically +analogies +analogous +analogously +analogousness +analogy +analogy's +analysis +analyst +analyst's +analysts +analytic +analytical +analytically +analyticities +analyticity +analytics +anaphora +anaphoric +anaphorically +anaplasmosis +anarchic +anarchical +anarchist +anarchist's +anarchists +anarchy +anastomoses +anastomosis +anastomotic +anathema +anatomic +anatomical +anatomically +anatomicals +anatomy +ancestor +ancestor's +ancestors +ancestral +ancestrally +ancestry +anchor +anchorage +anchorage's +anchorages +anchored +anchoring +anchorite +anchoritism +anchors +anchovies +anchovy +ancient +anciently +ancientness +ancients +ancillaries +ancillary +and +anded +anders +anding +android +ands +anecdotal +anecdotally +anecdote +anecdote's +anecdotes +anechoic +anemometer +anemometer's +anemometers +anemometry +anemone +anew +angel +angel's +angelic +angels +anger +angered +angering +angers +angiography +angle +angled +angler +anglers +angles +angling +angrier +angriest +angrily +angriness +angry +angst +angstrom +angstroms +anguish +anguished +angular +angularly +anhydrous +anhydrously +aniline +animal +animal's +animally +animalness +animals +animate +animated +animatedly +animately +animateness +animates +animating +animation +animations +animator +animator's +animators +animism +animosity +anion +anion's +anionic +anionics +anions +anise +aniseikonic +anisotropic +anisotropies +anisotropy +anisotropy's +ankle +ankle's +ankles +annal +annalen +annals +annex +annexation +annexations +annexed +annexes +annexing +annihilate +annihilated +annihilates +annihilating +annihilation +annihilative +anniversaries +anniversary +anniversary's +annotate +annotated +annotates +annotating +annotation +annotations +annotative +announce +announced +announcement +announcement's +announcements +announcer +announcers +announces +announcing +annoy +annoyance +annoyance's +annoyances +annoyed +annoyer +annoyers +annoying +annoyingly +annoys +annual +annually +annuals +annul +annulled +annulling +annulment +annulment's +annulments +annuls +annum +annunciate +annunciated +annunciates +annunciating +annunciation +annunciator +annunciators +anode +anode's +anodes +anoint +anointed +anointer +anointing +anoints +anomalies +anomalous +anomalously +anomalousness +anomaly +anomaly's +anomic +anomie +anon +anonymity +anonymous +anonymously +anonymousness +anorexia +another +another's +answer +answerable +answered +answerer +answerers +answering +answers +ant +ant's +antagonism +antagonisms +antagonist +antagonist's +antagonistic +antagonistically +antagonists +antarctic +ante +anteater +anteater's +anteaters +antecedent +antecedent's +antecedently +antecedents +anted +antedate +antedated +antedates +antedating +antelope +antelope's +antelopes +antenna +antenna's +antennae +antennas +anterior +anteriorly +anteriors +anthem +anthem's +anthems +anther +anthologies +anthology +anthracite +anthropological +anthropologically +anthropologist +anthropologist's +anthropologists +anthropology +anthropomorphic +anthropomorphically +anti +antibacterial +antibiotic +antibiotics +antibodies +antibody +antic +antic's +anticipate +anticipated +anticipates +anticipating +anticipation +anticipations +anticipative +anticipatively +anticipatory +anticoagulation +anticompetitive +antics +antidisestablishmentarianism +antidote +antidote's +antidotes +antiformant +antifundamentalist +antigen +antigen's +antigens +antihistorical +antimicrobial +antimony +anting +antinomian +antinomy +antipathy +antiphonal +antiphonally +antipode +antipode's +antipodes +antiquarian +antiquarian's +antiquarians +antiquate +antiquated +antiquation +antique +antique's +antiques +antiquities +antiquity +antiredeposition +antiresonance +antiresonator +antiseptic +antisera +antiserum +antislavery +antisocial +antisubmarine +antisymmetric +antisymmetry +antithesis +antithetical +antithetically +antithyroid +antitoxin +antitoxin's +antitoxins +antitrust +antitruster +antler +antlered +ants +anus +anvil +anvil's +anvils +anxieties +anxiety +anxious +anxiously +anxiousness +any +anybodies +anybody +anyhow +anymore +anyone +anyone's +anyones +anyplace +anything +anythings +anyway +anyways +anywhere +anywheres +aorta +apace +apart +apartheid +apartment +apartment's +apartments +apartness +apathetic +apathy +ape +aped +aper +aperiodic +aperiodicity +aperture +apertured +apes +apex +apexes +aphasia +aphasic +aphid +aphid's +aphids +aphonic +aphorism +aphorism's +aphorisms +apiaries +apiary +apical +apically +apiece +aping +apish +apishly +apishness +aplenty +aplomb +apocalypse +apocalyptic +apocrypha +apocryphal +apocryphally +apocryphalness +apogee +apogees +apologetic +apologetically +apologetics +apologia +apologies +apologist +apologist's +apologists +apology +apology's +apostate +apostates +apostle +apostle's +apostles +apostolic +apostrophe +apostrophes +apothecary +apotheoses +apotheosis +appalled +appalling +appallingly +appanage +apparatus +apparatuses +apparel +apparels +apparent +apparently +apparentness +apparition +apparition's +apparitions +appeal +appealed +appealer +appealers +appealing +appealingly +appeals +appear +appearance +appearances +appeared +appearer +appearers +appearing +appears +appease +appeased +appeasement +appeaser +appeases +appeasing +appellant +appellant's +appellants +appellate +appellation +appellative +appellatively +append +appendage +appendage's +appendages +appended +appender +appenders +appendices +appendicitis +appending +appendix +appendix's +appendixes +appends +appertain +appertained +appertaining +appertains +appetite +appetite's +appetites +appetitive +applaud +applauded +applauder +applauding +applauds +applause +apple +apple's +applejack +apples +appliance +appliance's +appliances +applicability +applicable +applicant +applicant's +applicants +application +application's +applications +applicative +applicatively +applicator +applicator's +applicators +applied +applier +appliers +applies +applique +appliques +apply +applying +appoint +appointed +appointee +appointee's +appointees +appointer +appointers +appointing +appointive +appointment +appointment's +appointments +appoints +apportion +apportioned +apportioning +apportionment +apportionments +apportions +appraisal +appraisal's +appraisals +appraise +appraised +appraiser +appraisers +appraises +appraising +appraisingly +appreciable +appreciably +appreciate +appreciated +appreciates +appreciating +appreciation +appreciations +appreciative +appreciatively +appreciativeness +apprehend +apprehended +apprehender +apprehending +apprehends +apprehensible +apprehension +apprehension's +apprehensions +apprehensive +apprehensively +apprehensiveness +apprentice +apprenticed +apprentices +apprenticeship +apprenticeships +apprise +apprised +appriser +apprisers +apprises +apprising +apprisings +apprize +apprized +apprizer +apprizers +apprizes +apprizing +apprizingly +apprizings +approach +approachability +approachable +approached +approacher +approachers +approaches +approaching +approbate +approbation +appropriate +appropriated +appropriately +appropriateness +appropriates +appropriatest +appropriating +appropriation +appropriations +appropriative +appropriator +appropriator's +appropriators +approval +approval's +approvals +approve +approved +approver +approvers +approves +approving +approvingly +approximate +approximated +approximately +approximates +approximating +approximation +approximations +approximative +approximatively +appurtenance +appurtenances +apricot +apricot's +apricots +apron +apron's +aprons +apropos +apse +apses +apsis +apt +aptitude +aptitudes +aptly +aptness +aqua +aquaria +aquarium +aquas +aquatic +aquatics +aqueduct +aqueduct's +aqueducts +aqueous +aqueously +aquifer +aquifers +arabesque +arable +arachnid +arachnid's +arachnids +arbiter +arbiter's +arbiters +arbitrarily +arbitrariness +arbitrary +arbitrate +arbitrated +arbitrates +arbitrating +arbitration +arbitrative +arbitrator +arbitrator's +arbitrators +arboreal +arboreally +arc +arcade +arcade's +arcaded +arcades +arcading +arcane +arced +arch +archaeological +archaeologically +archaeologist +archaeologist's +archaeologists +archaeology +archaic +archaically +archaicness +archaism +archangel +archangel's +archangels +archbishop +archdiocese +archdioceses +arched +archenemy +archer +archers +archery +arches +archetype +archetypes +archfool +arching +archipelago +archipelagoes +architect +architect's +architectonic +architectonics +architects +architectural +architecturally +architecture +architecture's +architectures +archival +archive +archived +archiver +archivers +archives +archiving +archivist +archivists +archly +archness +arcing +arclike +arcs +arctic +ardent +ardently +arduous +arduously +arduousness +are +area +area's +areas +aren't +arena +arena's +arenas +ares +argon +argonaut +argonauts +argot +arguable +arguably +argue +argued +arguer +arguers +argues +arguing +argument +argument's +argumentation +argumentative +argumentatively +arguments +arid +aridity +aridness +aright +arise +arisen +ariser +arises +arising +arisings +aristocracy +aristocrat +aristocrat's +aristocratic +aristocratically +aristocrats +arithmetic +arithmetical +arithmetically +arithmetics +ark +arm +arm's +armadillo +armadillos +armament +armament's +armaments +armchair +armchair's +armchairs +armed +armer +armers +armful +armfuls +armhole +armies +arming +armistice +armload +armpit +armpit's +armpits +arms +army +army's +aroma +aromas +aromatic +aromaticness +arose +around +arousal +arouse +aroused +arouses +arousing +arpeggio +arpeggio's +arpeggios +arrack +arraign +arraigned +arraigning +arraignment +arraignment's +arraignments +arraigns +arrange +arranged +arrangement +arrangement's +arrangements +arranger +arrangers +arranges +arranging +arrant +arrantly +array +arrayed +arrayer +arraying +arrays +arrears +arrest +arrested +arrester +arresters +arresting +arrestingly +arrestor +arrestor's +arrestors +arrests +arrival +arrival's +arrivals +arrive +arrived +arriver +arrives +arriving +arrogance +arrogant +arrogantly +arrogate +arrogated +arrogates +arrogating +arrogation +arrow +arrowed +arrowhead +arrowhead's +arrowheads +arrowing +arrows +arroyo +arroyos +arsenal +arsenal's +arsenals +arsenic +arsine +arsines +arson +art +art's +arterial +arterially +arteries +arteriolar +arteriole +arteriole's +arterioles +arteriosclerosis +artery +artery's +artful +artfully +artfulness +arthritis +arthrogram +arthrogram's +arthrograms +arthropod +arthropod's +arthropods +artichoke +artichoke's +artichokes +article +article's +articled +articles +articling +articulate +articulated +articulately +articulateness +articulates +articulating +articulation +articulations +articulative +articulator +articulators +articulatory +artifact +artifact's +artifacts +artifice +artificer +artifices +artificial +artificialities +artificiality +artificially +artificialness +artilleries +artillerist +artillery +artisan +artisan's +artisans +artist +artist's +artistic +artistically +artistry +artists +artless +artlessly +arts +artwork +as +asbestos +ascend +ascendancy +ascendant +ascendantly +ascended +ascendency +ascendent +ascender +ascenders +ascending +ascends +ascension +ascensions +ascent +ascertain +ascertainable +ascertained +ascertaining +ascertains +ascetic +ascetic's +asceticism +ascetics +ascot +ascribable +ascribe +ascribed +ascribes +ascribing +ascription +aseptic +ash +ashamed +ashamedly +ashen +asher +ashes +ashman +ashore +ashtray +ashtray's +ashtrays +aside +asides +asinine +asininely +ask +askance +asked +asker +askers +askew +askewness +asking +asks +asleep +asocial +asp +asparagus +aspect +aspect's +aspects +aspen +asper +aspersion +aspersion's +aspersions +asphalt +asphalted +asphyxia +aspic +aspirant +aspirant's +aspirants +aspirate +aspirated +aspirates +aspirating +aspiration +aspiration's +aspirations +aspirator +aspirators +aspire +aspired +aspirer +aspires +aspirin +aspiring +aspirins +ass +ass's +assail +assailant +assailant's +assailants +assailed +assailing +assails +assassin +assassin's +assassinate +assassinated +assassinates +assassinating +assassination +assassinations +assassins +assault +assaulted +assaulter +assaulting +assaultive +assaultively +assaultiveness +assaults +assay +assayed +assayer +assayers +assaying +assemblage +assemblage's +assemblages +assemble +assembled +assembler +assemblers +assembles +assemblies +assembling +assembly +assembly's +assen +assent +assented +assenter +assenting +assents +assert +asserted +asserter +asserters +asserting +assertion +assertion's +assertions +assertive +assertively +assertiveness +asserts +asses +assess +assessed +assesses +assessing +assessment +assessment's +assessments +assessor +assessor's +assessors +asset +asset's +assets +assiduity +assiduous +assiduously +assiduousness +assign +assignable +assigned +assignee +assignee's +assignees +assigner +assigners +assigning +assignment +assignment's +assignments +assigns +assimilate +assimilated +assimilates +assimilating +assimilation +assimilations +assimilative +assist +assistance +assistances +assistant +assistant's +assistants +assistantship +assistantships +assisted +assister +assisting +assists +associate +associated +associates +associating +association +association's +associational +associations +associative +associatively +associativities +associativity +associator +associator's +associators +assonance +assonant +assort +assorted +assorter +assorting +assortment +assortment's +assortments +assorts +assuage +assuaged +assuages +assuaging +assume +assumed +assumer +assumes +assuming +assumption +assumption's +assumptions +assurance +assurance's +assurances +assure +assured +assuredly +assuredness +assurer +assurers +assures +assuring +assuringly +astatine +aster +aster's +asterisk +asterisk's +asterisks +asteroid +asteroid's +asteroidal +asteroids +asters +asthma +astonish +astonished +astonishes +astonishing +astonishingly +astonishment +astound +astounded +astounding +astoundingly +astounds +astral +astrally +astray +astride +astringency +astringent +astringently +astronaut +astronaut's +astronautics +astronauts +astronomer +astronomer's +astronomers +astronomical +astronomically +astronomy +astrophysical +astrophysics +astute +astutely +astuteness +asunder +asylum +asylums +asymmetric +asymmetrical +asymmetrically +asymmetries +asymmetry +asymptomatically +asymptote +asymptote's +asymptotes +asymptotic +asymptotically +asymptoticly +asynchronism +asynchronous +asynchronously +asynchrony +at +atavistic +ate +atemporal +atheism +atheist +atheist's +atheistic +atheists +atherosclerosis +athlete +athlete's +athletes +athletic +athleticism +athletics +atlas +atmosphere +atmosphere's +atmosphered +atmospheres +atmospheric +atmospherics +atoll +atoll's +atolls +atom +atom's +atomic +atomically +atomics +atoms +atonal +atonally +atone +atoned +atonement +atones +atoning +atop +atrocious +atrociously +atrociousness +atrocities +atrocity +atrocity's +atrophic +atrophied +atrophies +atrophy +atrophying +attach +attache +attached +attacher +attachers +attaches +attaching +attachment +attachment's +attachments +attack +attackable +attacked +attacker +attacker's +attackers +attacking +attacks +attain +attainable +attainableness +attainably +attained +attainer +attainers +attaining +attainment +attainment's +attainments +attains +attempt +attempted +attempter +attempters +attempting +attempts +attend +attendance +attendance's +attendances +attendant +attendant's +attendants +attended +attendee +attendee's +attendees +attender +attenders +attending +attends +attention +attention's +attentional +attentionality +attentions +attentive +attentively +attentiveness +attenuate +attenuated +attenuates +attenuating +attenuation +attenuator +attenuator's +attenuators +attest +attested +attester +attesting +attests +attic +attic's +attics +attire +attired +attires +attiring +attitude +attitude's +attitudes +attitudinal +attitudinally +attorney +attorney's +attorneys +attract +attracted +attracting +attraction +attraction's +attractions +attractive +attractively +attractiveness +attractor +attractor's +attractors +attracts +attributable +attribute +attributed +attributer +attributes +attributing +attribution +attributions +attributive +attributively +attrition +attune +attuned +attunes +attuning +atypical +atypically +auburn +auction +auctioned +auctioneer +auctioneer's +auctioneers +auctioning +audacious +audaciously +audaciousness +audacity +audible +audibly +audience +audience's +audiences +audio +audiogram +audiogram's +audiograms +audiological +audiologist +audiologist's +audiologists +audiology +audiometer +audiometer's +audiometers +audiometric +audiometry +audit +audited +auditing +audition +audition's +auditioned +auditioning +auditions +auditive +auditor +auditor's +auditorium +auditoriums +auditors +auditory +audits +auger +auger's +augers +aught +augment +augmentation +augmentations +augmented +augmenter +augmenting +augments +augur +augurs +august +augustly +augustness +aunt +aunt's +auntly +aunts +aura +aura's +aural +aurally +auras +aureole +aureomycin +aurora +auscultate +auscultated +auscultates +auscultating +auscultation +auscultations +auspice +auspices +auspicious +auspiciously +auspiciousness +austere +austerely +austereness +austerity +authentic +authentically +authenticate +authenticated +authenticates +authenticating +authentication +authentications +authenticator +authenticators +authenticity +author +author's +authored +authoring +authoritarian +authoritarianism +authoritative +authoritatively +authoritativeness +authorities +authority +authority's +authors +authorship +autism +autistic +auto +auto's +autobiographic +autobiographical +autobiographically +autobiographies +autobiography +autobiography's +autocollimator +autocorrelate +autocorrelated +autocorrelates +autocorrelating +autocorrelation +autocorrelations +autocracies +autocracy +autocrat +autocrat's +autocratic +autocratically +autocrats +autodial +autofluorescence +autograph +autographed +autographing +autographs +automata +automate +automated +automates +automatic +automatically +automatics +automating +automation +automaton +automatons +automobile +automobile's +automobiles +automotive +autonavigator +autonavigator's +autonavigators +autonomic +autonomous +autonomously +autonomy +autopilot +autopilot's +autopilots +autopsied +autopsies +autopsy +autoregressive +autorepeat +autorepeating +autorepeats +autos +autosuggestibility +autotransformer +autumn +autumn's +autumnal +autumnally +autumns +auxiliaries +auxiliary +avail +availabilities +availability +available +availableness +availably +availed +availer +availers +availing +avails +avalanche +avalanched +avalanches +avalanching +avant +avarice +avaricious +avariciously +avariciousness +avenge +avenged +avenger +avenges +avenging +avenue +avenue's +avenues +aver +average +averaged +averagely +averageness +averages +averaging +averred +averrer +averring +avers +averse +aversely +averseness +aversion +aversion's +aversions +aversive +avert +averted +averting +averts +avian +aviaries +aviary +aviation +aviator +aviator's +aviators +avid +avidity +avidly +avidness +avionic +avionics +avocado +avocados +avocation +avocation's +avocations +avoid +avoidable +avoidably +avoidance +avoided +avoider +avoiders +avoiding +avoids +avouch +avow +avowed +avowedly +avower +avows +await +awaited +awaiting +awaits +awake +awaked +awaken +awakened +awakener +awakening +awakens +awakes +awaking +award +awarded +awarder +awarders +awarding +awards +aware +awareness +awash +away +awayness +awe +awed +awesome +awesomely +awesomeness +awful +awfully +awfulness +awhile +awhiles +awing +awkward +awkwardly +awkwardness +awl +awl's +awls +awning +awning's +awninged +awnings +awoke +awry +ax +axe +axed +axer +axers +axes +axial +axially +axing +axiological +axiologically +axiom +axiom's +axiomatic +axiomatically +axiomatics +axioms +axion +axion's +axions +axis +axle +axle's +axles +axolotl +axolotl's +axolotls +axon +axon's +axons +aye +ayer +ayers +ayes +azalea +azalea's +azaleas +azimuth +azimuth's +azimuths +azure +babble +babbled +babbler +babbles +babbling +babe +babe's +babes +babied +babies +baby +baby's +babyhood +babying +babyish +babysit +babysits +babysitter +babysitters +baccalaureate +bachelor +bachelor's +bachelors +bacilli +bacillus +back +backache +backache's +backaches +backbone +backbone's +backbones +backdrop +backdrop's +backdrops +backed +backer +backers +background +background's +backgrounds +backing +backlash +backlasher +backlog +backlog's +backlogs +backpack +backpack's +backpacker +backpackers +backpacks +backplane +backplane's +backplanes +backs +backscatter +backscattered +backscattering +backscatters +backslash +backslashed +backslashes +backslashing +backspace +backspaced +backspaces +backspacing +backstabber +backstabbing +backstage +backstairs +backstitch +backstitched +backstitches +backstitching +backtrack +backtracked +backtracker +backtrackers +backtracking +backtracks +backup +backups +backward +backwardly +backwardness +backwards +backwater +backwater's +backwaters +backwoods +backyard +backyard's +backyards +bacon +baconer +bacteria +bacterial +bacterially +bacterium +bad +bade +baden +badge +badged +badger +badger's +badgered +badgering +badgers +badges +badging +badlands +badly +badminton +badness +bads +baffle +baffled +baffler +bafflers +baffles +baffling +bafflingly +bag +bag's +bagatelle +bagatelle's +bagatelles +bagel +bagel's +bagels +baggage +bagged +bagger +bagger's +baggers +baggier +baggies +bagginess +bagging +baggy +bagpipe +bagpipe's +bagpiper +bagpipes +bags +bah +bail +bailer +bailiff +bailiff's +bailiffs +bailing +bailly +bait +baited +baiter +baiting +baits +bake +baked +baker +bakeries +bakers +bakery +bakery's +bakes +baking +bakings +baklava +balalaika +balalaika's +balalaikas +balance +balanced +balancedness +balancer +balancers +balances +balancing +balconied +balconies +balcony +balcony's +bald +balder +balding +baldly +baldness +bale +baled +baleful +balefully +balefulness +baler +balers +bales +baling +balk +balked +balker +balkier +balkiness +balking +balks +balky +ball +ballad +ballad's +ballads +ballast +ballast's +ballasts +balled +baller +ballerina +ballerina's +ballerinas +ballers +ballet +ballet's +ballets +balling +ballistic +ballistics +balloon +ballooned +ballooner +ballooners +ballooning +balloons +ballot +ballot's +balloted +balloter +balloting +ballots +ballplayer +ballplayer's +ballplayers +ballroom +ballroom's +ballrooms +balls +ballyhoo +balm +balm's +balmier +balminess +balms +balmy +balsa +balsam +balsams +balustrade +balustrade's +balustrades +bamboo +bamboos +ban +ban's +banal +banally +banana +banana's +bananas +band +bandage +bandaged +bandager +bandages +bandaging +banded +bander +bandied +bandies +banding +bandit +bandit's +bandits +bandpass +bands +bandstand +bandstand's +bandstands +bandwagon +bandwagon's +bandwagons +bandwidth +bandwidths +bandy +bandying +bane +baneful +banefully +bang +banged +banger +banging +bangle +bangle's +bangles +bangs +baning +banish +banished +banisher +banishes +banishing +banishment +banister +banister's +banisters +banjo +banjo's +banjos +bank +banked +banker +bankers +banking +bankrupt +bankruptcies +bankruptcy +bankruptcy's +bankrupted +bankrupting +bankrupts +banks +banned +banner +banner's +banners +banning +banquet +banqueted +banqueter +banqueting +banquetings +banquets +bans +banshee +banshee's +banshees +bantam +banter +bantered +banterer +bantering +banteringly +banters +baptism +baptism's +baptismal +baptismally +baptisms +baptist +baptist's +baptistery +baptistries +baptistry +baptistry's +baptists +bar +bar's +barb +barbarian +barbarian's +barbarians +barbaric +barbarities +barbarity +barbarous +barbarously +barbarousness +barbecue +barbecued +barbecuer +barbecues +barbecuing +barbed +barbedness +barbell +barbell's +barbells +barber +barbered +barbering +barbers +barbital +barbiturate +barbiturates +barbs +bard +bard's +bards +bare +bared +barefoot +barefooted +barely +bareness +barer +bares +barest +barflies +barfly +barfly's +bargain +bargained +bargainer +bargaining +bargains +barge +barged +barges +barging +baring +baritone +baritone's +baritones +barium +bark +barked +barker +barkers +barking +barks +barley +barn +barn's +barns +barnstorm +barnstormed +barnstormer +barnstorming +barnstorms +barnyard +barnyard's +barnyards +barometer +barometer's +barometers +barometric +baron +baron's +baroness +baronial +baronies +barons +barony +barony's +baroque +baroquely +baroqueness +barrack +barracker +barracks +barracuda +barracuda's +barracudas +barrage +barrage's +barraged +barrages +barraging +barred +barrel +barrel's +barrels +barren +barrenness +barrens +barricade +barricade's +barricades +barrier +barrier's +barriers +barring +barringer +barrow +barrows +bars +bartender +bartender's +bartenders +barter +bartered +barterer +bartering +barters +bas +basal +basally +basalt +base +baseball +baseball's +baseballs +baseboard +baseboard's +baseboards +based +baseless +baseline +baseline's +baselines +basely +baseman +basement +basement's +basements +baseness +baser +bases +basest +bash +bashed +basher +bashes +bashful +bashfully +bashfulness +bashing +basic +basically +basics +basil +basin +basin's +basined +basing +basins +basis +bask +basked +basket +basket's +basketball +basketball's +basketballs +baskets +basking +bass +bass's +basses +basset +bassinet +bassinet's +bassinets +basso +bastard +bastard's +bastardly +bastards +baste +basted +baster +bastes +basting +bastion +bastion's +bastioned +bastions +bat +bat's +batch +batched +batcher +batches +batching +bated +bater +bath +bathe +bathed +bather +bathers +bathes +bathing +bathos +bathrobe +bathrobe's +bathrobes +bathroom +bathroom's +bathroomed +bathrooms +baths +bathtub +bathtub's +bathtubs +bating +baton +baton's +batons +bats +battalion +battalion's +battalions +batted +batten +battened +battening +battens +batter +battered +batteries +battering +batters +battery +battery's +batting +battle +battled +battlefield +battlefield's +battlefields +battlefront +battlefront's +battlefronts +battleground +battleground's +battlegrounds +battlement +battlement's +battlemented +battlements +battler +battlers +battles +battleship +battleship's +battleships +battling +bauble +bauble's +baubles +baud +bauds +bauxite +bawdier +bawdiness +bawdy +bawl +bawled +bawler +bawling +bawls +bay +bayed +baying +bayly +bayonet +bayonet's +bayoneted +bayoneting +bayonets +bayou +bayou's +bayous +bays +bazaar +bazaar's +bazaars +be +beach +beached +beaches +beachhead +beachhead's +beachheads +beaching +beacon +beacon's +beaconed +beaconing +beacons +bead +beaded +beading +beadle +beadle's +beadles +beads +beady +beagle +beagle's +beagles +beak +beaked +beaker +beakers +beaks +beam +beamed +beamer +beamers +beaming +beams +bean +beanbag +beanbag's +beanbags +beaned +beaner +beaners +beaning +beans +bear +bearable +bearably +beard +bearded +beardedness +beardless +beards +bearer +bearers +bearing +bearings +bearish +bearishly +bearishness +bears +beast +beastings +beastlier +beastliness +beastly +beasts +beat +beatable +beatably +beaten +beater +beaters +beatific +beatification +beatify +beating +beatings +beatitude +beatitude's +beatitudes +beatnik +beatnik's +beatniks +beats +beau +beau's +beaus +beauteous +beauteously +beauteousness +beauties +beautification +beautifications +beautified +beautifier +beautifiers +beautifies +beautiful +beautifully +beautifulness +beautify +beautifying +beauty +beauty's +beaver +beaver's +beavers +becalm +becalmed +becalming +becalms +became +because +beck +beckon +beckoned +beckoning +beckons +become +becomes +becoming +becomingly +bed +bed's +bedazzle +bedazzled +bedazzlement +bedazzles +bedazzling +bedbug +bedbug's +bedbugs +bedded +bedder +bedder's +bedders +bedding +bedevil +bedevils +bedfast +bedlam +bedpost +bedpost's +bedposts +bedraggle +bedraggled +bedridden +bedrock +bedrock's +bedroom +bedroom's +bedroomed +bedrooms +beds +bedside +bedspread +bedspread's +bedspreads +bedspring +bedspring's +bedsprings +bedstead +bedstead's +bedsteads +bedtime +bee +beech +beechen +beecher +beef +beefed +beefer +beefers +beefier +beefing +beefs +beefsteak +beefy +beehive +beehive's +beehives +been +beens +beep +beeped +beeper +beeping +beeps +beer +beers +bees +beet +beet's +beetle +beetle's +beetled +beetles +beetling +beets +befall +befallen +befalling +befalls +befell +befit +befit's +befits +befitted +befitting +befittingly +befog +befogged +befogging +befogs +before +beforehand +befoul +befouled +befouling +befouls +befriend +befriended +befriending +befriends +befuddle +befuddled +befuddles +befuddling +beg +began +beget +begets +begetting +beggar +beggared +beggaring +beggarliness +beggarly +beggars +beggary +begged +begging +begin +beginner +beginner's +beginners +beginning +beginning's +beginnings +begins +begot +begotten +begrudge +begrudged +begrudger +begrudges +begrudging +begrudgingly +begs +beguile +beguiled +beguiler +beguiles +beguiling +beguilingly +begun +behalf +behave +behaved +behaver +behaves +behaving +behead +beheading +beheld +behest +behind +behold +beholden +beholder +beholders +beholding +beholds +beige +being +beings +belated +belatedly +belatedness +belay +belayed +belaying +belays +belch +belched +belches +belching +belfries +belfry +belfry's +belie +belied +belief +belief's +beliefs +belier +belies +believability +believable +believably +believe +believed +believer +believers +believes +believing +belittle +belittled +belittler +belittles +belittling +bell +bell's +bellboy +bellboy's +bellboys +belle +belle's +belles +bellhop +bellhop's +bellhops +bellicose +bellicosely +bellicoseness +bellicosity +bellied +bellies +belligerence +belligerent +belligerent's +belligerently +belligerents +bellman +bellmen +bellow +bellowed +bellowing +bellows +bells +bellwether +bellwether's +bellwethers +belly +belly's +bellyful +bellying +belong +belonged +belonging +belongingness +belongings +belongs +beloved +below +belt +belted +belting +belts +bely +belying +bemoan +bemoaned +bemoaning +bemoans +bench +benched +bencher +benches +benching +benchmark +benchmark's +benchmarking +benchmarks +bend +bendable +bended +bender +benders +bending +bends +beneath +benediction +benediction's +benedictions +benefactor +benefactor's +benefactors +beneficence +beneficences +beneficial +beneficially +beneficialness +beneficiaries +beneficiary +benefit +benefited +benefiter +benefiters +benefiting +benefits +benevolence +benevolent +benevolently +benevolentness +benighted +benightedly +benightedness +benign +benignly +bent +bents +benzene +bequeath +bequeathed +bequeathes +bequeathing +bequest +bequest's +bequests +berate +berated +berates +berating +bereave +bereaved +bereavement +bereavements +bereaves +bereaving +bereft +beret +beret's +berets +beribboned +beriberi +berkelium +berried +berries +berry +berry's +berrying +berth +berthed +berthing +berthings +berths +beryl +beryllium +bes +beseech +beseeches +beseeching +beseechingly +beset +besets +besetting +beside +besides +besiege +besieged +besieger +besiegers +besieging +besmirch +besmirched +besmirches +besmirching +besotted +besotting +besought +bespeak +bespeaks +bespectacled +best +bested +bester +bestial +bestially +besting +bestow +bestowal +bestowed +bests +bestseller +bestseller's +bestsellers +bestselling +bet +bet's +beta +betas +beth +betide +betray +betrayal +betrayed +betrayer +betraying +betrays +betroth +betrothal +betrothals +betrothed +bets +better +bettered +bettering +betterment +betterments +betters +betting +between +betweenness +betwixt +bevel +bevels +beverage +beverage's +beverages +bevies +bevy +bewail +bewailed +bewailing +bewails +beware +bewhiskered +bewilder +bewildered +bewilderedly +bewilderedness +bewildering +bewilderingly +bewilderment +bewilders +bewitch +bewitched +bewitches +bewitching +bewitchingly +beyond +biannual +bias +biased +biases +biasing +biasness +bib +bib's +bibbed +bibbing +bible +bible's +bibles +biblical +biblically +bibliographic +bibliographical +bibliographically +bibliographics +bibliographies +bibliography +bibliography's +bibliophile +bibliophiles +bibs +bicameral +bicarbonate +bicentennial +biceps +bicker +bickered +bickerer +bickering +bickers +biconcave +biconvex +bicycle +bicycled +bicycler +bicyclers +bicycles +bicycling +bid +bid's +biddable +bidden +bidder +bidder's +bidders +biddies +bidding +biddy +bide +bided +bider +bides +biding +bidirectional +bids +biennial +biennially +biennium +bier +bifocal +bifocals +bifurcate +bifurcated +bifurcately +bifurcates +bifurcating +bifurcation +bifurcations +big +bigger +biggest +bight +bight's +bights +bigly +bigness +bigot +bigot's +bigoted +bigotedly +bigoting +bigotry +bigots +bijection +bijection's +bijections +bijective +bijectively +bike +bike's +biked +biker +biker's +bikers +bikes +biking +bikini +bikini's +bikinied +bikinis +bilabial +bilateral +bilaterally +bilateralness +bile +bilge +bilge's +bilged +bilges +bilging +bilinear +bilingual +bilingually +bilinguals +bilk +bilked +bilker +bilking +bilks +bill +billboard +billboard's +billboards +billed +biller +billers +billet +billeted +billeting +billets +billiard +billiards +billing +billings +billion +billions +billionth +billow +billowed +billowing +billows +bills +bimodal +bimolecular +bimolecularly +bimonthlies +bimonthly +bin +bin's +binaries +binary +binaural +binaurally +bind +binded +binder +binders +binding +bindingly +bindingness +bindings +binds +bing +binge +bingen +binges +bingo +bingos +binocular +binocularly +binoculars +binomial +binomially +bins +binuclear +biochemical +biochemically +biochemistry +biofeedback +biographer +biographer's +biographers +biographic +biographical +biographically +biographies +biography +biography's +biological +biologically +biologicals +biologist +biologist's +biologists +biology +biomedical +biomedicine +biopsies +biopsy +bipartisan +bipartite +bipartitely +bipartition +biped +bipeds +biplane +biplane's +biplanes +bipolar +biracial +birch +birchen +bircher +birches +bird +bird's +birdbath +birdbath's +birdbaths +birder +birdie +birdied +birdies +birdlike +birds +birefringence +birefringent +birth +birthday +birthday's +birthdays +birthed +birthplace +birthplaces +birthright +birthright's +birthrights +births +biscuit +biscuit's +biscuits +bisect +bisected +bisecting +bisection +bisection's +bisections +bisector +bisector's +bisectors +bisects +bishop +bishop's +bishops +bismuth +bison +bison's +bisons +bisque +bisques +bit +bit's +bitblt +bitblts +bitch +bitch's +bitches +bite +biter +biters +bites +biting +bitingly +bitmap +bitmap's +bitmaps +bits +bitser +bitten +bitter +bitterer +bitterest +bitterly +bitterness +bitters +bittersweet +bittersweetly +bittersweetness +bituminous +bitwise +bivalve +bivalve's +bivalved +bivalves +bivariate +bivouac +bivouacs +biweekly +bizarre +bizarrely +bizarreness +blab +blabbed +blabbermouth +blabbermouths +blabbing +blabs +black +blackberries +blackberry +blackberry's +blackbird +blackbird's +blackbirder +blackbirds +blackboard +blackboard's +blackboards +blacked +blacken +blackened +blackener +blackening +blackens +blacker +blackest +blacking +blackjack +blackjack's +blackjacks +blacklist +blacklisted +blacklister +blacklisting +blacklists +blackly +blackmail +blackmailed +blackmailer +blackmailers +blackmailing +blackmails +blackness +blackout +blackout's +blackouts +blacks +blacksmith +blacksmith's +blacksmithing +blacksmiths +bladder +bladder's +bladders +blade +blade's +bladed +blades +blamable +blame +blamed +blameless +blamelessly +blamelessness +blamer +blamers +blames +blaming +blanch +blanched +blancher +blanches +blanching +bland +blandly +blandness +blank +blanked +blanker +blankest +blanket +blanketed +blanketer +blanketers +blanketing +blankets +blanking +blankly +blankness +blanks +blare +blared +blares +blaring +blase +blaspheme +blasphemed +blasphemer +blasphemes +blasphemies +blaspheming +blasphemous +blasphemously +blasphemousness +blasphemy +blast +blasted +blaster +blasters +blasting +blasts +blatant +blatantly +blatantness +blaze +blazed +blazer +blazers +blazes +blazing +blazingly +bleach +bleached +bleacher +bleachers +bleaches +bleaching +bleak +bleakly +bleakness +blear +bleariness +bleary +bleat +bleater +bleating +bleats +bled +bleed +bleeder +bleeders +bleeding +bleedings +bleeds +blemish +blemish's +blemished +blemishes +blemishing +blend +blended +blender +blenders +blending +blends +bless +blessed +blessedly +blessedness +blesses +blessing +blessings +blew +blight +blighted +blighter +blimp +blimp's +blimps +blind +blinded +blinder +blinders +blindfold +blindfolded +blindfolding +blindfolds +blinding +blindingly +blindly +blindness +blinds +blink +blinked +blinker +blinkered +blinkering +blinkers +blinking +blinks +blip +blip's +blips +bliss +blissful +blissfully +blissfulness +blister +blistered +blistering +blisteringly +blisters +blithe +blithely +blither +blithest +blitz +blitz's +blitzes +blitzkrieg +blizzard +blizzard's +blizzards +bloat +bloated +bloater +bloaters +bloating +bloats +blob +blob's +blobs +bloc +bloc's +block +block's +blockade +blockaded +blockader +blockades +blockading +blockage +blockage's +blockages +blocked +blocker +blockers +blockhouse +blockhouses +blocking +blocks +blocs +bloke +bloke's +blokes +blond +blond's +blonde +blonde's +blondes +blonds +blood +blooded +bloodhound +bloodhound's +bloodhounds +bloodied +bloodiest +bloodiness +bloodless +bloodlessly +bloodlessness +bloods +bloodshed +bloodshot +bloodstain +bloodstain's +bloodstained +bloodstains +bloodstream +bloody +bloodying +bloom +bloomed +bloomer +bloomers +blooming +blooms +blossom +blossomed +blossoms +blot +blot's +blots +blotted +blotting +blouse +blouse's +blouses +blousing +blow +blowed +blower +blowers +blowfish +blowing +blown +blows +blowup +blubber +blubbered +blubbering +bludgeon +bludgeoned +bludgeoning +bludgeons +blue +blueberries +blueberry +blueberry's +bluebird +bluebird's +bluebirds +bluebonnet +bluebonnet's +bluebonnets +blued +bluefish +bluely +blueness +blueprint +blueprint's +blueprinted +blueprinting +blueprints +bluer +blues +bluest +bluestocking +bluff +bluffed +bluffer +bluffing +bluffly +bluffness +bluffs +bluing +bluish +bluishness +blunder +blundered +blunderer +blundering +blunderingly +blunderings +blunders +blunt +blunted +blunter +bluntest +blunting +bluntly +bluntness +blunts +blur +blur's +blurb +blurred +blurredly +blurrier +blurriness +blurring +blurringly +blurry +blurs +blurt +blurted +blurter +blurting +blurts +blush +blushed +blusher +blushes +blushing +blushingly +bluster +blustered +blusterer +blustering +blusteringly +blusters +blustery +boar +board +boarded +boarder +boarders +boarding +boardinghouse +boardinghouse's +boardinghouses +boards +boast +boasted +boaster +boasters +boastful +boastfully +boastfulness +boasting +boastings +boasts +boat +boated +boater +boaters +boathouse +boathouse's +boathouses +boating +boatload +boatload's +boatloads +boatman +boatmen +boats +boatswain +boatswain's +boatswains +boatyard +boatyard's +boatyards +bob +bob's +bobbed +bobbies +bobbin +bobbin's +bobbing +bobbins +bobby +bobolink +bobolink's +bobolinks +bobs +bobwhite +bobwhite's +bobwhites +bode +boded +bodes +bodice +bodied +bodies +bodily +boding +body +bodybuilder +bodybuilder's +bodybuilders +bodybuilding +bodyguard +bodyguard's +bodyguards +bodying +bog +bog's +bogged +boggle +boggled +boggles +boggling +bogs +bogus +boil +boiled +boiler +boilerplate +boilers +boiling +boils +boisterous +boisterously +boisterousness +bold +bolder +boldest +boldface +boldfaced +boldfaces +boldfacing +boldly +boldness +boll +bolster +bolstered +bolsterer +bolstering +bolsters +bolt +bolted +bolter +bolting +bolts +bomb +bombard +bombarded +bombarding +bombardment +bombardments +bombards +bombast +bombaster +bombastic +bombed +bomber +bombers +bombing +bombings +bombproof +bombs +bonanza +bonanza's +bonanzas +bond +bondage +bonded +bonder +bonders +bonding +bonds +bondsman +bondsmen +bone +boned +boner +boners +bones +bonfire +bonfire's +bonfires +bong +bonier +boning +bonnet +bonneted +bonnets +bonnier +bonny +bonus +bonus's +bonuses +bony +boo +boob +boobies +booboo +booby +book +bookcase +bookcase's +bookcases +booked +booker +bookers +bookie +bookie's +bookies +booking +bookings +bookish +bookishly +bookishness +bookkeeper +bookkeeper's +bookkeepers +bookkeeping +booklet +booklet's +booklets +books +bookseller +bookseller's +booksellers +bookshelf +bookshelf's +bookshelves +bookstore +bookstore's +bookstores +boolean +booleans +boom +boomed +boomer +boomerang +boomerang's +boomerangs +booming +booms +boon +boor +boor's +boorish +boorishly +boorishness +boors +boos +boost +boosted +booster +boosting +boosts +boot +booted +booth +booths +booties +booting +bootleg +bootlegged +bootlegger +bootlegger's +bootleggers +bootlegging +bootlegs +boots +bootstrap +bootstrap's +bootstrapped +bootstrapping +bootstraps +booty +booze +boozer +boozing +borate +borated +borates +borax +bordello +bordello's +bordellos +border +bordered +borderer +bordering +borderings +borderland +borderland's +borderlands +borderline +borders +bore +bored +boredom +borer +borers +bores +boric +boring +boringly +boringness +born +borne +boron +borough +boroughs +borrow +borrowed +borrower +borrowers +borrowing +borrowings +borrows +bosom +bosom's +bosoms +boss +bossed +bosses +bosun +botanical +botanically +botanist +botanist's +botanists +botany +botch +botched +botcher +botchers +botches +botching +both +bother +bothered +bothering +bothers +bothersome +bottle +bottled +bottleneck +bottleneck's +bottlenecks +bottler +bottlers +bottles +bottling +bottom +bottomed +bottomer +bottoming +bottomless +bottomlessly +bottomlessness +bottoms +botulinus +botulism +bouffant +bough +bough's +boughed +boughs +bought +boughten +boulder +boulder's +bouldered +boulders +boulevard +boulevard's +boulevards +bounce +bounced +bouncer +bouncers +bounces +bouncier +bouncing +bouncingly +bouncy +bound +boundaries +boundary +boundary's +bounded +bounden +bounder +bounding +boundless +boundlessly +boundlessness +bounds +bounteous +bounteously +bounteousness +bountied +bounties +bounty +bounty's +bouquet +bouquet's +bouquets +bourbon +bourbons +bourgeois +bourgeoisie +bout +bout's +bouts +bovine +bovinely +bovines +bow +bowed +bowel +bowel's +bowels +bowen +bower +bowers +bowing +bowl +bowled +bowler +bowlers +bowline +bowline's +bowlines +bowling +bowls +bowman +bows +bowser +bowstring +bowstring's +bowstrings +box +boxcar +boxcar's +boxcars +boxed +boxer +boxers +boxes +boxing +boxwood +boy +boy's +boycott +boycotted +boycotter +boycotting +boycotts +boyer +boyfriend +boyfriend's +boyfriends +boyhood +boyish +boyishly +boyishness +boys +bra +bra's +brace +braced +bracelet +bracelet's +bracelets +bracer +braces +bracing +bracket +bracketed +bracketing +brackets +brackish +brackishness +brae +brae's +braes +brag +bragged +bragger +bragging +brags +braid +braided +braider +braiding +braids +braille +brain +brainchild +brainchild's +brained +brainier +braininess +braining +brains +brainstorm +brainstorm's +brainstormer +brainstorming +brainstorms +brainwash +brainwashed +brainwasher +brainwashes +brainwashing +brainy +brake +braked +brakes +braking +bramble +bramble's +brambles +brambling +brambly +bran +branch +branched +branches +branching +branchings +brand +branded +brander +brandied +brandies +branding +brandish +brandishes +brandishing +brands +brandy +brandying +bras +brash +brashly +brashness +brass +brassed +brasses +brassier +brassiere +brassiness +brassy +brat +brat's +brats +bravado +brave +braved +bravely +braveness +braver +bravery +braves +bravest +braving +bravo +bravoed +bravoing +bravos +bravura +brawl +brawled +brawler +brawling +brawls +brawn +bray +brayed +brayer +braying +brays +braze +brazed +brazen +brazened +brazening +brazenly +brazenness +brazer +brazes +brazier +brazier's +braziers +brazing +breach +breached +breacher +breachers +breaches +breaching +bread +breadboard +breadboard's +breadboards +breaded +breading +breads +breadth +breadwinner +breadwinner's +breadwinners +break +breakable +breakables +breakage +breakaway +breakdown +breakdown's +breakdowns +breaker +breakers +breakfast +breakfasted +breakfaster +breakfasters +breakfasting +breakfasts +breaking +breakpoint +breakpoint's +breakpointed +breakpointing +breakpoints +breaks +breakthrough +breakthrough's +breakthroughes +breakthroughs +breakup +breakups +breakwater +breakwater's +breakwaters +breast +breasted +breasting +breasts +breastwork +breastwork's +breastworks +breath +breathable +breathe +breathed +breather +breathers +breathes +breathier +breathing +breathless +breathlessly +breathlessness +breaths +breathtaking +breathtakingly +breathy +bred +breech +breech's +breeches +breeching +breed +breeder +breeding +breeds +breeze +breeze's +breezed +breezes +breezier +breezily +breeziness +breezing +breezy +bremsstrahlung +brethren +breve +breves +brevet +breveted +breveting +brevets +brevity +brew +brewed +brewer +breweries +brewers +brewery +brewery's +brewing +brews +briar +briar's +briars +bribe +bribed +briber +bribers +bribes +bribing +brick +bricked +bricker +bricking +bricklayer +bricklayer's +bricklayers +bricklaying +bricks +bridal +bride +bride's +bridegroom +brides +bridesmaid +bridesmaid's +bridesmaids +bridge +bridgeable +bridged +bridgehead +bridgehead's +bridgeheads +bridges +bridgework +bridgework's +bridging +bridle +bridled +bridles +bridling +brief +briefcase +briefcase's +briefcases +briefed +briefer +briefest +briefing +briefing's +briefings +briefly +briefness +briefs +brier +brig +brig's +brigade +brigade's +brigaded +brigades +brigadier +brigadier's +brigadiers +brigading +brigantine +bright +brighten +brightened +brightener +brighteners +brightening +brightens +brighter +brightest +brighting +brightly +brightness +brightnesses +brights +brigs +brilliance +brilliancy +brilliant +brilliantly +brilliantness +brim +brimful +brimmed +brindle +brindled +brine +briner +bring +bringer +bringers +bringing +brings +brining +brink +brinkmanship +brisk +brisker +briskly +briskness +bristle +bristled +bristles +bristling +britches +brittle +brittled +brittlely +brittleness +brittler +brittlest +brittling +broach +broached +broacher +broaches +broaching +broad +broadband +broadcast +broadcasted +broadcaster +broadcasters +broadcasting +broadcastings +broadcasts +broaden +broadened +broadener +broadeners +broadening +broadenings +broadens +broader +broadest +broadly +broadness +broads +broadside +brocade +brocaded +broccoli +brochure +brochure's +brochures +broil +broiled +broiler +broilers +broiling +broils +broke +broken +brokenly +brokenness +broker +brokerage +brokers +bromide +bromide's +bromides +bromine +bromines +bronchi +bronchial +bronchiole +bronchiole's +bronchioles +bronchitis +bronchus +bronze +bronzed +bronzer +bronzes +bronzing +brooch +brooch's +brooches +brood +brooder +brooding +broodingly +broods +brook +brooked +brooks +broom +broom's +broomed +brooming +brooms +broomstick +broomstick's +broomsticks +broth +brothel +brothel's +brothels +brother +brother's +brotherhood +brotherliness +brotherly +brothers +brought +brow +brow's +browbeat +browbeaten +browbeating +browbeats +brown +browned +browner +brownest +brownie +brownie's +brownies +browning +brownings +brownish +brownly +brownness +browns +brows +browse +browsed +browser +browsers +browses +browsing +bruise +bruised +bruiser +bruisers +bruises +bruising +brunch +brunches +brunette +brunettes +brunt +brush +brushed +brusher +brushes +brushfire +brushfire's +brushfires +brushier +brushing +brushlike +brushy +brusque +brusquely +brusqueness +brutal +brutalities +brutality +brutally +brute +brute's +brutes +brutish +brutishly +brutishness +bubble +bubbled +bubbler +bubbles +bubblier +bubbling +bubbly +buck +buckboard +buckboard's +buckboards +bucked +bucker +bucket +bucket's +bucketed +bucketing +buckets +bucking +buckle +buckled +buckler +buckles +buckling +bucks +buckshot +buckskin +buckskins +buckwheat +bucolic +bud +bud's +budded +buddies +budding +buddy +buddy's +budge +budged +budges +budget +budgetary +budgeted +budgeter +budgeters +budgeting +budgets +budging +buds +buff +buff's +buffalo +buffaloes +buffer +buffer's +buffered +bufferer +bufferer's +bufferers +buffering +buffers +buffet +buffeted +buffeting +buffetings +buffets +buffing +buffoon +buffoon's +buffoons +buffs +bug +bug's +bugged +bugger +bugger's +buggered +buggering +buggers +buggies +bugging +buggy +buggy's +bugle +bugled +bugler +bugles +bugling +bugs +build +builded +builder +builders +building +building's +buildings +builds +buildup +buildup's +buildups +built +bulb +bulb's +bulbed +bulbs +bulge +bulged +bulges +bulging +bulk +bulked +bulkhead +bulkhead's +bulkheaded +bulkheads +bulkier +bulkiness +bulks +bulky +bull +bulldog +bulldog's +bulldogs +bulldoze +bulldozed +bulldozer +bulldozers +bulldozes +bulldozing +bulled +bullet +bullet's +bulletin +bulletin's +bulletins +bulletproof +bulletproofed +bulletproofing +bulletproofs +bullets +bullied +bullies +bulling +bullion +bullish +bullishly +bullishness +bulls +bully +bullying +bulwark +bum +bum's +bumble +bumblebee +bumblebee's +bumblebees +bumbled +bumbler +bumblers +bumbles +bumbling +bumblingly +bummed +bummer +bummers +bumming +bump +bumped +bumper +bumpers +bumping +bumps +bumptious +bumptiously +bumptiousness +bums +bun +bun's +bunch +bunched +bunches +bunching +bundle +bundled +bundler +bundles +bundling +bungalow +bungalow's +bungalows +bungle +bungled +bungler +bunglers +bungles +bungling +bunglingly +bunion +bunion's +bunions +bunk +bunked +bunker +bunker's +bunkered +bunkering +bunkers +bunkhouse +bunkhouse's +bunkhouses +bunking +bunkmate +bunkmate's +bunkmates +bunks +bunnies +bunny +bunny's +buns +bunt +bunted +bunter +bunters +bunting +bunts +buoy +buoyancy +buoyant +buoyantly +buoyed +buoying +buoys +burden +burden's +burdened +burdening +burdens +burdensome +burdensomely +burdensomeness +bureau +bureau's +bureaucracies +bureaucracy +bureaucracy's +bureaucrat +bureaucrat's +bureaucratic +bureaucrats +bureaus +burgeon +burgeoned +burgeoning +burgeons +burger +burgess +burgess's +burgesses +burgher +burgher's +burghers +burglar +burglar's +burglaries +burglarproof +burglarproofed +burglarproofing +burglarproofs +burglars +burglary +burglary's +burgle +burgled +burgles +burgling +burial +buried +burier +buries +burl +burled +burler +burlesque +burlesqued +burlesquely +burlesquer +burlesques +burlesquing +burlier +burliness +burly +burn +burned +burner +burners +burning +burningly +burnings +burnish +burnished +burnisher +burnishes +burnishing +burns +burnt +burntly +burntness +burp +burped +burping +burps +burr +burr's +burred +burrer +burro +burro's +burros +burrow +burrowed +burrower +burrowing +burrows +burrs +bursa +bursas +bursitis +burst +bursted +burster +bursting +bursts +bury +burying +bus +busboy +busboy's +busboys +bused +buses +bush +bushed +bushel +bushel's +bushels +bushes +bushier +bushiness +bushing +bushings +bushwhack +bushwhacked +bushwhacker +bushwhacking +bushwhacks +bushy +busied +busier +busies +busiest +busily +business +business's +businesses +businesslike +businessman +businessmen +busing +buss +bussed +busses +bussing +bust +bustard +bustard's +bustards +busted +buster +busting +bustle +bustled +bustling +bustlingly +busts +busy +busying +but +butane +butcher +butcher's +butchered +butcherer +butchering +butcherly +butchers +butchery +butler +butler's +butlers +butt +butt's +butte +butted +butter +buttered +butterer +butterers +butterfat +butterflies +butterfly +butterfly's +buttering +butternut +butters +buttes +butting +buttock +buttock's +buttocks +button +buttoned +buttoner +buttonhole +buttonhole's +buttonholer +buttonholes +buttoning +buttons +buttress +buttressed +buttresses +buttressing +butts +butyl +butyrate +buxom +buxomly +buxomness +buy +buyer +buyer's +buyers +buying +buys +buzz +buzzard +buzzard's +buzzards +buzzed +buzzer +buzzes +buzzing +buzzword +buzzword's +buzzwords +buzzy +by +bye +byers +byes +bygone +bygones +bylaw +bylaw's +bylaws +byline +byline's +byliner +bylines +bypass +bypassed +bypasses +bypassing +byproduct +byproduct's +byproducts +bystander +bystander's +bystanders +byte +byte's +bytes +byway +byways +byword +byword's +bywords +cab +cab's +cabbage +cabbage's +cabbaged +cabbages +cabbaging +caber +cabin +cabin's +cabinet +cabinet's +cabinets +cabins +cable +cabled +cables +cabling +cabs +cache +cache's +cached +cacher +caches +caching +cackle +cackled +cackler +cackles +cackling +cacti +cactus +cactuses +cad +cadence +cadenced +cadences +cadencing +cafe +cafe's +cafes +cafeteria +cafeteria's +cafeterias +cage +caged +cager +cagers +cages +caging +cajole +cajoled +cajoler +cajoles +cajoling +cake +caked +cakes +caking +calamities +calamity +calamity's +calcium +calculate +calculated +calculatedly +calculatedness +calculates +calculating +calculation +calculations +calculative +calculator +calculator's +calculators +calculus +calendar +calendar's +calendared +calendaring +calendars +calf +calfs +calibrate +calibrated +calibrater +calibrates +calibrating +calibration +calibrations +calibrator +calibrators +calico +caliph +caliphs +call +callback +called +caller +caller's +callers +calling +callous +calloused +callously +callousness +calls +calm +calmed +calmer +calmest +calming +calmingly +calmly +calmness +calms +calorie +calorie's +calories +calves +came +camel +camel's +camels +camera +camera's +cameras +camion +camouflage +camouflaged +camouflages +camouflaging +camp +campaign +campaigned +campaigner +campaigners +campaigning +campaigns +camped +camper +campers +camping +camps +campus +campus's +campuses +can +can's +can't +canal +canal's +canals +canaries +canary +canary's +cancel +cancellation +cancellation's +cancellations +cancels +cancer +cancer's +cancers +candid +candidate +candidate's +candidates +candidly +candidness +candied +candies +candle +candled +candler +candles +candlestick +candlestick's +candlesticks +candling +candy +candying +cane +caned +caner +canes +caning +canker +cankered +cankering +canned +canner +canner's +canners +cannibal +cannibal's +cannibals +canning +cannister +cannister's +cannisters +cannon +cannon's +cannoned +cannoning +cannons +cannot +canoe +canoe's +canoed +canoes +canon +canon's +canonical +canonically +canonicals +canons +canopy +cans +cantankerous +cantankerously +cantankerousness +canto +canton +canton's +cantons +cantor +cantor's +cantors +cantos +canvas +canvas's +canvaser +canvases +canvass +canvassed +canvasser +canvassers +canvasses +canvassing +canyon +canyon's +canyons +cap +cap's +capabilities +capability +capability's +capable +capableness +capably +capacious +capaciously +capaciousness +capacitance +capacitances +capacities +capacitive +capacitively +capacitor +capacitor's +capacitors +capacity +cape +caper +capered +capering +capers +capes +capillary +capita +capital +capitalism +capitalist +capitalist's +capitalists +capitally +capitals +capitol +capitol's +capitols +capped +capping +capricious +capriciously +capriciousness +caps +captain +captained +captaining +captains +caption +caption's +captioned +captioner +captioning +captions +captivate +captivated +captivates +captivating +captivation +captive +captive's +captives +captivity +captor +captor's +captors +capture +captured +capturer +capturers +captures +capturing +car +car's +caravan +caravan's +caravaner +caravans +carbohydrate +carbohydrate's +carbohydrates +carbolic +carbon +carbon's +carbonate +carbonated +carbonates +carbonation +carbonic +carbons +carcass +carcass's +carcasses +card +card's +cardboard +cardboards +carded +carder +cardiac +cardinal +cardinalities +cardinality +cardinality's +cardinally +cardinals +carding +cards +care +cared +career +career's +careered +careering +careers +carefree +careful +carefully +carefulness +careless +carelessly +carelessness +carer +carers +cares +caress +caressed +caresser +caresses +caressing +caressingly +caressive +caressively +caret +carets +cargo +cargoes +cargos +caribou +caribous +caring +carnation +carnations +carnival +carnival's +carnivals +carnivorous +carnivorously +carnivorousness +carol +carol's +carols +carpenter +carpenter's +carpentered +carpentering +carpenters +carpet +carpeted +carpeting +carpets +carriage +carriage's +carriages +carried +carrier +carriers +carries +carrot +carrot's +carrots +carry +carrying +carryover +carryovers +cars +cart +carted +carter +carters +carting +cartography +carton +carton's +cartons +cartoon +cartoon's +cartoons +cartridge +cartridge's +cartridges +carts +carve +carved +carver +carvers +carves +carving +carvings +cascade +cascaded +cascades +cascading +case +cased +casement +casement's +casements +cases +cash +cashed +casher +cashers +cashes +cashier +cashier's +cashiers +cashing +casing +casings +cask +cask's +casket +casket's +caskets +casks +casserole +casserole's +casseroles +cast +cast's +caste +caste's +casted +caster +casters +castes +casteth +casting +castings +castle +castled +castles +castling +casts +casual +casually +casualness +casuals +casualties +casualty +casualty's +cat +cat's +catalyst +catalyst's +catalysts +cataract +cataracts +catastrophe +catastrophe's +catastrophes +catastrophic +catch +catchable +catcher +catcher's +catchers +catches +catching +categorical +categorically +categories +category +category's +cater +catered +caterer +catering +caterpillar +caterpillar's +caterpillars +caters +cathedral +cathedral's +cathedrals +catheter +catheters +cathode +cathode's +cathodes +catholic +catholic's +catholics +cats +catsup +cattle +caught +causal +causality +causally +causation +causation's +causations +cause +caused +causer +causes +causeway +causeway's +causeways +causing +caustic +causticly +caustics +caution +cautioned +cautioner +cautioners +cautioning +cautionings +cautions +cautious +cautiously +cautiousness +cavalier +cavalierly +cavalierness +cavalry +cave +caveat +caveat's +caveats +caved +caver +cavern +cavern's +caverns +caves +caving +cavities +cavity +cavity's +caw +cawed +cawing +caws +cease +ceased +ceaseless +ceaselessly +ceaselessness +ceases +ceasing +cedar +ceiling +ceiling's +ceilinged +ceilings +celebrate +celebrated +celebratedness +celebrates +celebrating +celebration +celebrations +celebratory +celebrities +celebrity +celebrity's +celery +celestial +celestially +celibate +celibates +cell +cellar +cellar's +cellared +cellarer +cellaring +cellars +celled +cellist +cellist's +cellists +cells +cellular +cellularly +cement +cemented +cementer +cementing +cements +cemeteries +cemetery +cemetery's +censor +censored +censoring +censors +censorship +censure +censured +censurer +censures +censuring +census +census's +censuses +cent +centipede +centipede's +centipedes +central +centrally +centrals +centrifuge +centrifuge's +centrifuged +centrifuges +centrifuging +centripetal +centripetally +cents +centuries +century +century's +cereal +cereal's +cereals +cerebral +cerebrally +ceremonial +ceremonially +ceremonialness +ceremonies +ceremony +ceremony's +certain +certainly +certainties +certainty +certifiable +certificate +certificated +certificates +certificating +certification +certifications +certified +certifier +certifiers +certifies +certify +certifying +cessation +cessation's +cessations +chafe +chafer +chaff +chaffer +chaffered +chafferer +chaffering +chaffing +chafing +chagrin +chagrined +chagrining +chagrins +chain +chained +chaining +chains +chair +chaired +chairing +chairman +chairmanship +chairmanships +chairmen +chairperson +chairperson's +chairpersons +chairs +chalice +chalice's +chaliced +chalices +chalk +chalked +chalking +chalks +challenge +challenged +challenger +challengers +challenges +challenging +challengingly +chamber +chambered +chamberer +chamberers +chambering +chamberlain +chamberlain's +chamberlains +chambers +champagne +champaign +champion +championed +championing +champions +championship +championship's +championships +chance +chanced +chancellor +chancellors +chances +chancing +chandelier +chandelier's +chandeliers +change +changeability +changeable +changeableness +changeably +changed +changeover +changeover's +changeovers +changer +changers +changes +changing +channel +channels +chant +chanted +chanter +chanticleer +chanticleer's +chanticleers +chanting +chants +chaos +chaotic +chap +chap's +chapel +chapel's +chapels +chaperon +chaperoned +chaplain +chaplain's +chaplains +chaps +chapter +chapter's +chaptered +chaptering +chapters +char +character +character's +charactered +charactering +characteristic +characteristic's +characteristically +characteristics +characters +charcoal +charcoaled +charcoals +charge +chargeable +chargeableness +charged +charger +chargers +charges +charging +charing +chariot +chariot's +chariots +charitable +charitableness +charities +charity +charity's +charm +charmed +charmer +charmers +charming +charmingly +charms +chars +chart +chartable +charted +charter +chartered +charterer +charterers +chartering +charters +charting +chartings +charts +chase +chased +chaser +chasers +chases +chasing +chasm +chasm's +chasms +chaste +chastely +chasteness +chaster +chastest +chastise +chastised +chastiser +chastisers +chastises +chastising +chat +chateau +chateau's +chateaus +chats +chatter +chattered +chatterer +chatterers +chattering +chatterly +chatters +chauffeur +chauffeured +chauffeuring +chauffeurs +chauvinism +chauvinism's +chauvinist +chauvinist's +chauvinistic +chauvinists +cheap +cheapen +cheapened +cheapening +cheapens +cheaper +cheapest +cheaply +cheapness +cheat +cheated +cheater +cheaters +cheating +cheats +check +checkable +checked +checker +checkered +checkering +checkers +checking +checkout +checkouts +checkpoint +checkpoint's +checkpoints +checks +checksum +checksum's +checksums +cheek +cheek's +cheeks +cheer +cheered +cheerer +cheerers +cheerful +cheerfully +cheerfulness +cheerier +cheerily +cheeriness +cheering +cheerless +cheerlessly +cheerlessness +cheerly +cheers +cheery +cheese +cheese's +cheesed +cheeses +cheesing +chef +chef's +chefs +chemical +chemically +chemicals +chemise +chemises +chemist +chemist's +chemistries +chemistry +chemists +cherish +cherished +cherisher +cherishes +cherishing +cherries +cherry +cherry's +cherub +cherub's +cherubim +cherubs +chess +chest +chester +chestnut +chestnut's +chestnuts +chests +chew +chewed +chewer +chewers +chewing +chews +chick +chickadee +chickadee's +chickadees +chicken +chickened +chickening +chickens +chicks +chide +chided +chides +chiding +chief +chief's +chiefly +chiefs +chieftain +chieftain's +chieftains +chiffon +child +child's +childhood +childhoods +childish +childishly +childishness +childly +children +children's +chill +chilled +chiller +chillers +chillier +chillies +chilliness +chilling +chillingly +chillness +chills +chilly +chime +chime's +chimed +chimer +chimes +chiming +chimney +chimney's +chimneyed +chimneys +chin +chin's +chink +chinked +chinks +chinned +chinner +chinners +chinning +chins +chintz +chip +chip's +chipmunk +chipmunk's +chipmunks +chips +chirp +chirped +chirping +chirps +chisel +chisels +chivalrous +chivalrously +chivalrousness +chivalry +chlorine +chloroplast +chloroplast's +chloroplasts +chock +chock's +chocked +chocker +chocking +chocks +chocolate +chocolate's +chocolates +choice +choicely +choiceness +choicer +choices +choicest +choir +choir's +choirs +choke +choked +choker +chokers +chokes +choking +chokingly +cholera +choose +chooser +choosers +chooses +choosing +chop +chopped +chopper +chopper's +choppers +chopping +chops +choral +chorally +chord +chord's +chorded +chording +chords +chore +chores +choring +chorion +chorus +chorused +choruses +chose +chosen +christen +christened +christening +christens +chronic +chronicle +chronicled +chronicler +chroniclers +chronicles +chronological +chronologically +chronologies +chronology +chronology's +chubbier +chubbiest +chubbiness +chubby +chuck +chuck's +chucked +chucking +chuckle +chuckled +chuckles +chuckling +chucklingly +chucks +chum +chump +chump's +chumping +chumps +chums +chunk +chunk's +chunks +church +churched +churches +churching +churchliness +churchly +churchman +churchyard +churchyard's +churchyards +churn +churned +churner +churners +churning +churns +chute +chute's +chuted +chutes +chuting +cider +ciders +cigar +cigar's +cigarette +cigarette's +cigarettes +cigars +cinder +cinder's +cinders +cinnamon +cipher +cipher's +ciphered +ciphering +ciphers +circle +circled +circler +circles +circling +circuit +circuit's +circuited +circuiting +circuitous +circuitously +circuitousness +circuitry +circuits +circular +circular's +circularities +circularity +circularly +circularness +circulars +circulate +circulated +circulates +circulating +circulation +circulations +circulative +circumference +circumferences +circumflex +circumflexes +circumlocution +circumlocution's +circumlocutions +circumspect +circumspectly +circumstance +circumstance's +circumstanced +circumstances +circumstancing +circumstantial +circumstantially +circumvent +circumventable +circumvented +circumventing +circumvents +circus +circus's +circuses +cistern +cistern's +cisterns +citadel +citadel's +citadels +citation +citation's +citations +cite +cited +cites +citied +cities +citing +citizen +citizen's +citizenly +citizens +citizenship +city +city's +civic +civics +civil +civilian +civilian's +civilians +civilities +civility +civilly +clad +clads +claim +claimable +claimant +claimant's +claimants +claimed +claimer +claiming +claims +clairvoyant +clairvoyantly +clairvoyants +clam +clam's +clamber +clambered +clamberer +clambering +clambers +clamorous +clamorously +clamorousness +clamp +clamped +clamper +clamping +clamps +clams +clan +clang +clanged +clanger +clangers +clanging +clangs +clans +clap +claps +clarification +clarifications +clarified +clarifier +clarifies +clarify +clarifying +clarity +clash +clashed +clasher +clashes +clashing +clasp +clasped +clasper +clasping +clasps +class +classed +classer +classes +classic +classical +classically +classics +classifiable +classification +classifications +classified +classifieds +classifier +classifiers +classifies +classify +classifying +classing +classmate +classmate's +classmates +classroom +classroom's +classrooms +classwork +clatter +clattered +clatterer +clattering +clatteringly +clatters +clause +clause's +clauses +claw +clawed +clawer +clawing +claws +clay +clay's +clayed +claying +clays +clean +cleaned +cleaner +cleaner's +cleaners +cleanest +cleaning +cleanlier +cleanliness +cleanly +cleanness +cleans +cleanse +cleansed +cleanser +cleansers +cleanses +cleansing +cleanup +cleanup's +cleanups +clear +clearance +clearance's +clearances +cleared +clearer +clearest +clearing +clearing's +clearings +clearly +clearness +clears +cleavage +cleavages +cleave +cleaved +cleaver +cleavers +cleaves +cleaving +cleft +cleft's +clefts +clench +clenched +clenches +clenching +clergy +clergyman +clerical +clerically +clericals +clerk +clerk's +clerked +clerking +clerkly +clerks +clever +cleverer +cleverest +cleverly +cleverness +cliche +cliche's +cliches +click +clicked +clicker +clickers +clicking +clicks +client +client's +clients +cliff +cliff's +cliffs +climate +climate's +climates +climatic +climatically +climax +climaxed +climaxes +climaxing +climb +climbed +climber +climbers +climbing +climbs +clime +clime's +climes +clinch +clinched +clincher +clinches +clinching +clinchingly +cling +clinging +clings +clinic +clinic's +clinical +clinically +clinics +clink +clinked +clinker +clinkered +clinkering +clinkers +clip +clip's +clipped +clipper +clipper's +clippers +clipping +clipping's +clippings +clips +clique +clique's +cliques +cloak +cloak's +cloaked +cloaking +cloaks +clobber +clobbered +clobbering +clobbers +clock +clocked +clocker +clockers +clocking +clockings +clocks +clockwise +clockwork +clod +clod's +clods +clog +clog's +clogged +clogging +clogs +cloister +cloister's +cloistered +cloistering +cloisters +clone +cloned +cloner +cloners +clones +cloning +close +closed +closely +closeness +closenesses +closer +closers +closes +closest +closet +closeted +closets +closing +closings +closure +closure's +closured +closures +closuring +cloth +clothe +clothed +clothes +clothing +cloud +clouded +cloudier +cloudiest +cloudiness +clouding +cloudless +cloudlessly +cloudlessness +clouds +cloudy +clout +clove +clover +cloves +clown +clowning +clowns +club +club's +clubbed +clubbing +clubs +cluck +clucked +clucking +clucks +clue +clue's +clues +cluing +clump +clumped +clumping +clumps +clumsier +clumsiest +clumsily +clumsiness +clumsy +clung +cluster +clustered +clustering +clusterings +clusters +clutch +clutched +clutches +clutching +clutter +cluttered +cluttering +clutters +coach +coach's +coached +coacher +coaches +coaching +coachman +coagulate +coagulated +coagulates +coagulating +coagulation +coal +coaled +coaler +coalesce +coalesced +coalesces +coalescing +coaling +coalition +coals +coarse +coarsely +coarsen +coarsened +coarseness +coarsening +coarser +coarsest +coast +coastal +coasted +coaster +coasters +coasting +coasts +coat +coated +coater +coaters +coating +coatings +coats +coax +coaxed +coaxer +coaxes +coaxial +coaxially +coaxing +cobbler +cobbler's +cobblers +cobweb +cobweb's +cobwebs +cock +cocked +cocker +cocking +cockroach +cockroaches +cocks +cocktail +cocktail's +cocktails +cocoa +coconut +coconut's +coconuts +cocoon +cocoon's +cocoons +cod +code +coded +coder +coder's +coders +codes +codeword +codeword's +codewords +codification +codification's +codifications +codified +codifier +codifier's +codifiers +codifies +codify +codifying +coding +codings +cods +coefficient +coefficient's +coefficiently +coefficients +coerce +coerced +coerces +coercing +coercion +coercions +coercive +coercively +coerciveness +coexist +coexisted +coexistence +coexisting +coexists +coffee +coffee's +coffees +coffer +coffer's +coffers +coffin +coffin's +coffins +cogent +cogently +cogitate +cogitated +cogitates +cogitating +cogitation +cogitative +cognition +cognitions +cognitive +cognitively +cognitives +cohabit +cohabitation +cohabitations +cohabited +cohabiting +cohabits +cohere +cohered +coherence +coherent +coherently +coherer +coheres +cohering +cohesion +cohesive +cohesively +cohesiveness +coil +coiled +coiling +coils +coin +coinage +coincide +coincided +coincidence +coincidence's +coincidences +coincidental +coincidentally +coincides +coinciding +coined +coiner +coining +coins +coke +cokes +coking +cold +colder +coldest +coldly +coldness +colds +collaborate +collaborated +collaborates +collaborating +collaboration +collaborations +collaborative +collaboratively +collaborator +collaborator's +collaborators +collapse +collapsed +collapses +collapsing +collar +collared +collaring +collars +collate +collated +collateral +collaterally +collates +collating +collation +collations +collative +collator +collators +colleague +colleague's +colleagues +collect +collected +collectedly +collectedness +collectible +collecting +collection +collection's +collections +collective +collectively +collectives +collector +collector's +collectors +collects +college +college's +colleges +collegiate +collegiately +collide +collided +collides +colliding +collie +collied +collier +collies +collision +collision's +collisions +cologne +cologned +colon +colon's +colonel +colonel's +colonels +colonial +colonially +colonialness +colonials +colonies +colonist +colonist's +colonists +colons +colony +colony's +colossal +colossally +colt +colt's +colter +colts +column +column's +columnar +columned +columns +comb +combat +combatant +combatant's +combatants +combated +combating +combative +combatively +combativeness +combats +combed +comber +combers +combination +combination's +combinational +combinations +combinator +combinator's +combinatorial +combinatorially +combinatoric +combinatorics +combinators +combine +combined +combiner +combiners +combines +combing +combings +combining +combo +combs +combustion +combustions +come +comedian +comedian's +comedians +comedic +comedies +comedy +comedy's +comelier +comeliness +comely +comer +comers +comes +comest +comestible +comestibles +comet +comet's +cometh +comets +comfort +comfortabilities +comfortability +comfortable +comfortableness +comfortably +comforted +comforter +comforters +comforting +comfortingly +comforts +comic +comic's +comical +comically +comics +coming +comings +comma +comma's +command +command's +commandant +commandant's +commandants +commanded +commandeer +commandeered +commandeering +commandeers +commander +commanders +commanding +commandingly +commandment +commandment's +commandments +commands +commas +commemorate +commemorated +commemorates +commemorating +commemoration +commemorations +commemorative +commemoratively +commemoratives +commence +commenced +commencement +commencement's +commencements +commencer +commences +commencing +commend +commendation +commendation's +commendations +commended +commender +commending +commends +commensurate +commensurately +commensurates +commensuration +commensurations +comment +comment's +commentaries +commentary +commentary's +commentator +commentator's +commentators +commented +commenter +commenting +comments +commerce +commerced +commercial +commercially +commercialness +commercials +commercing +commission +commissioned +commissioner +commissioners +commissioning +commissions +commit +commitment +commitment's +commitments +commits +committed +committee +committee's +committees +committing +commodities +commodity +commodity's +commodore +commodore's +commodores +common +commonalities +commonality +commoner +commoner's +commoners +commonest +commonly +commonness +commonplace +commonplaceness +commonplaces +commons +commonwealth +commonwealths +commotion +commotions +communal +communally +commune +communed +communes +communicant +communicant's +communicants +communicate +communicated +communicates +communicating +communication +communications +communicative +communicatively +communicativeness +communicator +communicator's +communicators +communing +communion +communist +communist's +communists +communities +community +community's +commutative +commutatively +commutativity +commute +commuted +commuter +commuters +commutes +commuting +compact +compaction +compacted +compacter +compacters +compactest +compacting +compactly +compactness +compactor +compactor's +compactors +compacts +companies +companion +companion's +companionable +companionableness +companions +companionship +company +company's +comparability +comparable +comparableness +comparably +comparative +comparatively +comparativeness +comparatives +comparator +comparator's +comparators +compare +compared +comparer +compares +comparing +comparison +comparison's +comparisons +compartment +compartmented +compartmenting +compartments +compass +compassed +compasses +compassing +compassion +compassionate +compassionately +compassionateness +compatibilities +compatibility +compatibility's +compatible +compatibleness +compatibles +compatibly +compel +compelled +compelling +compellingly +compels +compendium +compensate +compensated +compensates +compensating +compensation +compensations +compensative +compensatory +compete +competed +competence +competences +competent +competently +competes +competing +competition +competition's +competitions +competitive +competitively +competitiveness +competitor +competitor's +competitors +compilable +compilation +compilation's +compilations +compile +compiled +compiler +compiler's +compilers +compiles +compiling +complain +complained +complainer +complainers +complaining +complainingly +complains +complaint +complaint's +complaints +complement +complementariness +complementary +complemented +complementer +complementers +complementing +complements +complete +completed +completely +completeness +completer +completes +completing +completion +completions +completive +complex +complexes +complexion +complexioned +complexities +complexity +complexly +complexness +compliance +compliances +complicate +complicated +complicatedly +complicatedness +complicates +complicating +complication +complications +complicator +complicator's +complicators +complicity +complied +complier +compliers +complies +compliment +complimentary +complimented +complimenter +complimenters +complimenting +compliments +comply +complying +component +component's +components +compose +composed +composedly +composedness +composer +composer's +composers +composes +composing +composite +compositely +composites +composition +compositional +compositionally +compositions +composure +compound +compounded +compounder +compounding +compounds +comprehend +comprehended +comprehending +comprehends +comprehensibility +comprehensible +comprehensibleness +comprehension +comprehensive +comprehensively +comprehensiveness +compress +compressed +compressedly +compresses +compressible +compressing +compression +compressions +compressive +compressively +compressor +comprise +comprised +comprises +comprising +compromise +compromised +compromiser +compromisers +compromises +compromising +compromisingly +comptroller +comptroller's +comptrollers +compulsion +compulsion's +compulsions +compulsory +compunction +compunctions +computability +computable +computation +computation's +computational +computationally +computations +compute +computed +computer +computer's +computerese +computers +computes +computing +comrade +comradeliness +comradely +comrades +comradeship +concatenate +concatenated +concatenates +concatenating +concatenation +concatenations +conceal +concealed +concealer +concealers +concealing +concealingly +concealment +conceals +concede +conceded +concededly +conceder +concedes +conceding +conceit +conceited +conceitedly +conceitedness +conceits +conceivable +conceivably +conceive +conceived +conceiver +conceives +conceiving +concentrate +concentrated +concentrates +concentrating +concentration +concentrations +concentrative +concentrator +concentrators +concentric +concept +concept's +conception +conception's +conceptions +conceptive +concepts +conceptual +conceptually +concern +concerned +concernedly +concerning +concerns +concert +concerted +concertedly +concertedness +concerts +concession +concession's +concessioner +concessions +concise +concisely +conciseness +concision +concisions +conclude +concluded +concluder +concludes +concluding +conclusion +conclusion's +conclusions +conclusive +conclusively +conclusiveness +concomitant +concomitantly +concomitants +concord +concrete +concreted +concretely +concreteness +concretes +concreting +concretion +concur +concurred +concurrence +concurrencies +concurrency +concurrent +concurrently +concurring +concurs +condemn +condemnation +condemnations +condemned +condemner +condemners +condemning +condemns +condensation +condense +condensed +condenser +condensers +condenses +condensing +condescend +condescending +condescendingly +condescends +condition +conditional +conditionally +conditionals +conditioned +conditioner +conditioners +conditioning +conditions +condone +condoned +condoner +condones +condoning +conducive +conduciveness +conduct +conducted +conducting +conduction +conductive +conductively +conductivities +conductivity +conductor +conductor's +conductors +conducts +conduit +conduits +cone +cone's +coned +cones +confederacy +confederate +confederates +confederation +confederations +confederative +confer +conference +conference's +conferences +conferencing +conferred +conferrer +conferrer's +conferrers +conferring +confers +confess +confessed +confessedly +confesses +confessing +confession +confession's +confessions +confessor +confessor's +confessors +confidant +confidant's +confidants +confide +confided +confidence +confidences +confident +confidential +confidentiality +confidentially +confidentialness +confidently +confider +confides +confiding +confidingly +confidingness +configurable +configuration +configuration's +configurations +configure +configured +configures +configuring +confine +confined +confinement +confinement's +confinements +confiner +confines +confining +confirm +confirmation +confirmation's +confirmations +confirmed +confirmedly +confirmedness +confirming +confirms +confiscate +confiscated +confiscates +confiscating +confiscation +confiscations +conflict +conflicted +conflicting +conflictingly +conflictive +conflicts +conform +conformed +conformer +conformers +conforming +conformity +conforms +confound +confounded +confoundedly +confounder +confounding +confounds +confront +confrontation +confrontation's +confrontations +confronted +confronter +confronters +confronting +confronts +confuse +confused +confusedly +confusedness +confuser +confusers +confuses +confusing +confusingly +confusion +confusions +congenial +congenially +congested +congestion +congratulate +congratulated +congratulates +congratulation +congratulations +congregate +congregated +congregates +congregating +congregation +congregations +congress +congress's +congressed +congresses +congressing +congressional +congressionally +congressman +congruence +congruent +congruently +coning +conjecture +conjectured +conjecturer +conjectures +conjecturing +conjoined +conjunct +conjuncted +conjunction +conjunction's +conjunctions +conjunctive +conjunctively +conjuncts +conjure +conjured +conjurer +conjurers +conjures +conjuring +connect +connected +connectedly +connectedness +connecter +connecters +connecting +connection +connection's +connections +connective +connective's +connectively +connectives +connectivities +connectivity +connector +connector's +connectors +connects +connoisseur +connoisseur's +connoisseurs +connote +connoted +connotes +connoting +conquer +conquerable +conquered +conquerer +conquerers +conquering +conqueror +conqueror's +conquerors +conquers +conquest +conquest's +conquests +cons +conscience +conscience's +consciences +conscientious +conscientiously +conscientiousness +conscious +consciouses +consciously +consciousness +consecrate +consecrated +consecrates +consecrating +consecration +consecrations +consecrative +consecutive +consecutively +consecutiveness +consensus +consent +consented +consenter +consenters +consenting +consentingly +consents +consequence +consequence's +consequences +consequent +consequential +consequentialities +consequentiality +consequentially +consequentialness +consequently +consequentness +consequents +conservation +conservation's +conservationist +conservationist's +conservationists +conservations +conservatism +conservative +conservatively +conservativeness +conservatives +conserve +conserved +conserver +conserves +conserving +consider +considerable +considerably +considerate +considerately +considerateness +consideration +considerations +considered +considerer +considering +considers +consign +consigned +consigning +consigns +consist +consisted +consistencies +consistency +consistent +consistently +consisting +consists +consolable +consolation +consolation's +consolations +console +consoled +consoler +consolers +consoles +consolidate +consolidated +consolidates +consolidating +consolidation +consolidations +consoling +consolingly +consonant +consonant's +consonantly +consonants +consort +consorted +consorting +consortium +consorts +conspicuous +conspicuously +conspicuousness +conspiracies +conspiracy +conspiracy's +conspirator +conspirator's +conspirators +conspire +conspired +conspires +conspiring +constable +constable's +constables +constancy +constant +constantly +constants +constellation +constellation's +constellations +consternation +constituencies +constituency +constituency's +constituent +constituent's +constituently +constituents +constitute +constituted +constitutes +constituting +constitution +constitutional +constitutionality +constitutionally +constitutions +constitutive +constitutively +constrain +constrained +constrainedly +constraining +constrains +constraint +constraint's +constraints +construct +constructed +constructibility +constructible +constructing +construction +construction's +constructions +constructive +constructively +constructiveness +constructor +constructor's +constructors +constructs +construe +construed +construes +construing +consul +consul's +consulate +consulate's +consulates +consuls +consult +consultant +consultant's +consultants +consultation +consultation's +consultations +consultative +consulted +consulter +consulting +consultive +consults +consumable +consumables +consume +consumed +consumedly +consumer +consumer's +consumers +consumes +consuming +consumingly +consummate +consummated +consummately +consummates +consummating +consummation +consummations +consummative +consumption +consumption's +consumptions +consumptive +consumptively +contact +contacted +contacting +contacts +contagion +contagious +contagiously +contagiousness +contain +containable +contained +container +containers +containing +containment +containment's +containments +contains +contaminate +contaminated +contaminates +contaminating +contamination +contaminations +contaminative +contemplate +contemplated +contemplates +contemplating +contemplation +contemplations +contemplative +contemplatively +contemplativeness +contemporaneous +contemporaneously +contemporaneousness +contemporaries +contemporariness +contemporary +contempt +contemptible +contemptibleness +contemptuous +contemptuously +contemptuousness +contend +contended +contender +contenders +contending +contends +content +contented +contentedly +contentedness +contenting +contention +contention's +contentions +contently +contentment +contents +contest +contestable +contested +contester +contesters +contesting +contests +context +context's +contexts +contextual +contextually +contiguity +contiguous +contiguously +contiguousness +continent +continent's +continental +continentally +continently +continents +contingencies +contingency +contingency's +contingent +contingent's +contingently +contingents +continual +continually +continuance +continuance's +continuances +continuation +continuation's +continuations +continue +continued +continuer +continues +continuing +continuities +continuity +continuous +continuously +continuousness +continuum +contour +contour's +contoured +contouring +contours +contract +contracted +contracting +contraction +contraction's +contractions +contractive +contractor +contractor's +contractors +contracts +contractual +contractually +contradict +contradicted +contradicting +contradiction +contradiction's +contradictions +contradictoriness +contradictory +contradicts +contradistinction +contradistinctions +contrapositive +contrapositives +contraption +contraption's +contraptions +contrariness +contrary +contrast +contrasted +contraster +contrasters +contrasting +contrastingly +contrastive +contrastively +contrasts +contribute +contributed +contributer +contributers +contributes +contributing +contribution +contributions +contributive +contributively +contributor +contributor's +contributorily +contributors +contributory +contrivance +contrivance's +contrivances +contrive +contrived +contriver +contrives +contriving +control +control's +controllability +controllable +controllably +controlled +controller +controller's +controllers +controlling +controls +controversial +controversially +controversies +controversy +controversy's +conundrum +conundrum's +conundrums +convalescence +convene +convened +convener +conveners +convenes +convenience +convenience's +conveniences +convenient +conveniently +convening +convent +convent's +convention +convention's +conventional +conventionally +conventions +convents +converge +converged +convergence +convergences +convergent +converges +converging +conversant +conversantly +conversation +conversation's +conversational +conversationally +conversations +converse +conversed +conversely +converses +conversing +conversion +conversioning +conversions +convert +converted +converter +converters +convertibility +convertible +convertibleness +converting +converts +convex +convey +conveyance +conveyance's +conveyanced +conveyancer +conveyancers +conveyances +conveyancing +conveyed +conveyer +conveyers +conveying +conveys +convict +convicted +convicting +conviction +conviction's +convictions +convictive +convicts +convince +convinced +convincer +convincers +convinces +convincing +convincingly +convincingness +convoluted +convoy +convoyed +convoying +convoys +convulsion +convulsion's +convulsions +coo +cooing +cook +cook's +cooked +cooker +cookers +cookery +cookie +cookie's +cookies +cooking +cooks +cooky +cool +cooled +cooler +cooler's +coolers +coolest +coolie +coolie's +coolies +cooling +coolings +coolly +coolness +coolnesses +cools +coon +coon's +coons +coop +cooped +cooper +cooperate +cooperated +cooperates +cooperating +cooperation +cooperations +cooperative +cooperatively +cooperativeness +cooperatives +cooperator +cooperator's +cooperators +coopered +coopering +coopers +coops +coordinate +coordinated +coordinately +coordinateness +coordinates +coordinating +coordination +coordinations +coordinative +coordinator +coordinator's +coordinators +cop +cop's +cope +coped +coper +copes +copied +copier +copiers +copies +coping +copings +copious +copiously +copiousness +copper +copper's +coppered +coppering +coppers +cops +copse +copses +copy +copying +copyright +copyright's +copyrighted +copyrighter +copyrighters +copyrighting +copyrights +coral +cord +corded +corder +cordial +cordially +cordialness +cording +cords +core +cored +corer +corers +cores +coring +cork +corked +corker +corkers +corking +corks +cormorant +cormorants +corn +corned +corner +cornered +cornering +corners +cornerstone +cornerstone's +cornerstones +cornfield +cornfield's +cornfields +corning +corns +corollaries +corollary +corollary's +coronaries +coronary +coronation +coronet +coronet's +coroneted +coronets +coroutine +coroutine's +coroutines +corporal +corporal's +corporally +corporals +corporate +corporately +corporation +corporation's +corporations +corporative +corps +corpse +corpse's +corpses +corpus +correct +correctable +corrected +correcting +correction +corrections +corrective +correctively +correctiveness +correctives +correctly +correctness +corrector +corrects +correlate +correlated +correlates +correlating +correlation +correlations +correlative +correlatively +correspond +corresponded +correspondence +correspondence's +correspondences +correspondent +correspondent's +correspondents +corresponding +correspondingly +corresponds +corridor +corridor's +corridors +corroborate +corroborated +corroborates +corroborating +corroboration +corroborations +corroborative +corroboratively +corrosion +corrosions +corrupt +corrupted +corrupter +corrupting +corruption +corruptive +corruptively +corruptly +corrupts +corset +corsets +cosine +cosines +cosmetic +cosmetics +cosmology +cosmopolitan +cost +costed +costing +costive +costively +costiveness +costlier +costliness +costly +costs +costume +costumed +costumer +costumers +costumes +costuming +cot +cot's +cots +cottage +cottager +cottagers +cottages +cotton +cottoned +cottoning +cottons +cotyledon +cotyledon's +cotyledons +couch +couched +couches +couching +cough +coughed +cougher +coughing +coughs +could +couldest +couldn't +council +council's +councillor +councillor's +councillors +councils +counsel +counsel's +counsels +count +countable +countably +counted +countenance +countenancer +counter +counteract +counteracted +counteracting +counteractive +counteracts +counterclockwise +countered +counterexample +counterexamples +counterfeit +counterfeited +counterfeiter +counterfeiting +counterfeits +countering +countermeasure +countermeasure's +countermeasures +counterpart +counterpart's +counterparts +counterpoint +counterpointing +counterproductive +counterrevolution +counters +countess +counties +counting +countless +countlessly +countries +country +country's +countryman +countryside +counts +county +county's +couple +couple's +coupled +coupler +couplers +couples +coupling +couplings +coupon +coupon's +coupons +courage +courageous +courageously +courageousness +courier +courier's +couriers +course +coursed +courser +courses +coursing +court +courted +courteous +courteously +courteousness +courter +courters +courtesies +courtesy +courtesy's +courthouse +courthouse's +courthouses +courtier +courtier's +courtiers +courting +courtliness +courtly +courtroom +courtroom's +courtrooms +courts +courtship +courtyard +courtyard's +courtyards +cousin +cousin's +cousins +cove +covenant +covenant's +covenanted +covenanter +covenanting +covenants +cover +coverable +coverage +covered +coverer +covering +coverings +coverlet +coverlet's +coverlets +covers +covert +covertly +covertness +coves +covet +coveted +coveter +coveting +covetingly +covetous +covetously +covetousness +covets +coving +cow +coward +cowardice +cowardliness +cowardly +cowards +cowboy +cowboy's +cowboys +cowed +cowedly +cower +cowered +cowerer +cowerers +cowering +coweringly +cowers +cowgirl +cowgirl's +cowgirls +cowing +cowl +cowled +cowling +cowls +cows +cowslip +cowslip's +cowslips +coyote +coyote's +coyotes +cozier +cozies +coziness +cozy +crab +crab's +crabs +crack +cracked +cracker +crackers +cracking +crackle +crackled +crackles +crackling +crackly +cracks +cradle +cradled +cradler +cradles +cradling +craft +crafted +crafter +craftier +craftiness +crafting +crafts +craftsman +crafty +crag +crag's +crags +cram +cramp +cramp's +cramped +cramper +cramps +crams +cranberries +cranberry +cranberry's +crane +crane's +craned +cranes +craning +crank +cranked +crankier +crankiest +crankily +crankiness +cranking +cranks +cranky +crap +craping +craps +crash +crashed +crasher +crashers +crashes +crashing +crate +crater +cratered +craters +crates +crating +cravat +cravat's +cravats +crave +craved +craven +cravenly +cravenness +craver +craves +craving +crawl +crawled +crawler +crawlers +crawling +crawls +craze +crazed +crazes +crazier +craziest +crazily +craziness +crazing +crazy +creak +creaked +creaking +creaks +cream +creamed +creamer +creamers +creaminess +creaming +creams +creamy +crease +creased +creaser +creases +creasing +create +created +creates +creating +creation +creations +creative +creatively +creativeness +creativity +creator +creator's +creators +creature +creature's +creatureliness +creaturely +creatures +credence +credibility +credible +credibly +credit +creditable +creditableness +creditably +credited +crediting +creditor +creditor's +creditors +credits +credulity +credulous +credulously +credulousness +creed +creed's +creeds +creek +creek's +creeks +creep +creeper +creepers +creeping +creeps +cremate +cremated +cremates +cremating +cremation +cremations +crepe +crept +crescent +crescent's +crescents +crest +crested +cresting +crests +cretin +cretins +crevice +crevice's +crevices +crew +crewed +crewing +crews +crib +crib's +cribs +cricket +cricket's +cricketer +cricketing +crickets +cried +crier +criers +cries +crime +crime's +crimes +criminal +criminally +criminals +crimson +crimsoning +cringe +cringed +cringer +cringes +cringing +cripple +crippled +crippler +cripples +crippling +crises +crisis +crisp +crisper +crisply +crispness +crisps +criteria +criterion +critic +critic's +critical +critically +criticalness +criticism +criticism's +criticisms +critics +critique +critiqued +critiques +critiquing +critter +critter's +critters +croak +croaked +croaker +croakers +croaking +croaks +crochet +crocheted +crocheter +crocheting +crochets +crook +crooked +crookedly +crookedness +crooks +crop +crop's +cropped +cropper +cropper's +croppers +cropping +crops +cross +crossable +crossbar +crossbar's +crossbars +crossed +crosser +crossers +crosses +crossing +crossings +crossly +crossover +crossover's +crossovers +crossword +crossword's +crosswords +crouch +crouched +crouches +crouching +crow +crowd +crowded +crowdedness +crowder +crowding +crowds +crowed +crowing +crown +crowned +crowner +crowning +crowns +crows +crucial +crucially +crucification +crucified +crucifies +crucify +crucifying +crude +crudely +crudeness +cruder +crudest +cruel +crueler +cruelest +cruelly +cruelness +cruelty +cruise +cruised +cruiser +cruisers +cruises +cruising +crumb +crumble +crumbled +crumbles +crumblier +crumbliness +crumbling +crumblings +crumbly +crumbs +crumple +crumpled +crumples +crumpling +crunch +crunched +cruncher +crunchers +crunches +crunchier +crunchiest +crunchiness +crunching +crunchy +crusade +crusaded +crusader +crusaders +crusades +crusading +crush +crushable +crushed +crusher +crushers +crushes +crushing +crushingly +crust +crust's +crustacean +crustacean's +crustaceans +crusted +crusting +crusts +crutch +crutch's +crutched +crutches +crux +crux's +cruxes +cry +crying +cryptanalysis +cryptic +cryptographic +cryptography +cryptology +crystal +crystal's +crystalline +crystals +cub +cub's +cube +cubed +cuber +cubes +cubic +cubicly +cubics +cubing +cubs +cuckoo +cuckoo's +cuckoos +cucumber +cucumber's +cucumbers +cuddle +cuddled +cuddles +cuddling +cudgel +cudgel's +cudgels +cue +cued +cues +cuff +cuff's +cuffed +cuffing +cuffs +cuing +cull +culled +culler +culling +culls +culminate +culminated +culminates +culminating +culmination +culpability +culprit +culprit's +culprits +cult +cult's +cultivate +cultivated +cultivates +cultivating +cultivation +cultivations +cultivator +cultivator's +cultivators +cults +cultural +culturally +culture +cultured +cultures +culturing +cumbersome +cumbersomely +cumbersomeness +cumulative +cumulatively +cunning +cunningly +cunningness +cup +cup's +cupboard +cupboard's +cupboards +cupful +cupfuls +cupped +cupping +cups +cur +curable +curableness +curably +curb +curbed +curbing +curbs +curds +cure +cured +curer +cures +curfew +curfew's +curfews +curing +curiosities +curiosity +curiosity's +curious +curiouser +curiousest +curiously +curiousness +curl +curled +curler +curlers +curlier +curliness +curling +curls +curly +currant +currant's +currants +currencies +currency +currency's +current +currently +currentness +currents +curricular +curriculum +curriculum's +curriculums +curried +currier +curries +curry +currying +curs +curse +cursed +cursedly +cursedness +curses +cursing +cursive +cursively +cursiveness +cursor +cursor's +cursorily +cursoriness +cursors +cursory +curt +curtail +curtailed +curtailer +curtailing +curtails +curtain +curtained +curtaining +curtains +curtly +curtness +curtsied +curtsies +curtsy +curtsy's +curtsying +curvature +curvatures +curve +curved +curves +curving +cushion +cushioned +cushioning +cushions +cusp +cusp's +cusps +cuss +cussed +cussedly +cussedness +cusser +cusses +custard +custodian +custodian's +custodians +custodies +custody +custom +customarily +customariness +customary +customer +customer's +customers +customs +cut +cut's +cute +cutely +cuteness +cuter +cutes +cutest +cutoff +cutoffs +cuts +cutter +cutter's +cutters +cutting +cuttingly +cuttings +cybernetic +cybernetics +cycle +cycled +cycler +cycles +cyclic +cyclically +cyclicly +cycling +cycloid +cycloid's +cycloidal +cycloids +cyclone +cyclone's +cyclones +cylinder +cylinder's +cylindered +cylindering +cylinders +cylindrical +cylindrically +cymbal +cymbal's +cymbals +cynical +cynically +cypress +cyst +cysts +cytology +czar +dabble +dabbled +dabbler +dabblers +dabbles +dabbling +dad +dad's +daddies +daddy +dads +daemon +daemon's +daemons +daffodil +daffodil's +daffodils +dagger +daggers +dailies +daily +daintier +dainties +daintily +daintiness +dainty +dairies +dairy +dairying +daisies +daisy +daisy's +dale +dale's +dales +daleth +dam +dam's +damage +damaged +damager +damagers +damages +damaging +damagingly +damask +dame +damed +damn +damnation +damned +damneder +damnedest +damning +damningly +damns +damp +damped +dampen +dampened +dampener +dampening +dampens +damper +dampers +damping +damply +dampness +damps +dams +damsel +damsel's +damsels +dance +danced +dancer +dancers +dances +dancing +dandelion +dandelion's +dandelions +dandier +dandies +dandy +danger +danger's +dangerous +dangerously +dangerousness +dangers +dangle +dangled +dangler +dangler's +danglers +dangles +dangling +danglingly +dare +dared +darer +darers +dares +daring +daringly +daringness +dark +darken +darkened +darkener +darkeners +darkening +darker +darkest +darkly +darkness +darks +darling +darling's +darlingly +darlingness +darlings +darn +darned +darner +darning +darns +dart +darted +darter +darting +darts +dash +dashed +dasher +dashers +dashes +dashing +dashingly +data +database +database's +databases +date +dated +datedly +datedness +dater +dates +dating +dative +datum +datums +daughter +daughter's +daughterly +daughters +daunt +daunted +daunting +dauntless +dauntlessly +dauntlessness +daunts +dawn +dawned +dawning +dawns +day +day's +daybreak +daybreaks +daydream +daydreamed +daydreamer +daydreamers +daydreaming +daydreams +daylight +daylight's +daylights +days +daytime +daytimes +daze +dazed +dazedness +dazes +dazing +dazzle +dazzled +dazzler +dazzlers +dazzles +dazzling +dazzlingly +deacon +deacon's +deacons +deactivate +deactivates +deactivated +deactivating +dead +deaden +deadened +deadener +deadening +deadeningly +deadens +deadlier +deadliest +deadline +deadline's +deadlines +deadliness +deadlock +deadlocked +deadlocking +deadlocks +deadly +deadness +deaf +deafen +deafened +deafening +deafeningly +deafens +deafer +deafest +deafly +deafness +deal +dealer +dealers +dealing +dealings +deallocate +deallocated +deallocates +deallocating +deallocation +deallocation's +deallocations +deallocator +deals +dealt +dean +dean's +deans +dear +dearer +dearest +dearly +dearness +dears +dearth +dearths +death +deathly +deaths +debatable +debate +debated +debater +debaters +debates +debating +debilitate +debilitated +debilitates +debilitating +debilitation +debris +debt +debt's +debtor +debtors +debts +debug +debugged +debugger +debugger's +debuggers +debugging +debugs +decade +decade's +decadence +decadent +decadently +decades +decay +decayed +decayer +decaying +decays +decease +deceased +deceases +deceasing +deceit +deceitful +deceitfully +deceitfulness +deceive +deceived +deceiver +deceivers +deceives +deceiving +deceivingly +decelerate +decelerated +decelerates +decelerating +deceleration +decelerations +decencies +decency +decency's +decent +decently +deception +deception's +deceptions +deceptive +deceptively +deceptiveness +decidability +decidable +decide +decided +decidedly +decidedness +decider +decides +deciding +decimal +decimally +decimals +decimate +decimated +decimates +decimating +decimation +decipher +deciphered +decipherer +decipherers +deciphering +deciphers +decision +decision's +decisions +decisive +decisively +decisiveness +deck +decked +decker +decking +deckings +decks +declaration +declaration's +declarations +declarative +declaratively +declaratives +declare +declared +declarer +declarers +declares +declaring +declination +declination's +declinations +decline +declined +decliner +decliners +declines +declining +decode +decoded +decoder +decoders +decodes +decoding +decodings +decompile +decompiled +decompiler +decompilers +decompiles +decompiling +decomposability +decomposable +decompose +decomposed +decomposer +decomposes +decomposing +decomposition +decomposition's +decompositions +decompression +decorate +decorated +decorates +decorating +decoration +decorations +decorative +decoratively +decorativeness +decorator +decorators +decorum +decorums +decouple +decoupled +decoupler +decouples +decoupling +decoy +decoy's +decoys +decrease +decreased +decreases +decreasing +decreasingly +decree +decreed +decreeing +decreer +decrees +decrement +decremented +decrementing +decrements +dedicate +dedicated +dedicatedly +dedicates +dedicating +dedication +dedications +dedicative +deduce +deduced +deducer +deduces +deducible +deducing +deduct +deducted +deducting +deduction +deduction's +deductions +deductive +deductively +deducts +deed +deeded +deeding +deeds +deem +deemed +deeming +deems +deep +deepen +deepened +deepening +deepens +deeper +deepest +deeply +deepness +deeps +deer +deers +default +defaulted +defaulter +defaulting +defaults +defeat +defeated +defeating +defeatism +defeatist +defeatists +defeats +defect +defected +defecting +defection +defection's +defections +defective +defectively +defectiveness +defectives +defects +defend +defendant +defendant's +defendants +defended +defender +defenders +defending +defends +defenestrate +defenestrated +defenestrates +defenestrating +defenestration +defenestrations +defensive +defensively +defensiveness +defer +deference +deferment +deferment's +deferments +deferrable +deferred +deferrer +deferrer's +deferrers +deferring +defers +defiance +defiances +defiant +defiantly +deficiencies +deficiency +deficient +deficiently +deficit +deficit's +deficits +defied +defier +defies +defile +defiled +defiler +defiles +defiling +definable +define +defined +definer +definers +defines +defining +definite +definitely +definiteness +definition +definition's +definitional +definitions +definitive +definitively +definitiveness +deformation +deformation's +deformations +deformed +deformities +deformity +deformity's +deftly +defy +defying +defyingly +degenerate +degenerated +degenerately +degenerateness +degenerates +degenerating +degeneration +degenerative +degradable +degradation +degradation's +degradations +degrade +degraded +degradedly +degradedness +degrader +degrades +degrading +degradingly +degree +degree's +degreed +degrees +deign +deigned +deigning +deigns +deities +deity +deity's +dejected +dejectedly +dejectedness +delay +delayed +delayer +delayers +delaying +delays +delegate +delegated +delegates +delegating +delegation +delegations +delete +deleted +deleter +deletes +deleting +deletion +deletions +deliberate +deliberated +deliberately +deliberateness +deliberates +deliberating +deliberation +deliberations +deliberative +deliberatively +deliberativeness +deliberator +deliberator's +deliberators +delicacies +delicacy +delicacy's +delicate +delicately +delicateness +delicates +delicious +deliciouses +deliciously +deliciousness +delight +delighted +delightedly +delightedness +delighter +delightful +delightfully +delightfulness +delighting +delights +delimit +delimited +delimiter +delimiters +delimiting +delimits +delineate +delineated +delineates +delineating +delineation +delineations +delineative +delinquency +delinquent +delinquent's +delinquently +delinquents +delirious +deliriously +deliriousness +deliver +deliverable +deliverables +deliverance +delivered +deliverer +deliverers +deliveries +delivering +delivers +delivery +delivery's +dell +dell's +dells +delta +delta's +deltas +delude +deluded +deluder +deludes +deluding +deludingly +deluge +deluged +deluges +deluging +delusion +delusion's +delusions +delve +delved +delver +delves +delving +demand +demanded +demander +demanding +demandingly +demands +demise +demised +demises +demising +demo +democracies +democracy +democracy's +democrat +democrat's +democratic +democratically +democrats +demodulate +demodulated +demodulates +demodulating +demodulation +demodulation's +demodulations +demodulator +demodulator's +demodulators +demographic +demographics +demolish +demolished +demolisher +demolishes +demolishing +demolition +demolitions +demon +demon's +demoness +demons +demonstrable +demonstrableness +demonstrate +demonstrated +demonstrates +demonstrating +demonstration +demonstrations +demonstrative +demonstratively +demonstrativeness +demonstrator +demonstrator's +demonstrators +demos +demur +demurs +den +den's +deniable +denial +denial's +denials +denied +denier +denies +denigrate +denigrated +denigrates +denigrating +denigration +denigrative +denizen +denizens +denomination +denomination's +denominations +denominator +denominator's +denominators +denotable +denotation +denotation's +denotational +denotationally +denotations +denotative +denote +denoted +denotes +denoting +denounce +denounced +denouncer +denouncers +denounces +denouncing +dens +dense +densely +denseness +denser +densest +densities +density +density's +dent +dental +dentally +dentals +dented +denting +dentist +dentist's +dentists +dents +deny +denying +denyingly +depart +departed +departing +department +department's +departmental +departmentally +departments +departs +departure +departure's +departures +depend +dependability +dependable +dependableness +dependably +depended +dependence +dependences +dependencies +dependency +dependent +dependently +dependents +depending +depends +depict +depicted +depicter +depicting +depicts +deplete +depleted +depletes +depleting +depletion +depletions +depletive +deplorable +deplorableness +deplore +deplored +deplorer +deplores +deploring +deploringly +deploy +deployed +deploying +deployment +deployment's +deployments +deploys +deport +deportation +deported +deportee +deportee's +deportees +deporting +deportment +deports +depose +deposed +deposes +deposing +deposit +deposited +depositing +deposition +deposition's +depositions +depositor +depositor's +depositors +deposits +depot +depot's +depots +deprave +depraved +depravedly +depravedness +depraver +depraves +depraving +deprecate +deprecated +deprecates +deprecating +depreciate +depreciated +depreciates +depreciating +depreciatingly +depreciation +depreciations +depreciative +depreciatively +depress +depressed +depresses +depressing +depressingly +depression +depression's +depressions +depressive +depressively +deprivation +deprivation's +deprivations +deprive +deprived +deprives +depriving +depth +depths +deputies +deputy +deputy's +dequeue +dequeued +dequeues +dequeuing +derail +derailed +derailing +derails +derbies +derby +dereference +dereferenced +dereferencer +dereferencers +dereferences +dereferencing +deride +derided +derider +derides +deriding +deridingly +derision +derivable +derivation +derivation's +derivations +derivative +derivative's +derivatively +derivativeness +derivatives +derive +derived +deriver +derives +deriving +descend +descendant +descendant's +descendants +descended +descender +descenders +descending +descends +descent +descent's +descents +describable +describe +described +describer +describers +describes +describing +descried +description +description's +descriptions +descriptive +descriptively +descriptiveness +descriptives +descriptor +descriptor's +descriptors +descry +descrying +desert +deserted +deserter +deserters +deserting +desertion +desertions +deserts +deserve +deserved +deservedly +deservedness +deserver +deserves +deserving +deservingly +deservings +desiderata +desideratum +design +designate +designated +designates +designating +designation +designations +designative +designator +designator's +designators +designed +designedly +designer +designer's +designers +designing +designs +desirability +desirable +desirableness +desirably +desire +desired +desirer +desires +desiring +desirous +desirously +desirousness +desk +desk's +desks +desktop +desolate +desolated +desolately +desolateness +desolater +desolates +desolating +desolatingly +desolation +desolations +despair +despaired +despairer +despairing +despairingly +despairs +despatch +despatched +desperate +desperately +desperateness +desperation +despise +despised +despiser +despises +despising +despite +despited +despot +despot's +despotic +despots +dessert +dessert's +desserts +destination +destination's +destinations +destine +destined +destinies +destining +destiny +destiny's +destitute +destituteness +destitution +destroy +destroyed +destroyer +destroyer's +destroyers +destroying +destroys +destruction +destruction's +destructions +destructive +destructively +destructiveness +detach +detached +detachedly +detachedness +detacher +detaches +detaching +detachment +detachment's +detachments +detail +detailed +detailedly +detailedness +detailer +detailing +details +detain +detained +detainer +detaining +detains +detect +detectable +detectably +detected +detecting +detection +detection's +detections +detective +detectives +detector +detector's +detectors +detects +detention +deteriorate +deteriorated +deteriorates +deteriorating +deterioration +deteriorative +determinable +determinableness +determinacy +determinant +determinant's +determinants +determinate +determinately +determinateness +determination +determinations +determinative +determinatively +determinativeness +determine +determined +determinedly +determinedness +determiner +determiners +determines +determining +determinism +deterministic +deterministically +detest +detestable +detestableness +detested +detesting +detests +detonate +detonated +detonates +detonating +detonation +detonative +detract +detracted +detracting +detractive +detractively +detractor +detractor's +detractors +detracts +detriment +detriments +devastate +devastated +devastates +devastating +devastatingly +devastation +devastations +devastative +develop +developed +developer +developer's +developers +developing +development +development's +developmental +developmentally +developments +develops +deviant +deviant's +deviantly +deviants +deviate +deviated +deviates +deviating +deviation +deviations +device +device's +devices +devil +devil's +devilish +devilishly +devilishness +devils +devise +devised +deviser +devises +devising +devisings +devision +devisions +devoid +devote +devoted +devotedly +devotee +devotee's +devotees +devotes +devoting +devotion +devotions +devour +devoured +devourer +devouring +devours +devout +devoutly +devoutness +dew +dewdrop +dewdrop's +dewdrops +dewed +dewier +dewiness +dewing +dews +dewy +dexterity +diabetes +diadem +diagnosable +diagnose +diagnosed +diagnoses +diagnosing +diagnosis +diagnostic +diagnostic's +diagnostics +diagonal +diagonally +diagonals +diagram +diagram's +diagramed +diagraming +diagrammable +diagrammatic +diagrammatically +diagrammed +diagrammer +diagrammer's +diagrammers +diagramming +diagrams +dial +dial's +dialect +dialect's +dialects +dialog +dialog's +dialogs +dialogue +dialogue's +dialogues +dials +diameter +diameter's +diameters +diametrically +diamond +diamond's +diamonds +diaper +diaper's +diapered +diapering +diapers +diaphragm +diaphragm's +diaphragms +diaries +diary +diary's +diatribe +diatribe's +diatribes +dice +dicer +dices +dichotomies +dichotomy +dicing +dickens +dicky +dictate +dictated +dictates +dictating +dictation +dictations +dictator +dictator's +dictators +dictatorship +dictatorships +diction +dictionaries +dictionary +dictionary's +dictions +dictum +dictum's +dictums +did +didn't +die +died +dielectric +dielectric's +dielectrics +dies +diet +dieter +dieters +dietitian +dietitian's +dietitians +diets +differ +differed +difference +difference's +differenced +differences +differencing +different +differential +differential's +differentially +differentials +differentiate +differentiated +differentiates +differentiating +differentiation +differentiations +differentiators +differently +differentness +differer +differers +differing +differs +difficult +difficulties +difficultly +difficulty +difficulty's +diffuse +diffused +diffusely +diffuseness +diffuser +diffusers +diffuses +diffusing +diffusion +diffusions +diffusive +diffusively +diffusiveness +dig +digest +digested +digester +digestible +digesting +digestion +digestions +digestive +digestively +digestiveness +digests +digger +digger's +diggers +digging +diggings +digit +digit's +digital +digitally +digits +dignified +dignify +dignities +dignity +digress +digressed +digresses +digressing +digression +digression's +digressions +digressive +digressively +digressiveness +digs +dike +dike's +diker +dikes +diking +dilate +dilated +dilatedly +dilatedness +dilates +dilating +dilation +dilative +dilemma +dilemma's +dilemmas +diligence +diligences +diligent +diligently +diligentness +dilute +diluted +dilutely +diluteness +diluter +dilutes +diluting +dilution +dilutions +dilutive +dim +dime +dime's +dimension +dimensional +dimensionality +dimensionally +dimensioned +dimensioning +dimensions +dimer +dimers +dimes +diminish +diminished +diminishes +diminishing +diminution +diminutive +diminutively +diminutiveness +dimly +dimmed +dimmer +dimmer's +dimmers +dimmest +dimming +dimness +dimple +dimpled +dimples +dimpling +dims +din +dine +dined +diner +diners +dines +dingier +dinginess +dingy +dining +dinner +dinner's +dinners +dint +diode +diode's +diodes +dioxide +dioxides +dip +diphtheria +diploma +diploma's +diplomacy +diplomas +diplomat +diplomat's +diplomatic +diplomatics +diplomats +dipped +dipper +dipper's +dippers +dipping +dippings +dips +dire +direct +directed +directing +direction +direction's +directional +directionality +directionally +directions +directive +directive's +directives +directly +directness +director +director's +directories +directors +directory +directory's +directs +direly +direness +direr +direst +dirge +dirge's +dirged +dirges +dirging +dirt +dirt's +dirtied +dirtier +dirties +dirtiest +dirtily +dirtiness +dirts +dirty +dirtying +disabilities +disability +disability's +disable +disabled +disabler +disablers +disables +disabling +disabuse +disadvantage +disadvantage's +disadvantaged +disadvantagedness +disadvantages +disadvantaging +disagree +disagreeable +disagreeableness +disagreed +disagreeing +disagreement +disagreement's +disagreements +disagrees +disallow +disallowed +disallowing +disallows +disambiguate +disambiguated +disambiguates +disambiguating +disambiguation +disambiguations +disappear +disappearance +disappearance's +disappearances +disappeared +disappearing +disappears +disappoint +disappointed +disappointedly +disappointing +disappointingly +disappointment +disappointment's +disappointments +disappoints +disapproval +disapprove +disapproved +disapprover +disapproves +disapproving +disapprovingly +disarm +disarmament +disarmed +disarmer +disarmers +disarming +disarmingly +disarms +disassemble +disassembled +disassembler +disassembler's +disassemblers +disassembles +disassembling +disaster +disaster's +disasters +disastrous +disastrously +disband +disbanded +disbanding +disbands +disbelieve +disbelieved +disbeliever +disbelievers +disbelieves +disbelieving +disburse +disbursed +disbursement +disbursement's +disbursements +disburser +disburses +disbursing +disc +disc's +discard +discarded +discarder +discarding +discards +discern +discerned +discerner +discernibility +discernible +discernibly +discerning +discerningly +discernment +discerns +discharge +discharged +discharger +discharges +discharging +disciple +disciple's +disciples +disciplinary +discipline +disciplined +discipliner +disciplines +disciplining +disclaim +disclaimed +disclaimer +disclaimers +disclaiming +disclaims +disclose +disclosed +discloser +discloses +disclosing +disclosure +disclosure's +disclosures +discomfort +discomforting +discomfortingly +disconcert +disconcerted +disconcerting +disconcertingly +disconcerts +disconnect +disconnected +disconnectedly +disconnectedness +disconnecter +disconnecting +disconnection +disconnections +disconnects +discontent +discontented +discontentedly +discontinuance +discontinue +discontinued +discontinues +discontinuing +discontinuities +discontinuity +discontinuity's +discontinuous +discontinuously +discord +discords +discount +discounted +discounter +discounting +discounts +discourage +discouraged +discouragement +discourager +discourages +discouraging +discouragingly +discourse +discourse's +discoursed +discourser +discourses +discoursing +discover +discovered +discoverer +discoverers +discoveries +discovering +discovers +discovery +discovery's +discredit +discredited +discrediting +discredits +discreet +discreetly +discreetness +discrepancies +discrepancy +discrepancy's +discrete +discretely +discreteness +discretion +discretions +discriminate +discriminated +discriminates +discriminating +discriminatingly +discrimination +discriminations +discriminative +discriminatory +discs +discuss +discussed +discusser +discusses +discussing +discussion +discussion's +discussions +disdain +disdaining +disdains +disease +diseased +diseases +diseasing +disenfranchise +disenfranchised +disenfranchisement +disenfranchisement's +disenfranchisements +disenfranchiser +disenfranchises +disenfranchising +disengage +disengaged +disengages +disengaging +disentangle +disentangled +disentangler +disentangles +disentangling +disfigure +disfigured +disfigures +disfiguring +disgorge +disgorger +disgrace +disgraced +disgraceful +disgracefully +disgracefulness +disgracer +disgraces +disgracing +disgruntled +disguise +disguised +disguisedly +disguiser +disguises +disguising +disgust +disgusted +disgustedly +disgusting +disgustingly +disgusts +dish +dishearten +disheartening +dishearteningly +dished +dishes +dishing +dishonest +dishonestly +dishwasher +dishwashers +disillusion +disillusioned +disillusioning +disillusionment +disillusionment's +disillusionments +disinterested +disinterestedly +disinterestedness +disjoint +disjointed +disjointedly +disjointedness +disjointly +disjointness +disjunct +disjunction +disjunctions +disjunctive +disjunctively +disjuncts +disk +disk's +disked +disking +disks +dislike +disliked +disliker +dislikes +disliking +dislocate +dislocated +dislocates +dislocating +dislocation +dislocations +dislodge +dislodged +dislodges +dislodging +dismal +dismally +dismalness +dismay +dismayed +dismaying +dismayingly +dismays +dismiss +dismissal +dismissal's +dismissals +dismissed +dismisser +dismissers +dismisses +dismissing +dismissive +dismount +dismounted +dismounting +dismounts +disobedience +disobey +disobeyed +disobeyer +disobeying +disobeys +disorder +disordered +disorderedly +disorderedness +disorderliness +disorderly +disorders +disown +disowned +disowning +disowns +disparate +disparately +disparateness +disparities +disparity +disparity's +dispatch +dispatched +dispatcher +dispatchers +dispatches +dispatching +dispel +dispelled +dispelling +dispels +dispensation +dispense +dispensed +dispenser +dispensers +dispenses +dispensing +disperse +dispersed +dispersedly +disperser +disperses +dispersing +dispersion +dispersions +dispersive +dispersively +dispersiveness +displace +displaced +displacement +displacement's +displacements +displacer +displaces +displacing +display +displayed +displayer +displaying +displays +displease +displeased +displeasedly +displeases +displeasing +displeasure +disposable +disposal +disposal's +disposals +dispose +disposed +disposer +disposes +disposing +disposition +disposition's +dispositions +disprove +disproved +disproves +disproving +dispute +disputed +disputer +disputers +disputes +disputing +disqualification +disqualified +disqualifies +disqualify +disqualifying +disquiet +disquieting +disquietingly +disquietly +disregard +disregarded +disregarding +disregards +disrupt +disrupted +disrupter +disrupting +disruption +disruption's +disruptions +disruptive +disruptively +disruptiveness +disrupts +dissatisfaction +dissatisfaction's +dissatisfactions +dissatisfied +disseminate +disseminated +disseminates +disseminating +dissemination +dissension +dissension's +dissensions +dissent +dissented +dissenter +dissenters +dissenting +dissents +dissertation +dissertation's +dissertations +disservice +dissident +dissident's +dissidents +dissimilar +dissimilarities +dissimilarity +dissimilarity's +dissimilarly +dissipate +dissipated +dissipatedly +dissipatedness +dissipater +dissipates +dissipating +dissipation +dissipations +dissipative +dissociate +dissociated +dissociates +dissociating +dissociation +dissociative +dissolution +dissolution's +dissolutions +dissolve +dissolved +dissolver +dissolves +dissolving +dissonance +dissonance's +dissonances +distal +distally +distance +distanced +distances +distancing +distant +distantly +distantness +distaste +distasteful +distastefully +distastefulness +distastes +distemper +distill +distillation +distilled +distiller +distillers +distilling +distills +distinct +distinction +distinction's +distinctions +distinctive +distinctively +distinctiveness +distinctly +distinctness +distinguish +distinguishable +distinguished +distinguisher +distinguishes +distinguishing +distort +distorted +distorter +distorting +distortion +distortion's +distortions +distorts +distract +distracted +distractedly +distracting +distractingly +distraction +distraction's +distractions +distractive +distracts +distraught +distraughtly +distress +distressed +distresses +distressing +distressingly +distribute +distributed +distributer +distributes +distributing +distribution +distribution's +distributional +distributions +distributive +distributively +distributiveness +distributivity +distributor +distributor's +distributors +district +district's +districted +districting +districts +distrust +distrusted +distrusts +disturb +disturbance +disturbance's +disturbances +disturbed +disturber +disturbing +disturbingly +disturbs +ditch +ditch's +ditched +ditcher +ditches +ditching +divan +divan's +divans +dive +dived +diver +diverge +diverged +divergence +divergence's +divergences +divergent +divergently +diverges +diverging +divers +diverse +diversely +diverseness +diversification +diversified +diversifier +diversifies +diversify +diversifying +diversion +diversions +diversities +diversity +divert +diverted +diverting +diverts +dives +divest +divested +divesting +divests +divide +divided +dividend +dividend's +dividends +divider +dividers +divides +dividing +divine +divined +divinely +diviner +divines +diving +divining +divinities +divinity +divinity's +divisible +division +division's +divisions +divisor +divisor's +divisors +divorce +divorced +divorces +divorcing +divulge +divulged +divulges +divulging +dizzied +dizzier +dizziness +dizzy +dizzying +dizzyingly +do +dock +docked +docker +docking +docks +doctor +doctor's +doctoral +doctorate +doctorate's +doctorates +doctored +doctoring +doctors +doctrine +doctrine's +doctrines +document +document's +documentaries +documentary +documentary's +documentation +documentation's +documentations +documented +documenter +documenters +documenting +documents +dodge +dodged +dodger +dodgers +dodges +dodging +doer +doers +does +doesn't +dog +dog's +dogged +doggedly +doggedness +dogging +dogma +dogma's +dogmas +dogmatism +dogs +doing +doings +dole +doled +doleful +dolefully +dolefulness +doles +doling +doll +doll's +dollar +dollars +dollied +dollies +dolls +dolly +dolly's +dollying +dolphin +dolphin's +dolphins +domain +domain's +domains +dome +domed +domes +domestic +domestically +domesticate +domesticated +domesticates +domesticating +domestication +dominance +dominant +dominantly +dominate +dominated +dominates +dominating +domination +dominations +dominative +doming +dominion +dominions +don +don't +donate +donated +donates +donating +donation +donations +donative +done +donkey +donkey's +donkeys +dons +doom +doomed +dooming +dooms +door +door's +doors +doorstep +doorstep's +doorsteps +doorway +doorway's +doorways +dope +doped +doper +dopers +dopes +doping +dormant +dormitories +dormitory +dormitory's +dorsal +dorsally +dose +dosed +doses +dosing +dot +dot's +dote +doted +doter +dotes +doth +doting +dotingly +dots +dotted +dotting +double +doubled +doubleness +doubler +doublers +doubles +doublet +doublet's +doublets +doubling +doubly +doubt +doubtable +doubted +doubter +doubters +doubtful +doubtfully +doubtfulness +doubting +doubtingly +doubtless +doubtlessly +doubtlessness +doubts +dough +doughnut +doughnut's +doughnuts +douse +doused +douser +douses +dousing +dove +dover +doves +down +downcast +downed +downer +downers +downfall +downfallen +downier +downing +download +downloading +downloads +downplay +downplayed +downplaying +downplays +downright +downrightly +downrightness +downs +downstairs +downstream +downtown +downtowner +downtowns +downward +downwardly +downwardness +downwards +downy +doze +dozed +dozen +dozens +dozenth +dozer +dozes +dozing +drab +drably +drabness +drabs +draft +draft's +drafted +drafter +drafters +drafting +drafts +draftsmen +drag +dragged +dragging +draggingly +dragon +dragon's +dragons +dragoon +dragooned +dragoons +drags +drain +drainage +drainages +drained +drainer +drainers +draining +drains +drake +drama +drama's +dramas +dramatic +dramatically +dramatics +dramatist +dramatist's +dramatists +drank +drape +draped +draper +draperies +drapers +drapery +drapery's +drapes +draping +drastic +drastically +draw +drawback +drawback's +drawbacks +drawbridge +drawbridge's +drawbridges +drawer +drawers +drawing +drawings +drawl +drawled +drawler +drawling +drawlingly +drawls +drawly +drawn +drawnly +drawnness +draws +dread +dreaded +dreadful +dreadfully +dreadfulness +dreading +dreads +dream +dreamed +dreamer +dreamers +dreamier +dreamily +dreaminess +dreaming +dreamingly +dreams +dreamy +drearier +dreariness +dreary +dredge +dredge's +dredged +dredger +dredgers +dredges +dredging +dregs +drench +drenched +drencher +drenches +drenching +dress +dressed +dresser +dressers +dresses +dressing +dressings +dressmaker +dressmaker's +dressmakers +drew +dried +drier +drier's +driers +dries +driest +drift +drifted +drifter +drifters +drifting +driftingly +drifts +drill +drilled +driller +drilling +drills +drily +drink +drinkable +drinker +drinkers +drinking +drinks +drip +drip's +drips +drive +driven +drivenness +driver +driver's +drivers +drives +driveway +driveway's +driveways +driving +drone +drone's +droner +drones +droning +droningly +drool +drooled +drooler +drooling +drools +droop +drooped +drooping +droopingly +droops +drop +drop's +dropped +dropper +dropper's +droppers +dropping +dropping's +droppings +drops +drought +drought's +droughts +drove +drover +drovers +droves +drown +drowned +drowner +drowning +drownings +drowns +drowsier +drowsiest +drowsiness +drowsy +drudgery +drug +drug's +druggist +druggist's +druggists +drugs +drum +drum's +drummed +drummer +drummer's +drummers +drumming +drums +drunk +drunk's +drunkard +drunkard's +drunkards +drunken +drunkenly +drunkenness +drunker +drunkly +drunks +dry +drying +dryly +dual +dualities +duality +duality's +dually +duals +dub +dubious +dubiously +dubiousness +dubs +duchess +duchess's +duchesses +duchies +duchy +duck +ducked +ducker +ducking +ducks +dude +due +duel +duels +dueness +dues +dug +duke +duke's +dukes +dull +dulled +duller +dullest +dulling +dullness +dulls +dully +duly +dumb +dumbbell +dumbbell's +dumbbells +dumber +dumbest +dumbly +dumbness +dummied +dummies +dummy +dummy's +dummying +dump +dumped +dumper +dumpers +dumping +dumps +dunce +dunce's +dunces +dune +dune's +dunes +dungeon +dungeon's +dungeons +duplicate +duplicated +duplicates +duplicating +duplication +duplications +duplicative +duplicator +duplicator's +duplicators +durabilities +durability +durable +durableness +durables +durably +duration +duration's +durations +during +dusk +duskier +duskiness +dusky +dust +dusted +duster +dusters +dustier +dustiest +dustiness +dusting +dusts +dusty +duties +dutiful +dutifully +dutifulness +duty +duty's +dwarf +dwarfed +dwarfness +dwarfs +dwell +dwelled +dweller +dwellers +dwelling +dwellings +dwells +dwindle +dwindled +dwindles +dwindling +dye +dyed +dyeing +dyer +dyers +dyes +dying +dynamic +dynamically +dynamics +dynamite +dynamited +dynamiter +dynamites +dynamiting +dynasties +dynasty +dynasty's +each +eager +eagerly +eagerness +eagle +eagle's +eagles +ear +eared +earing +earl +earl's +earlier +earliest +earliness +earls +early +earmark +earmarked +earmarking +earmarkings +earmarks +earn +earned +earner +earner's +earners +earnest +earnestly +earnestness +earning +earnings +earns +earring +earring's +earrings +ears +earshot +earth +earth's +earthed +earthen +earthenware +earthliness +earthly +earthquake +earthquake's +earthquakes +earths +earthworm +earthworm's +earthworms +ease +eased +easement +easement's +easements +easer +eases +easier +easiest +easily +easiness +easing +east +easter +easterly +eastern +easterner +easterners +easting +easts +eastward +eastwards +easy +eat +eaten +eater +eaters +eating +eatings +eats +eaves +eavesdrop +eavesdropped +eavesdropper +eavesdropper's +eavesdroppers +eavesdropping +eavesdrops +ebb +ebbed +ebbing +ebbs +ebony +eccentric +eccentric's +eccentricities +eccentricity +eccentrics +ecclesiastical +ecclesiastically +echo +echoed +echoes +echoing +echos +eclipse +eclipsed +eclipses +eclipsing +ecology +economic +economical +economically +economics +economies +economist +economist's +economists +economy +economy's +ecstasy +eddied +eddies +eddy +eddy's +eddying +edge +edged +edger +edges +edging +edible +edibleness +edibles +edict +edict's +edicts +edifice +edifice's +edifices +edit +edited +editing +edition +edition's +editions +editor +editor's +editorial +editorially +editorials +editors +edits +educate +educated +educatedly +educatedness +educates +educating +education +education's +educational +educationally +educations +educative +educator +educator's +educators +eel +eel's +eels +eerie +eerier +effect +effected +effecting +effective +effectively +effectiveness +effectives +effector +effector's +effectors +effects +effectually +effeminate +efficacy +efficiencies +efficiency +efficient +efficiently +effigy +effort +effort's +effortless +effortlessly +effortlessness +efforts +egg +egged +egger +egging +eggs +ego +egos +eigenvalue +eigenvalue's +eigenvalues +eight +eighteen +eighteens +eighteenth +eighth +eighth's +eighthes +eighties +eightieth +eights +eighty +either +ejaculate +ejaculated +ejaculates +ejaculating +ejaculation +ejaculations +eject +ejected +ejecting +ejective +ejects +eke +eked +ekes +eking +el +elaborate +elaborated +elaborately +elaborateness +elaborates +elaborating +elaboration +elaborations +elaborative +elaborators +elapse +elapsed +elapses +elapsing +elastic +elastically +elasticities +elasticity +elastics +elate +elated +elatedly +elatedness +elater +elates +elating +elation +elbow +elbowed +elbowing +elbows +elder +elderliness +elderly +elders +eldest +elect +elected +electing +election +election's +elections +elective +electively +electiveness +electives +elector +elector's +electoral +electorally +electors +electric +electrical +electrically +electricalness +electricities +electricity +electrics +electrification +electrified +electrify +electrifying +electrocute +electrocuted +electrocutes +electrocuting +electrocution +electrocutions +electrode +electrode's +electrodes +electrolyte +electrolyte's +electrolytes +electrolytic +electron +electron's +electronic +electronically +electronics +electrons +elects +elegance +elegances +elegant +elegantly +element +element's +elemental +elementally +elementals +elementariness +elementary +elements +elephant +elephant's +elephants +elevate +elevated +elevates +elevating +elevation +elevations +elevator +elevator's +elevators +eleven +elevens +elevenses +eleventh +elf +elicit +elicited +eliciting +elicits +eligibilities +eligibility +eligible +eligibles +eliminate +eliminated +eliminately +eliminates +eliminating +elimination +eliminations +eliminative +eliminator +eliminators +elk +elk's +elks +ellipse +ellipse's +ellipses +ellipsis +ellipsoid +ellipsoid's +ellipsoidal +ellipsoids +elliptic +elliptical +elliptically +elm +elmer +elms +elongate +elongated +elongates +elongating +elongation +eloquence +eloquent +eloquently +els +else +else's +elsewhere +elucidate +elucidated +elucidates +elucidating +elucidation +elucidative +elude +eluded +eludes +eluding +elusive +elusively +elusiveness +elves +emaciated +emacs +emacs's +email +email's +emanating +emancipation +embark +embarked +embarking +embarks +embarrass +embarrassed +embarrassedly +embarrasses +embarrassing +embarrassingly +embarrassment +embassies +embassy +embassy's +embed +embedded +embedding +embeds +embellish +embellished +embellisher +embellishes +embellishing +embellishment +embellishment's +embellishments +ember +embers +embezzle +embezzled +embezzler +embezzler's +embezzlers +embezzles +embezzling +emblem +emblems +embodied +embodier +embodies +embodiment +embodiment's +embodiments +embody +embodying +embrace +embraced +embracer +embraces +embracing +embracingly +embracive +embroider +embroidered +embroiderer +embroideries +embroiders +embroidery +embryo +embryo's +embryology +embryos +emerald +emerald's +emeralds +emerge +emerged +emergence +emergencies +emergency +emergency's +emergent +emerges +emerging +emeries +emery +emigrant +emigrant's +emigrants +emigrate +emigrated +emigrates +emigrating +emigration +eminence +eminent +eminently +emit +emits +emitted +emotion +emotion's +emotional +emotionally +emotions +empathy +emperor +emperor's +emperors +emphases +emphasis +emphatic +emphatically +empire +empire's +empires +empirical +empirically +empiricist +empiricist's +empiricists +employ +employable +employed +employee +employee's +employees +employer +employer's +employers +employing +employment +employment's +employments +employs +empower +empowered +empowering +empowers +empress +emptied +emptier +empties +emptiest +emptily +emptiness +empty +emptying +emulate +emulated +emulates +emulating +emulation +emulations +emulative +emulatively +emulator +emulator's +emulators +enable +enabled +enabler +enablers +enables +enabling +enact +enacted +enacting +enactment +enactments +enacts +enamel +enamels +encamp +encamped +encamping +encamps +encapsulate +encapsulated +encapsulates +encapsulating +encapsulation +enchant +enchanted +enchanter +enchanting +enchantingly +enchantment +enchants +encipher +enciphered +encipherer +enciphering +enciphers +encircle +encircled +encircles +encircling +enclose +enclosed +encloses +enclosing +enclosure +enclosure's +enclosures +encode +encoded +encoder +encoders +encodes +encoding +encodings +encompass +encompassed +encompasses +encompassing +encounter +encountered +encountering +encounters +encourage +encouraged +encouragement +encouragements +encourager +encourages +encouraging +encouragingly +encrypt +encrypted +encrypting +encryption +encryption's +encryptions +encrypts +encumber +encumbered +encumbering +encumbers +encyclopedia +encyclopedia's +encyclopedias +encyclopedic +end +endanger +endangered +endangering +endangers +endear +endeared +endearing +endearingly +endears +ended +endemic +ender +enders +ending +endings +endive +endless +endlessly +endlessness +endorse +endorsed +endorsement +endorsement's +endorsements +endorser +endorses +endorsing +endow +endowed +endowing +endowment +endowment's +endowments +endows +ends +endurable +endurably +endurance +endure +endured +endures +enduring +enduringly +enduringness +enema +enema's +enemas +enemies +enemy +enemy's +energetic +energetics +energies +energy +enforce +enforced +enforcedly +enforcement +enforcer +enforcers +enforces +enforcing +enfranchise +enfranchised +enfranchisement +enfranchiser +enfranchises +enfranchising +engage +engaged +engagement +engagement's +engagements +engages +engaging +engagingly +engender +engendered +engendering +engenders +engine +engine's +engined +engineer +engineer's +engineered +engineering +engineeringly +engineerings +engineers +engines +engining +england +englander +englanders +engrave +engraved +engraver +engravers +engraves +engraving +engravings +engross +engrossed +engrossedly +engrosser +engrossing +engrossingly +enhance +enhanced +enhancement +enhancement's +enhancements +enhances +enhancing +enigmatic +enjoin +enjoined +enjoining +enjoins +enjoy +enjoyable +enjoyableness +enjoyably +enjoyed +enjoying +enjoyment +enjoys +enlarge +enlarged +enlargement +enlargement's +enlargements +enlarger +enlargers +enlarges +enlarging +enlighten +enlightened +enlightening +enlightenment +enlightens +enlist +enlisted +enlister +enlisting +enlistment +enlistments +enlists +enliven +enlivened +enlivening +enlivens +enmities +enmity +ennoble +ennobled +ennobler +ennobles +ennobling +ennui +enormities +enormity +enormous +enormously +enormousness +enough +enqueue +enqueued +enqueues +enquire +enquired +enquirer +enquirers +enquires +enquiring +enrage +enraged +enrages +enraging +enrich +enriched +enricher +enriches +enriching +enrolled +enrolling +ensemble +ensemble's +ensembles +ensign +ensign's +ensigns +enslave +enslaved +enslaver +enslavers +enslaves +enslaving +ensnare +ensnared +ensnares +ensnaring +ensue +ensued +ensues +ensuing +ensure +ensured +ensurer +ensurers +ensures +ensuring +entail +entailed +entailer +entailing +entails +entangle +entangled +entangler +entangles +entangling +enter +entered +enterer +entering +enterprise +enterpriser +enterprises +enterprising +enterprisingly +enters +entertain +entertained +entertainer +entertainers +entertaining +entertainingly +entertainment +entertainment's +entertainments +entertains +enthusiasm +enthusiasms +enthusiast +enthusiast's +enthusiastic +enthusiastically +enthusiasts +entice +enticed +enticer +enticers +entices +enticing +entire +entirely +entireties +entirety +entities +entitle +entitled +entitles +entitling +entity +entity's +entrance +entranced +entrances +entrancing +entreat +entreated +entreaties +entreating +entreatingly +entreats +entreaty +entrench +entrenched +entrenches +entrenching +entrepreneur +entrepreneur's +entrepreneurs +entries +entropies +entropy +entrust +entrusted +entrusting +entrusts +entry +entry's +enumerable +enumerate +enumerated +enumerates +enumerating +enumeration +enumerations +enumerative +enumerator +enumerator's +enumerators +enunciation +envelop +envelope +enveloped +enveloper +envelopes +enveloping +envelops +enviably +envied +envier +envies +envious +enviously +enviousness +environ +environed +environing +environment +environment's +environmental +environmentally +environments +environs +envisage +envisaged +envisages +envisaging +envision +envisioned +envisioning +envisions +envoy +envoy's +envoys +envy +envying +envyingly +epaulet +epaulet's +epaulets +ephemeral +ephemerally +ephemerals +epic +epic's +epics +epidemic +epidemic's +epidemics +episcopal +episcopally +episode +episode's +episodes +episodic +epistemological +epistemologically +epistemology +epistle +epistle's +epistler +epistles +epitaph +epitaphed +epitaphing +epitaphs +epitaxial +epitaxially +epithet +epithet's +epithets +epoch +epochs +epsilon +epsilons +equal +equalities +equality +equality's +equally +equals +equate +equated +equates +equating +equation +equations +equator +equator's +equatorial +equators +equilibrium +equilibriums +equinox +equip +equipment +equipments +equipped +equipping +equips +equitable +equitableness +equitably +equities +equity +equivalence +equivalenced +equivalences +equivalencing +equivalent +equivalently +equivalents +era +era's +eradicate +eradicated +eradicates +eradicating +eradication +eradicative +eras +erasable +erase +erased +eraser +erasers +erases +erasing +erasion +erasure +ere +erect +erected +erecting +erection +erection's +erections +erectly +erectness +erector +erector's +erectors +erects +ergo +ermine +ermine's +ermined +ermines +err +errand +errands +erratic +erred +erring +erringly +erroneous +erroneously +erroneousness +error +error's +errors +errs +eruption +eruptions +escalate +escalated +escalates +escalating +escalation +escapable +escapade +escapade's +escapades +escape +escaped +escapee +escapee's +escapees +escaper +escapes +escaping +eschew +eschewed +eschewing +eschews +escort +escorted +escorting +escorts +esoteric +especial +especially +espied +espies +espionage +espouse +espoused +espouser +espouses +espousing +esprit +esprits +espy +espying +esquire +esquires +essay +essayed +essayer +essays +essence +essence's +essences +essential +essentially +essentialness +essentials +establish +established +establisher +establishes +establishing +establishment +establishment's +establishments +estate +estate's +estates +esteem +esteemed +esteeming +esteems +estimate +estimated +estimates +estimating +estimation +estimations +estimative +etc +eternal +eternally +eternalness +eternities +eternity +ethereal +ethereally +etherealness +ethic +ethical +ethically +ethicalness +ethics +ethnic +etiquette +eunuch +eunuchs +euphemism +euphemism's +euphemisms +euphoria +evacuate +evacuated +evacuates +evacuating +evacuation +evacuations +evacuative +evade +evaded +evader +evades +evading +evaluate +evaluated +evaluates +evaluating +evaluation +evaluations +evaluative +evaluator +evaluator's +evaluators +evaporate +evaporated +evaporates +evaporating +evaporation +evaporations +evaporative +evaporatively +eve +even +evened +evener +evenhanded +evenhandedly +evenhandedness +evening +evening's +evenings +evenly +evenness +evens +event +event's +eventful +eventfully +eventfulness +events +eventual +eventualities +eventuality +eventually +ever +everest +evergreen +everlasting +everlastingly +everlastingness +evermore +every +everybody +everybody's +everyday +everydayness +everyone +everyone's +everyones +everything +everywhere +eves +evict +evicted +evicting +eviction +eviction's +evictions +evicts +evidence +evidenced +evidences +evidencing +evident +evidently +evil +evilly +evilness +evils +evince +evinced +evinces +evincing +evoke +evoked +evokes +evoking +evolute +evolute's +evolutes +evolution +evolution's +evolutionary +evolutions +evolve +evolved +evolves +evolving +ewe +ewe's +ewer +ewes +exacerbate +exacerbated +exacerbates +exacerbating +exacerbation +exacerbations +exact +exacted +exacter +exacting +exactingly +exactingness +exaction +exaction's +exactions +exactitude +exactly +exactness +exacts +exaggerate +exaggerated +exaggeratedly +exaggeratedness +exaggerates +exaggerating +exaggeration +exaggerations +exaggerative +exaggeratively +exalt +exalted +exaltedly +exalter +exalters +exalting +exalts +exam +exam's +examen +examination +examination's +examinations +examine +examined +examiner +examiners +examines +examining +example +example's +exampled +examples +exampling +exams +exasperate +exasperated +exasperatedly +exasperates +exasperating +exasperatingly +exasperation +exasperations +excavate +excavated +excavates +excavating +excavation +excavations +exceed +exceeded +exceeder +exceeding +exceedingly +exceeds +excel +excelled +excellence +excellences +excellency +excellent +excellently +excelling +excels +except +excepted +excepting +exception +exception's +exceptional +exceptionally +exceptionalness +exceptions +exceptive +excepts +excerpt +excerpted +excerpter +excerpts +excess +excesses +excessive +excessively +excessiveness +exchange +exchangeable +exchanged +exchanger +exchangers +exchanges +exchanging +exchequer +exchequer's +exchequers +excise +excised +excises +excising +excision +excisions +excitable +excitableness +excitation +excitation's +excitations +excite +excited +excitedly +excitement +exciter +excites +exciting +excitingly +exclaim +exclaimed +exclaimer +exclaimers +exclaiming +exclaims +exclamation +exclamation's +exclamations +exclude +excluded +excluder +excludes +excluding +exclusion +exclusioner +exclusioners +exclusions +exclusive +exclusively +exclusiveness +exclusivity +excommunicate +excommunicated +excommunicates +excommunicating +excommunication +excommunicative +excrete +excreted +excreter +excretes +excreting +excretion +excretions +excruciatingly +excursion +excursion's +excursions +excusable +excusableness +excusably +excuse +excused +excuser +excuses +excusing +executable +executable's +executables +execute +executed +executer +executers +executes +executing +execution +executional +executioner +executions +executive +executive's +executives +executor +executor's +executors +exemplar +exemplariness +exemplars +exemplary +exemplification +exemplified +exemplifier +exemplifiers +exemplifies +exemplify +exemplifying +exempt +exempted +exempting +exempts +exercise +exercised +exerciser +exercisers +exercises +exercising +exert +exerted +exerting +exertion +exertion's +exertions +exerts +exhale +exhaled +exhales +exhaling +exhaust +exhausted +exhaustedly +exhauster +exhaustible +exhausting +exhaustingly +exhaustion +exhaustive +exhaustively +exhaustiveness +exhausts +exhibit +exhibited +exhibiting +exhibition +exhibition's +exhibitioner +exhibitions +exhibitive +exhibitor +exhibitor's +exhibitors +exhibits +exhortation +exhortation's +exhortations +exigencies +exigency +exile +exiled +exiles +exiling +exist +existed +existence +existences +existent +existential +existentialism +existentialist +existentialist's +existentialists +existentially +existing +exists +exit +exited +exiting +exits +exorbitant +exorbitantly +exoskeletons +exotic +exoticness +expand +expandable +expanded +expander +expander's +expanders +expanding +expands +expanse +expansed +expanses +expansing +expansion +expansionism +expansions +expansive +expansively +expansiveness +expect +expectancies +expectancy +expectant +expectantly +expectation +expectation's +expectations +expected +expectedly +expectedness +expecting +expectingly +expects +expedient +expediently +expedite +expedited +expediter +expedites +expediting +expedition +expedition's +expeditions +expeditious +expeditiously +expeditiousness +expel +expelled +expelling +expels +expend +expendable +expended +expender +expending +expenditure +expenditure's +expenditures +expends +expense +expensed +expenses +expensing +expensive +expensively +expensiveness +experience +experienced +experiences +experiencing +experiment +experimental +experimentally +experimentation +experimentation's +experimentations +experimented +experimenter +experimenters +experimenting +experiments +expert +expertise +expertly +expertness +experts +expiration +expiration's +expirations +expire +expired +expires +expiring +explain +explainable +explained +explainer +explainers +explaining +explains +explanation +explanation's +explanations +explanatory +explicit +explicitly +explicitness +explode +exploded +exploder +explodes +exploding +exploit +exploitable +exploitation +exploitation's +exploitations +exploited +exploiter +exploiters +exploiting +exploitive +exploits +exploration +exploration's +explorations +exploratory +explore +explored +explorer +explorers +explores +exploring +explosion +explosion's +explosions +explosive +explosively +explosiveness +explosives +exponent +exponent's +exponential +exponentially +exponentials +exponentiate +exponentiated +exponentiates +exponentiating +exponentiation +exponentiation's +exponentiations +exponents +export +exported +exporter +exporters +exporting +exports +expose +exposed +exposer +exposers +exposes +exposing +exposition +exposition's +expositions +expository +exposure +exposure's +exposures +expound +expounded +expounder +expounding +expounds +express +expressed +expresser +expresses +expressibility +expressible +expressibly +expressing +expression +expression's +expressions +expressive +expressively +expressiveness +expressly +expropriate +expropriated +expropriates +expropriating +expropriation +expropriations +expulsion +expunge +expunged +expunger +expunges +expunging +exquisite +exquisitely +exquisiteness +extant +extend +extended +extendedly +extendedness +extender +extendible +extendibles +extending +extends +extensibility +extensible +extension +extension's +extensions +extensive +extensively +extensiveness +extent +extent's +extents +extenuate +extenuated +extenuating +extenuation +exterior +exterior's +exteriorly +exteriors +exterminate +exterminated +exterminates +exterminating +extermination +exterminations +external +externally +externals +extinct +extinction +extinctive +extinguish +extinguished +extinguisher +extinguishers +extinguishes +extinguishing +extol +extols +extortion +extortioner +extortionist +extortionist's +extortionists +extra +extract +extracted +extracting +extraction +extraction's +extractions +extractive +extractively +extractor +extractor's +extractors +extracts +extracurricular +extraneous +extraneously +extraneousness +extraordinarily +extraordinariness +extraordinary +extrapolate +extrapolated +extrapolates +extrapolating +extrapolation +extrapolations +extrapolative +extras +extravagance +extravagant +extravagantly +extremal +extreme +extremed +extremely +extremeness +extremer +extremes +extremest +extremist +extremist's +extremists +extremities +extremity +extremity's +extrinsic +exuberance +exult +exultation +exulted +exulting +exultingly +exults +eye +eyeball +eyeballs +eyebrow +eyebrow's +eyebrows +eyed +eyedness +eyeglass +eyeglasses +eyeing +eyelid +eyelid's +eyelids +eyepiece +eyepiece's +eyepieces +eyer +eyers +eyes +eyesight +eyewitness +eyewitness's +eyewitnesses +eying +fable +fabled +fabler +fables +fabling +fabric +fabric's +fabricate +fabricated +fabricates +fabricating +fabrication +fabrications +fabrics +fabulous +fabulously +fabulousness +facade +facaded +facades +facading +face +faced +faceless +facelessness +facer +faces +facet +faceted +faceting +facets +facial +facially +facile +facilely +facileness +facilitate +facilitated +facilitates +facilitating +facilitation +facilitative +facilities +facility +facility's +facing +facings +facsimile +facsimile's +facsimiled +facsimiles +facsimiling +fact +fact's +faction +faction's +factions +factor +factored +factorial +factories +factoring +factorings +factors +factory +factory's +facts +factual +factually +factualness +faculties +faculty +faculty's +fade +faded +fadedly +fader +faders +fades +fading +fag +fags +fail +failed +failing +failingly +failings +fails +failure +failure's +failures +fain +faint +fainted +fainter +faintest +fainting +faintly +faintness +faints +fair +faired +fairer +fairest +fairies +fairing +fairly +fairness +fairs +fairy +fairy's +fairyland +faith +faithful +faithfully +faithfulness +faithfuls +faithless +faithlessly +faithlessness +faiths +fake +faked +faker +fakes +faking +falcon +falconer +falcons +fall +fallacies +fallacious +fallaciously +fallaciousness +fallacy +fallacy's +fallen +faller +fallibility +fallible +falling +falls +false +falsehood +falsehood's +falsehoods +falsely +falseness +falser +falsest +falsification +falsified +falsifier +falsifies +falsify +falsifying +falsity +falter +faltered +falterer +faltering +falteringly +falters +fame +famed +fames +familiar +familiarities +familiarity +familiarly +familiarness +familiars +families +family +family's +famine +famine's +famines +faming +famish +famished +famishes +famishing +famous +famously +famousness +fan +fan's +fanatic +fanatic's +fanatically +fanatics +fancied +fancier +fancier's +fanciers +fancies +fanciest +fanciful +fancifully +fancifulness +fancily +fanciness +fancy +fancying +fang +fang's +fanged +fangs +fanned +fanning +fans +fantasied +fantasies +fantastic +fantasy +fantasy's +far +faraway +farce +farce's +farces +farcing +fare +fared +farer +fares +farewell +farewells +faring +farm +farmed +farmer +farmer's +farmers +farmhouse +farmhouse's +farmhouses +farming +farms +farmyard +farmyard's +farmyards +farther +farthest +farthing +fascinate +fascinated +fascinates +fascinating +fascinatingly +fascination +fascinations +fashion +fashionable +fashionableness +fashionably +fashioned +fashioner +fashioners +fashioning +fashions +fast +fasted +fasten +fastened +fastener +fasteners +fastening +fastenings +fastens +faster +fastest +fasting +fastness +fasts +fat +fatal +fatalities +fatality +fatality's +fatally +fatals +fate +fated +fates +father +father's +fathered +fathering +fatherland +fatherliness +fatherly +fathers +fathom +fathomed +fathoming +fathoms +fatigue +fatigued +fatigues +fatiguing +fatiguingly +fating +fatly +fatness +fats +fatten +fattened +fattener +fatteners +fattening +fattens +fatter +fattest +fault +faulted +faultier +faultiness +faulting +faultless +faultlessly +faultlessness +faults +faulty +fawn +fawned +fawner +fawning +fawningly +fawns +fear +feared +fearer +fearful +fearfully +fearfulness +fearing +fearless +fearlessly +fearlessness +fears +feasibility +feasible +feasibleness +feast +feasted +feaster +feasting +feasts +feat +feat's +feather +feathered +featherer +featherers +feathering +feathers +feating +featly +feats +feature +featured +featureless +features +featuring +fed +federal +federally +federals +federation +feds +fee +feeble +feebleness +feebler +feeblest +feebly +feed +feedback +feedbacks +feeder +feeders +feeding +feedings +feeds +feel +feeler +feelers +feeling +feelingly +feelingness +feelings +feels +fees +feet +feign +feigned +feigner +feigning +feigns +felicities +felicity +fell +felled +feller +fellers +felling +fellness +fellow +fellow's +fellowly +fellows +fellowship +fellowship's +fellowships +fells +felt +felted +felting +felts +female +female's +femaleness +females +feminine +femininely +feminineness +femininity +feminist +feminist's +feminists +femur +femur's +femurs +fen +fence +fenced +fencer +fencers +fences +fencing +ferment +fermentation +fermentation's +fermentations +fermented +fermenter +fermenting +ferments +fern +fern's +ferns +ferocious +ferociously +ferociousness +ferocity +ferried +ferries +ferrite +ferry +ferrying +fertile +fertilely +fertileness +fertilities +fertility +fervent +fervently +festival +festival's +festivals +festive +festively +festiveness +festivities +festivity +fetch +fetched +fetcher +fetches +fetching +fetchingly +fetter +fettered +fettering +fetters +feud +feud's +feudal +feudalism +feudally +feuds +fever +fevered +fevering +feverish +feverishly +feverishness +fevers +few +fewer +fewest +fewness +fews +fibrous +fibrously +fibrousness +fickle +fickleness +fiction +fiction's +fictional +fictionally +fictions +fictitious +fictitiously +fictitiousness +fiddle +fiddled +fiddler +fiddles +fiddling +fidelity +field +fielded +fielder +fielders +fielding +fields +fiend +fiends +fierce +fiercely +fierceness +fiercer +fiercest +fieriness +fiery +fife +fifteen +fifteens +fifteenth +fifth +fifthly +fifties +fiftieth +fifty +fig +fig's +fight +fighter +fighters +fighting +fights +figs +figurative +figuratively +figurativeness +figure +figured +figurer +figurers +figures +figuring +figurings +filament +filament's +filaments +file +file's +filed +filename +filename's +filenames +filer +filers +files +filial +filially +filing +filings +fill +fillable +filled +filler +fillers +filling +fillings +fills +film +filmed +filming +films +filter +filter's +filtered +filterer +filtering +filters +filth +filthier +filthiest +filthiness +filthy +filtration +filtration's +fin +fin's +final +finality +finally +finals +finance +financed +finances +financial +financially +financier +financier's +financiers +financing +find +finder +finders +finding +findings +finds +fine +fined +finely +fineness +finer +fines +finest +finger +fingered +fingerer +fingering +fingerings +fingers +fining +finish +finished +finisher +finishers +finishes +finishing +finishings +finite +finitely +finiteness +finites +fins +fir +fire +firearm +firearm's +firearms +fired +fireflies +firefly +firefly's +firelight +firelighting +fireman +fireplace +fireplace's +fireplaces +firer +firers +fires +fireside +firewood +fireworks +firing +firings +firm +firm's +firmament +firmed +firmer +firmest +firming +firmly +firmness +firms +firmware +firmwares +first +firsthand +firstly +firsts +firth +fiscal +fiscally +fiscals +fish +fished +fisher +fisheries +fisherman +fisherman's +fishermen +fishermen's +fishers +fishery +fishes +fishing +fissure +fissured +fissures +fissuring +fist +fisted +fists +fit +fitful +fitfully +fitfulness +fitly +fitness +fits +fitted +fitter +fitter's +fitters +fitting +fittingly +fittingness +fittings +five +fiver +fives +fix +fixate +fixated +fixates +fixating +fixation +fixations +fixative +fixed +fixedly +fixedness +fixer +fixers +fixes +fixing +fixings +fixture +fixture's +fixtures +flab +flabbier +flabbiness +flabby +flag +flag's +flagged +flagging +flaggingly +flagrant +flagrantly +flags +flagship +flagship's +flagships +flake +flaked +flaker +flakes +flaking +flame +flamed +flamer +flamers +flames +flaming +flamingly +flammable +flammables +flank +flanked +flanker +flankers +flanking +flanks +flannel +flannel's +flannels +flap +flap's +flapping +flaps +flare +flared +flares +flaring +flaringly +flash +flashed +flasher +flashers +flashes +flashing +flashlight +flashlight's +flashlights +flask +flat +flatly +flatness +flatnesses +flats +flatten +flattened +flattener +flattening +flattens +flatter +flattered +flatterer +flattering +flatteringly +flatters +flattery +flattest +flaunt +flaunted +flaunting +flauntingly +flaunts +flaw +flawed +flawing +flawless +flawlessly +flawlessness +flaws +flax +flaxen +flea +flea's +fleas +fled +fledged +fledgling +fledgling's +fledglings +flee +fleece +fleece's +fleeced +fleeces +fleecier +fleecy +fleeing +fleer +flees +fleet +fleetest +fleeting +fleetingly +fleetingness +fleetly +fleetness +fleets +flesh +fleshed +flesher +fleshes +fleshier +fleshiness +fleshing +fleshings +fleshly +fleshy +flew +flews +flexibilities +flexibility +flexible +flexibly +flick +flicked +flicker +flickered +flickering +flickeringly +flicking +flicks +flier +fliers +flies +flight +flight's +flights +flinch +flinched +flincher +flinches +flinching +fling +fling's +flinger +flinging +flings +flint +flints +flip +flips +flirt +flirted +flirter +flirting +flirts +flit +flits +float +floated +floater +floaters +floating +floats +flock +flocked +flocking +flocks +flood +flooded +flooder +flooding +floods +floor +floored +floorer +flooring +floorings +floors +flop +flop's +floppier +floppies +floppily +floppiness +floppy +floppy's +flops +flora +florin +floss +flossed +flosses +flossing +flounder +floundered +floundering +flounders +flour +floured +flourish +flourished +flourisher +flourishes +flourishing +flourishingly +flours +flow +flowchart +flowcharting +flowcharts +flowed +flower +flowered +flowerer +floweriness +flowering +flowers +flowery +flowing +flowingly +flown +flows +fluctuate +fluctuated +fluctuates +fluctuating +fluctuation +fluctuations +fluent +fluently +fluffier +fluffiest +fluffiness +fluffy +fluid +fluidity +fluidly +fluidness +fluids +flung +flunk +flunked +flunker +flunking +flunks +fluorescence +flurried +flurries +flurry +flurrying +flush +flushed +flushes +flushing +flushness +flute +flute's +fluted +fluter +flutes +fluting +flutter +fluttered +flutterer +fluttering +flutters +fly +flyable +flyer +flyer's +flyers +flying +foam +foamed +foamer +foaming +foams +focal +focally +foci +focus +focusable +focused +focuser +focuses +focusing +fodder +foe +foe's +foes +fog +fog's +fogged +foggier +foggiest +foggily +fogginess +fogging +foggy +fogs +foil +foiled +foiling +foils +fold +folded +folder +folders +folding +foldings +folds +foliage +foliaged +foliages +folk +folk's +folklore +folks +follies +follow +followed +follower +followers +following +followings +follows +folly +fond +fonder +fondest +fondle +fondled +fondler +fondles +fondling +fondly +fondness +fonds +font +font's +fonts +food +food's +foods +foodstuff +foodstuff's +foodstuffs +fool +fooled +fooling +foolish +foolishly +foolishness +foolproof +fools +foot +football +football's +footballed +footballer +footballers +footballs +footed +footer +footers +foothold +footholds +footing +footings +footman +footnote +footnote's +footnotes +footprint +footprint's +footprints +foots +footstep +footsteps +for +forage +foraged +forager +forages +foraging +foray +foray's +forayer +forays +forbade +forbear +forbear's +forbearance +forbearer +forbearing +forbears +forbid +forbidden +forbidding +forbiddingly +forbiddingness +forbids +force +force's +forced +forcedly +forcefield +forcefield's +forcefields +forceful +forcefully +forcefulness +forcer +forces +forcible +forcibleness +forcibly +forcing +ford +fords +fore +forearm +forearm's +forearmed +forearms +foreboding +forebodingly +forebodingness +forebodings +forecast +forecasted +forecaster +forecasters +forecasting +forecastle +forecastles +forecasts +forefather +forefather's +forefathers +forefinger +forefinger's +forefingers +forego +foregoer +foregoes +foregoing +foregone +foreground +foregrounds +forehead +forehead's +foreheads +foreign +foreigner +foreigners +foreignly +foreignness +foreigns +foreman +foremost +forenoon +foresee +foreseeable +foreseen +foreseer +foresees +foresight +foresighted +foresightedly +foresightedness +forest +forestall +forestalled +forestaller +forestalling +forestallment +forestalls +forested +forester +foresters +forests +foretell +foreteller +foretelling +foretells +forethought +forethought's +foretold +forever +foreverness +forewarn +forewarned +forewarner +forewarning +forewarnings +forewarns +forfeit +forfeited +forfeiter +forfeiters +forfeiting +forfeits +forgave +forge +forged +forger +forgeries +forgers +forgery +forgery's +forges +forget +forgetful +forgetfully +forgetfulness +forgetive +forgets +forgettable +forgettably +forgetting +forging +forgivable +forgivably +forgive +forgiven +forgiveness +forgiver +forgives +forgiving +forgivingly +forgivingness +forgot +forgotten +fork +forked +forker +forking +forks +forlorn +forlornly +forlornness +form +formal +formalism +formalism's +formalisms +formalities +formality +formally +formalness +formals +formant +formants +format +formated +formating +formation +formation's +formations +formative +formatively +formativeness +formats +formatted +formatter +formatter's +formatters +formatting +formed +former +formerly +formers +formidable +formidableness +forming +forms +formula +formula's +formulae +formulas +formulate +formulated +formulates +formulating +formulation +formulations +formulator +formulator's +formulators +fornication +forsake +forsaken +forsakes +forsaking +fort +fort's +forte +fortes +forth +forthcoming +forthwith +fortier +forties +fortieth +fortification +fortifications +fortified +fortifier +fortifies +fortify +fortifying +fortitude +fortnight +fortnightly +fortress +fortress's +fortresses +forts +fortuitous +fortuitously +fortuitousness +fortunate +fortunately +fortunateness +fortunates +fortune +fortune's +fortuned +fortunes +fortuning +forty +forum +forum's +forums +forward +forwarded +forwarder +forwarders +forwarding +forwardly +forwardness +forwards +fossil +fossils +foster +fostered +fosterer +fostering +fosters +fought +foul +fouled +fouler +foulest +fouling +foully +foulness +fouls +found +foundation +foundation's +foundations +founded +founder +foundered +foundering +founders +founding +foundries +foundry +foundry's +founds +fount +fount's +fountain +fountain's +fountains +founts +four +fours +fourscore +fourteen +fourteener +fourteens +fourteenth +fourth +fourthly +fowl +fowler +fowling +fowls +fox +fox's +foxed +foxes +foxing +fractal +fractal's +fractals +fraction +fraction's +fractional +fractionally +fractioned +fractioning +fractions +fracture +fractured +fractures +fracturing +fragile +fragilely +fragment +fragmentariness +fragmentary +fragmentation +fragmented +fragmenting +fragments +fragrance +fragrance's +fragrances +fragrant +fragrantly +frail +frailer +frailest +frailly +frailness +frailties +frailty +frame +frame's +framed +framer +framers +frames +framework +framework's +frameworks +framing +framings +franc +franchise +franchise's +franchised +franchiser +franchises +franchising +francs +frank +franked +franker +frankest +franking +frankly +frankness +franks +frantic +frantically +franticly +franticness +fraternal +fraternally +fraternities +fraternity +fraternity's +fraud +fraud's +frauds +fraudulently +fraught +fraughted +fraughting +fraughts +fray +frayed +fraying +frays +freak +freak's +freaks +freckle +freckled +freckles +freckling +free +freed +freedom +freedom's +freedoms +freeing +freeings +freely +freeman +freeness +freer +frees +freest +freeway +freeway's +freeways +freeze +freezer +freezers +freezes +freezing +freight +freighted +freighter +freighters +freighting +freights +frenzied +frenziedly +frenzies +frenzy +frenzying +frequencies +frequency +frequent +frequented +frequenter +frequenters +frequenting +frequently +frequentness +frequents +fresh +freshen +freshened +freshener +fresheners +freshening +freshens +fresher +freshers +freshest +freshly +freshman +freshmen +freshness +fret +fretful +fretfully +fretfulness +frets +friar +friar's +friarly +friars +frication +fricative +fricatives +friction +friction's +frictionless +frictionlessly +frictions +fried +friend +friend's +friendless +friendlessness +friendlier +friendlies +friendliest +friendliness +friendly +friends +friendship +friendship's +friendships +frier +fries +frieze +frieze's +friezes +frigate +frigate's +frigates +fright +frighten +frightened +frightening +frighteningly +frightens +frightful +frightfully +frightfulness +frill +frill's +frilled +frills +fringe +fringed +fringes +fringing +frisk +frisked +frisker +frisking +frisks +frivolous +frivolously +frivolousness +frock +frock's +frocked +frocking +frocks +frog +frog's +frogs +frolic +frolics +from +front +fronted +frontier +frontier's +frontiers +fronting +fronts +frost +frosted +frostier +frostiness +frosting +frosts +frosty +froth +frothing +frown +frowned +frowner +frowning +frowningly +frowns +froze +frozen +frozenly +frozenness +frugal +frugally +fruit +fruit's +fruited +fruiter +fruiterer +fruitful +fruitfully +fruitfulness +fruition +fruitless +fruitlessly +fruitlessness +fruits +frustrate +frustrated +frustrater +frustrates +frustrating +frustratingly +frustration +frustrations +fry +frying +fuel +fuels +fugitive +fugitive's +fugitively +fugitiveness +fugitives +fulfilled +fulfiller +fulfilling +full +fuller +fullest +fullness +fullword +fullword's +fullwords +fully +fumble +fumbled +fumbler +fumbles +fumbling +fumblingly +fume +fumed +fumes +fuming +fun +function +function's +functional +functionalities +functionality +functionally +functionals +functioned +functioning +functions +functor +functor's +functors +fund +fundamental +fundamentalist +fundamentalist's +fundamentalists +fundamentally +fundamentals +funded +funder +funders +funding +funds +funeral +funeral's +funerals +fungus +funguses +funnel +funnels +funnier +funnies +funniest +funnily +funniness +funny +fur +fur's +furies +furious +furiouser +furiously +furiousness +furnace +furnace's +furnaced +furnaces +furnacing +furness +furnish +furnished +furnisher +furnishers +furnishes +furnishing +furnishings +furniture +furrow +furrowed +furrowing +furrows +furs +further +furthered +furtherer +furtherest +furthering +furthermore +furthers +furtive +furtively +furtiveness +fury +fury's +fuse +fused +fuses +fusing +fusion +fusions +fuss +fusser +fussing +futile +futilely +futileness +futility +future +future's +futures +fuzzier +fuzziest +fuzziness +fuzzy +gabardine +gabardines +gable +gabled +gabler +gables +gad +gadget +gadget's +gadgets +gag +gaged +gager +gagged +gagging +gaging +gags +gaieties +gaiety +gaily +gain +gained +gainer +gainers +gaining +gainings +gainly +gains +gait +gaited +gaiter +gaiters +gaits +galaxies +galaxy +galaxy's +gale +gales +gall +gallant +gallantly +gallantry +gallants +galled +galleried +galleries +gallery +galley +galley's +galleys +galling +gallingly +gallon +gallon's +gallons +gallop +galloped +galloper +gallopers +galloping +gallops +gallows +gallowses +galls +gamble +gambled +gambler +gamblers +gambles +gambling +game +gamed +gamely +gameness +games +gaming +gamma +gammas +gang +gang's +ganger +ganglier +gangly +gangrene +gangrened +gangrenes +gangrening +gangs +gangster +gangster's +gangsters +gap +gap's +gape +gaped +gaper +gapes +gaping +gapingly +gaps +garage +garaged +garages +garaging +garb +garbage +garbage's +garbaged +garbages +garbaging +garbed +garble +garbled +garbler +garbles +garbling +garden +gardened +gardener +gardeners +gardening +gardens +gargle +gargled +gargles +gargling +garland +garlanded +garlands +garlic +garlics +garment +garment's +garmented +garmenting +garments +garner +garnered +garnering +garners +garnish +garnished +garnishes +garrison +garrisoned +garrisoning +garrisons +garter +garter's +gartered +gartering +garters +gas +gas's +gaseous +gaseously +gaseousness +gases +gash +gash's +gashed +gashes +gashing +gasoline +gasolines +gasp +gasped +gasper +gaspers +gasping +gaspingly +gasps +gassed +gasser +gassers +gassing +gassings +gastric +gastrointestinal +gate +gated +gates +gateway +gateway's +gateways +gather +gathered +gatherer +gatherers +gathering +gatherings +gathers +gating +gaudier +gaudies +gaudiness +gaudy +gauge +gauged +gauger +gauges +gauging +gaunt +gauntly +gauntness +gauze +gauzed +gauzes +gauzing +gave +gay +gayer +gayest +gayly +gayness +gaze +gazed +gazer +gazers +gazes +gazing +gear +geared +gearing +gears +geese +gel +gel's +gelatin +gelled +gelling +gels +gem +gem's +gems +gender +gender's +gendered +gendering +genders +gene +gene's +general +general's +generalist +generalist's +generalists +generalities +generality +generally +generalness +generals +generate +generated +generates +generating +generation +generations +generative +generatively +generator +generator's +generators +generic +generically +genericness +generosities +generosity +generosity's +generous +generously +generousness +genes +genetic +genetically +genetics +genial +genially +genialness +genius +genius's +geniuses +genre +genre's +genres +genteel +genteeler +genteelest +genteelly +genteelness +gentle +gentled +gentleman +gentlemanliness +gentlemanly +gentleness +gentler +gentlest +gentlewoman +gentling +gently +gentries +gentry +genuine +genuinely +genuineness +genus +geographic +geographical +geographically +geographies +geography +geological +geologist +geologist's +geologists +geometric +geometries +geometry +geranium +germ +germ's +germane +germen +germinate +germinated +germinates +germinating +germination +germinations +germinative +germinatively +germs +gestalt +gesture +gestured +gestures +gesturing +get +gets +getter +getter's +gettered +getters +getting +ghastlier +ghastliness +ghastly +ghost +ghosted +ghosting +ghostlier +ghostliness +ghostlinesses +ghostly +ghosts +giant +giant's +giants +gibberish +giddied +giddier +giddiness +giddy +giddying +gift +gifted +giftedly +giftedness +gifts +gig +gig's +gigantic +giganticness +giggle +giggled +giggler +giggles +giggling +gigglingly +gigs +gild +gilded +gilder +gilding +gilds +gill +gill's +gilled +giller +gills +gilt +gimmick +gimmick's +gimmicks +gin +gin's +ginger +gingerbread +gingered +gingering +gingerliness +gingerly +gingham +ginghams +gins +giraffe +giraffe's +giraffes +gird +girded +girder +girder's +girders +girding +girdle +girdled +girdler +girdles +girdling +girds +girl +girl's +girlfriend +girlfriend's +girlfriends +girls +girt +girth +give +given +givenness +givens +giver +givers +gives +giveth +giving +givingly +gizmo +gizmo's +gizmos +glacial +glacially +glacier +glacier's +glaciers +glad +gladder +gladdest +glade +glades +gladly +gladness +glamour +glamoured +glamouring +glamours +glance +glanced +glances +glancing +glancingly +gland +gland's +glanders +glands +glare +glared +glares +glaring +glaringly +glaringness +glass +glassed +glasses +glassier +glassies +glassiness +glassy +glaze +glazed +glazer +glazers +glazes +glazing +gleam +gleamed +gleaming +gleams +glean +gleaned +gleaner +gleaning +gleanings +gleans +glee +gleed +gleeful +gleefully +gleefulness +glees +glen +glen's +glens +glide +glided +glider +gliders +glides +gliding +glimmer +glimmered +glimmering +glimmers +glimpse +glimpsed +glimpser +glimpsers +glimpses +glimpsing +glint +glinted +glinting +glints +glisten +glistened +glistening +glistens +glitch +glitch's +glitches +glitter +glittered +glittering +glitteringly +glitters +global +globally +globals +globe +globe's +globes +globing +globular +globularity +globularly +globularness +gloom +gloomier +gloomily +gloominess +glooms +gloomy +gloried +glories +glorification +glorifications +glorified +glorifier +glorifiers +glorifies +glorify +glorious +gloriously +gloriousness +glory +glorying +gloss +glossaries +glossary +glossary's +glossed +glosses +glossier +glossies +glossiness +glossing +glossy +glottal +glove +gloved +glover +glovers +gloves +gloving +glow +glowed +glower +glowered +glowering +glowers +glowing +glowingly +glows +glucose +glue +glued +gluer +gluers +glues +gluing +gnat +gnat's +gnats +gnaw +gnawed +gnawer +gnawing +gnaws +go +goad +goaded +goading +goads +goal +goal's +goals +goat +goat's +goatee +goatee's +goatees +goats +gobble +gobbled +gobbler +gobblers +gobbles +gobbling +goblet +goblet's +goblets +goblin +goblin's +goblins +god +god's +goddess +goddess's +goddesses +godlier +godlike +godlikeness +godliness +godly +godmother +godmother's +godmothers +gods +goer +goering +goes +going +goings +gold +golden +goldenly +goldenness +golding +golds +goldsmith +golf +golfer +golfers +golfing +golfs +gone +goner +gong +gong's +gongs +gonion +good +goodbye +goodbye's +goodbyes +goodie +goodie's +goodies +goodly +goodness +goods +goody +goody's +google +googles +googling +goose +gooses +goosing +gore +gored +gores +gorge +gorgeous +gorgeously +gorgeousness +gorger +gorges +gorging +gorilla +gorilla's +gorillas +goring +gosh +gospel +gospels +gossip +gossiper +gossipers +gossips +got +gotcha +gotcha's +gotchas +goth +goto +gotten +gouge +gouged +gouger +gouges +gouging +govern +governed +governess +governesses +governing +government +government's +governmental +governmentally +governments +governor +governor's +governors +governs +gown +gowned +gowns +grab +grabbed +grabber +grabber's +grabbers +grabbing +grabbings +grabs +grace +graced +graceful +gracefully +gracefulness +graces +gracing +gracious +graciously +graciousness +gradation +gradation's +gradations +grade +graded +gradely +grader +graders +grades +gradient +gradient's +gradients +grading +gradings +gradual +gradually +gradualness +graduate +graduated +graduates +graduating +graduation +graduations +graft +grafted +grafter +grafting +grafts +graham +graham's +grahams +grain +grained +grainer +graining +grains +grammar +grammar's +grammars +grammatical +grammatically +grammaticalness +granaries +granary +granary's +grand +grander +grandest +grandeur +grandfather +grandfather's +grandfatherly +grandfathers +grandiose +grandiosely +grandioseness +grandkid +grandkid's +grandkids +grandly +grandma +grandma's +grandmother +grandmother's +grandmotherly +grandmothers +grandness +grandpa +grandpa's +grandparent +grandparents +grandpas +grands +grandson +grandson's +grandsons +grange +granger +granges +granite +grannies +granny +grant +grant's +granted +granter +granting +grants +granularity +granulate +granulated +granulates +granulating +granulation +granulations +granulative +grape +grape's +grapes +grapevine +grapevine's +grapevines +graph +graph's +graphed +graphic +graphical +graphically +graphicness +graphics +graphing +graphite +graphs +grapple +grappled +grappler +grapples +grappling +grasp +graspable +grasped +grasper +grasping +graspingly +graspingness +grasps +grass +grassed +grassers +grasses +grassier +grassiest +grassing +grassy +grate +grated +grateful +gratefully +gratefulness +grater +grates +gratification +gratifications +gratified +gratify +gratifying +gratifyingly +grating +gratingly +gratings +gratitude +gratuities +gratuitous +gratuitously +gratuitousness +gratuity +gratuity's +grave +gravel +gravelly +gravels +gravely +graveness +graver +gravers +graves +gravest +gravies +graving +gravitation +gravitational +gravitationally +gravities +gravity +gravy +gray +grayed +grayer +grayest +graying +grayly +grayness +grays +graze +grazed +grazer +grazes +grazing +grease +greased +greaser +greasers +greases +greasier +greasiness +greasing +greasy +great +greaten +greatened +greatening +greater +greatest +greatly +greatness +greats +greed +greedier +greedily +greediness +greedy +green +greened +greener +greenest +greenhouse +greenhouse's +greenhouses +greening +greenish +greenishness +greenly +greenness +greens +greet +greeted +greeter +greeting +greetings +greets +grenade +grenade's +grenades +grew +grey +greyest +greying +grid +grid's +grids +grief +grief's +griefs +grievance +grievance's +grievances +grieve +grieved +griever +grievers +grieves +grieving +grievingly +grievous +grievously +grievousness +grill +grilled +griller +grilling +grills +grim +grimed +griming +grimly +grimness +grin +grind +grinder +grinders +grinding +grindingly +grindings +grinds +grindstone +grindstone's +grindstones +grins +grip +gripe +griped +griper +gripes +griping +gripped +gripper +gripper's +grippers +gripping +grippingly +grips +grit +grit's +grits +grizzlier +grizzly +groan +groaned +groaner +groaners +groaning +groans +grocer +grocer's +groceries +grocers +grocery +groom +groom's +groomed +groomer +grooming +grooms +groove +grooved +groover +grooves +grooving +grope +groped +groper +gropes +groping +gross +grossed +grosser +grosses +grossest +grossing +grossly +grossness +grotesque +grotesquely +grotesqueness +grotto +grotto's +grottos +ground +grounded +grounder +grounders +grounding +grounds +groundwork +group +group's +grouped +grouper +grouping +groupings +groups +grouse +groused +grouser +grouses +grousing +grove +grovel +grovels +grover +grovers +groves +grow +grower +growers +growing +growingly +growl +growled +growler +growlier +growliness +growling +growlingly +growls +growly +grown +grownup +grownup's +grownups +grows +growth +growths +grub +grub's +grubs +grudge +grudge's +grudged +grudger +grudges +grudging +grudgingly +gruesome +gruesomely +gruesomeness +gruff +gruffly +gruffness +grumble +grumbled +grumbler +grumbles +grumbling +grumblingly +grunt +grunted +grunter +grunting +grunts +guarantee +guaranteed +guaranteeing +guaranteer +guaranteers +guarantees +guaranty +guard +guarded +guardedly +guardedness +guarder +guardian +guardian's +guardians +guardianship +guarding +guards +guerrilla +guerrilla's +guerrillas +guess +guessed +guesser +guesses +guessing +guest +guest's +guested +guesting +guests +guidance +guidances +guide +guidebook +guidebook's +guidebooks +guided +guideline +guideline's +guidelines +guider +guides +guiding +guild +guilder +guile +guilt +guiltier +guiltiest +guiltily +guiltiness +guiltless +guiltlessly +guiltlessness +guilts +guilty +guinea +guineas +guise +guise's +guised +guises +guising +guitar +guitar's +guitars +gulch +gulch's +gulches +gulf +gulf's +gulfs +gull +gulled +gullibility +gullied +gullies +gulling +gulls +gully +gully's +gullying +gulp +gulped +gulper +gulps +gum +gum's +gums +gun +gun's +gunfire +gunfires +gunned +gunner +gunner's +gunners +gunning +gunpowder +gunpowders +guns +gurgle +gurgled +gurgles +gurgling +guru +guru's +gurus +gush +gushed +gusher +gushes +gushing +gust +gust's +gusts +gut +guts +gutser +gutter +guttered +guttering +gutters +guy +guy's +guyed +guyer +guyers +guying +guys +gym +gymnasium +gymnasium's +gymnasiums +gymnast +gymnast's +gymnastic +gymnastics +gymnasts +gyms +gypsied +gypsies +gypsy +gypsy's +gypsying +gyration +gyrations +gyroscope +gyroscope's +gyroscopes +ha +habit +habit's +habitable +habitableness +habitat +habitat's +habitation +habitation's +habitations +habitats +habits +habitual +habitually +habitualness +hack +hacked +hacker +hacker's +hackers +hacking +hacks +had +hadn't +hag +hagen +haggard +haggardly +haggardness +hail +hailed +hailer +hailing +hails +hair +hair's +haircut +haircut's +haircuts +hairdresser +hairdresser's +hairdressers +haired +hairier +hairiness +hairless +hairlessness +hairs +hairy +hale +haler +half +halfness +halfway +halfword +halfword's +halfwords +haling +hall +hall's +haller +hallmark +hallmark's +hallmarked +hallmarking +hallmarks +hallow +hallowed +hallowing +hallows +halls +hallway +hallway's +hallways +halt +halted +halter +haltered +haltering +halters +halting +haltingly +halts +halve +halved +halvers +halves +halving +ham +ham's +hamburger +hamburger's +hamburgers +hamlet +hamlet's +hamlets +hammer +hammered +hammerer +hammering +hammers +hammock +hammock's +hammocks +hamper +hampered +hampering +hampers +hams +hand +handbag +handbag's +handbags +handbook +handbook's +handbooks +handcuff +handcuffed +handcuffing +handcuffs +handed +handedly +handedness +hander +handers +handful +handfuls +handicap +handicap's +handicapped +handicaps +handier +handiest +handily +handiness +handing +handiwork +handkerchief +handkerchief's +handkerchiefs +handle +handled +handler +handlers +handles +handling +hands +handshake +handshake's +handshaker +handshakes +handshaking +handsome +handsomely +handsomeness +handsomer +handsomest +handwriting +handwritten +handy +hang +hangar +hangar's +hangars +hanged +hanger +hangers +hanging +hangover +hangover's +hangovers +hangs +hap +haphazard +haphazardly +haphazardness +hapless +haplessly +haplessness +haply +happen +happened +happening +happenings +happens +happier +happiest +happily +happiness +happy +harass +harassed +harasser +harasses +harassing +harassment +harassments +hard +harden +hardened +hardener +hardening +hardens +harder +hardest +hardier +hardiness +harding +hardings +hardly +hardness +hardnesses +hards +hardship +hardship's +hardships +hardware +hardwares +hardy +hare +hare's +hares +hark +harked +harken +harking +harks +harlot +harlot's +harlots +harm +harmed +harmer +harmful +harmfully +harmfulness +harming +harmless +harmlessly +harmlessness +harmonies +harmonious +harmoniously +harmoniousness +harmony +harms +harness +harnessed +harnesser +harnesses +harnessing +harp +harped +harper +harpers +harping +harpings +harps +harried +harrier +harrow +harrowed +harrower +harrowing +harrows +harry +harrying +harsh +harshen +harshened +harshening +harsher +harshest +harshly +harshness +hart +harvest +harvested +harvester +harvesters +harvesting +harvests +has +hash +hashed +hasher +hashes +hashing +hasn't +hassle +hassled +hassler +hassles +hassling +haste +hasted +hasten +hastened +hastener +hastening +hastens +hastes +hastier +hastiest +hastily +hastiness +hasting +hastings +hasty +hat +hat's +hatch +hatched +hatcher +hatcheries +hatchery +hatchery's +hatches +hatchet +hatchet's +hatchets +hatching +hate +hated +hateful +hatefully +hatefulness +hater +hates +hath +hating +hatred +hats +haughtier +haughtily +haughtiness +haughty +haul +hauled +hauler +haulers +hauling +hauls +haunch +haunch's +haunches +haunt +haunted +haunter +haunting +hauntingly +haunts +have +haven +haven's +haven't +havens +haver +havering +havers +haves +having +havoc +havocs +hawk +hawked +hawker +hawkers +hawking +hawks +hay +hayer +haying +hays +hazard +hazard's +hazarded +hazarding +hazardous +hazardously +hazardousness +hazards +haze +haze's +hazed +hazel +hazer +hazes +hazier +haziest +haziness +hazing +hazy +he +he'd +he'll +he's +head +head's +headache +headache's +headaches +headed +header +headers +headgear +heading +heading's +headings +headland +headland's +headlands +headline +headlined +headliner +headlines +headlining +headlong +headphone +headphone's +headphones +headquarters +heads +headway +heal +healed +healer +healers +healing +heals +health +healthful +healthfully +healthfulness +healthier +healthiest +healthily +healthiness +healthy +heap +heaped +heaping +heaps +hear +heard +hearer +hearers +hearest +hearing +hearings +hearken +hearkened +hearkening +hears +hearsay +hearses +hearsing +heart +heart's +heartache +heartache's +heartaches +hearted +heartedly +hearten +heartened +heartening +hearteningly +heartens +hearth +heartier +hearties +heartiest +heartily +heartiness +heartless +heartlessly +heartlessness +hearts +hearty +heat +heatable +heated +heatedly +heater +heaters +heath +heathen +heather +heating +heats +heave +heaved +heaven +heaven's +heavenliness +heavenly +heavens +heaver +heavers +heaves +heavier +heavies +heaviest +heavily +heaviness +heaving +heavy +hedge +hedged +hedgehog +hedgehog's +hedgehogs +hedger +hedges +hedging +hedgingly +heed +heeded +heeding +heedless +heedlessly +heedlessness +heeds +heel +heeled +heeler +heelers +heeling +heels +heifer +height +heighten +heightened +heightening +heightens +heights +heinous +heinously +heinousness +heir +heir's +heiress +heiress's +heiresses +heirs +held +hell +hell's +heller +hello +hellos +hells +helm +helmet +helmet's +helmeted +helmets +help +helped +helper +helpers +helpful +helpfully +helpfulness +helping +helpless +helplessly +helplessness +helps +hem +hem's +hemisphere +hemisphere's +hemisphered +hemispheres +hemlock +hemlock's +hemlocks +hemostat +hemostats +hemp +hempen +hems +hen +hen's +hence +henceforth +henchman +henchmen +hens +her +herald +heralded +heralding +heralds +herb +herb's +herbivore +herbivorous +herbivorously +herbs +herd +herded +herder +herding +herds +here +here's +hereabout +hereabouts +hereafter +hereby +hereditary +heredity +herein +hereinafter +heres +heresy +heretic +heretic's +heretics +heretofore +herewith +heritage +heritages +hermit +hermit's +hermits +hero +hero's +heroes +heroic +heroically +heroics +heroin +heroine +heroine's +heroines +heroism +heron +heron's +herons +heros +herring +herring's +herrings +hers +herself +hesitant +hesitantly +hesitate +hesitated +hesitater +hesitates +hesitating +hesitatingly +hesitation +hesitations +heterogeneous +heterogeneously +heterogeneousness +heuristic +heuristic's +heuristically +heuristics +hew +hewed +hewer +hewing +hews +hex +hexadecimal +hexagonal +hexagonally +hexer +hey +hickories +hickory +hid +hidden +hide +hided +hideous +hideously +hideousness +hideout +hideout's +hideouts +hider +hides +hiding +hierarchical +hierarchically +hierarchies +hierarchy +hierarchy's +high +higher +highest +highland +highlander +highlands +highlight +highlighted +highlighting +highlights +highly +highness +highness's +highnesses +highway +highway's +highways +hijack +hijacked +hijacker +hijackers +hijacking +hijacks +hike +hiked +hiker +hikers +hikes +hiking +hilarious +hilariously +hilariousness +hill +hill's +hilled +hiller +hilling +hillock +hillocks +hills +hillside +hilltop +hilltop's +hilltops +hilt +hilt's +hilts +him +hims +himself +hind +hinder +hindered +hinderer +hindering +hinders +hindrance +hindrances +hinds +hindsight +hinge +hinged +hinger +hinges +hinging +hint +hinted +hinter +hinting +hints +hip +hip's +hipness +hips +hire +hired +hirer +hirers +hires +hiring +hirings +his +hiss +hissed +hisser +hisses +hissing +histogram +histogram's +histograms +historian +historian's +historians +historic +historical +historically +historicalness +histories +history +history's +hit +hit's +hitch +hitched +hitcher +hitches +hitchhike +hitchhiked +hitchhiker +hitchhikers +hitchhikes +hitchhiking +hitching +hither +hitherto +hits +hitter +hitter's +hitters +hitting +hive +hives +hiving +hoar +hoard +hoarded +hoarder +hoarding +hoards +hoarier +hoariness +hoarse +hoarsely +hoarseness +hoarser +hoarsest +hoary +hoax +hoax's +hoaxed +hoaxer +hoaxes +hoaxing +hobbies +hobble +hobbled +hobbler +hobbles +hobbling +hobby +hobby's +hobbyist +hobbyist's +hobbyists +hockey +hoe +hoe's +hoer +hoes +hog +hog's +hogs +hoist +hoisted +hoister +hoisting +hoists +hold +holden +holder +holders +holding +holdings +holds +hole +hole's +holed +holes +holiday +holiday's +holidayer +holidays +holier +holies +holiness +holing +holistic +hollies +hollow +hollowed +hollower +hollowest +hollowing +hollowly +hollowness +hollows +holly +holocaust +hologram +hologram's +holograms +holy +homage +homaged +homager +homages +homaging +home +homebuilt +homed +homeless +homelessness +homelier +homeliness +homely +homemade +homemaker +homemaker's +homemakers +homeomorphic +homeomorphism +homeomorphism's +homeomorphisms +homer +homers +homes +homesick +homesickness +homespun +homestead +homesteader +homesteaders +homesteads +homeward +homewards +homework +homeworker +homeworkers +homing +homogeneities +homogeneity +homogeneity's +homogeneous +homogeneously +homogeneousness +homomorphic +homomorphism +homomorphism's +homomorphisms +hone +honed +honer +hones +honest +honestly +honesty +honey +honeycomb +honeycombed +honeyed +honeying +honeymoon +honeymooned +honeymooner +honeymooners +honeymooning +honeymoons +honeys +honeysuckle +honing +honorary +hood +hood's +hooded +hoodedness +hooding +hoods +hoodwink +hoodwinked +hoodwinker +hoodwinking +hoodwinks +hoof +hoof's +hoofed +hoofer +hoofs +hook +hooked +hookedness +hooker +hookers +hooking +hooks +hoop +hooped +hooper +hooping +hoops +hooray +hooray's +hoorays +hoot +hooted +hooter +hooters +hooting +hoots +hop +hope +hoped +hopeful +hopefully +hopefulness +hopefuls +hopeless +hopelessly +hopelessness +hoper +hopes +hoping +hopped +hopper +hopper's +hoppers +hopping +hops +horde +horde's +hordes +horizon +horizon's +horizons +horizontal +horizontally +hormone +hormone's +hormones +horn +horned +hornedness +hornet +hornet's +hornets +horns +horrendous +horrendously +horrible +horribleness +horribly +horrid +horridly +horridness +horrified +horrifies +horrify +horrifying +horrifyingly +horror +horror's +horrors +horse +horse's +horseback +horsely +horseman +horsepower +horsepowers +horses +horseshoe +horseshoer +horseshoes +horsing +hose +hose's +hosed +hoses +hosing +hospitable +hospitably +hospital +hospital's +hospitality +hospitals +host +host's +hostage +hostage's +hostages +hosted +hostess +hostess's +hostesses +hostile +hostilely +hostilities +hostility +hosting +hostly +hosts +hot +hotel +hotel's +hotels +hotly +hotness +hotter +hottest +hound +hounded +hounder +hounding +hounds +hour +hour's +hourly +hours +house +house's +housed +houseflies +housefly +housefly's +household +household's +householder +householders +households +housekeeper +housekeeper's +housekeepers +housekeeping +houser +houses +housetop +housetop's +housetops +housewife +housewife's +housewifeliness +housewifely +housework +houseworker +houseworkers +housing +housings +hovel +hovel's +hovels +hover +hovered +hoverer +hovering +hovers +how +how's +however +howl +howled +howler +howling +howls +hows +hrs +hub +hub's +hubris +hubs +huddle +huddled +huddler +huddles +huddling +hue +hue's +hued +hues +hug +huge +hugely +hugeness +huger +hugest +hugs +huh +hull +hull's +hulled +huller +hulling +hulls +hum +human +humane +humanely +humaneness +humanities +humanity +humanity's +humanly +humanness +humans +humble +humbled +humbleness +humbler +humbles +humblest +humbling +humbly +humid +humidification +humidifications +humidified +humidifier +humidifiers +humidifies +humidify +humidifying +humidities +humidity +humidly +humiliate +humiliated +humiliates +humiliating +humiliatingly +humiliation +humiliations +humility +hummed +humming +humorous +humorously +humorousness +hump +humped +humping +humps +hums +hunch +hunched +hunches +hundred +hundreds +hundredth +hung +hunger +hungered +hungering +hungers +hungrier +hungriest +hungrily +hungriness +hungry +hunk +hunk's +hunker +hunkered +hunkering +hunkers +hunks +hunt +hunted +hunter +hunters +hunting +hunts +huntsman +hurdle +hurdled +hurdler +hurdles +hurdling +hurl +hurled +hurler +hurlers +hurling +hurrah +hurricane +hurricane's +hurricanes +hurried +hurriedly +hurriedness +hurrier +hurries +hurry +hurrying +hurt +hurter +hurting +hurtingly +hurts +husband +husband's +husbander +husbandly +husbandry +husbands +hush +hushed +hushes +hushing +husk +husked +husker +huskier +huskies +huskiness +husking +husks +husky +hustle +hustled +hustler +hustlers +hustles +hustling +hut +hut's +huts +hyacinth +hybrid +hybrids +hydraulic +hydraulically +hydraulics +hydrodynamic +hydrodynamics +hydrogen +hydrogen's +hydrogens +hygiene +hymn +hymn's +hymning +hymns +hype +hype's +hyped +hyper +hyperbolic +hypertext +hypertext's +hypes +hyphen +hyphen's +hyphened +hyphening +hyphens +hypocrisies +hypocrisy +hypocrite +hypocrite's +hypocrites +hypodermic +hypodermics +hypotheses +hypothesis +hypothetical +hypothetically +hysteresis +hysterical +hysterically +ice +iceberg +iceberg's +icebergs +iced +ices +icier +iciest +iciness +icing +icings +icon +icon's +icons +icy +id +id's +idea +idea's +ideal +idealism +idealistic +ideally +ideals +ideas +identical +identically +identicalness +identifiable +identifiably +identification +identifications +identified +identifier +identifiers +identifies +identify +identifying +identities +identity +identity's +ideological +ideologically +ideologies +ideology +idiocies +idiocy +idiosyncrasies +idiosyncrasy +idiosyncrasy's +idiosyncratic +idiot +idiot's +idiotic +idiots +idle +idled +idleness +idler +idlers +idles +idlest +idling +idly +idol +idol's +idolatry +idols +if +ignition +ignoble +ignobleness +ignorance +ignorant +ignorantly +ignorantness +ignore +ignored +ignorer +ignores +ignoring +ii +iii +ill +illegal +illegalities +illegality +illegally +illicit +illicitly +illiterate +illiterately +illiterateness +illiterates +illness +illness's +illnesses +illogical +illogically +illogicalness +ills +illuminate +illuminated +illuminates +illuminating +illuminatingly +illumination +illuminations +illuminative +illusion +illusion's +illusions +illusive +illusively +illusiveness +illustrate +illustrated +illustrates +illustrating +illustration +illustrations +illustrative +illustratively +illustrator +illustrator's +illustrators +illustrious +illustriously +illustriousness +illy +image +imaged +images +imaginable +imaginableness +imaginably +imaginariness +imaginary +imagination +imagination's +imaginations +imaginative +imaginatively +imaginativeness +imagine +imagined +imaginer +imagines +imaging +imagining +imaginings +imbalance +imbalances +imitate +imitated +imitates +imitating +imitation +imitations +imitative +imitatively +imitativeness +immaculate +immaculately +immaculateness +immaterial +immaterially +immaterialness +immature +immaturely +immatureness +immaturity +immediacies +immediacy +immediate +immediately +immediateness +immemorial +immemorially +immense +immensely +immenseness +immerse +immersed +immerser +immerses +immersing +immersion +immersions +immigrant +immigrant's +immigrants +immigrate +immigrated +immigrates +immigrating +immigration +imminent +imminently +imminentness +immoral +immoralities +immorality +immorally +immortal +immortality +immortally +immortals +immovability +immovable +immovableness +immovably +immune +immunities +immunity +immunity's +immunology +immutable +immutableness +imp +imp's +impact +impacted +impacter +impacting +impaction +impactions +impactive +impactor +impactor's +impactors +impacts +impair +impaired +impairer +impairing +impairs +impart +imparted +impartial +impartially +imparting +imparts +impasse +impasses +impassion +impassioned +impassioning +impassions +impassive +impassively +impassiveness +impatience +impatient +impatiently +impeach +impeached +impeaches +impeaching +impedance +impedance's +impedances +impede +impeded +impeder +impedes +impediment +impediment's +impediments +impeding +impel +impels +impending +impenetrability +impenetrable +impenetrableness +impenetrably +imperative +imperatively +imperativeness +imperatives +imperfect +imperfection +imperfection's +imperfections +imperfective +imperfectly +imperfectness +imperial +imperialism +imperialist +imperialist's +imperialists +imperially +imperil +imperious +imperiously +imperiousness +impermanence +impermanent +impermanently +impermissible +impersonal +impersonally +impersonate +impersonated +impersonates +impersonating +impersonation +impersonations +impertinent +impertinently +imperturbability +impervious +imperviously +imperviousness +impetuous +impetuously +impetuousness +impetus +impinge +impinged +impinges +impinging +impious +impiously +implant +implanted +implanter +implanting +implants +implausible +implement +implementable +implementation +implementation's +implementations +implemented +implementer +implementers +implementing +implementor +implementor's +implementors +implements +implicant +implicant's +implicants +implicate +implicated +implicates +implicating +implication +implications +implicative +implicatively +implicativeness +implicit +implicitly +implicitness +implied +implies +implore +implored +implores +imploring +imply +implying +import +importance +important +importantly +importation +importations +imported +importer +importers +importing +imports +impose +imposed +imposer +imposes +imposing +imposingly +imposition +imposition's +impositions +impossibilities +impossibility +impossible +impossibleness +impossibles +impossibly +impostor +impostor's +impostors +impotence +impotent +impotently +impoverish +impoverished +impoverisher +impoverishes +impoverishing +impoverishment +impracticable +impracticableness +impractical +impracticality +impractically +impracticalness +imprecise +imprecisely +impreciseness +imprecision +impregnable +impregnableness +impress +impressed +impresser +impresses +impressing +impression +impression's +impressionable +impressionableness +impressionist +impressionistic +impressionists +impressions +impressive +impressively +impressiveness +impressment +imprint +imprinted +imprinting +imprints +imprison +imprisoned +imprisoning +imprisonment +imprisonment's +imprisonments +imprisons +improbable +improbableness +impromptu +improper +improperly +improperness +improve +improved +improvement +improvements +improver +improves +improving +improvisation +improvisation's +improvisational +improvisations +improvise +improvised +improviser +improvisers +improvises +improvising +imps +impudent +impudently +impulse +impulsed +impulses +impulsing +impulsion +impulsions +impulsive +impulsively +impulsiveness +impunity +impure +impurely +impureness +impurities +impurity +impurity's +impute +imputed +imputes +imputing +in +inabilities +inability +inaccessibility +inaccessible +inaccessibly +inaccuracies +inaccuracy +inaccurate +inaccurately +inactions +inactivation +inactive +inactively +inactivity +inadequacies +inadequacy +inadequate +inadequately +inadequateness +inadmissibility +inadmissible +inadvertent +inadvertently +inadvisability +inadvisable +inalterable +inalterableness +inane +inanely +inaneness +inaner +inanest +inanimate +inanimately +inanimateness +inapparently +inapplicability +inapplicable +inappreciable +inappreciably +inappreciative +inappreciatively +inappreciativeness +inapproachable +inappropriate +inappropriately +inappropriateness +inapt +inaptly +inaptness +inarguable +inarguably +inarticulable +inartistic +inartistically +inasmuch +inattentive +inattentively +inattentiveness +inaudible +inaudibly +inaugural +inaugurate +inaugurated +inaugurating +inauguration +inaugurations +inauspicious +inauspiciously +inauspiciousness +inauthentic +inauthenticity +inboards +inborn +inbounds +inbred +inbuilt +incantation +incantations +incapable +incapableness +incapably +incapacitating +incarnation +incarnation's +incarnations +incautious +incautiously +incautiousness +incendiaries +incendiary +incense +incensed +incenses +incensing +incentive +incentive's +incentively +incentives +inception +inceptions +incessant +incessantly +inch +inched +inches +inching +incidence +incidences +incident +incident's +incidental +incidentally +incidentals +incidents +incipient +incipiently +incision +incision's +incisions +incitations +incite +incited +inciter +incites +inciting +incivility +inclination +inclination's +inclinations +incline +inclined +incliner +inclines +inclining +inclose +inclosed +incloses +inclosing +include +included +includes +including +inclusion +inclusion's +inclusions +inclusive +inclusively +inclusiveness +incoherence +incoherences +incoherent +incoherently +income +incomer +incomers +incomes +incoming +incommensurate +incomparability +incomparable +incomparably +incompatibilities +incompatibility +incompatibility's +incompatible +incompatibly +incompetence +incompetent +incompetent's +incompetently +incompetents +incomplete +incompletely +incompleteness +incompletion +incomprehensibility +incomprehensible +incomprehensibleness +incomprehensibly +incomprehension +incompressible +incomputable +inconceivable +inconceivableness +inconceivably +inconclusive +inconclusively +inconclusiveness +inconformity +incongruence +incongruent +incongruently +inconsequential +inconsequentially +inconsequently +inconsiderable +inconsiderableness +inconsiderably +inconsiderate +inconsiderately +inconsiderateness +inconsideration +inconsistencies +inconsistency +inconsistency's +inconsistent +inconsistently +inconsolable +inconsolableness +inconspicuous +inconspicuously +inconspicuousness +inconstancy +inconstantly +incontestable +incontinently +incontrollable +inconvenience +inconvenienced +inconveniences +inconveniencing +inconvenient +inconveniently +inconvertibility +inconvertible +incorporate +incorporated +incorporates +incorporating +incorporation +incorporative +incorrect +incorrectly +incorrectness +incorruption +increase +increased +increaser +increases +increasing +increasingly +incredibility +incredible +incredibleness +incredibly +incredulity +incredulous +incredulously +increment +incremental +incrementally +incremented +incrementing +increments +incubate +incubated +incubates +incubating +incubation +incubative +incubator +incubator's +incubators +incur +incurable +incurableness +incurables +incurably +incurred +incurring +incurs +indebted +indebtedness +indecent +indecently +indecision +indecisive +indecisively +indecisiveness +indecomposable +indeed +indefinable +indefinableness +indefinite +indefinitely +indefiniteness +indemnity +indent +indentation +indentation's +indentations +indented +indenter +indenting +indents +independence +independent +independently +independents +indescribable +indescribableness +indeterminable +indeterminableness +indeterminacies +indeterminacy +indeterminacy's +indeterminate +indeterminately +indeterminateness +indetermination +indeterminism +indeterministic +index +indexable +indexed +indexer +indexers +indexes +indexing +indicate +indicated +indicates +indicating +indication +indications +indicative +indicatively +indicatives +indicator +indicator's +indicators +indices +indictment +indictment's +indictments +indifference +indifferent +indifferently +indigenous +indigenously +indigenousness +indigested +indigestible +indigestion +indignant +indignantly +indignation +indignities +indignity +indigo +indirect +indirected +indirecting +indirection +indirections +indirectly +indirectness +indirects +indiscernible +indiscipline +indisciplined +indiscreet +indiscreetly +indiscreetness +indiscriminate +indiscriminately +indiscriminateness +indiscriminating +indiscriminatingly +indiscrimination +indispensability +indispensable +indispensableness +indispensably +indisposed +indisposes +indistinct +indistinctive +indistinctly +indistinctness +indistinguishable +indistinguishableness +individual +individual's +individualistic +individuality +individually +individuals +indivisibility +indivisible +indivisibleness +indoctrinate +indoctrinated +indoctrinates +indoctrinating +indoctrination +indolent +indolently +indomitable +indomitableness +indoor +indoors +induce +induced +inducement +inducement's +inducements +inducer +induces +inducing +induct +inductance +inductances +inducted +inducting +induction +induction's +inductions +inductive +inductively +inductiveness +inductor +inductor's +inductors +inducts +indulge +indulged +indulgence +indulgence's +indulgences +indulger +indulges +indulging +industrial +industrialist +industrialist's +industrialists +industrially +industrials +industries +industrious +industriously +industriousness +industry +industry's +inedited +ineffective +ineffectively +ineffectiveness +inefficacy +inefficiencies +inefficiency +inefficient +inefficiently +inelastically +inelegant +inelegantly +ineloquent +ineloquently +inequalities +inequality +inequitably +inequities +inequity +inert +inertia +inertias +inertly +inertness +inescapable +inescapably +inessential +inestimable +inevitabilities +inevitability +inevitable +inevitableness +inevitably +inexact +inexactitude +inexactly +inexactness +inexcusable +inexcusableness +inexcusably +inexhaustible +inexhaustibleness +inexistent +inexorable +inexorableness +inexorably +inexpedient +inexpediently +inexpensive +inexpensively +inexpensiveness +inexperience +inexperienced +inexplainable +inexplicable +inexplicableness +inexplicably +inexpressibility +inexpressible +inexpressibleness +inexpressibly +inexpressive +inexpressively +inexpressiveness +inextensible +infallibility +infallible +infallibly +infamous +infamously +infancy +infant +infant's +infantry +infants +infeasible +infect +infected +infecting +infection +infection's +infections +infectious +infectiously +infectiousness +infective +infects +infer +inference +inference's +inferencer +inferences +inferencing +inferential +inferentially +inferior +inferior's +inferiority +inferiorly +inferiors +infernal +infernally +inferno +inferno's +infernos +inferred +inferring +infers +infertility +infest +infested +infester +infesting +infests +infidel +infidel's +infidelity +infidels +infields +infighter +infighter's +infighters +infighting +infiltrate +infiltrated +infiltrates +infiltrating +infiltration +infiltrative +infinite +infinitely +infiniteness +infinitesimal +infinitesimally +infinities +infinitive +infinitive's +infinitively +infinitives +infinitum +infinity +infirmity +infix +infix's +infixes +inflame +inflamed +inflamer +inflaming +inflammable +inflammableness +inflatable +inflate +inflated +inflater +inflates +inflating +inflation +inflationary +inflexibility +inflexible +inflexibleness +inflexibly +inflict +inflicted +inflicter +inflicting +inflictive +inflicts +inflows +influence +influenced +influencer +influences +influencing +influent +influential +influentially +influenza +inform +informal +informality +informally +informant +informant's +informants +information +informational +informations +informative +informatively +informativeness +informed +informer +informers +informing +informs +infractions +infrastructure +infrastructures +infrequent +infrequently +infringe +infringed +infringement +infringement's +infringements +infringer +infringes +infringing +infuriate +infuriated +infuriately +infuriates +infuriating +infuriatingly +infuriation +infuse +infused +infuser +infuses +infusing +infusion +infusions +ingenious +ingeniously +ingeniousness +ingenuity +inglorious +ingloriously +ingloriousness +ingot +ingrained +ingrainedly +ingrains +ingratitude +ingredient +ingredient's +ingredients +ingrown +ingrownness +ingrowth +ingrowths +inhabit +inhabitable +inhabitance +inhabitant +inhabitant's +inhabitants +inhabited +inhabiter +inhabiting +inhabits +inhale +inhaled +inhaler +inhales +inhaling +inharmonious +inharmoniously +inharmoniousness +inhere +inhered +inherent +inherently +inheres +inhering +inherit +inheritable +inheritableness +inheritance +inheritance's +inheritances +inherited +inheriting +inheritor +inheritor's +inheritors +inheritress +inheritress's +inheritresses +inheritrices +inheritrix +inherits +inhibit +inhibited +inhibiter +inhibiting +inhibition +inhibition's +inhibitions +inhibitive +inhibitors +inhibits +inholding +inholdings +inhomogeneities +inhomogeneity +inhospitable +inhospitableness +inhospitably +inhospitality +inhuman +inhumane +inhumanely +inhumanities +inhumanly +inhumanness +inion +iniquities +iniquity +iniquity's +initial +initialness +initials +initiate +initiated +initiates +initiating +initiation +initiations +initiative +initiative's +initiatives +initiator +initiator's +initiators +inject +injected +injecting +injection +injection's +injections +injective +injects +injudicious +injudiciously +injudiciousness +injunction +injunction's +injunctions +injure +injured +injurer +injures +injuries +injuring +injurious +injuriously +injuriousness +injury +injury's +injustice +injustice's +injustices +ink +inked +inker +inkers +inking +inkings +inkling +inkling's +inklings +inks +inlaid +inland +inlander +inlet +inlet's +inlets +inlier +inly +inlying +inmate +inmate's +inmates +inn +innards +innate +innately +innateness +inner +innerly +innermost +inning +innings +innocence +innocent +innocently +innocents +innocuous +innocuously +innocuousness +innovate +innovated +innovates +innovating +innovation +innovation's +innovations +innovative +innovativeness +inns +innumerability +innumerable +innumerableness +innumerably +inoperable +inopportune +inopportunely +inopportuneness +inordinate +inordinately +inordinateness +inorganic +input +input's +inputed +inputer +inputing +inputs +inputting +inquietude +inquire +inquired +inquirer +inquirers +inquires +inquiries +inquiring +inquiringly +inquiry +inquiry's +inquisition +inquisition's +inquisitions +inquisitive +inquisitively +inquisitiveness +inroad +inroads +ins +insane +insanely +insaneness +insanitary +insanity +inscribe +inscribed +inscriber +inscribes +inscribing +inscription +inscription's +inscriptions +insect +insect's +insects +insecure +insecurely +insecureness +insecurity +insensible +insensibleness +insensibly +insensitive +insensitively +insensitiveness +insensitivity +inseparable +inseparableness +insert +inserted +inserter +inserting +insertion +insertion's +insertions +inserts +insets +insetting +inside +insider +insiders +insides +insidious +insidiously +insidiousness +insight +insight's +insightful +insightfully +insights +insignia +insignias +insignificance +insignificances +insignificant +insignificantly +insincerity +insinuate +insinuated +insinuates +insinuating +insinuatingly +insinuation +insinuations +insinuative +insist +insisted +insistence +insistent +insistently +insisting +insists +insociability +insociable +insociably +insofar +insolence +insolent +insolently +insolubility +insoluble +insolubleness +insolvable +inspect +inspected +inspecting +inspection +inspection's +inspections +inspective +inspector +inspector's +inspectors +inspects +inspiration +inspiration's +inspirations +inspire +inspired +inspirer +inspires +inspiring +instabilities +instability +install +installation +installation's +installations +installed +installer +installers +installing +installment +installment's +installments +installs +instance +instanced +instances +instancing +instant +instantaneous +instantaneously +instantaneousness +instanter +instantiate +instantiated +instantiates +instantiating +instantiation +instantiation's +instantiations +instantly +instantness +instants +instated +instates +instead +insteps +instigate +instigated +instigates +instigating +instigation +instigative +instigator +instigator's +instigators +instills +instinct +instinct's +instinctive +instinctively +instincts +institute +instituted +instituter +instituters +institutes +instituting +institution +institution's +institutional +institutionally +institutions +institutive +instruct +instructed +instructing +instruction +instruction's +instructional +instructions +instructive +instructively +instructiveness +instructor +instructor's +instructors +instructs +instrument +instrumental +instrumentalist +instrumentalist's +instrumentalists +instrumentally +instrumentals +instrumentation +instrumented +instrumenting +instruments +insufficiencies +insufficiency +insufficient +insufficiently +insulate +insulated +insulates +insulating +insulation +insulations +insulator +insulator's +insulators +insult +insulted +insulter +insulting +insultingly +insults +insuperable +insupportable +insupportableness +insurance +insurances +insure +insured +insurer +insurers +insures +insurgent +insurgent's +insurgents +insuring +insurmountable +insurrection +insurrection's +insurrections +insusceptible +intact +intactness +intakes +intangible +intangible's +intangibleness +intangibles +intangibly +integer +integer's +integers +integral +integral's +integrally +integrals +integrate +integrated +integrates +integrating +integration +integrations +integrative +integrity +intellect +intellect's +intellective +intellectively +intellects +intellectual +intellectually +intellectualness +intellectuals +intelligence +intelligencer +intelligences +intelligent +intelligently +intelligibility +intelligible +intelligibleness +intelligibly +intemperance +intemperate +intemperately +intemperateness +intend +intended +intendedly +intendedness +intender +intending +intends +intense +intensely +intenseness +intensification +intensified +intensifier +intensifiers +intensifies +intensify +intensifying +intension +intensities +intensity +intensive +intensively +intensiveness +intent +intention +intentional +intentionally +intentioned +intentions +intently +intentness +intents +interact +interacted +interacting +interaction +interaction's +interactions +interactive +interactively +interactivity +interacts +intercept +intercepted +intercepter +intercepting +intercepts +interchange +interchangeability +interchangeable +interchangeableness +interchangeably +interchanged +interchanger +interchanges +interchanging +interchangings +intercity +intercommunicate +intercommunicated +intercommunicates +intercommunicating +intercommunication +interconnect +interconnected +interconnectedness +interconnecting +interconnection +interconnection's +interconnections +interconnectivity +interconnects +intercourse +interdependence +interdependencies +interdependency +interdependent +interdependently +interdisciplinary +interest +interested +interestedly +interesting +interestingly +interestingness +interests +interface +interfaced +interfacer +interfaces +interfacing +interfere +interfered +interference +interferences +interferer +interferes +interfering +interferingly +interim +interior +interior's +interiorly +interiors +interlace +interlaced +interlaces +interlacing +interleave +interleaved +interleaves +interleaving +interlink +interlinked +interlinking +interlinks +interlisp +interlisp's +intermediaries +intermediary +intermediate +intermediate's +intermediated +intermediately +intermediateness +intermediates +intermediating +intermediation +interminable +intermingle +intermingled +intermingles +intermingling +intermission +intermittent +intermittently +intermix +intermixed +intermixer +intermixes +intermixing +intermodule +intern +internal +internally +internals +international +internationality +internationally +internationals +interned +interning +interns +interpersonal +interpersonally +interplay +interpolate +interpolated +interpolates +interpolating +interpolation +interpolations +interpolative +interpose +interposed +interposer +interposes +interposing +interpret +interpretable +interpretation +interpretation's +interpretations +interpreted +interpreter +interpreters +interpreting +interpretive +interpretively +interprets +interprocess +interrelate +interrelated +interrelatedly +interrelatedness +interrelates +interrelating +interrelation +interrelations +interrelationship +interrelationship's +interrelationships +interrogate +interrogated +interrogates +interrogating +interrogation +interrogations +interrogative +interrogatively +interrogatives +interrupt +interrupted +interrupter +interrupters +interruptible +interrupting +interruption +interruption's +interruptions +interruptive +interrupts +intersect +intersected +intersecting +intersection +intersection's +intersections +intersects +intersperse +interspersed +intersperses +interspersing +interspersion +interspersions +interstage +interstate +intertask +intertwine +intertwined +intertwines +intertwining +interval +interval's +intervals +intervene +intervened +intervener +intervenes +intervening +intervention +intervention's +interventions +interview +interviewed +interviewee +interviewee's +interviewees +interviewer +interviewer's +interviewers +interviewing +interviews +interwoven +intestinal +intestinally +intestine +intestine's +intestines +intimacy +intimate +intimated +intimately +intimateness +intimater +intimates +intimating +intimation +intimations +intimidate +intimidated +intimidates +intimidating +intimidation +into +intolerability +intolerable +intolerableness +intolerably +intolerance +intolerant +intolerantly +intolerantness +intonation +intonation's +intonations +intoned +intoner +intoxicate +intoxicated +intoxicatedly +intoxicating +intoxication +intractability +intractable +intractableness +intractably +intramural +intramurally +intransigent +intransigently +intransigents +intransitive +intransitively +intransitiveness +intraprocess +intricacies +intricacy +intricate +intricately +intricateness +intrigue +intrigued +intriguer +intrigues +intriguing +intriguingly +intrinsic +intrinsically +intrinsics +introduce +introduced +introducer +introduces +introducing +introduction +introduction's +introductions +introductory +introspect +introspection +introspections +introspective +introspectively +introspectiveness +introvert +introverted +intrude +intruded +intruder +intruder's +intruders +intrudes +intruding +intrusion +intrusion's +intrusions +intrusive +intrusively +intrusiveness +intrust +intubate +intubated +intubates +intubating +intubation +intuition +intuition's +intuitionist +intuitions +intuitive +intuitively +intuitiveness +invade +invaded +invader +invaders +invades +invading +invalid +invalidate +invalidated +invalidates +invalidating +invalidation +invalidations +invalidities +invalidity +invalidly +invalidness +invalids +invaluable +invaluableness +invaluably +invariability +invariable +invariableness +invariably +invariance +invariant +invariantly +invariants +invasion +invasion's +invasions +invent +invented +inventing +invention +invention's +inventions +inventive +inventively +inventiveness +inventor +inventor's +inventories +inventors +inventory +inventory's +invents +inveracity +inverse +inversely +inverses +inversion +inversions +inversive +invert +invertebrate +invertebrate's +invertebrates +inverted +inverter +inverters +invertible +inverting +inverts +invest +invested +investigate +investigated +investigates +investigating +investigation +investigations +investigative +investigator +investigator's +investigators +investing +investment +investment's +investments +investor +investor's +investors +invests +inviability +inviable +invincible +invincibleness +invisibility +invisible +invisibleness +invisibly +invitation +invitation's +invitations +invite +invited +inviter +invites +inviting +invitingly +invocation +invocation's +invocations +invoice +invoiced +invoices +invoicing +invokable +invoke +invoked +invoker +invokers +invokes +invoking +involuntarily +involuntariness +involuntary +involve +involved +involvedly +involvement +involvement's +involvements +involver +involves +involving +invulnerable +invulnerableness +inward +inwardly +inwardness +inwards +inwrought +ioctl +iodine +ion +ions +irate +irately +irateness +ire +ire's +ires +iris +irises +irk +irked +irking +irks +irksome +irksomely +irksomeness +iron +ironed +ironer +ironical +ironically +ironicalness +ironies +ironing +ironings +ironness +irons +ironwork +ironwork's +ironworker +ironworks +irony +irrational +irrationality +irrationally +irrationalness +irrationals +irrecoverable +irrecoverableness +irreducible +irreducibly +irreflexive +irrefutable +irregular +irregularities +irregularity +irregularly +irregulars +irrelevance +irrelevances +irrelevant +irrelevantly +irrepressible +irresistible +irresistibleness +irrespective +irrespectively +irresponsible +irresponsibleness +irresponsibly +irreversible +irrigate +irrigated +irrigates +irrigating +irrigation +irrigations +irritate +irritated +irritates +irritating +irritatingly +irritation +irritations +irritative +is +island +islander +islanders +islands +isle +isle's +isles +islet +islet's +islets +isling +isn't +isolate +isolated +isolates +isolating +isolation +isolations +isometric +isometrics +isomorphic +isomorphically +isomorphism +isomorphism's +isomorphisms +isotope +isotope's +isotopes +ispell +ispell's +issuance +issue +issued +issuer +issuers +issues +issuing +isthmus +it +it'd +it'll +it's +italic +italics +itch +itches +itching +item +item's +items +iterate +iterated +iterates +iterating +iteration +iterations +iterative +iteratively +iterator +iterator's +iterators +itineraries +itinerary +its +itself +iv +ivied +ivies +ivories +ivory +ivy +ivy's +ix +jab +jab's +jabbed +jabbing +jabs +jack +jacked +jacker +jacket +jacketed +jackets +jacking +jacks +jade +jaded +jadedly +jadedness +jades +jading +jail +jailed +jailer +jailers +jailing +jails +jam +jammed +jamming +jams +janitor +janitor's +janitors +jar +jar's +jargon +jarred +jarring +jarringly +jars +jaunt +jaunt's +jaunted +jauntier +jauntiness +jaunting +jaunts +jaunty +javelin +javelin's +javelins +jaw +jaw's +jawed +jaws +jay +jazz +jealous +jealousies +jealously +jealousness +jealousy +jean +jean's +jeans +jeep +jeep's +jeeped +jeepers +jeeping +jeeps +jeer +jeer's +jeerer +jeers +jellied +jellies +jelly +jelly's +jellyfish +jellying +jenny +jerk +jerked +jerker +jerkier +jerkiness +jerking +jerkings +jerks +jerky +jersey +jersey's +jerseys +jest +jested +jester +jesting +jests +jet +jet's +jets +jetted +jetting +jewel +jewelries +jewelry +jewels +jig +jig's +jigs +jingle +jingled +jingler +jingles +jingling +job +job's +jobs +jocks +jocund +jocundly +jog +jogs +john +john's +johns +join +joined +joiner +joiners +joining +joins +joint +joint's +jointed +jointedly +jointedness +jointer +jointing +jointly +jointness +joints +joke +joked +joker +jokers +jokes +joking +jokingly +jollied +jollier +jollies +jolly +jollying +jolt +jolted +jolter +jolting +jolts +jostle +jostled +jostles +jostling +jot +jots +jotted +jotting +journal +journal's +journalism +journalist +journalist's +journalistic +journalists +journals +journey +journeyed +journeying +journeyings +journeys +joust +jousted +jouster +jousting +jousts +joy +joy's +joyful +joyfully +joyfulness +joyous +joyously +joyousness +joys +jubilee +judge +judged +judger +judges +judging +judicable +judicial +judicially +judiciaries +judiciary +judicious +judiciously +judiciousness +jug +jug's +juggle +juggled +juggler +jugglers +juggles +juggling +jugs +juice +juice's +juiced +juicer +juicers +juices +juicier +juiciest +juiciness +juicing +juicy +jumble +jumbled +jumbles +jumbling +jump +jumped +jumper +jumpers +jumpier +jumpiness +jumping +jumps +jumpy +junction +junction's +junctions +juncture +juncture's +junctures +jungle +jungle's +jungled +jungles +junior +junior's +juniors +juniper +junk +junker +junkers +junkie +junkies +junks +junky +juries +jurisdiction +jurisdiction's +jurisdictions +juror +juror's +jurors +jury +jury's +just +juster +justice +justice's +justices +justifiable +justifiably +justification +justifications +justified +justifier +justifier's +justifiers +justifies +justify +justifying +justing +justly +justness +jut +juvenile +juvenile's +juveniles +juxtapose +juxtaposed +juxtaposes +juxtaposing +kHz +keel +keeled +keeler +keeling +keels +keen +keener +keenest +keening +keenly +keenness +keep +keeper +keepers +keeping +keeps +ken +kennel +kennel's +kennels +kept +kerchief +kerchief's +kerchiefed +kerchiefs +kernel +kernel's +kernels +kerosene +ketchup +kettle +kettle's +kettles +key +keyboard +keyboard's +keyboarder +keyboarding +keyboards +keyclick +keyclick's +keyclicks +keyed +keying +keypad +keypad's +keypads +keys +keystroke +keystroke's +keystrokes +keyword +keyword's +keywords +kick +kicked +kicker +kickers +kicking +kickoff +kicks +kid +kid's +kidded +kidding +kiddingly +kidnap +kidnap's +kidnaps +kidney +kidney's +kidneys +kids +kill +killed +killer +killers +killing +killingly +killings +kills +kilobit +kilobits +kilobyte +kilobytes +kin +kind +kinder +kindergarten +kindest +kindhearted +kindheartedly +kindheartedness +kindle +kindled +kindler +kindles +kindlier +kindliness +kindling +kindly +kindness +kindnesses +kindred +kinds +king +kingdom +kingdom's +kingdoms +kinglier +kingliness +kingly +kings +kinkier +kinkiness +kinky +kinship +kinsman +kiss +kissed +kisser +kissers +kisses +kissing +kissings +kit +kit's +kitchen +kitchen's +kitchener +kitchens +kite +kited +kiter +kites +kiting +kits +kitsch +kitten +kitten's +kittened +kittening +kittens +kitties +kitty +kludge +kludge's +kludged +kludger +kludger's +kludgers +kludges +kludgey +kludging +klutz +klutz's +klutzes +klutziness +klutzy +knack +knacker +knacks +knapsack +knapsack's +knapsacks +knave +knave's +knaves +knead +kneaded +kneader +kneading +kneads +knee +kneed +kneeing +kneel +kneeled +kneeler +kneeling +kneels +knees +knell +knell's +knells +knelt +knew +knife +knifed +knifes +knifing +knight +knighted +knighthood +knighting +knightliness +knightly +knights +knit +knits +knives +knob +knob's +knobs +knock +knocked +knocker +knockers +knocking +knocks +knoll +knoll's +knolls +knot +knot's +knots +knotted +knotting +know +knowable +knower +knowhow +knowing +knowingly +knowledge +knowledgeable +knowledgeableness +knowledges +known +knows +knuckle +knuckled +knuckles +knuckling +kudos +lab +lab's +label +label's +labels +laboratories +laboratory +laboratory's +labs +labyrinth +labyrinths +lace +laced +lacer +lacerate +lacerated +lacerates +lacerating +laceration +lacerations +lacerative +laces +lacing +lack +lackadaisical +lackadaisically +lacked +lacker +lacking +lacks +lacquer +lacquered +lacquerer +lacquerers +lacquering +lacquers +lad +ladder +ladders +laded +laden +ladened +ladening +ladies +lading +lads +lady +lady's +lag +lager +lagers +lagged +lagoon +lagoon's +lagoons +lags +laid +lain +lair +lair's +lairs +lake +lake's +laker +lakes +laking +lamb +lamb's +lambda +lambda's +lambdas +lamber +lambs +lame +lamed +lamely +lameness +lament +lamentable +lamentableness +lamentation +lamentation's +lamentations +lamented +lamenting +laments +lamer +lames +lamest +laminar +laming +lamp +lamp's +lamper +lamps +lance +lanced +lancer +lancers +lances +lancing +land +landed +lander +landers +landing +landings +landladies +landlady +landlady's +landlord +landlord's +landlords +landmark +landmark's +landmarks +landowner +landowner's +landowners +lands +landscape +landscaped +landscaper +landscapes +landscaping +lane +lane's +lanes +language +language's +languages +languid +languidly +languidness +languish +languished +languisher +languishes +languishing +languishingly +lantern +lantern's +lanterns +lap +lap's +lapel +lapel's +lapels +laps +lapse +lapsed +lapser +lapses +lapsing +lard +larded +larder +larding +lards +large +largely +largeness +larger +largest +lark +lark's +larker +larks +larva +larvae +larvas +laser +laser's +lasers +lash +lashed +lasher +lashes +lashing +lashings +lass +lass's +lasses +last +lasted +laster +lasting +lastingly +lastingness +lastly +lasts +latch +latched +latches +latching +late +lated +lately +latencies +latency +latency's +lateness +latent +latently +latents +later +lateral +laterally +latest +latex +latex's +latexes +lath +lather +lathered +latherer +lathering +lathes +lathing +latitude +latitude's +latitudes +latrine +latrine's +latrines +latter +latter's +latterly +lattice +lattice's +latticed +lattices +latticing +laugh +laughable +laughableness +laughably +laughed +laugher +laughers +laughing +laughingly +laughs +laughter +laughters +launch +launched +launcher +launchers +launches +launching +launchings +launder +laundered +launderer +laundering +launderings +launders +laundries +laundry +laurel +laurel's +laurels +lava +lavatories +lavatory +lavatory's +lavender +lavendered +lavendering +lavish +lavished +lavishing +lavishly +lavishness +law +law's +lawful +lawfully +lawfulness +lawless +lawlessly +lawlessness +lawn +lawn's +lawns +laws +lawsuit +lawsuit's +lawsuits +lawyer +lawyer's +lawyerly +lawyers +lay +layer +layered +layering +layers +laying +layman +laymen +layoffs +layout +layout's +layouts +lays +lazed +lazied +lazier +laziest +lazily +laziness +lazing +lazy +lazying +lead +leaded +leaden +leadenly +leadenness +leader +leader's +leaders +leadership +leadership's +leaderships +leading +leadings +leads +leaf +leafed +leafier +leafiest +leafing +leafless +leaflet +leaflet's +leaflets +leafs +leafy +league +leagued +leaguer +leaguers +leagues +leaguing +leak +leakage +leakage's +leakages +leaked +leaker +leaking +leaks +lean +leaned +leaner +leanest +leaning +leanings +leanly +leanness +leans +leap +leaped +leaper +leaping +leaps +leapt +learn +learned +learnedly +learnedness +learner +learners +learning +learnings +learns +lease +leased +leases +leash +leash's +leashes +leasing +least +leather +leathered +leathering +leathern +leathers +leave +leaved +leaven +leavened +leavening +leaver +leavers +leaves +leaving +leavings +lecture +lectured +lecturer +lecturers +lectures +lecturing +led +ledge +ledger +ledgers +ledges +lee +leech +leech's +leeches +leer +leered +leering +leers +lees +left +leftist +leftist's +leftists +leftmost +leftover +leftover's +leftovers +lefts +leftward +leftwards +leg +legacies +legacy +legacy's +legal +legalities +legality +legally +legals +legend +legend's +legendary +legends +legged +leggings +legibility +legible +legibly +legion +legion's +legions +legislate +legislated +legislates +legislating +legislation +legislations +legislative +legislatively +legislator +legislator's +legislators +legislature +legislature's +legislatures +legitimacy +legitimate +legitimated +legitimately +legitimates +legitimating +legitimation +legs +leisure +leisured +leisureliness +leisurely +lemma +lemma's +lemmas +lemon +lemon's +lemonade +lemons +lend +lender +lenders +lending +lends +length +lengthen +lengthened +lengthener +lengthening +lengthens +lengthier +lengthiness +lengthly +lengths +lengthwise +lengthy +leniency +lenient +leniently +lens +lens's +lensed +lenser +lensers +lenses +lensing +lensings +lent +lentil +lentil's +lentils +leopard +leopard's +leopards +leprosy +less +lessen +lessened +lessening +lessens +lesser +lesses +lessing +lesson +lesson's +lessoned +lessoning +lessons +lest +lester +let +let's +lets +letter +lettered +letterer +lettering +letters +letting +lettuce +levee +levee's +leveed +levees +level +levelly +levelness +levels +lever +lever's +leverage +leveraged +leverages +leveraging +levered +levering +levers +levied +levier +levies +levy +levying +lewd +lewdly +lewdness +lexical +lexically +lexicographic +lexicographical +lexicographically +lexicon +lexicon's +lexicons +liabilities +liability +liability's +liable +liableness +liaison +liaison's +liaisons +liar +liar's +liars +liberal +liberally +liberalness +liberals +liberate +liberated +liberates +liberating +liberation +liberator +liberator's +liberators +liberties +liberty +liberty's +libido +librarian +librarian's +librarians +libraries +library +library's +libretti +license +licensed +licensee +licensee's +licensees +licenser +licenses +licensing +lichen +lichen's +lichened +lichens +lick +licked +licker +licking +licks +lid +lid's +lids +lie +lied +lieder +liege +lien +lien's +liens +lier +lies +lieu +lieutenant +lieutenant's +lieutenants +life +life's +lifeless +lifelessly +lifelessness +lifelike +lifelikeness +lifelong +lifer +lifers +lifestyle +lifestyles +lifetime +lifetime's +lifetimes +lift +lifted +lifter +lifters +lifting +lifts +light +lighted +lighten +lightened +lightener +lightening +lightens +lighter +lighter's +lighters +lightest +lighthouse +lighthouse's +lighthouses +lighting +lightly +lightness +lightning +lightning's +lightninged +lightnings +lights +lightweight +lightweights +like +liked +likelier +likeliest +likelihood +likelihoods +likeliness +likely +liken +likened +likeness +likeness's +likenesses +likening +likens +liker +likes +likest +likewise +liking +likings +lilac +lilac's +lilacs +lilied +lilies +lily +lily's +limb +limbed +limber +limbered +limbering +limberly +limberness +limbers +limbs +lime +lime's +limed +limes +limestone +liming +limit +limitability +limitably +limitation +limitation's +limitations +limited +limitedly +limitedness +limiteds +limiter +limiters +limiting +limits +limp +limped +limper +limping +limply +limpness +limps +linden +line +line's +linear +linearities +linearity +linearly +lined +linen +linen's +linens +liner +liners +lines +linger +lingered +lingerer +lingering +lingeringly +lingers +linguist +linguist's +linguistic +linguistically +linguistics +linguists +lining +linings +link +linkage +linkage's +linkages +linked +linker +linkers +linking +linkings +links +linoleum +linseed +lint +linter +lints +lion +lion's +lioness +lioness's +lionesses +lions +lip +lip's +lips +lipstick +liquefied +liquefier +liquefiers +liquefies +liquefy +liquefying +liquid +liquid's +liquidation +liquidation's +liquidations +liquidity +liquidly +liquidness +liquids +liquor +liquor's +liquored +liquoring +liquors +lisp +lisp's +lisped +lisper +lisping +lisps +list +listed +listen +listened +listener +listeners +listening +listens +lister +listers +listing +listing's +listings +lists +lit +literacy +literal +literally +literalness +literals +literariness +literary +literate +literately +literateness +literation +literature +literature's +literatures +lithe +lithely +litheness +litigate +litigated +litigates +litigating +litigation +litigator +litter +littered +litterer +littering +litters +little +littleness +littler +littlest +livable +livableness +livably +live +lived +livelier +liveliest +livelihood +liveliness +lively +liven +livened +liveness +livening +liver +liveried +livers +livery +lives +livest +liveth +living +livingly +livingness +livings +lizard +lizard's +lizards +load +loaded +loader +loaders +loading +loadings +loads +loaf +loafed +loafer +loafers +loafing +loafs +loan +loaned +loaner +loaning +loans +loath +loathe +loathed +loather +loathes +loathing +loathly +loathness +loathsome +loathsomely +loathsomeness +loaves +lobbied +lobbies +lobby +lobbying +lobe +lobe's +lobed +lobes +lobster +lobster's +lobsters +local +locale +localities +locality +locality's +locally +locals +locate +located +locater +locates +locating +location +locations +locative +locatives +locator +locator's +locators +loci +lock +locked +locker +lockers +locking +lockings +lockout +lockout's +lockouts +locks +lockup +lockup's +lockups +locomotion +locomotive +locomotive's +locomotively +locomotives +locus +locus's +locust +locust's +locusts +lodge +lodged +lodger +lodger's +lodgers +lodges +lodging +lodgings +loft +loft's +lofter +loftier +loftiness +lofts +lofty +log +log's +logarithm +logarithm's +logarithmic +logarithmically +logarithms +logged +logger +logger's +loggers +logging +logic +logic's +logical +logically +logicalness +logicals +logician +logician's +logicians +logics +login +logins +logistic +logistics +logout +logs +loin +loin's +loins +loiter +loitered +loiterer +loitering +loiters +lone +lonelier +loneliest +loneliness +lonely +loneness +loner +loners +lonesome +lonesomely +lonesomeness +long +longed +longer +longest +longing +longingly +longings +longitude +longitude's +longitudes +longly +longness +longs +longword +longword's +longwords +look +lookahead +looked +looker +lookers +looking +lookout +lookouts +looks +lookup +lookup's +lookups +loom +loomed +looming +looms +loon +loop +looped +looper +loophole +loophole's +loopholed +loopholes +loopholing +looping +loops +loose +loosed +loosely +loosen +loosened +loosener +looseness +loosening +loosens +looser +looses +loosest +loosing +loot +looted +looter +looting +loots +lord +lord's +lording +lordlier +lordliness +lordly +lords +lordship +lore +lorries +lorry +lose +loser +losers +loses +losing +losings +loss +loss's +losses +lossier +lossiest +lossy +lost +lostness +lot +lot's +lots +lotteries +lottery +lotus +loud +louden +loudened +loudening +louder +loudest +loudly +loudness +loudspeaker +loudspeaker's +loudspeakers +lounge +lounged +lounger +loungers +lounges +lounging +lousier +lousiness +lousy +lovable +lovableness +lovably +love +love's +loved +lovelier +lovelies +loveliest +loveliness +lovely +lover +lover's +lovering +loverly +lovers +loves +loving +lovingly +lovingness +low +lower +lowered +lowering +lowers +lowest +lowing +lowland +lowlander +lowlands +lowlier +lowliest +lowliness +lowly +lowness +lows +loyal +loyally +loyalties +loyalty +loyalty's +lubricant +lubricant's +lubricants +lubrication +luck +lucked +luckier +luckiest +luckily +luckiness +luckless +lucks +lucky +ludicrous +ludicrously +ludicrousness +luggage +lukewarm +lukewarmly +lukewarmness +lull +lullaby +lulled +lulls +lumber +lumbered +lumberer +lumbering +lumbers +luminous +luminously +luminousness +lump +lumped +lumpen +lumper +lumping +lumps +lunar +lunatic +lunatics +lunch +lunched +luncheon +luncheon's +luncheons +luncher +lunches +lunching +lung +lunged +lunger +lunging +lungs +lurch +lurched +lurcher +lurches +lurching +lure +lured +lurer +lures +luring +lurk +lurked +lurker +lurkers +lurking +lurks +luscious +lusciously +lusciousness +lust +lustier +lustily +lustiness +lusting +lustrous +lustrously +lustrousness +lusts +lusty +lute +lute's +luted +lutes +luting +luxuriant +luxuriantly +luxuries +luxurious +luxuriously +luxuriousness +luxury +luxury's +lying +lyingly +lyings +lymph +lynch +lynched +lyncher +lynches +lynx +lynx's +lynxes +lyre +lyre's +lyres +lyric +lyrics +ma'am +macaroni +macaroni's +mace +maced +macer +maces +machine +machine's +machined +machineries +machinery +machines +machining +macing +macro +macro's +macroeconomics +macromolecule +macromolecule's +macromolecules +macros +macroscopic +mad +madam +madams +madden +maddened +maddening +maddeningly +madder +maddest +made +mademoiselle +mademoiselles +madly +madman +madness +madras +magazine +magazine's +magazined +magazines +magazining +maggot +maggot's +maggots +magic +magical +magically +magician +magician's +magicians +magistrate +magistrate's +magistrates +magnesium +magnesiums +magnet +magnet's +magnetic +magnetically +magnetics +magnetism +magnetism's +magnetisms +magnets +magnification +magnifications +magnificence +magnificent +magnificently +magnified +magnifier +magnifiers +magnifies +magnify +magnifying +magnitude +magnitude's +magnitudes +mahogany +maid +maid's +maiden +maidenliness +maidenly +maidens +maids +mail +mailable +mailbox +mailbox's +mailboxes +mailed +mailer +mailer's +mailers +mailing +mailings +mails +maim +maimed +maimedness +maimer +maimers +maiming +maims +main +mainframe +mainframe's +mainframes +mainland +mainlander +mainlanders +mainly +mains +mainstay +maintain +maintainability +maintainable +maintained +maintainer +maintainer's +maintainers +maintaining +maintains +maintenance +maintenance's +maintenances +majestic +majesties +majesty +majesty's +major +majored +majoring +majorities +majority +majority's +majors +makable +make +makefile +makefiles +maker +makers +makes +makeshift +makeshifts +makeup +makeups +making +makings +maladies +malady +malady's +malaria +male +male's +malefactor +malefactor's +malefactors +maleness +males +malfunction +malfunctioned +malfunctioning +malfunctions +malice +malicious +maliciously +maliciousness +malignant +malignantly +mall +mall's +mallet +mallet's +mallets +malls +malnutrition +malt +malted +malting +malts +mama +mamma +mamma's +mammal +mammal's +mammals +mammas +mammoth +man +man's +manage +manageable +manageableness +managed +management +management's +managements +manager +manager's +managerial +managerially +managers +manages +managing +mandate +mandated +mandates +mandating +mandatories +mandatory +mandible +mandolin +mandolin's +mandolins +mane +mane's +maned +manes +manger +manger's +mangers +mangle +mangled +mangler +mangles +mangling +manhood +maniac +maniac's +maniacs +manicure +manicured +manicures +manicuring +manifest +manifestation +manifestation's +manifestations +manifested +manifesting +manifestly +manifestness +manifests +manifold +manifold's +manifolder +manifoldly +manifoldness +manifolds +manipulability +manipulable +manipulatable +manipulate +manipulated +manipulates +manipulating +manipulation +manipulations +manipulative +manipulativeness +manipulator +manipulator's +manipulators +manipulatory +mankind +manlier +manliest +manliness +manly +manned +manner +mannered +mannerliness +mannerly +manners +manning +manometer +manometer's +manometers +manor +manor's +manors +manpower +mans +mansion +mansion's +mansions +mantel +mantel's +mantels +mantissa +mantissa's +mantissas +mantle +mantle's +mantled +mantles +mantling +manual +manual's +manually +manuals +manufacture +manufactured +manufacturer +manufacturer's +manufacturers +manufactures +manufacturing +manure +manured +manurer +manurers +manures +manuring +manuscript +manuscript's +manuscripts +many +map +map's +maple +maple's +maples +mappable +mapped +mapping +mapping's +mappings +maps +mar +marble +marbled +marbler +marbles +marbling +march +marched +marcher +marches +marching +mare +mare's +mares +margin +margin's +marginal +marginally +marginals +margined +margining +margins +marigold +marigold's +marigolds +marijuana +marijuana's +marinate +marinated +marinates +marinating +marine +mariner +marines +maritime +maritimer +mark +markable +marked +markedly +marker +markers +market +marketability +marketable +marketed +marketer +marketing +marketings +marketplace +marketplace's +marketplaces +markets +marking +markings +marks +marquis +marquises +marriage +marriage's +marriages +married +marries +marrow +marrows +marry +marrying +mars +marsh +marsh's +marshal +marshaled +marshaler +marshalers +marshaling +marshals +marshes +mart +marten +martens +martial +martially +marts +martyr +martyr's +martyrdom +martyrs +marvel +marvels +masculine +masculinely +masculineness +masculinity +mash +mashed +masher +mashers +mashes +mashing +mashings +mask +masked +masker +masking +maskings +masks +masochist +masochist's +masochists +mason +mason's +masoned +masoning +masonry +masons +masquerade +masquerader +masquerades +masquerading +mass +massacre +massacred +massacrer +massacres +massacring +massage +massaged +massager +massages +massaging +massed +masses +massing +massinger +massive +massively +massiveness +mast +masted +master +master's +mastered +masterful +masterfully +masterfulness +mastering +masterings +masterliness +masterly +masterpiece +masterpiece's +masterpieces +masters +mastery +masts +masturbate +masturbated +masturbates +masturbating +masturbation +mat +mat's +match +matchable +matched +matcher +matchers +matches +matching +matchings +matchless +matchlessly +matchmaker +matchmaker's +matchmakers +matchmaking +matchmaking's +mate +mate's +mated +mater +material +materialism +materialism's +materially +materialness +materials +maternal +maternally +mates +math +mathematical +mathematically +mathematician +mathematician's +mathematicians +mathematics +mating +matings +matrices +matriculation +matrimony +matrix +matrixes +matron +matronly +mats +matted +matter +mattered +mattering +matters +mattress +mattress's +mattresses +maturation +mature +matured +maturely +matureness +maturer +matures +maturing +maturities +maturity +max +maxim +maxim's +maximal +maximally +maxims +maximum +maximumly +maximums +may +maybe +mayer +mayest +mayhap +mayhem +maying +mayonnaise +mayor +mayor's +mayoral +mayors +mays +maze +maze's +mazed +mazedly +mazedness +mazednesses +mazer +mazes +mazing +me +mead +meadow +meadow's +meadows +meads +meager +meagerly +meagerness +meal +meal's +meals +mean +meander +meandered +meandering +meanderings +meanders +meaner +meanest +meaning +meaning's +meaningful +meaningfully +meaningfulness +meaningless +meaninglessly +meaninglessness +meanings +meanly +meanness +means +meant +meantime +meanwhile +measles +measurable +measurably +measure +measured +measuredly +measurement +measurement's +measurements +measurer +measures +measuring +meat +meat's +meats +mechanic +mechanic's +mechanical +mechanically +mechanicals +mechanics +mechanism +mechanism's +mechanisms +med +medal +medal's +medallion +medallion's +medallions +medals +meddle +meddled +meddler +meddles +meddling +media +median +median's +medianly +medians +medias +mediate +mediated +mediately +mediateness +mediates +mediating +mediation +mediations +mediative +medic +medic's +medical +medically +medicinal +medicinally +medicine +medicine's +medicines +medics +medieval +medieval's +medievally +medievals +meditate +meditated +meditates +meditating +meditation +meditations +meditative +meditatively +meditativeness +medium +medium's +mediums +meek +meeker +meekest +meekly +meekness +meet +meeter +meeting +meetings +meetly +meets +megabit +megabits +megabyte +megabytes +megaword +megawords +melancholy +meld +melding +melds +mellow +mellowed +mellowing +mellowly +mellowness +mellows +melodies +melodious +melodiously +melodiousness +melodrama +melodrama's +melodramas +melody +melody's +melon +melon's +melons +melt +melted +melter +melting +meltingly +melts +member +member's +membered +members +membership +membership's +memberships +membrane +membrane's +membraned +membranes +memo +memo's +memoir +memoirs +memorability +memorable +memorableness +memoranda +memorandum +memorandums +memorial +memorially +memorials +memories +memory +memory's +memoryless +memos +men +men's +menace +menaced +menaces +menacing +menacingly +menagerie +menageries +mend +mended +mender +mending +mends +menial +menially +menials +mens +mensed +menses +mensing +mental +mentalities +mentality +mentally +mention +mentionable +mentioned +mentioner +mentioners +mentioning +mentions +mentor +mentor's +mentors +menu +menu's +menus +mer +mercenaries +mercenariness +mercenary +mercenary's +merchandise +merchandised +merchandiser +merchandises +merchandising +merchant +merchant's +merchants +mercies +merciful +mercifully +mercifulness +merciless +mercilessly +mercilessness +mercuries +mercury +mercy +mere +merely +merest +merge +merged +merger +mergers +merges +merging +meridian +meridians +merit +merited +meriting +meritorious +meritoriously +meritoriousness +merits +merrier +merriest +merrily +merriment +merriments +merriness +merry +mesh +meshed +meshes +meshing +mess +message +message's +messaged +messages +messaging +messed +messenger +messenger's +messengers +messes +messiah +messiahs +messier +messiest +messieurs +messily +messiness +messing +messy +met +meta +metacircular +metacircularity +metal +metal's +metalanguage +metalanguages +metallic +metallurgy +metals +metamathematical +metamorphosis +metaphor +metaphor's +metaphorical +metaphorically +metaphors +metaphysical +metaphysically +metaphysics +metavariable +mete +meted +meteor +meteor's +meteoric +meteorology +meteors +meter +meter's +metered +metering +meters +metes +method +method's +methodical +methodically +methodicalness +methodist +methodist's +methodists +methodological +methodologically +methodologies +methodologists +methodology +methodology's +methods +meting +metric +metric's +metrical +metrically +metrics +metropolis +metropolitan +mets +mew +mewed +mews +mica +mice +microbicidal +microbicide +microcode +microcoded +microcodes +microcoding +microcomputer +microcomputer's +microcomputers +microeconomics +microfilm +microfilm's +microfilmed +microfilmer +microfilms +microinstruction +microinstruction's +microinstructions +microphone +microphones +microphoning +microprocessing +microprocessor +microprocessor's +microprocessors +microprogram +microprogram's +microprogrammed +microprogramming +microprograms +microscope +microscope's +microscopes +microscopic +microsecond +microsecond's +microseconds +microstore +microwave +microwave's +microwaves +microword +microwords +mid +midday +middle +middled +middler +middles +middling +middlingly +middlings +midnight +midnightly +midnights +midpoint +midpoint's +midpoints +midst +midsts +midsummer +midway +midways +midwinter +midwinterly +mien +miens +mies +miff +miffed +miffing +miffs +might +mightier +mightiest +mightily +mightiness +mights +mighty +migrate +migrated +migrates +migrating +migration +migrations +migrative +mild +milden +milder +mildest +mildew +mildews +mildly +mildness +mile +mile's +mileage +mileages +miler +miles +milestone +milestone's +milestones +militant +militantly +militantness +militants +militaries +militarily +militarism +militarisms +military +militia +militias +milk +milked +milker +milkers +milkier +milkiness +milking +milkmaid +milkmaid's +milkmaids +milks +milky +mill +milled +miller +millers +millet +milling +million +millionaire +millionaire's +millionaires +millioned +millions +millionth +millipede +millipede's +millipedes +millisecond +milliseconds +mills +millstone +millstone's +millstones +mimic +mimicked +mimicking +mimics +mince +minced +mincer +mincers +minces +mincing +mincingly +mind +minded +mindedness +minder +minders +mindful +mindfully +mindfulness +minding +mindless +mindlessly +mindlessness +minds +mine +mined +miner +mineral +mineral's +minerals +miners +mines +ming +mingle +mingled +mingles +mingling +miniature +miniature's +miniatured +miniatures +miniaturing +minicomputer +minicomputer's +minicomputers +minimal +minimally +minimum +minimums +mining +minion +minions +minister +minister's +ministered +ministering +ministers +ministries +ministry +ministry's +mink +mink's +minks +minnow +minnow's +minnows +minor +minor's +minored +minoring +minorities +minority +minority's +minors +minstrel +minstrel's +minstrels +mint +minted +minter +minting +mints +minus +minuses +minute +minuted +minutely +minuteness +minuter +minutes +minutest +minuting +miracle +miracle's +miracles +miraculous +miraculously +miraculousness +mire +mired +mires +miring +mirror +mirrored +mirroring +mirrors +mirth +misapplication +misapplied +misapplier +misapplies +misapply +misapplying +misbehaving +miscalculation +miscalculation's +miscalculations +miscellaneous +miscellaneously +miscellaneousness +mischief +mischievous +mischievously +mischievousness +miscommunicate +miscommunicated +miscommunicates +miscommunication +misconception +misconception's +misconceptions +misconstrue +misconstrued +misconstrues +misconstruing +misdirect +misdirected +misdirection +misdirects +miser +miserable +miserableness +miserably +miseries +miserliness +miserly +misers +misery +misery's +misfeature +misfit +misfit's +misfits +misfortune +misfortune's +misfortunes +misgiving +misgivingly +misgivings +misguide +misguided +misguidedly +misguidedness +misguider +misguides +misguiding +mishap +mishap's +mishaps +misinform +misinformation +misinformed +misinforming +misinforms +misinterpret +misinterpreted +misinterpreter +misinterpreters +misinterpreting +misinterprets +mislead +misleader +misleading +misleadingly +misleadings +misleads +misled +mismatch +mismatched +mismatches +mismatching +misnomer +misnomered +misperceive +misperceived +misperceives +misplace +misplaced +misplaces +misplacing +misread +misreader +misreading +misreads +misrepresentation +misrepresentation's +misrepresentations +miss +missed +misses +missile +missile's +missiles +missing +mission +missionaries +missionary +missionary's +missioned +missioner +missioning +missions +missive +missives +misspell +misspelled +misspelling +misspellings +misspells +misstate +misstated +misstater +misstates +misstating +mist +mistakable +mistake +mistaken +mistakenly +mistaker +mistakes +mistaking +mistakingly +misted +mister +mistered +mistering +misters +mistier +mistiest +mistiness +misting +mistreat +mistreated +mistreating +mistreats +mistress +mistressly +mistrust +mistrusted +mistruster +mistrusting +mistrusts +mists +misty +mistype +mistyped +mistypes +mistyping +misunderstand +misunderstander +misunderstanders +misunderstanding +misunderstanding's +misunderstandings +misunderstands +misunderstood +misuse +misused +misuser +misuses +misusing +mite +mites +mitigate +mitigated +mitigates +mitigating +mitigation +mitigations +mitigative +mitten +mitten's +mittens +mix +mixed +mixer +mixers +mixes +mixing +mixture +mixture's +mixtures +ml +mnemonic +mnemonic's +mnemonically +mnemonics +moan +moaned +moaning +moans +moat +moat's +moats +mob +mob's +mobile +mobility +mobs +moccasin +moccasin's +moccasins +mock +mocked +mocker +mockers +mockery +mocking +mockingly +mocks +modal +modalities +modality +modality's +modally +mode +model +model's +models +modem +modems +moderate +moderated +moderately +moderateness +moderates +moderating +moderation +moderations +moderator +moderator's +moderators +modern +modernity +modernly +modernness +moderns +modes +modest +modestly +modesty +modifiability +modifiable +modifiableness +modification +modifications +modified +modifier +modifiers +modifies +modify +modifying +modular +modularities +modularity +modularly +modulate +modulated +modulates +modulating +modulation +modulations +modulator +modulator's +modulators +module +module's +modules +modulo +modulus +modus +moist +moisten +moistened +moistener +moistening +moistly +moistness +moisture +moistures +molasses +mold +molded +molder +moldered +moldering +molders +moldier +moldiness +molding +molds +moldy +mole +molecular +molecularly +molecule +molecule's +molecules +moles +molest +molested +molester +molesters +molesting +molests +molten +mom +mom's +moment +moment's +momentarily +momentariness +momentary +momently +momentous +momentously +momentousness +moments +momentum +momentums +moms +monarch +monarchies +monarchs +monarchy +monarchy's +monasteries +monastery +monastery's +monastic +monetary +money +money's +moneyed +moneyer +moneys +monitor +monitored +monitoring +monitors +monk +monk's +monkey +monkeyed +monkeying +monkeys +monks +mono +mono's +monochrome +monochromes +monograph +monograph's +monographes +monographs +monolithic +monopolies +monopoly +monopoly's +monotheism +monotone +monotonic +monotonically +monotonicity +monotonous +monotonously +monotonousness +monotony +monster +monster's +monsters +monstrous +monstrously +monstrousness +month +month's +monthlies +monthly +months +monument +monument's +monumental +monumentally +monuments +mood +mood's +moodier +moodiness +moods +moody +moon +mooned +mooning +moonlight +moonlighted +moonlighter +moonlighting +moonlights +moonlit +moons +moonshine +moonshiner +moor +moor's +moored +mooring +moorings +moors +moose +moot +mooted +mop +moped +moper +moping +mops +moral +moral's +morale +morales +moralities +morality +morally +morals +morass +morasses +morbid +morbidly +morbidness +more +mored +moreover +mores +morion +morn +morning +mornings +morphological +morphologically +morphology +morrow +morsel +morsel's +morsels +mortal +mortality +mortally +mortals +mortar +mortared +mortaring +mortars +mortgage +mortgage's +mortgaged +mortgager +mortgages +mortgaging +mortification +mortifications +mortified +mortifiedly +mortifier +mortifies +mortify +mortifying +mosaic +mosaic's +mosaics +mosquito +mosquitoes +mosquitos +moss +moss's +mosses +mossier +mossy +most +mostly +motel +motel's +motels +moth +mother +mother's +motherboard +motherboard's +motherboards +mothered +motherer +motherers +mothering +motherliness +motherly +mothers +motif +motif's +motifs +motion +motioned +motioner +motioning +motionless +motionlessly +motionlessness +motions +motivate +motivated +motivates +motivating +motivation +motivational +motivationally +motivations +motivative +motive +motived +motives +motiving +motley +motor +motorcar +motorcar's +motorcars +motorcycle +motorcycle's +motorcycles +motored +motoring +motorist +motorist's +motorists +motors +motto +mottoes +mottos +mould +moulded +moulder +mouldering +moulding +moulds +mound +mounded +mounds +mount +mountain +mountain's +mountaineer +mountaineering +mountaineers +mountainous +mountainously +mountainousness +mountains +mounted +mounter +mounting +mountings +mounts +mourn +mourned +mourner +mourners +mournful +mournfully +mournfulness +mourning +mourningly +mourns +mouse +mouser +mouses +mousing +mouth +mouthed +mouther +mouthes +mouthful +mouthing +mouths +movable +movableness +move +moved +movement +movement's +movements +mover +movers +moves +movie +movie's +movies +moving +movingly +movings +mow +mowed +mower +mowers +mowing +mows +much +muchness +muck +mucked +mucker +mucking +mucks +mud +muddied +muddier +muddiness +muddle +muddled +muddler +muddlers +muddles +muddling +muddy +muddying +muds +muff +muff's +muffin +muffin's +muffins +muffle +muffled +muffler +mufflers +muffles +muffling +muffs +mug +mug's +mugs +mulberries +mulberry +mulberry's +mule +mule's +mules +muling +multicellular +multicomponent +multidimensional +multilevel +multinational +multiple +multiple's +multiples +multiplex +multiplexed +multiplexer +multiplexers +multiplexes +multiplexing +multiplexor +multiplexor's +multiplexors +multiplicand +multiplicand's +multiplicands +multiplication +multiplications +multiplicative +multiplicatively +multiplicatives +multiplicity +multiplied +multiplier +multipliers +multiplies +multiply +multiplying +multiprocess +multiprocessing +multiprocessor +multiprocessor's +multiprocessors +multiprogram +multiprogrammed +multiprogramming +multiprogrammings +multistage +multitasking +multitude +multitude's +multitudes +multiuser +multivariate +mumble +mumbled +mumbler +mumblers +mumbles +mumbling +mumblings +mummies +mummy +mummy's +munch +munched +muncher +munches +munching +mundane +mundanely +mundaneness +municipal +municipalities +municipality +municipality's +municipally +munition +munitions +mural +murals +murder +murdered +murderer +murderers +murdering +murderous +murderously +murderousness +murders +murkier +murkiness +murky +murmur +murmured +murmurer +murmuring +murmurs +muscle +muscled +muscles +muscling +muscular +muscularly +muse +mused +muser +muses +museum +museum's +museums +mushier +mushiness +mushroom +mushroomed +mushrooming +mushrooms +mushy +music +musical +musically +musicals +musician +musicianly +musicians +musics +musing +musingly +musings +musk +musket +musket's +muskets +muskrat +muskrat's +muskrats +musks +muslin +mussel +mussel's +mussels +must +mustard +mustards +muster +mustered +mustering +musters +mustier +mustiness +musts +musty +mutability +mutable +mutableness +mutate +mutated +mutates +mutating +mutation +mutations +mutative +mutator +mutators +mute +muted +mutedly +mutely +muteness +muter +mutes +mutest +mutilate +mutilated +mutilates +mutilating +mutilation +mutilations +muting +mutinies +mutiny +mutiny's +mutter +muttered +mutterer +mutterers +muttering +mutters +mutton +mutual +mutually +muzzle +muzzle's +muzzled +muzzler +muzzles +muzzling +my +myriad +myrtle +myself +mysteries +mysterious +mysteriously +mysteriousness +mystery +mystery's +mystic +mystic's +mystical +mystically +mysticism +mysticisms +mystics +myth +myth's +mythes +mythical +mythically +mythologies +mythology +mythology's +nag +nag's +nags +nail +nailed +nailer +nailing +nails +naive +naively +naiveness +naiver +naivete +naked +nakedly +nakedness +name +name's +nameable +named +nameless +namelessly +namelessness +namely +namer +namers +names +namesake +namesake's +namesakes +naming +nanosecond +nanoseconds +nap +nap's +napkin +napkin's +napkins +naps +narcissistic +narcissus +narcissuses +narcotic +narcotics +narrative +narrative's +narratively +narratives +narrow +narrowed +narrower +narrowest +narrowing +narrowingness +narrowly +narrowness +narrows +nasal +nasally +nastier +nasties +nastiest +nastily +nastiness +nasty +nation +nation's +national +nationalist +nationalist's +nationalists +nationalities +nationality +nationality's +nationally +nationals +nations +nationwide +native +natively +nativeness +natives +nativity +natural +naturalism +naturalist +naturally +naturalness +naturals +nature +nature's +natured +natures +naught +naught's +naughtier +naughtiness +naughts +naughty +naval +navally +navies +navigable +navigableness +navigate +navigated +navigates +navigating +navigation +navigations +navigator +navigator's +navigators +navy +navy's +nay +near +nearby +neared +nearer +nearest +nearing +nearly +nearness +nears +neat +neaten +neater +neatest +neatly +neatness +neats +nebula +necessaries +necessarily +necessary +necessitate +necessitated +necessitates +necessitating +necessitation +necessitations +necessities +necessity +neck +necked +necker +necking +necklace +necklace's +necklaces +necks +necktie +necktie's +neckties +need +needed +needer +needful +needfully +needfulness +needier +neediness +needing +needle +needled +needler +needlers +needles +needless +needlessly +needlessness +needlework +needleworker +needling +needly +needn't +needs +needy +negate +negated +negater +negates +negating +negation +negations +negative +negatived +negatively +negativeness +negatives +negativing +negator +negators +neglect +neglected +neglecter +neglecting +neglects +negligence +negligible +negotiable +negotiate +negotiated +negotiates +negotiating +negotiation +negotiations +neigh +neither +neophyte +neophytes +nephew +nephew's +nephews +nerve +nerve's +nerved +nerves +nerving +nervous +nervously +nervousness +nest +nested +nester +nesting +nestle +nestled +nestler +nestles +nestling +nests +net +net's +nether +nets +netted +netting +nettle +nettled +nettles +nettling +network +network's +networked +networking +networks +neural +neurally +neurobiology +neurobiology's +neurological +neurologically +neurologists +neuron +neuron's +neurons +neutral +neutralities +neutrality +neutrally +neutralness +neutrals +neutrino +neutrino's +neutrinos +never +nevertheless +new +newborn +newborns +newcomer +newcomer's +newcomers +newer +newest +newline +newline's +newlines +newly +newness +news +newsgroup +newsgroup's +newsgroups +newsletter +newsletter's +newsletters +newsman +newsmen +newspaper +newspaper's +newspapers +newswire +newt +newts +next +nibble +nibbled +nibbler +nibblers +nibbles +nibbling +nice +nicely +niceness +nicer +nicest +niceties +nicety +niche +niches +niching +nick +nicked +nickel +nickel's +nickels +nicker +nickered +nickering +nicking +nickname +nicknamed +nicknamer +nicknames +nicks +nicotine +niece +niece's +nieces +niftier +nifties +nifty +nigh +night +night's +nighted +nighters +nightfall +nightgown +nightingale +nightingale's +nightingales +nightly +nightmare +nightmare's +nightmares +nights +nil +nilly +nimble +nimbleness +nimbler +nimblest +nimbly +nine +nines +nineteen +nineteens +nineteenth +nineties +ninetieth +ninety +ninth +nip +nips +nitrogen +nix +nixed +nixer +nixes +nixing +no +nobilities +nobility +noble +nobleman +nobleness +nobler +nobles +noblest +nobly +nobodies +nobody +nobody's +nocturnal +nocturnally +nod +nod's +nodded +nodding +node +node's +nodes +nods +noise +noised +noiseless +noiselessly +noises +noisier +noisily +noisiness +noising +noisy +nomenclature +nomenclatures +nominal +nominally +nominate +nominated +nominates +nominating +nomination +nomination's +nominations +nominative +nominatively +non +nonblocking +nonconservative +noncyclic +nondecreasing +nondescript +nondescriptly +nondestructively +nondeterminacy +nondeterminate +nondeterminately +nondeterminism +nondeterministic +nondeterministically +nondisclosure +nondisclosures +none +nonempty +nones +nonetheless +nonexistence +nonexistent +nonextensible +nonfunctional +noninteracting +noninterference +nonintuitive +nonlinear +nonlinearities +nonlinearity +nonlinearity's +nonlinearly +nonlocal +nonnegative +nonorthogonal +nonorthogonality +nonperishable +nonprocedural +nonprocedurally +nonprogrammable +nonprogrammer +nonsense +nonsensical +nonsensically +nonsensicalness +nonspecialist +nonspecialist's +nonspecialists +nonstandard +nontechnical +nontechnically +nonterminal +nonterminal's +nonterminals +nonterminating +nontermination +nontrivial +nonuniform +nonzero +nook +nook's +nooks +noon +noonday +nooning +noons +noontide +nope +nor +norm +norm's +normal +normalcy +normality +normally +normals +normed +norms +north +north's +northeast +northeaster +northeasterly +northeastern +norther +northerly +northern +northerner +northerners +northernly +northers +northing +northward +northwards +northwest +northwester +northwesterly +northwestern +nose +nosed +noses +nosing +nostril +nostril's +nostrils +not +notable +notableness +notables +notably +notation +notation's +notational +notationally +notations +notch +notched +notches +notching +note +notebook +notebook's +notebooks +noted +notedly +notedness +noter +notes +noteworthiness +noteworthy +nothing +nothingness +nothings +notice +noticeable +noticeably +noticed +notices +noticing +notification +notifications +notified +notifier +notifiers +notifies +notify +notifying +noting +notion +notions +notorious +notoriously +notoriousness +notwithstanding +noun +noun's +nouns +nourish +nourished +nourisher +nourishes +nourishing +nourishment +novel +novel's +novelist +novelist's +novelists +novels +novelties +novelty +novelty's +novice +novice's +novices +now +nowadays +nowhere +nowheres +nows +nroff +nroff's +nth +nuances +nuclear +nucleotide +nucleotide's +nucleotides +nucleus +nucleuses +nuisance +nuisance's +nuisances +null +nulled +nullification +nullified +nullifier +nullifiers +nullifies +nullify +nullifying +nulls +numb +numbed +number +numbered +numberer +numbering +numberless +numbers +numbing +numbingly +numbly +numbness +numbs +numeral +numeral's +numerally +numerals +numerator +numerator's +numerators +numeric +numerical +numerically +numerics +numerous +numerously +numerousness +nun +nun's +nuns +nuptial +nuptials +nurse +nurse's +nursed +nurser +nurseries +nursery +nursery's +nurses +nursing +nurture +nurtured +nurturer +nurtures +nurturing +nut +nut's +nutrition +nutrition's +nuts +nymph +nymphs +o'clock +oak +oaken +oaks +oar +oar's +oared +oaring +oars +oasis +oat +oaten +oater +oath +oaths +oatmeal +oats +obedience +obediences +obedient +obediently +obey +obeyed +obeyer +obeying +obeys +obfuscate +obfuscated +obfuscater +obfuscates +obfuscating +obfuscation +obfuscations +object +object's +objected +objecting +objection +objection's +objectionable +objectionableness +objections +objective +objectively +objectiveness +objectives +objector +objector's +objectors +objects +oblate +oblately +oblateness +oblation +oblations +obligate +obligated +obligately +obligates +obligating +obligation +obligation's +obligations +obligatory +oblige +obliged +obliger +obliges +obliging +obligingly +obligingness +oblique +obliquely +obliqueness +obliterate +obliterated +obliterates +obliterating +obliteration +obliterations +obliterative +obliteratively +oblivion +oblivions +oblivious +obliviously +obliviousness +oblong +oblongly +oblongness +obscene +obscenely +obscure +obscured +obscurely +obscureness +obscurer +obscures +obscuring +obscurities +obscurity +observable +observance +observance's +observances +observant +observantly +observation +observation's +observations +observatories +observatory +observe +observed +observer +observers +observes +observing +observingly +obsession +obsession's +obsessions +obsolescence +obsolete +obsoleted +obsoletely +obsoleteness +obsoletes +obsoleting +obstacle +obstacle's +obstacles +obstinacy +obstinate +obstinately +obstinateness +obstruct +obstructed +obstructer +obstructing +obstruction +obstruction's +obstructionist +obstructions +obstructive +obstructively +obstructiveness +obstructs +obtain +obtainable +obtainably +obtained +obtainer +obtaining +obtains +obviate +obviated +obviates +obviating +obviation +obviations +obvious +obviously +obviousness +occasion +occasional +occasionally +occasioned +occasioning +occasionings +occasions +occlude +occluded +occludes +occluding +occlusion +occlusion's +occlusions +occupancies +occupancy +occupant +occupant's +occupants +occupation +occupation's +occupational +occupationally +occupations +occupied +occupier +occupiers +occupies +occupy +occupying +occur +occurred +occurrence +occurrence's +occurrences +occurring +occurs +ocean +ocean's +oceans +octal +octals +octave +octaves +octopus +odd +odder +oddest +oddities +oddity +oddity's +oddly +oddness +odds +ode +ode's +oded +oder +odes +odious +odiously +odiousness +odorous +odorously +odorousness +of +off +offend +offended +offender +offenders +offending +offends +offensive +offensively +offensiveness +offensives +offer +offered +offerer +offerers +offering +offerings +offers +office +office's +officer +officer's +officered +officers +offices +official +official's +officially +officials +officiate +officiated +officiates +officiating +officiation +officiations +officio +officious +officiously +officiousness +offing +offs +offset +offset's +offsets +offspring +offsprings +oft +often +oftener +oftentimes +oh +oil +oilcloth +oiled +oiler +oilers +oilier +oiliest +oiliness +oiling +oils +oily +ointment +ointments +okay +okay's +okays +old +olden +older +oldest +oldness +olive +olive's +oliver +olives +omen +omen's +omens +ominous +ominously +ominousness +omission +omission's +omissions +omit +omits +omitted +omitting +omnipresent +omnipresently +omniscient +omnisciently +omnivore +on +onanism +once +oncer +one +one's +oneness +oner +onerous +onerously +onerousness +ones +oneself +ongoing +onion +onions +online +onliness +only +ons +onset +onset's +onsets +onto +onward +onwards +oops +ooze +oozed +oozes +oozing +opacities +opacity +opal +opal's +opals +opaque +opaquely +opaqueness +opcode +opcode's +opcodes +open +opened +opener +openers +openest +opening +opening's +openings +openly +openness +opens +opera +opera's +operable +operand +operand's +operandi +operands +operas +operate +operated +operates +operating +operation +operational +operationally +operations +operative +operatively +operativeness +operatives +operator +operator's +operators +opiate +opiates +opinion +opinion's +opinions +opium +opponent +opponent's +opponents +opportune +opportunely +opportunism +opportunistic +opportunistically +opportunities +opportunity +opportunity's +oppose +opposed +opposer +opposes +opposing +opposite +oppositely +oppositeness +opposites +opposition +oppositions +oppress +oppressed +oppresses +oppressing +oppression +oppressive +oppressively +oppressiveness +oppressor +oppressor's +oppressors +opt +opted +optic +optical +optically +optics +optimal +optimality +optimally +optimism +optimistic +optimistically +optimum +opting +option +option's +optional +optionally +options +opts +or +or's +oracle +oracle's +oracles +oral +orally +orals +orange +orange's +oranges +oration +oration's +orations +orator +orator's +oratories +orators +oratory +oratory's +orb +orbit +orbital +orbitally +orbitals +orbited +orbiter +orbiters +orbiting +orbits +orchard +orchard's +orchards +orchestra +orchestra's +orchestras +orchid +orchid's +orchids +ordain +ordained +ordainer +ordaining +ordains +ordeal +ordeals +order +ordered +orderer +ordering +orderings +orderlies +orderliness +orderly +orders +ordinal +ordinance +ordinance's +ordinances +ordinaries +ordinarily +ordinariness +ordinary +ordinate +ordinated +ordinates +ordinating +ordination +ordinations +ore +ore's +ores +organ +organ's +organic +organics +organism +organism's +organisms +organist +organist's +organists +organs +orgies +orgy +orgy's +orient +orientation +orientation's +orientations +oriented +orienting +orients +orifice +orifice's +orifices +origin +origin's +original +originality +originally +originals +originate +originated +originates +originating +origination +originations +originative +originatively +originator +originator's +originators +origins +orion +orly +ornament +ornamental +ornamentally +ornamentation +ornamentations +ornamented +ornamenting +ornaments +orphan +orphaned +orphaning +orphans +orthodox +orthodoxes +orthodoxly +orthogonal +orthogonality +orthogonally +oscillate +oscillated +oscillates +oscillating +oscillation +oscillation's +oscillations +oscillator +oscillator's +oscillators +oscillatory +oscilloscope +oscilloscope's +oscilloscopes +ostrich +ostrich's +ostriches +other +other's +otherness +others +otherwise +otter +otter's +otters +ought +oughts +ounce +ounces +our +ours +ourself +ourselves +out +outbreak +outbreak's +outbreaks +outburst +outburst's +outbursts +outcast +outcast's +outcasts +outcome +outcome's +outcomes +outcries +outcry +outdoor +outdoors +outed +outer +outermost +outfit +outfit's +outfits +outgoing +outgoingness +outgoings +outgrew +outgrow +outgrowing +outgrown +outgrows +outgrowth +outing +outing's +outings +outlast +outlasts +outlaw +outlawed +outlawing +outlaws +outlay +outlay's +outlays +outlet +outlet's +outlets +outline +outlined +outlines +outlining +outlive +outlived +outlives +outliving +outlook +outness +outperform +outperformed +outperforming +outperforms +outpost +outpost's +outposts +output +output's +outputs +outputting +outrage +outraged +outrageous +outrageously +outrageousness +outrages +outraging +outright +outrightly +outrun +outruns +outs +outset +outside +outsider +outsider's +outsiderness +outsiders +outskirts +outstanding +outstandingly +outstretched +outstrip +outstripped +outstripping +outstrips +outvote +outvoted +outvotes +outvoting +outward +outwardly +outwardness +outwards +outweigh +outweighed +outweighing +outweighs +outwit +outwits +outwitted +outwitting +oval +oval's +ovally +ovalness +ovals +ovaries +ovary +ovary's +oven +oven's +ovens +over +overall +overall's +overalls +overblown +overboard +overcame +overcast +overcasting +overcoat +overcoat's +overcoating +overcoats +overcome +overcomer +overcomes +overcoming +overcrowd +overcrowded +overcrowding +overcrowds +overdone +overdose +overdose's +overdosed +overdoses +overdosing +overdraft +overdraft's +overdrafts +overdraw +overdrawing +overdrawn +overdraws +overdrew +overdue +overemphasis +overestimate +overestimated +overestimates +overestimating +overestimation +overestimations +overflow +overflowed +overflowing +overflows +overhang +overhanging +overhangs +overhaul +overhauled +overhauler +overhauling +overhaulings +overhauls +overhead +overheads +overhear +overheard +overhearer +overhearing +overhears +overing +overjoy +overjoyed +overkill +overkill's +overlaid +overland +overlap +overlap's +overlapped +overlapping +overlaps +overlay +overlaying +overlays +overload +overloaded +overloading +overloads +overlook +overlooked +overlooking +overlooks +overly +overlying +overnight +overnighter +overnighters +overnights +overpower +overpowered +overpowering +overpoweringly +overpowers +overprint +overprinted +overprinting +overprints +overproduction +overridden +override +overrider +overrides +overriding +overrode +overrule +overruled +overrules +overruling +overrun +overruns +overs +overseas +oversee +overseeing +overseer +overseers +oversees +overshadow +overshadowed +overshadowing +overshadows +overshoot +overshooting +overshoots +overshot +oversight +oversight's +oversights +oversimplification +oversimplifications +oversimplified +oversimplifies +oversimplify +oversimplifying +overstate +overstated +overstatement +overstatement's +overstatements +overstates +overstating +overstocks +overt +overtake +overtaken +overtaker +overtakers +overtakes +overtaking +overthrew +overthrow +overthrowing +overthrown +overthrows +overtime +overtly +overtness +overtone +overtone's +overtones +overtook +overture +overture's +overtures +overturn +overturned +overturning +overturns +overuse +overview +overview's +overviews +overweight +overwhelm +overwhelmed +overwhelming +overwhelmingly +overwhelms +overwork +overworked +overworking +overworks +overwrite +overwrites +overwriting +overwritten +overwrote +overzealous +overzealousness +ovum +owe +owed +owes +owing +owl +owl's +owler +owls +own +owned +owner +owner's +owners +ownership +ownerships +owning +owns +ox +oxen +oxidation +oxide +oxide's +oxides +oxygen +oxygens +oyster +oyster's +oystering +oysters +pa +pace +pace's +paced +pacer +pacers +paces +pacific +pacification +pacifications +pacified +pacifier +pacifies +pacify +pacifying +pacing +pack +package +packaged +packager +packagers +packages +packaging +packagings +packed +packer +packers +packet +packet's +packeted +packeting +packets +packing +packs +pact +pact's +pacts +pad +pad's +padded +paddies +padding +paddings +paddle +paddled +paddler +paddles +paddling +paddy +pads +pagan +pagan's +pagans +page +page's +pageant +pageant's +pageants +paged +pager +pager's +pagers +pages +paginate +paginated +paginates +paginating +pagination +paginations +paging +paid +pail +pail's +pails +pain +pained +painful +painfully +painfulness +paining +painless +painlessly +painlessness +pains +painstaking +painstakingly +paint +painted +painter +painterliness +painterly +painters +painting +paintings +paints +pair +paired +pairing +pairings +pairs +pairwise +pal +pal's +palace +palace's +palaces +palate +palate's +palates +pale +paled +palely +paleness +paler +pales +palest +palfrey +paling +pall +palliate +palliation +palliative +palliatively +palliatives +pallid +pallidly +pallidness +palling +pally +palm +palmed +palmer +palming +palms +pals +pamphlet +pamphlet's +pamphlets +pan +pan's +panacea +panacea's +panaceas +pancake +pancake's +pancaked +pancakes +pancaking +pancreas +panda +panda's +pandas +pandemonium +pander +pandered +panderer +pandering +panders +pane +pane's +panel +panelist +panelist's +panelists +panels +panes +pang +pang's +pangs +panic +panic's +panics +panned +panning +pans +pansies +pansy +pansy's +pant +panted +panther +panther's +panthers +panties +panting +pantries +pantry +pantry's +pants +panty +papa +papal +papally +paper +paper's +paperback +paperback's +paperbacks +papered +paperer +paperers +papering +paperings +papers +paperwork +paprika +par +parachute +parachute's +parachuted +parachuter +parachutes +parachuting +parade +paraded +parader +parades +paradigm +paradigm's +paradigms +parading +paradise +paradox +paradox's +paradoxes +paradoxical +paradoxically +paradoxicalness +paraffin +paraffins +paragon +paragon's +paragons +paragraph +paragraphed +paragrapher +paragraphing +paragraphs +parallax +parallax's +parallel +parallelism +parallelogram +parallelogram's +parallelograms +parallels +paralysis +parameter +parameter's +parameterless +parameters +parametric +paramilitary +paramount +paranoia +paranoid +parapet +parapet's +parapeted +parapets +paraphrase +paraphrased +paraphraser +paraphrases +paraphrasing +parasite +parasite's +parasites +parasitic +parasitics +parcel +parcels +parch +parched +parchment +pardon +pardonable +pardonableness +pardonably +pardoned +pardoner +pardoners +pardoning +pardons +pare +parent +parent's +parentage +parental +parentally +parentheses +parenthesis +parenthetical +parenthetically +parenthood +parenting +parents +parer +pares +paring +parings +parish +parish's +parishes +parities +parity +park +parked +parker +parkers +parking +parks +parliament +parliament's +parliamentary +parliaments +parole +paroled +paroles +paroling +parried +parrot +parroting +parrots +parry +parrying +pars +parse +parsed +parser +parser's +parsers +parses +parsimony +parsing +parsings +parsley +parson +parson's +parsons +part +partake +partaker +partakes +partaking +parted +parter +parters +partial +partiality +partially +partials +participant +participant's +participants +participate +participated +participates +participating +participation +participations +participative +participatory +particle +particle's +particles +particular +particularly +particulars +partied +parties +parting +partings +partisan +partisan's +partisans +partition +partitioned +partitioner +partitioning +partitions +partly +partner +partner's +partnered +partnering +partners +partnership +partnerships +partridge +partridge's +partridges +parts +party +party's +partying +pas +pass +passage +passage's +passaged +passages +passageway +passaging +passe +passed +passenger +passenger's +passengerly +passengers +passer +passers +passes +passing +passion +passionate +passionately +passionateness +passions +passive +passively +passiveness +passives +passivity +passport +passport's +passports +password +password's +passworded +passwords +past +past's +paste +pasted +pastes +pastime +pastime's +pastimes +pasting +pastness +pastor +pastor's +pastoral +pastorally +pastoralness +pastors +pastries +pastry +pasts +pasture +pasture's +pastured +pasturer +pastures +pasturing +pat +pat's +patch +patched +patcher +patches +patching +patchwork +patchworker +patchworkers +pated +paten +patent +patentable +patented +patenter +patenters +patenting +patently +patents +pater +paternal +paternally +path +pathetic +pathname +pathname's +pathnames +pathological +pathologically +pathologies +pathologist +pathologist's +pathologists +pathology +pathos +paths +pathway +pathway's +pathways +patience +patient +patient's +patiently +patients +patriarch +patriarchs +patrician +patrician's +patricians +patriot +patriot's +patriotic +patriotism +patriots +patrol +patrol's +patrols +patron +patron's +patronage +patronly +patrons +pats +patter +pattered +patterer +pattering +patterings +pattern +patterned +patterning +patterns +patters +patties +patty +patty's +paucity +pause +paused +pauses +pausing +pave +paved +pavement +pavement's +pavements +paver +paves +pavilion +pavilion's +pavilions +paving +paw +pawed +pawing +pawn +pawn's +pawned +pawner +pawning +pawns +paws +pay +payable +paycheck +paycheck's +paychecks +payed +payer +payer's +payers +paying +payment +payment's +payments +payoff +payoff's +payoffs +payroll +payrolls +pays +pea +pea's +peace +peaceable +peaceableness +peaceful +peacefully +peacefulness +peaces +peach +peach's +peaches +peacock +peacock's +peacocks +peak +peaked +peakedness +peaking +peaks +peal +pealed +pealing +peals +peanut +peanut's +peanuts +pear +pearl +pearl's +pearler +pearlier +pearls +pearly +pears +peas +peasant +peasant's +peasantry +peasants +peat +pebble +pebble's +pebbled +pebbles +pebbling +peck +pecked +pecker +pecking +pecks +peculiar +peculiarities +peculiarity +peculiarity's +peculiarly +peculiars +pedagogic +pedagogical +pedagogically +pedagogics +pedantic +peddler +peddler's +peddlers +pedestal +pedestals +pedestrian +pedestrian's +pedestrians +pediatric +pediatrics +peek +peeked +peeking +peeks +peel +peeled +peeler +peeler's +peeling +peels +peep +peeped +peeper +peepers +peeping +peeps +peer +peered +peering +peerless +peerlessly +peerlessness +peers +peeve +peeve's +peeved +peevers +peeves +peeving +peg +peg's +pegs +pellet +pellet's +pelleted +pelleting +pellets +pelt +pelter +pelting +pelts +pen +penalties +penalty +penalty's +penance +penanced +penances +penancing +pence +pencil +pencils +pend +pended +pending +pends +pendulum +pendulum's +pendulums +penetrate +penetrated +penetrates +penetrating +penetratingly +penetration +penetrations +penetrative +penetratively +penetrativeness +penetrator +penetrator's +penetrators +penguin +penguin's +penguins +peninsula +peninsula's +peninsulas +penitent +penitentiary +penitently +penned +pennies +penniless +penning +penny +penny's +pens +pension +pensioned +pensioner +pensioners +pensioning +pensions +pensive +pensively +pensiveness +pent +pentagon +pentagon's +pentagons +penthouse +penthouse's +penthouses +people +people's +peopled +peoples +peopling +pep +pepper +peppercorn +peppercorn's +peppercorns +peppered +pepperer +peppering +peppers +per +perceivable +perceivably +perceive +perceived +perceiver +perceivers +perceives +perceiving +percent +percentage +percentages +percentile +percentiles +percents +perceptible +perceptibly +perception +perceptions +perceptive +perceptively +perceptiveness +perceptual +perceptually +perch +perchance +perched +perches +perching +percolate +percolated +percolates +percolating +percolation +percutaneous +percutaneously +peremptoriness +peremptory +perennial +perennially +perennials +perfect +perfected +perfecter +perfecting +perfection +perfectionist +perfectionist's +perfectionists +perfections +perfective +perfectively +perfectiveness +perfectly +perfectness +perfects +perforce +perform +performance +performance's +performances +performed +performer +performers +performing +performs +perfume +perfumed +perfumer +perfumes +perfuming +perhaps +peril +peril's +perilous +perilously +perilousness +perils +period +period's +periodic +periodical +periodically +periodicals +periods +peripheral +peripherally +peripherals +peripheries +periphery +periphery's +perish +perishable +perishable's +perishables +perished +perisher +perishers +perishes +perishing +perishingly +permanence +permanent +permanently +permanentness +permanents +permeate +permeated +permeates +permeating +permeation +permeations +permeative +permissibility +permissible +permissibleness +permissibly +permission +permissions +permissive +permissively +permissiveness +permit +permit's +permits +permitted +permitting +permutation +permutation's +permutations +permute +permuted +permutes +permuting +perpendicular +perpendicularly +perpendiculars +perpetrate +perpetrated +perpetrates +perpetrating +perpetration +perpetrations +perpetrator +perpetrator's +perpetrators +perpetual +perpetually +perpetuate +perpetuated +perpetuates +perpetuating +perpetuation +perplex +perplexed +perplexedly +perplexes +perplexing +perplexities +perplexity +persecute +persecuted +persecutes +persecuting +persecution +persecutive +persecutor +persecutor's +persecutors +perseverance +persevere +persevered +perseveres +persevering +persist +persisted +persistence +persistent +persistently +persister +persisting +persists +person +person's +personable +personableness +personage +personage's +personages +personal +personalities +personality +personality's +personally +personals +personification +personifications +personified +personifier +personifies +personify +personifying +personnel +persons +perspective +perspective's +perspectively +perspectives +perspicuous +perspicuously +perspicuousness +perspiration +perspirations +persuadable +persuade +persuaded +persuader +persuaders +persuades +persuading +persuasion +persuasion's +persuasions +persuasive +persuasively +persuasiveness +pertain +pertained +pertaining +pertains +pertinent +pertinently +perturb +perturbation +perturbation's +perturbations +perturbed +perturbing +perusal +peruse +perused +peruser +perusers +peruses +perusing +pervade +pervaded +pervades +pervading +pervasive +pervasively +pervasiveness +pervert +perverted +pervertedly +pervertedness +perverter +perverting +perverts +pessimistic +pest +pester +pestered +pestering +pesters +pestilence +pestilences +pests +pet +petal +petal's +petals +peter +petered +peters +petition +petitioned +petitioner +petitioning +petitions +petroleum +pets +petted +petter +petter's +petters +petticoat +petticoat's +petticoated +petticoats +pettier +pettiest +pettiness +pettinesses +petting +petty +pew +pew's +pews +pewter +pewterer +phantom +phantom's +phantoms +phase +phased +phaser +phasers +phases +phasing +pheasant +pheasant's +pheasants +phenomena +phenomenal +phenomenally +phenomenological +phenomenologically +phenomenologies +phenomenology +phenomenon +philosopher +philosopher's +philosophers +philosophic +philosophical +philosophically +philosophies +philosophy +philosophy's +phone +phone's +phoned +phoneme +phoneme's +phonemes +phonemic +phonemics +phones +phonetic +phonetics +phoning +phonograph +phonographer +phonographs +phosphate +phosphate's +phosphates +phosphoric +photo +photo's +photocopied +photocopier +photocopies +photocopy +photocopying +photograph +photographed +photographer +photographers +photographic +photographing +photographs +photography +photos +phrase +phrased +phrases +phrasing +phrasings +phyla +phylum +physic +physical +physically +physicalness +physicals +physician +physician's +physicians +physicist +physicist's +physicists +physics +physiological +physiologically +physiology +physique +physiqued +pi +piano +piano's +pianos +piazza +piazza's +piazzas +picayune +pick +picked +picker +pickering +pickers +picket +picketed +picketer +picketers +picketing +pickets +picking +pickings +pickle +pickled +pickles +pickling +picks +pickup +pickup's +pickups +picnic +picnic's +picnics +pictorial +pictorially +pictorialness +picture +pictured +pictures +picturesque +picturesquely +picturesqueness +picturing +pie +piece +pieced +piecemeal +piecer +pieces +piecewise +piecing +pied +pier +pierce +pierced +pierces +piercing +piercingly +piers +pies +pieties +piety +pig +pig's +pigeon +pigeon's +pigeons +piggyback +pigment +pigmented +pigments +pigs +pike +pike's +piked +piker +pikes +piking +pile +piled +pilers +piles +pilferage +pilgrim +pilgrim's +pilgrimage +pilgrimage's +pilgrimages +pilgrims +piling +pilings +pill +pill's +pillage +pillaged +pillager +pillages +pillaging +pillar +pillared +pillars +pillow +pillow's +pillows +pills +pilot +pilot's +piloted +piloting +pilots +pin +pin's +pinch +pinched +pincher +pinches +pinching +pine +pineapple +pineapple's +pineapples +pined +pines +ping +pinger +pinging +pining +pinion +pinioned +pinions +pink +pinked +pinker +pinkest +pinking +pinkly +pinkness +pinks +pinnacle +pinnacle's +pinnacled +pinnacles +pinnacling +pinned +pinning +pinnings +pinpoint +pinpointed +pinpointing +pinpoints +pins +pint +pint's +pinter +pints +pioneer +pioneered +pioneering +pioneers +pious +piously +piousness +pipe +piped +pipeline +pipelined +pipelines +pipelining +piper +pipers +pipes +piping +pipingly +pipings +pique +piqued +piquing +pirate +pirate's +pirated +pirates +pirating +piss +pissed +pisser +pisses +pissing +pistil +pistil's +pistils +pistol +pistol's +pistols +piston +piston's +pistons +pit +pit's +pitch +pitched +pitcher +pitchers +pitches +pitching +piteous +piteously +piteousness +pitfall +pitfall's +pitfalls +pith +pithed +pithes +pithier +pithiest +pithiness +pithing +pithy +pitiable +pitiableness +pitied +pitier +pitiers +pities +pitiful +pitifully +pitifulness +pitiless +pitilessly +pitilessness +pits +pitted +pity +pitying +pityingly +pivot +pivotal +pivotally +pivoted +pivoting +pivots +pixel +pixel's +pixels +placard +placard's +placards +place +placed +placement +placement's +placements +placer +places +placid +placidly +placidness +placing +plague +plagued +plaguer +plagues +plaguing +plaid +plaid's +plaided +plaids +plain +plainer +plainest +plainly +plainness +plains +plaintiff +plaintiff's +plaintiffs +plaintive +plaintively +plaintiveness +plait +plait's +plaiter +plaiting +plaits +plan +plan's +planar +planarity +plane +plane's +planed +planer +planers +planes +planet +planet's +planetary +planets +planing +plank +planking +planks +planned +planner +planner's +planners +planning +plans +plant +plantation +plantation's +plantations +planted +planter +planters +planting +plantings +plants +plasma +plaster +plastered +plasterer +plasterers +plastering +plasters +plastic +plasticity +plasticly +plastics +plate +plateau +plateau's +plateaus +plated +platelet +platelet's +platelets +platen +platen's +platens +plater +platers +plates +platform +platform's +platforms +plating +platings +platinum +platter +platter's +platters +plausibility +plausible +plausibleness +play +playable +played +player +player's +players +playful +playfully +playfulness +playground +playground's +playgrounds +playing +playmate +playmate's +playmates +plays +plaything +plaything's +playthings +playwright +playwright's +playwrights +plea +plea's +plead +pleaded +pleader +pleading +pleadingly +pleadings +pleads +pleas +pleasant +pleasantly +pleasantness +please +pleased +pleasely +pleaser +pleases +pleasing +pleasingly +pleasingness +pleasurable +pleasurableness +pleasure +pleasured +pleasures +pleasuring +plebeian +plebeianly +plebiscite +plebiscite's +plebiscites +pledge +pledged +pledger +pledges +pledging +plenary +plenteous +plenteously +plenteousness +plenties +plentiful +plentifully +plentifulness +plenty +pleurisy +plication +plied +plier +pliers +plies +plight +plighter +plod +plods +plot +plot's +plots +plotted +plotter +plotter's +plotters +plotting +ploy +ploy's +ploys +pluck +plucked +plucker +pluckier +pluckiness +plucking +plucky +plug +plug's +plugged +plugging +plugs +plum +plum's +plumage +plumaged +plumages +plumb +plumb's +plumbed +plumber +plumbers +plumbing +plumbs +plume +plumed +plumes +pluming +plummeting +plump +plumped +plumpen +plumper +plumply +plumpness +plums +plunder +plundered +plunderer +plunderers +plundering +plunders +plunge +plunged +plunger +plungers +plunges +plunging +plural +plurality +plurally +plurals +plus +pluses +plush +plushly +plushness +ply +plying +pneumonia +poach +poached +poacher +poachers +poaches +poaching +pocket +pocketbook +pocketbook's +pocketbooks +pocketed +pocketing +pockets +pod +pod's +pods +poem +poem's +poems +poet +poet's +poetic +poetical +poetically +poeticalness +poetics +poetries +poetry +poetry's +poets +point +pointed +pointedly +pointedness +pointer +pointers +pointier +pointiest +pointing +pointless +pointlessly +pointlessness +points +pointy +poise +poised +poises +poising +poison +poisoned +poisoner +poisoning +poisonous +poisonously +poisonousness +poisons +poke +poked +poker +pokes +poking +polar +polarities +polarity +polarity's +pole +poled +polemic +polemics +poler +poles +police +police's +policed +policeman +policeman's +policemen +policemen's +polices +policies +policing +policy +policy's +poling +polish +polished +polisher +polishers +polishes +polishing +polite +politely +politeness +politer +politest +politic +political +politically +politician +politician's +politicians +politics +poll +polled +pollen +poller +polling +polls +pollute +polluted +polluter +pollutes +polluting +pollution +pollutive +polo +polygon +polygon's +polygons +polymer +polymer's +polymers +polynomial +polynomial's +polynomials +polyphonic +pomp +pompous +pompously +pompousness +pond +ponder +pondered +ponderer +pondering +ponderous +ponderously +ponderousness +ponders +ponds +ponies +pony +pony's +poof +pool +pooled +pooling +pools +poor +poorer +poorest +poorly +poorness +pop +pop's +pope +pope's +popes +poplar +popped +poppied +poppies +popping +poppy +poppy's +pops +populace +popular +popularity +popularly +populate +populated +populates +populating +population +populations +populous +populously +populousness +porcelain +porch +porch's +porches +porcupine +porcupine's +porcupines +pore +pored +pores +poring +pork +porker +porn +pornographic +porridge +port +portability +portable +portables +portably +portal +portal's +portals +portamento +portamento's +ported +portend +portended +portending +portends +porter +portering +porters +porting +portion +portion's +portioned +portioning +portions +portlier +portliness +portly +portrait +portrait's +portraits +portray +portrayed +portrayer +portraying +portrays +ports +pose +posed +poser +posers +poses +posing +posit +posited +positing +position +positional +positioned +positioning +positions +positive +positively +positiveness +positives +posits +possess +possessed +possessedly +possessedness +possesses +possessing +possession +possession's +possessional +possessions +possessive +possessive's +possessively +possessiveness +possessives +possessor +possessor's +possessors +possibilities +possibility +possibility's +possible +possibles +possibly +possum +possum's +possums +post +postage +postal +postcard +postcard's +postcards +postcondition +postconditions +posted +poster +poster's +posterior +posteriorly +posterity +posters +posting +postings +postman +postmaster +postmaster's +postmasters +postpone +postponed +postponer +postpones +postponing +posts +postscript +postscript's +postscripts +postulate +postulated +postulates +postulating +postulation +postulations +posture +posture's +postured +posturer +postures +posturing +pot +pot's +potash +potassium +potato +potatoes +potent +potentate +potentate's +potentates +potential +potentialities +potentiality +potentially +potentials +potentiating +potentiometer +potentiometer's +potentiometers +potently +pots +potted +potter +potter's +potterer +potteries +potters +pottery +potting +pouch +pouch's +pouched +pouches +poultry +pounce +pounced +pounces +pouncing +pound +pounded +pounder +pounders +pounding +pounds +pour +poured +pourer +pourers +pouring +pouringly +pours +pout +pouted +pouter +pouting +pouts +poverty +powder +powdered +powderer +powdering +powders +power +powered +powerful +powerfully +powerfulness +powering +powerless +powerlessly +powerlessness +powers +pox +poxes +practicable +practicableness +practicably +practical +practicalities +practicality +practically +practicalness +practice +practice's +practices +practitioner +practitioner's +practitioners +pragmatic +pragmatically +pragmatics +prairie +prairies +praise +praised +praiser +praisers +praises +praising +praisingly +prance +pranced +prancer +prances +prancing +prancingly +prank +prank's +pranks +prate +prated +prater +prates +prating +pratingly +pray +prayed +prayer +prayer's +prayers +praying +prays +preach +preached +preacher +preachers +preaches +preaching +preachingly +preallocate +preallocated +preallocates +preallocating +preallocation +preallocation's +preallocations +preallocator +preallocators +preassign +preassigned +preassigning +preassigns +precarious +precariously +precariousness +precaution +precaution's +precautioned +precautioning +precautions +precede +preceded +precedence +precedence's +precedences +precedent +precedented +precedents +precedes +preceding +precept +precept's +preceptive +preceptively +precepts +precinct +precinct's +precincts +precious +preciously +preciousness +precipice +precipitate +precipitated +precipitately +precipitateness +precipitates +precipitating +precipitation +precipitative +precipitous +precipitously +precipitousness +precise +precisely +preciseness +precision +precisions +preclude +precluded +precludes +precluding +precocious +precociously +precociousness +preconceive +preconceived +preconception +preconception's +preconceptions +precondition +preconditioned +preconditions +precursor +precursor's +precursors +predate +predated +predates +predating +predation +predecessor +predecessor's +predecessors +predefine +predefined +predefines +predefining +predefinition +predefinition's +predefinitions +predetermine +predetermined +predeterminer +predetermines +predetermining +predicament +predicate +predicated +predicates +predicating +predication +predications +predicative +predict +predictability +predictable +predictably +predicted +predicting +prediction +prediction's +predictions +predictive +predictively +predictor +predictors +predicts +predominant +predominantly +predominate +predominated +predominately +predominates +predominating +predomination +preempt +preempted +preempting +preemption +preemptive +preemptively +preempts +preface +prefaced +prefacer +prefaces +prefacing +prefer +preferable +preferableness +preferably +preference +preference's +preferences +preferential +preferentially +preferred +preferring +prefers +prefix +prefixed +prefixes +prefixing +pregnant +pregnantly +prehistoric +prejudge +prejudged +prejudger +prejudice +prejudiced +prejudices +prejudicing +prelate +preliminaries +preliminary +prelude +prelude's +preluded +preluder +preludes +preluding +premature +prematurely +prematureness +prematurity +premeditated +premeditatedly +premier +premier's +premiere +premiered +premieres +premiering +premiers +premise +premise's +premised +premises +premising +premium +premium's +premiums +preoccupation +preoccupations +preoccupied +preoccupies +preoccupy +preparation +preparation's +preparations +preparative +preparative's +preparatively +preparatives +preparatory +prepare +prepared +preparedly +preparedness +preparer +prepares +preparing +prepend +prepended +prepender +prependers +prepending +prepends +preposition +preposition's +prepositional +prepositionally +prepositions +preposterous +preposterously +preposterousness +preprint +preprinted +preprinting +preprints +preprocessor +preprocessors +preproduction +preprogrammed +prerequisite +prerequisite's +prerequisites +prerogative +prerogative's +prerogatived +prerogatives +prescribe +prescribed +prescriber +prescribes +prescribing +prescription +prescription's +prescriptions +prescriptive +prescriptively +preselect +preselected +preselecting +preselects +presence +presence's +presences +present +presentation +presentation's +presentations +presented +presenter +presenters +presenting +presently +presentness +presents +preservation +preservations +preservative +preservative's +preservatives +preserve +preserved +preserver +preservers +preserves +preserving +preset +presets +preside +presided +presidency +president +president's +presidential +presidentially +presidents +presider +presides +presiding +press +pressed +presser +presses +pressing +pressingly +pressings +pressure +pressured +pressures +pressuring +prestige +presumably +presume +presumed +presumer +presumes +presuming +presumingly +presumption +presumption's +presumptions +presumptuous +presumptuously +presumptuousness +presuppose +presupposed +presupposes +presupposing +pretend +pretended +pretendedly +pretender +pretenders +pretending +pretends +pretentious +pretentiously +pretentiousness +pretext +pretext's +pretexts +prettied +prettier +pretties +prettiest +prettily +prettiness +pretty +prettying +prevail +prevailed +prevailing +prevailingly +prevails +prevalence +prevalent +prevalently +prevent +preventable +preventably +prevented +preventer +preventing +prevention +preventions +preventive +preventively +preventiveness +preventives +prevents +preview +previewed +previewer +previewers +previewing +previews +previous +previously +previousness +prey +preyed +preyer +preying +preys +price +priced +priceless +pricer +pricers +prices +pricing +prick +pricked +pricker +pricking +pricklier +prickliness +prickly +pricks +pride +prided +prides +priding +pried +prier +pries +priest +priestliness +priestly +priests +primacy +primaries +primarily +primary +primary's +prime +primed +primely +primeness +primer +primers +primes +primeval +primevally +priming +primitive +primitively +primitiveness +primitives +primrose +prince +princelier +princeliness +princely +princes +princess +princess's +princesses +principal +principalities +principality +principality's +principally +principals +principle +principled +principles +print +printable +printably +printed +printer +printers +printing +printout +printouts +prints +prior +priori +priorities +priority +priority's +priorly +priors +priory +prism +prism's +prisms +prison +prisoner +prisoner's +prisoners +prisons +privacies +privacy +private +privately +privateness +privates +privation +privations +privative +privatively +privies +privilege +privileged +privileges +privy +privy's +prize +prized +prizer +prizers +prizes +prizing +pro +pro's +probabilistic +probabilistically +probabilities +probability +probable +probably +probate +probated +probates +probating +probation +probationer +probationers +probative +probe +probed +prober +probes +probing +probings +problem +problem's +problematic +problematical +problematically +problems +procedural +procedurally +procedure +procedure's +procedures +proceed +proceeded +proceeder +proceeding +proceedings +proceeds +process +process's +processed +processes +processing +procession +processor +processor's +processors +proclaim +proclaimed +proclaimer +proclaimers +proclaiming +proclaims +proclamation +proclamation's +proclamations +proclivities +proclivity +proclivity's +procrastinate +procrastinated +procrastinates +procrastinating +procrastination +procrastinator +procrastinator's +procrastinators +procure +procured +procurement +procurement's +procurements +procurer +procurers +procures +procuring +prodigal +prodigally +prodigious +prodigiously +prodigiousness +produce +produced +producer +producers +produces +producible +producing +product +product's +production +production's +productions +productive +productively +productiveness +productivities +productivity +products +profane +profaned +profanely +profaneness +profaner +profaning +profess +professed +professedly +professes +professing +profession +profession's +professional +professionalism +professionalisms +professionally +professionals +professions +professor +professor's +professors +proffer +proffered +proffering +proffers +proficiencies +proficiency +proficient +proficiently +profile +profiled +profiler +profiler's +profilers +profiles +profiling +profit +profit's +profitability +profitable +profitableness +profitably +profited +profiteer +profiteer's +profiteers +profiter +profiters +profiting +profits +profound +profoundest +profoundly +profoundness +progeny +program +program's +programmability +programmable +programmatic +programmed +programmer +programmer's +programmers +programming +programs +progress +progressed +progresses +progressing +progression +progression's +progressions +progressive +progressively +progressiveness +prohibit +prohibited +prohibiter +prohibiting +prohibition +prohibition's +prohibitions +prohibitive +prohibitively +prohibitiveness +prohibits +project +project's +projected +projecting +projection +projection's +projections +projective +projectively +projector +projector's +projectors +projects +prolegomena +proletariat +proliferate +proliferated +proliferates +proliferating +proliferation +proliferative +prolific +prolificness +prolog +prolog's +prologs +prologue +prologue's +prologues +prolong +prolonged +prolonger +prolonging +prolongs +promenade +promenade's +promenader +promenades +promenading +prominence +prominent +prominently +promiscuity +promiscuity's +promiscuous +promiscuously +promiscuousness +promise +promised +promiser +promises +promising +promisingly +promontories +promontory +promote +promoted +promoter +promoters +promotes +promoting +promotion +promotional +promotions +promotive +promotiveness +prompt +prompted +prompter +prompters +promptest +prompting +promptings +promptly +promptness +prompts +promulgate +promulgated +promulgates +promulgating +promulgation +promulgations +prone +pronely +proneness +prong +pronged +prongs +pronoun +pronoun's +pronounce +pronounceable +pronounced +pronouncedly +pronouncement +pronouncement's +pronouncements +pronouncer +pronounces +pronouncing +pronouns +pronunciation +pronunciation's +pronunciations +proof +proof's +proofed +proofer +proofing +proofs +prop +propaganda +propagate +propagated +propagates +propagating +propagation +propagations +propagative +propel +propelled +propeller +propeller's +propellers +propels +propensities +propensity +proper +properly +properness +propertied +properties +property +prophecies +prophecy +prophecy's +prophesied +prophesier +prophesies +prophesy +prophesying +prophet +prophet's +prophetic +prophets +propitious +propitiously +propitiousness +proponent +proponent's +proponents +proportion +proportional +proportionally +proportionately +proportioned +proportioner +proportioning +proportionment +proportions +proposal +proposal's +proposals +propose +proposed +proposer +proposers +proposes +proposing +proposition +propositional +propositionally +propositioned +propositioning +propositions +propound +propounded +propounder +propounding +propounds +proprietary +proprietor +proprietor's +proprietors +propriety +props +propulsion +propulsion's +propulsions +pros +prose +prosecute +prosecuted +prosecutes +prosecuting +prosecution +prosecutions +proser +prosing +prosodic +prosodics +prospect +prospected +prospecting +prospection +prospection's +prospections +prospective +prospectively +prospectiveness +prospectives +prospector +prospector's +prospectors +prospects +prospectus +prosper +prospered +prospering +prosperity +prosperous +prosperously +prosperousness +prospers +prostitution +prostrate +prostrated +prostration +protect +protected +protectedly +protecting +protection +protection's +protections +protective +protectively +protectiveness +protector +protector's +protectorate +protectors +protects +protege +protege's +proteges +protein +protein's +proteins +protest +protest's +protestants +protestation +protestations +protested +protester +protester's +protesters +protesting +protestingly +protests +protocol +protocol's +protocols +proton +proton's +protons +protoplasm +prototype +prototype's +prototyped +prototypes +prototypical +prototypically +prototyping +protrude +protruded +protrudes +protruding +protrusion +protrusion's +protrusions +proud +prouder +proudest +proudly +provability +provable +provableness +provably +prove +proved +proven +provenly +prover +proverb +proverb's +proverbs +provers +proves +provide +provided +providence +provider +providers +provides +providing +province +province's +provinces +provincial +provincially +proving +provision +provisional +provisionally +provisioned +provisioner +provisioning +provisions +provocation +provoke +provoked +provokes +provoking +provokingly +prow +prow's +prowess +prowl +prowled +prowler +prowlers +prowling +prowls +prows +proximal +proximally +proximate +proximately +proximateness +proximity +prudence +prudent +prudently +prune +pruned +pruner +pruners +prunes +pruning +pry +prying +pryingly +psalm +psalm's +psalms +pseudo +psyche +psyche's +psyches +psychiatrist +psychiatrist's +psychiatrists +psychiatry +psychological +psychologically +psychologist +psychologist's +psychologists +psychology +psychosocial +psychosocially +pub +pub's +public +publication +publication's +publications +publicity +publicly +publicness +publics +publish +published +publisher +publishers +publishes +publishing +pubs +pucker +puckered +puckering +puckers +pudding +pudding's +puddings +puddle +puddled +puddler +puddles +puddling +puff +puffed +puffer +puffers +puffing +puffs +pull +pulled +puller +pulley +pulley's +pulleys +pulling +pullings +pulls +pulp +pulper +pulping +pulpit +pulpit's +pulpits +pulse +pulsed +pulser +pulses +pulsing +pump +pumped +pumper +pumping +pumpkin +pumpkin's +pumpkins +pumps +pun +pun's +punch +punched +puncher +puncher's +punchers +punches +punching +punchings +punctual +punctually +punctualness +punctuation +puncture +puncture's +punctured +punctures +puncturing +punier +puniness +punish +punishable +punished +punisher +punishes +punishing +punishment +punishment's +punishments +punitive +punitively +punitiveness +puns +punt +punted +punter +punters +punting +punts +puny +pup +pup's +pupa +pupas +pupil +pupil's +pupils +puppet +puppet's +puppets +puppies +puppy +puppy's +pups +purchasable +purchase +purchased +purchaser +purchasers +purchases +purchasing +pure +purely +pureness +purer +purest +purge +purged +purger +purges +purging +purification +purifications +purified +purifier +purifiers +purifies +purify +purifying +purity +purple +purpled +purpler +purples +purplest +purpling +purport +purported +purportedly +purporter +purporters +purporting +purports +purpose +purposed +purposeful +purposefully +purposefulness +purposely +purposes +purposing +purposive +purposively +purposiveness +purr +purred +purring +purringly +purrs +purse +pursed +purser +pursers +purses +pursing +pursue +pursued +pursuer +pursuers +pursues +pursuing +pursuit +pursuit's +pursuits +purview +push +pushbutton +pushbuttons +pushdown +pushed +pusher +pushers +pushes +pushing +puss +pussier +pussies +pussy +put +puts +putter +putterer +puttering +putters +putting +puzzle +puzzled +puzzlement +puzzler +puzzlers +puzzles +puzzling +puzzlings +pygmies +pygmy +pygmy's +pyramid +pyramid's +pyramids +quack +quacked +quacking +quacks +quadrant +quadrant's +quadrants +quadratic +quadratical +quadratically +quadratics +quadrature +quadrature's +quadratures +quadruple +quadrupled +quadruples +quadrupling +quadword +quadword's +quadwords +quagmire +quagmire's +quagmires +quail +quail's +quails +quaint +quaintly +quaintness +quake +quaked +quaker +quakers +quakes +quaking +qualification +qualifications +qualified +qualifiedly +qualifier +qualifiers +qualifies +qualify +qualifying +qualitative +qualitatively +qualities +quality +quality's +qualm +qualms +quandaries +quandary +quandary's +quanta +quantifiable +quantification +quantifications +quantified +quantifier +quantifiers +quantifies +quantify +quantifying +quantitative +quantitatively +quantitativeness +quantities +quantity +quantity's +quantum +quarantine +quarantine's +quarantined +quarantines +quarantining +quarrel +quarrels +quarrelsome +quarrelsomely +quarrelsomeness +quarried +quarrier +quarries +quarry +quarry's +quarrying +quart +quarter +quartered +quarterer +quartering +quarterlies +quarterly +quarters +quartet +quartet's +quartets +quarts +quartz +quash +quashed +quashes +quashing +quasi +quaver +quavered +quavering +quaveringly +quavers +quay +quays +queen +queen's +queenly +queens +queer +queerer +queerest +queerly +queerness +queers +quell +quelled +queller +quelling +quells +quench +quenched +quencher +quenches +quenching +queried +querier +queries +query +querying +quest +quested +quester +questers +questing +question +questionable +questionableness +questionably +questioned +questioner +questioners +questioning +questioningly +questionings +questionnaire +questionnaire's +questionnaires +questions +quests +queue +queue's +queued +queuer +queuer's +queuers +queues +quick +quicken +quickened +quickener +quickening +quickens +quicker +quickest +quickly +quickness +quicksilver +quiet +quieted +quieten +quietened +quietening +quietens +quieter +quietest +quieting +quietly +quietness +quiets +quietude +quill +quills +quilt +quilted +quilter +quilting +quilts +quinine +quit +quite +quits +quitter +quitter's +quitters +quitting +quiver +quivered +quivering +quivers +quiz +quizzed +quizzes +quizzing +quo +quota +quota's +quotas +quotation +quotation's +quotations +quote +quoted +quotes +quoth +quotient +quotients +quoting +rabbit +rabbit's +rabbited +rabbiter +rabbiting +rabbits +rabble +rabbled +rabbler +rabbling +raccoon +raccoon's +raccoons +race +raced +racehorse +racehorse's +racehorses +racer +racers +races +racial +racially +racing +rack +racked +racker +racket +racket's +racketeer +racketeering +racketeers +rackets +racking +racks +radar +radar's +radars +radial +radially +radiance +radiant +radiantly +radiate +radiated +radiately +radiates +radiating +radiation +radiations +radiative +radiatively +radiator +radiator's +radiators +radical +radically +radicalness +radicals +radio +radioed +radioing +radiology +radios +radish +radish's +radishes +radius +radiuses +radix +radixes +raft +rafter +raftered +rafters +rafts +rag +rag's +rage +raged +rages +ragged +raggedly +raggedness +raging +rags +raid +raided +raider +raiders +raiding +raids +rail +railed +railer +railers +railing +railroad +railroaded +railroader +railroaders +railroading +railroads +rails +railway +railway's +railways +raiment +rain +rain's +rainbow +rainbows +raincoat +raincoat's +raincoats +raindrop +raindrop's +raindrops +rained +rainfall +rainier +rainiest +raining +rains +rainy +raise +raised +raiser +raisers +raises +raisin +raising +raisins +rake +raked +raker +rakes +raking +rallied +rallies +rally +rallying +ram +ram's +ramble +rambled +rambler +ramblers +rambles +rambling +ramblingly +ramblings +ramification +ramification's +ramifications +ramp +ramp's +rampart +ramparts +ramped +ramping +ramps +rams +ramses +ran +ranch +ranched +rancher +ranchers +ranches +ranching +random +randomly +randomness +rang +range +ranged +ranger +rangers +ranges +ranging +rank +ranked +ranker +ranker's +rankers +rankest +ranking +ranking's +rankings +rankle +rankled +rankles +rankling +rankly +rankness +ranks +ransack +ransacked +ransacker +ransacking +ransacks +ransom +ransomer +ransoming +ransoms +rant +ranted +ranter +ranters +ranting +rantingly +rants +rap +rap's +rape +raped +raper +rapes +rapid +rapidity +rapidly +rapidness +rapids +raping +raps +rapt +raptly +raptness +rapture +rapture's +raptured +raptures +rapturing +rapturous +rapturously +rapturousness +rare +rarely +rareness +rarer +rarest +raring +rarities +rarity +rarity's +rascal +rascally +rascals +rash +rasher +rashes +rashly +rashness +rasp +raspberry +rasped +rasper +rasping +raspingly +raspings +rasps +raster +rasters +rat +rat's +rate +rated +rater +raters +rates +rather +ratification +ratifications +ratified +ratifies +ratify +ratifying +rating +ratings +ratio +ratio's +ration +rational +rationale +rationale's +rationales +rationalities +rationality +rationally +rationalness +rationed +rationing +rations +ratios +rats +rattle +rattled +rattler +rattlers +rattles +rattlesnake +rattlesnake's +rattlesnakes +rattling +rattlingly +ravage +ravaged +ravager +ravagers +ravages +ravaging +rave +raved +raven +ravened +ravener +ravening +ravenous +ravenously +ravenousness +ravens +raver +raves +ravine +ravine's +ravined +ravines +raving +ravings +raw +rawer +rawest +rawly +rawness +raws +ray +ray's +rayed +rays +razor +razor's +razors +re +reabbreviate +reabbreviated +reabbreviates +reabbreviating +reach +reachable +reachably +reached +reacher +reaches +reaching +reacquainted +react +reacted +reacting +reaction +reaction's +reactionaries +reactionary +reactionary's +reactions +reactivate +reactivated +reactivates +reactivating +reactivation +reactive +reactively +reactiveness +reactivity +reactor +reactor's +reactors +reacts +read +readability +readable +readableness +readapting +reader +reader's +readers +readied +readier +readies +readiest +readily +readiness +reading +readings +readjustable +readjusted +readjustments +readjusts +readout +readout's +readouts +reads +ready +readying +reaffirm +reaffirmed +reaffirming +reaffirms +reagents +real +realest +realign +realigned +realigning +realignment +realignments +realigns +realism +realist +realist's +realistic +realistically +realists +realities +reality +realizable +realizable's +realizableness +realizables +realizablies +realizably +realization +realization's +realizations +realize +realized +realizer +realizers +realizes +realizing +realizing's +realizingly +realizings +reallocate +reallocated +reallocates +reallocating +reallocation +reallocation's +reallocations +reallocator +reallocator's +reallocators +reallotments +reallots +reallotted +reallotting +really +realm +realm's +realms +realness +reals +ream +ream's +reamed +reamer +reaming +reams +reanalysis +reap +reaped +reaper +reaping +reappear +reappeared +reappearing +reappears +reapplying +reapportioned +reappraisal +reappraisals +reappraised +reappraises +reaps +rear +reared +rearer +rearing +rearmed +rearms +rearrange +rearrangeable +rearranged +rearrangement +rearrangement's +rearrangements +rearranges +rearranging +rearrest +rearrested +rears +reason +reasonable +reasonableness +reasonably +reasoned +reasoner +reasoning +reasonings +reasons +reassemble +reassembled +reassembler +reassembles +reassembling +reasserts +reassess +reassessed +reassesses +reassessing +reassessment +reassessment's +reassessments +reassign +reassignable +reassigned +reassigning +reassignment +reassignment's +reassignments +reassigns +reassurances +reassure +reassured +reassures +reassuring +reassuringly +reawaken +reawakened +reawakening +reawakens +rebate +rebate's +rebated +rebater +rebates +rebating +rebel +rebel's +rebelled +rebelling +rebellion +rebellion's +rebellions +rebellious +rebelliously +rebelliousness +rebells +rebels +rebidding +rebids +rebirth +rebirth's +rebonds +reboot +rebooted +rebooter +rebooters +rebooting +reboots +reborn +rebound +rebounded +rebounder +rebounding +rebounds +rebroadcast +rebroadcasts +rebuff +rebuffed +rebuffing +rebuffs +rebuild +rebuilding +rebuilds +rebuilt +rebuke +rebuked +rebuker +rebukes +rebuking +rebut +rebuttal +rebuttals +rebutted +rebutting +recalculate +recalculated +recalculates +recalculating +recalculation +recalculations +recall +recalled +recaller +recalling +recalls +recapitulate +recapitulated +recapitulates +recapitulating +recapitulation +recapped +recapping +recapture +recaptured +recaptures +recapturing +recast +recasting +recasts +recede +receded +recedes +receding +receipt +receipt's +receipted +receipting +receipts +receivable +receivables +receive +received +receiver +receiver's +receivers +receives +receiving +recent +recently +recentness +receptacle +receptacle's +receptacles +reception +reception's +receptions +receptive +receptively +receptiveness +receptivity +receptor +receptor's +receptors +recess +recessed +recesses +recessing +recession +recession's +recessions +recessive +recessively +recessiveness +recharged +recharges +rechartering +rechecked +rechecks +recipe +recipe's +recipes +recipient +recipient's +recipients +reciprocal +reciprocally +reciprocals +reciprocate +reciprocated +reciprocates +reciprocating +reciprocation +reciprocative +reciprocity +recirculate +recirculated +recirculates +recirculating +recirculation +recital +recital's +recitals +recitation +recitation's +recitations +recite +recited +reciter +recites +reciting +reckless +recklessly +recklessness +reckon +reckoned +reckoner +reckoning +reckonings +reckons +reclaim +reclaimable +reclaimed +reclaimer +reclaimers +reclaiming +reclaims +reclamation +reclamations +reclassification +reclassified +reclassifies +reclassify +reclassifying +recline +reclined +reclines +reclining +reclustered +reclusters +recode +recoded +recodes +recoding +recognition +recognition's +recognitions +recoil +recoiled +recoiling +recoils +recoinage +recollect +recollected +recollecting +recollection +recollection's +recollections +recollects +recombination +recombination's +recombinational +recombinations +recombine +recombined +recombines +recombining +recommenced +recommences +recommend +recommendation +recommendation's +recommendations +recommended +recommender +recommending +recommends +recompense +recompilations +recompile +recompiled +recompiles +recompiling +recompute +recomputed +recomputes +recomputing +reconcile +reconciled +reconciler +reconciles +reconciliation +reconciliation's +reconciliations +reconciling +reconditioned +reconfigurable +reconfiguration +reconfiguration's +reconfigurations +reconfigure +reconfigured +reconfigurer +reconfigures +reconfiguring +reconnect +reconnected +reconnecter +reconnecting +reconnection +reconnects +reconsider +reconsideration +reconsidered +reconsidering +reconsiders +reconsolidated +reconsolidates +reconstituted +reconstitutes +reconstruct +reconstructed +reconstructible +reconstructing +reconstruction +reconstructions +reconstructive +reconstructs +recontacted +reconvened +reconvenes +reconverts +record +recorded +recorder +recorders +recording +recordings +records +recored +recount +recounted +recounter +recounting +recounts +recourse +recourses +recover +recoverability +recoverable +recovered +recoverer +recoveries +recovering +recovers +recovery +recovery's +recreate +recreated +recreates +recreating +recreation +recreational +recreations +recreative +recruit +recruit's +recruited +recruiter +recruiter's +recruiters +recruiting +recruits +recta +rectangle +rectangle's +rectangles +rectangular +rectangularly +rector +rector's +rectors +rectum +rectum's +rectums +recur +recurrence +recurrence's +recurrences +recurrent +recurrently +recurring +recurs +recurse +recursed +recurses +recursing +recursion +recursion's +recursions +recursive +recursively +recursiveness +recurved +recyclable +recycle +recycled +recycles +recycling +red +redbreast +redden +reddened +reddening +redder +reddest +reddish +reddishness +redeclare +redeclared +redeclares +redeclaring +redecorated +redecorates +redeem +redeemed +redeemer +redeemers +redeeming +redeems +redefine +redefined +redefines +redefining +redefinition +redefinition's +redefinitions +redemption +redemptioner +redeploys +redeposit +redeposit's +redeposited +redepositing +redepositor +redepositor's +redepositors +redeposits +redesign +redesigned +redesigning +redesigns +redetermination +redetermines +redevelop +redeveloped +redeveloper +redevelopers +redeveloping +redevelopment +redevelops +redials +redirect +redirected +redirecting +redirection +redirections +redirector +redirector's +redirectors +redirects +rediscovered +rediscovers +redisplay +redisplayed +redisplaying +redisplays +redistribute +redistributed +redistributes +redistributing +redistribution +redistribution's +redistributions +redistributive +redly +redness +redoing +redone +redouble +redoubled +redoubles +redoubling +redoubtable +redraw +redrawing +redrawn +redraws +redress +redressed +redresser +redresses +redressing +reds +reduce +reduced +reducer +reducers +reduces +reducibility +reducible +reducibly +reducing +reduction +reduction's +reductions +redundancies +redundancy +redundant +redundantly +reduplicated +reed +reed's +reeder +reeding +reeds +reeducation +reef +reefer +reefing +reefs +reel +reelect +reelected +reelecting +reelects +reeled +reeler +reeling +reels +reemerged +reenactment +reenforcement +reenlists +reenter +reentered +reentering +reenters +reentrant +reestablish +reestablished +reestablishes +reestablishing +reestimating +reevaluate +reevaluated +reevaluates +reevaluating +reevaluation +reeves +reexamine +reexamined +reexamines +reexamining +refaced +refaces +refelled +refelling +refer +referee +referee's +refereed +refereeing +referees +reference +referenced +referencer +references +referencing +referendum +referent +referent's +referential +referentiality +referentially +referents +referral +referral's +referrals +referred +referrer +referring +refers +refill +refillable +refilled +refilling +refills +refine +refined +refinement +refinement's +refinements +refiner +refines +refining +refinished +reflect +reflected +reflecting +reflection +reflection's +reflections +reflective +reflectively +reflectiveness +reflectivity +reflector +reflector's +reflectors +reflects +reflex +reflex's +reflexed +reflexes +reflexive +reflexively +reflexiveness +reflexivity +reflexly +refluent +refocus +refocused +refocuses +refocusing +refolded +reform +reformable +reformat +reformation +reformative +reformats +reformatted +reformatter +reformatting +reformed +reformer +reformers +reforming +reforms +reformulate +reformulated +reformulates +reformulating +reformulation +refractoriness +refractory +refrain +refrained +refraining +refrains +refresh +refreshed +refreshen +refresher +refreshers +refreshes +refreshing +refreshingly +refreshment +refreshment's +refreshments +refried +refries +refrigerator +refrigerator's +refrigerators +refry +refrying +refuel +refuels +refuge +refuged +refugee +refugee's +refugees +refuges +refuging +refund +refund's +refunded +refunder +refunders +refunding +refunds +refusal +refusals +refuse +refused +refuser +refuses +refusing +refutable +refutation +refute +refuted +refuter +refutes +refuting +regain +regained +regaining +regains +regal +regaled +regaling +regally +regard +regarded +regarding +regardless +regardlessly +regardlessness +regards +regenerate +regenerated +regenerately +regenerateness +regenerates +regenerating +regeneration +regenerative +regeneratively +regenerators +regent +regent's +regents +regime +regime's +regimen +regiment +regimented +regiments +regimes +region +region's +regional +regionally +regions +register +registered +registering +registers +registration +registration's +registrations +registry +regreets +regress +regressed +regresses +regressing +regression +regression's +regressions +regressive +regressively +regressiveness +regret +regretful +regretfully +regretfulness +regrets +regrettable +regrettably +regretted +regretting +regrids +regroup +regrouped +regrouping +regular +regularities +regularity +regularly +regulars +regulate +regulated +regulates +regulating +regulation +regulations +regulative +regulator +regulator's +regulators +rehash +rehashed +rehashes +rehashing +rehearsal +rehearsal's +rehearsals +rehearse +rehearsed +rehearser +rehearses +rehearsing +rehoused +rehouses +reign +reigned +reigning +reigns +reimbursed +reimbursement +reimbursement's +reimbursements +rein +reincarnate +reincarnated +reincarnation +reincorporating +reincorporation +reindeer +reined +reinforce +reinforced +reinforcement +reinforcement's +reinforcements +reinforcer +reinforces +reinforcing +reining +reins +reinsert +reinserted +reinserting +reinsertions +reinserts +reinstall +reinstalled +reinstaller +reinstalling +reinstalls +reinstate +reinstated +reinstatement +reinstates +reinstating +reintegrated +reinterpret +reinterpretations +reinterpreted +reinterpreting +reinterprets +reinterviewed +reintroduce +reintroduced +reintroduces +reintroducing +reinvent +reinvented +reinventing +reinvention +reinvents +reinvested +reinvoked +reinvokes +reissue +reissued +reissuer +reissuer's +reissuers +reissues +reissuing +reiterate +reiterated +reiterates +reiterating +reiteration +reiterations +reiterative +reiteratively +reiterativeness +reject +rejected +rejecter +rejecting +rejectingly +rejection +rejection's +rejections +rejective +rejector +rejector's +rejectors +rejects +rejoice +rejoiced +rejoicer +rejoices +rejoicing +rejoicingly +rejoin +rejoined +rejoining +rejoins +rekindle +rekindled +rekindler +rekindles +rekindling +reknit +relabel +relabels +relapse +relapsed +relapser +relapses +relapsing +relate +related +relatedly +relatedness +relater +relates +relating +relation +relational +relationally +relations +relationship +relationship's +relationships +relative +relatively +relativeness +relatives +relativism +relativistic +relativistically +relativity +relativity's +relax +relaxation +relaxation's +relaxations +relaxed +relaxedly +relaxedness +relaxer +relaxes +relaxing +relay +relayed +relaying +relays +relearns +release +released +releaser +releases +releasing +relegate +relegated +relegates +relegating +relegation +relent +relented +relenting +relentless +relentlessly +relentlessness +relents +relevance +relevances +relevant +relevantly +reliabilities +reliability +reliable +reliableness +reliably +reliance +relic +relic's +relicense +relicensed +relicenser +relicenses +relicensing +relics +relied +relief +reliefs +relier +relies +relieve +relieved +relievedly +reliever +relievers +relieves +relieving +religion +religion's +religions +religious +religiously +religiousness +relinking +relinquish +relinquished +relinquishes +relinquishing +relish +relished +relishes +relishing +relive +relives +reliving +reload +reloaded +reloader +reloading +reloads +relocate +relocated +relocates +relocating +relocation +relocations +reluctance +reluctances +reluctant +reluctantly +rely +relying +remade +remain +remainder +remainder's +remaindered +remaindering +remainders +remained +remaining +remains +remark +remarkable +remarkableness +remarkably +remarked +remarking +remarks +remarriages +remarried +remedied +remedies +remedy +remedying +remember +remembered +rememberer +remembering +remembers +remembrance +remembrance's +remembrancer +remembrances +remind +reminded +reminder +reminders +reminding +reminds +reminiscence +reminiscence's +reminiscences +reminiscent +reminiscently +remissions +remittance +remittances +remixed +remnant +remnant's +remnants +remodel +remodels +remodulate +remodulated +remodulates +remodulating +remodulation +remodulator +remodulator's +remodulators +remolding +remonstrate +remonstrated +remonstrates +remonstrating +remonstration +remonstrative +remonstratively +remorse +remote +remotely +remoteness +remotest +remotion +remoulds +removable +removableness +removal +removal's +removals +remove +removed +remover +removes +removing +renaissance +renal +rename +renamed +renames +renaming +renatured +renatures +rend +render +rendered +renderer +rendering +renderings +renders +rendezvous +rendezvoused +rendezvouses +rendezvousing +rending +rendition +rendition's +renditions +rends +renegotiable +renegotiated +renegotiates +renew +renewal +renewals +renewed +renewer +renewing +renews +reno +renominated +renominates +renounce +renounced +renouncer +renounces +renouncing +renown +renowned +rent +rental +rental's +rentals +rented +renter +renter's +renters +renting +rents +renumber +renumbered +renumbering +renumbers +reopen +reopened +reopening +reopens +reorder +reordered +reordering +reorders +reoriented +repackage +repackaged +repackager +repackages +repackaging +repacks +repaid +repaint +repainted +repainter +repainters +repainting +repaints +repair +repaired +repairer +repairers +repairing +repairman +repairs +reparable +reparation +reparation's +reparations +repartition +repartitioned +repartitioner +repartitioners +repartitioning +repartitions +repast +repast's +repasts +repaving +repay +repayable +repaying +repayments +repays +repeal +repealed +repealer +repealing +repeals +repeat +repeatable +repeated +repeatedly +repeater +repeaters +repeating +repeats +repel +repels +repent +repentance +repented +repenter +repenting +repents +repercussion +repercussion's +repercussions +repertoire +repetition +repetition's +repetitions +repetitive +repetitively +repetitiveness +rephrase +rephrased +rephrases +rephrasing +repine +repined +repiner +repining +replace +replaceable +replaced +replacement +replacement's +replacements +replacer +replaces +replacing +replanted +replay +replayed +replaying +replays +repleader +replenish +replenished +replenisher +replenishes +replenishing +replete +repleteness +repletion +replica +replica's +replicas +replicate +replicated +replicates +replicating +replication +replications +replicative +replied +replier +replies +reply +replying +report +reported +reportedly +reporter +reporters +reporting +reports +repose +reposed +reposes +reposing +reposition +repositioned +repositioning +repositions +repositories +repository +repository's +repost +reposted +reposter +reposting +repostings +reposts +represent +representable +representably +representation +representation's +representational +representationally +representations +representative +representatively +representativeness +representatives +represented +representer +representing +represents +repress +repressed +represses +repressing +repression +repression's +repressions +repressive +repressively +repressiveness +reprieve +reprieved +reprieves +reprieving +reprint +reprinted +reprinter +reprinting +reprints +reprisal +reprisal's +reprisals +reproach +reproached +reproacher +reproaches +reproaching +reproachingly +reprobates +reprocessed +reproduce +reproduced +reproducer +reproducers +reproduces +reproducibilities +reproducibility +reproducible +reproducibly +reproducing +reproduction +reproduction's +reproductions +reproductive +reproductively +reproductivity +reprogrammed +reprogrammer +reprogrammer's +reprogrammers +reprogramming +reproof +reprove +reproved +reprover +reproving +reprovingly +reptile +reptile's +reptiles +republic +republic's +republican +republican's +republicans +republication +republics +republish +republished +republisher +republisher's +republishers +republishes +republishing +repudiate +repudiated +repudiates +repudiating +repudiation +repudiations +repulse +repulsed +repulses +repulsing +repulsion +repulsions +repulsive +repulsively +repulsiveness +reputable +reputably +reputation +reputation's +reputations +repute +reputed +reputedly +reputes +reputing +request +requested +requester +requesters +requesting +requestioned +requests +requiem +requiem's +requiems +require +required +requirement +requirement's +requirements +requirer +requires +requiring +requisite +requisiteness +requisites +requisition +requisitioned +requisitioner +requisitioning +requisitions +requite +requited +requiter +requiting +reran +reread +rereading +rereads +reroute +rerouted +rerouter +rerouters +reroutes +reroutings +rerun +rerunning +reruns +res +resalable +resaturated +resaturates +rescaled +rescan +rescanned +rescanning +rescans +reschedule +rescheduled +rescheduler +reschedules +rescheduling +rescue +rescued +rescuer +rescuers +rescues +rescuing +resealed +research +researched +researcher +researcher's +researchers +researches +researching +reselect +reselected +reselecting +reselects +resell +reseller +resellers +reselling +resells +resemblance +resemblance's +resemblances +resemble +resembled +resembles +resembling +resends +resent +resented +resentful +resentfully +resentfulness +resenting +resentment +resents +resequenced +reservation +reservation's +reservations +reserve +reserved +reservedly +reservedness +reserver +reserves +reserving +reservoir +reservoir's +reservoirs +reset +reseted +reseter +reseting +resets +resetting +resettings +resettled +resettles +resettling +reshape +reshaped +reshaper +reshapes +reshaping +reside +resided +residence +residence's +residences +resident +resident's +residential +residentially +residents +resider +resides +residing +residue +residue's +residues +resifted +resign +resignation +resignation's +resignations +resigned +resignedly +resignedness +resigner +resigning +resigns +resin +resin's +resined +resining +resins +resist +resistance +resistances +resistant +resistantly +resisted +resister +resistible +resistibly +resisting +resistive +resistively +resistiveness +resistivity +resistor +resistor's +resistors +resists +resize +resized +resizes +resizing +resold +resoluble +resolute +resolutely +resoluteness +resolution +resolutions +resolutive +resolvable +resolve +resolved +resolver +resolvers +resolves +resolving +resonance +resonances +resonant +resonantly +resort +resorted +resorter +resorting +resorts +resound +resounding +resoundingly +resounds +resource +resource's +resourced +resourceful +resourcefully +resourcefulness +resources +resourcing +respecified +respect +respectability +respectable +respectableness +respectably +respected +respecter +respectful +respectfully +respectfulness +respecting +respective +respectively +respectiveness +respects +respiration +respirations +respired +respires +respite +respited +respiting +resplendent +resplendently +respond +responded +respondent +respondent's +respondents +responder +responders +responding +responds +response +responser +responses +responsibilities +responsibility +responsible +responsibleness +responsibly +responsions +responsive +responsively +responsiveness +rest +restart +restarted +restarter +restarting +restarts +restate +restated +restatement +restates +restating +restaurant +restaurant's +restaurants +rested +rester +restful +restfully +restfulness +resting +restive +restively +restiveness +restless +restlessly +restlessness +restoration +restoration's +restorations +restore +restored +restorer +restorers +restores +restoring +restrain +restrained +restrainedly +restrainer +restrainers +restraining +restrains +restraint +restraint's +restraints +restrict +restricted +restrictedly +restricting +restriction +restriction's +restrictions +restrictive +restrictively +restrictiveness +restricts +restroom +restroom's +restrooms +restructure +restructured +restructures +restructuring +rests +resubmit +resubmits +resubmitted +resubmitting +result +resultant +resultantly +resultants +resulted +resulting +results +resumable +resume +resumed +resumes +resuming +resumption +resumption's +resumptions +resupplier +resupplier's +resuppliers +resurface +resurfaced +resurfacer +resurfacer's +resurfacers +resurfaces +resurfacing +resurged +resurges +resurrect +resurrected +resurrecting +resurrection +resurrection's +resurrections +resurrects +resuspended +retail +retailed +retailer +retailers +retailing +retails +retain +retained +retainer +retainers +retaining +retainment +retains +retaliation +retard +retarded +retarder +retarding +retention +retentions +retentive +retentively +retentiveness +rethinks +rethreading +reticence +reticent +reticently +reticle +reticle's +reticles +reticular +reticulate +reticulated +reticulately +reticulates +reticulating +reticulation +retied +retina +retina's +retinal +retinas +retinue +retinues +retire +retired +retiredly +retiredness +retirement +retirement's +retirements +retires +retiring +retiringly +retiringness +retitled +retold +retort +retorted +retorting +retorts +retrace +retraced +retraces +retracing +retract +retractable +retracted +retracting +retraction +retractions +retractor +retractor's +retractors +retracts +retrain +retrained +retraining +retrains +retranslated +retransmission +retransmission's +retransmissions +retransmit +retransmits +retransmitted +retransmitting +retreat +retreated +retreater +retreating +retreats +retried +retrier +retriers +retries +retrievable +retrieval +retrieval's +retrievals +retrieve +retrieved +retriever +retrievers +retrieves +retrieving +retroactively +retrospect +retrospection +retrospective +retrospectively +retry +retrying +return +returnable +returned +returner +returners +returning +returns +retype +retyped +retypes +retyping +reunion +reunion's +reunions +reunite +reunited +reuniting +reupholstering +reusable +reuse +reused +reuses +reusing +revalidated +revalidates +revalidation +revalued +revalues +revamp +revamped +revamping +revamps +reveal +revealed +revealer +revealing +reveals +revel +revelation +revelation's +revelations +revelry +revels +revenge +revenge's +revenged +revenger +revenges +revenging +revenue +revenuer +revenuers +revenues +revere +revered +reverence +reverencer +reverend +reverend's +reverends +reverently +reveres +reverified +reverifies +reverify +reverifying +revering +reversal +reversal's +reversals +reverse +reversed +reversely +reverser +reverses +reversible +reversing +reversion +reversioner +reversions +revert +reverted +reverter +reverting +revertive +reverts +revetting +review +reviewed +reviewer +reviewers +reviewing +reviews +revile +reviled +reviler +reviling +revise +revised +reviser +revises +revising +revision +revision's +revisions +revisit +revisited +revisiting +revisits +revival +revival's +revivals +revive +revived +reviver +revives +reviving +revocation +revocations +revoke +revoked +revoker +revokes +revoking +revolt +revolted +revolter +revolting +revoltingly +revolts +revolution +revolution's +revolutionaries +revolutionariness +revolutionary +revolutionary's +revolutions +revolve +revolved +revolver +revolvers +revolves +revolving +reward +rewarded +rewarder +rewarding +rewardingly +rewards +rewind +rewinded +rewinder +rewinding +rewinds +rewired +rewires +reword +reworded +rewording +rewording's +rewordings +rewords +rework +reworked +reworking +reworks +rewound +rewrite +rewriter +rewrites +rewriting +rewritings +rewritten +rewrote +rhetoric +rheumatism +rhinoceros +rhubarb +rhyme +rhymed +rhymer +rhymes +rhyming +rhythm +rhythm's +rhythmic +rhythmical +rhythmically +rhythmics +rhythms +rib +rib's +ribbed +ribbing +ribbon +ribbon's +ribbons +ribs +rice +ricer +rices +rich +richen +richened +richening +richer +riches +richest +richly +richness +rickshaw +rickshaw's +rickshaws +rid +ridden +riddle +riddled +riddler +riddles +riddling +ride +rider +rider's +riders +rides +ridge +ridge's +ridged +ridges +ridging +ridicule +ridiculed +ridiculer +ridicules +ridiculing +ridiculous +ridiculously +ridiculousness +riding +ridings +rids +rifle +rifled +rifleman +rifler +rifles +rifling +rift +rig +rig's +rigged +rigging +right +righted +righten +righteous +righteously +righteousness +righter +rightful +rightfully +rightfulness +righting +rightly +rightmost +rightness +rights +rightward +rightwards +rigid +rigidities +rigidity +rigidly +rigidness +rigorous +rigorously +rigorousness +rigs +rill +rim +rim's +rime +rimer +riming +rims +rind +rind's +rinded +rinds +ring +ringed +ringer +ringers +ringing +ringingly +ringings +rings +rinse +rinsed +rinser +rinses +rinsing +riot +rioted +rioter +rioters +rioting +riotous +riotously +riotousness +riots +rip +ripe +ripely +ripen +ripened +ripener +ripeness +ripening +ripens +riper +ripest +ripped +ripping +ripple +rippled +rippler +ripples +rippling +rips +rise +risen +riser +risers +rises +rising +risings +risk +risked +risker +risking +risks +rite +rite's +rited +rites +ritual +ritually +rituals +rival +rivalries +rivalry +rivalry's +rivals +rive +rived +riven +river +river's +rivers +riverside +rivet +riveted +riveter +riveting +rivets +riving +rivulet +rivulet's +rivulets +road +road's +roads +roadside +roadsides +roadster +roadster's +roadsters +roadway +roadway's +roadways +roam +roamed +roamer +roaming +roams +roar +roared +roarer +roaring +roaringest +roars +roast +roasted +roaster +roasting +roasts +rob +robbed +robber +robber's +robberies +robbers +robbery +robbery's +robbing +robe +robed +robes +robin +robin's +robing +robins +robot +robot's +robotic +robotics +robots +robs +robust +robustly +robustness +rock +rocked +rocker +rockers +rocket +rocket's +rocketed +rocketing +rockets +rockier +rockies +rockiness +rocking +rocks +rocky +rod +rod's +rode +rods +roe +roes +rogue +rogue's +rogues +roguing +role +role's +roles +roll +rolled +roller +rollers +rolling +rolls +romance +romanced +romancer +romancers +romances +romancing +romantic +romantic's +romantically +romantics +romp +romped +romper +rompers +romping +romps +roof +roofed +roofer +roofers +roofing +roofs +rook +rooks +room +roomed +roomer +roomers +rooming +rooms +roost +rooster +roosters +root +root's +rooted +rootedness +rooter +rooting +roots +rope +roped +roper +ropers +ropes +roping +rose +rose's +rosebud +rosebud's +rosebuds +roses +rosier +rosiness +rosy +rot +rotary +rotate +rotated +rotates +rotating +rotation +rotational +rotationally +rotations +rotative +rotatively +rotator +rotator's +rotators +rots +rotten +rottenly +rottenness +rouge +rough +roughed +roughen +roughened +roughening +roughens +rougher +roughest +roughly +roughness +rouging +round +roundabout +roundaboutness +rounded +roundedness +rounder +rounders +roundest +rounding +roundly +roundness +roundoff +rounds +roundup +roundup's +roundups +rouse +roused +rouser +rouses +rousing +rout +route +routed +router +routers +routes +routine +routinely +routines +routing +routings +rove +roved +rover +roves +roving +row +rowed +rowen +rower +rowers +rowing +rows +royal +royalist +royalist's +royalists +royally +royalties +royalty +royalty's +rub +rubbed +rubber +rubber's +rubbers +rubbing +rubbish +rubbishes +rubble +rubbled +rubbling +rubies +rubout +rubs +ruby +ruby's +rudder +rudder's +rudders +ruddier +ruddiness +ruddy +rude +rudely +rudeness +ruder +rudest +rudiment +rudiment's +rudimentariness +rudimentary +rudiments +rue +ruefully +rues +ruffian +ruffianly +ruffians +ruffle +ruffled +ruffler +ruffles +ruffling +rug +rug's +rugged +ruggedly +ruggedness +rugs +ruin +ruination +ruination's +ruinations +ruined +ruiner +ruing +ruining +ruinous +ruinously +ruinousness +ruins +rule +ruled +ruler +rulers +rules +ruling +rulings +rum +rumble +rumbled +rumbler +rumbles +rumbling +rumen +rumens +rump +rumple +rumpled +rumples +rumplier +rumpling +rumply +rumps +run +runaway +runaways +rung +rung's +rungs +runnable +runner +runner's +runners +running +runs +runtime +rupture +ruptured +ruptures +rupturing +rural +rurally +rush +rushed +rusher +rushes +rushing +russet +russeted +russeting +russets +rust +rusted +rustic +rusticate +rusticated +rusticates +rusticating +rustication +rustier +rustiness +rusting +rustle +rustled +rustler +rustlers +rustles +rustling +rusts +rusty +rut +rut's +ruthless +ruthlessly +ruthlessness +ruts +rye +rye's +sable +sable's +sables +sabotage +sabotaged +sabotages +sabotaging +sack +sacked +sacker +sacking +sacks +sacred +sacredly +sacredness +sacrifice +sacrificed +sacrificer +sacrificers +sacrifices +sacrificial +sacrificially +sacrificing +sad +sadden +saddened +saddening +saddens +sadder +saddest +saddle +saddled +saddler +saddles +saddling +sadism +sadist +sadist's +sadistic +sadistically +sadists +sadly +sadness +safe +safeguard +safeguarded +safeguarding +safeguards +safely +safeness +safer +safes +safest +safetied +safeties +safety +safetying +sag +sagacious +sagaciously +sagaciousness +sagacity +sage +sagely +sageness +sages +sags +said +sail +sailed +sailer +sailing +sailor +sailorly +sailors +sails +saint +sainted +saintliness +saintly +saints +sake +saker +sakes +salable +salad +salad's +salads +salaried +salaries +salary +sale +sale's +sales +salesman +salesmen +salespeople +salespeople's +salesperson +salesperson's +salient +saliently +saline +saliva +sallied +sallies +sallow +sallowness +sally +sallying +salmon +salmons +salon +salon's +salons +saloon +saloon's +saloons +salt +salted +salter +salters +saltier +saltiest +saltiness +salting +saltness +salts +salty +salutariness +salutary +salutation +salutation's +salutations +salute +saluted +saluter +salutes +saluting +salvage +salvaged +salvager +salvages +salvaging +salvation +salve +salver +salves +salving +same +sameness +sample +sample's +sampled +sampler +samplers +samples +sampling +samplings +sanctification +sanctified +sanctifier +sanctify +sanction +sanctioned +sanctioning +sanctions +sanctities +sanctity +sanctuaries +sanctuary +sanctuary's +sand +sandal +sandal's +sandals +sanded +sander +sanders +sandier +sandiness +sanding +sandpaper +sands +sandstone +sandstones +sandwich +sandwiched +sandwiches +sandwiching +sandy +sane +sanely +saneness +saner +sanest +sang +sanguine +sanguinely +sanguineness +sanitarium +sanitariums +sanitary +sanitation +sanity +sank +sap +sap's +sapling +sapling's +saplings +sapphire +saps +sarcasm +sarcasm's +sarcasms +sarcastic +sash +sashed +sashes +sat +satchel +satchel's +satchels +sate +sated +satellite +satellite's +satellites +sates +satin +sating +satire +satire's +satires +satirist +satirist's +satirists +satisfaction +satisfaction's +satisfactions +satisfactorily +satisfactoriness +satisfactory +satisfiability +satisfiable +satisfied +satisfier +satisfiers +satisfies +satisfy +satisfying +satisfyingly +saturate +saturated +saturater +saturates +saturating +saturation +saturations +satyr +sauce +saucepan +saucepan's +saucepans +saucer +saucers +sauces +saucier +sauciness +saucing +saucy +saunter +sauntered +saunterer +sauntering +saunters +sausage +sausage's +sausages +savage +savaged +savagely +savageness +savager +savagers +savages +savaging +save +saved +saver +savers +saves +saving +savings +saw +sawed +sawer +sawing +sawmill +sawmill's +sawmills +saws +sawtooth +say +sayer +sayers +saying +sayings +says +scabbard +scabbard's +scabbards +scaffold +scaffolding +scaffoldings +scaffolds +scalable +scalar +scalar's +scalars +scald +scalded +scalding +scalds +scale +scaled +scaler +scalers +scales +scalier +scaliness +scaling +scalings +scallop +scalloped +scalloper +scalloping +scallops +scalp +scalp's +scalper +scalping +scalps +scaly +scam +scam's +scamper +scampered +scampering +scampers +scams +scan +scandal +scandal's +scandalous +scandalously +scandalousness +scandals +scanned +scanner +scanner's +scanners +scanning +scans +scant +scantier +scanties +scantiest +scantily +scantiness +scantly +scantness +scanty +scar +scar's +scarce +scarcely +scarceness +scarcer +scarcest +scarcity +scare +scared +scarer +scares +scarf +scarfs +scarier +scaring +scarlet +scars +scary +scatter +scattered +scatterer +scattering +scatteringly +scatters +scavenger +scavenger's +scavengers +scenario +scenario's +scenarios +scene +scene's +sceneries +scenery +scenes +scenic +scenics +scent +scented +scents +schedule +schedule's +scheduled +scheduler +scheduler's +schedulers +schedules +scheduling +schema +schema's +schemas +schemata +schematic +schematically +schematics +scheme +scheme's +schemed +schemer +schemers +schemes +scheming +schizophrenia +scholar +scholarly +scholars +scholarship +scholarship's +scholarships +scholastic +scholastically +scholastics +school +schoolboy +schoolboy's +schoolboys +schooled +schooler +schoolers +schoolhouse +schoolhouse's +schoolhouses +schooling +schoolmaster +schoolmaster's +schoolmasters +schoolroom +schoolroom's +schoolrooms +schools +schoolyard +schoolyard's +schoolyards +schooner +science +science's +sciences +scientific +scientifically +scientist +scientist's +scientists +scissor +scissored +scissoring +scissors +scoff +scoffed +scoffer +scoffing +scoffs +scold +scolded +scolder +scolding +scolds +scoop +scooped +scooper +scooping +scoops +scope +scoped +scopes +scoping +scorch +scorched +scorcher +scorches +scorching +scorchingly +score +score's +scored +scorer +scorers +scores +scoring +scorings +scorn +scorned +scorner +scornful +scornfully +scornfulness +scorning +scorns +scorpion +scorpion's +scorpions +scoundrel +scoundrel's +scoundrelly +scoundrels +scour +scoured +scourer +scourge +scourger +scourging +scouring +scourings +scours +scout +scouted +scouter +scouting +scouts +scow +scowl +scowled +scowler +scowling +scowls +scramble +scrambled +scrambler +scrambles +scrambling +scrap +scrap's +scrape +scraped +scraper +scrapers +scrapes +scraping +scrapings +scrapped +scraps +scratch +scratched +scratcher +scratchers +scratches +scratching +scrawl +scrawled +scrawler +scrawling +scrawls +scream +screamed +screamer +screamers +screaming +screamingly +screams +screech +screeched +screecher +screeches +screeching +screen +screened +screener +screening +screenings +screens +screw +screwed +screwer +screwing +screws +scribble +scribbled +scribbler +scribbles +scribbling +scribe +scriber +scribes +scribing +script +script's +scripted +scripting +scripts +scripture +scriptures +scroll +scrolled +scrolling +scrolls +scrooge +scrooge's +scrooges +scrub +scrubs +scruple +scrupled +scruples +scrupling +scrupulous +scrupulously +scrupulousness +scrutiny +scuffle +scuffled +scuffles +scuffling +sculpt +sculpted +sculpting +sculptor +sculptor's +sculptors +sculpts +sculpture +sculptured +sculptures +sculpturing +scum +scum's +scums +scurried +scurry +scurrying +scuttle +scuttled +scuttles +scuttling +scythe +scythe's +scythes +scything +sea +seaboard +seacoast +seacoast's +seacoasts +seal +sealed +sealer +sealing +seals +sealy +seam +seaman +seamanly +seamed +seamen +seamer +seaming +seams +seaport +seaport's +seaports +sear +search +searched +searcher +searcher's +searchers +searches +searching +searchingly +searchings +seared +searing +searingly +sears +seas +seashore +seashore's +seashores +seaside +season +season's +seasonable +seasonableness +seasonably +seasonal +seasonally +seasoned +seasoner +seasoners +seasoning +seasonings +seasonly +seasons +seat +seated +seater +seating +seats +seaward +seawards +seaweed +seaweeds +secede +seceded +seceder +secedes +seceding +secluded +secludedly +secludedness +seclusion +second +secondaries +secondarily +secondariness +secondary +seconded +seconder +seconders +secondhand +seconding +secondly +seconds +secrecy +secret +secretarial +secretaries +secretary +secretary's +secrete +secreted +secretes +secreting +secretion +secretions +secretive +secretively +secretiveness +secretly +secrets +sect +sect's +section +sectional +sectionally +sectioned +sectioning +sections +sector +sector's +sectored +sectoring +sectors +sects +secular +secularly +secure +secured +securely +secureness +securer +secures +securing +securings +securities +security +sedge +sediment +sediment's +sediments +seduce +seduced +seducer +seducers +seduces +seducing +seductive +seductively +seductiveness +see +seed +seeded +seeder +seeders +seeding +seedings +seedling +seedling's +seedlings +seeds +seeing +seek +seeker +seekers +seeking +seekingly +seeks +seem +seemed +seeming +seemingly +seemlier +seemliness +seemly +seems +seen +seep +seeped +seeping +seeps +seer +seers +sees +seethe +seethed +seethes +seething +segment +segmentation +segmentation's +segmentations +segmented +segmenting +segments +segregate +segregated +segregates +segregating +segregation +segregative +seismic +seizable +seize +seized +seizer +seizers +seizes +seizin +seizing +seizings +seizins +seizor +seizors +seizure +seizure's +seizures +seldom +select +selected +selecting +selection +selection's +selections +selective +selectively +selectiveness +selectivity +selectness +selector +selector's +selectors +selects +self +selfish +selfishly +selfishness +selfness +selfsame +selfsameness +sell +seller +sellers +selling +sells +selves +semantic +semantical +semantically +semanticist +semanticist's +semanticists +semantics +semaphore +semaphore's +semaphores +semblance +semester +semester's +semesters +semiautomated +semicolon +semicolon's +semicolons +semiconductor +semiconductor's +semiconductors +seminal +seminally +seminar +seminar's +seminaries +seminars +seminary +seminary's +semipermanent +semipermanently +senate +senate's +senates +senator +senator's +senators +send +sender +senders +sending +sends +senior +senior's +seniority +seniors +sensation +sensation's +sensational +sensationally +sensations +sense +sensed +senseless +senselessly +senselessness +senses +sensibilities +sensibility +sensible +sensibleness +sensibly +sensing +sensitive +sensitively +sensitiveness +sensitives +sensitivities +sensitivity +sensor +sensor's +sensors +sensory +sent +sentence +sentenced +sentences +sentencing +sentential +sententially +sentiment +sentiment's +sentimental +sentimentally +sentiments +sentinel +sentinel's +sentinels +sentries +sentry +sentry's +separable +separableness +separate +separated +separately +separateness +separates +separating +separation +separations +separative +separator +separator's +separators +sequel +sequel's +sequels +sequence +sequenced +sequencer +sequencers +sequences +sequencing +sequencings +sequential +sequentiality +sequentially +sequester +sequestered +sequestering +serendipitous +serendipitously +serendipity +serene +serenely +sereneness +serenity +serf +serf's +serfs +sergeant +sergeant's +sergeants +serial +serially +serials +series +serious +seriously +seriousness +sermon +sermon's +sermons +serpent +serpent's +serpentine +serpentinely +serpents +serum +serum's +serums +servant +servant's +servants +serve +served +server +server's +servers +serves +service +serviceable +serviceableness +serviced +servicer +services +servicing +servile +servilely +servileness +serving +servings +servitude +session +session's +sessions +set +set's +sets +setter +setter's +setters +setting +settings +settle +settled +settlement +settlement's +settlements +settler +settlers +settles +settling +settlings +setup +setups +seven +sevens +seventeen +seventeens +seventeenth +seventh +seventies +seventieth +seventy +sever +several +severally +severals +severance +severe +severed +severely +severeness +severer +severest +severing +severities +severity +severity's +severs +sew +sewed +sewer +sewers +sewing +sews +sex +sexed +sexes +sexism +sexism's +sexist +sexist's +sexists +sexual +sexuality +sexually +shabbier +shabbiness +shabby +shack +shacked +shackle +shackled +shackler +shackles +shackling +shacks +shade +shaded +shader +shades +shadier +shadiest +shadily +shadiness +shading +shadings +shadow +shadowed +shadower +shadowiness +shadowing +shadows +shadowy +shady +shaft +shaft's +shafted +shafting +shafts +shaggier +shagginess +shaggy +shakable +shakably +shake +shaken +shaker +shakers +shakes +shakier +shakiness +shaking +shaky +shale +shales +shall +shallow +shallower +shallowly +shallowness +shallows +sham +sham's +shambles +shame +shamed +shameful +shamefully +shamefulness +shameless +shamelessly +shamelessness +shames +shaming +shams +shan't +shanties +shanty +shanty's +shape +shaped +shapeless +shapelessly +shapelessness +shapelier +shapeliness +shapely +shaper +shapers +shapes +shaping +sharable +share +sharecropper +sharecropper's +sharecroppers +shared +shareholder +shareholder's +shareholders +sharer +sharers +shares +sharing +shark +shark's +sharks +sharp +sharped +sharpen +sharpened +sharpener +sharpening +sharpens +sharper +sharpest +sharping +sharply +sharpness +sharps +shatter +shattered +shattering +shatteringly +shatters +shave +shaved +shaven +shaver +shaves +shaving +shavings +shawl +shawl's +shawls +she +she'd +she'll +she's +sheaf +shear +sheared +shearer +shearers +shearing +shears +sheath +sheather +sheathing +sheaths +sheaves +shed +sheds +sheep +sheer +sheered +sheerly +sheerness +sheet +sheeted +sheeter +sheeting +sheets +shelf +shelfs +shell +shell's +shelled +sheller +shelling +shells +shelter +sheltered +shelterer +sheltering +shelters +shelve +shelved +shelver +shelves +shelving +shepherd +shepherd's +shepherded +shepherding +shepherds +sheriff +sheriff's +sheriffs +shied +shield +shielded +shielder +shielding +shields +shier +shies +shiest +shift +shifted +shifter +shifters +shiftier +shiftiest +shiftily +shiftiness +shifting +shifts +shifty +shilling +shillings +shimmer +shimmered +shimmering +shin +shine +shined +shiner +shiners +shines +shingle +shingle's +shingled +shingler +shingles +shingling +shinier +shininess +shining +shiningly +shiny +ship +ship's +shipboard +shipboards +shipbuilding +shipment +shipment's +shipments +shippable +shipped +shipper +shipper's +shippers +shipping +ships +shipwreck +shipwrecked +shipwrecks +shirk +shirker +shirking +shirks +shirt +shirting +shirts +shit +shiver +shivered +shiverer +shivering +shivers +shoal +shoal's +shoals +shock +shocked +shocker +shockers +shocking +shockingly +shocks +shod +shoe +shoed +shoeing +shoemaker +shoer +shoes +shone +shook +shoot +shooter +shooters +shooting +shootings +shoots +shop +shop's +shopkeeper +shopkeeper's +shopkeepers +shopped +shopper +shopper's +shoppers +shopping +shops +shore +shore's +shored +shores +shoring +shorn +short +shortage +shortage's +shortages +shortcoming +shortcoming's +shortcomings +shortcut +shortcut's +shortcuts +shorted +shorten +shortened +shortener +shortening +shortens +shorter +shortest +shorthand +shorthanded +shorthands +shorting +shortly +shortness +shorts +shot +shot's +shotgun +shotgun's +shotguns +shots +should +shoulder +shouldered +shouldering +shoulders +shouldest +shouldn't +shout +shouted +shouter +shouters +shouting +shouts +shove +shoved +shovel +shovels +shover +shoves +shoving +show +showed +shower +showered +showering +showers +showing +showings +shown +shows +shrank +shred +shred's +shredder +shredder's +shredders +shreds +shrew +shrew's +shrewd +shrewdest +shrewdly +shrewdness +shrews +shriek +shrieked +shrieking +shrieks +shrill +shrilled +shrilling +shrillness +shrilly +shrimp +shrine +shrine's +shrines +shrink +shrinkable +shrinker +shrinking +shrinks +shrivel +shrivels +shroud +shrouded +shrouding +shrouds +shrub +shrub's +shrubbery +shrubs +shrug +shrugs +shrunk +shrunken +shudder +shuddered +shuddering +shudders +shuffle +shuffled +shuffler +shuffles +shuffling +shun +shuns +shut +shutdown +shutdown's +shutdowns +shuts +shutter +shuttered +shuttering +shutters +shutting +shuttle +shuttled +shuttles +shuttling +shy +shying +shyly +shyness +sibling +sibling's +siblings +sick +sicken +sickened +sickener +sickening +sickeningly +sicker +sickerly +sickest +sicking +sickle +sickled +sicklied +sickliness +sickling +sickly +sicklying +sickness +sickness's +sicknesses +sicks +side +sideboard +sideboard's +sideboards +sideburns +sided +sidedness +sidelight +sidelight's +sidelights +sides +sidetrack +sidetracked +sidetracking +sidetracks +sidewalk +sidewalk's +sidewalks +sideways +sidewise +siding +sidings +siege +siege's +sieges +sieging +sierra +sierras +sieve +sieve's +sievers +sieves +sieving +sift +sifted +sifter +sifting +siftings +sifts +sigh +sighed +sigher +sighing +sighs +sight +sighted +sighter +sighting +sightings +sightliness +sightly +sights +sign +signal +signally +signals +signature +signature's +signatures +signed +signer +signers +signet +significance +significances +significant +significantly +significants +signification +signified +signifier +signifies +signify +signifying +signing +signs +silence +silenced +silencer +silencers +silences +silencing +silent +silently +silentness +silents +silhouette +silhouetted +silhouettes +silicon +silicone +silicons +silk +silken +silkier +silkiest +silkily +silkiness +silks +silky +sill +sill's +sillier +silliest +silliness +sills +silly +silt +silted +silting +silts +silver +silvered +silverer +silveriness +silvering +silverly +silvers +silvery +similar +similarities +similarity +similarly +similitude +simmer +simmered +simmering +simmers +simple +simpleness +simpler +simples +simplest +simplex +simplexes +simplicities +simplicity +simplicity's +simplification +simplifications +simplified +simplifier +simplifiers +simplifies +simplify +simplifying +simplistic +simply +simulate +simulated +simulates +simulating +simulation +simulations +simulative +simulator +simulator's +simulators +simultaneity +simultaneous +simultaneously +simultaneousness +sin +sin's +since +sincere +sincerely +sincereness +sincerest +sincerity +sine +sines +sinew +sinew's +sinews +sinful +sinfully +sinfulness +sing +singable +singed +singer +singer's +singers +singing +singingly +single +singled +singleness +singles +singleton +singleton's +singletons +singling +singly +sings +singular +singularities +singularity +singularity's +singularly +sining +sinister +sinisterly +sinisterness +sink +sinked +sinker +sinkers +sinkhole +sinkholes +sinking +sinks +sinned +sinner +sinner's +sinners +sinning +sins +sinusoidal +sinusoidally +sinusoids +sip +sips +sir +sire +sired +siren +sirens +sires +siring +sirs +sirup +sister +sister's +sistered +sistering +sisterly +sisters +sit +site +site's +sited +sites +siting +sits +sitter +sitter's +sitters +sitting +sittings +situate +situated +situates +situating +situation +situational +situationally +situations +six +sixes +sixpence +sixpences +sixteen +sixteens +sixteenth +sixth +sixthly +sixties +sixtieth +sixty +sizable +sizableness +size +sized +sizer +sizers +sizes +sizing +sizings +skate +skated +skater +skater's +skaters +skates +skating +skeletal +skeletally +skeleton +skeleton's +skeletons +skeptic +skeptic's +skeptical +skeptically +skeptics +sketch +sketched +sketcher +sketches +sketchier +sketchily +sketchiness +sketching +sketchy +skew +skewed +skewer +skewered +skewering +skewers +skewing +skewness +skews +ski +skied +skien +skier +skies +skiing +skill +skilled +skillful +skillfully +skillfulness +skilling +skills +skim +skim's +skimmed +skimmer +skimmer's +skimmers +skimming +skimmings +skimp +skimped +skimping +skimps +skims +skin +skin's +skinned +skinner +skinner's +skinners +skinning +skins +skip +skipped +skipper +skipper's +skippered +skippering +skippers +skipping +skips +skirmish +skirmished +skirmisher +skirmishers +skirmishes +skirmishing +skirt +skirted +skirter +skirting +skirts +skis +skulk +skulked +skulker +skulking +skulks +skull +skull's +skulled +skulls +skunk +skunk's +skunks +sky +sky's +skying +skylark +skylarker +skylarking +skylarks +skylight +skylight's +skylights +skyscraper +skyscraper's +skyscrapers +slab +slabs +slack +slacked +slacken +slackened +slackening +slackens +slacker +slackest +slacking +slackly +slackness +slacks +slain +slam +slammed +slamming +slams +slander +slandered +slanderer +slandering +slanders +slang +slanging +slant +slanted +slanting +slantingly +slants +slap +slapped +slapping +slaps +slash +slashed +slasher +slashes +slashing +slashingly +slat +slat's +slate +slated +slater +slaters +slates +slating +slats +slaughter +slaughtered +slaughterer +slaughtering +slaughters +slave +slaved +slaver +slavered +slavering +slavery +slaves +slaving +slay +slayer +slayers +slaying +slays +sled +sled's +sledge +sledge's +sledges +sledging +sleds +sleek +sleekly +sleekness +sleep +sleeper +sleepers +sleepier +sleepily +sleepiness +sleeping +sleepless +sleeplessly +sleeplessness +sleeps +sleepy +sleet +sleeve +sleeve's +sleeved +sleeves +sleeving +sleigh +sleighs +sleken +slekened +slekening +slender +slenderer +slenderly +slenderness +slept +slew +slewed +slewing +slice +sliced +slicer +slicers +slices +slicing +slick +slicker +slickers +slickly +slickness +slicks +slid +slide +slider +sliders +slides +sliding +slier +sliest +slight +slighted +slighter +slightest +slighting +slightingly +slightly +slightness +slights +slim +slime +slimed +slimes +slimier +sliminess +sliming +slimly +slimness +slimy +sling +slinger +slinging +slings +slip +slip's +slippage +slipped +slipper +slipper's +slipperier +slipperiness +slippers +slippery +slipping +slips +slit +slit's +slits +slogan +slogan's +slogans +slop +slope +sloped +sloper +slopers +slopes +sloping +slopped +sloppier +sloppiness +slopping +sloppy +slops +slot +slot's +sloth +sloths +slots +slotted +slouch +slouched +sloucher +slouches +slouching +slow +slowed +slower +slowest +slowing +slowly +slowness +slows +slug +sluggish +sluggishly +sluggishness +slugs +slum +slum's +slumber +slumber's +slumbered +slumberer +slumbering +slumbers +slump +slumped +slumps +slums +slung +slur +slur's +slurs +sly +slyly +smack +smacked +smacker +smacking +smacks +small +smaller +smallest +smallness +smallpox +smart +smarted +smarten +smartened +smartening +smarter +smartest +smarting +smartly +smartness +smarts +smash +smashed +smasher +smashers +smashes +smashing +smashingly +smear +smeared +smearer +smearing +smears +smell +smelled +smeller +smellier +smelling +smells +smelly +smelt +smelter +smelts +smile +smiled +smiler +smiles +smiling +smilingly +smite +smiter +smith +smith's +smithies +smiths +smithy +smiting +smitten +smock +smocking +smocks +smog +smokable +smoke +smoked +smoker +smoker's +smokers +smokes +smokier +smokies +smokiness +smoking +smoky +smolder +smoldered +smoldering +smolderingly +smolders +smooth +smoothed +smoothen +smoothened +smoothening +smoother +smoothers +smoothes +smoothest +smoothing +smoothly +smoothness +smote +smother +smothered +smothering +smothers +smug +smuggle +smuggled +smuggler +smugglers +smuggles +smuggling +smugly +smugness +snail +snail's +snails +snake +snaked +snakes +snaking +snap +snapped +snapper +snapper's +snappers +snappier +snappiest +snappily +snappiness +snapping +snappy +snaps +snapshot +snapshot's +snapshots +snare +snared +snarer +snares +snarf +snarfed +snarfing +snarfings +snarfs +snaring +snarl +snarled +snarler +snarling +snarls +snatch +snatched +snatcher +snatches +snatching +sneak +sneaked +sneaker +sneakered +sneakers +sneakier +sneakiest +sneakily +sneakiness +sneaking +sneakingly +sneaks +sneaky +sneer +sneered +sneerer +sneering +sneers +sneeze +sneezed +sneezer +sneezes +sneezing +sniff +sniffed +sniffer +sniffing +sniffs +snippet +snoop +snooped +snooper +snooping +snoops +snore +snored +snorer +snores +snoring +snort +snorted +snorter +snorting +snorts +snout +snout's +snouted +snouts +snow +snowed +snowier +snowiest +snowily +snowiness +snowing +snowman +snowmen +snows +snowshoe +snowshoe's +snowshoed +snowshoer +snowshoes +snowy +snuff +snuffed +snuffer +snuffing +snuffs +snug +snuggle +snuggled +snuggles +snuggling +snugly +snugness +snugs +so +soak +soaked +soaker +soaking +soaks +soap +soaped +soaping +soaps +soar +soared +soarer +soaring +soars +sob +sober +sobered +soberer +soberest +sobering +soberly +soberness +sobers +sobs +soccer +sociability +sociable +sociably +social +socialism +socialist +socialist's +socialists +socially +societal +societally +societies +society +society's +sociological +sociologically +sociology +sock +socked +socket +socket's +sockets +socking +socks +sod +sod's +soda +sodium +sodomy +sods +sofa +sofa's +sofas +soft +soften +softened +softener +softening +softens +softer +softest +softly +softness +software +software's +softwares +soil +soiled +soiling +soils +sojourn +sojourner +sojourners +solace +solaced +solacer +solacing +solar +sold +solder +soldered +solderer +soldering +solders +soldier +soldiered +soldiering +soldierly +soldiers +sole +soled +solely +solemn +solemnity +solemnly +solemnness +soleness +soles +solicit +solicited +soliciting +solicitor +solicitors +solicits +solid +solidification +solidified +solidifies +solidify +solidifying +solidity +solidly +solidness +solids +soling +solingen +solitaire +solitariness +solitary +solitude +solitude's +solitudes +solo +solo's +soloed +soloing +solos +solubility +soluble +solution +solution's +solutions +solvable +solve +solved +solvent +solvent's +solvently +solvents +solver +solvers +solves +solving +somber +somberly +somberness +some +somebody +somebody's +someday +somehow +someone +someone's +someplace +someplace's +somers +something +sometime +sometimes +somewhat +somewhere +somewheres +son +son's +sonar +sonars +song +song's +songs +sonly +sonnet +sonnet's +sonnets +sons +soon +sooner +soonest +soot +sooth +soothe +soothed +soother +soothes +soothing +soothingly +soothingness +soothly +sophisticated +sophisticatedly +sophistication +sophomore +sophomore's +sophomores +sorcerer +sorcerer's +sorcerers +sorcery +sordid +sordidly +sordidness +sore +sorely +soreness +sorer +sores +sorest +sorrier +sorriest +sorriness +sorrow +sorrow's +sorrower +sorrowful +sorrowfully +sorrowfulness +sorrows +sorry +sort +sorted +sorter +sorters +sorting +sorts +sos +sought +soul +soul's +souled +souls +sound +sounded +sounder +soundest +sounding +sounding's +soundingly +soundings +soundly +soundness +sounds +soup +soup's +soups +sour +source +source's +sources +soured +sourer +sourest +souring +sourly +sourness +sours +south +souther +southerly +southern +southerner +southerners +southernly +southernness +southing +sovereign +sovereign's +sovereignly +sovereigns +soviet +soviet's +soviets +space +spaced +spacer +spacers +spaces +spaceship +spaceship's +spaceships +spacing +spacings +spade +spaded +spader +spades +spading +spaghetti +span +span's +spank +spanked +spanker +spanking +spanks +spanned +spanner +spanner's +spanners +spanning +spans +spare +spared +sparely +spareness +sparer +spares +sparest +sparing +sparingly +spark +sparked +sparker +sparking +sparks +sparrow +sparrow's +sparrows +sparse +sparsely +sparseness +sparser +sparsest +spat +spate +spate's +spates +spatial +spatially +spats +spatter +spattered +spawn +spawned +spawner +spawning +spawns +speak +speakable +speaker +speaker's +speakers +speaking +speaks +spear +speared +spearer +spearing +spears +special +specialist +specialist's +specialists +specially +specialness +specials +species +specifiable +specific +specifically +specification +specifications +specificities +specificity +specifics +specified +specifier +specifiers +specifies +specify +specifying +specimen +specimen's +specimens +speck +speck's +speckle +speckled +speckles +speckling +specks +spectacle +spectacled +spectacles +spectacular +spectacularly +spectator +spectator's +spectators +spectra +spectrogram +spectrogram's +spectrograms +spectroscopically +spectrum +spectrums +speculate +speculated +speculates +speculating +speculation +speculations +speculative +speculatively +speculator +speculator's +speculators +sped +speech +speech's +speeches +speechless +speechlessly +speechlessness +speed +speeded +speeder +speeders +speedier +speedily +speediness +speeding +speeds +speedup +speedup's +speedups +speedy +spell +spelled +speller +spellers +spelling +spellings +spells +spend +spender +spenders +spending +spends +spent +sphere +sphere's +spheres +spherical +spherically +sphering +spice +spiced +spices +spicier +spiciness +spicing +spicy +spider +spider's +spiders +spied +spier +spies +spike +spiked +spiker +spikes +spiking +spill +spilled +spiller +spilling +spills +spin +spinach +spinal +spinally +spindle +spindled +spindler +spindles +spindling +spine +spines +spinner +spinner's +spinners +spinning +spins +spiral +spirally +spirals +spire +spire's +spired +spires +spiring +spirit +spirited +spiritedly +spiritedness +spiriting +spirits +spiritual +spiritually +spiritualness +spirituals +spit +spite +spited +spiteful +spitefully +spitefulness +spites +spiting +spits +spitting +splash +splashed +splasher +splashers +splashes +splashing +spleen +splendid +splendidly +splendidness +splice +spliced +splicer +splicers +splices +splicing +splicings +spline +spline's +splined +splines +splinter +splintered +splintering +splinters +split +split's +splits +splitter +splitter's +splitters +splitting +splittings +spoil +spoiled +spoiler +spoilers +spoiling +spoils +spoke +spoked +spoken +spokes +spokesman +spokesmen +spoking +sponge +sponged +sponger +spongers +sponges +sponging +sponsor +sponsored +sponsoring +sponsors +sponsorship +spontaneous +spontaneously +spontaneousness +spook +spookier +spookiness +spooky +spool +spooled +spooler +spoolers +spooling +spools +spoon +spooned +spooning +spoons +spore +spore's +spored +spores +sporing +sport +sported +sporting +sportingly +sportive +sportively +sportiveness +sports +sportsman +sportsmanly +spot +spot's +spotless +spotlessly +spotlessness +spotlight +spotlight's +spotlighted +spotlighting +spotlights +spots +spotted +spotter +spotter's +spotters +spotting +spouse +spouse's +spouses +spousing +spout +spouted +spouter +spouting +spouts +sprang +sprawl +sprawled +sprawling +sprawls +spray +sprayed +sprayer +spraying +sprays +spread +spreader +spreaders +spreading +spreadings +spreads +spreadsheet +spreadsheets +spree +spree's +sprees +sprig +sprightlier +sprightliness +sprightly +spring +springer +springers +springier +springiest +springiness +springing +springs +springtime +springy +sprinkle +sprinkled +sprinkler +sprinklered +sprinkles +sprinkling +sprint +sprinted +sprinter +sprinters +sprinting +sprints +sprite +sprout +sprouted +sprouting +sprouts +spruce +spruced +sprucely +spruceness +sprucer +sprucest +sprucing +sprung +spun +spur +spur's +spurious +spuriously +spuriousness +spurn +spurned +spurner +spurning +spurns +spurs +spurt +spurted +spurting +spurts +sputter +sputtered +sputterer +spy +spying +squabble +squabbled +squabbler +squabbles +squabbling +squad +squad's +squadron +squadron's +squadrons +squads +squall +squall's +squaller +squalls +square +squared +squarely +squareness +squarer +squares +squarest +squaring +squash +squashed +squasher +squashes +squashing +squat +squatly +squatness +squats +squawk +squawked +squawker +squawking +squawks +squeak +squeaked +squeaker +squeaking +squeaks +squeal +squealed +squealer +squealing +squeals +squeeze +squeezed +squeezer +squeezes +squeezing +squid +squids +squint +squinted +squinter +squinting +squintingly +squints +squire +squire's +squires +squiring +squirm +squirmed +squirming +squirms +squirrel +squirrelly +squirrels +stab +stabbed +stabbing +stabilities +stability +stability's +stable +stabled +stableness +stabler +stables +stablest +stabling +stably +stabs +stack +stack's +stacked +stacker +stacking +stacks +staff +staff's +staffed +staffer +staffers +staffing +staffs +stag +stag's +stage +stagecoach +staged +stager +stagers +stages +stagger +staggered +staggerer +staggering +staggeringly +staggers +staging +stagnant +stagnantly +stags +staid +staidly +staidness +stain +stained +stainer +staining +stainless +stainlessly +stains +stair +stair's +staircase +staircase's +staircases +stairs +stairway +stairway's +stairways +stake +staked +stakes +staking +stale +staled +stalely +staleness +staler +stales +stalest +staling +stalk +stalked +stalker +stalking +stalks +stall +stalled +stalling +stallings +stalls +stalwart +stalwartly +stalwartness +stamen +stamen's +stamens +stamina +stammer +stammered +stammerer +stammering +stammers +stamp +stamped +stampede +stampeded +stampeder +stampedes +stampeding +stamper +stampers +stamping +stamps +stance +stance's +stances +stanch +stancher +stanchest +stand +standard +standardly +standards +standby +stander +standing +standings +standpoint +standpoint's +standpoints +stands +standstill +stanza +stanza's +stanzas +staple +stapled +stapler +staplers +staples +stapling +star +star's +starboard +starboarded +starboarding +starboards +starch +starched +starches +starching +stare +stared +starer +stares +starfish +staring +stark +starkest +starkly +starkness +starlet +starlet's +starlets +starlight +starred +starrier +starring +starry +stars +start +started +starter +starters +starting +startle +startled +startles +startling +startlingly +startlingness +starts +startup +startup's +startups +starvation +starve +starved +starver +starves +starving +state +state's +stated +statelier +stateliness +stately +statement +statement's +statements +stater +states +statesman +statesman's +statesmanly +static +statically +statics +stating +station +stationaries +stationary +stationed +stationer +stationing +stations +statistic +statistic's +statistical +statistically +statistician +statistician's +statisticians +statistics +stative +statue +statue's +statued +statues +statuesque +statuesquely +statuesqueness +stature +status +statuses +statute +statute's +statutes +statutorily +statutoriness +statutory +staunch +staunchest +staunchly +staunchness +stave +staved +staves +staving +stay +stayed +stayer +stayers +staying +stays +stdio +stead +steadfast +steadfastly +steadfastness +steadied +steadier +steadies +steadiest +steadily +steadiness +steading +steady +steadying +steak +steak's +steaks +steal +stealer +stealing +steals +stealth +stealthier +stealthily +stealthiness +stealthy +steam +steamboat +steamboat's +steamboats +steamed +steamer +steamers +steaming +steams +steamship +steamship's +steamships +steed +steeds +steel +steeled +steelers +steeling +steels +steep +steeped +steepen +steepened +steepening +steeper +steepest +steeping +steeple +steeple's +steeples +steeply +steepness +steeps +steer +steered +steerer +steering +steers +stellar +stem +stem's +stemmed +stemming +stems +stench +stench's +stenches +stencil +stencil's +stencils +stenographer +stenographer's +stenographers +step +step's +stepmother +stepmother's +stepmothers +stepped +stepper +stepping +steps +stepwise +stereo +stereo's +stereos +stereotype +stereotyped +stereotyper +stereotypers +stereotypes +stereotypical +stereotypically +stereotyping +sterile +sterling +sterlingly +sterlingness +stern +sternly +sternness +sterns +stew +steward +steward's +stewards +stewed +stewing +stews +stick +sticked +sticker +stickers +stickier +stickiest +stickily +stickiness +sticking +sticks +sticky +stiff +stiffen +stiffened +stiffener +stiffeners +stiffening +stiffens +stiffer +stiffest +stiffly +stiffness +stiffnesses +stiffs +stifle +stifled +stifler +stifles +stifling +stiflingly +stigma +stigmas +stile +stile's +stiles +still +stilled +stiller +stillest +stilling +stillness +stills +stimulant +stimulant's +stimulants +stimulate +stimulated +stimulates +stimulating +stimulation +stimulations +stimulative +stimuli +stimulus +sting +stinger +stinging +stingingly +stings +stink +stinker +stinkers +stinking +stinkingly +stinks +stint +stint's +stinted +stinter +stinting +stints +stipend +stipend's +stipends +stipple +stippled +stippler +stipples +stippling +stipulate +stipulated +stipulates +stipulating +stipulation +stipulations +stir +stirred +stirrer +stirrer's +stirrers +stirring +stirringly +stirrings +stirrup +stirrups +stirs +stitch +stitched +stitcher +stitches +stitching +stochastic +stochastically +stock +stockade +stockade's +stockaded +stockades +stockading +stocked +stocker +stockers +stockholder +stockholder's +stockholders +stocking +stockinged +stockings +stocks +stole +stole's +stoled +stolen +stoles +stomach +stomached +stomacher +stomaches +stomaching +stone +stone's +stoned +stoner +stones +stonier +stoniness +stoning +stony +stood +stool +stools +stoop +stooped +stooping +stoops +stop +stop's +stopcock +stopcocks +stopgap +stopgap's +stopgaps +stoppable +stoppage +stoppages +stopped +stopper +stopper's +stoppered +stoppering +stoppers +stopping +stops +storage +storage's +storages +store +stored +storehouse +storehouse's +storehouses +stores +storied +stories +storing +stork +stork's +storks +storm +stormed +stormier +stormiest +storminess +storming +storms +stormy +story +story's +storying +stout +stouten +stoutened +stoutening +stouter +stoutest +stoutly +stoutness +stove +stove's +stover +stoves +stow +stowed +stowing +stows +straggle +straggled +straggler +stragglers +straggles +straggling +straight +straighten +straightened +straightener +straighteners +straightening +straightens +straighter +straightest +straightforward +straightforwardly +straightforwardness +straightforwards +straightly +straightness +straightway +strain +strained +strainer +strainers +straining +strains +strait +straiten +straitened +straitening +straitly +straitness +straits +strand +stranded +strandedness +strander +stranding +strands +strange +strangely +strangeness +stranger +stranger's +strangers +strangest +strangle +strangled +strangler +stranglers +strangles +strangling +stranglings +strangulation +strangulation's +strangulations +strap +strap's +straps +stratagem +stratagem's +stratagems +strategic +strategics +strategies +strategy +strategy's +stratification +stratifications +stratified +stratifies +stratify +stratifying +stratum +straw +straw's +strawberries +strawberry +strawberry's +straws +stray +stray's +strayed +strayer +straying +strays +streak +streaked +streaking +streaks +stream +streamed +streamer +streamers +streaming +streamline +streamlined +streamliner +streamlines +streamlining +streams +street +streetcar +streetcar's +streetcars +streeters +streets +strength +strengthen +strengthened +strengthener +strengthening +strengthens +strengths +strenuous +strenuously +strenuousness +stress +stressed +stresses +stressing +stretch +stretched +stretcher +stretchers +stretches +stretching +strew +strewing +strewn +strews +strewth +stricken +strict +stricter +strictest +strictly +strictness +stride +strider +strides +striding +strife +strike +striker +strikers +strikes +striking +strikingly +string +string's +stringed +stringent +stringently +stringer +stringers +stringier +stringiest +stringiness +stringing +strings +stringy +strip +strip's +stripe +striped +striper +stripes +striping +stripped +stripper +stripper's +strippers +stripping +strips +strive +striver +strives +striving +strivings +strobe +strobe's +strobed +strobes +strobing +stroboscopic +strode +stroke +stroked +stroker +strokers +strokes +stroking +stroll +strolled +stroller +strolling +strolls +strong +stronger +strongest +stronghold +strongly +strove +struck +structural +structurally +structure +structured +structurer +structures +structuring +struggle +struggled +struggler +struggles +struggling +strung +strut +struts +strutted +strutter +strutting +stub +stub's +stubbed +stubbing +stubble +stubborn +stubbornly +stubbornness +stubs +stuck +stud +stud's +student +student's +students +studied +studiedly +studiedness +studier +studies +studio +studio's +studios +studious +studiously +studiousness +studs +study +studying +stuff +stuffed +stuffer +stuffier +stuffiest +stuffiness +stuffing +stuffings +stuffs +stuffy +stumble +stumbled +stumbler +stumbles +stumbling +stumblingly +stump +stumped +stumper +stumping +stumps +stun +stung +stunning +stunningly +stuns +stunt +stunt's +stunted +stuntedness +stunting +stunts +stupefy +stupefying +stupendous +stupendously +stupendousness +stupid +stupider +stupidest +stupidities +stupidity +stupidly +stupidness +stupor +sturdier +sturdiness +sturdy +style +styled +styler +stylers +styles +styling +stylish +stylishly +stylishness +stylistic +stylistically +stylistics +sub +subatomic +subclass +subclass's +subclasses +subcommittee +subcommittee's +subcommittees +subcomponent +subcomponent's +subcomponents +subcomputation +subcomputation's +subcomputations +subconscious +subconsciously +subconsciousness +subculture +subculture's +subcultures +subdivide +subdivided +subdivider +subdivides +subdividing +subdivision +subdivision's +subdivisions +subdue +subdued +subduedly +subduer +subdues +subduing +subexpression +subexpression's +subexpressions +subfield +subfield's +subfields +subfile +subfile's +subfiles +subgoal +subgoal's +subgoals +subgraph +subgraphs +subgroup +subgroup's +subgrouping +subgroups +subinterval +subinterval's +subintervals +subject +subject's +subjected +subjecting +subjection +subjective +subjectively +subjectiveness +subjectivity +subjects +sublimation +sublimations +sublime +sublimed +sublimely +sublimeness +sublimer +subliming +sublist +sublist's +sublists +submarine +submarined +submariner +submariners +submarines +submarining +submerge +submerged +submerges +submerging +submission +submission's +submissions +submit +submits +submitted +submitting +submode +submodes +submodule +submodule's +submodules +subnetwork +subnetwork's +subnetworks +subordinate +subordinated +subordinately +subordinateness +subordinates +subordinating +subordination +subordinative +subproblem +subproblem's +subproblems +subprocess +subprocess's +subprocesses +subprogram +subprogram's +subprograms +subproject +subproof +subproof's +subproofs +subrange +subrange's +subranges +subroutine +subroutine's +subroutines +subs +subschema +subschema's +subschemas +subscribe +subscribed +subscriber +subscribers +subscribes +subscribing +subscript +subscripted +subscripting +subscription +subscription's +subscriptions +subscripts +subsection +subsection's +subsections +subsegment +subsegment's +subsegments +subsequence +subsequence's +subsequences +subsequent +subsequently +subsequentness +subset +subset's +subsets +subside +subsided +subsides +subsidiaries +subsidiary +subsidiary's +subsidies +subsiding +subsidy +subsidy's +subsist +subsisted +subsistence +subsisting +subsists +subspace +subspace's +subspaces +substance +substance's +substances +substantial +substantially +substantialness +substantiate +substantiated +substantiates +substantiating +substantiation +substantiations +substantiative +substantive +substantively +substantiveness +substantivity +substitutability +substitutable +substitute +substituted +substituter +substitutes +substituting +substitution +substitutions +substitutive +substitutively +substrate +substrate's +substrates +substring +substrings +substructure +substructure's +substructures +subsume +subsumed +subsumes +subsuming +subsystem +subsystem's +subsystems +subtask +subtask's +subtasks +subterranean +subterraneanly +subtitle +subtitle's +subtitled +subtitles +subtitling +subtle +subtleness +subtler +subtlest +subtleties +subtlety +subtly +subtopic +subtopic's +subtopics +subtract +subtracted +subtracter +subtracter's +subtracters +subtracting +subtraction +subtractions +subtractive +subtracts +subtrahend +subtrahend's +subtrahends +subtree +subtree's +subtrees +subunit +subunit's +subunits +suburb +suburb's +suburban +suburbs +subversion +subvert +subverted +subverter +subverting +subverts +subway +subway's +subways +succeed +succeeded +succeeder +succeeding +succeeds +success +successes +successful +successfully +successfulness +succession +succession's +successions +successive +successively +successiveness +successor +successor's +successors +succinct +succinctly +succinctness +succumb +succumbed +succumbing +succumbs +such +suck +sucked +sucker +suckered +suckering +suckers +sucking +suckle +suckled +suckles +suckling +sucks +suction +sudden +suddenly +suddenness +suds +sudser +sudsing +sue +sued +sueded +sueding +suer +sues +suffer +sufferance +suffered +sufferer +sufferers +suffering +sufferings +suffers +suffice +sufficed +sufficer +suffices +sufficiency +sufficient +sufficiently +sufficing +suffix +suffixed +suffixer +suffixes +suffixing +suffocate +suffocated +suffocates +suffocating +suffocatingly +suffocation +suffocative +suffrage +sugar +sugared +sugaring +sugarings +sugars +suggest +suggested +suggester +suggestible +suggesting +suggestion +suggestion's +suggestions +suggestive +suggestively +suggestiveness +suggests +suicidal +suicidally +suicide +suicide's +suicided +suicides +suiciding +suing +suit +suit's +suitability +suitable +suitableness +suitably +suitcase +suitcase's +suitcases +suite +suited +suiters +suites +suiting +suitor +suitor's +suitors +suits +sulk +sulked +sulkies +sulkiness +sulking +sulks +sulky +sullen +sullenly +sullenness +sulphate +sulphates +sulphur +sulphured +sulphuric +sultan +sultan's +sultans +sultrier +sultriness +sultry +sum +sum's +sumer +summand +summand's +summands +summaries +summary +summary's +summation +summation's +summations +summed +summer +summer's +summered +summering +summers +summing +summit +summon +summoned +summoner +summoners +summoning +summons +summonses +sumptuous +sumptuously +sumptuousness +sums +sun +sun's +sunbeam +sunbeam's +sunbeams +sunburn +sundown +sundowner +sundowners +sundries +sundry +sung +sunglass +sunglasses +sunk +sunken +sunlight +sunlights +sunned +sunnier +sunniness +sunning +sunny +sunrise +sunrises +suns +sunset +sunsets +sunshine +sunshines +sup +super +superb +superbly +superbness +superclass +superclass's +supercomputer +supercomputer's +supercomputers +supered +superego +superego's +superegos +superficial +superficially +superficialness +superfluities +superfluity +superfluity's +superfluous +superfluously +superfluousness +superhuman +superhumanly +superhumanness +superimpose +superimposed +superimposes +superimposing +supering +superintend +superintendent +superintendent's +superintendents +superior +superior's +superiority +superiorly +superiors +superlative +superlatively +superlativeness +superlatives +supermarket +supermarket's +supermarkets +superpose +superposed +superposes +superposing +superscript +superscripted +superscripting +superscripts +supersede +superseded +superseder +supersedes +superseding +superset +superset's +supersets +superstition +superstition's +superstitions +superstitious +superstitiously +superstitiousness +supertitle +supertitle's +supertitled +supertitles +supertitling +superuser +superuser's +superusers +supervise +supervised +supervises +supervising +supervision +supervisions +supervisor +supervisor's +supervisors +supervisory +supper +supper's +suppers +supplant +supplanted +supplanter +supplanting +supplants +supple +suppled +supplely +supplement +supplemental +supplementaries +supplementary +supplemented +supplementer +supplementing +supplements +suppleness +suppler +supplication +supplied +supplier +supplier's +suppliers +supplies +suppling +supply +supply's +supplying +support +supportable +supported +supporter +supporters +supporting +supportingly +supportive +supportively +supports +suppose +supposed +supposedly +supposer +supposes +supposing +supposition +supposition's +suppositions +suppress +suppressed +suppresses +suppressing +suppression +suppressions +suppressive +suppressiveness +supremacy +supreme +supremely +supremeness +sure +sured +surely +sureness +surer +surest +sureties +surety +surf +surface +surfaced +surfaceness +surfacer +surfacers +surfaces +surfacing +surfer +surfer's +surfers +surfing +surge +surged +surgely +surgeon +surgeon's +surgeons +surgeries +surgery +surges +surgical +surgically +surging +surlier +surliness +surly +surmise +surmised +surmiser +surmises +surmising +surmount +surmounted +surmounting +surmounts +surname +surname's +surnamed +surnames +surpass +surpassed +surpasses +surpassing +surpassingly +surplus +surplus's +surpluses +surprise +surprise's +surprised +surpriser +surprises +surprising +surprisingly +surrender +surrendered +surrenderer +surrendering +surrenders +surrogate +surrogate's +surrogates +surrogation +surround +surrounded +surrounding +surroundings +surrounds +survey +surveyed +surveying +surveyor +surveyor's +surveyors +surveys +survival +survivals +survive +survived +surviver +survives +surviving +survivor +survivor's +survivors +susceptible +suspect +suspected +suspecter +suspecting +suspects +suspend +suspended +suspender +suspender's +suspenders +suspending +suspends +suspense +suspenses +suspension +suspensions +suspensive +suspensively +suspicion +suspicion's +suspicioned +suspicioning +suspicions +suspicious +suspiciously +suspiciousness +sustain +sustained +sustainer +sustaining +sustains +suture +sutured +sutures +suturing +swagger +swaggered +swaggering +swain +swain's +swains +swallow +swallowed +swallower +swallowing +swallows +swam +swamp +swamped +swamper +swampier +swampiness +swamping +swamps +swampy +swan +swan's +swans +swap +swapped +swapper +swapper's +swappers +swapping +swaps +swarm +swarmed +swarmer +swarming +swarms +swarthier +swarthiness +swarthy +swatted +sway +swayed +swayer +swaying +sways +swear +swearer +swearing +swears +sweat +sweated +sweater +sweaters +sweating +sweats +sweep +sweeper +sweepers +sweeping +sweepingly +sweepingness +sweepings +sweeps +sweet +sweeten +sweetened +sweetener +sweeteners +sweetening +sweetenings +sweetens +sweeter +sweetest +sweetheart +sweetheart's +sweethearts +sweetie +sweetie's +sweeties +sweeting +sweetly +sweetness +sweets +swell +swelled +swelling +swellings +swells +swept +swerve +swerved +swerves +swerving +swift +swifter +swiftest +swiftly +swiftness +swim +swimmer +swimmer's +swimmers +swimming +swimmingly +swims +swimsuit +swimsuit's +swimsuits +swine +swing +swinger +swingers +swinging +swingingly +swings +swipe +swiped +swipes +swiping +swirl +swirled +swirler +swirling +swirlingly +swirls +swish +swished +swisher +switch +switch's +switchboard +switchboard's +switchboards +switched +switcher +switchers +switches +switching +switchings +swollen +swoon +swooned +swooner +swooning +swooningly +swoons +swoop +swooped +swooper +swooping +swoops +sword +sword's +swords +swore +sworn +swum +swung +sycamore +syllabi +syllable +syllable's +syllabled +syllables +syllabling +syllabus +syllogism +syllogism's +syllogisms +symbiosis +symbiotic +symbol +symbol's +symbolic +symbolic's +symbolically +symbolics +symbolism +symbolisms +symbols +symmetric +symmetrical +symmetrically +symmetricalness +symmetries +symmetry +symmetry's +sympathetic +sympathies +sympathy +sympathy's +symphonies +symphony +symphony's +symposium +symposiums +symptom +symptom's +symptomatic +symptoms +synapse +synapse's +synapsed +synapses +synapsing +synchronous +synchronously +synchronousness +synchrony +syndicate +syndicated +syndicates +syndicating +syndication +syndrome +syndrome's +syndromes +synergism +synergistic +synonym +synonym's +synonymous +synonymously +synonyms +synopses +synopsis +syntactic +syntactical +syntactically +syntacticly +syntactics +syntax +syntaxes +syntheses +synthesis +synthetic +synthetics +syringe +syringed +syringes +syringing +syrup +system +system's +systematic +systematically +systematicness +systematics +systems +tab +tabernacle +tabernacle's +tabernacled +tabernacles +tabernacling +table +tableau +tableau's +tableaus +tablecloth +tablecloths +tabled +tables +tablespoon +tablespoon's +tablespoonful +tablespoonful's +tablespoonfuls +tablespoons +tablet +tablet's +tablets +tabling +taboo +taboo's +taboos +tabs +tabular +tabularly +tabulate +tabulated +tabulates +tabulating +tabulation +tabulations +tabulator +tabulator's +tabulators +tachometer +tachometer's +tachometers +tachometry +tacit +tacitly +tacitness +tack +tacked +tacker +tacking +tackle +tackle's +tackled +tackler +tackles +tackling +tacks +tact +tactics +tactile +tactilely +tag +tag's +tagged +tagging +tags +tail +tailed +tailer +tailing +tailings +tailor +tailored +tailoring +tailors +tails +taint +tainted +taints +take +taken +taker +takers +takes +taketh +taking +takings +tale +tale's +talent +talented +talents +taler +tales +talion +talk +talkative +talkatively +talkativeness +talked +talker +talkers +talkie +talking +talks +tall +taller +tallest +tallness +tallow +tame +tamed +tamely +tameness +tamer +tames +tamest +taming +tamper +tampered +tamperer +tampering +tampers +tan +tandem +tang +tanged +tangent +tangent's +tangential +tangentially +tangents +tangible +tangibleness +tangibly +tangier +tangle +tangled +tangles +tangling +tangly +tangy +tank +tanked +tanker +tankers +tanking +tanks +tanner +tanner's +tanners +tans +tantamount +tantrum +tantrum's +tantrums +tap +tap's +tape +taped +taper +tapered +taperer +tapering +tapers +tapes +tapestried +tapestries +tapestry +tapestry's +taping +tapings +tapped +tapper +tapper's +tappers +tapping +taproot +taproot's +taproots +taps +tar +tardier +tardies +tardiness +tardy +target +targeted +targeting +targets +tariff +tariff's +tariffs +taring +tarried +tarries +tarry +tarrying +tars +tart +tartly +tartness +tarts +task +tasked +tasking +tasks +taste +tasted +tasteful +tastefully +tastefulness +tasteless +tastelessly +tastelessness +taster +tasters +tastes +tasting +tatter +tattered +tattoo +tattooed +tattooer +tattoos +tau +taught +taunt +taunted +taunter +taunting +tauntingly +taunts +taut +tauten +tautened +tautening +tautly +tautness +tautological +tautologically +tautologies +tautology +tautology's +tavern +tavern's +taverner +taverns +tawnier +tawnies +tawniness +tawny +tax +taxable +taxation +taxed +taxer +taxes +taxi +taxi's +taxicab +taxicab's +taxicabs +taxied +taxiing +taxing +taxingly +taxis +taxonomic +taxonomically +taxonomy +taxpayer +taxpayer's +taxpayers +tea +teach +teachable +teachableness +teacher +teacher's +teachers +teaches +teaching +teachings +team +team's +teamed +teaming +teams +tear +tear's +teared +tearer +tearful +tearfully +tearfulness +tearing +tears +teas +tease +teased +teaser +teases +teasing +teasingly +teaspoon +teaspoon's +teaspoonful +teaspoonful's +teaspoonfuls +teaspoons +technical +technicalities +technicality +technicality's +technically +technicalness +technician +technician's +technicians +technique +technique's +techniques +technological +technologically +technologies +technologist +technologist's +technologists +technology +technology's +tedious +tediously +tediousness +tedium +teem +teemed +teeming +teemingly +teemingness +teems +teen +teenage +teenaged +teenager +teenagers +teener +teens +teeth +teethe +teethed +teether +teethes +teething +telecommunication +telecommunications +teleconference +teleconference's +teleconferenced +teleconferences +teleconferencing +telegram +telegram's +telegrams +telegraph +telegraphed +telegrapher +telegraphers +telegraphic +telegraphing +telegraphs +teleological +teleologically +teleology +telephone +telephoned +telephoner +telephoners +telephones +telephonic +telephoning +telephony +telescope +telescoped +telescopes +telescoping +teletype +teletype's +teletypes +televise +televised +televises +televising +television +televisions +televisor +televisor's +televisors +tell +teller +tellers +telling +tellingly +tellings +tells +temper +temperament +temperamental +temperamentally +temperaments +temperance +temperate +temperately +temperateness +temperature +temperature's +temperatures +tempered +temperer +tempering +tempers +tempest +tempests +tempestuous +tempestuously +tempestuousness +template +template's +templates +temple +temple's +templed +temples +temporal +temporally +temporaries +temporarily +temporariness +temporary +tempt +temptation +temptation's +temptations +tempted +tempter +tempters +tempting +temptingly +tempts +ten +ten's +tenacious +tenaciously +tenaciousness +tenant +tenant's +tenants +tend +tended +tendencies +tendency +tender +tendered +tendering +tenderly +tenderness +tenders +tending +tends +tenement +tenement's +tenements +tennis +tenor +tenor's +tenors +tens +tense +tensed +tensely +tenseness +tenser +tenses +tensest +tensing +tension +tensioned +tensioner +tensioning +tensions +tensive +tensor +tensor's +tensors +tent +tentacle +tentacled +tentacles +tentative +tentatively +tentativeness +tented +tenter +tenth +tenthes +tenting +tents +tenure +tenured +tenures +tequila +tequila's +term +termcap +termed +termer +terminal +terminal's +terminally +terminals +terminate +terminated +terminates +terminating +termination +terminations +terminative +terminatively +terminator +terminator's +terminators +terming +terminologies +terminology +terminus +termly +terms +ternary +terrace +terraced +terraces +terracing +terrain +terrain's +terrains +terrestrial +terrestrial's +terrestrially +terrestrials +terrible +terribleness +terribly +terrier +terrier's +terriers +terrific +terrificly +terrified +terrifies +terrify +terrifying +terrifyingly +territorial +territorially +territories +territory +territory's +terror +terror's +terrorism +terrorist +terrorist's +terroristic +terrorists +terrors +tertiaries +tertiary +test +test's +testability +testable +testament +testament's +testaments +tested +tester +tester's +testers +testicle +testicle's +testicles +testified +testifier +testifiers +testifies +testify +testifying +testimonies +testimony +testimony's +testing +testings +tests +text +text's +textbook +textbook's +textbooks +textile +textile's +textiles +texts +textual +textually +texture +textured +textures +texturing +than +thank +thanked +thanker +thankful +thankfully +thankfulness +thanking +thankless +thanklessly +thanklessness +thanks +thanksgiving +thanksgiving's +thanksgivings +that +that's +thatch +thatched +thatcher +thatches +thatching +thats +thaw +thawed +thawing +thaws +the +theatrical +theatrically +theatricals +theft +theft's +thefts +their +their's +theirs +them +thematic +theme +theme's +themes +themselves +then +thence +thenceforth +theologian +theologian's +theologians +theological +theologically +theologies +theology +theorem +theorem's +theorems +theoretic +theoretical +theoretically +theoreticians +theoretics +theories +theorist +theorist's +theorists +theory +theory's +therapeutic +therapeutics +therapies +therapist +therapist's +therapists +therapy +therapy's +there +there's +thereabouts +thereafter +thereby +therefore +therein +thereof +thereon +thereto +thereupon +therewith +thermodynamic +thermodynamics +thermometer +thermometer's +thermometers +thermostat +thermostat's +thermostated +thermostats +these +theses +thesis +they +they'd +they'll +they're +they've +thick +thicken +thickened +thickener +thickeners +thickening +thickens +thicker +thickest +thicket +thicket's +thicketed +thickets +thickly +thickness +thicknesses +thicks +thief +thieve +thieves +thieving +thigh +thighed +thighs +thimble +thimble's +thimbles +thin +thiner +thinest +thing +thingamajig +thingamajig's +thingamajigs +thingness +things +think +thinkable +thinkableness +thinkably +thinker +thinkers +thinking +thinkingly +thinkingness +thinks +thinly +thinner +thinners +thinness +thinnest +thins +third +thirdly +thirds +thirst +thirsted +thirster +thirstier +thirstiness +thirsts +thirsty +thirteen +thirteens +thirteenth +thirties +thirtieth +thirty +this +thistle +thong +thonged +thorn +thorn's +thornier +thorniness +thorns +thorny +thorough +thoroughfare +thoroughfare's +thoroughfares +thoroughly +thoroughness +those +though +thought +thought's +thoughtful +thoughtfully +thoughtfulness +thoughtless +thoughtlessly +thoughtlessness +thoughts +thousand +thousands +thousandth +thrash +thrashed +thrasher +thrashes +thrashing +thread +threaded +threader +threaders +threading +threads +threat +threaten +threatened +threatener +threatening +threateningly +threatens +threats +three +three's +threes +threescore +threshold +threshold's +thresholded +thresholding +thresholds +threw +thrice +thrift +thriftier +thriftiness +thrifty +thrill +thrilled +thriller +thrillers +thrilling +thrillingly +thrills +thrive +thrived +thriver +thrives +thriving +thrivingly +throat +throated +throating +throats +throb +throbbed +throbbing +throbs +throne +throne's +thrones +throng +throng's +thronging +throngs +throning +throttle +throttled +throttler +throttles +throttling +through +throughly +throughout +throughput +throw +thrower +throwing +thrown +throws +thrush +thrushes +thrust +thruster +thrusters +thrusting +thrusts +thud +thuds +thug +thug's +thugs +thumb +thumbed +thumbing +thumbs +thump +thumped +thumper +thumping +thumps +thunder +thunderbolt +thunderbolt's +thunderbolts +thundered +thunderer +thunderers +thundering +thunderingly +thunders +thunderstorm +thunderstorm's +thunderstorms +thunderstruck +thus +thusly +thwart +thwarted +thwarter +thwarting +thwartly +thwarts +thyself +tick +ticked +ticker +tickers +ticket +ticket's +ticketed +ticketing +tickets +ticking +tickle +tickled +tickler +tickles +tickling +ticklish +ticklishly +ticklishness +ticks +tidal +tidally +tide +tided +tides +tidied +tidier +tidies +tidiness +tiding +tidings +tidy +tidying +tie +tied +tier +tiered +tiers +ties +tiger +tiger's +tigers +tight +tighten +tightened +tightener +tighteners +tightening +tightenings +tightens +tighter +tightest +tightly +tightness +tights +tilde +tildes +tile +tiled +tiler +tiles +tiling +till +tillable +tilled +tiller +tillered +tillering +tillers +tilling +tills +tilt +tilted +tilter +tilters +tilting +tilts +timber +timbered +timbering +timbers +time +timed +timeless +timelessly +timelessness +timelier +timeliness +timely +timeout +timeouts +timer +timers +times +timeshare +timeshared +timeshares +timesharing +timetable +timetable's +timetabled +timetables +timetabling +timid +timidity +timidly +timidness +timing +timings +tin +tin's +tinge +tinged +tinging +tingle +tingled +tingles +tingling +tinglingly +tinier +tiniest +tinily +tininess +tinker +tinkered +tinkerer +tinkering +tinkers +tinkle +tinkled +tinkles +tinkling +tinned +tinnier +tinniest +tinnily +tinniness +tinning +tinny +tins +tint +tinted +tinter +tinting +tints +tiny +tip +tip's +tipped +tipper +tipper's +tippers +tipping +tips +tiptoe +tiptoed +tire +tired +tiredly +tiredness +tireless +tirelessly +tirelessness +tires +tiresome +tiresomely +tiresomeness +tiring +tissue +tissue's +tissued +tissues +tissuing +tit +tit's +tithe +tithe's +tither +tithes +tithing +title +titled +titles +titling +tits +titter +tittered +tittering +titters +tizzies +tizzy +to +toad +toad's +toads +toast +toasted +toaster +toasters +toastier +toasting +toasts +toasty +tobacco +today +today's +todays +toe +toe's +toed +toes +together +togetherness +toggle +toggled +toggles +toggling +toil +toiled +toiler +toilet +toilet's +toilets +toiling +toils +token +token's +tokens +told +tolerability +tolerable +tolerably +tolerance +tolerances +tolerant +tolerantly +tolerate +tolerated +tolerates +tolerating +toleration +tolerative +toll +tolled +tolling +tolls +tom +tom's +tomahawk +tomahawk's +tomahawks +tomato +tomatoes +tomb +tomb's +tombs +tomography +tomorrow +tomorrow's +tomorrows +toms +ton +ton's +tone +toned +toner +tones +tongs +tongue +tongued +tongues +tonguing +tonic +tonic's +tonics +tonight +toning +tonnage +tons +tonsil +too +took +tool +tooled +tooler +toolers +tooling +toolkit +toolkit's +toolkits +tools +tooth +toothbrush +toothbrush's +toothbrushes +toothbrushing +toothed +toothing +toothpick +toothpick's +toothpicks +top +toped +toper +topic +topic's +topical +topically +topics +toping +topmost +topological +topologically +topologies +topology +topple +toppled +topples +toppling +tops +torch +torch's +torches +tore +torment +tormented +tormenter +tormenters +tormenting +torments +torn +tornado +tornadoes +tornados +torpedo +torpedoed +torpedoes +torpedoing +torpedos +torque +torquer +torquers +torques +torquing +torrent +torrent's +torrents +torrid +torridly +torridness +tortoise +tortoise's +tortoises +torture +tortured +torturer +torturers +tortures +torturing +torus +torus's +toruses +toss +tossed +tosser +tosses +tossing +total +total's +totalities +totality +totality's +totally +totals +totter +tottered +tottering +totteringly +totters +touch +touchable +touched +toucher +touches +touchier +touchiest +touchily +touchiness +touching +touchingly +touchy +tough +toughen +toughened +toughening +toughens +tougher +toughest +toughly +toughness +tour +toured +tourer +touring +tourist +tourist's +tourists +tournament +tournament's +tournaments +tours +tow +toward +towardliness +towardly +towards +towed +towel +towel's +towels +tower +towered +towering +toweringly +towers +towing +town +town's +towner +towns +township +township's +townships +tows +toxicity +toxin +toxin's +toxins +toy +toyed +toyer +toying +toys +trace +traceable +traceableness +traced +traceless +tracelessly +tracer +tracers +traces +tracing +tracings +track +tracked +tracker +trackers +tracking +tracks +tract +tract's +tractability +tractable +tractive +tractor +tractor's +tractors +tracts +trade +traded +trademark +trademark's +trademarks +tradeoff +tradeoffs +trader +traders +trades +tradesman +trading +tradition +tradition's +traditional +traditionally +traditions +traffic +traffic's +trafficked +trafficker +trafficker's +traffickers +trafficking +traffics +tragedies +tragedy +tragedy's +tragic +tragically +trail +trailed +trailer +trailers +trailing +trailings +trails +train +trained +trainee +trainee's +trainees +trainer +trainers +training +trains +trait +trait's +traitor +traitor's +traitors +traits +trajectories +trajectory +trajectory's +tramp +tramped +tramper +tramping +trample +trampled +trampler +tramples +trampling +tramps +trance +trance's +trances +trancing +tranquil +tranquility +tranquillity +tranquilly +tranquilness +transact +transacted +transacting +transaction +transaction's +transactions +transacts +transceiver +transceiver's +transceivers +transcend +transcended +transcendent +transcendently +transcending +transcends +transcontinental +transcribe +transcribed +transcriber +transcribers +transcribes +transcribing +transcript +transcript's +transcription +transcription's +transcriptions +transcripts +transfer +transfer's +transferability +transferable +transferal +transferal's +transferals +transfered +transference +transferral +transferral's +transferrals +transferred +transferrer +transferrer's +transferrers +transferring +transfers +transfinite +transform +transformable +transformation +transformation's +transformational +transformations +transformed +transformer +transformers +transforming +transforms +transgress +transgressed +transgresses +transgressing +transgression +transgression's +transgressions +transgressive +transience +transiency +transient +transiently +transients +transistor +transistor's +transistors +transit +transition +transitional +transitionally +transitioned +transitions +transitive +transitively +transitiveness +transitivity +transitoriness +transitory +translatability +translatable +translate +translated +translates +translating +translation +translational +translations +translative +translator +translator's +translators +translucent +translucently +transmission +transmission's +transmissions +transmit +transmits +transmittal +transmitted +transmitter +transmitter's +transmitters +transmitting +transmogrification +transmogrify +transparencies +transparency +transparency's +transparent +transparently +transparentness +transpire +transpired +transpires +transpiring +transplant +transplanted +transplanter +transplanting +transplants +transport +transportability +transportation +transportations +transported +transporter +transporters +transporting +transports +transpose +transposed +transposes +transposing +transposition +trap +trap's +trapezoid +trapezoid's +trapezoidal +trapezoids +trapped +trapper +trapper's +trappers +trapping +trappings +traps +trash +trashed +trasher +trashes +trashing +traumatic +travail +travails +travel +travels +traversal +traversal's +traversals +traverse +traversed +traverser +traverses +traversing +travesties +travesty +travesty's +tray +tray's +trays +treacheries +treacherous +treacherously +treacherousness +treachery +treachery's +tread +treaded +treader +treading +treads +treason +treasure +treasured +treasurer +treasures +treasuries +treasuring +treasury +treasury's +treat +treated +treater +treaters +treaties +treating +treatise +treatise's +treatises +treatment +treatment's +treatments +treats +treaty +treaty's +treble +trebled +trebles +trebling +tree +tree's +treed +trees +treetop +treetop's +treetops +trek +trek's +treks +tremble +trembled +trembler +trembles +trembling +tremendous +tremendously +tremendousness +tremor +tremor's +tremors +trench +trenched +trencher +trenchers +trenches +trend +trending +trends +trespass +trespassed +trespasser +trespassers +trespasses +tress +tress's +tressed +tresses +trial +trial's +trials +triangle +triangle's +triangles +triangular +triangularly +tribal +tribally +tribe +tribe's +tribes +tribunal +tribunal's +tribunals +tribune +tribune's +tribunes +tributary +tribute +tribute's +tributes +tributing +trichotomy +trick +tricked +tricker +trickier +trickiest +trickiness +tricking +trickle +trickled +trickles +trickling +tricks +tricky +tried +trier +triers +tries +trifle +trifled +trifler +trifles +trifling +trigger +triggered +triggering +triggers +trigonometric +trigonometry +trihedral +trill +trilled +triller +trillion +trillions +trillionth +trim +trimer +trimly +trimmed +trimmer +trimmest +trimming +trimmings +trimness +trims +trinket +trinket's +trinketed +trinketer +trinkets +trip +trip's +triple +tripled +triples +triplet +triplet's +triplets +triplication +tripling +triply +trips +triumph +triumphal +triumphantly +triumphed +triumphing +triumphs +trivia +trivial +trivialities +triviality +trivially +trod +troff +troff's +troffer +troll +troll's +trolley +trolley's +trolleyed +trolleys +trolls +troop +trooped +trooper +troopers +trooping +troops +trophied +trophies +trophy +trophy's +trophying +tropic +tropic's +tropical +tropically +tropics +trot +trots +trouble +troubled +troublemaker +troublemaker's +troublemakers +troubler +troubles +troubleshoot +troubleshooted +troubleshooter +troubleshooters +troubleshooting +troubleshoots +troublesome +troublesomely +troublesomeness +troubling +trough +trouser +trousered +trousers +trout +trouts +trowel +trowel's +trowels +truant +truant's +truants +truce +trucing +truck +trucked +trucker +truckers +trucking +trucks +trudge +trudged +trudger +trudges +trudging +true +trued +trueness +truer +trues +truest +truing +truism +truism's +truisms +truly +trump +trumped +trumpet +trumpeted +trumpeter +trumpeting +trumpets +trumps +truncate +truncated +truncates +truncating +truncation +truncation's +truncations +trunk +trunk's +trunked +trunks +trust +trusted +trustee +trustee's +trusteed +trustees +truster +trustful +trustfully +trustfulness +trustier +trusties +trustiness +trusting +trustingly +trusts +trustworthiness +trustworthy +trusty +truth +truthful +truthfully +truthfulness +truths +try +trying +tryingly +tty +tty's +ttys +tub +tub's +tube +tubed +tuber +tuberculosis +tubers +tubes +tubing +tubs +tuck +tucked +tucker +tuckered +tuckering +tucking +tucks +tuft +tuft's +tufted +tufter +tufts +tug +tugs +tuition +tuitions +tulip +tulip's +tulips +tumble +tumbled +tumbler +tumblers +tumbles +tumbling +tumult +tumult's +tumults +tumultuous +tumultuously +tumultuousness +tunable +tunableness +tune +tuned +tuner +tuners +tunes +tunic +tunic's +tunics +tuning +tuning's +tunings +tunnel +tunnels +tuple +tuple's +tuples +turban +turban's +turbaned +turbans +turbulence +turbulence's +turbulent +turbulently +turf +turkey +turkey's +turkeys +turmoil +turmoil's +turmoils +turn +turnable +turned +turner +turners +turning +turnings +turnip +turnip's +turnips +turnkey +turnkeys +turnover +turnovers +turns +turpentine +turquoise +turret +turret's +turreted +turrets +turtle +turtle's +turtles +turtling +tutor +tutored +tutorial +tutorial's +tutorials +tutoring +tutors +twain +twang +twanging +twas +tweak +tweaked +tweaker +tweaking +tweaks +tweed +tweezer +tweezers +twelfth +twelve +twelves +twenties +twentieth +twenty +twice +twig +twig's +twigs +twilight +twilight's +twilights +twill +twilled +twilling +twin +twin's +twine +twined +twiner +twines +twining +twinkle +twinkled +twinkler +twinkles +twinkling +twins +twirl +twirled +twirler +twirling +twirlingly +twirls +twist +twisted +twister +twisters +twisting +twists +twitch +twitched +twitcher +twitching +twitter +twittered +twitterer +twittering +two +two's +twofold +twos +tying +type +type's +typed +typedef +typedefs +typer +types +typewriter +typewriter's +typewriters +typhoid +typical +typically +typicalness +typification +typified +typifies +typify +typifying +typing +typist +typist's +typists +typographic +typographical +typographically +typography +typos +tyranny +tyrant +tyrant's +tyrants +ubiquitous +ubiquitously +ubiquitousness +ubiquity +ugh +uglier +ugliest +ugliness +ugly +ulcer +ulcer's +ulcered +ulcering +ulcers +ultimate +ultimately +ultimateness +umbrella +umbrella's +umbrellas +umpire +umpire's +umpired +umpires +umpiring +unabashed +unabashedly +unabated +unabatedly +unabbreviated +unable +unabridged +unaccelerated +unacceptability +unacceptable +unacceptably +unaccessible +unaccommodated +unaccompanied +unaccomplished +unaccountably +unaccounted +unaccustomed +unaccustomedly +unachievable +unachieved +unacknowledged +unacquainted +unadaptable +unadjustable +unadjusted +unadopted +unadorned +unadulterated +unadulteratedly +unadvised +unadvisedly +unaffected +unaffectedly +unaffectedness +unaffectionate +unaffectionately +unafraid +unaggregated +unaided +unalienability +unalienable +unaligned +unallocated +unalloyed +unalterable +unalterableness +unalterably +unaltered +unambiguous +unambiguously +unambitious +unanchored +unanimous +unanimously +unannounced +unanswerable +unanswered +unanticipated +unanticipatedly +unapologetically +unappealing +unappealingly +unappreciated +unapproachability +unapproachable +unappropriated +unapt +unaptly +unaptness +unarguable +unarguably +unarmed +unarticulated +unary +unashamed +unashamedly +unasked +unassailable +unassailableness +unassembled +unassigned +unassigns +unassisted +unassuming +unassumingness +unattached +unattainability +unattainable +unattended +unattenuated +unattractive +unattractively +unattractiveness +unattributed +unauthentic +unauthenticated +unavailability +unavailable +unavailing +unavailingly +unavailingness +unavoidable +unavoidably +unaware +unawarely +unawareness +unawares +unbacked +unbalanced +unbalancedness +unbanned +unbanning +unbans +unbarbered +unbarred +unbated +unbearable +unbearably +unbeatable +unbeatably +unbeaten +unbeautifully +unbecoming +unbecomingly +unbecomingness +unbelievable +unbelievably +unbelieving +unbelievingly +unbelted +unbendable +unbetrothed +unbiased +unbiasedness +unbidden +unblemished +unblinded +unblinking +unblinkingly +unblock +unblocked +unblocking +unblocks +unblown +unblushing +unblushingly +unbodied +unbolted +unboned +unbonneted +unborn +unbound +unbounded +unboundedness +unbowed +unbranched +unbreakable +unbreathable +unbred +unbridled +unbroken +unbudging +unbudgingly +unbuffered +unbuilt +unbundled +unburdened +unbureaucratic +unburied +unburned +unbuttered +unbuttoned +unbuttons +uncaged +uncalculating +uncalled +uncandidly +uncanniness +uncanny +uncared +uncaring +uncatchable +uncaught +uncaused +unceasing +unceasingly +uncensored +uncertain +uncertainly +uncertainness +uncertainties +uncertainty +uncertified +unchallenged +unchangeability +unchangeable +unchangeably +unchanged +unchanging +unchangingly +unchangingness +uncharacteristically +uncharged +uncharitable +uncharitableness +uncharted +unchartered +uncheckable +unchecked +unchivalrously +unchosen +uncivil +uncivilly +unclaimed +unclamorous +unclamorously +unclamorousness +unclarity +unclassified +uncle +uncle's +unclean +uncleanliness +uncleanly +uncleanness +unclear +uncleared +unclenched +uncles +unclipped +unclosed +unclothed +unclouded +uncloudedly +unclustered +uncluttered +uncoated +uncoded +uncoiled +uncoined +uncomfortable +uncomfortably +uncomforted +uncommented +uncommitted +uncommon +uncommonly +uncommonness +uncomplaining +uncomplainingly +uncompleted +uncomplimentary +uncomprehending +uncomprehendingly +uncompress +uncompressed +uncompresses +uncompressing +uncompromising +uncompromisingly +uncomputable +unconceivable +unconcerned +unconcernedly +unconcernedness +unconditional +unconditionally +unconditioned +unconfined +unconfirmed +unconformity +unconnected +unconquerable +unconscious +unconsciously +unconsciousness +unconsidered +unconsolidated +unconstitutional +unconstitutionality +unconstitutionally +unconstrained +uncontaminated +uncontested +uncontrollability +uncontrollable +uncontrollably +uncontrolled +unconventional +unconventionally +unconvertible +unconvinced +unconvincing +unconvincingly +unconvincingness +uncool +uncooled +uncooperative +uncoordinated +uncorked +uncorrectable +uncorrected +uncorrelated +uncountable +uncountably +uncounted +uncouth +uncouthly +uncouthness +uncovenanted +uncover +uncovered +uncovering +uncovers +uncreated +uncritically +uncrowned +uncrushable +uncured +uncurled +uncynical +uncynically +undamaged +undamped +undaunted +undauntedly +undebatable +undecidable +undecided +undeclared +undecomposable +undecorated +undefended +undefinability +undefinable +undefined +undefinedness +undeformed +undelete +undeleted +undemocratic +undemocratically +undemonstrative +undemonstratively +undemonstrativeness +undeniable +undeniableness +undeniably +undepicted +under +underbrush +underdone +underestimate +underestimated +underestimates +underestimating +underestimation +underestimations +underflow +underflowed +underflowing +underflows +underfoot +undergo +undergoes +undergoing +undergone +undergrad +undergrad's +undergrads +undergraduate +undergraduate's +undergraduates +underground +undergrounder +underivable +underived +underlie +underlies +underline +underlined +underlines +underling +underling's +underlings +underlining +underlinings +underly +underlying +undermine +undermined +undermines +undermining +underneath +underpayment +underpayment's +underpayments +underpinning +underpinnings +underplay +underplayed +underplaying +underplays +underscore +underscored +underscores +understand +understandability +understandable +understandably +understanding +understandingly +understandings +understands +understated +understood +undertake +undertaken +undertaker +undertaker's +undertakers +undertakes +undertaking +undertakings +undertook +underway +underwear +underwent +underworld +underwrite +underwriter +underwriters +underwrites +underwriting +undescended +undesigned +undesigning +undesirability +undesirable +undesirableness +undesirably +undesired +undetectable +undetected +undetermined +undeveloped +undeviated +undeviating +undeviatingly +undid +undies +undifferentiated +undigested +undignified +undiluted +undiminished +undimmed +undiplomatic +undirected +undisciplined +undisclosed +undiscovered +undiscussed +undisguised +undisguisedly +undismayed +undisputed +undisrupted +undissociated +undistinguished +undistorted +undistributed +undisturbed +undivided +undo +undocumented +undoer +undoes +undoing +undoings +undomesticated +undone +undoubled +undoubted +undoubtedly +undrained +undramatically +undreamed +undress +undressed +undresses +undressing +undried +undrinkable +undue +unduly +undumper +undumper's +undutiful +undutifully +undutifulness +undying +unearned +unearthliness +unearthly +uneasily +uneasiness +uneasy +uneconomical +unedited +unelected +unembellished +unemotional +unemotionally +unemphatic +unemphatically +unemployable +unemployed +unemployment +unencumbered +unending +unendingly +unendurable +unendurableness +unendurably +unenlightening +unenthusiastic +unenthusiastically +unenumerated +unenvied +unequal +unequally +unequivocal +unequivocally +unerring +unerringly +unessential +unethically +unevaluated +uneven +unevenly +unevenness +uneventful +uneventfully +unexamined +unexampled +unexceptionally +unexcused +unexpanded +unexpected +unexpectedly +unexpectedness +unexpended +unexperienced +unexplainable +unexplained +unexploited +unexplored +unexpressed +unextended +unfading +unfadingly +unfair +unfairly +unfairness +unfaith +unfaithful +unfaithfully +unfaithfulness +unfaltering +unfalteringly +unfamiliar +unfamiliarity +unfamiliarly +unfashionable +unfashionably +unfastened +unfathered +unfeathered +unfeigned +unfeignedly +unfenced +unfettered +unfilial +unfilially +unfilled +unfinished +unfired +unfit +unfitly +unfitness +unfitted +unfixed +unflagging +unflaggingly +unflattering +unflatteringly +unfledged +unflinching +unflinchingly +unfocused +unfold +unfolded +unfolding +unfolds +unforeseen +unforgeable +unforgettable +unforgettably +unforgivable +unforgiving +unforgivingness +unformatted +unformed +unforthcoming +unfortunate +unfortunately +unfortunates +unfounded +unfrequented +unfriendliness +unfriendly +unfrosted +unfruitful +unfruitfully +unfruitfulness +unfulfilled +unfunded +unfunnily +unfurnished +ungainliness +ungainly +ungallantly +ungenerously +ungirt +unglazed +unglued +ungot +ungotten +ungoverned +ungraceful +ungracefully +ungracefulness +ungraciously +ungraded +ungrammatical +ungrateful +ungratefully +ungratefulness +ungratified +ungrounded +unguarded +unguardedly +unguardedness +unguessable +unguessed +unguided +unhallow +unhallowed +unhampered +unhandily +unhandsomely +unhappier +unhappiest +unhappily +unhappiness +unhappy +unharmed +unhealthily +unhealthiness +unhealthy +unheard +unheeded +unheeding +unhelm +unhelpfully +unheralded +unhesitating +unhesitatingly +unhinged +unhitched +unhooks +unhoped +unhurriedly +unhysterical +unhysterically +unicorn +unicorn's +unicorns +unidentifiable +unidentified +unidirectional +unidirectionality +unidirectionally +unification +unifications +unified +unifier +unifiers +unifies +uniform +uniformed +uniforming +uniformities +uniformity +uniformly +uniformness +uniforms +unify +unifying +unilluminating +unimaginable +unimaginably +unimaginatively +unimpaired +unimpassioned +unimpeded +unimplemented +unimportance +unimportant +unimpressed +unimproved +unincorporated +unindented +uninfected +uninfluenced +uninformatively +uninformed +uninhabited +uninhibited +uninhibitedly +uninhibitedness +uninitiated +uninjured +uninspired +uninspiring +uninstantiated +uninsulated +unintelligent +unintelligently +unintelligibility +unintelligible +unintelligibleness +unintelligibly +unintended +unintentional +unintentionally +uninteresting +uninterestingly +uninterpretable +uninterpreted +uninterrupted +uninterruptedly +uninterruptedness +uninterviewed +uninvited +union +union's +unions +unique +uniquely +uniqueness +unison +unit +unit's +unite +united +unitedly +uniter +unites +unities +uniting +unitive +units +unity +unity's +univalve +univalve's +univalves +universal +universality +universally +universalness +universals +universe +universe's +universes +universities +university +university's +unjacketed +unjam +unjammed +unjamming +unjoined +unjust +unjustifiable +unjustified +unjustly +unjustness +unkind +unkindliness +unkindly +unkindness +unknit +unknowable +unknowing +unknowingly +unknown +unknowns +unlaced +unlamented +unlashed +unlaundered +unlawful +unlawfully +unlawfulness +unleaded +unleash +unleashed +unleashes +unleashing +unleavened +unless +unlettered +unlicensed +unlicked +unlike +unlikelihood +unlikelihoods +unlikeliness +unlikely +unlikeness +unlimbers +unlimited +unlimitedly +unlined +unlink +unlinked +unlinking +unlinks +unlisted +unload +unloaded +unloader +unloaders +unloading +unloads +unlock +unlocked +unlocking +unlocks +unlogged +unloved +unluckily +unluckiness +unlucky +unmade +unmagnified +unmaintainable +unmaintained +unmaliciously +unmanageable +unmanageably +unmanaged +unmanned +unmannered +unmanneredly +unmannerliness +unmannerly +unmapped +unmaps +unmarked +unmarried +unmarrieds +unmasked +unmatchable +unmatched +unmated +unmates +unmeant +unmeasurable +unmentionable +unmentionables +unmentioned +unmerciful +unmercifully +unmeshed +unmistakable +unmistakably +unmitigated +unmitigatedly +unmitigatedness +unmixed +unmoderated +unmodifiable +unmodified +unmolested +unmotivated +unmount +unmountable +unmounted +unmoved +unmurmuring +unnameable +unnamed +unnatural +unnaturally +unnaturalness +unnecessarily +unnecessary +unneeded +unnegated +unnerve +unnerved +unnerves +unnerving +unnervingly +unnoticed +unnourished +unnumbered +unobservable +unobservables +unobserved +unobtainable +unoccupied +unofficial +unofficially +unopened +unordered +unoriginals +unorthodoxly +unpack +unpackaged +unpackages +unpacked +unpacker +unpacking +unpacks +unpadded +unpaged +unpaid +unpainted +unpaired +unparliamentary +unparsed +unpartitioned +unpatriotic +unpaved +unperceived +unperformed +unperturbed +unperturbedly +unplaced +unplagued +unplanned +unpleasant +unpleasantly +unpleasantness +unpleased +unplowed +unplugged +unplugging +unplugs +unplumbed +unpolled +unpolluted +unpopular +unpopularity +unprecedented +unprecedentedly +unpredictability +unpredictable +unpredictably +unpredicted +unprejudiced +unprescribed +unpreserved +unpretending +unpretentious +unpretentiously +unpretentiousness +unpriced +unprimed +unprincipled +unprincipledness +unprintable +unprinted +unprivileged +unproblematic +unproblematical +unproblematically +unprocessed +unprofitable +unprofitableness +unprofitably +unprojected +unpromising +unpromisingly +unprompted +unpronounceable +unpropagated +unpropertied +unprotected +unprotectedly +unprovability +unprovable +unproved +unproven +unprovided +unpublished +unpunched +unpunished +unqualified +unqualifiedly +unquantifiable +unquenched +unquestionably +unquestioned +unquestioningly +unquoted +unranked +unrated +unravel +unravels +unreachable +unreacted +unread +unreadability +unreadable +unreal +unrealism +unrealistic +unrealistically +unrealized +unrealizes +unreasonable +unreasonableness +unreasonably +unreassuringly +unreconstructed +unrecordable +unrecorded +unrecoverable +unredeemed +unreferenced +unrefined +unreflected +unregister +unregistered +unregistering +unregisters +unregulated +unrehearsed +unreinforced +unrelated +unreleased +unrelenting +unrelentingly +unreliabilities +unreliability +unreliable +unreliably +unremarked +unreported +unrepresentable +unrepresented +unrequested +unrequited +unreserved +unreservedly +unreservedness +unresisted +unresisting +unresolved +unresponsive +unresponsively +unresponsiveness +unrest +unrestrained +unrestrainedly +unrestrainedness +unrestricted +unrestrictedly +unrestrictive +unreturned +unrevealing +unrifled +unrighteous +unrighteously +unrighteousness +unroll +unrolled +unrolling +unrolls +unromantically +unrotated +unruffled +unruled +unruliness +unruly +unsafe +unsafely +unsaid +unsalted +unsanitary +unsatisfactorily +unsatisfactory +unsatisfiability +unsatisfiable +unsatisfied +unsatisfying +unsaturated +unsaved +unscheduled +unschooled +unscientific +unscientifically +unscramble +unscrambled +unscrambler +unscrambles +unscrambling +unscratched +unscreened +unscrews +unscripted +unscrupulous +unscrupulously +unscrupulousness +unsealed +unseals +unseasonable +unseasonableness +unseasonably +unseasoned +unsecured +unseeded +unseeing +unseemly +unseen +unsegmented +unsegregated +unselected +unselfish +unselfishly +unselfishness +unsent +unserved +unserviced +unsettled +unsettledness +unsettling +unsettlingly +unshaded +unshakable +unshaken +unshared +unsharpened +unshaved +unshaven +unsheathing +unshelled +unsheltered +unshielded +unshod +unsigned +unsimplified +unsized +unskilled +unskillful +unskillfully +unskillfulness +unslings +unsloped +unslung +unsmiling +unsmilingly +unsnap +unsnapped +unsnapping +unsnaps +unsociability +unsociable +unsociableness +unsociably +unsocial +unsocially +unsolicited +unsolvable +unsolved +unsophisticated +unsophistication +unsorted +unsought +unsound +unsounded +unsoundly +unsoundness +unsparing +unsparingly +unspeakable +unspecified +unspent +unspoiled +unspoken +unspotted +unsprayed +unsprung +unstable +unstableness +unstably +unstacked +unstacks +unstained +unstapled +unstaring +unstated +unsteadily +unsteadiness +unsteady +unstemmed +unstinting +unstintingly +unstoppable +unstopped +unstrained +unstratified +unstreamed +unstressed +unstriped +unstructured +unstrung +unstuck +unsubscripted +unsubstantially +unsubstantiated +unsubstituted +unsuccessful +unsuccessfully +unsuffixed +unsuitability +unsuitable +unsuitably +unsuited +unsung +unsupportable +unsupported +unsure +unsurpassed +unsurprised +unsurprising +unsurprisingly +unsuspected +unsuspecting +unsuspended +unswerving +unsymmetrically +unsympathetic +untamed +untampered +untaped +untapped +untaught +untented +unterminated +untestable +untested +unthematic +unthinkable +unthinkably +unthinkingly +untidiness +untidy +untie +untied +unties +until +untimeliness +untimely +untitled +unto +untold +untouchable +untouchable's +untouchables +untouched +untoward +untowardly +untowardness +untraceable +untraced +untracked +untrained +untransformed +untranslated +untransposed +untreated +untried +untrod +untroubled +untrue +untruly +untrusted +untrustworthiness +untruth +untruthful +untruthfully +untruthfulness +untutored +untwisted +untying +untyped +unusable +unused +unusual +unusually +unusualness +unuttered +unvalued +unvarnished +unvarying +unveil +unveiled +unveiling +unveils +unventilated +unverified +unvisited +unvoiced +unwaged +unwanted +unwarily +unwarranted +unwashed +unwashedness +unwatched +unwavering +unwaveringly +unwearied +unweariedly +unweighed +unwelcome +unwept +unwholesome +unwholesomely +unwieldiness +unwieldy +unwilled +unwilling +unwillingly +unwillingness +unwind +unwinder +unwinders +unwinding +unwinds +unwinking +unwired +unwise +unwisely +unwiser +unwisest +unwitnessed +unwitting +unwittingly +unwonted +unwontedly +unwontedness +unworldliness +unworldly +unworn +unworthiness +unworthy +unwound +unwounded +unwoven +unwrap +unwrapped +unwrapping +unwraps +unwrinkled +unwritable +unwritten +unyielded +unyielding +unyieldingly +up +upbraid +upbraider +upbringing +upcoming +update +updated +updater +updates +updating +upfield +upgrade +upgraded +upgrades +upgrading +upheld +uphill +uphold +upholder +upholders +upholding +upholds +upholster +upholstered +upholsterer +upholsterers +upholstering +upholsters +upkeep +upland +uplander +uplands +uplift +uplifted +uplifter +uplifting +uplifts +upload +uploaded +uploading +uploads +upon +upper +uppermost +uppers +upright +uprightly +uprightness +uprising +uprising's +uprisings +uproar +uproot +uprooted +uprooter +uprooting +uproots +ups +upset +upsets +upsetting +upshot +upshot's +upshots +upside +upsides +upstairs +upstream +upturn +upturned +upturning +upturns +upward +upwardly +upwardness +upwards +urban +urchin +urchin's +urchins +urge +urged +urgent +urgently +urger +urges +urging +urgings +urinate +urinated +urinates +urinating +urination +urine +urn +urn's +urning +urns +us +usability +usable +usably +usage +usages +use +used +useful +usefully +usefulness +useless +uselessly +uselessness +user +user's +users +uses +usher +ushered +ushering +ushers +using +usual +usually +usualness +usurp +usurped +usurper +utensil +utensil's +utensils +utilities +utility +utility's +utmost +utopian +utopian's +utopians +utter +utterance +utterance's +utterances +uttered +utterer +uttering +utterly +uttermost +utters +uucp +uucp's +vacancies +vacancy +vacancy's +vacant +vacantly +vacantness +vacate +vacated +vacates +vacating +vacation +vacationed +vacationer +vacationers +vacationing +vacations +vacillate +vacillated +vacillates +vacillating +vacillatingly +vacillation +vacillations +vacillator +vacillator's +vacillators +vacuo +vacuous +vacuously +vacuousness +vacuum +vacuumed +vacuuming +vacuums +vagabond +vagabond's +vagabonds +vagaries +vagary +vagary's +vagina +vagina's +vaginas +vagrant +vagrantly +vagrants +vague +vaguely +vagueness +vaguer +vaguest +vainly +vale +vale's +valedictorian +valedictorian's +valence +valence's +valences +valentine +valentine's +valentines +vales +valet +valet's +valets +valiant +valiantly +valiantness +valid +validate +validated +validates +validating +validation +validations +validity +validly +validness +valley +valley's +valleys +valuable +valuableness +valuables +valuably +valuation +valuation's +valuations +valuator +valuators +value +valued +valuer +valuers +values +valuing +valve +valve's +valved +valves +valving +van +van's +vane +vane's +vaned +vanes +vanilla +vanish +vanished +vanisher +vanishes +vanishing +vanishingly +vanities +vanity +vanquish +vanquished +vanquisher +vanquishes +vanquishing +vans +vantage +vantages +variability +variable +variable's +variableness +variables +variably +variance +variance's +variances +variant +variantly +variants +variation +variation's +variations +varied +variedly +varier +varies +varieties +variety +variety's +various +variously +variousness +varnish +varnish's +varnished +varnisher +varnishers +varnishes +varnishing +vary +varying +varyingly +varyings +vase +vase's +vases +vassal +vassals +vast +vaster +vastest +vastly +vastness +vat +vat's +vats +vaudeville +vault +vaulted +vaulter +vaulting +vaults +vaunt +vaunted +vaunter +veal +vealer +vealing +vector +vector's +vectored +vectoring +vectors +veer +veered +veering +veeringly +veers +vegetable +vegetable's +vegetables +vegetarian +vegetarian's +vegetarians +vegetate +vegetated +vegetates +vegetating +vegetation +vegetative +vegetatively +vegetativeness +vehemence +vehement +vehemently +vehicle +vehicle's +vehicles +vehicular +veil +veiled +veiling +veils +vein +veined +veiner +veining +veins +velocities +velocity +velocity's +velvet +vend +vender +vending +vendor +vendor's +vendors +venerable +venerableness +vengeance +venison +venom +venomous +venomously +venomousness +vent +vented +venter +ventilate +ventilated +ventilates +ventilating +ventilation +ventilations +ventilative +venting +ventral +ventrally +ventricle +ventricle's +ventricles +vents +venture +ventured +venturer +venturers +ventures +venturing +venturings +veracity +veranda +veranda's +verandaed +verandas +verb +verb's +verbal +verbally +verbatim +verbose +verbosely +verboseness +verbs +verdict +verdicts +verdure +verdured +verge +verger +verges +verier +veriest +verifiability +verifiable +verifiableness +verification +verifications +verified +verifier +verifier's +verifiers +verifies +verify +verifying +verily +veritable +veritableness +vermin +versa +versatile +versatilely +versatileness +versatility +verse +versed +verser +verses +versing +version +versions +versus +vertebrate +vertebrate's +vertebrates +vertebration +vertex +vertexes +vertical +vertically +verticalness +verticals +vertices +very +vessel +vessel's +vessels +vest +vested +vestige +vestige's +vestiges +vestigial +vestigially +vesting +vests +veteran +veteran's +veterans +veterinarian +veterinarian's +veterinarians +veterinary +veto +vetoed +vetoer +vetoes +vetoing +vetting +vex +vexation +vexed +vexedly +vexes +vexing +vi +vi's +via +viability +viable +viably +vial +vial's +vials +vibrate +vibrated +vibrates +vibrating +vibration +vibrations +vice +vice's +viceroy +vices +vicing +vicinities +vicinity +vicious +viciously +viciousness +vicissitude +vicissitude's +vicissitudes +victim +victim's +victims +victor +victor's +victories +victorious +victoriously +victoriousness +victors +victory +victory's +victual +victuals +video +videos +videotape +videotape's +videotaped +videotapes +videotaping +vie +vied +vier +vies +view +viewable +viewed +viewer +viewers +viewing +viewings +viewpoint +viewpoint's +viewpoints +views +vigilance +vigilant +vigilante +vigilante's +vigilantes +vigilantly +vignette +vignette's +vignetted +vignetter +vignettes +vignetting +vigorous +vigorously +vigorousness +vii +viii +vile +vilely +vileness +viler +vilest +vilification +vilifications +vilified +vilifier +vilifies +vilify +vilifying +villa +villa's +village +village's +villager +villagers +villages +villain +villain's +villainous +villainously +villainousness +villains +villainy +villas +vindictive +vindictively +vindictiveness +vine +vine's +vinegar +vinegars +vines +vineyard +vineyard's +vineyards +vining +vintage +vintager +vintages +violate +violated +violates +violating +violation +violations +violative +violator +violator's +violators +violence +violent +violently +violet +violet's +violets +violin +violin's +violinist +violinist's +violinists +violins +viper +viper's +vipers +viral +virally +virgin +virgin's +virginity +virgins +virtual +virtually +virtue +virtue's +virtues +virtuoso +virtuoso's +virtuosos +virtuous +virtuously +virtuousness +virus +virus's +viruses +vis +visa +visaed +visage +visaged +visaing +visas +viscosities +viscosity +viscount +viscount's +viscounts +viscous +viscously +viscousness +visibilities +visibility +visible +visibleness +visibly +vision +vision's +visionariness +visionary +visioned +visioning +visions +visit +visitation +visitation's +visitations +visited +visiting +visitor +visitor's +visitors +visits +visor +visor's +visored +visors +vista +vista's +vistaed +vistas +visual +visually +visuals +vita +vitae +vital +vitality +vitally +vitals +vitamin +vitamin's +vitamins +vivid +vividly +vividness +vizier +vocabularies +vocabulary +vocal +vocally +vocals +vocation +vocation's +vocational +vocationally +vocations +vogue +voice +voiced +voicer +voicers +voices +voicing +void +voided +voider +voiding +voidness +voids +volatile +volatileness +volatiles +volatilities +volatility +volcanic +volcano +volcano's +volcanos +volley +volleyball +volleyball's +volleyballs +volleyed +volleyer +volleying +volleys +volt +voltage +voltages +volts +volume +volume's +volumed +volumes +voluming +voluntarily +voluntariness +voluntary +volunteer +volunteered +volunteering +volunteers +vomit +vomited +vomiter +vomiting +vomits +vortex +vortexes +vote +voted +voter +voters +votes +voting +votive +votively +votiveness +vouch +voucher +vouchers +vouches +vouching +vow +vowed +vowel +vowel's +vowels +vower +vowing +vows +voyage +voyaged +voyager +voyagers +voyages +voyaging +voyagings +vulgar +vulgarly +vulnerabilities +vulnerability +vulnerable +vulnerableness +vulture +vulture's +vultures +wade +waded +wader +waders +wades +wading +wafer +wafer's +wafered +wafering +wafers +waffle +waffle's +waffled +waffles +waffling +waft +wafter +wag +wage +waged +wager +wagered +wagerer +wagering +wagers +wages +waging +wagon +wagon's +wagons +wags +wail +wailed +wailer +wailing +wails +waist +waist's +waistcoat +waistcoat's +waistcoated +waistcoats +waisted +waister +waists +wait +waited +waiter +waiter's +waiters +waiting +waitress +waitress's +waitresses +waits +waive +waived +waiver +waiverable +waivers +waives +waiving +wake +waked +waken +wakened +wakener +wakening +waker +wakes +waking +walk +walkable +walked +walker +walkers +walking +walks +walkway +walkway's +walkways +wall +wall's +walled +waller +wallet +wallet's +wallets +walling +wallow +wallowed +wallower +wallowing +wallows +walls +walnut +walnut's +walnuts +walrus +walrus's +walruses +waltz +waltzed +waltzer +waltzes +waltzing +wan +wand +wander +wandered +wanderer +wanderers +wandering +wanderings +wanders +wane +waned +wanes +waning +wanly +wanness +want +wanted +wanter +wanting +wanton +wantoner +wantonly +wantonness +wants +war +war's +warble +warbled +warbler +warbles +warbling +ward +warded +warden +wardens +warder +warding +wardrobe +wardrobe's +wardrobes +wards +ware +warehouse +warehoused +warehouser +warehouses +warehousing +wares +warfare +warier +wariest +warily +wariness +waring +warlike +warm +warmed +warmer +warmers +warmest +warming +warmly +warmness +warms +warmth +warn +warned +warner +warning +warningly +warnings +warns +warp +warp's +warped +warper +warping +warps +warrant +warranted +warranter +warranties +warranting +warrants +warranty +warranty's +warred +warring +warrior +warrior's +warriors +wars +warship +warship's +warships +wart +wart's +warted +warts +wary +was +wash +washed +washer +washers +washes +washing +washings +wasn't +wasp +wasp's +wasps +waste +wasted +wasteful +wastefully +wastefulness +waster +wastes +wasting +wastingly +watch +watched +watcher +watchers +watches +watchful +watchfully +watchfulness +watching +watchings +watchman +watchword +watchword's +watchwords +water +watered +waterer +waterfall +waterfall's +waterfalls +wateriness +watering +waterings +waterproof +waterproofed +waterproofer +waterproofing +waterproofness +waterproofs +waters +waterway +waterway's +waterways +watery +wave +waved +waveform +waveform's +waveforms +wavefront +wavefront's +wavefronts +wavelength +wavelengths +waver +wavered +waverer +wavering +waveringly +wavers +waves +waving +wax +waxed +waxen +waxer +waxers +waxes +waxier +waxiness +waxing +waxy +way +way's +ways +wayside +waysides +wayward +waywardly +waywardness +we +we'd +we'll +we're +we've +weak +weaken +weakened +weakener +weakening +weakens +weaker +weakest +weakliness +weakly +weakness +weakness's +weaknesses +wealth +wealthier +wealthiest +wealthiness +wealths +wealthy +wean +weaned +weaner +weaning +weapon +weapon's +weaponed +weapons +wear +wearable +wearer +wearied +wearier +wearies +weariest +wearily +weariness +wearing +wearingly +wearisome +wearisomely +wearisomeness +wears +weary +wearying +weasel +weasel's +weasels +weather +weathercock +weathercock's +weathercocks +weathered +weatherer +weathering +weatherly +weathers +weave +weaver +weavers +weaves +weaving +web +web's +weber +webs +wed +wedded +wedding +wedding's +weddings +wedge +wedged +wedges +wedging +weds +wee +weed +weeded +weeder +weeding +weeds +week +week's +weekday +weekday's +weekdays +weekend +weekend's +weekender +weekends +weeklies +weekly +weeks +weep +weeped +weeper +weepers +weeping +weeps +weigh +weighed +weigher +weighing +weighings +weighs +weight +weighted +weighter +weighting +weightings +weights +weird +weirdly +weirdness +welcome +welcomed +welcomely +welcomeness +welcomer +welcomes +welcoming +weld +welded +welder +welders +welding +weldings +welds +welfare +well +welled +welling +wellness +wells +wench +wench's +wencher +wenches +went +wept +were +weren't +west +wester +westered +westering +westerlies +westerly +western +westerner +westerners +westing +westward +westwards +wet +wetly +wetness +wets +wetted +wetter +wettest +wetting +whack +whacked +whacker +whacking +whacks +whale +whaler +whales +whaling +whammies +whammy +wharf +wharfs +wharves +what +what's +whatchamacallit +whatchamacallit's +whatchamacallits +whatever +whatsoever +wheat +wheaten +wheel +wheeled +wheeler +wheelers +wheeling +wheelings +wheels +whelp +when +whence +whenever +whens +where +where's +whereabouts +whereas +whereby +wherein +whereupon +wherever +whether +whew +whey +which +whichever +while +whiled +whiles +whiling +whilst +whim +whim's +whimper +whimpered +whimpering +whimpers +whims +whimsical +whimsically +whimsicalness +whimsied +whimsies +whimsy +whimsy's +whine +whined +whiner +whines +whining +whiningly +whip +whip's +whipped +whipper +whipper's +whippers +whipping +whipping's +whippings +whips +whirl +whirled +whirler +whirling +whirlpool +whirlpool's +whirlpools +whirls +whirlwind +whirr +whirring +whisk +whisked +whisker +whiskered +whiskers +whiskey +whiskey's +whiskeys +whisking +whisks +whisper +whispered +whisperer +whispering +whisperingly +whisperings +whispers +whistle +whistled +whistler +whistlers +whistles +whistling +whit +white +whited +whitely +whiten +whitened +whitener +whiteners +whiteness +whitening +whitens +whiter +whites +whitespace +whitest +whitewash +whitewashed +whitewasher +whitewashing +whiting +whittle +whittled +whittler +whittles +whittling +whittlings +whiz +whizzed +whizzes +whizzing +who +who's +whoever +whole +wholehearted +wholeheartedly +wholeness +wholes +wholesale +wholesaled +wholesaler +wholesalers +wholesales +wholesaling +wholesome +wholesomely +wholesomeness +wholly +whom +whomever +whoop +whooped +whooper +whooping +whoops +whore +whore's +whores +whoring +whorl +whorl's +whorled +whorls +whose +why +wick +wicked +wickedly +wickedness +wicker +wicking +wicks +wide +widely +widen +widened +widener +wideness +widening +widens +wider +widespread +widest +widget +widget's +widgets +widow +widowed +widower +widowers +widows +width +widths +wield +wielded +wielder +wielding +wields +wife +wife's +wifeliness +wifely +wig +wig's +wigs +wigwam +wild +wildcat +wildcat's +wildcats +wilder +wilderness +wildest +wilding +wildly +wildness +wile +wiled +wiles +wilier +wiliness +wiling +will +willed +willer +willful +willfully +willfulness +willing +willingly +willingness +willings +willow +willow's +willower +willows +wills +wilt +wilted +wilting +wilts +wily +win +wince +winced +winces +wincing +wind +winded +winder +winders +windier +windiness +winding +windmill +windmill's +windmilling +windmills +window +window's +windowed +windowing +windows +winds +windy +wine +wined +winer +winers +wines +wing +winged +winger +wingers +winging +wings +wining +wink +winked +winker +winking +winks +winner +winner's +winners +winning +winningly +winnings +wins +winter +wintered +winterer +wintering +winterly +winters +wintrier +wintriness +wintry +wipe +wiped +wiper +wipers +wipes +wiping +wire +wired +wireless +wirer +wires +wiretap +wiretap's +wiretaps +wirier +wiriness +wiring +wirings +wiry +wisdom +wisdoms +wise +wised +wisely +wiseness +wiser +wises +wisest +wish +wished +wisher +wishers +wishes +wishful +wishfully +wishfulness +wishing +wising +wisp +wisp's +wisps +wistful +wistfully +wistfulness +wit +wit's +witch +witchcraft +witches +witching +with +withal +withdraw +withdrawal +withdrawal's +withdrawals +withdrawer +withdrawing +withdrawn +withdrawnness +withdraws +withdrew +wither +withered +withering +witheringly +withers +withheld +withhold +withholder +withholders +withholding +withholdings +withholds +within +without +withstand +withstanding +withstands +withstood +witness +witnessed +witnesses +witnessing +wits +wittier +wittiest +wittiness +witty +wives +wizard +wizard's +wizardly +wizards +woe +woeful +woefully +woeness +woke +woken +wolf +wolfer +wolves +woman +woman's +womanhood +womanliness +womanly +womb +womb's +wombed +wombs +women +women's +womens +won't +wonder +wondered +wonderer +wonderful +wonderfully +wonderfulness +wondering +wonderingly +wonderland +wonderland's +wonderment +wonders +wondrous +wondrously +wondrousness +wont +wonted +wontedly +wontedness +wonting +woo +wood +wood's +woodchuck +woodchuck's +woodchucks +woodcock +woodcock's +woodcocks +wooded +wooden +woodenly +woodenness +woodier +woodiness +wooding +woodland +woodlander +woodman +woodpecker +woodpecker's +woodpeckers +woods +woodser +woodwork +woodworker +woodworking +woody +wooed +wooer +woof +woofed +woofer +woofers +woofing +woofs +wooing +wool +wooled +woolen +woolens +woollier +woollies +woolliness +woolly +wools +wooly +woos +word +word's +worded +wordier +wordily +wordiness +wording +wordings +words +wordy +wore +work +workable +workableness +workably +workaround +workaround's +workarounds +workbench +workbench's +workbenches +workbook +workbook's +workbooks +worked +worker +worker's +workers +workhorse +workhorse's +workhorses +working +workingman +workings +workload +workloads +workman +workmanly +workmanship +workmen +workmen's +works +workshop +workshop's +workshops +workspace +workspaces +workstation +workstation's +workstations +world +world's +worlders +worldliness +worldly +worlds +worldwide +worm +wormed +wormer +worming +worms +worn +worried +worriedly +worrier +worriers +worries +worrisome +worrisomely +worrisomeness +worry +worrying +worryingly +worse +worser +worship +worshipful +worshipfully +worshipfulness +worships +worst +worsted +worth +worthier +worthies +worthiest +worthiness +worthing +worthless +worthlessly +worthlessness +worths +worthwhile +worthwhileness +worthy +would +wouldest +wouldn't +wound +wounded +wounding +wounds +wove +woven +wrangle +wrangled +wrangler +wranglers +wrangles +wrangling +wrap +wrap's +wrapped +wrapper +wrapper's +wrappers +wrapping +wrappings +wraps +wrath +wreak +wreaks +wreath +wreathed +wreathes +wreathing +wreck +wreckage +wrecked +wrecker +wreckers +wrecking +wrecks +wren +wren's +wrench +wrenched +wrenches +wrenching +wrenchingly +wrens +wrest +wrested +wrester +wresting +wrestle +wrestled +wrestler +wrestles +wrestling +wrestlings +wrests +wretch +wretched +wretchedly +wretchedness +wretches +wriggle +wriggled +wriggler +wriggles +wriggling +wring +wringer +wringing +wrings +wrinkle +wrinkled +wrinkles +wrinkling +wrist +wrist's +wrists +wristwatch +wristwatch's +wristwatches +writ +writ's +writable +write +writer +writer's +writers +writes +writhe +writhed +writhes +writhing +writing +writings +writs +written +wrong +wronged +wronger +wrongest +wronging +wrongly +wrongness +wrongs +wrote +wrought +wrung +xi +xii +xiii +xiv +xix +xv +xvi +xvii +xviii +xx +yacc +yacc's +yank +yanked +yanking +yanks +yard +yard's +yarded +yarding +yards +yardstick +yardstick's +yardsticks +yarn +yarn's +yarned +yarning +yarns +yawn +yawner +yawning +yawningly +yawns +yea +yeah +year +year's +yearly +yearn +yearned +yearner +yearning +yearningly +yearnings +yearns +years +yeas +yeast +yeast's +yeasts +yecch +yell +yelled +yeller +yelling +yellow +yellowed +yellower +yellowest +yellowing +yellowish +yellowness +yellows +yells +yelp +yelped +yelper +yelping +yelps +yeoman +yeomanly +yeomen +yes +yeses +yesterday +yesterday's +yesterdays +yet +yield +yielded +yielder +yielding +yields +yoke +yoke's +yokes +yoking +yon +yonder +you +you'd +you'll +you're +you've +young +younger +youngest +youngly +youngness +youngster +youngster's +youngsters +your +your's +yours +yourself +yourselves +youth +youth's +youthes +youthful +youthfully +youthfulness +yuck +yummier +yummy +yuppie +yuppie's +yuppies +zap +zapped +zapping +zaps +zeal +zealous +zealously +zealousness +zebra +zebra's +zebras +zenith +zero +zeroed +zeroes +zeroing +zeros +zeroth +zest +zigzag +zinc +zinc's +zodiac +zodiacs +zonal +zonally +zone +zoned +zonely +zoner +zones +zoning +zoo +zoo's +zoological +zoologically +zoom +zoomed +zooming +zooms +zoos +acclimatisation +acclimatisations +acclimatised +accoutrement +accoutrement's +accoutrements +acknowledgement +acknowledgement's +acknowledgements +actualisation +actualisation's +actualisations +aerofoil +aerofoils +aeroplane +aeroplane's +aeroplanes +aerosolise +aerosolised +aesthetic +aesthetic's +aesthetically +aesthetics +agonise +agonised +agonisedly +agoniser +agonisers +agonises +agonising +agonisinglies +agonisingly +alphabetise +alphabetised +alphabetiser +alphabetisers +alphabetises +alphabetising +aluminium +aluminium's +aluminiums +amenorrhoea +amorist +amorist's +amorists +amortise +amortised +amortises +amortising +amphitheatre +amphitheatre's +amphitheatres +anaemia +anaemia's +anaemias +anaemic +anaemics +anaesthesia +anaesthesia's +anaesthesias +anaesthetic +anaesthetic's +anaesthetically +anaesthetics +anaesthetise +anaesthetised +anaesthetiser +anaesthetisers +anaesthetises +anaesthetising +analogue +analogue's +analogues +analysable +analyse +analysed +analyser +analysers +analyses +analysing +anodise +anodised +anodises +anodising +antagonise +antagonised +antagoniser +antagonisers +antagonises +antagonising +apologise +apologised +apologiser +apologisers +apologises +apologising +appal +appals +apparelled +appetiser +appetising +appetisingly +arbour +arbour's +arboured +arbours +archaise +archaised +archaiser +archaisers +archaises +archaising +ardour +ardour's +ardours +arithmetise +arithmetised +arithmetises +armour +armour's +armoured +armourer +armourer's +armourers +armouried +armouries +armouring +armours +armoury +armoury's +atomisation +atomisation's +atomisations +atomise +atomised +atomiser +atomisers +atomises +atomising +authorisation +authorisation's +authorisations +authorise +authorised +authoriser +authorisers +authorises +authorising +autodialler +axiomatisation +axiomatisation's +axiomatisations +axiomatise +axiomatised +axiomatises +axiomatising +balkanise +balkanised +balkanising +baptise +baptised +baptiser +baptisers +baptises +baptising +barrelled +barrelling +bastardise +bastardised +bastardises +bastardising +bedevilled +bedevilling +behaviour +behaviour's +behavioural +behaviourally +behavioured +behaviourism +behaviourism's +behaviourisms +behaviouristic +behaviouristics +behaviours +behove +behoved +behoves +behoving +behoving's +behovingly +behovings +belabour +belabour's +belaboured +belabouring +belabours +bevelled +bevelling +bevellings +bowdlerise +bowdlerised +bowdleriser +bowdlerises +bowdlerising +brutalise +brutalised +brutalises +brutalising +bushelled +bushelling +bushellings +calibre +calibres +canalled +canalling +cancelled +canceller +cancelling +candour +candour's +candours +cannibalise +cannibalised +cannibalises +cannibalising +canonicalisation +canonicalise +canonicalised +canonicalises +canonicalising +capitalisation +capitalisation's +capitalisations +capitalise +capitalised +capitaliser +capitalisers +capitalises +capitalising +carbonisation +carbonisation's +carbonisations +carbonise +carbonised +carboniser +carbonisers +carbonises +carbonising +catalogue +catalogue's +catalogued +cataloguer +catalogues +cataloguing +categorisation +categorisation's +categorisations +categorise +categorised +categoriser +categorisers +categorises +categorising +centimetre +centimetre's +centimetres +centralisation +centralisation's +centralisations +centralise +centralised +centraliser +centralisers +centralises +centralising +centre +centre's +centred +centrepiece +centrepiece's +centrepieces +centres +centring +channelled +channeller +channeller's +channellers +channelling +characterisable +characterisables +characterisation +characterisation's +characterisations +characterise +characterised +characteriser +characterisers +characterises +characterising +cheque +cheque's +chequebook +chequebook's +chequebooks +chequer +chequered +chequers +cheques +chiselled +chiseller +chisellers +civilisation +civilisation's +civilisations +civilise +civilised +civilisedness +civiliser +civilisers +civilises +civilising +clamour +clamoured +clamourer +clamourer's +clamourers +clamouring +clamours +cognisance +cognisant +colonisation +colonisation's +colonisations +colonise +colonised +coloniser +colonisers +colonises +colonising +colour +colour's +coloured +coloureds +colourer +colourer's +colourers +colourful +colourfully +colourfulness +colouring +colourings +colourless +colourlessly +colourlessness +colours +columnise +columnised +columnises +columnising +compartmentalise +compartmentalised +compartmentalises +compartmentalising +computerise +computerised +computerises +computerising +conceptualisation +conceptualisation's +conceptualisations +conceptualise +conceptualised +conceptualiser +conceptualises +conceptualising +counselled +counselling +counsellor +counsellor's +counsellors +criticise +criticised +criticiser +criticisers +criticises +criticising +criticisinglies +criticisingly +crystallise +crystallised +crystalliser +crystallisers +crystallises +crystallising +customisable +customisation +customisation's +customisations +customise +customised +customiser +customisers +customises +customising +decentralisation +decentralisation's +decentralisations +decentralised +defence +defence's +defenced +defenceless +defencelessly +defencelessness +defences +defencing +defencive +demeanour +demeanour's +demeanours +demoralise +demoralised +demoraliser +demoralisers +demoralises +demoralising +demoralisingly +dialled +dialler +diallers +dialling +diallings +dichotomise +dichotomised +dichotomises +dichotomising +digitise +digitised +digitiser +digitiser's +digitisers +digitises +digitising +dishonour +dishonoured +dishonourer +dishonourer's +dishonourers +dishonouring +dishonours +disorganised +draught +draught's +draughts +draughtsman +duelled +dueller +duellers +duelling +duellings +economise +economised +economiser +economisers +economises +economising +editorialise +editorialised +editorialiser +editorialises +editorialising +enamelled +enameller +enamellers +enamelling +enamellings +encyclopaedia +encyclopaedia's +encyclopaedias +endeavour +endeavoured +endeavourer +endeavourer's +endeavourers +endeavouring +endeavours +enrol +enrolment +enrolment's +enrolments +enrols +epitomise +epitomised +epitomiser +epitomisers +epitomises +epitomising +equalisation +equalisation's +equalisations +equalise +equalised +equaliser +equaliser's +equalisers +equalises +equalising +equalisings +equalled +equalling +eviller +evillest +factorisation +factorisation's +factorisations +familiarisation +familiarisation's +familiarisations +familiarise +familiarised +familiariser +familiarisers +familiarises +familiarising +familiarisingly +fantasise +fantasised +fantasiser +fantasises +fantasising +favour +favourable +favourableness +favourables +favourably +favoured +favoured's +favouredly +favouredness +favoureds +favourer +favourer's +favourers +favouring +favouring's +favouringly +favourings +favourite +favourite's +favourites +favours +fertilisation +fertilisation's +fertilisations +fertilise +fertilised +fertiliser +fertilisers +fertilises +fertilising +fervour +fervour's +fervours +fibre +fibre's +fibred +fibreglass +fibres +finalisation +finalisations +finalise +finalised +finalises +finalising +flavour +flavour's +flavoured +flavourer +flavourer's +flavourers +flavouring +flavourings +flavours +formalisation +formalisation's +formalisations +formalise +formalised +formaliser +formalisers +formalises +formalising +fuelled +fueller +fuellers +fuelling +fulfil +fulfilment +fulfilment's +fulfilments +fulfils +funnelled +funnelling +gaol +generalisation +generalisation's +generalisations +generalise +generalised +generaliser +generalisers +generalises +generalising +glamorise +glamorised +glamoriser +glamorisers +glamorises +glamorising +gospeller +gospellers +gossipped +gossipping +gramme +gramme's +grammes +gravelled +gravelling +grovelled +groveller +grovellers +grovelling +grovellingly +harbour +harbour's +harboured +harbourer +harbourer's +harbourers +harbouring +harbours +harmonise +harmonised +harmoniser +harmonisers +harmonises +harmonising +honour +honourable +honourableness +honourables +honourablies +honourably +honoured +honourer +honourer's +honourers +honouring +honours +hospitalise +hospitalised +hospitalises +hospitalising +humour +humour's +humoured +humourer +humourers +humouring +humours +hypothesise +hypothesised +hypothesiser +hypothesisers +hypothesises +hypothesising +idealisation +idealisation's +idealisations +idealise +idealised +idealiser +idealisers +idealises +idealising +imperilled +incognisance +incognisant +individualise +individualised +individualiser +individualisers +individualises +individualising +individualisingly +industrialisation +industrialisation's +industrialisations +informalises +initialisation +initialisation's +initialisations +initialise +initialised +initialiser +initialisers +initialises +initialising +initialled +initialler +initialling +institutionalise +institutionalised +institutionalises +institutionalising +internalisation +internalisation's +internalisations +internalise +internalised +internalises +internalising +italicise +italicised +italicises +italicising +itemisation +itemisation's +itemisations +itemise +itemised +itemiser +itemisers +itemises +itemising +jeopardise +jeopardised +jeopardises +jeopardising +jewelled +jeweller +jewellers +jewelling +journalise +journalised +journaliser +journalisers +journalises +journalising +judgement +judgement's +judgements +kidnapped +kidnapper +kidnapper's +kidnappers +kidnapping +kidnapping's +kidnappings +kilogramme +kilogramme's +kilogrammes +kilometre +kilometre's +kilometres +labelled +labeller +labeller's +labellers +labelling +labour +laboured +laboured's +labouredly +labouredness +labourer +labourer's +labourers +labouring +labouring's +labouringly +labourings +labours +laurelled +legalisation +legalisation's +legalisations +legalise +legalised +legalises +legalising +levelled +leveller +levellers +levellest +levelling +liberalise +liberalised +liberaliser +liberalisers +liberalises +liberalising +licence +licence's +licences +linearisable +linearise +linearised +linearises +linearising +linearision +litre +litres +localisation +localisation's +localisations +localise +localised +localiser +localisers +localises +localising +lustre +lustred +lustres +lustring +magnetisation +magnetisation's +magnetisations +manoeuvre +manoeuvred +manoeuvrer +manoeuvres +manoeuvring +marvelled +marvelling +marvellous +marvellously +marvellousness +materialise +materialised +materialiser +materialisers +materialises +materialising +maximise +maximised +maximiser +maximisers +maximises +maximising +mechanisation +mechanisation's +mechanisations +mechanise +mechanised +mechaniser +mechanisers +mechanises +mechanising +medalled +medalling +mediaeval +mediaeval's +mediaevally +mediaevals +memorisation +memorisation's +memorisations +memorise +memorised +memoriser +memorisers +memorises +memorising +metalled +metalling +metallisation +metallisation's +metallisations +metre +metre's +metred +metres +metring +millimetre +millimetre's +millimetres +miniaturisation +miniaturisations +miniaturise +miniaturised +miniaturises +miniaturising +minimisation +minimisation's +minimisations +minimise +minimised +minimiser +minimisers +minimises +minimising +misjudgement +mitre +mitred +mitrer +mitring +modelled +modeller +modellers +modelling +modellings +modernise +modernised +moderniser +modernisers +modernises +modernising +modularisation +modularise +modularised +modularises +modularising +motorise +motorised +motorises +motorising +moustache +moustached +moustaches +multilevelled +nationalisation +nationalisation's +nationalisations +nationalise +nationalised +nationaliser +nationalisers +nationalises +nationalising +naturalisation +naturalisation's +naturalisations +neighbour +neighbour's +neighboured +neighbourer +neighbourer's +neighbourers +neighbourhood +neighbourhood's +neighbourhoods +neighbouring +neighbourings +neighbourliness +neighbourly +neighbours +neutralise +neutralised +neutraliser +neutralisers +neutralises +neutralising +nickelled +nickelling +normalisation +normalisation's +normalisations +normalise +normalised +normaliser +normalisers +normalises +normalising +notarise +notarised +notarises +notarising +nought +noughts +odour +odour's +odoured +odours +offence +offence's +offences +offencive +optimisation +optimisation's +optimisations +optimise +optimised +optimiser +optimiser's +optimisers +optimises +optimising +organisable +organisables +organisation +organisation's +organisational +organisational's +organisationally +organisationals +organisations +organise +organised +organiser +organisers +organises +organising +oxidise +oxidised +oxidiser +oxidisers +oxidises +oxidising +oxidisings +panelled +panelling +panellings +parallelisation +parallelisation's +parallelisations +parallelise +parallelised +paralleliser +parallelisers +parallelises +parallelising +parallelled +parallelling +paralyse +paralysed +paralysedlies +paralysedly +paralyser +paralyser's +paralysers +paralyses +paralysing +paralysinglies +paralysingly +parameterisable +parameterisation +parameterisation's +parameterisations +parameterise +parameterised +parameterises +parameterising +parametrisable +parametrisation +parametrisation's +parametrisations +parametrise +parametrised +parametrises +parametrising +parcelled +parcelling +parenthesised +parlour +parlour's +parlours +patronise +patronised +patroniser +patronisers +patronises +patronising +patronising's +patronisingly +patronisings +penalise +penalised +penalises +penalising +pencilled +pencilling +pencillings +personalisation +personalisation's +personalisations +personalise +personalised +personalises +personalising +petalled +philosophise +philosophised +philosophiser +philosophisers +philosophises +philosophising +plough +ploughed +plougher +ploughes +ploughing +ploughman +pluralisation +pluralisation's +pluralisations +pluralise +pluralised +pluraliser +pluralisers +pluralises +pluralising +polarisation +polarisation's +polarisations +popularisation +popularisation's +popularisations +popularise +popularised +populariser +popularisers +popularises +popularising +practician +practise +practised +practiser +practises +practising +preinitialise +preinitialised +preinitialises +preinitialising +pressurise +pressurised +pressuriser +pressurisers +pressurises +pressurising +pretence +pretences +pretencion +pretencions +pretencive +prioritise +prioritised +prioritiser +prioritisers +prioritises +prioritising +prioritisings +productise +productised +productiser +productisers +productises +productising +programme +programme's +programmes +proselytise +proselytised +proselytiser +proselytisers +proselytises +proselytising +publicise +publicised +publicises +publicising +pulverise +pulverised +pulveriser +pulverisers +pulverises +pulverising +pyjama +pyjama's +pyjamaed +pyjamas +quantisation +quantisation's +quantisations +quantise +quantised +quantiser +quantiser's +quantisers +quantises +quantising +quarrelled +quarreller +quarrellers +quarrelling +queueing +randomise +randomised +randomiser +randomises +randomising +rationalise +rationalised +rationaliser +rationalisers +rationalises +rationalising +reacclimatisation +reacclimatisation's +reacclimatisations +reacknowledgement +reacknowledgement's +reacknowledgements +reactualisation +reactualisation's +reactualisations +realisable +realisableness +realisables +realisablies +realisably +realisation +realisation's +realisations +realise +realised +realiser +realisers +realises +realising +realising's +realisingly +realisings +reanalyse +reanalysed +reanalyser +reanalysers +reanalyses +reanalysing +reapologises +reauthorisation +reauthorisation's +reauthorisations +reauthorises +rebrutalises +recapitalisation +recapitalisation's +recapitalisations +recapitalised +recapitalises +recarbonisation +recarbonisation's +recarbonisations +recarboniser +recarbonisers +recarbonises +recategorised +recentralisation +recentralisation's +recentralisations +recentralises +recivilisation +recivilisation's +recivilisations +recivilises +recognisability +recognisable +recognisably +recognisance +recognise +recognised +recognisedlies +recognisedly +recogniser +recognisers +recognises +recognising +recognisinglies +recognisingly +recolonisation +recolonisation's +recolonisations +recolonises +recoloured +recolours +reconceptualising +recriticises +recrystallised +recrystallises +redialled +refavours +refertilisation +refertilisation's +refertilisations +refertilises +refuelled +refuelling +reharmonises +rehonours +reinitialise +reinitialised +reinitialises +reinitialising +reitemises +relabelled +relabeller +relabellers +relabelling +remagnetisation +remagnetisation's +remagnetisations +rematerialises +rememorises +remodelled +remodelling +renationalised +renationalises +renormalised +renormalises +reorganisation +reorganisation's +reorganisations +reorganise +reorganised +reorganiser +reorganisers +reorganises +reorganising +reoxidises +repatronises +reprogramme +reprogrammes +repulverises +resepulchres +restandardisation +restandardisation's +restandardisations +restandardises +resterilises +resymbolisation +resymbolisation's +resymbolisations +resymbolises +resynchronisations +resynchronised +resynchronises +resynthesises +retranquilises +reutilisation +reutilises +revelled +reveller +revellers +revelling +revellings +revisualises +revolutionise +revolutionised +revolutioniser +revolutionisers +revolutionises +revolutionising +rigour +rigour's +rigours +rivalled +rivalling +rouble +rouble's +roubles +routeing +rumour +rumour's +rumoured +rumourer +rumourer's +rumourers +rumouring +rumours +sabre +sabre's +sabred +sabres +sabring +sanitise +sanitised +sanitiser +sanitises +sanitising +saviour +saviour's +saviours +savour +savoured +savourer +savourer's +savourers +savourier +savouries +savouriest +savouriness +savouring +savouringlies +savouringly +savours +savoury +savoury's +sceptre +sceptre's +sceptred +sceptres +sceptring +scrutinise +scrutinised +scrutiniser +scrutinisers +scrutinises +scrutinising +scrutinisinglies +scrutinisingly +sepulchre +sepulchre's +sepulchred +sepulchres +sequentialise +sequentialised +sequentialises +sequentialising +serialisation +serialisation's +serialisations +serialise +serialised +serialises +serialising +shovelled +shoveller +shovellers +shovelling +shrivelled +shrivelling +signalled +signaller +signallers +signalling +socialise +socialised +socialiser +socialises +socialising +specialisation +specialisation's +specialisations +specialise +specialised +specialiser +specialisers +specialises +specialising +specialities +speciality +speciality's +spectre +spectre's +spectred +spectres +spiralled +spiralling +splendour +splendour's +splendours +squirrelled +squirrelling +stabilise +stabilised +stabiliser +stabilisers +stabilises +stabilising +standardisation +standardisation's +standardisations +standardise +standardised +standardiser +standardisers +standardises +standardising +stencilled +stenciller +stencillers +stencilling +sterilisation +sterilisation's +sterilisations +sterilise +sterilised +steriliser +sterilisers +sterilises +sterilising +stylised +subsidise +subsidised +subsidiser +subsidisers +subsidises +subsidising +succour +succoured +succourer +succourer's +succourers +succouring +succours +summarisation +summarisation's +summarisations +summarise +summarised +summariser +summarisers +summarises +summarising +symbolisation +symbolisation's +symbolisations +symbolise +symbolised +symboliser +symbolisers +symbolises +symbolising +symbolled +symbolling +sympathise +sympathised +sympathiser +sympathisers +sympathises +sympathising +sympathising's +sympathisingly +sympathisings +synchronisation +synchronisation's +synchronisations +synchronise +synchronised +synchroniser +synchronisers +synchronises +synchronising +synthesise +synthesised +synthesiser +synthesisers +synthesises +synthesising +syphon +syphon's +syphoned +syphoning +syphons +systematise +systematised +systematiser +systematisers +systematises +systematising +tantalise +tantalised +tantaliser +tantalisers +tantalises +tantalising +tantalisinglies +tantalisingly +tantalisingness +tantalisingnesses +terrorise +terrorised +terroriser +terrorisers +terrorises +terrorising +theatre +theatre's +theatres +theorisation +theorisation's +theorisations +theorise +theorised +theoriser +theorisers +theorises +theorising +titre +titres +totalled +totaller +totaller's +totallers +totalling +towelled +towelling +towellings +tranquilise +tranquilised +tranquiliser +tranquiliser's +tranquilisers +tranquilises +tranquilising +tranquilising's +tranquilisingly +tranquilisings +transistorise +transistorised +transistorises +transistorising +travelled +traveller +traveller's +travellers +travelling +travellings +trivialise +trivialised +trivialises +trivialising +troweller +trowellers +tumour +tumour's +tumoured +tumours +tunnelled +tunneller +tunnellers +tunnelling +tunnellings +tyre +tyre's +tyres +unacclimatised +unaesthetically +unamortised +unanalysable +unanalysed +unantagonised +unantagonising +unapologising +unappetising +unappetisingly +unarmoured +unauthorised +unauthorisedly +unauthorisedness +unauthorises +unbaptised +unbaptises +unbastardised +unbrutalised +unbrutalises +uncancelled +uncapitalised +uncategorised +uncharacterised +uncivilised +uncivilisedly +uncivilisedness +uncivilises +uncolonised +uncolonises +uncoloured +uncolouredly +uncolouredness +uncoloureds +uncriticised +uncriticising +uncriticisingly +uncrystallised +undefences +undishonoured +undisorganised +uneconomising +unendeavoured +unepitomised +unequalised +unequalises +unequalled +unfamiliarised +unfavourable +unfavourableness +unfavourables +unfavourably +unfavoured +unfavoured's +unfavourings +unfavourite +unfavourite's +unfavourites +unfertilised +unflavoured +unformalised +ungeneralised +unharmonised +unharmonises +unhonourables +unhonourablies +unhonourably +unhonoured +unhumoured +unidealised +unindividualised +unindividualises +uninitialised +unionisation +unionise +unionised +unioniser +unionisers +unionises +unionising +unitalicised +unitemised +unjournalised +unlabelled +unlaboured +unlaboured's +unlabourings +unlegalised +unlevelled +unlevelling +unliberalised +unlocalised +unlocalises +unmechanised +unmechanises +unmemorised +unminimised +unmodernised +unmodernises +unmotorised +unnationalised +unneighboured +unneighbourliness +unneighbourly +unneutralised +unnormalised +unnormalises +unoptimised +unoptimises +unorganisable +unorganisables +unorganised +unoxidised +unparallelled +unparameterised +unparametrised +unparcelled +unpatronised +unpatronising's +unpenalised +unphilosophised +unphilosophises +unpopularises +unpractised +unpulverised +unpulverises +unravelled +unravelling +unrealisables +unrealised +unrealises +unrecognisable +unrecognised +unrecognising +unrecognisingly +unreorganised +unrivalled +unrumoured +unsabred +unsavoured +unsavouredly +unsavouredness +unsceptred +unsceptres +unscrutinised +unscrutinising +unscrutinisingly +unsepulchred +unsepulchres +unsocialised +unspecialised +unspecialising +unstandardised +unsterilised +unsubsidised +unsuccoured +unsummarised +unsymbolised +unsympathised +unsympathising +unsympathising's +unsympathisingly +unsympathisings +unsynchronised +unsynthesised +unsyphons +unsystematised +unsystematisedly +unsystematising +untantalised +unterrorised +untranquilised +unverbalised +unvictimised +unvisualised +unwomanised +unwomanises +utilisation +utilise +utilised +utiliser +utilisers +utilises +utilising +valour +valour's +valours +vandalise +vandalised +vandalises +vandalising +vapour +vapour's +vapoured +vapourer +vapourers +vapouring +vapouringly +vapourings +vapours +vectorisation +vectorising +verbalise +verbalised +verbaliser +verbalisers +verbalises +verbalising +victimise +victimised +victimiser +victimisers +victimises +victimising +victualler +victuallers +vigour +vigour's +vigours +visualise +visualised +visualiser +visualisers +visualises +visualising +waggon +waggon's +waggoner +waggoner's +waggoners +waggons +wagonner +wagonner's +wagonners +weaselled +weaselling +whisky +whisky's +whiskys +womanise +womanised +womaniser +womanisers +womanises +womanising +woollen +woollens +worshipped +worshipper +worshipper's +worshippers +worshipping +Christianising +Europeanisation +Europeanisation's +Europeanisations +Europeanised +Sanskritise +acclimatise +acclimatiser +acclimatisers +acclimatises +acclimatising +actualise +actualised +actualises +actualising +aesthete +aesthetes +aggrandisement +aggrandisement's +aggrandisements +americanised +amortisation +amortisation's +amortisations +animised +annualised +arsehole +arsehole's +arseholes +balkanisation +biosynthesised +bureaucratisation +bureaucratisation's +bureaucratisations +calliper +callipers +cancellate +cancellated +canonised +cauterise +cauterised +cauterises +cauterising +caviller +cavillers +centreline +centrelines +civilisational +civilisational's +civilisationals +cognisable +colouration +colourimeter +colourimeter's +colourimeters +colourimetry +commercialisation +commercialisation's +commercialisations +communise +communised +communises +communising +computerisation +conventionalised +crystallisation +crystallisation's +crystallisations +decentralising +deemphasise +deemphasised +deemphasiser +deemphasisers +deemphasises +deemphasising +deglycerolised +dehumanise +dehumanised +dehumanises +dehumanising +demineralisation +demineralisation's +demineralisations +democratisation +democratisation's +democratisations +democratise +democratised +democratiser +democratises +democratising +demoralisation +demoralisation's +demoralisations +demythologisation +demythologise +demythologised +demythologiser +demythologises +demythologising +depersonalisation +depersonalisation's +depersonalisations +depersonalised +deputised +destabilise +destabilised +destabilises +destabilising +destigmatisation +desynchronise +desynchronised +desynchronises +desynchronising +detribalise +detribalised +detribalises +detribalising +diagonalisable +dialysed +diarrhoea +diarrhoea's +diarrhoeal +diarrhoeas +dichotomisation +digitalisation +digitalisation's +digitalisations +digitisation +dioptre +discoloured +discoloured's +discolouredness +discoloureds +discolours +disfavour +disfavoured +disfavourer +disfavourer's +disfavourers +disfavouring +disfavours +dishevelled +disorganisation +disorganisation's +disorganisations +dowelling +downdraught +dramatisation +dramatisation's +dramatisations +dramatise +dramatised +dramatiser +dramatisers +dramatises +dramatising +draughtier +draughtiness +draughtsperson +draughty +duellist +duellists +dynamised +emphasise +emphasised +emphasiser +emphasisers +emphasises +emphasising +energised +energises +enthral +enthrals +epicentre +epicentre's +epicentres +eulogise +eulogised +eulogiser +eulogisers +eulogises +eulogising +exorcise +exorcised +exorcises +exorcising +extemporise +extemporised +extemporiser +extemporisers +extemporises +extemporising +externalisation +externalisation's +externalisations +favouritism +favouritism's +favouritisms +federalise +federalised +federalises +federalising +fibreboard +foetid +foetidly +foetidness +foetus +foetus's +foetuses +fossilised +fraternise +fraternised +fraterniser +fraternisers +fraternises +fraternising +galvanising +generalisable +generalisables +germanised +gimballed +glottalisation +glycerolised +gruelling +gruellingly +gruellings +gynaecological +gynaecological's +gynaecologicals +gynaecologist +gynaecologist's +gynaecologists +harmonisation +harmonisation's +harmonisations +homoeomorph +homoeopath +homogenisation +homogenisation's +homogenisations +homogenise +homogenised +homogeniser +homogenisers +homogenises +homogenising +honouree +hospitalisation +hospitalisation's +hospitalisations +humanise +humanised +humaniser +humanisers +humanises +humanising +hydrolysed +hypnotised +hypophysectomised +idolise +idolised +idoliser +idolisers +idolises +idolising +immobilise +immobilised +immobiliser +immobilises +immobilising +immortalised +immunisation +immunisation's +immunisations +impersonalised +industrialised +industrialising +inhumanises +institutionalisation +institutionalisation's +institutionalisations +internationalisation +internationalisation's +internationalisations +internationalised +ionise +ionised +ioniser +ionisers +ionises +ionising +ionisings +ionision +ionisions +kinaesthesis +kinaesthetic +kinaesthetically +kinaesthetics +learnt +legitimise +legitimised +legitimiser +legitimises +legitimising +libeller +libellers +libellous +libellously +liberalisation +liberalisation's +liberalisations +licenseable +lionise +lionised +lioniser +lionisers +lionises +lionising +magnetised +manoeuvrability +manoeuvrable +marbleised +marbleising +maximisation +maximisation's +maximisations +mediaevalist +mediaevalist's +mediaevalists +memorialised +mesmerised +metabolised +metropolitanisation +milligramme +milligramme's +milligrammes +millilitre +millilitre's +millilitres +mineralised +misbehaviour +misbehaviour's +misbehaviours +misdemeanour +misdemeanour's +misdemeanours +mobilisation +mobilisation's +mobilisations +mobilise +mobilised +mobiliser +mobilises +mobilising +modernisation +modernisation's +modernisations +monetisation +monetise +monetised +monetises +monetising +monopolisation +monopolisation's +monopolisations +monopolise +monopolised +monopoliser +monopolisers +monopolises +monopolising +multicolour +multicolour's +multicoloured +multicolours +narcotises +nasalisation +nasalisation's +nasalisations +nasalised +naturalised +neutralisation +neutralisation's +neutralisations +nominalised +novelised +ochre +ochre's +ochres +oedema +oedema's +oedemas +oedematous +operationalisation +operationalisations +operationalise +operationalised +orthogonalisation +orthogonalised +orthopaedic +orthopaedics +ostracised +outmanoeuvre +outmanoeuvred +outmanoeuvres +outmanoeuvring +overemphasise +overemphasised +overemphasiser +overemphasisers +overemphasises +overemphasising +palatalisation +palatalise +palatalised +palatalises +palatalising +palletised +panelisation +panelised +parenthesise +parenthesises +parenthesising +pasteurisation +pasteurisations +pedalled +pedalling +peptising +platinise +platinised +platinises +platinising +ploughshare +ploughshare's +ploughshares +polarise +polarised +polariser +polarisers +polarises +polarising +politicised +polymerisations +proletarianisation +proletarianised +pronominalisation +pronominalise +pummelled +pyorrhoea +pyorrhoea's +pyorrhoeas +pyrolyse +pyrolyse's +pyrolyser +pyrolyses +radiopasteurisation +radiosterilisation +radiosterilised +rancour +rancour's +rancours +randomisation +randomisation's +randomisations +rationalisation +rationalisation's +rationalisations +reacclimatises +reactualises +realisabilities +realisability +realisability's +reconceptualisation +recrystallisation +recrystallisation's +recrystallisations +recrystallise +recrystallising +reemphasise +reemphasised +reemphasiser +reemphasisers +reemphasises +reemphasising +regularising +reharmonisation +rehumanises +remobilisation +remobilisation's +remobilisations +remobilises +remonetisation +remonetise +remonetised +remonetises +remonetising +repopularise +revaporisation +revaporisation's +revaporisations +revisualisation +revisualisation's +revisualisations +revitalisation +revitalise +revitalised +revitaliser +revitalisers +revitalises +revitalising +ritualised +romanticise +romanticises +romanticising +rubberised +satirises +scandalised +scandalising +sectionalised +secularisation +secularisation's +secularisations +secularised +sensitised +sentimentalise +sentimentalised +sentimentaliser +sentimentalisers +sentimentalises +sentimentalising +sexualised +signalises +snivelled +sniveller +snivellers +snivelling +snivellings +socialisation +socialisation's +socialisations +stabilisation +stabilisation's +stabilisations +stigmatisation +stigmatisation's +stigmatisations +stigmatised +stylisation +stylisation's +stylisations +subcategorising +subsidisation +subsidisation's +subsidisations +substerilisation +suburbanisation +suburbanisation's +suburbanisations +suburbanised +suburbanising +swivelled +swivelling +systematisation +systematisation's +systematisations +systemisation +systemisation's +systemisations +teaselled +teaselling +teetotaller +temporise +temporised +temporiser +temporiser's +temporisers +temporises +temporising +temporising's +temporisingly +temporisings +theatregoer +theatregoer's +theatregoers +theatregoing +tinselled +tinselling +traditionalised +travelogue +travelogue's +travelogues +trialisation +triangularisation +triangularisations +tricolour +tricolour's +tricoloured +tricolours +tyne +tyne's +tynes +tyrannise +tyrannised +tyranniser +tyrannisers +tyrannises +tyrannising +tyrannising's +tyrannisingly +tyrannisings +unamortisation +unamortisation's +unamortisations +uncanonised +uncauterised +uncauterised's +uncauteriseds +undemocratises +underutilisation +underutilised +undialysed +undialysed's +undialyseds +undiscoloureds +undramatised +undramatised's +undramatiseds +unenergised +unenergised's +unenergiseds +uneulogised +uneulogised's +uneulogiseds +unfossilised +unfossilised's +unfossiliseds +unfraternising +unfraternising's +unfraternisings +unhydrolysed +unhydrolysed's +unhydrolyseds +unidolised +unidolised's +unidoliseds +unimmortalised +unindustrialised +unindustrialised's +unindustrialiseds +unitised +universalise +universalised +universaliser +universalisers +universalises +universalising +unlearnt +unmagnetised +unmagnetised's +unmagnetiseds +unmemorialised +unmemorialised's +unmemorialiseds +unmesmerised +unmineralised +unmineralised's +unmineraliseds +unmobilised +unmobilised's +unmobiliseds +unmonopolised +unmonopolises +unnaturalised +unpatronising +unpolarised +unpolarised's +unpolariseds +unsatirises +unsavouries +unsavouriness +unsavoury +unsavoury's +unscandalised +unsecularised +unsensitised +unsentimentalises +unstigmatised +unstigmatised's +unstigmatiseds +untemporisings +untrammelled +unvocalised +unvocalised's +unvocaliseds +unvulcanised +unvulcanised's +unvulcaniseds +updraught +urbanisation +urbanisation's +urbanisations +urbanised +vacuolisation +vacuolisation's +vacuolisations +vaporisation +vaporisation's +vaporisations +varicoloured +varicoloured's +varicoloureds +velarise +velarised +velarises +velarising +visualisation +visualisation's +visualisations +vocalisation +vocalisation's +vocalisations +vocalise +vocalised +vocaliser +vocalisers +vocalises +vocalising +volatilisation +volatilisation's +volatilisations +vulcanised +waggoneer +watercolour +watercolour's +watercoloured +watercolouring +watercolourist +watercolourists +watercolours +yodelled +yodeller +yodelling +deprecation +info +sync +synch +java +Java +doc +Doc +Mon +Tue +Wed +Thur +Fri +Sat +Sun +initially +I +formatter:off +formatter:on diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_US.dictionary b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_US.dictionary new file mode 100644 index 0000000..9d1245f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/en_US.dictionary @@ -0,0 +1,49798 @@ +ACM +ANSI +ASAP +ASCII +ATM's +Achilles +Ada +Ada's +Afghanistan +Afghanistan's +Africa +Africa's +African +African's +Africans +Airedale +Airedale's +Alabama +Alabama's +Alabamian +Alabamian's +Alaska +Alaska's +Albania +Albania's +Albanian +Albanian's +Albanians +Alcibiades +Alden +Alden's +Algeria +Algeria's +Algerian +Algerian's +Algol +Algol's +Allah +Allah's +Alyssa +Alyssa's +Amanda +Amanda's +Amdahl +Amdahl's +Amelia +Amelia's +America +America's +American +American's +Americana +Americans +Americas +Ames +Amsterdam +Amsterdam's +Amtrak +Amtrak's +Anabaptist +Anabaptist's +Anabaptists +Andorra +Andorra's +Angeleno +Angeleno's +Angelenos +Anglican +Anglican's +Anglicanism +Anglicanism's +Anglicans +Anglophilia +Anglophilia's +Anglophobia +Anglophobia's +Angola +Angola's +Antarctica +Antarctica's +Aphrodite +Aphrodite's +Apollo +Apollo's +Apollonian +Appalachia +Appalachia's +Appalachian +Appalachian's +Appalachians +April +April's +Aprils +Aquarius +Arab +Arab's +Arabia +Arabia's +Arabian +Arabian's +Arabians +Arabic +Arabic's +Arabs +Archie +Archie's +Argentina +Argentina's +Argo +Argo's +Argos +Arianism +Arianism's +Arianist +Arianist's +Arianists +Aries +Aristotelian +Aristotelian's +Aristotle +Aristotle's +Arizona +Arizona's +Arkansas +Arkansas's +Armageddon +Armageddon's +Armenian +Armenian's +Armour +Armour's +Armstrong +Armstrong's +Artemis +Aryan +Aryan's +Aryans +Asia +Asia's +Asian +Asian's +Asians +Asiatic +Asiatic's +Asiatics +Assyrian +Assyrian's +Assyriology +Assyriology's +Athena +Athena's +Athenian +Athenian's +Athenians +Athens +Atlantic +Atlantic's +Auckland +Auckland's +Audubon +Audubon's +Augusta +Augusta's +Augusts +Austin +Austin's +Australia +Australia's +Australian +Australian's +Australians +Austria +Austria's +Austrian +Austrian's +Ave +BSD +Babel +Babel's +Bach +Bach's +Bagrodia +Bagrodia's +Bagrodias +Balkan +Balkan's +Balkans +Baltic +Baltic's +Bangladesh +Bangladesh's +Bantu +Bantu's +Bantus +Barbados +Baxter +Baxter's +Beethoven +Beethoven's +Belgian +Belgian's +Belgians +Belgium +Belgium's +Bellovin +Bellovin's +Belushi +Belushi's +Benedict +Benedict's +Benedictine +Benedictine's +Bengal +Bengal's +Bengali +Bengali's +Benzedrine +Benzedrine's +Bergsten +Bergsten's +Berkeley +Berkeley's +Berlin +Berlin's +Berliner +Berliners +Bermuda +Bermuda's +Bessel +Bessel's +Beverly +Beverly's +Bilbo +Bilbo's +Bolivia +Bolivia's +Bologna +Bologna's +Bolshevik +Bolshevik's +Bolsheviks +Bolshevism +Bolshevism's +Borneo +Borneo's +Boston +Boston's +Bostonian +Bostonian's +Bostonians +Botswana +Botswana's +Bourne +Bourne's +Brazil +Brazil's +Brazilian +Brazilian's +Bresenham +Bresenham's +Britain +Britain's +British +Britisher +Britishly +Briton +Briton's +Britons +Buehring +Buehring's +CDC +CDC's +CEO +CMOS +CPU +CPU's +CPUs +California +California's +Californian +Californian's +Californians +Cambridge +Cambridge's +Canada +Canada's +Carolina +Carolina's +Carolinas +Cartesian +Chinese +Chinese's +Christian +Christian's +Christians +Christiansen +Christmas +Cobol +Cobol's +Coleman +Coleman's +Colorado +Colorado's +Comdex +Comdex's +Cray +Cray's +Crays +Cupertino +Cupertino's +Czechoslovakian +DARPA +DARPA's +DECNET +DOS +Dan +Dan's +DeMorgan +DeMorgan's +Debbie +Debbie's +December +December's +Decembers +Delaware +Delaware's +Denmark +Denmark's +Dijkstra +Dijkstra's +Diophantine +Dylan +Dylan's +EDP +EGA +EGA's +Edsger +Edsger's +Ellen +Ellen's +Elvis +Elvis's +English +English's +Erlang +Erlang's +Ethernet +Ethernet's +Ethernets +Europe +Europe's +European +European's +Europeans +FIFO +Fairbanks +Februaries +February +February's +Felder +Florida +Florida's +Fortran +Fortran's +Fourier +Fourier's +France +France's +Frances +French +French's +Friday +Friday's +Fridays +GPSS +Galvin +Galvin's +Garfunkel +Geoff +Geoff's +Geoffrey +Geoffrey's +German +German's +Germans +Germany +Germany's +Gibson +Gibson's +Gipsies +Gipsy +Gipsy's +Godzilla +Godzilla's +Gothic +Greek +Greek's +Greeks +Greg +Greg's +Heinlein +Heinlein's +Hewlett +Hewlett's +Holland +Holland's +Hollander +Hollanders +Hollands +Honda +Honda's +Hz +I'd +I'll +I'm +I've +IBM +IBM's +IEEE +ITCorp +ITCorp's +ITcorp +ITcorp's +Illinois +Inc +India +India's +Indian +Indian's +Indiana +Indiana's +Indians +Intel +Intel's +Internet +Internet's +Iran +Iran's +Ireland +Ireland's +Israel +Israel's +Israeli +Israeli's +Israelis +Italian +Italian's +Italians +James +Januaries +January +January's +Japan +Japan's +Japanese +Japanese's +Jefferson +Jefferson's +Jill +Jill's +Johnnie +Johnnie's +Jr +Julie +Julie's +Julies +July +July's +Julys +June +June's +Junes +Klein +Klein's +Kleinrock +Kleinrock's +Kline +Kline's +Knuth +Knuth's +Kuenning +Kuenning's +LED's +LEDs +LaTeX +LaTeX's +Lagrangian +Lagrangian's +Lamport +Lamport's +Latin +Latin's +Laurie +Laurie's +Lenten +Linux +Liz +Liz's +Lyle +Lyle's +MHz +MIT +MIT's +MacDraw +MacDraw's +MacIntosh +MacIntosh's +MacPaint +MacPaint's +Mafia +Mafia's +Malibu +Malibu's +Mandelbrot +Mandelbrot's +Manhattan +Manhattan's +Manila +Manila's +Marianne +Marianne's +Mary +Mary's +Maryland +Maryland's +Marylanders +Massachusetts +Massey +Massey's +Matt +Matt's +Maxtor +Maxtor's +McElhaney +McElhaney's +McKenzie +McKenzie's +McMartin +McMartin's +Medusa +Medusa's +Michigan +Michigan's +Microport +Microport's +Microsoft +Microsoft's +Midwest +Minnesota +Minnesota's +Monday +Monday's +Mondays +Montana +Montana's +Montanan +Montanan's +Moslem +Moslem's +Moslems +Motorola +Motorola's +Mr +Mrs +Ms +Multibus +Multibus's +Multics +Munsey +Munsey's +Muslim +Muslim's +Muslims +NFS +Nazi +Nazi's +Nazis +NeWS +Nebraska +Nebraska's +Nebraskan +Nebraskan's +Negro +Negro's +Negroes +Nepal +Nepal's +Netherlands +Newtonian +November +November's +Novembers +OEM +OEM's +OEMS +OK +OS +OS's +October +October's +Octobers +Oderberg +Oderberg's +Oderbergs +Oedipus +Ohio +Ohio's +Oklahoma +Oklahoma's +Oklahoman +Oklahoman's +Oliver's +PC +PC's +PCs +PDP +Packard +Packard's +Packards +Palestinian +Pascal +Pascal's +Pennsylvania +Pennsylvania's +Peter's +Petkiewicz +Petkiewicz's +PhD +Planck +Planck's +Poland +Poland's +Popek +Popek's +Popeks +Prime's +Prokofiev +Prokofiev's +QA +RCS +ROM +RSX +Redford +Redford's +Rick +Rick's +Ritchie +Ritchie's +Robert +Robert's +Roberts +Robinson +Robinson's +Roman +Roman's +Romans +Roy +Roy's +Rubens +Russian +Russian's +Russians +SCCS +SMTP +Sally's +Salz +Salz's +Sam +Sam's +Saturday +Saturday's +Saturdays +Scotland +Scotland's +Seagate +Seagate's +September +September's +Septembers +Signor +Sikkim +Sikkim's +Sikkimese +Silverstein +Silverstein's +Singapore +Singapore's +Spafford +Spafford's +Spain +Spain's +Spanish +Spanish's +Spencer +Spencer's +Spuds +Sr +Sunday +Sunday's +Sundays +TCP +TV's +TeX +TeX's +Teflon +Teflon's +Tektronix +Tektronix's +Tennessee +Tennessee's +Texas +Texas's +Texases +Thursday +Thursday's +Thursdays +Tinseltown +Tinseltown's +Trudeau +Trudeau's +Tuesday +Tuesday's +Tuesdays +Turing +Turing's +UART +UCLA +UNIX's +USC +USC's +USG +USG's +Ultrix +Ultrix's +Unix +Unix's +Usenet +Usenet's +Usenix +Usenix's +Utah +Utah's +VAR +VCR +VMS +VMS's +Vanessa +Vanessa's +Vax +Vax's +Ventura +Ventura's +Virginia +Virginia's +Warnock +Warnock's +Washington +Washington's +Wednesday +Wednesday's +Wednesdays +Weibull +Weibull's +Wilbur +Wilbur's +Willisson +Willisson's +Wilson +Wilson's +Xenix +Xenix's +Xeroxed +Xeroxes +Xeroxing +Yamaha +Yamaha's +Yentl +Yentl's +York +York's +Yorker +Yorkers +Yorks +Zealand +Zealand's +Zulu +Zulu's +Zulus +a +aback +abaft +abandon +abandoned +abandoner +abandoning +abandonment +abandonments +abandons +abase +abased +abasement +abasements +abaser +abases +abash +abashed +abashes +abashing +abasing +abate +abated +abatement +abatements +abater +abates +abating +abbe +abbey +abbey's +abbeys +abbot +abbot's +abbots +abbreviate +abbreviated +abbreviates +abbreviating +abbreviation +abbreviations +abdomen +abdomen's +abdomens +abdominal +abdominally +abduct +abducted +abducting +abduction +abduction's +abductions +abductor +abductor's +abductors +abducts +abed +aberrant +aberrantly +aberration +aberrations +abet +abets +abetted +abetter +abetting +abettor +abeyance +abhor +abhorred +abhorrent +abhorrently +abhorrer +abhorring +abhors +abide +abided +abider +abides +abiding +abidingly +abilities +ability +ability's +abject +abjection +abjections +abjectly +abjectness +abjure +abjured +abjurer +abjures +abjuring +ablate +ablated +ablates +ablating +ablation +ablative +ablatively +ablaze +able +abler +ablest +ablution +ablutions +ably +abnormal +abnormalities +abnormality +abnormally +aboard +abode +abode's +abodes +abolish +abolished +abolisher +abolishers +abolishes +abolishing +abolishment +abolishment's +abolishments +abolition +abolitionist +abolitionists +abominable +aboriginal +aboriginally +aborigine +aborigine's +aborigines +abort +aborted +aborter +aborting +abortion +abortion's +abortions +abortive +abortively +abortiveness +aborts +abound +abounded +abounding +abounds +about +above +aboveground +abrade +abraded +abrader +abrades +abrading +abrasion +abrasion's +abrasions +abreaction +abreaction's +abreactions +abreast +abridge +abridged +abridger +abridges +abridging +abridgment +abroad +abrogate +abrogated +abrogates +abrogating +abrogation +abrupt +abruptly +abruptness +abscess +abscessed +abscesses +abscissa +abscissa's +abscissas +abscond +absconded +absconder +absconding +absconds +absence +absence's +absences +absent +absented +absentee +absentee's +absenteeism +absentees +absentia +absenting +absently +absentminded +absentmindedly +absentmindedness +absents +absinthe +absolute +absolutely +absoluteness +absolutes +absolution +absolve +absolved +absolver +absolves +absolving +absorb +absorbed +absorbency +absorbent +absorbent's +absorbents +absorber +absorbing +absorbingly +absorbs +absorption +absorption's +absorptions +absorptive +abstain +abstained +abstainer +abstaining +abstains +abstention +abstentions +abstinence +abstract +abstracted +abstractedly +abstractedness +abstracter +abstracting +abstraction +abstraction's +abstractionism +abstractionist +abstractionists +abstractions +abstractive +abstractly +abstractness +abstractor +abstractor's +abstractors +abstracts +abstruse +abstrusely +abstruseness +abstrusenesses +absurd +absurdities +absurdity +absurdity's +absurdly +absurdness +abundance +abundances +abundant +abundantly +abuse +abused +abuser +abusers +abuses +abusing +abusive +abusively +abusiveness +abut +abutment +abutments +abuts +abutted +abutter +abutter's +abutters +abutting +abysmal +abysmally +abyss +abyss's +abysses +acacia +academia +academic +academically +academics +academies +academy +academy's +accede +acceded +accedes +acceding +accelerate +accelerated +accelerates +accelerating +acceleratingly +acceleration +accelerations +accelerative +accelerator +accelerators +accelerometer +accelerometer's +accelerometers +accent +accented +accenting +accents +accentual +accentually +accentuate +accentuated +accentuates +accentuating +accentuation +accept +acceptability +acceptable +acceptableness +acceptably +acceptance +acceptance's +acceptances +accepted +acceptedly +accepter +accepters +accepting +acceptingly +acceptingness +acceptive +acceptor +acceptor's +acceptors +accepts +access +accessed +accesses +accessibility +accessible +accessibly +accessing +accession +accession's +accessions +accessories +accessory +accessory's +accident +accident's +accidental +accidentally +accidentalness +accidently +accidents +acclaim +acclaimed +acclaimer +acclaiming +acclaims +acclamation +acclimate +acclimated +acclimates +acclimating +acclimation +accolade +accolades +accommodate +accommodated +accommodates +accommodating +accommodatingly +accommodation +accommodations +accommodative +accommodativeness +accompanied +accompanier +accompanies +accompaniment +accompaniment's +accompaniments +accompanist +accompanist's +accompanists +accompany +accompanying +accomplice +accomplices +accomplish +accomplished +accomplisher +accomplishers +accomplishes +accomplishing +accomplishment +accomplishment's +accomplishments +accord +accordance +accordances +accorded +accorder +accorders +according +accordingly +accordion +accordion's +accordions +accords +accost +accosted +accosting +accosts +account +accountabilities +accountability +accountable +accountableness +accountably +accountancy +accountant +accountant's +accountants +accounted +accounting +accountings +accounts +accredit +accreditation +accreditations +accredited +accretion +accretion's +accretions +accrue +accrued +accrues +accruing +acculturate +acculturated +acculturates +acculturating +acculturation +acculturative +accumulate +accumulated +accumulates +accumulating +accumulation +accumulations +accumulative +accumulatively +accumulativeness +accumulator +accumulator's +accumulators +accuracies +accuracy +accurate +accurately +accurateness +accursed +accursedly +accursedness +accusal +accusation +accusation's +accusations +accusative +accuse +accused +accuser +accusers +accuses +accusing +accusingly +accustom +accustomed +accustomedness +accustoming +accustoms +ace +ace's +aced +acer +aces +acetate +acetone +acetylene +ache +ached +aches +achievable +achieve +achieved +achievement +achievement's +achievements +achiever +achievers +achieves +achieving +aching +achingly +acid +acidic +acidities +acidity +acidly +acidness +acids +acidulous +acing +acknowledge +acknowledged +acknowledgedly +acknowledger +acknowledgers +acknowledges +acknowledging +acme +acne +acned +acolyte +acolytes +acorn +acorn's +acorns +acoustic +acoustical +acoustically +acoustician +acoustics +acquaint +acquaintance +acquaintance's +acquaintances +acquainted +acquainting +acquaints +acquiesce +acquiesced +acquiescence +acquiesces +acquiescing +acquirable +acquire +acquired +acquires +acquiring +acquisition +acquisition's +acquisitions +acquisitiveness +acquit +acquits +acquittal +acquittals +acquitted +acquitter +acquitting +acre +acre's +acreage +acres +acrid +acridly +acridness +acrimonious +acrimoniously +acrimony +acrobat +acrobat's +acrobatic +acrobatics +acrobats +acronym +acronym's +acronyms +acropolis +across +acrylic +act +acted +acting +actinium +actinometer +actinometer's +actinometers +action +action's +actions +activate +activated +activates +activating +activation +activations +activator +activator's +activators +active +actively +activeness +activism +activist +activist's +activists +activities +activity +activity's +actor +actor's +actors +actress +actress's +actresses +acts +actual +actualities +actuality +actually +actuals +actuarial +actuarially +actuate +actuated +actuates +actuating +actuation +actuator +actuator's +actuators +acuity +acumen +acute +acutely +acuteness +acuter +acutest +acyclic +acyclically +ad +adage +adages +adagio +adagios +adamant +adamantly +adapt +adaptability +adaptable +adaptation +adaptation's +adaptations +adapted +adaptedness +adapter +adapters +adapting +adaption +adaptive +adaptively +adaptiveness +adaptor +adaptors +adapts +add +added +addenda +addendum +adder +adders +addict +addicted +addicting +addiction +addiction's +addictions +addictive +addicts +adding +addition +addition's +additional +additionally +additions +additive +additive's +additively +additives +additivity +address +addressability +addressable +addressed +addressee +addressee's +addressees +addresser +addressers +addresses +addressing +adds +adduce +adduced +adducer +adduces +adducing +adduct +adducted +adducting +adduction +adductive +adductor +adducts +adept +adeptly +adeptness +adepts +adequacies +adequacy +adequate +adequately +adequateness +adhere +adhered +adherence +adherences +adherent +adherent's +adherently +adherents +adherer +adherers +adheres +adhering +adhesion +adhesions +adhesive +adhesive's +adhesively +adhesiveness +adhesives +adiabatic +adiabatically +adieu +adjacency +adjacent +adjacently +adjective +adjective's +adjectively +adjectives +adjoin +adjoined +adjoining +adjoins +adjourn +adjourned +adjourning +adjournment +adjourns +adjudge +adjudged +adjudges +adjudging +adjudicate +adjudicated +adjudicates +adjudicating +adjudication +adjudication's +adjudications +adjudicative +adjunct +adjunct's +adjunctive +adjunctly +adjuncts +adjure +adjured +adjures +adjuring +adjust +adjustable +adjustably +adjusted +adjuster +adjusters +adjusting +adjustive +adjustment +adjustment's +adjustments +adjustor +adjustor's +adjustors +adjusts +adjutant +adjutants +administer +administered +administering +administerings +administers +administration +administration's +administrations +administrative +administratively +administrator +administrator's +administrators +admirable +admirableness +admirably +admiral +admiral's +admirals +admiralty +admiration +admirations +admire +admired +admirer +admirers +admires +admiring +admiringly +admissibility +admissible +admission +admission's +admissions +admit +admits +admittance +admitted +admittedly +admitting +admix +admixed +admixes +admixture +admonish +admonished +admonisher +admonishes +admonishing +admonishingly +admonishment +admonishment's +admonishments +admonition +admonition's +admonitions +ado +adobe +adolescence +adolescent +adolescent's +adolescently +adolescents +adopt +adopted +adopter +adopters +adopting +adoption +adoption's +adoptions +adoptive +adoptively +adopts +adorable +adorableness +adoration +adore +adored +adorer +adores +adoring +adorn +adorned +adorning +adornment +adornment's +adornments +adorns +adrenal +adrenaline +adrenally +adrift +adroit +adroitly +adroitness +ads +adsorb +adsorbed +adsorbing +adsorbs +adsorption +adulate +adulating +adulation +adulations +adult +adult's +adulterate +adulterated +adulterates +adulterating +adulteration +adulterer +adulterer's +adulterers +adulterous +adulterously +adultery +adulthood +adultly +adultness +adults +adumbrate +adumbrated +adumbrates +adumbrating +adumbration +adumbrative +adumbratively +advance +advanced +advancement +advancement's +advancements +advancer +advancers +advances +advancing +advantage +advantaged +advantageous +advantageously +advantageousness +advantages +advantaging +advent +adventist +adventists +adventitious +adventitiously +adventitiousness +adventive +adventively +adventure +adventured +adventurer +adventurers +adventures +adventuring +adventurous +adventurously +adventurousness +adverb +adverb's +adverbial +adverbially +adverbs +adversaries +adversary +adversary's +adverse +adversed +adversely +adverses +adversing +adversities +adversity +advertise +advertised +advertisement +advertisement's +advertisements +advertiser +advertisers +advertises +advertising +advice +advisability +advisable +advisableness +advisably +advise +advised +advisedly +advisee +advisee's +advisees +advisement +advisements +adviser +adviser's +advisers +advises +advising +advisor +advisor's +advisors +advisory +advocacy +advocate +advocated +advocates +advocating +advocation +advocative +aegis +aerate +aerated +aerates +aerating +aeration +aerator +aerators +aerial +aerial's +aerially +aerials +aeroacoustic +aerobic +aerobics +aerodynamic +aerodynamics +aeronautic +aeronautical +aeronautically +aeronautics +aerosol +aerosols +aerospace +afar +afars +affable +affair +affair's +affairs +affect +affectation +affectation's +affectations +affected +affectedly +affectedness +affecter +affecting +affectingly +affection +affection's +affectionate +affectionately +affectioned +affections +affective +affectively +affects +afferent +afferently +affianced +affidavit +affidavit's +affidavits +affiliate +affiliated +affiliates +affiliating +affiliation +affiliations +affinities +affinity +affinity's +affirm +affirmation +affirmation's +affirmations +affirmative +affirmatively +affirmed +affirming +affirms +affix +affixed +affixes +affixing +afflict +afflicted +afflicting +affliction +affliction's +afflictions +afflictive +afflictively +afflicts +affluence +affluent +affluently +afford +affordable +afforded +affording +affords +affricate +affricates +affrication +affricative +affright +affront +affronted +affronting +affronts +afghan +afghans +aficionado +aficionados +afield +afire +aflame +afloat +afoot +afore +aforementioned +aforesaid +aforethought +afoul +afraid +afresh +aft +after +aftereffect +aftereffects +aftermath +aftermost +afternoon +afternoon's +afternoons +afters +aftershock +aftershock's +aftershocks +afterthought +afterthoughts +afterward +afterwards +again +against +agape +agar +agate +agates +age +aged +agedly +agedness +ageless +agelessly +agelessness +agencies +agency +agency's +agenda +agenda's +agendas +agent +agent's +agentive +agents +ager +agers +ages +agglomerate +agglomerated +agglomerates +agglomeration +agglomerative +agglutinate +agglutinated +agglutinates +agglutinating +agglutination +agglutinative +agglutinin +agglutinins +aggravate +aggravated +aggravates +aggravating +aggravation +aggravations +aggregate +aggregated +aggregately +aggregateness +aggregates +aggregating +aggregation +aggregations +aggregative +aggregatively +aggression +aggression's +aggressions +aggressive +aggressively +aggressiveness +aggressor +aggressors +aggrieve +aggrieved +aggrievedly +aggrieves +aggrieving +aghast +agile +agilely +agility +aging +agitate +agitated +agitatedly +agitates +agitating +agitation +agitations +agitative +agitator +agitator's +agitators +agleam +aglow +agnostic +agnostic's +agnostics +ago +agog +agonies +agony +agrarian +agree +agreeable +agreeableness +agreeably +agreed +agreeing +agreement +agreement's +agreements +agreer +agreers +agrees +agricultural +agriculturally +agriculture +ague +ah +ahead +aid +aide +aided +aider +aides +aiding +aids +ail +ailed +aileron +ailerons +ailing +ailment +ailment's +ailments +ails +aim +aimed +aimer +aimers +aiming +aimless +aimlessly +aimlessness +aims +air +airbag +airbag's +airbags +airborne +aircraft +aircrafts +airdrop +airdrops +aired +airer +airers +airfield +airfield's +airfields +airflow +airframe +airframe's +airframes +airhead +airier +airiest +airily +airiness +airing +airings +airless +airlessness +airlift +airlift's +airlifts +airline +airline's +airliner +airliner's +airliners +airlines +airlock +airlock's +airlocks +airmail +airmails +airman +airmen +airport +airport's +airports +airs +airship +airship's +airships +airspace +airspeed +airspeeds +airstrip +airstrip's +airstrips +airway +airway's +airways +airy +aisle +aisles +ajar +akimbo +akin +alabaster +alacrity +alarm +alarmed +alarming +alarmingly +alarmist +alarms +alas +alba +albacore +albeit +album +albumen +albumin +albums +alchemy +alcohol +alcohol's +alcoholic +alcoholic's +alcoholics +alcoholism +alcoholisms +alcohols +alcove +alcove's +alcoved +alcoves +alder +alderman +alderman's +aldermen +ale +alee +alert +alerted +alertedly +alerter +alerters +alerting +alertly +alertness +alerts +alfalfa +alfresco +alga +algae +algaecide +algebra +algebra's +algebraic +algebraically +algebras +alginate +alginates +algorithm +algorithm's +algorithmic +algorithmically +algorithms +alias +aliased +aliases +aliasing +alibi +alibi's +alibis +alien +alien's +alienate +alienated +alienates +alienating +alienation +aliens +alight +alighted +alighting +align +aligned +aligner +aligning +alignment +alignments +aligns +alike +alikeness +aliment +aliments +alimony +alive +aliveness +alkali +alkali's +alkaline +alkalis +alkaloid +alkaloid's +alkaloids +alkyl +all +allay +allayed +allaying +allays +allegation +allegation's +allegations +allege +alleged +allegedly +alleges +allegiance +allegiance's +allegiances +alleging +allegoric +allegorical +allegorically +allegoricalness +allegories +allegory +allegory's +allegretto +allegretto's +allegrettos +allegro +allegro's +allegros +allele +alleles +allemande +allergic +allergies +allergy +allergy's +alleviate +alleviated +alleviates +alleviating +alleviation +alleviative +alleviator +alleviator's +alleviators +alley +alley's +alleys +alleyway +alleyway's +alleyways +alliance +alliance's +alliances +allied +allier +allies +alligator +alligator's +alligatored +alligators +alliteration +alliteration's +alliterations +alliterative +alliteratively +allocate +allocated +allocates +allocating +allocation +allocation's +allocations +allocative +allocator +allocator's +allocators +allophone +allophones +allophonic +allot +alloted +allotment +allotment's +allotments +allots +allotted +allotter +allotting +allow +allowable +allowableness +allowably +allowance +allowance's +allowanced +allowances +allowancing +allowed +allowedly +allowing +allows +alloy +alloy's +alloyed +alloying +alloys +allude +alluded +alludes +alluding +allure +allured +allurement +allures +alluring +allusion +allusion's +allusions +allusive +allusively +allusiveness +ally +allying +alma +almanac +almanac's +almanacs +almightiness +almighty +almond +almond's +almonds +almoner +almost +alms +almsman +alnico +aloe +aloes +aloft +aloha +alone +aloneness +along +alongside +aloof +aloofly +aloofness +aloud +alpha +alphabet +alphabet's +alphabetic +alphabetical +alphabetically +alphabetics +alphabets +alphanumeric +alphanumerics +alpine +alps +already +also +altar +altar's +altars +alter +alterable +alteration +alteration's +alterations +altercation +altercation's +altercations +altered +alterer +alterers +altering +alternate +alternated +alternately +alternates +alternating +alternation +alternations +alternative +alternatively +alternativeness +alternatives +alternator +alternator's +alternators +alters +although +altitude +altitudes +alto +alto's +altogether +altos +altruism +altruist +altruistic +altruistically +altruists +alum +alumna +alumna's +alumnae +alumni +alumnus +alundum +alveolar +alveolarly +alveoli +alveolus +always +am +amain +amalgam +amalgam's +amalgamate +amalgamated +amalgamates +amalgamating +amalgamation +amalgamations +amalgamative +amalgams +amanuensis +amass +amassed +amasser +amasses +amassing +amateur +amateur's +amateurish +amateurishly +amateurishness +amateurism +amateurs +amatory +amaze +amazed +amazedly +amazement +amazer +amazers +amazes +amazing +amazingly +amazon +amazon's +amazons +ambassador +ambassador's +ambassadors +amber +ambiance +ambiances +ambidextrous +ambidextrously +ambient +ambiguities +ambiguity +ambiguity's +ambiguous +ambiguously +ambiguousness +ambition +ambition's +ambitions +ambitious +ambitiously +ambitiousness +ambivalence +ambivalent +ambivalently +amble +ambled +ambler +ambles +ambling +ambrosial +ambrosially +ambulance +ambulance's +ambulances +ambulatory +ambuscade +ambuscader +ambush +ambushed +ambusher +ambushes +ameliorate +ameliorated +ameliorating +amelioration +ameliorative +amen +amenable +amend +amended +amender +amending +amendment +amendment's +amendments +amends +amenities +amenity +americium +amiable +amiableness +amiabler +amiablest +amicable +amicableness +amicably +amid +amide +amidst +amigo +amino +amiss +amity +ammo +ammonia +ammoniac +ammonias +ammonium +ammunition +ammunitions +amnesty +amoeba +amoeba's +amoebas +amok +among +amongst +amoral +amorality +amorally +amorous +amorously +amorousness +amorphous +amorphously +amorphousness +amount +amounted +amounter +amounters +amounting +amounts +amour +amour's +amours +amp +ampere +amperes +ampersand +ampersand's +ampersands +amphetamine +amphetamines +amphibian +amphibian's +amphibians +amphibious +amphibiously +amphibiousness +amphibology +ample +ampleness +ampler +amplest +amplification +amplifications +amplified +amplifier +amplifiers +amplifies +amplify +amplifying +amplitude +amplitude's +amplitudes +amply +ampoule +ampoule's +ampoules +amps +amputate +amputated +amputates +amputating +amputation +ams +amulet +amulets +amuse +amused +amusedly +amusement +amusement's +amusements +amuser +amusers +amuses +amusing +amusingly +amusingness +amusive +amyl +an +anachronism +anachronism's +anachronisms +anachronistically +anaconda +anacondas +anaerobic +anagram +anagram's +anagrams +anal +analogical +analogically +analogies +analogous +analogously +analogousness +analogy +analogy's +analysis +analyst +analyst's +analysts +analytic +analytical +analytically +analyticities +analyticity +analytics +anaphora +anaphoric +anaphorically +anaplasmosis +anarchic +anarchical +anarchist +anarchist's +anarchists +anarchy +anastomoses +anastomosis +anastomotic +anathema +anatomic +anatomical +anatomically +anatomicals +anatomy +ancestor +ancestor's +ancestors +ancestral +ancestrally +ancestry +anchor +anchorage +anchorage's +anchorages +anchored +anchoring +anchorite +anchoritism +anchors +anchovies +anchovy +ancient +anciently +ancientness +ancients +ancillaries +ancillary +and +anded +anders +anding +android +ands +anecdotal +anecdotally +anecdote +anecdote's +anecdotes +anechoic +anemometer +anemometer's +anemometers +anemometry +anemone +anew +angel +angel's +angelic +angels +anger +angered +angering +angers +angiography +angle +angled +angler +anglers +angles +angling +angrier +angriest +angrily +angriness +angry +angst +angstrom +angstroms +anguish +anguished +angular +angularly +anhydrous +anhydrously +aniline +animal +animal's +animally +animalness +animals +animate +animated +animatedly +animately +animateness +animates +animating +animation +animations +animator +animator's +animators +animism +animosity +anion +anion's +anionic +anionics +anions +anise +aniseikonic +anisotropic +anisotropies +anisotropy +anisotropy's +ankle +ankle's +ankles +annal +annalen +annals +annex +annexation +annexations +annexed +annexes +annexing +annihilate +annihilated +annihilates +annihilating +annihilation +annihilative +anniversaries +anniversary +anniversary's +annotate +annotated +annotates +annotating +annotation +annotations +annotative +announce +announced +announcement +announcement's +announcements +announcer +announcers +announces +announcing +annoy +annoyance +annoyance's +annoyances +annoyed +annoyer +annoyers +annoying +annoyingly +annoys +annual +annually +annuals +annul +annulled +annulling +annulment +annulment's +annulments +annuls +annum +annunciate +annunciated +annunciates +annunciating +annunciation +annunciator +annunciators +anode +anode's +anodes +anoint +anointed +anointer +anointing +anoints +anomalies +anomalous +anomalously +anomalousness +anomaly +anomaly's +anomic +anomie +anon +anonymity +anonymous +anonymously +anonymousness +anorexia +another +another's +answer +answerable +answered +answerer +answerers +answering +answers +ant +ant's +antagonism +antagonisms +antagonist +antagonist's +antagonistic +antagonistically +antagonists +antarctic +ante +anteater +anteater's +anteaters +antecedent +antecedent's +antecedently +antecedents +anted +antedate +antedated +antedates +antedating +antelope +antelope's +antelopes +antenna +antenna's +antennae +antennas +anterior +anteriorly +anteriors +anthem +anthem's +anthems +anther +anthologies +anthology +anthracite +anthropological +anthropologically +anthropologist +anthropologist's +anthropologists +anthropology +anthropomorphic +anthropomorphically +anti +antibacterial +antibiotic +antibiotics +antibodies +antibody +antic +antic's +anticipate +anticipated +anticipates +anticipating +anticipation +anticipations +anticipative +anticipatively +anticipatory +anticoagulation +anticompetitive +antics +antidisestablishmentarianism +antidote +antidote's +antidotes +antiformant +antifundamentalist +antigen +antigen's +antigens +antihistorical +antimicrobial +antimony +anting +antinomian +antinomy +antipathy +antiphonal +antiphonally +antipode +antipode's +antipodes +antiquarian +antiquarian's +antiquarians +antiquate +antiquated +antiquation +antique +antique's +antiques +antiquities +antiquity +antiredeposition +antiresonance +antiresonator +antiseptic +antisera +antiserum +antislavery +antisocial +antisubmarine +antisymmetric +antisymmetry +antithesis +antithetical +antithetically +antithyroid +antitoxin +antitoxin's +antitoxins +antitrust +antitruster +antler +antlered +ants +anus +anvil +anvil's +anvils +anxieties +anxiety +anxious +anxiously +anxiousness +any +anybodies +anybody +anyhow +anymore +anyone +anyone's +anyones +anyplace +anything +anythings +anyway +anyways +anywhere +anywheres +aorta +apace +apart +apartheid +apartment +apartment's +apartments +apartness +apathetic +apathy +ape +aped +aper +aperiodic +aperiodicity +aperture +apertured +apes +apex +apexes +aphasia +aphasic +aphid +aphid's +aphids +aphonic +aphorism +aphorism's +aphorisms +apiaries +apiary +apical +apically +apiece +aping +apish +apishly +apishness +aplenty +aplomb +apocalypse +apocalyptic +apocrypha +apocryphal +apocryphally +apocryphalness +apogee +apogees +apologetic +apologetically +apologetics +apologia +apologies +apologist +apologist's +apologists +apology +apology's +apostate +apostates +apostle +apostle's +apostles +apostolic +apostrophe +apostrophes +apothecary +apotheoses +apotheosis +appalled +appalling +appallingly +appanage +apparatus +apparatuses +apparel +apparels +apparent +apparently +apparentness +apparition +apparition's +apparitions +appeal +appealed +appealer +appealers +appealing +appealingly +appeals +appear +appearance +appearances +appeared +appearer +appearers +appearing +appears +appease +appeased +appeasement +appeaser +appeases +appeasing +appellant +appellant's +appellants +appellate +appellation +appellative +appellatively +append +appendage +appendage's +appendages +appended +appender +appenders +appendices +appendicitis +appending +appendix +appendix's +appendixes +appends +appertain +appertained +appertaining +appertains +appetite +appetite's +appetites +appetitive +applaud +applauded +applauder +applauding +applauds +applause +apple +apple's +applejack +apples +appliance +appliance's +appliances +applicability +applicable +applicant +applicant's +applicants +application +application's +applications +applicative +applicatively +applicator +applicator's +applicators +applied +applier +appliers +applies +applique +appliques +apply +applying +appoint +appointed +appointee +appointee's +appointees +appointer +appointers +appointing +appointive +appointment +appointment's +appointments +appoints +apportion +apportioned +apportioning +apportionment +apportionments +apportions +appraisal +appraisal's +appraisals +appraise +appraised +appraiser +appraisers +appraises +appraising +appraisingly +appreciable +appreciably +appreciate +appreciated +appreciates +appreciating +appreciation +appreciations +appreciative +appreciatively +appreciativeness +apprehend +apprehended +apprehender +apprehending +apprehends +apprehensible +apprehension +apprehension's +apprehensions +apprehensive +apprehensively +apprehensiveness +apprentice +apprenticed +apprentices +apprenticeship +apprenticeships +apprise +apprised +appriser +apprisers +apprises +apprising +apprisings +apprize +apprized +apprizer +apprizers +apprizes +apprizing +apprizingly +apprizings +approach +approachability +approachable +approached +approacher +approachers +approaches +approaching +approbate +approbation +appropriate +appropriated +appropriately +appropriateness +appropriates +appropriatest +appropriating +appropriation +appropriations +appropriative +appropriator +appropriator's +appropriators +approval +approval's +approvals +approve +approved +approver +approvers +approves +approving +approvingly +approximate +approximated +approximately +approximates +approximating +approximation +approximations +approximative +approximatively +appurtenance +appurtenances +apricot +apricot's +apricots +apron +apron's +aprons +apropos +apse +apses +apsis +apt +aptitude +aptitudes +aptly +aptness +aqua +aquaria +aquarium +aquas +aquatic +aquatics +aqueduct +aqueduct's +aqueducts +aqueous +aqueously +aquifer +aquifers +arabesque +arable +arachnid +arachnid's +arachnids +arbiter +arbiter's +arbiters +arbitrarily +arbitrariness +arbitrary +arbitrate +arbitrated +arbitrates +arbitrating +arbitration +arbitrative +arbitrator +arbitrator's +arbitrators +arboreal +arboreally +arc +arcade +arcade's +arcaded +arcades +arcading +arcane +arced +arch +archaeological +archaeologically +archaeologist +archaeologist's +archaeologists +archaeology +archaic +archaically +archaicness +archaism +archangel +archangel's +archangels +archbishop +archdiocese +archdioceses +arched +archenemy +archer +archers +archery +arches +archetype +archetypes +archfool +arching +archipelago +archipelagoes +architect +architect's +architectonic +architectonics +architects +architectural +architecturally +architecture +architecture's +architectures +archival +archive +archived +archiver +archivers +archives +archiving +archivist +archivists +archly +archness +arcing +arclike +arcs +arctic +ardent +ardently +arduous +arduously +arduousness +are +area +area's +areas +aren't +arena +arena's +arenas +ares +argon +argonaut +argonauts +argot +arguable +arguably +argue +argued +arguer +arguers +argues +arguing +argument +argument's +argumentation +argumentative +argumentatively +arguments +arid +aridity +aridness +aright +arise +arisen +ariser +arises +arising +arisings +aristocracy +aristocrat +aristocrat's +aristocratic +aristocratically +aristocrats +arithmetic +arithmetical +arithmetically +arithmetics +ark +arm +arm's +armadillo +armadillos +armament +armament's +armaments +armchair +armchair's +armchairs +armed +armer +armers +armful +armfuls +armhole +armies +arming +armistice +armload +armpit +armpit's +armpits +arms +army +army's +aroma +aromas +aromatic +aromaticness +arose +around +arousal +arouse +aroused +arouses +arousing +arpeggio +arpeggio's +arpeggios +arrack +arraign +arraigned +arraigning +arraignment +arraignment's +arraignments +arraigns +arrange +arranged +arrangement +arrangement's +arrangements +arranger +arrangers +arranges +arranging +arrant +arrantly +array +arrayed +arrayer +arraying +arrays +arrears +arrest +arrested +arrester +arresters +arresting +arrestingly +arrestor +arrestor's +arrestors +arrests +arrival +arrival's +arrivals +arrive +arrived +arriver +arrives +arriving +arrogance +arrogant +arrogantly +arrogate +arrogated +arrogates +arrogating +arrogation +arrow +arrowed +arrowhead +arrowhead's +arrowheads +arrowing +arrows +arroyo +arroyos +arsenal +arsenal's +arsenals +arsenic +arsine +arsines +arson +art +art's +arterial +arterially +arteries +arteriolar +arteriole +arteriole's +arterioles +arteriosclerosis +artery +artery's +artful +artfully +artfulness +arthritis +arthrogram +arthrogram's +arthrograms +arthropod +arthropod's +arthropods +artichoke +artichoke's +artichokes +article +article's +articled +articles +articling +articulate +articulated +articulately +articulateness +articulates +articulating +articulation +articulations +articulative +articulator +articulators +articulatory +artifact +artifact's +artifacts +artifice +artificer +artifices +artificial +artificialities +artificiality +artificially +artificialness +artilleries +artillerist +artillery +artisan +artisan's +artisans +artist +artist's +artistic +artistically +artistry +artists +artless +artlessly +arts +artwork +as +asbestos +ascend +ascendancy +ascendant +ascendantly +ascended +ascendency +ascendent +ascender +ascenders +ascending +ascends +ascension +ascensions +ascent +ascertain +ascertainable +ascertained +ascertaining +ascertains +ascetic +ascetic's +asceticism +ascetics +ascot +ascribable +ascribe +ascribed +ascribes +ascribing +ascription +aseptic +ash +ashamed +ashamedly +ashen +asher +ashes +ashman +ashore +ashtray +ashtray's +ashtrays +aside +asides +asinine +asininely +ask +askance +asked +asker +askers +askew +askewness +asking +asks +asleep +asocial +asp +asparagus +aspect +aspect's +aspects +aspen +asper +aspersion +aspersion's +aspersions +asphalt +asphalted +asphyxia +aspic +aspirant +aspirant's +aspirants +aspirate +aspirated +aspirates +aspirating +aspiration +aspiration's +aspirations +aspirator +aspirators +aspire +aspired +aspirer +aspires +aspirin +aspiring +aspirins +ass +ass's +assail +assailant +assailant's +assailants +assailed +assailing +assails +assassin +assassin's +assassinate +assassinated +assassinates +assassinating +assassination +assassinations +assassins +assault +assaulted +assaulter +assaulting +assaultive +assaultively +assaultiveness +assaults +assay +assayed +assayer +assayers +assaying +assemblage +assemblage's +assemblages +assemble +assembled +assembler +assemblers +assembles +assemblies +assembling +assembly +assembly's +assen +assent +assented +assenter +assenting +assents +assert +asserted +asserter +asserters +asserting +assertion +assertion's +assertions +assertive +assertively +assertiveness +asserts +asses +assess +assessed +assesses +assessing +assessment +assessment's +assessments +assessor +assessor's +assessors +asset +asset's +assets +assiduity +assiduous +assiduously +assiduousness +assign +assignable +assigned +assignee +assignee's +assignees +assigner +assigners +assigning +assignment +assignment's +assignments +assigns +assimilate +assimilated +assimilates +assimilating +assimilation +assimilations +assimilative +assist +assistance +assistances +assistant +assistant's +assistants +assistantship +assistantships +assisted +assister +assisting +assists +associate +associated +associates +associating +association +association's +associational +associations +associative +associatively +associativities +associativity +associator +associator's +associators +assonance +assonant +assort +assorted +assorter +assorting +assortment +assortment's +assortments +assorts +assuage +assuaged +assuages +assuaging +assume +assumed +assumer +assumes +assuming +assumption +assumption's +assumptions +assurance +assurance's +assurances +assure +assured +assuredly +assuredness +assurer +assurers +assures +assuring +assuringly +astatine +aster +aster's +asterisk +asterisk's +asterisks +asteroid +asteroid's +asteroidal +asteroids +asters +asthma +astonish +astonished +astonishes +astonishing +astonishingly +astonishment +astound +astounded +astounding +astoundingly +astounds +astral +astrally +astray +astride +astringency +astringent +astringently +astronaut +astronaut's +astronautics +astronauts +astronomer +astronomer's +astronomers +astronomical +astronomically +astronomy +astrophysical +astrophysics +astute +astutely +astuteness +asunder +asylum +asylums +asymmetric +asymmetrical +asymmetrically +asymmetries +asymmetry +asymptomatically +asymptote +asymptote's +asymptotes +asymptotic +asymptotically +asymptoticly +asynchronism +asynchronous +asynchronously +asynchrony +at +atavistic +ate +atemporal +atheism +atheist +atheist's +atheistic +atheists +atherosclerosis +athlete +athlete's +athletes +athletic +athleticism +athletics +atlas +atmosphere +atmosphere's +atmosphered +atmospheres +atmospheric +atmospherics +atoll +atoll's +atolls +atom +atom's +atomic +atomically +atomics +atoms +atonal +atonally +atone +atoned +atonement +atones +atoning +atop +atrocious +atrociously +atrociousness +atrocities +atrocity +atrocity's +atrophic +atrophied +atrophies +atrophy +atrophying +attach +attache +attached +attacher +attachers +attaches +attaching +attachment +attachment's +attachments +attack +attackable +attacked +attacker +attacker's +attackers +attacking +attacks +attain +attainable +attainableness +attainably +attained +attainer +attainers +attaining +attainment +attainment's +attainments +attains +attempt +attempted +attempter +attempters +attempting +attempts +attend +attendance +attendance's +attendances +attendant +attendant's +attendants +attended +attendee +attendee's +attendees +attender +attenders +attending +attends +attention +attention's +attentional +attentionality +attentions +attentive +attentively +attentiveness +attenuate +attenuated +attenuates +attenuating +attenuation +attenuator +attenuator's +attenuators +attest +attested +attester +attesting +attests +attic +attic's +attics +attire +attired +attires +attiring +attitude +attitude's +attitudes +attitudinal +attitudinally +attorney +attorney's +attorneys +attract +attracted +attracting +attraction +attraction's +attractions +attractive +attractively +attractiveness +attractor +attractor's +attractors +attracts +attributable +attribute +attributed +attributer +attributes +attributing +attribution +attributions +attributive +attributively +attrition +attune +attuned +attunes +attuning +atypical +atypically +auburn +auction +auctioned +auctioneer +auctioneer's +auctioneers +auctioning +audacious +audaciously +audaciousness +audacity +audible +audibly +audience +audience's +audiences +audio +audiogram +audiogram's +audiograms +audiological +audiologist +audiologist's +audiologists +audiology +audiometer +audiometer's +audiometers +audiometric +audiometry +audit +audited +auditing +audition +audition's +auditioned +auditioning +auditions +auditive +auditor +auditor's +auditorium +auditoriums +auditors +auditory +audits +auger +auger's +augers +aught +augment +augmentation +augmentations +augmented +augmenter +augmenting +augments +augur +augurs +august +augustly +augustness +aunt +aunt's +auntly +aunts +aura +aura's +aural +aurally +auras +aureole +aureomycin +aurora +auscultate +auscultated +auscultates +auscultating +auscultation +auscultations +auspice +auspices +auspicious +auspiciously +auspiciousness +austere +austerely +austereness +austerity +authentic +authentically +authenticate +authenticated +authenticates +authenticating +authentication +authentications +authenticator +authenticators +authenticity +author +author's +authored +authoring +authoritarian +authoritarianism +authoritative +authoritatively +authoritativeness +authorities +authority +authority's +authors +authorship +autism +autistic +auto +auto's +autobiographic +autobiographical +autobiographically +autobiographies +autobiography +autobiography's +autocollimator +autocorrelate +autocorrelated +autocorrelates +autocorrelating +autocorrelation +autocorrelations +autocracies +autocracy +autocrat +autocrat's +autocratic +autocratically +autocrats +autodial +autofluorescence +autograph +autographed +autographing +autographs +automata +automate +automated +automates +automatic +automatically +automatics +automating +automation +automaton +automatons +automobile +automobile's +automobiles +automotive +autonavigator +autonavigator's +autonavigators +autonomic +autonomous +autonomously +autonomy +autopilot +autopilot's +autopilots +autopsied +autopsies +autopsy +autoregressive +autorepeat +autorepeating +autorepeats +autos +autosuggestibility +autotransformer +autumn +autumn's +autumnal +autumnally +autumns +auxiliaries +auxiliary +avail +availabilities +availability +available +availableness +availably +availed +availer +availers +availing +avails +avalanche +avalanched +avalanches +avalanching +avant +avarice +avaricious +avariciously +avariciousness +avenge +avenged +avenger +avenges +avenging +avenue +avenue's +avenues +aver +average +averaged +averagely +averageness +averages +averaging +averred +averrer +averring +avers +averse +aversely +averseness +aversion +aversion's +aversions +aversive +avert +averted +averting +averts +avian +aviaries +aviary +aviation +aviator +aviator's +aviators +avid +avidity +avidly +avidness +avionic +avionics +avocado +avocados +avocation +avocation's +avocations +avoid +avoidable +avoidably +avoidance +avoided +avoider +avoiders +avoiding +avoids +avouch +avow +avowed +avowedly +avower +avows +await +awaited +awaiting +awaits +awake +awaked +awaken +awakened +awakener +awakening +awakens +awakes +awaking +award +awarded +awarder +awarders +awarding +awards +aware +awareness +awash +away +awayness +awe +awed +awesome +awesomely +awesomeness +awful +awfully +awfulness +awhile +awhiles +awing +awkward +awkwardly +awkwardness +awl +awl's +awls +awning +awning's +awninged +awnings +awoke +awry +ax +axe +axed +axer +axers +axes +axial +axially +axing +axiological +axiologically +axiom +axiom's +axiomatic +axiomatically +axiomatics +axioms +axion +axion's +axions +axis +axle +axle's +axles +axolotl +axolotl's +axolotls +axon +axon's +axons +aye +ayer +ayers +ayes +azalea +azalea's +azaleas +azimuth +azimuth's +azimuths +azure +babble +babbled +babbler +babbles +babbling +babe +babe's +babes +babied +babies +baby +baby's +babyhood +babying +babyish +babysit +babysits +babysitter +babysitters +baccalaureate +bachelor +bachelor's +bachelors +bacilli +bacillus +back +backache +backache's +backaches +backbone +backbone's +backbones +backdrop +backdrop's +backdrops +backed +backer +backers +background +background's +backgrounds +backing +backlash +backlasher +backlog +backlog's +backlogs +backpack +backpack's +backpacker +backpackers +backpacks +backplane +backplane's +backplanes +backs +backscatter +backscattered +backscattering +backscatters +backslash +backslashed +backslashes +backslashing +backspace +backspaced +backspaces +backspacing +backstabber +backstabbing +backstage +backstairs +backstitch +backstitched +backstitches +backstitching +backtrack +backtracked +backtracker +backtrackers +backtracking +backtracks +backup +backups +backward +backwardly +backwardness +backwards +backwater +backwater's +backwaters +backwoods +backyard +backyard's +backyards +bacon +baconer +bacteria +bacterial +bacterially +bacterium +bad +bade +baden +badge +badged +badger +badger's +badgered +badgering +badgers +badges +badging +badlands +badly +badminton +badness +bads +baffle +baffled +baffler +bafflers +baffles +baffling +bafflingly +bag +bag's +bagatelle +bagatelle's +bagatelles +bagel +bagel's +bagels +baggage +bagged +bagger +bagger's +baggers +baggier +baggies +bagginess +bagging +baggy +bagpipe +bagpipe's +bagpiper +bagpipes +bags +bah +bail +bailer +bailiff +bailiff's +bailiffs +bailing +bailly +bait +baited +baiter +baiting +baits +bake +baked +baker +bakeries +bakers +bakery +bakery's +bakes +baking +bakings +baklava +balalaika +balalaika's +balalaikas +balance +balanced +balancedness +balancer +balancers +balances +balancing +balconied +balconies +balcony +balcony's +bald +balder +balding +baldly +baldness +bale +baled +baleful +balefully +balefulness +baler +balers +bales +baling +balk +balked +balker +balkier +balkiness +balking +balks +balky +ball +ballad +ballad's +ballads +ballast +ballast's +ballasts +balled +baller +ballerina +ballerina's +ballerinas +ballers +ballet +ballet's +ballets +balling +ballistic +ballistics +balloon +ballooned +ballooner +ballooners +ballooning +balloons +ballot +ballot's +balloted +balloter +balloting +ballots +ballplayer +ballplayer's +ballplayers +ballroom +ballroom's +ballrooms +balls +ballyhoo +balm +balm's +balmier +balminess +balms +balmy +balsa +balsam +balsams +balustrade +balustrade's +balustrades +bamboo +bamboos +ban +ban's +banal +banally +banana +banana's +bananas +band +bandage +bandaged +bandager +bandages +bandaging +banded +bander +bandied +bandies +banding +bandit +bandit's +bandits +bandpass +bands +bandstand +bandstand's +bandstands +bandwagon +bandwagon's +bandwagons +bandwidth +bandwidths +bandy +bandying +bane +baneful +banefully +bang +banged +banger +banging +bangle +bangle's +bangles +bangs +baning +banish +banished +banisher +banishes +banishing +banishment +banister +banister's +banisters +banjo +banjo's +banjos +bank +banked +banker +bankers +banking +bankrupt +bankruptcies +bankruptcy +bankruptcy's +bankrupted +bankrupting +bankrupts +banks +banned +banner +banner's +banners +banning +banquet +banqueted +banqueter +banqueting +banquetings +banquets +bans +banshee +banshee's +banshees +bantam +banter +bantered +banterer +bantering +banteringly +banters +baptism +baptism's +baptismal +baptismally +baptisms +baptist +baptist's +baptistery +baptistries +baptistry +baptistry's +baptists +bar +bar's +barb +barbarian +barbarian's +barbarians +barbaric +barbarities +barbarity +barbarous +barbarously +barbarousness +barbecue +barbecued +barbecuer +barbecues +barbecuing +barbed +barbedness +barbell +barbell's +barbells +barber +barbered +barbering +barbers +barbital +barbiturate +barbiturates +barbs +bard +bard's +bards +bare +bared +barefoot +barefooted +barely +bareness +barer +bares +barest +barflies +barfly +barfly's +bargain +bargained +bargainer +bargaining +bargains +barge +barged +barges +barging +baring +baritone +baritone's +baritones +barium +bark +barked +barker +barkers +barking +barks +barley +barn +barn's +barns +barnstorm +barnstormed +barnstormer +barnstorming +barnstorms +barnyard +barnyard's +barnyards +barometer +barometer's +barometers +barometric +baron +baron's +baroness +baronial +baronies +barons +barony +barony's +baroque +baroquely +baroqueness +barrack +barracker +barracks +barracuda +barracuda's +barracudas +barrage +barrage's +barraged +barrages +barraging +barred +barrel +barrel's +barrels +barren +barrenness +barrens +barricade +barricade's +barricades +barrier +barrier's +barriers +barring +barringer +barrow +barrows +bars +bartender +bartender's +bartenders +barter +bartered +barterer +bartering +barters +bas +basal +basally +basalt +base +baseball +baseball's +baseballs +baseboard +baseboard's +baseboards +based +baseless +baseline +baseline's +baselines +basely +baseman +basement +basement's +basements +baseness +baser +bases +basest +bash +bashed +basher +bashes +bashful +bashfully +bashfulness +bashing +basic +basically +basics +basil +basin +basin's +basined +basing +basins +basis +bask +basked +basket +basket's +basketball +basketball's +basketballs +baskets +basking +bass +bass's +basses +basset +bassinet +bassinet's +bassinets +basso +bastard +bastard's +bastardly +bastards +baste +basted +baster +bastes +basting +bastion +bastion's +bastioned +bastions +bat +bat's +batch +batched +batcher +batches +batching +bated +bater +bath +bathe +bathed +bather +bathers +bathes +bathing +bathos +bathrobe +bathrobe's +bathrobes +bathroom +bathroom's +bathroomed +bathrooms +baths +bathtub +bathtub's +bathtubs +bating +baton +baton's +batons +bats +battalion +battalion's +battalions +batted +batten +battened +battening +battens +batter +battered +batteries +battering +batters +battery +battery's +batting +battle +battled +battlefield +battlefield's +battlefields +battlefront +battlefront's +battlefronts +battleground +battleground's +battlegrounds +battlement +battlement's +battlemented +battlements +battler +battlers +battles +battleship +battleship's +battleships +battling +bauble +bauble's +baubles +baud +bauds +bauxite +bawdier +bawdiness +bawdy +bawl +bawled +bawler +bawling +bawls +bay +bayed +baying +bayly +bayonet +bayonet's +bayoneted +bayoneting +bayonets +bayou +bayou's +bayous +bays +bazaar +bazaar's +bazaars +be +beach +beached +beaches +beachhead +beachhead's +beachheads +beaching +beacon +beacon's +beaconed +beaconing +beacons +bead +beaded +beading +beadle +beadle's +beadles +beads +beady +beagle +beagle's +beagles +beak +beaked +beaker +beakers +beaks +beam +beamed +beamer +beamers +beaming +beams +bean +beanbag +beanbag's +beanbags +beaned +beaner +beaners +beaning +beans +bear +bearable +bearably +beard +bearded +beardedness +beardless +beards +bearer +bearers +bearing +bearings +bearish +bearishly +bearishness +bears +beast +beastings +beastlier +beastliness +beastly +beasts +beat +beatable +beatably +beaten +beater +beaters +beatific +beatification +beatify +beating +beatings +beatitude +beatitude's +beatitudes +beatnik +beatnik's +beatniks +beats +beau +beau's +beaus +beauteous +beauteously +beauteousness +beauties +beautification +beautifications +beautified +beautifier +beautifiers +beautifies +beautiful +beautifully +beautifulness +beautify +beautifying +beauty +beauty's +beaver +beaver's +beavers +becalm +becalmed +becalming +becalms +became +because +beck +beckon +beckoned +beckoning +beckons +become +becomes +becoming +becomingly +bed +bed's +bedazzle +bedazzled +bedazzlement +bedazzles +bedazzling +bedbug +bedbug's +bedbugs +bedded +bedder +bedder's +bedders +bedding +bedevil +bedevils +bedfast +bedlam +bedpost +bedpost's +bedposts +bedraggle +bedraggled +bedridden +bedrock +bedrock's +bedroom +bedroom's +bedroomed +bedrooms +beds +bedside +bedspread +bedspread's +bedspreads +bedspring +bedspring's +bedsprings +bedstead +bedstead's +bedsteads +bedtime +bee +beech +beechen +beecher +beef +beefed +beefer +beefers +beefier +beefing +beefs +beefsteak +beefy +beehive +beehive's +beehives +been +beens +beep +beeped +beeper +beeping +beeps +beer +beers +bees +beet +beet's +beetle +beetle's +beetled +beetles +beetling +beets +befall +befallen +befalling +befalls +befell +befit +befit's +befits +befitted +befitting +befittingly +befog +befogged +befogging +befogs +before +beforehand +befoul +befouled +befouling +befouls +befriend +befriended +befriending +befriends +befuddle +befuddled +befuddles +befuddling +beg +began +beget +begets +begetting +beggar +beggared +beggaring +beggarliness +beggarly +beggars +beggary +begged +begging +begin +beginner +beginner's +beginners +beginning +beginning's +beginnings +begins +begot +begotten +begrudge +begrudged +begrudger +begrudges +begrudging +begrudgingly +begs +beguile +beguiled +beguiler +beguiles +beguiling +beguilingly +begun +behalf +behave +behaved +behaver +behaves +behaving +behead +beheading +beheld +behest +behind +behold +beholden +beholder +beholders +beholding +beholds +beige +being +beings +belated +belatedly +belatedness +belay +belayed +belaying +belays +belch +belched +belches +belching +belfries +belfry +belfry's +belie +belied +belief +belief's +beliefs +belier +belies +believability +believable +believably +believe +believed +believer +believers +believes +believing +belittle +belittled +belittler +belittles +belittling +bell +bell's +bellboy +bellboy's +bellboys +belle +belle's +belles +bellhop +bellhop's +bellhops +bellicose +bellicosely +bellicoseness +bellicosity +bellied +bellies +belligerence +belligerent +belligerent's +belligerently +belligerents +bellman +bellmen +bellow +bellowed +bellowing +bellows +bells +bellwether +bellwether's +bellwethers +belly +belly's +bellyful +bellying +belong +belonged +belonging +belongingness +belongings +belongs +beloved +below +belt +belted +belting +belts +bely +belying +bemoan +bemoaned +bemoaning +bemoans +bench +benched +bencher +benches +benching +benchmark +benchmark's +benchmarking +benchmarks +bend +bendable +bended +bender +benders +bending +bends +beneath +benediction +benediction's +benedictions +benefactor +benefactor's +benefactors +beneficence +beneficences +beneficial +beneficially +beneficialness +beneficiaries +beneficiary +benefit +benefited +benefiter +benefiters +benefiting +benefits +benevolence +benevolent +benevolently +benevolentness +benighted +benightedly +benightedness +benign +benignly +bent +bents +benzene +bequeath +bequeathed +bequeathes +bequeathing +bequest +bequest's +bequests +berate +berated +berates +berating +bereave +bereaved +bereavement +bereavements +bereaves +bereaving +bereft +beret +beret's +berets +beribboned +beriberi +berkelium +berried +berries +berry +berry's +berrying +berth +berthed +berthing +berthings +berths +beryl +beryllium +bes +beseech +beseeches +beseeching +beseechingly +beset +besets +besetting +beside +besides +besiege +besieged +besieger +besiegers +besieging +besmirch +besmirched +besmirches +besmirching +besotted +besotting +besought +bespeak +bespeaks +bespectacled +best +bested +bester +bestial +bestially +besting +bestow +bestowal +bestowed +bests +bestseller +bestseller's +bestsellers +bestselling +bet +bet's +beta +betas +beth +betide +betray +betrayal +betrayed +betrayer +betraying +betrays +betroth +betrothal +betrothals +betrothed +bets +better +bettered +bettering +betterment +betterments +betters +betting +between +betweenness +betwixt +bevel +bevels +beverage +beverage's +beverages +bevies +bevy +bewail +bewailed +bewailing +bewails +beware +bewhiskered +bewilder +bewildered +bewilderedly +bewilderedness +bewildering +bewilderingly +bewilderment +bewilders +bewitch +bewitched +bewitches +bewitching +bewitchingly +beyond +biannual +bias +biased +biases +biasing +biasness +bib +bib's +bibbed +bibbing +bible +bible's +bibles +biblical +biblically +bibliographic +bibliographical +bibliographically +bibliographics +bibliographies +bibliography +bibliography's +bibliophile +bibliophiles +bibs +bicameral +bicarbonate +bicentennial +biceps +bicker +bickered +bickerer +bickering +bickers +biconcave +biconvex +bicycle +bicycled +bicycler +bicyclers +bicycles +bicycling +bid +bid's +biddable +bidden +bidder +bidder's +bidders +biddies +bidding +biddy +bide +bided +bider +bides +biding +bidirectional +bids +biennial +biennially +biennium +bier +bifocal +bifocals +bifurcate +bifurcated +bifurcately +bifurcates +bifurcating +bifurcation +bifurcations +big +bigger +biggest +bight +bight's +bights +bigly +bigness +bigot +bigot's +bigoted +bigotedly +bigoting +bigotry +bigots +bijection +bijection's +bijections +bijective +bijectively +bike +bike's +biked +biker +biker's +bikers +bikes +biking +bikini +bikini's +bikinied +bikinis +bilabial +bilateral +bilaterally +bilateralness +bile +bilge +bilge's +bilged +bilges +bilging +bilinear +bilingual +bilingually +bilinguals +bilk +bilked +bilker +bilking +bilks +bill +billboard +billboard's +billboards +billed +biller +billers +billet +billeted +billeting +billets +billiard +billiards +billing +billings +billion +billions +billionth +billow +billowed +billowing +billows +bills +bimodal +bimolecular +bimolecularly +bimonthlies +bimonthly +bin +bin's +binaries +binary +binaural +binaurally +bind +binded +binder +binders +binding +bindingly +bindingness +bindings +binds +bing +binge +bingen +binges +bingo +bingos +binocular +binocularly +binoculars +binomial +binomially +bins +binuclear +biochemical +biochemically +biochemistry +biofeedback +biographer +biographer's +biographers +biographic +biographical +biographically +biographies +biography +biography's +biological +biologically +biologicals +biologist +biologist's +biologists +biology +biomedical +biomedicine +biopsies +biopsy +bipartisan +bipartite +bipartitely +bipartition +biped +bipeds +biplane +biplane's +biplanes +bipolar +biracial +birch +birchen +bircher +birches +bird +bird's +birdbath +birdbath's +birdbaths +birder +birdie +birdied +birdies +birdlike +birds +birefringence +birefringent +birth +birthday +birthday's +birthdays +birthed +birthplace +birthplaces +birthright +birthright's +birthrights +births +biscuit +biscuit's +biscuits +bisect +bisected +bisecting +bisection +bisection's +bisections +bisector +bisector's +bisectors +bisects +bishop +bishop's +bishops +bismuth +bison +bison's +bisons +bisque +bisques +bit +bit's +bitblt +bitblts +bitch +bitch's +bitches +bite +biter +biters +bites +biting +bitingly +bitmap +bitmap's +bitmaps +bits +bitser +bitten +bitter +bitterer +bitterest +bitterly +bitterness +bitters +bittersweet +bittersweetly +bittersweetness +bituminous +bitwise +bivalve +bivalve's +bivalved +bivalves +bivariate +bivouac +bivouacs +biweekly +bizarre +bizarrely +bizarreness +blab +blabbed +blabbermouth +blabbermouths +blabbing +blabs +black +blackberries +blackberry +blackberry's +blackbird +blackbird's +blackbirder +blackbirds +blackboard +blackboard's +blackboards +blacked +blacken +blackened +blackener +blackening +blackens +blacker +blackest +blacking +blackjack +blackjack's +blackjacks +blacklist +blacklisted +blacklister +blacklisting +blacklists +blackly +blackmail +blackmailed +blackmailer +blackmailers +blackmailing +blackmails +blackness +blackout +blackout's +blackouts +blacks +blacksmith +blacksmith's +blacksmithing +blacksmiths +bladder +bladder's +bladders +blade +blade's +bladed +blades +blamable +blame +blamed +blameless +blamelessly +blamelessness +blamer +blamers +blames +blaming +blanch +blanched +blancher +blanches +blanching +bland +blandly +blandness +blank +blanked +blanker +blankest +blanket +blanketed +blanketer +blanketers +blanketing +blankets +blanking +blankly +blankness +blanks +blare +blared +blares +blaring +blase +blaspheme +blasphemed +blasphemer +blasphemes +blasphemies +blaspheming +blasphemous +blasphemously +blasphemousness +blasphemy +blast +blasted +blaster +blasters +blasting +blasts +blatant +blatantly +blatantness +blaze +blazed +blazer +blazers +blazes +blazing +blazingly +bleach +bleached +bleacher +bleachers +bleaches +bleaching +bleak +bleakly +bleakness +blear +bleariness +bleary +bleat +bleater +bleating +bleats +bled +bleed +bleeder +bleeders +bleeding +bleedings +bleeds +blemish +blemish's +blemished +blemishes +blemishing +blend +blended +blender +blenders +blending +blends +bless +blessed +blessedly +blessedness +blesses +blessing +blessings +blew +blight +blighted +blighter +blimp +blimp's +blimps +blind +blinded +blinder +blinders +blindfold +blindfolded +blindfolding +blindfolds +blinding +blindingly +blindly +blindness +blinds +blink +blinked +blinker +blinkered +blinkering +blinkers +blinking +blinks +blip +blip's +blips +bliss +blissful +blissfully +blissfulness +blister +blistered +blistering +blisteringly +blisters +blithe +blithely +blither +blithest +blitz +blitz's +blitzes +blitzkrieg +blizzard +blizzard's +blizzards +bloat +bloated +bloater +bloaters +bloating +bloats +blob +blob's +blobs +bloc +bloc's +block +block's +blockade +blockaded +blockader +blockades +blockading +blockage +blockage's +blockages +blocked +blocker +blockers +blockhouse +blockhouses +blocking +blocks +blocs +bloke +bloke's +blokes +blond +blond's +blonde +blonde's +blondes +blonds +blood +blooded +bloodhound +bloodhound's +bloodhounds +bloodied +bloodiest +bloodiness +bloodless +bloodlessly +bloodlessness +bloods +bloodshed +bloodshot +bloodstain +bloodstain's +bloodstained +bloodstains +bloodstream +bloody +bloodying +bloom +bloomed +bloomer +bloomers +blooming +blooms +blossom +blossomed +blossoms +blot +blot's +blots +blotted +blotting +blouse +blouse's +blouses +blousing +blow +blowed +blower +blowers +blowfish +blowing +blown +blows +blowup +blubber +blubbered +blubbering +bludgeon +bludgeoned +bludgeoning +bludgeons +blue +blueberries +blueberry +blueberry's +bluebird +bluebird's +bluebirds +bluebonnet +bluebonnet's +bluebonnets +blued +bluefish +bluely +blueness +blueprint +blueprint's +blueprinted +blueprinting +blueprints +bluer +blues +bluest +bluestocking +bluff +bluffed +bluffer +bluffing +bluffly +bluffness +bluffs +bluing +bluish +bluishness +blunder +blundered +blunderer +blundering +blunderingly +blunderings +blunders +blunt +blunted +blunter +bluntest +blunting +bluntly +bluntness +blunts +blur +blur's +blurb +blurred +blurredly +blurrier +blurriness +blurring +blurringly +blurry +blurs +blurt +blurted +blurter +blurting +blurts +blush +blushed +blusher +blushes +blushing +blushingly +bluster +blustered +blusterer +blustering +blusteringly +blusters +blustery +boar +board +boarded +boarder +boarders +boarding +boardinghouse +boardinghouse's +boardinghouses +boards +boast +boasted +boaster +boasters +boastful +boastfully +boastfulness +boasting +boastings +boasts +boat +boated +boater +boaters +boathouse +boathouse's +boathouses +boating +boatload +boatload's +boatloads +boatman +boatmen +boats +boatswain +boatswain's +boatswains +boatyard +boatyard's +boatyards +bob +bob's +bobbed +bobbies +bobbin +bobbin's +bobbing +bobbins +bobby +bobolink +bobolink's +bobolinks +bobs +bobwhite +bobwhite's +bobwhites +bode +boded +bodes +bodice +bodied +bodies +bodily +boding +body +bodybuilder +bodybuilder's +bodybuilders +bodybuilding +bodyguard +bodyguard's +bodyguards +bodying +bog +bog's +bogged +boggle +boggled +boggles +boggling +bogs +bogus +boil +boiled +boiler +boilerplate +boilers +boiling +boils +boisterous +boisterously +boisterousness +bold +bolder +boldest +boldface +boldfaced +boldfaces +boldfacing +boldly +boldness +boll +bolster +bolstered +bolsterer +bolstering +bolsters +bolt +bolted +bolter +bolting +bolts +bomb +bombard +bombarded +bombarding +bombardment +bombardments +bombards +bombast +bombaster +bombastic +bombed +bomber +bombers +bombing +bombings +bombproof +bombs +bonanza +bonanza's +bonanzas +bond +bondage +bonded +bonder +bonders +bonding +bonds +bondsman +bondsmen +bone +boned +boner +boners +bones +bonfire +bonfire's +bonfires +bong +bonier +boning +bonnet +bonneted +bonnets +bonnier +bonny +bonus +bonus's +bonuses +bony +boo +boob +boobies +booboo +booby +book +bookcase +bookcase's +bookcases +booked +booker +bookers +bookie +bookie's +bookies +booking +bookings +bookish +bookishly +bookishness +bookkeeper +bookkeeper's +bookkeepers +bookkeeping +booklet +booklet's +booklets +books +bookseller +bookseller's +booksellers +bookshelf +bookshelf's +bookshelves +bookstore +bookstore's +bookstores +boolean +booleans +boom +boomed +boomer +boomerang +boomerang's +boomerangs +booming +booms +boon +boor +boor's +boorish +boorishly +boorishness +boors +boos +boost +boosted +booster +boosting +boosts +boot +booted +booth +booths +booties +booting +bootleg +bootlegged +bootlegger +bootlegger's +bootleggers +bootlegging +bootlegs +boots +bootstrap +bootstrap's +bootstrapped +bootstrapping +bootstraps +booty +booze +boozer +boozing +borate +borated +borates +borax +bordello +bordello's +bordellos +border +bordered +borderer +bordering +borderings +borderland +borderland's +borderlands +borderline +borders +bore +bored +boredom +borer +borers +bores +boric +boring +boringly +boringness +born +borne +boron +borough +boroughs +borrow +borrowed +borrower +borrowers +borrowing +borrowings +borrows +bosom +bosom's +bosoms +boss +bossed +bosses +bosun +botanical +botanically +botanist +botanist's +botanists +botany +botch +botched +botcher +botchers +botches +botching +both +bother +bothered +bothering +bothers +bothersome +bottle +bottled +bottleneck +bottleneck's +bottlenecks +bottler +bottlers +bottles +bottling +bottom +bottomed +bottomer +bottoming +bottomless +bottomlessly +bottomlessness +bottoms +botulinus +botulism +bouffant +bough +bough's +boughed +boughs +bought +boughten +boulder +boulder's +bouldered +boulders +boulevard +boulevard's +boulevards +bounce +bounced +bouncer +bouncers +bounces +bouncier +bouncing +bouncingly +bouncy +bound +boundaries +boundary +boundary's +bounded +bounden +bounder +bounding +boundless +boundlessly +boundlessness +bounds +bounteous +bounteously +bounteousness +bountied +bounties +bounty +bounty's +bouquet +bouquet's +bouquets +bourbon +bourbons +bourgeois +bourgeoisie +bout +bout's +bouts +bovine +bovinely +bovines +bow +bowed +bowel +bowel's +bowels +bowen +bower +bowers +bowing +bowl +bowled +bowler +bowlers +bowline +bowline's +bowlines +bowling +bowls +bowman +bows +bowser +bowstring +bowstring's +bowstrings +box +boxcar +boxcar's +boxcars +boxed +boxer +boxers +boxes +boxing +boxwood +boy +boy's +boycott +boycotted +boycotter +boycotting +boycotts +boyer +boyfriend +boyfriend's +boyfriends +boyhood +boyish +boyishly +boyishness +boys +bra +bra's +brace +braced +bracelet +bracelet's +bracelets +bracer +braces +bracing +bracket +bracketed +bracketing +brackets +brackish +brackishness +brae +brae's +braes +brag +bragged +bragger +bragging +brags +braid +braided +braider +braiding +braids +braille +brain +brainchild +brainchild's +brained +brainier +braininess +braining +brains +brainstorm +brainstorm's +brainstormer +brainstorming +brainstorms +brainwash +brainwashed +brainwasher +brainwashes +brainwashing +brainy +brake +braked +brakes +braking +bramble +bramble's +brambles +brambling +brambly +bran +branch +branched +branches +branching +branchings +brand +branded +brander +brandied +brandies +branding +brandish +brandishes +brandishing +brands +brandy +brandying +bras +brash +brashly +brashness +brass +brassed +brasses +brassier +brassiere +brassiness +brassy +brat +brat's +brats +bravado +brave +braved +bravely +braveness +braver +bravery +braves +bravest +braving +bravo +bravoed +bravoing +bravos +bravura +brawl +brawled +brawler +brawling +brawls +brawn +bray +brayed +brayer +braying +brays +braze +brazed +brazen +brazened +brazening +brazenly +brazenness +brazer +brazes +brazier +brazier's +braziers +brazing +breach +breached +breacher +breachers +breaches +breaching +bread +breadboard +breadboard's +breadboards +breaded +breading +breads +breadth +breadwinner +breadwinner's +breadwinners +break +breakable +breakables +breakage +breakaway +breakdown +breakdown's +breakdowns +breaker +breakers +breakfast +breakfasted +breakfaster +breakfasters +breakfasting +breakfasts +breaking +breakpoint +breakpoint's +breakpointed +breakpointing +breakpoints +breaks +breakthrough +breakthrough's +breakthroughes +breakthroughs +breakup +breakups +breakwater +breakwater's +breakwaters +breast +breasted +breasting +breasts +breastwork +breastwork's +breastworks +breath +breathable +breathe +breathed +breather +breathers +breathes +breathier +breathing +breathless +breathlessly +breathlessness +breaths +breathtaking +breathtakingly +breathy +bred +breech +breech's +breeches +breeching +breed +breeder +breeding +breeds +breeze +breeze's +breezed +breezes +breezier +breezily +breeziness +breezing +breezy +bremsstrahlung +brethren +breve +breves +brevet +breveted +breveting +brevets +brevity +brew +brewed +brewer +breweries +brewers +brewery +brewery's +brewing +brews +briar +briar's +briars +bribe +bribed +briber +bribers +bribes +bribing +brick +bricked +bricker +bricking +bricklayer +bricklayer's +bricklayers +bricklaying +bricks +bridal +bride +bride's +bridegroom +brides +bridesmaid +bridesmaid's +bridesmaids +bridge +bridgeable +bridged +bridgehead +bridgehead's +bridgeheads +bridges +bridgework +bridgework's +bridging +bridle +bridled +bridles +bridling +brief +briefcase +briefcase's +briefcases +briefed +briefer +briefest +briefing +briefing's +briefings +briefly +briefness +briefs +brier +brig +brig's +brigade +brigade's +brigaded +brigades +brigadier +brigadier's +brigadiers +brigading +brigantine +bright +brighten +brightened +brightener +brighteners +brightening +brightens +brighter +brightest +brighting +brightly +brightness +brightnesses +brights +brigs +brilliance +brilliancy +brilliant +brilliantly +brilliantness +brim +brimful +brimmed +brindle +brindled +brine +briner +bring +bringer +bringers +bringing +brings +brining +brink +brinkmanship +brisk +brisker +briskly +briskness +bristle +bristled +bristles +bristling +britches +brittle +brittled +brittlely +brittleness +brittler +brittlest +brittling +broach +broached +broacher +broaches +broaching +broad +broadband +broadcast +broadcasted +broadcaster +broadcasters +broadcasting +broadcastings +broadcasts +broaden +broadened +broadener +broadeners +broadening +broadenings +broadens +broader +broadest +broadly +broadness +broads +broadside +brocade +brocaded +broccoli +brochure +brochure's +brochures +broil +broiled +broiler +broilers +broiling +broils +broke +broken +brokenly +brokenness +broker +brokerage +brokers +bromide +bromide's +bromides +bromine +bromines +bronchi +bronchial +bronchiole +bronchiole's +bronchioles +bronchitis +bronchus +bronze +bronzed +bronzer +bronzes +bronzing +brooch +brooch's +brooches +brood +brooder +brooding +broodingly +broods +brook +brooked +brooks +broom +broom's +broomed +brooming +brooms +broomstick +broomstick's +broomsticks +broth +brothel +brothel's +brothels +brother +brother's +brotherhood +brotherliness +brotherly +brothers +brought +brow +brow's +browbeat +browbeaten +browbeating +browbeats +brown +browned +browner +brownest +brownie +brownie's +brownies +browning +brownings +brownish +brownly +brownness +browns +brows +browse +browsed +browser +browsers +browses +browsing +bruise +bruised +bruiser +bruisers +bruises +bruising +brunch +brunches +brunette +brunettes +brunt +brush +brushed +brusher +brushes +brushfire +brushfire's +brushfires +brushier +brushing +brushlike +brushy +brusque +brusquely +brusqueness +brutal +brutalities +brutality +brutally +brute +brute's +brutes +brutish +brutishly +brutishness +bubble +bubbled +bubbler +bubbles +bubblier +bubbling +bubbly +buck +buckboard +buckboard's +buckboards +bucked +bucker +bucket +bucket's +bucketed +bucketing +buckets +bucking +buckle +buckled +buckler +buckles +buckling +bucks +buckshot +buckskin +buckskins +buckwheat +bucolic +bud +bud's +budded +buddies +budding +buddy +buddy's +budge +budged +budges +budget +budgetary +budgeted +budgeter +budgeters +budgeting +budgets +budging +buds +buff +buff's +buffalo +buffaloes +buffer +buffer's +buffered +bufferer +bufferer's +bufferers +buffering +buffers +buffet +buffeted +buffeting +buffetings +buffets +buffing +buffoon +buffoon's +buffoons +buffs +bug +bug's +bugged +bugger +bugger's +buggered +buggering +buggers +buggies +bugging +buggy +buggy's +bugle +bugled +bugler +bugles +bugling +bugs +build +builded +builder +builders +building +building's +buildings +builds +buildup +buildup's +buildups +built +bulb +bulb's +bulbed +bulbs +bulge +bulged +bulges +bulging +bulk +bulked +bulkhead +bulkhead's +bulkheaded +bulkheads +bulkier +bulkiness +bulks +bulky +bull +bulldog +bulldog's +bulldogs +bulldoze +bulldozed +bulldozer +bulldozers +bulldozes +bulldozing +bulled +bullet +bullet's +bulletin +bulletin's +bulletins +bulletproof +bulletproofed +bulletproofing +bulletproofs +bullets +bullied +bullies +bulling +bullion +bullish +bullishly +bullishness +bulls +bully +bullying +bulwark +bum +bum's +bumble +bumblebee +bumblebee's +bumblebees +bumbled +bumbler +bumblers +bumbles +bumbling +bumblingly +bummed +bummer +bummers +bumming +bump +bumped +bumper +bumpers +bumping +bumps +bumptious +bumptiously +bumptiousness +bums +bun +bun's +bunch +bunched +bunches +bunching +bundle +bundled +bundler +bundles +bundling +bungalow +bungalow's +bungalows +bungle +bungled +bungler +bunglers +bungles +bungling +bunglingly +bunion +bunion's +bunions +bunk +bunked +bunker +bunker's +bunkered +bunkering +bunkers +bunkhouse +bunkhouse's +bunkhouses +bunking +bunkmate +bunkmate's +bunkmates +bunks +bunnies +bunny +bunny's +buns +bunt +bunted +bunter +bunters +bunting +bunts +buoy +buoyancy +buoyant +buoyantly +buoyed +buoying +buoys +burden +burden's +burdened +burdening +burdens +burdensome +burdensomely +burdensomeness +bureau +bureau's +bureaucracies +bureaucracy +bureaucracy's +bureaucrat +bureaucrat's +bureaucratic +bureaucrats +bureaus +burgeon +burgeoned +burgeoning +burgeons +burger +burgess +burgess's +burgesses +burgher +burgher's +burghers +burglar +burglar's +burglaries +burglarproof +burglarproofed +burglarproofing +burglarproofs +burglars +burglary +burglary's +burgle +burgled +burgles +burgling +burial +buried +burier +buries +burl +burled +burler +burlesque +burlesqued +burlesquely +burlesquer +burlesques +burlesquing +burlier +burliness +burly +burn +burned +burner +burners +burning +burningly +burnings +burnish +burnished +burnisher +burnishes +burnishing +burns +burnt +burntly +burntness +burp +burped +burping +burps +burr +burr's +burred +burrer +burro +burro's +burros +burrow +burrowed +burrower +burrowing +burrows +burrs +bursa +bursas +bursitis +burst +bursted +burster +bursting +bursts +bury +burying +bus +busboy +busboy's +busboys +bused +buses +bush +bushed +bushel +bushel's +bushels +bushes +bushier +bushiness +bushing +bushings +bushwhack +bushwhacked +bushwhacker +bushwhacking +bushwhacks +bushy +busied +busier +busies +busiest +busily +business +business's +businesses +businesslike +businessman +businessmen +busing +buss +bussed +busses +bussing +bust +bustard +bustard's +bustards +busted +buster +busting +bustle +bustled +bustling +bustlingly +busts +busy +busying +but +butane +butcher +butcher's +butchered +butcherer +butchering +butcherly +butchers +butchery +butler +butler's +butlers +butt +butt's +butte +butted +butter +buttered +butterer +butterers +butterfat +butterflies +butterfly +butterfly's +buttering +butternut +butters +buttes +butting +buttock +buttock's +buttocks +button +buttoned +buttoner +buttonhole +buttonhole's +buttonholer +buttonholes +buttoning +buttons +buttress +buttressed +buttresses +buttressing +butts +butyl +butyrate +buxom +buxomly +buxomness +buy +buyer +buyer's +buyers +buying +buys +buzz +buzzard +buzzard's +buzzards +buzzed +buzzer +buzzes +buzzing +buzzword +buzzword's +buzzwords +buzzy +by +bye +byers +byes +bygone +bygones +bylaw +bylaw's +bylaws +byline +byline's +byliner +bylines +bypass +bypassed +bypasses +bypassing +byproduct +byproduct's +byproducts +bystander +bystander's +bystanders +byte +byte's +bytes +byway +byways +byword +byword's +bywords +cab +cab's +cabbage +cabbage's +cabbaged +cabbages +cabbaging +caber +cabin +cabin's +cabinet +cabinet's +cabinets +cabins +cable +cabled +cables +cabling +cabs +cache +cache's +cached +cacher +caches +caching +cackle +cackled +cackler +cackles +cackling +cacti +cactus +cactuses +cad +cadence +cadenced +cadences +cadencing +cafe +cafe's +cafes +cafeteria +cafeteria's +cafeterias +cage +caged +cager +cagers +cages +caging +cajole +cajoled +cajoler +cajoles +cajoling +cake +caked +cakes +caking +calamities +calamity +calamity's +calcium +calculate +calculated +calculatedly +calculatedness +calculates +calculating +calculation +calculations +calculative +calculator +calculator's +calculators +calculus +calendar +calendar's +calendared +calendaring +calendars +calf +calfs +calibrate +calibrated +calibrater +calibrates +calibrating +calibration +calibrations +calibrator +calibrators +calico +caliph +caliphs +call +callback +called +caller +caller's +callers +calling +callous +calloused +callously +callousness +calls +calm +calmed +calmer +calmest +calming +calmingly +calmly +calmness +calms +calorie +calorie's +calories +calves +came +camel +camel's +camels +camera +camera's +cameras +camion +camouflage +camouflaged +camouflages +camouflaging +camp +campaign +campaigned +campaigner +campaigners +campaigning +campaigns +camped +camper +campers +camping +camps +campus +campus's +campuses +can +can's +can't +canal +canal's +canals +canaries +canary +canary's +cancel +cancellation +cancellation's +cancellations +cancels +cancer +cancer's +cancers +candid +candidate +candidate's +candidates +candidly +candidness +candied +candies +candle +candled +candler +candles +candlestick +candlestick's +candlesticks +candling +candy +candying +cane +caned +caner +canes +caning +canker +cankered +cankering +canned +canner +canner's +canners +cannibal +cannibal's +cannibals +canning +cannister +cannister's +cannisters +cannon +cannon's +cannoned +cannoning +cannons +cannot +canoe +canoe's +canoed +canoes +canon +canon's +canonical +canonically +canonicals +canons +canopy +cans +cantankerous +cantankerously +cantankerousness +canto +canton +canton's +cantons +cantor +cantor's +cantors +cantos +canvas +canvas's +canvaser +canvases +canvass +canvassed +canvasser +canvassers +canvasses +canvassing +canyon +canyon's +canyons +cap +cap's +capabilities +capability +capability's +capable +capableness +capably +capacious +capaciously +capaciousness +capacitance +capacitances +capacities +capacitive +capacitively +capacitor +capacitor's +capacitors +capacity +cape +caper +capered +capering +capers +capes +capillary +capita +capital +capitalism +capitalist +capitalist's +capitalists +capitally +capitals +capitol +capitol's +capitols +capped +capping +capricious +capriciously +capriciousness +caps +captain +captained +captaining +captains +caption +caption's +captioned +captioner +captioning +captions +captivate +captivated +captivates +captivating +captivation +captive +captive's +captives +captivity +captor +captor's +captors +capture +captured +capturer +capturers +captures +capturing +car +car's +caravan +caravan's +caravaner +caravans +carbohydrate +carbohydrate's +carbohydrates +carbolic +carbon +carbon's +carbonate +carbonated +carbonates +carbonation +carbonic +carbons +carcass +carcass's +carcasses +card +card's +cardboard +cardboards +carded +carder +cardiac +cardinal +cardinalities +cardinality +cardinality's +cardinally +cardinals +carding +cards +care +cared +career +career's +careered +careering +careers +carefree +careful +carefully +carefulness +careless +carelessly +carelessness +carer +carers +cares +caress +caressed +caresser +caresses +caressing +caressingly +caressive +caressively +caret +carets +cargo +cargoes +cargos +caribou +caribous +caring +carnation +carnations +carnival +carnival's +carnivals +carnivorous +carnivorously +carnivorousness +carol +carol's +carols +carpenter +carpenter's +carpentered +carpentering +carpenters +carpet +carpeted +carpeting +carpets +carriage +carriage's +carriages +carried +carrier +carriers +carries +carrot +carrot's +carrots +carry +carrying +carryover +carryovers +cars +cart +carted +carter +carters +carting +cartography +carton +carton's +cartons +cartoon +cartoon's +cartoons +cartridge +cartridge's +cartridges +carts +carve +carved +carver +carvers +carves +carving +carvings +cascade +cascaded +cascades +cascading +case +cased +casement +casement's +casements +cases +cash +cashed +casher +cashers +cashes +cashier +cashier's +cashiers +cashing +casing +casings +cask +cask's +casket +casket's +caskets +casks +casserole +casserole's +casseroles +cast +cast's +caste +caste's +casted +caster +casters +castes +casteth +casting +castings +castle +castled +castles +castling +casts +casual +casually +casualness +casuals +casualties +casualty +casualty's +cat +cat's +catalyst +catalyst's +catalysts +cataract +cataracts +catastrophe +catastrophe's +catastrophes +catastrophic +catch +catchable +catcher +catcher's +catchers +catches +catching +categorical +categorically +categories +category +category's +cater +catered +caterer +catering +caterpillar +caterpillar's +caterpillars +caters +cathedral +cathedral's +cathedrals +catheter +catheters +cathode +cathode's +cathodes +catholic +catholic's +catholics +cats +catsup +cattle +caught +causal +causality +causally +causation +causation's +causations +cause +caused +causer +causes +causeway +causeway's +causeways +causing +caustic +causticly +caustics +caution +cautioned +cautioner +cautioners +cautioning +cautionings +cautions +cautious +cautiously +cautiousness +cavalier +cavalierly +cavalierness +cavalry +cave +caveat +caveat's +caveats +caved +caver +cavern +cavern's +caverns +caves +caving +cavities +cavity +cavity's +caw +cawed +cawing +caws +cease +ceased +ceaseless +ceaselessly +ceaselessness +ceases +ceasing +cedar +ceiling +ceiling's +ceilinged +ceilings +celebrate +celebrated +celebratedness +celebrates +celebrating +celebration +celebrations +celebratory +celebrities +celebrity +celebrity's +celery +celestial +celestially +celibate +celibates +cell +cellar +cellar's +cellared +cellarer +cellaring +cellars +celled +cellist +cellist's +cellists +cells +cellular +cellularly +cement +cemented +cementer +cementing +cements +cemeteries +cemetery +cemetery's +censor +censored +censoring +censors +censorship +censure +censured +censurer +censures +censuring +census +census's +censuses +cent +centipede +centipede's +centipedes +central +centrally +centrals +centrifuge +centrifuge's +centrifuged +centrifuges +centrifuging +centripetal +centripetally +cents +centuries +century +century's +cereal +cereal's +cereals +cerebral +cerebrally +ceremonial +ceremonially +ceremonialness +ceremonies +ceremony +ceremony's +certain +certainly +certainties +certainty +certifiable +certificate +certificated +certificates +certificating +certification +certifications +certified +certifier +certifiers +certifies +certify +certifying +cessation +cessation's +cessations +chafe +chafer +chaff +chaffer +chaffered +chafferer +chaffering +chaffing +chafing +chagrin +chagrined +chagrining +chagrins +chain +chained +chaining +chains +chair +chaired +chairing +chairman +chairmanship +chairmanships +chairmen +chairperson +chairperson's +chairpersons +chairs +chalice +chalice's +chaliced +chalices +chalk +chalked +chalking +chalks +challenge +challenged +challenger +challengers +challenges +challenging +challengingly +chamber +chambered +chamberer +chamberers +chambering +chamberlain +chamberlain's +chamberlains +chambers +champagne +champaign +champion +championed +championing +champions +championship +championship's +championships +chance +chanced +chancellor +chancellors +chances +chancing +chandelier +chandelier's +chandeliers +change +changeability +changeable +changeableness +changeably +changed +changeover +changeover's +changeovers +changer +changers +changes +changing +channel +channels +chant +chanted +chanter +chanticleer +chanticleer's +chanticleers +chanting +chants +chaos +chaotic +chap +chap's +chapel +chapel's +chapels +chaperon +chaperoned +chaplain +chaplain's +chaplains +chaps +chapter +chapter's +chaptered +chaptering +chapters +char +character +character's +charactered +charactering +characteristic +characteristic's +characteristically +characteristics +characters +charcoal +charcoaled +charcoals +charge +chargeable +chargeableness +charged +charger +chargers +charges +charging +charing +chariot +chariot's +chariots +charitable +charitableness +charities +charity +charity's +charm +charmed +charmer +charmers +charming +charmingly +charms +chars +chart +chartable +charted +charter +chartered +charterer +charterers +chartering +charters +charting +chartings +charts +chase +chased +chaser +chasers +chases +chasing +chasm +chasm's +chasms +chaste +chastely +chasteness +chaster +chastest +chastise +chastised +chastiser +chastisers +chastises +chastising +chat +chateau +chateau's +chateaus +chats +chatter +chattered +chatterer +chatterers +chattering +chatterly +chatters +chauffeur +chauffeured +chauffeuring +chauffeurs +chauvinism +chauvinism's +chauvinist +chauvinist's +chauvinistic +chauvinists +cheap +cheapen +cheapened +cheapening +cheapens +cheaper +cheapest +cheaply +cheapness +cheat +cheated +cheater +cheaters +cheating +cheats +check +checkable +checked +checker +checkered +checkering +checkers +checking +checkout +checkouts +checkpoint +checkpoint's +checkpoints +checks +checksum +checksum's +checksums +cheek +cheek's +cheeks +cheer +cheered +cheerer +cheerers +cheerful +cheerfully +cheerfulness +cheerier +cheerily +cheeriness +cheering +cheerless +cheerlessly +cheerlessness +cheerly +cheers +cheery +cheese +cheese's +cheesed +cheeses +cheesing +chef +chef's +chefs +chemical +chemically +chemicals +chemise +chemises +chemist +chemist's +chemistries +chemistry +chemists +cherish +cherished +cherisher +cherishes +cherishing +cherries +cherry +cherry's +cherub +cherub's +cherubim +cherubs +chess +chest +chester +chestnut +chestnut's +chestnuts +chests +chew +chewed +chewer +chewers +chewing +chews +chick +chickadee +chickadee's +chickadees +chicken +chickened +chickening +chickens +chicks +chide +chided +chides +chiding +chief +chief's +chiefly +chiefs +chieftain +chieftain's +chieftains +chiffon +child +child's +childhood +childhoods +childish +childishly +childishness +childly +children +children's +chill +chilled +chiller +chillers +chillier +chillies +chilliness +chilling +chillingly +chillness +chills +chilly +chime +chime's +chimed +chimer +chimes +chiming +chimney +chimney's +chimneyed +chimneys +chin +chin's +chink +chinked +chinks +chinned +chinner +chinners +chinning +chins +chintz +chip +chip's +chipmunk +chipmunk's +chipmunks +chips +chirp +chirped +chirping +chirps +chisel +chisels +chivalrous +chivalrously +chivalrousness +chivalry +chlorine +chloroplast +chloroplast's +chloroplasts +chock +chock's +chocked +chocker +chocking +chocks +chocolate +chocolate's +chocolates +choice +choicely +choiceness +choicer +choices +choicest +choir +choir's +choirs +choke +choked +choker +chokers +chokes +choking +chokingly +cholera +choose +chooser +choosers +chooses +choosing +chop +chopped +chopper +chopper's +choppers +chopping +chops +choral +chorally +chord +chord's +chorded +chording +chords +chore +chores +choring +chorion +chorus +chorused +choruses +chose +chosen +christen +christened +christening +christens +chronic +chronicle +chronicled +chronicler +chroniclers +chronicles +chronological +chronologically +chronologies +chronology +chronology's +chubbier +chubbiest +chubbiness +chubby +chuck +chuck's +chucked +chucking +chuckle +chuckled +chuckles +chuckling +chucklingly +chucks +chum +chump +chump's +chumping +chumps +chums +chunk +chunk's +chunks +church +churched +churches +churching +churchliness +churchly +churchman +churchyard +churchyard's +churchyards +churn +churned +churner +churners +churning +churns +chute +chute's +chuted +chutes +chuting +cider +ciders +cigar +cigar's +cigarette +cigarette's +cigarettes +cigars +cinder +cinder's +cinders +cinnamon +cipher +cipher's +ciphered +ciphering +ciphers +circle +circled +circler +circles +circling +circuit +circuit's +circuited +circuiting +circuitous +circuitously +circuitousness +circuitry +circuits +circular +circular's +circularities +circularity +circularly +circularness +circulars +circulate +circulated +circulates +circulating +circulation +circulations +circulative +circumference +circumferences +circumflex +circumflexes +circumlocution +circumlocution's +circumlocutions +circumspect +circumspectly +circumstance +circumstance's +circumstanced +circumstances +circumstancing +circumstantial +circumstantially +circumvent +circumventable +circumvented +circumventing +circumvents +circus +circus's +circuses +cistern +cistern's +cisterns +citadel +citadel's +citadels +citation +citation's +citations +cite +cited +cites +citied +cities +citing +citizen +citizen's +citizenly +citizens +citizenship +city +city's +civic +civics +civil +civilian +civilian's +civilians +civilities +civility +civilly +clad +clads +claim +claimable +claimant +claimant's +claimants +claimed +claimer +claiming +claims +clairvoyant +clairvoyantly +clairvoyants +clam +clam's +clamber +clambered +clamberer +clambering +clambers +clamorous +clamorously +clamorousness +clamp +clamped +clamper +clamping +clamps +clams +clan +clang +clanged +clanger +clangers +clanging +clangs +clans +clap +claps +clarification +clarifications +clarified +clarifier +clarifies +clarify +clarifying +clarity +clash +clashed +clasher +clashes +clashing +clasp +clasped +clasper +clasping +clasps +class +classed +classer +classes +classic +classical +classically +classics +classifiable +classification +classifications +classified +classifieds +classifier +classifiers +classifies +classify +classifying +classing +classmate +classmate's +classmates +classroom +classroom's +classrooms +classwork +clatter +clattered +clatterer +clattering +clatteringly +clatters +clause +clause's +clauses +claw +clawed +clawer +clawing +claws +clay +clay's +clayed +claying +clays +clean +cleaned +cleaner +cleaner's +cleaners +cleanest +cleaning +cleanlier +cleanliness +cleanly +cleanness +cleans +cleanse +cleansed +cleanser +cleansers +cleanses +cleansing +cleanup +cleanup's +cleanups +clear +clearance +clearance's +clearances +cleared +clearer +clearest +clearing +clearing's +clearings +clearly +clearness +clears +cleavage +cleavages +cleave +cleaved +cleaver +cleavers +cleaves +cleaving +cleft +cleft's +clefts +clench +clenched +clenches +clenching +clergy +clergyman +clerical +clerically +clericals +clerk +clerk's +clerked +clerking +clerkly +clerks +clever +cleverer +cleverest +cleverly +cleverness +cliche +cliche's +cliches +click +clicked +clicker +clickers +clicking +clicks +client +client's +clients +cliff +cliff's +cliffs +climate +climate's +climates +climatic +climatically +climax +climaxed +climaxes +climaxing +climb +climbed +climber +climbers +climbing +climbs +clime +clime's +climes +clinch +clinched +clincher +clinches +clinching +clinchingly +cling +clinging +clings +clinic +clinic's +clinical +clinically +clinics +clink +clinked +clinker +clinkered +clinkering +clinkers +clip +clip's +clipped +clipper +clipper's +clippers +clipping +clipping's +clippings +clips +clique +clique's +cliques +cloak +cloak's +cloaked +cloaking +cloaks +clobber +clobbered +clobbering +clobbers +clock +clocked +clocker +clockers +clocking +clockings +clocks +clockwise +clockwork +clod +clod's +clods +clog +clog's +clogged +clogging +clogs +cloister +cloister's +cloistered +cloistering +cloisters +clone +cloned +cloner +cloners +clones +cloning +close +closed +closely +closeness +closenesses +closer +closers +closes +closest +closet +closeted +closets +closing +closings +closure +closure's +closured +closures +closuring +cloth +clothe +clothed +clothes +clothing +cloud +clouded +cloudier +cloudiest +cloudiness +clouding +cloudless +cloudlessly +cloudlessness +clouds +cloudy +clout +clove +clover +cloves +clown +clowning +clowns +club +club's +clubbed +clubbing +clubs +cluck +clucked +clucking +clucks +clue +clue's +clues +cluing +clump +clumped +clumping +clumps +clumsier +clumsiest +clumsily +clumsiness +clumsy +clung +cluster +clustered +clustering +clusterings +clusters +clutch +clutched +clutches +clutching +clutter +cluttered +cluttering +clutters +coach +coach's +coached +coacher +coaches +coaching +coachman +coagulate +coagulated +coagulates +coagulating +coagulation +coal +coaled +coaler +coalesce +coalesced +coalesces +coalescing +coaling +coalition +coals +coarse +coarsely +coarsen +coarsened +coarseness +coarsening +coarser +coarsest +coast +coastal +coasted +coaster +coasters +coasting +coasts +coat +coated +coater +coaters +coating +coatings +coats +coax +coaxed +coaxer +coaxes +coaxial +coaxially +coaxing +cobbler +cobbler's +cobblers +cobweb +cobweb's +cobwebs +cock +cocked +cocker +cocking +cockroach +cockroaches +cocks +cocktail +cocktail's +cocktails +cocoa +coconut +coconut's +coconuts +cocoon +cocoon's +cocoons +cod +code +coded +coder +coder's +coders +codes +codeword +codeword's +codewords +codification +codification's +codifications +codified +codifier +codifier's +codifiers +codifies +codify +codifying +coding +codings +cods +coefficient +coefficient's +coefficiently +coefficients +coerce +coerced +coerces +coercing +coercion +coercions +coercive +coercively +coerciveness +coexist +coexisted +coexistence +coexisting +coexists +coffee +coffee's +coffees +coffer +coffer's +coffers +coffin +coffin's +coffins +cogent +cogently +cogitate +cogitated +cogitates +cogitating +cogitation +cogitative +cognition +cognitions +cognitive +cognitively +cognitives +cohabit +cohabitation +cohabitations +cohabited +cohabiting +cohabits +cohere +cohered +coherence +coherent +coherently +coherer +coheres +cohering +cohesion +cohesive +cohesively +cohesiveness +coil +coiled +coiling +coils +coin +coinage +coincide +coincided +coincidence +coincidence's +coincidences +coincidental +coincidentally +coincides +coinciding +coined +coiner +coining +coins +coke +cokes +coking +cold +colder +coldest +coldly +coldness +colds +collaborate +collaborated +collaborates +collaborating +collaboration +collaborations +collaborative +collaboratively +collaborator +collaborator's +collaborators +collapse +collapsed +collapses +collapsing +collar +collared +collaring +collars +collate +collated +collateral +collaterally +collates +collating +collation +collations +collative +collator +collators +colleague +colleague's +colleagues +collect +collected +collectedly +collectedness +collectible +collecting +collection +collection's +collections +collective +collectively +collectives +collector +collector's +collectors +collects +college +college's +colleges +collegiate +collegiately +collide +collided +collides +colliding +collie +collied +collier +collies +collision +collision's +collisions +cologne +cologned +colon +colon's +colonel +colonel's +colonels +colonial +colonially +colonialness +colonials +colonies +colonist +colonist's +colonists +colons +colony +colony's +colossal +colossally +colt +colt's +colter +colts +column +column's +columnar +columned +columns +comb +combat +combatant +combatant's +combatants +combated +combating +combative +combatively +combativeness +combats +combed +comber +combers +combination +combination's +combinational +combinations +combinator +combinator's +combinatorial +combinatorially +combinatoric +combinatorics +combinators +combine +combined +combiner +combiners +combines +combing +combings +combining +combo +combs +combustion +combustions +come +comedian +comedian's +comedians +comedic +comedies +comedy +comedy's +comelier +comeliness +comely +comer +comers +comes +comest +comestible +comestibles +comet +comet's +cometh +comets +comfort +comfortabilities +comfortability +comfortable +comfortableness +comfortably +comforted +comforter +comforters +comforting +comfortingly +comforts +comic +comic's +comical +comically +comics +coming +comings +comma +comma's +command +command's +commandant +commandant's +commandants +commanded +commandeer +commandeered +commandeering +commandeers +commander +commanders +commanding +commandingly +commandment +commandment's +commandments +commands +commas +commemorate +commemorated +commemorates +commemorating +commemoration +commemorations +commemorative +commemoratively +commemoratives +commence +commenced +commencement +commencement's +commencements +commencer +commences +commencing +commend +commendation +commendation's +commendations +commended +commender +commending +commends +commensurate +commensurately +commensurates +commensuration +commensurations +comment +comment's +commentaries +commentary +commentary's +commentator +commentator's +commentators +commented +commenter +commenting +comments +commerce +commerced +commercial +commercially +commercialness +commercials +commercing +commission +commissioned +commissioner +commissioners +commissioning +commissions +commit +commitment +commitment's +commitments +commits +committed +committee +committee's +committees +committing +commodities +commodity +commodity's +commodore +commodore's +commodores +common +commonalities +commonality +commoner +commoner's +commoners +commonest +commonly +commonness +commonplace +commonplaceness +commonplaces +commons +commonwealth +commonwealths +commotion +commotions +communal +communally +commune +communed +communes +communicant +communicant's +communicants +communicate +communicated +communicates +communicating +communication +communications +communicative +communicatively +communicativeness +communicator +communicator's +communicators +communing +communion +communist +communist's +communists +communities +community +community's +commutative +commutatively +commutativity +commute +commuted +commuter +commuters +commutes +commuting +compact +compaction +compacted +compacter +compacters +compactest +compacting +compactly +compactness +compactor +compactor's +compactors +compacts +companies +companion +companion's +companionable +companionableness +companions +companionship +company +company's +comparability +comparable +comparableness +comparably +comparative +comparatively +comparativeness +comparatives +comparator +comparator's +comparators +compare +compared +comparer +compares +comparing +comparison +comparison's +comparisons +compartment +compartmented +compartmenting +compartments +compass +compassed +compasses +compassing +compassion +compassionate +compassionately +compassionateness +compatibilities +compatibility +compatibility's +compatible +compatibleness +compatibles +compatibly +compel +compelled +compelling +compellingly +compels +compendium +compensate +compensated +compensates +compensating +compensation +compensations +compensative +compensatory +compete +competed +competence +competences +competent +competently +competes +competing +competition +competition's +competitions +competitive +competitively +competitiveness +competitor +competitor's +competitors +compilable +compilation +compilation's +compilations +compile +compiled +compiler +compiler's +compilers +compiles +compiling +complain +complained +complainer +complainers +complaining +complainingly +complains +complaint +complaint's +complaints +complement +complementariness +complementary +complemented +complementer +complementers +complementing +complements +complete +completed +completely +completeness +completer +completes +completing +completion +completions +completive +complex +complexes +complexion +complexioned +complexities +complexity +complexly +complexness +compliance +compliances +complicate +complicated +complicatedly +complicatedness +complicates +complicating +complication +complications +complicator +complicator's +complicators +complicity +complied +complier +compliers +complies +compliment +complimentary +complimented +complimenter +complimenters +complimenting +compliments +comply +complying +component +component's +components +compose +composed +composedly +composedness +composer +composer's +composers +composes +composing +composite +compositely +composites +composition +compositional +compositionally +compositions +composure +compound +compounded +compounder +compounding +compounds +comprehend +comprehended +comprehending +comprehends +comprehensibility +comprehensible +comprehensibleness +comprehension +comprehensive +comprehensively +comprehensiveness +compress +compressed +compressedly +compresses +compressible +compressing +compression +compressions +compressive +compressively +compressor +comprise +comprised +comprises +comprising +compromise +compromised +compromiser +compromisers +compromises +compromising +compromisingly +comptroller +comptroller's +comptrollers +compulsion +compulsion's +compulsions +compulsory +compunction +compunctions +computability +computable +computation +computation's +computational +computationally +computations +compute +computed +computer +computer's +computerese +computers +computes +computing +comrade +comradeliness +comradely +comrades +comradeship +concatenate +concatenated +concatenates +concatenating +concatenation +concatenations +conceal +concealed +concealer +concealers +concealing +concealingly +concealment +conceals +concede +conceded +concededly +conceder +concedes +conceding +conceit +conceited +conceitedly +conceitedness +conceits +conceivable +conceivably +conceive +conceived +conceiver +conceives +conceiving +concentrate +concentrated +concentrates +concentrating +concentration +concentrations +concentrative +concentrator +concentrators +concentric +concept +concept's +conception +conception's +conceptions +conceptive +concepts +conceptual +conceptually +concern +concerned +concernedly +concerning +concerns +concert +concerted +concertedly +concertedness +concerts +concession +concession's +concessioner +concessions +concise +concisely +conciseness +concision +concisions +conclude +concluded +concluder +concludes +concluding +conclusion +conclusion's +conclusions +conclusive +conclusively +conclusiveness +concomitant +concomitantly +concomitants +concord +concrete +concreted +concretely +concreteness +concretes +concreting +concretion +concur +concurred +concurrence +concurrencies +concurrency +concurrent +concurrently +concurring +concurs +condemn +condemnation +condemnations +condemned +condemner +condemners +condemning +condemns +condensation +condense +condensed +condenser +condensers +condenses +condensing +condescend +condescending +condescendingly +condescends +condition +conditional +conditionally +conditionals +conditioned +conditioner +conditioners +conditioning +conditions +condone +condoned +condoner +condones +condoning +conducive +conduciveness +conduct +conducted +conducting +conduction +conductive +conductively +conductivities +conductivity +conductor +conductor's +conductors +conducts +conduit +conduits +cone +cone's +coned +cones +confederacy +confederate +confederates +confederation +confederations +confederative +confer +conference +conference's +conferences +conferencing +conferred +conferrer +conferrer's +conferrers +conferring +confers +confess +confessed +confessedly +confesses +confessing +confession +confession's +confessions +confessor +confessor's +confessors +confidant +confidant's +confidants +confide +confided +confidence +confidences +confident +confidential +confidentiality +confidentially +confidentialness +confidently +confider +confides +confiding +confidingly +confidingness +configurable +configuration +configuration's +configurations +configure +configured +configures +configuring +confine +confined +confinement +confinement's +confinements +confiner +confines +confining +confirm +confirmation +confirmation's +confirmations +confirmed +confirmedly +confirmedness +confirming +confirms +confiscate +confiscated +confiscates +confiscating +confiscation +confiscations +conflict +conflicted +conflicting +conflictingly +conflictive +conflicts +conform +conformed +conformer +conformers +conforming +conformity +conforms +confound +confounded +confoundedly +confounder +confounding +confounds +confront +confrontation +confrontation's +confrontations +confronted +confronter +confronters +confronting +confronts +confuse +confused +confusedly +confusedness +confuser +confusers +confuses +confusing +confusingly +confusion +confusions +congenial +congenially +congested +congestion +congratulate +congratulated +congratulates +congratulation +congratulations +congregate +congregated +congregates +congregating +congregation +congregations +congress +congress's +congressed +congresses +congressing +congressional +congressionally +congressman +congruence +congruent +congruently +coning +conjecture +conjectured +conjecturer +conjectures +conjecturing +conjoined +conjunct +conjuncted +conjunction +conjunction's +conjunctions +conjunctive +conjunctively +conjuncts +conjure +conjured +conjurer +conjurers +conjures +conjuring +connect +connected +connectedly +connectedness +connecter +connecters +connecting +connection +connection's +connections +connective +connective's +connectively +connectives +connectivities +connectivity +connector +connector's +connectors +connects +connoisseur +connoisseur's +connoisseurs +connote +connoted +connotes +connoting +conquer +conquerable +conquered +conquerer +conquerers +conquering +conqueror +conqueror's +conquerors +conquers +conquest +conquest's +conquests +cons +conscience +conscience's +consciences +conscientious +conscientiously +conscientiousness +conscious +consciouses +consciously +consciousness +consecrate +consecrated +consecrates +consecrating +consecration +consecrations +consecrative +consecutive +consecutively +consecutiveness +consensus +consent +consented +consenter +consenters +consenting +consentingly +consents +consequence +consequence's +consequences +consequent +consequential +consequentialities +consequentiality +consequentially +consequentialness +consequently +consequentness +consequents +conservation +conservation's +conservationist +conservationist's +conservationists +conservations +conservatism +conservative +conservatively +conservativeness +conservatives +conserve +conserved +conserver +conserves +conserving +consider +considerable +considerably +considerate +considerately +considerateness +consideration +considerations +considered +considerer +considering +considers +consign +consigned +consigning +consigns +consist +consisted +consistencies +consistency +consistent +consistently +consisting +consists +consolable +consolation +consolation's +consolations +console +consoled +consoler +consolers +consoles +consolidate +consolidated +consolidates +consolidating +consolidation +consolidations +consoling +consolingly +consonant +consonant's +consonantly +consonants +consort +consorted +consorting +consortium +consorts +conspicuous +conspicuously +conspicuousness +conspiracies +conspiracy +conspiracy's +conspirator +conspirator's +conspirators +conspire +conspired +conspires +conspiring +constable +constable's +constables +constancy +constant +constantly +constants +constellation +constellation's +constellations +consternation +constituencies +constituency +constituency's +constituent +constituent's +constituently +constituents +constitute +constituted +constitutes +constituting +constitution +constitutional +constitutionality +constitutionally +constitutions +constitutive +constitutively +constrain +constrained +constrainedly +constraining +constrains +constraint +constraint's +constraints +construct +constructed +constructibility +constructible +constructing +construction +construction's +constructions +constructive +constructively +constructiveness +constructor +constructor's +constructors +constructs +construe +construed +construes +construing +consul +consul's +consulate +consulate's +consulates +consuls +consult +consultant +consultant's +consultants +consultation +consultation's +consultations +consultative +consulted +consulter +consulting +consultive +consults +consumable +consumables +consume +consumed +consumedly +consumer +consumer's +consumers +consumes +consuming +consumingly +consummate +consummated +consummately +consummates +consummating +consummation +consummations +consummative +consumption +consumption's +consumptions +consumptive +consumptively +contact +contacted +contacting +contacts +contagion +contagious +contagiously +contagiousness +contain +containable +contained +container +containers +containing +containment +containment's +containments +contains +contaminate +contaminated +contaminates +contaminating +contamination +contaminations +contaminative +contemplate +contemplated +contemplates +contemplating +contemplation +contemplations +contemplative +contemplatively +contemplativeness +contemporaneous +contemporaneously +contemporaneousness +contemporaries +contemporariness +contemporary +contempt +contemptible +contemptibleness +contemptuous +contemptuously +contemptuousness +contend +contended +contender +contenders +contending +contends +content +contented +contentedly +contentedness +contenting +contention +contention's +contentions +contently +contentment +contents +contest +contestable +contested +contester +contesters +contesting +contests +context +context's +contexts +contextual +contextually +contiguity +contiguous +contiguously +contiguousness +continent +continent's +continental +continentally +continently +continents +contingencies +contingency +contingency's +contingent +contingent's +contingently +contingents +continual +continually +continuance +continuance's +continuances +continuation +continuation's +continuations +continue +continued +continuer +continues +continuing +continuities +continuity +continuous +continuously +continuousness +continuum +contour +contour's +contoured +contouring +contours +contract +contracted +contracting +contraction +contraction's +contractions +contractive +contractor +contractor's +contractors +contracts +contractual +contractually +contradict +contradicted +contradicting +contradiction +contradiction's +contradictions +contradictoriness +contradictory +contradicts +contradistinction +contradistinctions +contrapositive +contrapositives +contraption +contraption's +contraptions +contrariness +contrary +contrast +contrasted +contraster +contrasters +contrasting +contrastingly +contrastive +contrastively +contrasts +contribute +contributed +contributer +contributers +contributes +contributing +contribution +contributions +contributive +contributively +contributor +contributor's +contributorily +contributors +contributory +contrivance +contrivance's +contrivances +contrive +contrived +contriver +contrives +contriving +control +control's +controllability +controllable +controllably +controlled +controller +controller's +controllers +controlling +controls +controversial +controversially +controversies +controversy +controversy's +conundrum +conundrum's +conundrums +convalescence +convene +convened +convener +conveners +convenes +convenience +convenience's +conveniences +convenient +conveniently +convening +convent +convent's +convention +convention's +conventional +conventionally +conventions +convents +converge +converged +convergence +convergences +convergent +converges +converging +conversant +conversantly +conversation +conversation's +conversational +conversationally +conversations +converse +conversed +conversely +converses +conversing +conversion +conversioning +conversions +convert +converted +converter +converters +convertibility +convertible +convertibleness +converting +converts +convex +convey +conveyance +conveyance's +conveyanced +conveyancer +conveyancers +conveyances +conveyancing +conveyed +conveyer +conveyers +conveying +conveys +convict +convicted +convicting +conviction +conviction's +convictions +convictive +convicts +convince +convinced +convincer +convincers +convinces +convincing +convincingly +convincingness +convoluted +convoy +convoyed +convoying +convoys +convulsion +convulsion's +convulsions +coo +cooing +cook +cook's +cooked +cooker +cookers +cookery +cookie +cookie's +cookies +cooking +cooks +cooky +cool +cooled +cooler +cooler's +coolers +coolest +coolie +coolie's +coolies +cooling +coolings +coolly +coolness +coolnesses +cools +coon +coon's +coons +coop +cooped +cooper +cooperate +cooperated +cooperates +cooperating +cooperation +cooperations +cooperative +cooperatively +cooperativeness +cooperatives +cooperator +cooperator's +cooperators +coopered +coopering +coopers +coops +coordinate +coordinated +coordinately +coordinateness +coordinates +coordinating +coordination +coordinations +coordinative +coordinator +coordinator's +coordinators +cop +cop's +cope +coped +coper +copes +copied +copier +copiers +copies +coping +copings +copious +copiously +copiousness +copper +copper's +coppered +coppering +coppers +cops +copse +copses +copy +copying +copyright +copyright's +copyrighted +copyrighter +copyrighters +copyrighting +copyrights +coral +cord +corded +corder +cordial +cordially +cordialness +cording +cords +core +cored +corer +corers +cores +coring +cork +corked +corker +corkers +corking +corks +cormorant +cormorants +corn +corned +corner +cornered +cornering +corners +cornerstone +cornerstone's +cornerstones +cornfield +cornfield's +cornfields +corning +corns +corollaries +corollary +corollary's +coronaries +coronary +coronation +coronet +coronet's +coroneted +coronets +coroutine +coroutine's +coroutines +corporal +corporal's +corporally +corporals +corporate +corporately +corporation +corporation's +corporations +corporative +corps +corpse +corpse's +corpses +corpus +correct +correctable +corrected +correcting +correction +corrections +corrective +correctively +correctiveness +correctives +correctly +correctness +corrector +corrects +correlate +correlated +correlates +correlating +correlation +correlations +correlative +correlatively +correspond +corresponded +correspondence +correspondence's +correspondences +correspondent +correspondent's +correspondents +corresponding +correspondingly +corresponds +corridor +corridor's +corridors +corroborate +corroborated +corroborates +corroborating +corroboration +corroborations +corroborative +corroboratively +corrosion +corrosions +corrupt +corrupted +corrupter +corrupting +corruption +corruptive +corruptively +corruptly +corrupts +corset +corsets +cosine +cosines +cosmetic +cosmetics +cosmology +cosmopolitan +cost +costed +costing +costive +costively +costiveness +costlier +costliness +costly +costs +costume +costumed +costumer +costumers +costumes +costuming +cot +cot's +cots +cottage +cottager +cottagers +cottages +cotton +cottoned +cottoning +cottons +cotyledon +cotyledon's +cotyledons +couch +couched +couches +couching +cough +coughed +cougher +coughing +coughs +could +couldest +couldn't +council +council's +councillor +councillor's +councillors +councils +counsel +counsel's +counsels +count +countable +countably +counted +countenance +countenancer +counter +counteract +counteracted +counteracting +counteractive +counteracts +counterclockwise +countered +counterexample +counterexamples +counterfeit +counterfeited +counterfeiter +counterfeiting +counterfeits +countering +countermeasure +countermeasure's +countermeasures +counterpart +counterpart's +counterparts +counterpoint +counterpointing +counterproductive +counterrevolution +counters +countess +counties +counting +countless +countlessly +countries +country +country's +countryman +countryside +counts +county +county's +couple +couple's +coupled +coupler +couplers +couples +coupling +couplings +coupon +coupon's +coupons +courage +courageous +courageously +courageousness +courier +courier's +couriers +course +coursed +courser +courses +coursing +court +courted +courteous +courteously +courteousness +courter +courters +courtesies +courtesy +courtesy's +courthouse +courthouse's +courthouses +courtier +courtier's +courtiers +courting +courtliness +courtly +courtroom +courtroom's +courtrooms +courts +courtship +courtyard +courtyard's +courtyards +cousin +cousin's +cousins +cove +covenant +covenant's +covenanted +covenanter +covenanting +covenants +cover +coverable +coverage +covered +coverer +covering +coverings +coverlet +coverlet's +coverlets +covers +covert +covertly +covertness +coves +covet +coveted +coveter +coveting +covetingly +covetous +covetously +covetousness +covets +coving +cow +coward +cowardice +cowardliness +cowardly +cowards +cowboy +cowboy's +cowboys +cowed +cowedly +cower +cowered +cowerer +cowerers +cowering +coweringly +cowers +cowgirl +cowgirl's +cowgirls +cowing +cowl +cowled +cowling +cowls +cows +cowslip +cowslip's +cowslips +coyote +coyote's +coyotes +cozier +cozies +coziness +cozy +crab +crab's +crabs +crack +cracked +cracker +crackers +cracking +crackle +crackled +crackles +crackling +crackly +cracks +cradle +cradled +cradler +cradles +cradling +craft +crafted +crafter +craftier +craftiness +crafting +crafts +craftsman +crafty +crag +crag's +crags +cram +cramp +cramp's +cramped +cramper +cramps +crams +cranberries +cranberry +cranberry's +crane +crane's +craned +cranes +craning +crank +cranked +crankier +crankiest +crankily +crankiness +cranking +cranks +cranky +crap +craping +craps +crash +crashed +crasher +crashers +crashes +crashing +crate +crater +cratered +craters +crates +crating +cravat +cravat's +cravats +crave +craved +craven +cravenly +cravenness +craver +craves +craving +crawl +crawled +crawler +crawlers +crawling +crawls +craze +crazed +crazes +crazier +craziest +crazily +craziness +crazing +crazy +creak +creaked +creaking +creaks +cream +creamed +creamer +creamers +creaminess +creaming +creams +creamy +crease +creased +creaser +creases +creasing +create +created +creates +creating +creation +creations +creative +creatively +creativeness +creativity +creator +creator's +creators +creature +creature's +creatureliness +creaturely +creatures +credence +credibility +credible +credibly +credit +creditable +creditableness +creditably +credited +crediting +creditor +creditor's +creditors +credits +credulity +credulous +credulously +credulousness +creed +creed's +creeds +creek +creek's +creeks +creep +creeper +creepers +creeping +creeps +cremate +cremated +cremates +cremating +cremation +cremations +crepe +crept +crescent +crescent's +crescents +crest +crested +cresting +crests +cretin +cretins +crevice +crevice's +crevices +crew +crewed +crewing +crews +crib +crib's +cribs +cricket +cricket's +cricketer +cricketing +crickets +cried +crier +criers +cries +crime +crime's +crimes +criminal +criminally +criminals +crimson +crimsoning +cringe +cringed +cringer +cringes +cringing +cripple +crippled +crippler +cripples +crippling +crises +crisis +crisp +crisper +crisply +crispness +crisps +criteria +criterion +critic +critic's +critical +critically +criticalness +criticism +criticism's +criticisms +critics +critique +critiqued +critiques +critiquing +critter +critter's +critters +croak +croaked +croaker +croakers +croaking +croaks +crochet +crocheted +crocheter +crocheting +crochets +crook +crooked +crookedly +crookedness +crooks +crop +crop's +cropped +cropper +cropper's +croppers +cropping +crops +cross +crossable +crossbar +crossbar's +crossbars +crossed +crosser +crossers +crosses +crossing +crossings +crossly +crossover +crossover's +crossovers +crossword +crossword's +crosswords +crouch +crouched +crouches +crouching +crow +crowd +crowded +crowdedness +crowder +crowding +crowds +crowed +crowing +crown +crowned +crowner +crowning +crowns +crows +crucial +crucially +crucification +crucified +crucifies +crucify +crucifying +crude +crudely +crudeness +cruder +crudest +cruel +crueler +cruelest +cruelly +cruelness +cruelty +cruise +cruised +cruiser +cruisers +cruises +cruising +crumb +crumble +crumbled +crumbles +crumblier +crumbliness +crumbling +crumblings +crumbly +crumbs +crumple +crumpled +crumples +crumpling +crunch +crunched +cruncher +crunchers +crunches +crunchier +crunchiest +crunchiness +crunching +crunchy +crusade +crusaded +crusader +crusaders +crusades +crusading +crush +crushable +crushed +crusher +crushers +crushes +crushing +crushingly +crust +crust's +crustacean +crustacean's +crustaceans +crusted +crusting +crusts +crutch +crutch's +crutched +crutches +crux +crux's +cruxes +cry +crying +cryptanalysis +cryptic +cryptographic +cryptography +cryptology +crystal +crystal's +crystalline +crystals +cub +cub's +cube +cubed +cuber +cubes +cubic +cubicly +cubics +cubing +cubs +cuckoo +cuckoo's +cuckoos +cucumber +cucumber's +cucumbers +cuddle +cuddled +cuddles +cuddling +cudgel +cudgel's +cudgels +cue +cued +cues +cuff +cuff's +cuffed +cuffing +cuffs +cuing +cull +culled +culler +culling +culls +culminate +culminated +culminates +culminating +culmination +culpability +culprit +culprit's +culprits +cult +cult's +cultivate +cultivated +cultivates +cultivating +cultivation +cultivations +cultivator +cultivator's +cultivators +cults +cultural +culturally +culture +cultured +cultures +culturing +cumbersome +cumbersomely +cumbersomeness +cumulative +cumulatively +cunning +cunningly +cunningness +cup +cup's +cupboard +cupboard's +cupboards +cupful +cupfuls +cupped +cupping +cups +cur +curable +curableness +curably +curb +curbed +curbing +curbs +curds +cure +cured +curer +cures +curfew +curfew's +curfews +curing +curiosities +curiosity +curiosity's +curious +curiouser +curiousest +curiously +curiousness +curl +curled +curler +curlers +curlier +curliness +curling +curls +curly +currant +currant's +currants +currencies +currency +currency's +current +currently +currentness +currents +curricular +curriculum +curriculum's +curriculums +curried +currier +curries +curry +currying +curs +curse +cursed +cursedly +cursedness +curses +cursing +cursive +cursively +cursiveness +cursor +cursor's +cursorily +cursoriness +cursors +cursory +curt +curtail +curtailed +curtailer +curtailing +curtails +curtain +curtained +curtaining +curtains +curtly +curtness +curtsied +curtsies +curtsy +curtsy's +curtsying +curvature +curvatures +curve +curved +curves +curving +cushion +cushioned +cushioning +cushions +cusp +cusp's +cusps +cuss +cussed +cussedly +cussedness +cusser +cusses +custard +custodian +custodian's +custodians +custodies +custody +custom +customarily +customariness +customary +customer +customer's +customers +customs +cut +cut's +cute +cutely +cuteness +cuter +cutes +cutest +cutoff +cutoffs +cuts +cutter +cutter's +cutters +cutting +cuttingly +cuttings +cybernetic +cybernetics +cycle +cycled +cycler +cycles +cyclic +cyclically +cyclicly +cycling +cycloid +cycloid's +cycloidal +cycloids +cyclone +cyclone's +cyclones +cylinder +cylinder's +cylindered +cylindering +cylinders +cylindrical +cylindrically +cymbal +cymbal's +cymbals +cynical +cynically +cypress +cyst +cysts +cytology +czar +dabble +dabbled +dabbler +dabblers +dabbles +dabbling +dad +dad's +daddies +daddy +dads +daemon +daemon's +daemons +daffodil +daffodil's +daffodils +dagger +daggers +dailies +daily +daintier +dainties +daintily +daintiness +dainty +dairies +dairy +dairying +daisies +daisy +daisy's +dale +dale's +dales +daleth +dam +dam's +damage +damaged +damager +damagers +damages +damaging +damagingly +damask +dame +damed +damn +damnation +damned +damneder +damnedest +damning +damningly +damns +damp +damped +dampen +dampened +dampener +dampening +dampens +damper +dampers +damping +damply +dampness +damps +dams +damsel +damsel's +damsels +dance +danced +dancer +dancers +dances +dancing +dandelion +dandelion's +dandelions +dandier +dandies +dandy +danger +danger's +dangerous +dangerously +dangerousness +dangers +dangle +dangled +dangler +dangler's +danglers +dangles +dangling +danglingly +dare +dared +darer +darers +dares +daring +daringly +daringness +dark +darken +darkened +darkener +darkeners +darkening +darker +darkest +darkly +darkness +darks +darling +darling's +darlingly +darlingness +darlings +darn +darned +darner +darning +darns +dart +darted +darter +darting +darts +dash +dashed +dasher +dashers +dashes +dashing +dashingly +data +database +database's +databases +date +dated +datedly +datedness +dater +dates +dating +dative +datum +datums +daughter +daughter's +daughterly +daughters +daunt +daunted +daunting +dauntless +dauntlessly +dauntlessness +daunts +dawn +dawned +dawning +dawns +day +day's +daybreak +daybreaks +daydream +daydreamed +daydreamer +daydreamers +daydreaming +daydreams +daylight +daylight's +daylights +days +daytime +daytimes +daze +dazed +dazedness +dazes +dazing +dazzle +dazzled +dazzler +dazzlers +dazzles +dazzling +dazzlingly +deacon +deacon's +deacons +deactivate +deactivates +deactivated +deactivating +dead +deaden +deadened +deadener +deadening +deadeningly +deadens +deadlier +deadliest +deadline +deadline's +deadlines +deadliness +deadlock +deadlocked +deadlocking +deadlocks +deadly +deadness +deaf +deafen +deafened +deafening +deafeningly +deafens +deafer +deafest +deafly +deafness +deal +dealer +dealers +dealing +dealings +deallocate +deallocated +deallocates +deallocating +deallocation +deallocation's +deallocations +deallocator +deals +dealt +dean +dean's +deans +dear +dearer +dearest +dearly +dearness +dears +dearth +dearths +death +deathly +deaths +debatable +debate +debated +debater +debaters +debates +debating +debilitate +debilitated +debilitates +debilitating +debilitation +debris +debt +debt's +debtor +debtors +debts +debug +debugged +debugger +debugger's +debuggers +debugging +debugs +decade +decade's +decadence +decadent +decadently +decades +decay +decayed +decayer +decaying +decays +decease +deceased +deceases +deceasing +deceit +deceitful +deceitfully +deceitfulness +deceive +deceived +deceiver +deceivers +deceives +deceiving +deceivingly +decelerate +decelerated +decelerates +decelerating +deceleration +decelerations +decencies +decency +decency's +decent +decently +deception +deception's +deceptions +deceptive +deceptively +deceptiveness +decidability +decidable +decide +decided +decidedly +decidedness +decider +decides +deciding +decimal +decimally +decimals +decimate +decimated +decimates +decimating +decimation +decipher +deciphered +decipherer +decipherers +deciphering +deciphers +decision +decision's +decisions +decisive +decisively +decisiveness +deck +decked +decker +decking +deckings +decks +declaration +declaration's +declarations +declarative +declaratively +declaratives +declare +declared +declarer +declarers +declares +declaring +declination +declination's +declinations +decline +declined +decliner +decliners +declines +declining +decode +decoded +decoder +decoders +decodes +decoding +decodings +decompile +decompiled +decompiler +decompilers +decompiles +decompiling +decomposability +decomposable +decompose +decomposed +decomposer +decomposes +decomposing +decomposition +decomposition's +decompositions +decompression +decorate +decorated +decorates +decorating +decoration +decorations +decorative +decoratively +decorativeness +decorator +decorators +decorum +decorums +decouple +decoupled +decoupler +decouples +decoupling +decoy +decoy's +decoys +decrease +decreased +decreases +decreasing +decreasingly +decree +decreed +decreeing +decreer +decrees +decrement +decremented +decrementing +decrements +dedicate +dedicated +dedicatedly +dedicates +dedicating +dedication +dedications +dedicative +deduce +deduced +deducer +deduces +deducible +deducing +deduct +deducted +deducting +deduction +deduction's +deductions +deductive +deductively +deducts +deed +deeded +deeding +deeds +deem +deemed +deeming +deems +deep +deepen +deepened +deepening +deepens +deeper +deepest +deeply +deepness +deeps +deer +deers +default +defaulted +defaulter +defaulting +defaults +defeat +defeated +defeating +defeatism +defeatist +defeatists +defeats +defect +defected +defecting +defection +defection's +defections +defective +defectively +defectiveness +defectives +defects +defend +defendant +defendant's +defendants +defended +defender +defenders +defending +defends +defenestrate +defenestrated +defenestrates +defenestrating +defenestration +defenestrations +defensive +defensively +defensiveness +defer +deference +deferment +deferment's +deferments +deferrable +deferred +deferrer +deferrer's +deferrers +deferring +defers +defiance +defiances +defiant +defiantly +deficiencies +deficiency +deficient +deficiently +deficit +deficit's +deficits +defied +defier +defies +defile +defiled +defiler +defiles +defiling +definable +define +defined +definer +definers +defines +defining +definite +definitely +definiteness +definition +definition's +definitional +definitions +definitive +definitively +definitiveness +deformation +deformation's +deformations +deformed +deformities +deformity +deformity's +deftly +defy +defying +defyingly +degenerate +degenerated +degenerately +degenerateness +degenerates +degenerating +degeneration +degenerative +degradable +degradation +degradation's +degradations +degrade +degraded +degradedly +degradedness +degrader +degrades +degrading +degradingly +degree +degree's +degreed +degrees +deign +deigned +deigning +deigns +deities +deity +deity's +dejected +dejectedly +dejectedness +delay +delayed +delayer +delayers +delaying +delays +delegate +delegated +delegates +delegating +delegation +delegations +delete +deleted +deleter +deletes +deleting +deletion +deletions +deliberate +deliberated +deliberately +deliberateness +deliberates +deliberating +deliberation +deliberations +deliberative +deliberatively +deliberativeness +deliberator +deliberator's +deliberators +delicacies +delicacy +delicacy's +delicate +delicately +delicateness +delicates +delicious +deliciouses +deliciously +deliciousness +delight +delighted +delightedly +delightedness +delighter +delightful +delightfully +delightfulness +delighting +delights +delimit +delimited +delimiter +delimiters +delimiting +delimits +delineate +delineated +delineates +delineating +delineation +delineations +delineative +delinquency +delinquent +delinquent's +delinquently +delinquents +delirious +deliriously +deliriousness +deliver +deliverable +deliverables +deliverance +delivered +deliverer +deliverers +deliveries +delivering +delivers +delivery +delivery's +dell +dell's +dells +delta +delta's +deltas +delude +deluded +deluder +deludes +deluding +deludingly +deluge +deluged +deluges +deluging +delusion +delusion's +delusions +delve +delved +delver +delves +delving +demand +demanded +demander +demanding +demandingly +demands +demise +demised +demises +demising +demo +democracies +democracy +democracy's +democrat +democrat's +democratic +democratically +democrats +demodulate +demodulated +demodulates +demodulating +demodulation +demodulation's +demodulations +demodulator +demodulator's +demodulators +demographic +demographics +demolish +demolished +demolisher +demolishes +demolishing +demolition +demolitions +demon +demon's +demoness +demons +demonstrable +demonstrableness +demonstrate +demonstrated +demonstrates +demonstrating +demonstration +demonstrations +demonstrative +demonstratively +demonstrativeness +demonstrator +demonstrator's +demonstrators +demos +demur +demurs +den +den's +deniable +denial +denial's +denials +denied +denier +denies +denigrate +denigrated +denigrates +denigrating +denigration +denigrative +denizen +denizens +denomination +denomination's +denominations +denominator +denominator's +denominators +denotable +denotation +denotation's +denotational +denotationally +denotations +denotative +denote +denoted +denotes +denoting +denounce +denounced +denouncer +denouncers +denounces +denouncing +dens +dense +densely +denseness +denser +densest +densities +density +density's +dent +dental +dentally +dentals +dented +denting +dentist +dentist's +dentists +dents +deny +denying +denyingly +depart +departed +departing +department +department's +departmental +departmentally +departments +departs +departure +departure's +departures +depend +dependability +dependable +dependableness +dependably +depended +dependence +dependences +dependencies +dependency +dependent +dependently +dependents +depending +depends +depict +depicted +depicter +depicting +depicts +deplete +depleted +depletes +depleting +depletion +depletions +depletive +deplorable +deplorableness +deplore +deplored +deplorer +deplores +deploring +deploringly +deploy +deployed +deploying +deployment +deployment's +deployments +deploys +deport +deportation +deported +deportee +deportee's +deportees +deporting +deportment +deports +depose +deposed +deposes +deposing +deposit +deposited +depositing +deposition +deposition's +depositions +depositor +depositor's +depositors +deposits +depot +depot's +depots +deprave +depraved +depravedly +depravedness +depraver +depraves +depraving +deprecate +deprecated +deprecates +deprecating +depreciate +depreciated +depreciates +depreciating +depreciatingly +depreciation +depreciations +depreciative +depreciatively +depress +depressed +depresses +depressing +depressingly +depression +depression's +depressions +depressive +depressively +deprivation +deprivation's +deprivations +deprive +deprived +deprives +depriving +depth +depths +deputies +deputy +deputy's +dequeue +dequeued +dequeues +dequeuing +derail +derailed +derailing +derails +derbies +derby +dereference +dereferenced +dereferencer +dereferencers +dereferences +dereferencing +deride +derided +derider +derides +deriding +deridingly +derision +derivable +derivation +derivation's +derivations +derivative +derivative's +derivatively +derivativeness +derivatives +derive +derived +deriver +derives +deriving +descend +descendant +descendant's +descendants +descended +descender +descenders +descending +descends +descent +descent's +descents +describable +describe +described +describer +describers +describes +describing +descried +description +description's +descriptions +descriptive +descriptively +descriptiveness +descriptives +descriptor +descriptor's +descriptors +descry +descrying +desert +deserted +deserter +deserters +deserting +desertion +desertions +deserts +deserve +deserved +deservedly +deservedness +deserver +deserves +deserving +deservingly +deservings +desiderata +desideratum +design +designate +designated +designates +designating +designation +designations +designative +designator +designator's +designators +designed +designedly +designer +designer's +designers +designing +designs +desirability +desirable +desirableness +desirably +desire +desired +desirer +desires +desiring +desirous +desirously +desirousness +desk +desk's +desks +desktop +desolate +desolated +desolately +desolateness +desolater +desolates +desolating +desolatingly +desolation +desolations +despair +despaired +despairer +despairing +despairingly +despairs +despatch +despatched +desperate +desperately +desperateness +desperation +despise +despised +despiser +despises +despising +despite +despited +despot +despot's +despotic +despots +dessert +dessert's +desserts +destination +destination's +destinations +destine +destined +destinies +destining +destiny +destiny's +destitute +destituteness +destitution +destroy +destroyed +destroyer +destroyer's +destroyers +destroying +destroys +destruction +destruction's +destructions +destructive +destructively +destructiveness +detach +detached +detachedly +detachedness +detacher +detaches +detaching +detachment +detachment's +detachments +detail +detailed +detailedly +detailedness +detailer +detailing +details +detain +detained +detainer +detaining +detains +detect +detectable +detectably +detected +detecting +detection +detection's +detections +detective +detectives +detector +detector's +detectors +detects +detention +deteriorate +deteriorated +deteriorates +deteriorating +deterioration +deteriorative +determinable +determinableness +determinacy +determinant +determinant's +determinants +determinate +determinately +determinateness +determination +determinations +determinative +determinatively +determinativeness +determine +determined +determinedly +determinedness +determiner +determiners +determines +determining +determinism +deterministic +deterministically +detest +detestable +detestableness +detested +detesting +detests +detonate +detonated +detonates +detonating +detonation +detonative +detract +detracted +detracting +detractive +detractively +detractor +detractor's +detractors +detracts +detriment +detriments +devastate +devastated +devastates +devastating +devastatingly +devastation +devastations +devastative +develop +developed +developer +developer's +developers +developing +development +development's +developmental +developmentally +developments +develops +deviant +deviant's +deviantly +deviants +deviate +deviated +deviates +deviating +deviation +deviations +device +device's +devices +devil +devil's +devilish +devilishly +devilishness +devils +devise +devised +deviser +devises +devising +devisings +devision +devisions +devoid +devote +devoted +devotedly +devotee +devotee's +devotees +devotes +devoting +devotion +devotions +devour +devoured +devourer +devouring +devours +devout +devoutly +devoutness +dew +dewdrop +dewdrop's +dewdrops +dewed +dewier +dewiness +dewing +dews +dewy +dexterity +diabetes +diadem +diagnosable +diagnose +diagnosed +diagnoses +diagnosing +diagnosis +diagnostic +diagnostic's +diagnostics +diagonal +diagonally +diagonals +diagram +diagram's +diagramed +diagraming +diagrammable +diagrammatic +diagrammatically +diagrammed +diagrammer +diagrammer's +diagrammers +diagramming +diagrams +dial +dial's +dialect +dialect's +dialects +dialog +dialog's +dialogs +dialogue +dialogue's +dialogues +dials +diameter +diameter's +diameters +diametrically +diamond +diamond's +diamonds +diaper +diaper's +diapered +diapering +diapers +diaphragm +diaphragm's +diaphragms +diaries +diary +diary's +diatribe +diatribe's +diatribes +dice +dicer +dices +dichotomies +dichotomy +dicing +dickens +dicky +dictate +dictated +dictates +dictating +dictation +dictations +dictator +dictator's +dictators +dictatorship +dictatorships +diction +dictionaries +dictionary +dictionary's +dictions +dictum +dictum's +dictums +did +didn't +die +died +dielectric +dielectric's +dielectrics +dies +diet +dieter +dieters +dietitian +dietitian's +dietitians +diets +differ +differed +difference +difference's +differenced +differences +differencing +different +differential +differential's +differentially +differentials +differentiate +differentiated +differentiates +differentiating +differentiation +differentiations +differentiators +differently +differentness +differer +differers +differing +differs +difficult +difficulties +difficultly +difficulty +difficulty's +diffuse +diffused +diffusely +diffuseness +diffuser +diffusers +diffuses +diffusing +diffusion +diffusions +diffusive +diffusively +diffusiveness +dig +digest +digested +digester +digestible +digesting +digestion +digestions +digestive +digestively +digestiveness +digests +digger +digger's +diggers +digging +diggings +digit +digit's +digital +digitally +digits +dignified +dignify +dignities +dignity +digress +digressed +digresses +digressing +digression +digression's +digressions +digressive +digressively +digressiveness +digs +dike +dike's +diker +dikes +diking +dilate +dilated +dilatedly +dilatedness +dilates +dilating +dilation +dilative +dilemma +dilemma's +dilemmas +diligence +diligences +diligent +diligently +diligentness +dilute +diluted +dilutely +diluteness +diluter +dilutes +diluting +dilution +dilutions +dilutive +dim +dime +dime's +dimension +dimensional +dimensionality +dimensionally +dimensioned +dimensioning +dimensions +dimer +dimers +dimes +diminish +diminished +diminishes +diminishing +diminution +diminutive +diminutively +diminutiveness +dimly +dimmed +dimmer +dimmer's +dimmers +dimmest +dimming +dimness +dimple +dimpled +dimples +dimpling +dims +din +dine +dined +diner +diners +dines +dingier +dinginess +dingy +dining +dinner +dinner's +dinners +dint +diode +diode's +diodes +dioxide +dioxides +dip +diphtheria +diploma +diploma's +diplomacy +diplomas +diplomat +diplomat's +diplomatic +diplomatics +diplomats +dipped +dipper +dipper's +dippers +dipping +dippings +dips +dire +direct +directed +directing +direction +direction's +directional +directionality +directionally +directions +directive +directive's +directives +directly +directness +director +director's +directories +directors +directory +directory's +directs +direly +direness +direr +direst +dirge +dirge's +dirged +dirges +dirging +dirt +dirt's +dirtied +dirtier +dirties +dirtiest +dirtily +dirtiness +dirts +dirty +dirtying +disabilities +disability +disability's +disable +disabled +disabler +disablers +disables +disabling +disabuse +disadvantage +disadvantage's +disadvantaged +disadvantagedness +disadvantages +disadvantaging +disagree +disagreeable +disagreeableness +disagreed +disagreeing +disagreement +disagreement's +disagreements +disagrees +disallow +disallowed +disallowing +disallows +disambiguate +disambiguated +disambiguates +disambiguating +disambiguation +disambiguations +disappear +disappearance +disappearance's +disappearances +disappeared +disappearing +disappears +disappoint +disappointed +disappointedly +disappointing +disappointingly +disappointment +disappointment's +disappointments +disappoints +disapproval +disapprove +disapproved +disapprover +disapproves +disapproving +disapprovingly +disarm +disarmament +disarmed +disarmer +disarmers +disarming +disarmingly +disarms +disassemble +disassembled +disassembler +disassembler's +disassemblers +disassembles +disassembling +disaster +disaster's +disasters +disastrous +disastrously +disband +disbanded +disbanding +disbands +disbelieve +disbelieved +disbeliever +disbelievers +disbelieves +disbelieving +disburse +disbursed +disbursement +disbursement's +disbursements +disburser +disburses +disbursing +disc +disc's +discard +discarded +discarder +discarding +discards +discern +discerned +discerner +discernibility +discernible +discernibly +discerning +discerningly +discernment +discerns +discharge +discharged +discharger +discharges +discharging +disciple +disciple's +disciples +disciplinary +discipline +disciplined +discipliner +disciplines +disciplining +disclaim +disclaimed +disclaimer +disclaimers +disclaiming +disclaims +disclose +disclosed +discloser +discloses +disclosing +disclosure +disclosure's +disclosures +discomfort +discomforting +discomfortingly +disconcert +disconcerted +disconcerting +disconcertingly +disconcerts +disconnect +disconnected +disconnectedly +disconnectedness +disconnecter +disconnecting +disconnection +disconnections +disconnects +discontent +discontented +discontentedly +discontinuance +discontinue +discontinued +discontinues +discontinuing +discontinuities +discontinuity +discontinuity's +discontinuous +discontinuously +discord +discords +discount +discounted +discounter +discounting +discounts +discourage +discouraged +discouragement +discourager +discourages +discouraging +discouragingly +discourse +discourse's +discoursed +discourser +discourses +discoursing +discover +discovered +discoverer +discoverers +discoveries +discovering +discovers +discovery +discovery's +discredit +discredited +discrediting +discredits +discreet +discreetly +discreetness +discrepancies +discrepancy +discrepancy's +discrete +discretely +discreteness +discretion +discretions +discriminate +discriminated +discriminates +discriminating +discriminatingly +discrimination +discriminations +discriminative +discriminatory +discs +discuss +discussed +discusser +discusses +discussing +discussion +discussion's +discussions +disdain +disdaining +disdains +disease +diseased +diseases +diseasing +disenfranchise +disenfranchised +disenfranchisement +disenfranchisement's +disenfranchisements +disenfranchiser +disenfranchises +disenfranchising +disengage +disengaged +disengages +disengaging +disentangle +disentangled +disentangler +disentangles +disentangling +disfigure +disfigured +disfigures +disfiguring +disgorge +disgorger +disgrace +disgraced +disgraceful +disgracefully +disgracefulness +disgracer +disgraces +disgracing +disgruntled +disguise +disguised +disguisedly +disguiser +disguises +disguising +disgust +disgusted +disgustedly +disgusting +disgustingly +disgusts +dish +dishearten +disheartening +dishearteningly +dished +dishes +dishing +dishonest +dishonestly +dishwasher +dishwashers +disillusion +disillusioned +disillusioning +disillusionment +disillusionment's +disillusionments +disinterested +disinterestedly +disinterestedness +disjoint +disjointed +disjointedly +disjointedness +disjointly +disjointness +disjunct +disjunction +disjunctions +disjunctive +disjunctively +disjuncts +disk +disk's +disked +disking +disks +dislike +disliked +disliker +dislikes +disliking +dislocate +dislocated +dislocates +dislocating +dislocation +dislocations +dislodge +dislodged +dislodges +dislodging +dismal +dismally +dismalness +dismay +dismayed +dismaying +dismayingly +dismays +dismiss +dismissal +dismissal's +dismissals +dismissed +dismisser +dismissers +dismisses +dismissing +dismissive +dismount +dismounted +dismounting +dismounts +disobedience +disobey +disobeyed +disobeyer +disobeying +disobeys +disorder +disordered +disorderedly +disorderedness +disorderliness +disorderly +disorders +disown +disowned +disowning +disowns +disparate +disparately +disparateness +disparities +disparity +disparity's +dispatch +dispatched +dispatcher +dispatchers +dispatches +dispatching +dispel +dispelled +dispelling +dispels +dispensation +dispense +dispensed +dispenser +dispensers +dispenses +dispensing +disperse +dispersed +dispersedly +disperser +disperses +dispersing +dispersion +dispersions +dispersive +dispersively +dispersiveness +displace +displaced +displacement +displacement's +displacements +displacer +displaces +displacing +display +displayed +displayer +displaying +displays +displease +displeased +displeasedly +displeases +displeasing +displeasure +disposable +disposal +disposal's +disposals +dispose +disposed +disposer +disposes +disposing +disposition +disposition's +dispositions +disprove +disproved +disproves +disproving +dispute +disputed +disputer +disputers +disputes +disputing +disqualification +disqualified +disqualifies +disqualify +disqualifying +disquiet +disquieting +disquietingly +disquietly +disregard +disregarded +disregarding +disregards +disrupt +disrupted +disrupter +disrupting +disruption +disruption's +disruptions +disruptive +disruptively +disruptiveness +disrupts +dissatisfaction +dissatisfaction's +dissatisfactions +dissatisfied +disseminate +disseminated +disseminates +disseminating +dissemination +dissension +dissension's +dissensions +dissent +dissented +dissenter +dissenters +dissenting +dissents +dissertation +dissertation's +dissertations +disservice +dissident +dissident's +dissidents +dissimilar +dissimilarities +dissimilarity +dissimilarity's +dissimilarly +dissipate +dissipated +dissipatedly +dissipatedness +dissipater +dissipates +dissipating +dissipation +dissipations +dissipative +dissociate +dissociated +dissociates +dissociating +dissociation +dissociative +dissolution +dissolution's +dissolutions +dissolve +dissolved +dissolver +dissolves +dissolving +dissonance +dissonance's +dissonances +distal +distally +distance +distanced +distances +distancing +distant +distantly +distantness +distaste +distasteful +distastefully +distastefulness +distastes +distemper +distill +distillation +distilled +distiller +distillers +distilling +distills +distinct +distinction +distinction's +distinctions +distinctive +distinctively +distinctiveness +distinctly +distinctness +distinguish +distinguishable +distinguished +distinguisher +distinguishes +distinguishing +distort +distorted +distorter +distorting +distortion +distortion's +distortions +distorts +distract +distracted +distractedly +distracting +distractingly +distraction +distraction's +distractions +distractive +distracts +distraught +distraughtly +distress +distressed +distresses +distressing +distressingly +distribute +distributed +distributer +distributes +distributing +distribution +distribution's +distributional +distributions +distributive +distributively +distributiveness +distributivity +distributor +distributor's +distributors +district +district's +districted +districting +districts +distrust +distrusted +distrusts +disturb +disturbance +disturbance's +disturbances +disturbed +disturber +disturbing +disturbingly +disturbs +ditch +ditch's +ditched +ditcher +ditches +ditching +divan +divan's +divans +dive +dived +diver +diverge +diverged +divergence +divergence's +divergences +divergent +divergently +diverges +diverging +divers +diverse +diversely +diverseness +diversification +diversified +diversifier +diversifies +diversify +diversifying +diversion +diversions +diversities +diversity +divert +diverted +diverting +diverts +dives +divest +divested +divesting +divests +divide +divided +dividend +dividend's +dividends +divider +dividers +divides +dividing +divine +divined +divinely +diviner +divines +diving +divining +divinities +divinity +divinity's +divisible +division +division's +divisions +divisor +divisor's +divisors +divorce +divorced +divorces +divorcing +divulge +divulged +divulges +divulging +dizzied +dizzier +dizziness +dizzy +dizzying +dizzyingly +do +dock +docked +docker +docking +docks +doctor +doctor's +doctoral +doctorate +doctorate's +doctorates +doctored +doctoring +doctors +doctrine +doctrine's +doctrines +document +document's +documentaries +documentary +documentary's +documentation +documentation's +documentations +documented +documenter +documenters +documenting +documents +dodge +dodged +dodger +dodgers +dodges +dodging +doer +doers +does +doesn't +dog +dog's +dogged +doggedly +doggedness +dogging +dogma +dogma's +dogmas +dogmatism +dogs +doing +doings +dole +doled +doleful +dolefully +dolefulness +doles +doling +doll +doll's +dollar +dollars +dollied +dollies +dolls +dolly +dolly's +dollying +dolphin +dolphin's +dolphins +domain +domain's +domains +dome +domed +domes +domestic +domestically +domesticate +domesticated +domesticates +domesticating +domestication +dominance +dominant +dominantly +dominate +dominated +dominates +dominating +domination +dominations +dominative +doming +dominion +dominions +don +don't +donate +donated +donates +donating +donation +donations +donative +done +donkey +donkey's +donkeys +dons +doom +doomed +dooming +dooms +door +door's +doors +doorstep +doorstep's +doorsteps +doorway +doorway's +doorways +dope +doped +doper +dopers +dopes +doping +dormant +dormitories +dormitory +dormitory's +dorsal +dorsally +dose +dosed +doses +dosing +dot +dot's +dote +doted +doter +dotes +doth +doting +dotingly +dots +dotted +dotting +double +doubled +doubleness +doubler +doublers +doubles +doublet +doublet's +doublets +doubling +doubly +doubt +doubtable +doubted +doubter +doubters +doubtful +doubtfully +doubtfulness +doubting +doubtingly +doubtless +doubtlessly +doubtlessness +doubts +dough +doughnut +doughnut's +doughnuts +douse +doused +douser +douses +dousing +dove +dover +doves +down +downcast +downed +downer +downers +downfall +downfallen +downier +downing +download +downloading +downloads +downplay +downplayed +downplaying +downplays +downright +downrightly +downrightness +downs +downstairs +downstream +downtown +downtowner +downtowns +downward +downwardly +downwardness +downwards +downy +doze +dozed +dozen +dozens +dozenth +dozer +dozes +dozing +drab +drably +drabness +drabs +draft +draft's +drafted +drafter +drafters +drafting +drafts +draftsmen +drag +dragged +dragging +draggingly +dragon +dragon's +dragons +dragoon +dragooned +dragoons +drags +drain +drainage +drainages +drained +drainer +drainers +draining +drains +drake +drama +drama's +dramas +dramatic +dramatically +dramatics +dramatist +dramatist's +dramatists +drank +drape +draped +draper +draperies +drapers +drapery +drapery's +drapes +draping +drastic +drastically +draw +drawback +drawback's +drawbacks +drawbridge +drawbridge's +drawbridges +drawer +drawers +drawing +drawings +drawl +drawled +drawler +drawling +drawlingly +drawls +drawly +drawn +drawnly +drawnness +draws +dread +dreaded +dreadful +dreadfully +dreadfulness +dreading +dreads +dream +dreamed +dreamer +dreamers +dreamier +dreamily +dreaminess +dreaming +dreamingly +dreams +dreamy +drearier +dreariness +dreary +dredge +dredge's +dredged +dredger +dredgers +dredges +dredging +dregs +drench +drenched +drencher +drenches +drenching +dress +dressed +dresser +dressers +dresses +dressing +dressings +dressmaker +dressmaker's +dressmakers +drew +dried +drier +drier's +driers +dries +driest +drift +drifted +drifter +drifters +drifting +driftingly +drifts +drill +drilled +driller +drilling +drills +drily +drink +drinkable +drinker +drinkers +drinking +drinks +drip +drip's +drips +drive +driven +drivenness +driver +driver's +drivers +drives +driveway +driveway's +driveways +driving +drone +drone's +droner +drones +droning +droningly +drool +drooled +drooler +drooling +drools +droop +drooped +drooping +droopingly +droops +drop +drop's +dropped +dropper +dropper's +droppers +dropping +dropping's +droppings +drops +drought +drought's +droughts +drove +drover +drovers +droves +drown +drowned +drowner +drowning +drownings +drowns +drowsier +drowsiest +drowsiness +drowsy +drudgery +drug +drug's +druggist +druggist's +druggists +drugs +drum +drum's +drummed +drummer +drummer's +drummers +drumming +drums +drunk +drunk's +drunkard +drunkard's +drunkards +drunken +drunkenly +drunkenness +drunker +drunkly +drunks +dry +drying +dryly +dual +dualities +duality +duality's +dually +duals +dub +dubious +dubiously +dubiousness +dubs +duchess +duchess's +duchesses +duchies +duchy +duck +ducked +ducker +ducking +ducks +dude +due +duel +duels +dueness +dues +dug +duke +duke's +dukes +dull +dulled +duller +dullest +dulling +dullness +dulls +dully +duly +dumb +dumbbell +dumbbell's +dumbbells +dumber +dumbest +dumbly +dumbness +dummied +dummies +dummy +dummy's +dummying +dump +dumped +dumper +dumpers +dumping +dumps +dunce +dunce's +dunces +dune +dune's +dunes +dungeon +dungeon's +dungeons +duplicate +duplicated +duplicates +duplicating +duplication +duplications +duplicative +duplicator +duplicator's +duplicators +durabilities +durability +durable +durableness +durables +durably +duration +duration's +durations +during +dusk +duskier +duskiness +dusky +dust +dusted +duster +dusters +dustier +dustiest +dustiness +dusting +dusts +dusty +duties +dutiful +dutifully +dutifulness +duty +duty's +dwarf +dwarfed +dwarfness +dwarfs +dwell +dwelled +dweller +dwellers +dwelling +dwellings +dwells +dwindle +dwindled +dwindles +dwindling +dye +dyed +dyeing +dyer +dyers +dyes +dying +dynamic +dynamically +dynamics +dynamite +dynamited +dynamiter +dynamites +dynamiting +dynasties +dynasty +dynasty's +each +eager +eagerly +eagerness +eagle +eagle's +eagles +ear +eared +earing +earl +earl's +earlier +earliest +earliness +earls +early +earmark +earmarked +earmarking +earmarkings +earmarks +earn +earned +earner +earner's +earners +earnest +earnestly +earnestness +earning +earnings +earns +earring +earring's +earrings +ears +earshot +earth +earth's +earthed +earthen +earthenware +earthliness +earthly +earthquake +earthquake's +earthquakes +earths +earthworm +earthworm's +earthworms +ease +eased +easement +easement's +easements +easer +eases +easier +easiest +easily +easiness +easing +east +easter +easterly +eastern +easterner +easterners +easting +easts +eastward +eastwards +easy +eat +eaten +eater +eaters +eating +eatings +eats +eaves +eavesdrop +eavesdropped +eavesdropper +eavesdropper's +eavesdroppers +eavesdropping +eavesdrops +ebb +ebbed +ebbing +ebbs +ebony +eccentric +eccentric's +eccentricities +eccentricity +eccentrics +ecclesiastical +ecclesiastically +echo +echoed +echoes +echoing +echos +eclipse +eclipsed +eclipses +eclipsing +ecology +economic +economical +economically +economics +economies +economist +economist's +economists +economy +economy's +ecstasy +eddied +eddies +eddy +eddy's +eddying +edge +edged +edger +edges +edging +edible +edibleness +edibles +edict +edict's +edicts +edifice +edifice's +edifices +edit +edited +editing +edition +edition's +editions +editor +editor's +editorial +editorially +editorials +editors +edits +educate +educated +educatedly +educatedness +educates +educating +education +education's +educational +educationally +educations +educative +educator +educator's +educators +eel +eel's +eels +eerie +eerier +effect +effected +effecting +effective +effectively +effectiveness +effectives +effector +effector's +effectors +effects +effectually +effeminate +efficacy +efficiencies +efficiency +efficient +efficiently +effigy +effort +effort's +effortless +effortlessly +effortlessness +efforts +egg +egged +egger +egging +eggs +ego +egos +eigenvalue +eigenvalue's +eigenvalues +eight +eighteen +eighteens +eighteenth +eighth +eighth's +eighthes +eighties +eightieth +eights +eighty +either +ejaculate +ejaculated +ejaculates +ejaculating +ejaculation +ejaculations +eject +ejected +ejecting +ejective +ejects +eke +eked +ekes +eking +el +elaborate +elaborated +elaborately +elaborateness +elaborates +elaborating +elaboration +elaborations +elaborative +elaborators +elapse +elapsed +elapses +elapsing +elastic +elastically +elasticities +elasticity +elastics +elate +elated +elatedly +elatedness +elater +elates +elating +elation +elbow +elbowed +elbowing +elbows +elder +elderliness +elderly +elders +eldest +elect +elected +electing +election +election's +elections +elective +electively +electiveness +electives +elector +elector's +electoral +electorally +electors +electric +electrical +electrically +electricalness +electricities +electricity +electrics +electrification +electrified +electrify +electrifying +electrocute +electrocuted +electrocutes +electrocuting +electrocution +electrocutions +electrode +electrode's +electrodes +electrolyte +electrolyte's +electrolytes +electrolytic +electron +electron's +electronic +electronically +electronics +electrons +elects +elegance +elegances +elegant +elegantly +element +element's +elemental +elementally +elementals +elementariness +elementary +elements +elephant +elephant's +elephants +elevate +elevated +elevates +elevating +elevation +elevations +elevator +elevator's +elevators +eleven +elevens +elevenses +eleventh +elf +elicit +elicited +eliciting +elicits +eligibilities +eligibility +eligible +eligibles +eliminate +eliminated +eliminately +eliminates +eliminating +elimination +eliminations +eliminative +eliminator +eliminators +elk +elk's +elks +ellipse +ellipse's +ellipses +ellipsis +ellipsoid +ellipsoid's +ellipsoidal +ellipsoids +elliptic +elliptical +elliptically +elm +elmer +elms +elongate +elongated +elongates +elongating +elongation +eloquence +eloquent +eloquently +els +else +else's +elsewhere +elucidate +elucidated +elucidates +elucidating +elucidation +elucidative +elude +eluded +eludes +eluding +elusive +elusively +elusiveness +elves +emaciated +emacs +emacs's +email +email's +emanating +emancipation +embark +embarked +embarking +embarks +embarrass +embarrassed +embarrassedly +embarrasses +embarrassing +embarrassingly +embarrassment +embassies +embassy +embassy's +embed +embedded +embedding +embeds +embellish +embellished +embellisher +embellishes +embellishing +embellishment +embellishment's +embellishments +ember +embers +embezzle +embezzled +embezzler +embezzler's +embezzlers +embezzles +embezzling +emblem +emblems +embodied +embodier +embodies +embodiment +embodiment's +embodiments +embody +embodying +embrace +embraced +embracer +embraces +embracing +embracingly +embracive +embroider +embroidered +embroiderer +embroideries +embroiders +embroidery +embryo +embryo's +embryology +embryos +emerald +emerald's +emeralds +emerge +emerged +emergence +emergencies +emergency +emergency's +emergent +emerges +emerging +emeries +emery +emigrant +emigrant's +emigrants +emigrate +emigrated +emigrates +emigrating +emigration +eminence +eminent +eminently +emit +emits +emitted +emotion +emotion's +emotional +emotionally +emotions +empathy +emperor +emperor's +emperors +emphases +emphasis +emphatic +emphatically +empire +empire's +empires +empirical +empirically +empiricist +empiricist's +empiricists +employ +employable +employed +employee +employee's +employees +employer +employer's +employers +employing +employment +employment's +employments +employs +empower +empowered +empowering +empowers +empress +emptied +emptier +empties +emptiest +emptily +emptiness +empty +emptying +emulate +emulated +emulates +emulating +emulation +emulations +emulative +emulatively +emulator +emulator's +emulators +enable +enabled +enabler +enablers +enables +enabling +enact +enacted +enacting +enactment +enactments +enacts +enamel +enamels +encamp +encamped +encamping +encamps +encapsulate +encapsulated +encapsulates +encapsulating +encapsulation +enchant +enchanted +enchanter +enchanting +enchantingly +enchantment +enchants +encipher +enciphered +encipherer +enciphering +enciphers +encircle +encircled +encircles +encircling +enclose +enclosed +encloses +enclosing +enclosure +enclosure's +enclosures +encode +encoded +encoder +encoders +encodes +encoding +encodings +encompass +encompassed +encompasses +encompassing +encounter +encountered +encountering +encounters +encourage +encouraged +encouragement +encouragements +encourager +encourages +encouraging +encouragingly +encrypt +encrypted +encrypting +encryption +encryption's +encryptions +encrypts +encumber +encumbered +encumbering +encumbers +encyclopedia +encyclopedia's +encyclopedias +encyclopedic +end +endanger +endangered +endangering +endangers +endear +endeared +endearing +endearingly +endears +ended +endemic +ender +enders +ending +endings +endive +endless +endlessly +endlessness +endorse +endorsed +endorsement +endorsement's +endorsements +endorser +endorses +endorsing +endow +endowed +endowing +endowment +endowment's +endowments +endows +ends +endurable +endurably +endurance +endure +endured +endures +enduring +enduringly +enduringness +enema +enema's +enemas +enemies +enemy +enemy's +energetic +energetics +energies +energy +enforce +enforced +enforcedly +enforcement +enforcer +enforcers +enforces +enforcing +enfranchise +enfranchised +enfranchisement +enfranchiser +enfranchises +enfranchising +engage +engaged +engagement +engagement's +engagements +engages +engaging +engagingly +engender +engendered +engendering +engenders +engine +engine's +engined +engineer +engineer's +engineered +engineering +engineeringly +engineerings +engineers +engines +engining +england +englander +englanders +engrave +engraved +engraver +engravers +engraves +engraving +engravings +engross +engrossed +engrossedly +engrosser +engrossing +engrossingly +enhance +enhanced +enhancement +enhancement's +enhancements +enhances +enhancing +enigmatic +enjoin +enjoined +enjoining +enjoins +enjoy +enjoyable +enjoyableness +enjoyably +enjoyed +enjoying +enjoyment +enjoys +enlarge +enlarged +enlargement +enlargement's +enlargements +enlarger +enlargers +enlarges +enlarging +enlighten +enlightened +enlightening +enlightenment +enlightens +enlist +enlisted +enlister +enlisting +enlistment +enlistments +enlists +enliven +enlivened +enlivening +enlivens +enmities +enmity +ennoble +ennobled +ennobler +ennobles +ennobling +ennui +enormities +enormity +enormous +enormously +enormousness +enough +enqueue +enqueued +enqueues +enquire +enquired +enquirer +enquirers +enquires +enquiring +enrage +enraged +enrages +enraging +enrich +enriched +enricher +enriches +enriching +enrolled +enrolling +ensemble +ensemble's +ensembles +ensign +ensign's +ensigns +enslave +enslaved +enslaver +enslavers +enslaves +enslaving +ensnare +ensnared +ensnares +ensnaring +ensue +ensued +ensues +ensuing +ensure +ensured +ensurer +ensurers +ensures +ensuring +entail +entailed +entailer +entailing +entails +entangle +entangled +entangler +entangles +entangling +enter +entered +enterer +entering +enterprise +enterpriser +enterprises +enterprising +enterprisingly +enters +entertain +entertained +entertainer +entertainers +entertaining +entertainingly +entertainment +entertainment's +entertainments +entertains +enthusiasm +enthusiasms +enthusiast +enthusiast's +enthusiastic +enthusiastically +enthusiasts +entice +enticed +enticer +enticers +entices +enticing +entire +entirely +entireties +entirety +entities +entitle +entitled +entitles +entitling +entity +entity's +entrance +entranced +entrances +entrancing +entreat +entreated +entreaties +entreating +entreatingly +entreats +entreaty +entrench +entrenched +entrenches +entrenching +entrepreneur +entrepreneur's +entrepreneurs +entries +entropies +entropy +entrust +entrusted +entrusting +entrusts +entry +entry's +enumerable +enumerate +enumerated +enumerates +enumerating +enumeration +enumerations +enumerative +enumerator +enumerator's +enumerators +enunciation +envelop +envelope +enveloped +enveloper +envelopes +enveloping +envelops +enviably +envied +envier +envies +envious +enviously +enviousness +environ +environed +environing +environment +environment's +environmental +environmentally +environments +environs +envisage +envisaged +envisages +envisaging +envision +envisioned +envisioning +envisions +envoy +envoy's +envoys +envy +envying +envyingly +epaulet +epaulet's +epaulets +ephemeral +ephemerally +ephemerals +epic +epic's +epics +epidemic +epidemic's +epidemics +episcopal +episcopally +episode +episode's +episodes +episodic +epistemological +epistemologically +epistemology +epistle +epistle's +epistler +epistles +epitaph +epitaphed +epitaphing +epitaphs +epitaxial +epitaxially +epithet +epithet's +epithets +epoch +epochs +epsilon +epsilons +equal +equalities +equality +equality's +equally +equals +equate +equated +equates +equating +equation +equations +equator +equator's +equatorial +equators +equilibrium +equilibriums +equinox +equip +equipment +equipments +equipped +equipping +equips +equitable +equitableness +equitably +equities +equity +equivalence +equivalenced +equivalences +equivalencing +equivalent +equivalently +equivalents +era +era's +eradicate +eradicated +eradicates +eradicating +eradication +eradicative +eras +erasable +erase +erased +eraser +erasers +erases +erasing +erasion +erasure +ere +erect +erected +erecting +erection +erection's +erections +erectly +erectness +erector +erector's +erectors +erects +ergo +ermine +ermine's +ermined +ermines +err +errand +errands +erratic +erred +erring +erringly +erroneous +erroneously +erroneousness +error +error's +errors +errs +eruption +eruptions +escalate +escalated +escalates +escalating +escalation +escapable +escapade +escapade's +escapades +escape +escaped +escapee +escapee's +escapees +escaper +escapes +escaping +eschew +eschewed +eschewing +eschews +escort +escorted +escorting +escorts +esoteric +especial +especially +espied +espies +espionage +espouse +espoused +espouser +espouses +espousing +esprit +esprits +espy +espying +esquire +esquires +essay +essayed +essayer +essays +essence +essence's +essences +essential +essentially +essentialness +essentials +establish +established +establisher +establishes +establishing +establishment +establishment's +establishments +estate +estate's +estates +esteem +esteemed +esteeming +esteems +estimate +estimated +estimates +estimating +estimation +estimations +estimative +etc +eternal +eternally +eternalness +eternities +eternity +ethereal +ethereally +etherealness +ethic +ethical +ethically +ethicalness +ethics +ethnic +etiquette +eunuch +eunuchs +euphemism +euphemism's +euphemisms +euphoria +evacuate +evacuated +evacuates +evacuating +evacuation +evacuations +evacuative +evade +evaded +evader +evades +evading +evaluate +evaluated +evaluates +evaluating +evaluation +evaluations +evaluative +evaluator +evaluator's +evaluators +evaporate +evaporated +evaporates +evaporating +evaporation +evaporations +evaporative +evaporatively +eve +even +evened +evener +evenhanded +evenhandedly +evenhandedness +evening +evening's +evenings +evenly +evenness +evens +event +event's +eventful +eventfully +eventfulness +events +eventual +eventualities +eventuality +eventually +ever +everest +evergreen +everlasting +everlastingly +everlastingness +evermore +every +everybody +everybody's +everyday +everydayness +everyone +everyone's +everyones +everything +everywhere +eves +evict +evicted +evicting +eviction +eviction's +evictions +evicts +evidence +evidenced +evidences +evidencing +evident +evidently +evil +evilly +evilness +evils +evince +evinced +evinces +evincing +evoke +evoked +evokes +evoking +evolute +evolute's +evolutes +evolution +evolution's +evolutionary +evolutions +evolve +evolved +evolves +evolving +ewe +ewe's +ewer +ewes +exacerbate +exacerbated +exacerbates +exacerbating +exacerbation +exacerbations +exact +exacted +exacter +exacting +exactingly +exactingness +exaction +exaction's +exactions +exactitude +exactly +exactness +exacts +exaggerate +exaggerated +exaggeratedly +exaggeratedness +exaggerates +exaggerating +exaggeration +exaggerations +exaggerative +exaggeratively +exalt +exalted +exaltedly +exalter +exalters +exalting +exalts +exam +exam's +examen +examination +examination's +examinations +examine +examined +examiner +examiners +examines +examining +example +example's +exampled +examples +exampling +exams +exasperate +exasperated +exasperatedly +exasperates +exasperating +exasperatingly +exasperation +exasperations +excavate +excavated +excavates +excavating +excavation +excavations +exceed +exceeded +exceeder +exceeding +exceedingly +exceeds +excel +excelled +excellence +excellences +excellency +excellent +excellently +excelling +excels +except +excepted +excepting +exception +exception's +exceptional +exceptionally +exceptionalness +exceptions +exceptive +excepts +excerpt +excerpted +excerpter +excerpts +excess +excesses +excessive +excessively +excessiveness +exchange +exchangeable +exchanged +exchanger +exchangers +exchanges +exchanging +exchequer +exchequer's +exchequers +excise +excised +excises +excising +excision +excisions +excitable +excitableness +excitation +excitation's +excitations +excite +excited +excitedly +excitement +exciter +excites +exciting +excitingly +exclaim +exclaimed +exclaimer +exclaimers +exclaiming +exclaims +exclamation +exclamation's +exclamations +exclude +excluded +excluder +excludes +excluding +exclusion +exclusioner +exclusioners +exclusions +exclusive +exclusively +exclusiveness +exclusivity +excommunicate +excommunicated +excommunicates +excommunicating +excommunication +excommunicative +excrete +excreted +excreter +excretes +excreting +excretion +excretions +excruciatingly +excursion +excursion's +excursions +excusable +excusableness +excusably +excuse +excused +excuser +excuses +excusing +executable +executable's +executables +execute +executed +executer +executers +executes +executing +execution +executional +executioner +executions +executive +executive's +executives +executor +executor's +executors +exemplar +exemplariness +exemplars +exemplary +exemplification +exemplified +exemplifier +exemplifiers +exemplifies +exemplify +exemplifying +exempt +exempted +exempting +exempts +exercise +exercised +exerciser +exercisers +exercises +exercising +exert +exerted +exerting +exertion +exertion's +exertions +exerts +exhale +exhaled +exhales +exhaling +exhaust +exhausted +exhaustedly +exhauster +exhaustible +exhausting +exhaustingly +exhaustion +exhaustive +exhaustively +exhaustiveness +exhausts +exhibit +exhibited +exhibiting +exhibition +exhibition's +exhibitioner +exhibitions +exhibitive +exhibitor +exhibitor's +exhibitors +exhibits +exhortation +exhortation's +exhortations +exigencies +exigency +exile +exiled +exiles +exiling +exist +existed +existence +existences +existent +existential +existentialism +existentialist +existentialist's +existentialists +existentially +existing +exists +exit +exited +exiting +exits +exorbitant +exorbitantly +exoskeletons +exotic +exoticness +expand +expandable +expanded +expander +expander's +expanders +expanding +expands +expanse +expansed +expanses +expansing +expansion +expansionism +expansions +expansive +expansively +expansiveness +expect +expectancies +expectancy +expectant +expectantly +expectation +expectation's +expectations +expected +expectedly +expectedness +expecting +expectingly +expects +expedient +expediently +expedite +expedited +expediter +expedites +expediting +expedition +expedition's +expeditions +expeditious +expeditiously +expeditiousness +expel +expelled +expelling +expels +expend +expendable +expended +expender +expending +expenditure +expenditure's +expenditures +expends +expense +expensed +expenses +expensing +expensive +expensively +expensiveness +experience +experienced +experiences +experiencing +experiment +experimental +experimentally +experimentation +experimentation's +experimentations +experimented +experimenter +experimenters +experimenting +experiments +expert +expertise +expertly +expertness +experts +expiration +expiration's +expirations +expire +expired +expires +expiring +explain +explainable +explained +explainer +explainers +explaining +explains +explanation +explanation's +explanations +explanatory +explicit +explicitly +explicitness +explode +exploded +exploder +explodes +exploding +exploit +exploitable +exploitation +exploitation's +exploitations +exploited +exploiter +exploiters +exploiting +exploitive +exploits +exploration +exploration's +explorations +exploratory +explore +explored +explorer +explorers +explores +exploring +explosion +explosion's +explosions +explosive +explosively +explosiveness +explosives +exponent +exponent's +exponential +exponentially +exponentials +exponentiate +exponentiated +exponentiates +exponentiating +exponentiation +exponentiation's +exponentiations +exponents +export +exported +exporter +exporters +exporting +exports +expose +exposed +exposer +exposers +exposes +exposing +exposition +exposition's +expositions +expository +exposure +exposure's +exposures +expound +expounded +expounder +expounding +expounds +express +expressed +expresser +expresses +expressibility +expressible +expressibly +expressing +expression +expression's +expressions +expressive +expressively +expressiveness +expressly +expropriate +expropriated +expropriates +expropriating +expropriation +expropriations +expulsion +expunge +expunged +expunger +expunges +expunging +exquisite +exquisitely +exquisiteness +extant +extend +extended +extendedly +extendedness +extender +extendible +extendibles +extending +extends +extensibility +extensible +extension +extension's +extensions +extensive +extensively +extensiveness +extent +extent's +extents +extenuate +extenuated +extenuating +extenuation +exterior +exterior's +exteriorly +exteriors +exterminate +exterminated +exterminates +exterminating +extermination +exterminations +external +externally +externals +extinct +extinction +extinctive +extinguish +extinguished +extinguisher +extinguishers +extinguishes +extinguishing +extol +extols +extortion +extortioner +extortionist +extortionist's +extortionists +extra +extract +extracted +extracting +extraction +extraction's +extractions +extractive +extractively +extractor +extractor's +extractors +extracts +extracurricular +extraneous +extraneously +extraneousness +extraordinarily +extraordinariness +extraordinary +extrapolate +extrapolated +extrapolates +extrapolating +extrapolation +extrapolations +extrapolative +extras +extravagance +extravagant +extravagantly +extremal +extreme +extremed +extremely +extremeness +extremer +extremes +extremest +extremist +extremist's +extremists +extremities +extremity +extremity's +extrinsic +exuberance +exult +exultation +exulted +exulting +exultingly +exults +eye +eyeball +eyeballs +eyebrow +eyebrow's +eyebrows +eyed +eyedness +eyeglass +eyeglasses +eyeing +eyelid +eyelid's +eyelids +eyepiece +eyepiece's +eyepieces +eyer +eyers +eyes +eyesight +eyewitness +eyewitness's +eyewitnesses +eying +fable +fabled +fabler +fables +fabling +fabric +fabric's +fabricate +fabricated +fabricates +fabricating +fabrication +fabrications +fabrics +fabulous +fabulously +fabulousness +facade +facaded +facades +facading +face +faced +faceless +facelessness +facer +faces +facet +faceted +faceting +facets +facial +facially +facile +facilely +facileness +facilitate +facilitated +facilitates +facilitating +facilitation +facilitative +facilities +facility +facility's +facing +facings +facsimile +facsimile's +facsimiled +facsimiles +facsimiling +fact +fact's +faction +faction's +factions +factor +factored +factorial +factories +factoring +factorings +factors +factory +factory's +facts +factual +factually +factualness +faculties +faculty +faculty's +fade +faded +fadedly +fader +faders +fades +fading +fag +fags +fail +failed +failing +failingly +failings +fails +failure +failure's +failures +fain +faint +fainted +fainter +faintest +fainting +faintly +faintness +faints +fair +faired +fairer +fairest +fairies +fairing +fairly +fairness +fairs +fairy +fairy's +fairyland +faith +faithful +faithfully +faithfulness +faithfuls +faithless +faithlessly +faithlessness +faiths +fake +faked +faker +fakes +faking +falcon +falconer +falcons +fall +fallacies +fallacious +fallaciously +fallaciousness +fallacy +fallacy's +fallen +faller +fallibility +fallible +falling +falls +false +falsehood +falsehood's +falsehoods +falsely +falseness +falser +falsest +falsification +falsified +falsifier +falsifies +falsify +falsifying +falsity +falter +faltered +falterer +faltering +falteringly +falters +fame +famed +fames +familiar +familiarities +familiarity +familiarly +familiarness +familiars +families +family +family's +famine +famine's +famines +faming +famish +famished +famishes +famishing +famous +famously +famousness +fan +fan's +fanatic +fanatic's +fanatically +fanatics +fancied +fancier +fancier's +fanciers +fancies +fanciest +fanciful +fancifully +fancifulness +fancily +fanciness +fancy +fancying +fang +fang's +fanged +fangs +fanned +fanning +fans +fantasied +fantasies +fantastic +fantasy +fantasy's +far +faraway +farce +farce's +farces +farcing +fare +fared +farer +fares +farewell +farewells +faring +farm +farmed +farmer +farmer's +farmers +farmhouse +farmhouse's +farmhouses +farming +farms +farmyard +farmyard's +farmyards +farther +farthest +farthing +fascinate +fascinated +fascinates +fascinating +fascinatingly +fascination +fascinations +fashion +fashionable +fashionableness +fashionably +fashioned +fashioner +fashioners +fashioning +fashions +fast +fasted +fasten +fastened +fastener +fasteners +fastening +fastenings +fastens +faster +fastest +fasting +fastness +fasts +fat +fatal +fatalities +fatality +fatality's +fatally +fatals +fate +fated +fates +father +father's +fathered +fathering +fatherland +fatherliness +fatherly +fathers +fathom +fathomed +fathoming +fathoms +fatigue +fatigued +fatigues +fatiguing +fatiguingly +fating +fatly +fatness +fats +fatten +fattened +fattener +fatteners +fattening +fattens +fatter +fattest +fault +faulted +faultier +faultiness +faulting +faultless +faultlessly +faultlessness +faults +faulty +fawn +fawned +fawner +fawning +fawningly +fawns +fear +feared +fearer +fearful +fearfully +fearfulness +fearing +fearless +fearlessly +fearlessness +fears +feasibility +feasible +feasibleness +feast +feasted +feaster +feasting +feasts +feat +feat's +feather +feathered +featherer +featherers +feathering +feathers +feating +featly +feats +feature +featured +featureless +features +featuring +fed +federal +federally +federals +federation +feds +fee +feeble +feebleness +feebler +feeblest +feebly +feed +feedback +feedbacks +feeder +feeders +feeding +feedings +feeds +feel +feeler +feelers +feeling +feelingly +feelingness +feelings +feels +fees +feet +feign +feigned +feigner +feigning +feigns +felicities +felicity +fell +felled +feller +fellers +felling +fellness +fellow +fellow's +fellowly +fellows +fellowship +fellowship's +fellowships +fells +felt +felted +felting +felts +female +female's +femaleness +females +feminine +femininely +feminineness +femininity +feminist +feminist's +feminists +femur +femur's +femurs +fen +fence +fenced +fencer +fencers +fences +fencing +ferment +fermentation +fermentation's +fermentations +fermented +fermenter +fermenting +ferments +fern +fern's +ferns +ferocious +ferociously +ferociousness +ferocity +ferried +ferries +ferrite +ferry +ferrying +fertile +fertilely +fertileness +fertilities +fertility +fervent +fervently +festival +festival's +festivals +festive +festively +festiveness +festivities +festivity +fetch +fetched +fetcher +fetches +fetching +fetchingly +fetter +fettered +fettering +fetters +feud +feud's +feudal +feudalism +feudally +feuds +fever +fevered +fevering +feverish +feverishly +feverishness +fevers +few +fewer +fewest +fewness +fews +fibrous +fibrously +fibrousness +fickle +fickleness +fiction +fiction's +fictional +fictionally +fictions +fictitious +fictitiously +fictitiousness +fiddle +fiddled +fiddler +fiddles +fiddling +fidelity +field +fielded +fielder +fielders +fielding +fields +fiend +fiends +fierce +fiercely +fierceness +fiercer +fiercest +fieriness +fiery +fife +fifteen +fifteens +fifteenth +fifth +fifthly +fifties +fiftieth +fifty +fig +fig's +fight +fighter +fighters +fighting +fights +figs +figurative +figuratively +figurativeness +figure +figured +figurer +figurers +figures +figuring +figurings +filament +filament's +filaments +file +file's +filed +filename +filename's +filenames +filer +filers +files +filial +filially +filing +filings +fill +fillable +filled +filler +fillers +filling +fillings +fills +film +filmed +filming +films +filter +filter's +filtered +filterer +filtering +filters +filth +filthier +filthiest +filthiness +filthy +filtration +filtration's +fin +fin's +final +finality +finally +finals +finance +financed +finances +financial +financially +financier +financier's +financiers +financing +find +finder +finders +finding +findings +finds +fine +fined +finely +fineness +finer +fines +finest +finger +fingered +fingerer +fingering +fingerings +fingers +fining +finish +finished +finisher +finishers +finishes +finishing +finishings +finite +finitely +finiteness +finites +fins +fir +fire +firearm +firearm's +firearms +fired +fireflies +firefly +firefly's +firelight +firelighting +fireman +fireplace +fireplace's +fireplaces +firer +firers +fires +fireside +firewood +fireworks +firing +firings +firm +firm's +firmament +firmed +firmer +firmest +firming +firmly +firmness +firms +firmware +firmwares +first +firsthand +firstly +firsts +firth +fiscal +fiscally +fiscals +fish +fished +fisher +fisheries +fisherman +fisherman's +fishermen +fishermen's +fishers +fishery +fishes +fishing +fissure +fissured +fissures +fissuring +fist +fisted +fists +fit +fitful +fitfully +fitfulness +fitly +fitness +fits +fitted +fitter +fitter's +fitters +fitting +fittingly +fittingness +fittings +five +fiver +fives +fix +fixate +fixated +fixates +fixating +fixation +fixations +fixative +fixed +fixedly +fixedness +fixer +fixers +fixes +fixing +fixings +fixture +fixture's +fixtures +flab +flabbier +flabbiness +flabby +flag +flag's +flagged +flagging +flaggingly +flagrant +flagrantly +flags +flagship +flagship's +flagships +flake +flaked +flaker +flakes +flaking +flame +flamed +flamer +flamers +flames +flaming +flamingly +flammable +flammables +flank +flanked +flanker +flankers +flanking +flanks +flannel +flannel's +flannels +flap +flap's +flapping +flaps +flare +flared +flares +flaring +flaringly +flash +flashed +flasher +flashers +flashes +flashing +flashlight +flashlight's +flashlights +flask +flat +flatly +flatness +flatnesses +flats +flatten +flattened +flattener +flattening +flattens +flatter +flattered +flatterer +flattering +flatteringly +flatters +flattery +flattest +flaunt +flaunted +flaunting +flauntingly +flaunts +flaw +flawed +flawing +flawless +flawlessly +flawlessness +flaws +flax +flaxen +flea +flea's +fleas +fled +fledged +fledgling +fledgling's +fledglings +flee +fleece +fleece's +fleeced +fleeces +fleecier +fleecy +fleeing +fleer +flees +fleet +fleetest +fleeting +fleetingly +fleetingness +fleetly +fleetness +fleets +flesh +fleshed +flesher +fleshes +fleshier +fleshiness +fleshing +fleshings +fleshly +fleshy +flew +flews +flexibilities +flexibility +flexible +flexibly +flick +flicked +flicker +flickered +flickering +flickeringly +flicking +flicks +flier +fliers +flies +flight +flight's +flights +flinch +flinched +flincher +flinches +flinching +fling +fling's +flinger +flinging +flings +flint +flints +flip +flips +flirt +flirted +flirter +flirting +flirts +flit +flits +float +floated +floater +floaters +floating +floats +flock +flocked +flocking +flocks +flood +flooded +flooder +flooding +floods +floor +floored +floorer +flooring +floorings +floors +flop +flop's +floppier +floppies +floppily +floppiness +floppy +floppy's +flops +flora +florin +floss +flossed +flosses +flossing +flounder +floundered +floundering +flounders +flour +floured +flourish +flourished +flourisher +flourishes +flourishing +flourishingly +flours +flow +flowchart +flowcharting +flowcharts +flowed +flower +flowered +flowerer +floweriness +flowering +flowers +flowery +flowing +flowingly +flown +flows +fluctuate +fluctuated +fluctuates +fluctuating +fluctuation +fluctuations +fluent +fluently +fluffier +fluffiest +fluffiness +fluffy +fluid +fluidity +fluidly +fluidness +fluids +flung +flunk +flunked +flunker +flunking +flunks +fluorescence +flurried +flurries +flurry +flurrying +flush +flushed +flushes +flushing +flushness +flute +flute's +fluted +fluter +flutes +fluting +flutter +fluttered +flutterer +fluttering +flutters +fly +flyable +flyer +flyer's +flyers +flying +foam +foamed +foamer +foaming +foams +focal +focally +foci +focus +focusable +focused +focuser +focuses +focusing +fodder +foe +foe's +foes +fog +fog's +fogged +foggier +foggiest +foggily +fogginess +fogging +foggy +fogs +foil +foiled +foiling +foils +fold +folded +folder +folders +folding +foldings +folds +foliage +foliaged +foliages +folk +folk's +folklore +folks +follies +follow +followed +follower +followers +following +followings +follows +folly +fond +fonder +fondest +fondle +fondled +fondler +fondles +fondling +fondly +fondness +fonds +font +font's +fonts +food +food's +foods +foodstuff +foodstuff's +foodstuffs +fool +fooled +fooling +foolish +foolishly +foolishness +foolproof +fools +foot +football +football's +footballed +footballer +footballers +footballs +footed +footer +footers +foothold +footholds +footing +footings +footman +footnote +footnote's +footnotes +footprint +footprint's +footprints +foots +footstep +footsteps +for +forage +foraged +forager +forages +foraging +foray +foray's +forayer +forays +forbade +forbear +forbear's +forbearance +forbearer +forbearing +forbears +forbid +forbidden +forbidding +forbiddingly +forbiddingness +forbids +force +force's +forced +forcedly +forcefield +forcefield's +forcefields +forceful +forcefully +forcefulness +forcer +forces +forcible +forcibleness +forcibly +forcing +ford +fords +fore +forearm +forearm's +forearmed +forearms +foreboding +forebodingly +forebodingness +forebodings +forecast +forecasted +forecaster +forecasters +forecasting +forecastle +forecastles +forecasts +forefather +forefather's +forefathers +forefinger +forefinger's +forefingers +forego +foregoer +foregoes +foregoing +foregone +foreground +foregrounds +forehead +forehead's +foreheads +foreign +foreigner +foreigners +foreignly +foreignness +foreigns +foreman +foremost +forenoon +foresee +foreseeable +foreseen +foreseer +foresees +foresight +foresighted +foresightedly +foresightedness +forest +forestall +forestalled +forestaller +forestalling +forestallment +forestalls +forested +forester +foresters +forests +foretell +foreteller +foretelling +foretells +forethought +forethought's +foretold +forever +foreverness +forewarn +forewarned +forewarner +forewarning +forewarnings +forewarns +forfeit +forfeited +forfeiter +forfeiters +forfeiting +forfeits +forgave +forge +forged +forger +forgeries +forgers +forgery +forgery's +forges +forget +forgetful +forgetfully +forgetfulness +forgetive +forgets +forgettable +forgettably +forgetting +forging +forgivable +forgivably +forgive +forgiven +forgiveness +forgiver +forgives +forgiving +forgivingly +forgivingness +forgot +forgotten +fork +forked +forker +forking +forks +forlorn +forlornly +forlornness +form +formal +formalism +formalism's +formalisms +formalities +formality +formally +formalness +formals +formant +formants +format +formated +formating +formation +formation's +formations +formative +formatively +formativeness +formats +formatted +formatter +formatter's +formatters +formatting +formed +former +formerly +formers +formidable +formidableness +forming +forms +formula +formula's +formulae +formulas +formulate +formulated +formulates +formulating +formulation +formulations +formulator +formulator's +formulators +fornication +forsake +forsaken +forsakes +forsaking +fort +fort's +forte +fortes +forth +forthcoming +forthwith +fortier +forties +fortieth +fortification +fortifications +fortified +fortifier +fortifies +fortify +fortifying +fortitude +fortnight +fortnightly +fortress +fortress's +fortresses +forts +fortuitous +fortuitously +fortuitousness +fortunate +fortunately +fortunateness +fortunates +fortune +fortune's +fortuned +fortunes +fortuning +forty +forum +forum's +forums +forward +forwarded +forwarder +forwarders +forwarding +forwardly +forwardness +forwards +fossil +fossils +foster +fostered +fosterer +fostering +fosters +fought +foul +fouled +fouler +foulest +fouling +foully +foulness +fouls +found +foundation +foundation's +foundations +founded +founder +foundered +foundering +founders +founding +foundries +foundry +foundry's +founds +fount +fount's +fountain +fountain's +fountains +founts +four +fours +fourscore +fourteen +fourteener +fourteens +fourteenth +fourth +fourthly +fowl +fowler +fowling +fowls +fox +fox's +foxed +foxes +foxing +fractal +fractal's +fractals +fraction +fraction's +fractional +fractionally +fractioned +fractioning +fractions +fracture +fractured +fractures +fracturing +fragile +fragilely +fragment +fragmentariness +fragmentary +fragmentation +fragmented +fragmenting +fragments +fragrance +fragrance's +fragrances +fragrant +fragrantly +frail +frailer +frailest +frailly +frailness +frailties +frailty +frame +frame's +framed +framer +framers +frames +framework +framework's +frameworks +framing +framings +franc +franchise +franchise's +franchised +franchiser +franchises +franchising +francs +frank +franked +franker +frankest +franking +frankly +frankness +franks +frantic +frantically +franticly +franticness +fraternal +fraternally +fraternities +fraternity +fraternity's +fraud +fraud's +frauds +fraudulently +fraught +fraughted +fraughting +fraughts +fray +frayed +fraying +frays +freak +freak's +freaks +freckle +freckled +freckles +freckling +free +freed +freedom +freedom's +freedoms +freeing +freeings +freely +freeman +freeness +freer +frees +freest +freeway +freeway's +freeways +freeze +freezer +freezers +freezes +freezing +freight +freighted +freighter +freighters +freighting +freights +frenzied +frenziedly +frenzies +frenzy +frenzying +frequencies +frequency +frequent +frequented +frequenter +frequenters +frequenting +frequently +frequentness +frequents +fresh +freshen +freshened +freshener +fresheners +freshening +freshens +fresher +freshers +freshest +freshly +freshman +freshmen +freshness +fret +fretful +fretfully +fretfulness +frets +friar +friar's +friarly +friars +frication +fricative +fricatives +friction +friction's +frictionless +frictionlessly +frictions +fried +friend +friend's +friendless +friendlessness +friendlier +friendlies +friendliest +friendliness +friendly +friends +friendship +friendship's +friendships +frier +fries +frieze +frieze's +friezes +frigate +frigate's +frigates +fright +frighten +frightened +frightening +frighteningly +frightens +frightful +frightfully +frightfulness +frill +frill's +frilled +frills +fringe +fringed +fringes +fringing +frisk +frisked +frisker +frisking +frisks +frivolous +frivolously +frivolousness +frock +frock's +frocked +frocking +frocks +frog +frog's +frogs +frolic +frolics +from +front +fronted +frontier +frontier's +frontiers +fronting +fronts +frost +frosted +frostier +frostiness +frosting +frosts +frosty +froth +frothing +frown +frowned +frowner +frowning +frowningly +frowns +froze +frozen +frozenly +frozenness +frugal +frugally +fruit +fruit's +fruited +fruiter +fruiterer +fruitful +fruitfully +fruitfulness +fruition +fruitless +fruitlessly +fruitlessness +fruits +frustrate +frustrated +frustrater +frustrates +frustrating +frustratingly +frustration +frustrations +fry +frying +fuel +fuels +fugitive +fugitive's +fugitively +fugitiveness +fugitives +fulfilled +fulfiller +fulfilling +full +fuller +fullest +fullness +fullword +fullword's +fullwords +fully +fumble +fumbled +fumbler +fumbles +fumbling +fumblingly +fume +fumed +fumes +fuming +fun +function +function's +functional +functionalities +functionality +functionally +functionals +functioned +functioning +functions +functor +functor's +functors +fund +fundamental +fundamentalist +fundamentalist's +fundamentalists +fundamentally +fundamentals +funded +funder +funders +funding +funds +funeral +funeral's +funerals +fungus +funguses +funnel +funnels +funnier +funnies +funniest +funnily +funniness +funny +fur +fur's +furies +furious +furiouser +furiously +furiousness +furnace +furnace's +furnaced +furnaces +furnacing +furness +furnish +furnished +furnisher +furnishers +furnishes +furnishing +furnishings +furniture +furrow +furrowed +furrowing +furrows +furs +further +furthered +furtherer +furtherest +furthering +furthermore +furthers +furtive +furtively +furtiveness +fury +fury's +fuse +fused +fuses +fusing +fusion +fusions +fuss +fusser +fussing +futile +futilely +futileness +futility +future +future's +futures +fuzzier +fuzziest +fuzziness +fuzzy +gabardine +gabardines +gable +gabled +gabler +gables +gad +gadget +gadget's +gadgets +gag +gaged +gager +gagged +gagging +gaging +gags +gaieties +gaiety +gaily +gain +gained +gainer +gainers +gaining +gainings +gainly +gains +gait +gaited +gaiter +gaiters +gaits +galaxies +galaxy +galaxy's +gale +gales +gall +gallant +gallantly +gallantry +gallants +galled +galleried +galleries +gallery +galley +galley's +galleys +galling +gallingly +gallon +gallon's +gallons +gallop +galloped +galloper +gallopers +galloping +gallops +gallows +gallowses +galls +gamble +gambled +gambler +gamblers +gambles +gambling +game +gamed +gamely +gameness +games +gaming +gamma +gammas +gang +gang's +ganger +ganglier +gangly +gangrene +gangrened +gangrenes +gangrening +gangs +gangster +gangster's +gangsters +gap +gap's +gape +gaped +gaper +gapes +gaping +gapingly +gaps +garage +garaged +garages +garaging +garb +garbage +garbage's +garbaged +garbages +garbaging +garbed +garble +garbled +garbler +garbles +garbling +garden +gardened +gardener +gardeners +gardening +gardens +gargle +gargled +gargles +gargling +garland +garlanded +garlands +garlic +garlics +garment +garment's +garmented +garmenting +garments +garner +garnered +garnering +garners +garnish +garnished +garnishes +garrison +garrisoned +garrisoning +garrisons +garter +garter's +gartered +gartering +garters +gas +gas's +gaseous +gaseously +gaseousness +gases +gash +gash's +gashed +gashes +gashing +gasoline +gasolines +gasp +gasped +gasper +gaspers +gasping +gaspingly +gasps +gassed +gasser +gassers +gassing +gassings +gastric +gastrointestinal +gate +gated +gates +gateway +gateway's +gateways +gather +gathered +gatherer +gatherers +gathering +gatherings +gathers +gating +gaudier +gaudies +gaudiness +gaudy +gauge +gauged +gauger +gauges +gauging +gaunt +gauntly +gauntness +gauze +gauzed +gauzes +gauzing +gave +gay +gayer +gayest +gayly +gayness +gaze +gazed +gazer +gazers +gazes +gazing +gear +geared +gearing +gears +geese +gel +gel's +gelatin +gelled +gelling +gels +gem +gem's +gems +gender +gender's +gendered +gendering +genders +gene +gene's +general +general's +generalist +generalist's +generalists +generalities +generality +generally +generalness +generals +generate +generated +generates +generating +generation +generations +generative +generatively +generator +generator's +generators +generic +generically +genericness +generosities +generosity +generosity's +generous +generously +generousness +genes +genetic +genetically +genetics +genial +genially +genialness +genius +genius's +geniuses +genre +genre's +genres +genteel +genteeler +genteelest +genteelly +genteelness +gentle +gentled +gentleman +gentlemanliness +gentlemanly +gentleness +gentler +gentlest +gentlewoman +gentling +gently +gentries +gentry +genuine +genuinely +genuineness +genus +geographic +geographical +geographically +geographies +geography +geological +geologist +geologist's +geologists +geometric +geometries +geometry +geranium +germ +germ's +germane +germen +germinate +germinated +germinates +germinating +germination +germinations +germinative +germinatively +germs +gestalt +gesture +gestured +gestures +gesturing +get +gets +getter +getter's +gettered +getters +getting +ghastlier +ghastliness +ghastly +ghost +ghosted +ghosting +ghostlier +ghostliness +ghostlinesses +ghostly +ghosts +giant +giant's +giants +gibberish +giddied +giddier +giddiness +giddy +giddying +gift +gifted +giftedly +giftedness +gifts +gig +gig's +gigantic +giganticness +giggle +giggled +giggler +giggles +giggling +gigglingly +gigs +gild +gilded +gilder +gilding +gilds +gill +gill's +gilled +giller +gills +gilt +gimmick +gimmick's +gimmicks +gin +gin's +ginger +gingerbread +gingered +gingering +gingerliness +gingerly +gingham +ginghams +gins +giraffe +giraffe's +giraffes +gird +girded +girder +girder's +girders +girding +girdle +girdled +girdler +girdles +girdling +girds +girl +girl's +girlfriend +girlfriend's +girlfriends +girls +girt +girth +give +given +givenness +givens +giver +givers +gives +giveth +giving +givingly +gizmo +gizmo's +gizmos +glacial +glacially +glacier +glacier's +glaciers +glad +gladder +gladdest +glade +glades +gladly +gladness +glamour +glamoured +glamouring +glamours +glance +glanced +glances +glancing +glancingly +gland +gland's +glanders +glands +glare +glared +glares +glaring +glaringly +glaringness +glass +glassed +glasses +glassier +glassies +glassiness +glassy +glaze +glazed +glazer +glazers +glazes +glazing +gleam +gleamed +gleaming +gleams +glean +gleaned +gleaner +gleaning +gleanings +gleans +glee +gleed +gleeful +gleefully +gleefulness +glees +glen +glen's +glens +glide +glided +glider +gliders +glides +gliding +glimmer +glimmered +glimmering +glimmers +glimpse +glimpsed +glimpser +glimpsers +glimpses +glimpsing +glint +glinted +glinting +glints +glisten +glistened +glistening +glistens +glitch +glitch's +glitches +glitter +glittered +glittering +glitteringly +glitters +global +globally +globals +globe +globe's +globes +globing +globular +globularity +globularly +globularness +gloom +gloomier +gloomily +gloominess +glooms +gloomy +gloried +glories +glorification +glorifications +glorified +glorifier +glorifiers +glorifies +glorify +glorious +gloriously +gloriousness +glory +glorying +gloss +glossaries +glossary +glossary's +glossed +glosses +glossier +glossies +glossiness +glossing +glossy +glottal +glove +gloved +glover +glovers +gloves +gloving +glow +glowed +glower +glowered +glowering +glowers +glowing +glowingly +glows +glucose +glue +glued +gluer +gluers +glues +gluing +gnat +gnat's +gnats +gnaw +gnawed +gnawer +gnawing +gnaws +go +goad +goaded +goading +goads +goal +goal's +goals +goat +goat's +goatee +goatee's +goatees +goats +gobble +gobbled +gobbler +gobblers +gobbles +gobbling +goblet +goblet's +goblets +goblin +goblin's +goblins +god +god's +goddess +goddess's +goddesses +godlier +godlike +godlikeness +godliness +godly +godmother +godmother's +godmothers +gods +goer +goering +goes +going +goings +gold +golden +goldenly +goldenness +golding +golds +goldsmith +golf +golfer +golfers +golfing +golfs +gone +goner +gong +gong's +gongs +gonion +good +goodbye +goodbye's +goodbyes +goodie +goodie's +goodies +goodly +goodness +goods +goody +goody's +google +googles +googling +goose +gooses +goosing +gore +gored +gores +gorge +gorgeous +gorgeously +gorgeousness +gorger +gorges +gorging +gorilla +gorilla's +gorillas +goring +gosh +gospel +gospels +gossip +gossiper +gossipers +gossips +got +gotcha +gotcha's +gotchas +goth +goto +gotten +gouge +gouged +gouger +gouges +gouging +govern +governed +governess +governesses +governing +government +government's +governmental +governmentally +governments +governor +governor's +governors +governs +gown +gowned +gowns +grab +grabbed +grabber +grabber's +grabbers +grabbing +grabbings +grabs +grace +graced +graceful +gracefully +gracefulness +graces +gracing +gracious +graciously +graciousness +gradation +gradation's +gradations +grade +graded +gradely +grader +graders +grades +gradient +gradient's +gradients +grading +gradings +gradual +gradually +gradualness +graduate +graduated +graduates +graduating +graduation +graduations +graft +grafted +grafter +grafting +grafts +graham +graham's +grahams +grain +grained +grainer +graining +grains +grammar +grammar's +grammars +grammatical +grammatically +grammaticalness +granaries +granary +granary's +grand +grander +grandest +grandeur +grandfather +grandfather's +grandfatherly +grandfathers +grandiose +grandiosely +grandioseness +grandkid +grandkid's +grandkids +grandly +grandma +grandma's +grandmother +grandmother's +grandmotherly +grandmothers +grandness +grandpa +grandpa's +grandparent +grandparents +grandpas +grands +grandson +grandson's +grandsons +grange +granger +granges +granite +grannies +granny +grant +grant's +granted +granter +granting +grants +granularity +granulate +granulated +granulates +granulating +granulation +granulations +granulative +grape +grape's +grapes +grapevine +grapevine's +grapevines +graph +graph's +graphed +graphic +graphical +graphically +graphicness +graphics +graphing +graphite +graphs +grapple +grappled +grappler +grapples +grappling +grasp +graspable +grasped +grasper +grasping +graspingly +graspingness +grasps +grass +grassed +grassers +grasses +grassier +grassiest +grassing +grassy +grate +grated +grateful +gratefully +gratefulness +grater +grates +gratification +gratifications +gratified +gratify +gratifying +gratifyingly +grating +gratingly +gratings +gratitude +gratuities +gratuitous +gratuitously +gratuitousness +gratuity +gratuity's +grave +gravel +gravelly +gravels +gravely +graveness +graver +gravers +graves +gravest +gravies +graving +gravitation +gravitational +gravitationally +gravities +gravity +gravy +gray +grayed +grayer +grayest +graying +grayly +grayness +grays +graze +grazed +grazer +grazes +grazing +grease +greased +greaser +greasers +greases +greasier +greasiness +greasing +greasy +great +greaten +greatened +greatening +greater +greatest +greatly +greatness +greats +greed +greedier +greedily +greediness +greedy +green +greened +greener +greenest +greenhouse +greenhouse's +greenhouses +greening +greenish +greenishness +greenly +greenness +greens +greet +greeted +greeter +greeting +greetings +greets +grenade +grenade's +grenades +grew +grey +greyest +greying +grid +grid's +grids +grief +grief's +griefs +grievance +grievance's +grievances +grieve +grieved +griever +grievers +grieves +grieving +grievingly +grievous +grievously +grievousness +grill +grilled +griller +grilling +grills +grim +grimed +griming +grimly +grimness +grin +grind +grinder +grinders +grinding +grindingly +grindings +grinds +grindstone +grindstone's +grindstones +grins +grip +gripe +griped +griper +gripes +griping +gripped +gripper +gripper's +grippers +gripping +grippingly +grips +grit +grit's +grits +grizzlier +grizzly +groan +groaned +groaner +groaners +groaning +groans +grocer +grocer's +groceries +grocers +grocery +groom +groom's +groomed +groomer +grooming +grooms +groove +grooved +groover +grooves +grooving +grope +groped +groper +gropes +groping +gross +grossed +grosser +grosses +grossest +grossing +grossly +grossness +grotesque +grotesquely +grotesqueness +grotto +grotto's +grottos +ground +grounded +grounder +grounders +grounding +grounds +groundwork +group +group's +grouped +grouper +grouping +groupings +groups +grouse +groused +grouser +grouses +grousing +grove +grovel +grovels +grover +grovers +groves +grow +grower +growers +growing +growingly +growl +growled +growler +growlier +growliness +growling +growlingly +growls +growly +grown +grownup +grownup's +grownups +grows +growth +growths +grub +grub's +grubs +grudge +grudge's +grudged +grudger +grudges +grudging +grudgingly +gruesome +gruesomely +gruesomeness +gruff +gruffly +gruffness +grumble +grumbled +grumbler +grumbles +grumbling +grumblingly +grunt +grunted +grunter +grunting +grunts +guarantee +guaranteed +guaranteeing +guaranteer +guaranteers +guarantees +guaranty +guard +guarded +guardedly +guardedness +guarder +guardian +guardian's +guardians +guardianship +guarding +guards +guerrilla +guerrilla's +guerrillas +guess +guessed +guesser +guesses +guessing +guest +guest's +guested +guesting +guests +guidance +guidances +guide +guidebook +guidebook's +guidebooks +guided +guideline +guideline's +guidelines +guider +guides +guiding +guild +guilder +guile +guilt +guiltier +guiltiest +guiltily +guiltiness +guiltless +guiltlessly +guiltlessness +guilts +guilty +guinea +guineas +guise +guise's +guised +guises +guising +guitar +guitar's +guitars +gulch +gulch's +gulches +gulf +gulf's +gulfs +gull +gulled +gullibility +gullied +gullies +gulling +gulls +gully +gully's +gullying +gulp +gulped +gulper +gulps +gum +gum's +gums +gun +gun's +gunfire +gunfires +gunned +gunner +gunner's +gunners +gunning +gunpowder +gunpowders +guns +gurgle +gurgled +gurgles +gurgling +guru +guru's +gurus +gush +gushed +gusher +gushes +gushing +gust +gust's +gusts +gut +guts +gutser +gutter +guttered +guttering +gutters +guy +guy's +guyed +guyer +guyers +guying +guys +gym +gymnasium +gymnasium's +gymnasiums +gymnast +gymnast's +gymnastic +gymnastics +gymnasts +gyms +gypsied +gypsies +gypsy +gypsy's +gypsying +gyration +gyrations +gyroscope +gyroscope's +gyroscopes +ha +habit +habit's +habitable +habitableness +habitat +habitat's +habitation +habitation's +habitations +habitats +habits +habitual +habitually +habitualness +hack +hacked +hacker +hacker's +hackers +hacking +hacks +had +hadn't +hag +hagen +haggard +haggardly +haggardness +hail +hailed +hailer +hailing +hails +hair +hair's +haircut +haircut's +haircuts +hairdresser +hairdresser's +hairdressers +haired +hairier +hairiness +hairless +hairlessness +hairs +hairy +hale +haler +half +halfness +halfway +halfword +halfword's +halfwords +haling +hall +hall's +haller +hallmark +hallmark's +hallmarked +hallmarking +hallmarks +hallow +hallowed +hallowing +hallows +halls +hallway +hallway's +hallways +halt +halted +halter +haltered +haltering +halters +halting +haltingly +halts +halve +halved +halvers +halves +halving +ham +ham's +hamburger +hamburger's +hamburgers +hamlet +hamlet's +hamlets +hammer +hammered +hammerer +hammering +hammers +hammock +hammock's +hammocks +hamper +hampered +hampering +hampers +hams +hand +handbag +handbag's +handbags +handbook +handbook's +handbooks +handcuff +handcuffed +handcuffing +handcuffs +handed +handedly +handedness +hander +handers +handful +handfuls +handicap +handicap's +handicapped +handicaps +handier +handiest +handily +handiness +handing +handiwork +handkerchief +handkerchief's +handkerchiefs +handle +handled +handler +handlers +handles +handling +hands +handshake +handshake's +handshaker +handshakes +handshaking +handsome +handsomely +handsomeness +handsomer +handsomest +handwriting +handwritten +handy +hang +hangar +hangar's +hangars +hanged +hanger +hangers +hanging +hangover +hangover's +hangovers +hangs +hap +haphazard +haphazardly +haphazardness +hapless +haplessly +haplessness +haply +happen +happened +happening +happenings +happens +happier +happiest +happily +happiness +happy +harass +harassed +harasser +harasses +harassing +harassment +harassments +hard +harden +hardened +hardener +hardening +hardens +harder +hardest +hardier +hardiness +harding +hardings +hardly +hardness +hardnesses +hards +hardship +hardship's +hardships +hardware +hardwares +hardy +hare +hare's +hares +hark +harked +harken +harking +harks +harlot +harlot's +harlots +harm +harmed +harmer +harmful +harmfully +harmfulness +harming +harmless +harmlessly +harmlessness +harmonies +harmonious +harmoniously +harmoniousness +harmony +harms +harness +harnessed +harnesser +harnesses +harnessing +harp +harped +harper +harpers +harping +harpings +harps +harried +harrier +harrow +harrowed +harrower +harrowing +harrows +harry +harrying +harsh +harshen +harshened +harshening +harsher +harshest +harshly +harshness +hart +harvest +harvested +harvester +harvesters +harvesting +harvests +has +hash +hashed +hasher +hashes +hashing +hasn't +hassle +hassled +hassler +hassles +hassling +haste +hasted +hasten +hastened +hastener +hastening +hastens +hastes +hastier +hastiest +hastily +hastiness +hasting +hastings +hasty +hat +hat's +hatch +hatched +hatcher +hatcheries +hatchery +hatchery's +hatches +hatchet +hatchet's +hatchets +hatching +hate +hated +hateful +hatefully +hatefulness +hater +hates +hath +hating +hatred +hats +haughtier +haughtily +haughtiness +haughty +haul +hauled +hauler +haulers +hauling +hauls +haunch +haunch's +haunches +haunt +haunted +haunter +haunting +hauntingly +haunts +have +haven +haven's +haven't +havens +haver +havering +havers +haves +having +havoc +havocs +hawk +hawked +hawker +hawkers +hawking +hawks +hay +hayer +haying +hays +hazard +hazard's +hazarded +hazarding +hazardous +hazardously +hazardousness +hazards +haze +haze's +hazed +hazel +hazer +hazes +hazier +haziest +haziness +hazing +hazy +he +he'd +he'll +he's +head +head's +headache +headache's +headaches +headed +header +headers +headgear +heading +heading's +headings +headland +headland's +headlands +headline +headlined +headliner +headlines +headlining +headlong +headphone +headphone's +headphones +headquarters +heads +headway +heal +healed +healer +healers +healing +heals +health +healthful +healthfully +healthfulness +healthier +healthiest +healthily +healthiness +healthy +heap +heaped +heaping +heaps +hear +heard +hearer +hearers +hearest +hearing +hearings +hearken +hearkened +hearkening +hears +hearsay +hearses +hearsing +heart +heart's +heartache +heartache's +heartaches +hearted +heartedly +hearten +heartened +heartening +hearteningly +heartens +hearth +heartier +hearties +heartiest +heartily +heartiness +heartless +heartlessly +heartlessness +hearts +hearty +heat +heatable +heated +heatedly +heater +heaters +heath +heathen +heather +heating +heats +heave +heaved +heaven +heaven's +heavenliness +heavenly +heavens +heaver +heavers +heaves +heavier +heavies +heaviest +heavily +heaviness +heaving +heavy +hedge +hedged +hedgehog +hedgehog's +hedgehogs +hedger +hedges +hedging +hedgingly +heed +heeded +heeding +heedless +heedlessly +heedlessness +heeds +heel +heeled +heeler +heelers +heeling +heels +heifer +height +heighten +heightened +heightening +heightens +heights +heinous +heinously +heinousness +heir +heir's +heiress +heiress's +heiresses +heirs +held +hell +hell's +heller +hello +hellos +hells +helm +helmet +helmet's +helmeted +helmets +help +helped +helper +helpers +helpful +helpfully +helpfulness +helping +helpless +helplessly +helplessness +helps +hem +hem's +hemisphere +hemisphere's +hemisphered +hemispheres +hemlock +hemlock's +hemlocks +hemostat +hemostats +hemp +hempen +hems +hen +hen's +hence +henceforth +henchman +henchmen +hens +her +herald +heralded +heralding +heralds +herb +herb's +herbivore +herbivorous +herbivorously +herbs +herd +herded +herder +herding +herds +here +here's +hereabout +hereabouts +hereafter +hereby +hereditary +heredity +herein +hereinafter +heres +heresy +heretic +heretic's +heretics +heretofore +herewith +heritage +heritages +hermit +hermit's +hermits +hero +hero's +heroes +heroic +heroically +heroics +heroin +heroine +heroine's +heroines +heroism +heron +heron's +herons +heros +herring +herring's +herrings +hers +herself +hesitant +hesitantly +hesitate +hesitated +hesitater +hesitates +hesitating +hesitatingly +hesitation +hesitations +heterogeneous +heterogeneously +heterogeneousness +heuristic +heuristic's +heuristically +heuristics +hew +hewed +hewer +hewing +hews +hex +hexadecimal +hexagonal +hexagonally +hexer +hey +hickories +hickory +hid +hidden +hide +hided +hideous +hideously +hideousness +hideout +hideout's +hideouts +hider +hides +hiding +hierarchical +hierarchically +hierarchies +hierarchy +hierarchy's +high +higher +highest +highland +highlander +highlands +highlight +highlighted +highlighting +highlights +highly +highness +highness's +highnesses +highway +highway's +highways +hijack +hijacked +hijacker +hijackers +hijacking +hijacks +hike +hiked +hiker +hikers +hikes +hiking +hilarious +hilariously +hilariousness +hill +hill's +hilled +hiller +hilling +hillock +hillocks +hills +hillside +hilltop +hilltop's +hilltops +hilt +hilt's +hilts +him +hims +himself +hind +hinder +hindered +hinderer +hindering +hinders +hindrance +hindrances +hinds +hindsight +hinge +hinged +hinger +hinges +hinging +hint +hinted +hinter +hinting +hints +hip +hip's +hipness +hips +hire +hired +hirer +hirers +hires +hiring +hirings +his +hiss +hissed +hisser +hisses +hissing +histogram +histogram's +histograms +historian +historian's +historians +historic +historical +historically +historicalness +histories +history +history's +hit +hit's +hitch +hitched +hitcher +hitches +hitchhike +hitchhiked +hitchhiker +hitchhikers +hitchhikes +hitchhiking +hitching +hither +hitherto +hits +hitter +hitter's +hitters +hitting +hive +hives +hiving +hoar +hoard +hoarded +hoarder +hoarding +hoards +hoarier +hoariness +hoarse +hoarsely +hoarseness +hoarser +hoarsest +hoary +hoax +hoax's +hoaxed +hoaxer +hoaxes +hoaxing +hobbies +hobble +hobbled +hobbler +hobbles +hobbling +hobby +hobby's +hobbyist +hobbyist's +hobbyists +hockey +hoe +hoe's +hoer +hoes +hog +hog's +hogs +hoist +hoisted +hoister +hoisting +hoists +hold +holden +holder +holders +holding +holdings +holds +hole +hole's +holed +holes +holiday +holiday's +holidayer +holidays +holier +holies +holiness +holing +holistic +hollies +hollow +hollowed +hollower +hollowest +hollowing +hollowly +hollowness +hollows +holly +holocaust +hologram +hologram's +holograms +holy +homage +homaged +homager +homages +homaging +home +homebuilt +homed +homeless +homelessness +homelier +homeliness +homely +homemade +homemaker +homemaker's +homemakers +homeomorphic +homeomorphism +homeomorphism's +homeomorphisms +homer +homers +homes +homesick +homesickness +homespun +homestead +homesteader +homesteaders +homesteads +homeward +homewards +homework +homeworker +homeworkers +homing +homogeneities +homogeneity +homogeneity's +homogeneous +homogeneously +homogeneousness +homomorphic +homomorphism +homomorphism's +homomorphisms +hone +honed +honer +hones +honest +honestly +honesty +honey +honeycomb +honeycombed +honeyed +honeying +honeymoon +honeymooned +honeymooner +honeymooners +honeymooning +honeymoons +honeys +honeysuckle +honing +honorary +hood +hood's +hooded +hoodedness +hooding +hoods +hoodwink +hoodwinked +hoodwinker +hoodwinking +hoodwinks +hoof +hoof's +hoofed +hoofer +hoofs +hook +hooked +hookedness +hooker +hookers +hooking +hooks +hoop +hooped +hooper +hooping +hoops +hooray +hooray's +hoorays +hoot +hooted +hooter +hooters +hooting +hoots +hop +hope +hoped +hopeful +hopefully +hopefulness +hopefuls +hopeless +hopelessly +hopelessness +hoper +hopes +hoping +hopped +hopper +hopper's +hoppers +hopping +hops +horde +horde's +hordes +horizon +horizon's +horizons +horizontal +horizontally +hormone +hormone's +hormones +horn +horned +hornedness +hornet +hornet's +hornets +horns +horrendous +horrendously +horrible +horribleness +horribly +horrid +horridly +horridness +horrified +horrifies +horrify +horrifying +horrifyingly +horror +horror's +horrors +horse +horse's +horseback +horsely +horseman +horsepower +horsepowers +horses +horseshoe +horseshoer +horseshoes +horsing +hose +hose's +hosed +hoses +hosing +hospitable +hospitably +hospital +hospital's +hospitality +hospitals +host +host's +hostage +hostage's +hostages +hosted +hostess +hostess's +hostesses +hostile +hostilely +hostilities +hostility +hosting +hostly +hosts +hot +hotel +hotel's +hotels +hotly +hotness +hotter +hottest +hound +hounded +hounder +hounding +hounds +hour +hour's +hourly +hours +house +house's +housed +houseflies +housefly +housefly's +household +household's +householder +householders +households +housekeeper +housekeeper's +housekeepers +housekeeping +houser +houses +housetop +housetop's +housetops +housewife +housewife's +housewifeliness +housewifely +housework +houseworker +houseworkers +housing +housings +hovel +hovel's +hovels +hover +hovered +hoverer +hovering +hovers +how +how's +however +howl +howled +howler +howling +howls +hows +hrs +hub +hub's +hubris +hubs +huddle +huddled +huddler +huddles +huddling +hue +hue's +hued +hues +hug +huge +hugely +hugeness +huger +hugest +hugs +huh +hull +hull's +hulled +huller +hulling +hulls +hum +human +humane +humanely +humaneness +humanities +humanity +humanity's +humanly +humanness +humans +humble +humbled +humbleness +humbler +humbles +humblest +humbling +humbly +humid +humidification +humidifications +humidified +humidifier +humidifiers +humidifies +humidify +humidifying +humidities +humidity +humidly +humiliate +humiliated +humiliates +humiliating +humiliatingly +humiliation +humiliations +humility +hummed +humming +humorous +humorously +humorousness +hump +humped +humping +humps +hums +hunch +hunched +hunches +hundred +hundreds +hundredth +hung +hunger +hungered +hungering +hungers +hungrier +hungriest +hungrily +hungriness +hungry +hunk +hunk's +hunker +hunkered +hunkering +hunkers +hunks +hunt +hunted +hunter +hunters +hunting +hunts +huntsman +hurdle +hurdled +hurdler +hurdles +hurdling +hurl +hurled +hurler +hurlers +hurling +hurrah +hurricane +hurricane's +hurricanes +hurried +hurriedly +hurriedness +hurrier +hurries +hurry +hurrying +hurt +hurter +hurting +hurtingly +hurts +husband +husband's +husbander +husbandly +husbandry +husbands +hush +hushed +hushes +hushing +husk +husked +husker +huskier +huskies +huskiness +husking +husks +husky +hustle +hustled +hustler +hustlers +hustles +hustling +hut +hut's +huts +hyacinth +hybrid +hybrids +hydraulic +hydraulically +hydraulics +hydrodynamic +hydrodynamics +hydrogen +hydrogen's +hydrogens +hygiene +hymn +hymn's +hymning +hymns +hype +hype's +hyped +hyper +hyperbolic +hypertext +hypertext's +hypes +hyphen +hyphen's +hyphened +hyphening +hyphens +hypocrisies +hypocrisy +hypocrite +hypocrite's +hypocrites +hypodermic +hypodermics +hypotheses +hypothesis +hypothetical +hypothetically +hysteresis +hysterical +hysterically +ice +iceberg +iceberg's +icebergs +iced +ices +icier +iciest +iciness +icing +icings +icon +icon's +icons +icy +id +id's +idea +idea's +ideal +idealism +idealistic +ideally +ideals +ideas +identical +identically +identicalness +identifiable +identifiably +identification +identifications +identified +identifier +identifiers +identifies +identify +identifying +identities +identity +identity's +ideological +ideologically +ideologies +ideology +idiocies +idiocy +idiosyncrasies +idiosyncrasy +idiosyncrasy's +idiosyncratic +idiot +idiot's +idiotic +idiots +idle +idled +idleness +idler +idlers +idles +idlest +idling +idly +idol +idol's +idolatry +idols +if +ignition +ignoble +ignobleness +ignorance +ignorant +ignorantly +ignorantness +ignore +ignored +ignorer +ignores +ignoring +ii +iii +ill +illegal +illegalities +illegality +illegally +illicit +illicitly +illiterate +illiterately +illiterateness +illiterates +illness +illness's +illnesses +illogical +illogically +illogicalness +ills +illuminate +illuminated +illuminates +illuminating +illuminatingly +illumination +illuminations +illuminative +illusion +illusion's +illusions +illusive +illusively +illusiveness +illustrate +illustrated +illustrates +illustrating +illustration +illustrations +illustrative +illustratively +illustrator +illustrator's +illustrators +illustrious +illustriously +illustriousness +illy +image +imaged +images +imaginable +imaginableness +imaginably +imaginariness +imaginary +imagination +imagination's +imaginations +imaginative +imaginatively +imaginativeness +imagine +imagined +imaginer +imagines +imaging +imagining +imaginings +imbalance +imbalances +imitate +imitated +imitates +imitating +imitation +imitations +imitative +imitatively +imitativeness +immaculate +immaculately +immaculateness +immaterial +immaterially +immaterialness +immature +immaturely +immatureness +immaturity +immediacies +immediacy +immediate +immediately +immediateness +immemorial +immemorially +immense +immensely +immenseness +immerse +immersed +immerser +immerses +immersing +immersion +immersions +immigrant +immigrant's +immigrants +immigrate +immigrated +immigrates +immigrating +immigration +imminent +imminently +imminentness +immoral +immoralities +immorality +immorally +immortal +immortality +immortally +immortals +immovability +immovable +immovableness +immovably +immune +immunities +immunity +immunity's +immunology +immutable +immutableness +imp +imp's +impact +impacted +impacter +impacting +impaction +impactions +impactive +impactor +impactor's +impactors +impacts +impair +impaired +impairer +impairing +impairs +impart +imparted +impartial +impartially +imparting +imparts +impasse +impasses +impassion +impassioned +impassioning +impassions +impassive +impassively +impassiveness +impatience +impatient +impatiently +impeach +impeached +impeaches +impeaching +impedance +impedance's +impedances +impede +impeded +impeder +impedes +impediment +impediment's +impediments +impeding +impel +impels +impending +impenetrability +impenetrable +impenetrableness +impenetrably +imperative +imperatively +imperativeness +imperatives +imperfect +imperfection +imperfection's +imperfections +imperfective +imperfectly +imperfectness +imperial +imperialism +imperialist +imperialist's +imperialists +imperially +imperil +imperious +imperiously +imperiousness +impermanence +impermanent +impermanently +impermissible +impersonal +impersonally +impersonate +impersonated +impersonates +impersonating +impersonation +impersonations +impertinent +impertinently +imperturbability +impervious +imperviously +imperviousness +impetuous +impetuously +impetuousness +impetus +impinge +impinged +impinges +impinging +impious +impiously +implant +implanted +implanter +implanting +implants +implausible +implement +implementable +implementation +implementation's +implementations +implemented +implementer +implementers +implementing +implementor +implementor's +implementors +implements +implicant +implicant's +implicants +implicate +implicated +implicates +implicating +implication +implications +implicative +implicatively +implicativeness +implicit +implicitly +implicitness +implied +implies +implore +implored +implores +imploring +imply +implying +import +importance +important +importantly +importation +importations +imported +importer +importers +importing +imports +impose +imposed +imposer +imposes +imposing +imposingly +imposition +imposition's +impositions +impossibilities +impossibility +impossible +impossibleness +impossibles +impossibly +impostor +impostor's +impostors +impotence +impotent +impotently +impoverish +impoverished +impoverisher +impoverishes +impoverishing +impoverishment +impracticable +impracticableness +impractical +impracticality +impractically +impracticalness +imprecise +imprecisely +impreciseness +imprecision +impregnable +impregnableness +impress +impressed +impresser +impresses +impressing +impression +impression's +impressionable +impressionableness +impressionist +impressionistic +impressionists +impressions +impressive +impressively +impressiveness +impressment +imprint +imprinted +imprinting +imprints +imprison +imprisoned +imprisoning +imprisonment +imprisonment's +imprisonments +imprisons +improbable +improbableness +impromptu +improper +improperly +improperness +improve +improved +improvement +improvements +improver +improves +improving +improvisation +improvisation's +improvisational +improvisations +improvise +improvised +improviser +improvisers +improvises +improvising +imps +impudent +impudently +impulse +impulsed +impulses +impulsing +impulsion +impulsions +impulsive +impulsively +impulsiveness +impunity +impure +impurely +impureness +impurities +impurity +impurity's +impute +imputed +imputes +imputing +in +inabilities +inability +inaccessibility +inaccessible +inaccessibly +inaccuracies +inaccuracy +inaccurate +inaccurately +inactions +inactivation +inactive +inactively +inactivity +inadequacies +inadequacy +inadequate +inadequately +inadequateness +inadmissibility +inadmissible +inadvertent +inadvertently +inadvisability +inadvisable +inalterable +inalterableness +inane +inanely +inaneness +inaner +inanest +inanimate +inanimately +inanimateness +inapparently +inapplicability +inapplicable +inappreciable +inappreciably +inappreciative +inappreciatively +inappreciativeness +inapproachable +inappropriate +inappropriately +inappropriateness +inapt +inaptly +inaptness +inarguable +inarguably +inarticulable +inartistic +inartistically +inasmuch +inattentive +inattentively +inattentiveness +inaudible +inaudibly +inaugural +inaugurate +inaugurated +inaugurating +inauguration +inaugurations +inauspicious +inauspiciously +inauspiciousness +inauthentic +inauthenticity +inboards +inborn +inbounds +inbred +inbuilt +incantation +incantations +incapable +incapableness +incapably +incapacitating +incarnation +incarnation's +incarnations +incautious +incautiously +incautiousness +incendiaries +incendiary +incense +incensed +incenses +incensing +incentive +incentive's +incentively +incentives +inception +inceptions +incessant +incessantly +inch +inched +inches +inching +incidence +incidences +incident +incident's +incidental +incidentally +incidentals +incidents +incipient +incipiently +incision +incision's +incisions +incitations +incite +incited +inciter +incites +inciting +incivility +inclination +inclination's +inclinations +incline +inclined +incliner +inclines +inclining +inclose +inclosed +incloses +inclosing +include +included +includes +including +inclusion +inclusion's +inclusions +inclusive +inclusively +inclusiveness +incoherence +incoherences +incoherent +incoherently +income +incomer +incomers +incomes +incoming +incommensurate +incomparability +incomparable +incomparably +incompatibilities +incompatibility +incompatibility's +incompatible +incompatibly +incompetence +incompetent +incompetent's +incompetently +incompetents +incomplete +incompletely +incompleteness +incompletion +incomprehensibility +incomprehensible +incomprehensibleness +incomprehensibly +incomprehension +incompressible +incomputable +inconceivable +inconceivableness +inconceivably +inconclusive +inconclusively +inconclusiveness +inconformity +incongruence +incongruent +incongruently +inconsequential +inconsequentially +inconsequently +inconsiderable +inconsiderableness +inconsiderably +inconsiderate +inconsiderately +inconsiderateness +inconsideration +inconsistencies +inconsistency +inconsistency's +inconsistent +inconsistently +inconsolable +inconsolableness +inconspicuous +inconspicuously +inconspicuousness +inconstancy +inconstantly +incontestable +incontinently +incontrollable +inconvenience +inconvenienced +inconveniences +inconveniencing +inconvenient +inconveniently +inconvertibility +inconvertible +incorporate +incorporated +incorporates +incorporating +incorporation +incorporative +incorrect +incorrectly +incorrectness +incorruption +increase +increased +increaser +increases +increasing +increasingly +incredibility +incredible +incredibleness +incredibly +incredulity +incredulous +incredulously +increment +incremental +incrementally +incremented +incrementing +increments +incubate +incubated +incubates +incubating +incubation +incubative +incubator +incubator's +incubators +incur +incurable +incurableness +incurables +incurably +incurred +incurring +incurs +indebted +indebtedness +indecent +indecently +indecision +indecisive +indecisively +indecisiveness +indecomposable +indeed +indefinable +indefinableness +indefinite +indefinitely +indefiniteness +indemnity +indent +indentation +indentation's +indentations +indented +indenter +indenting +indents +independence +independent +independently +independents +indescribable +indescribableness +indeterminable +indeterminableness +indeterminacies +indeterminacy +indeterminacy's +indeterminate +indeterminately +indeterminateness +indetermination +indeterminism +indeterministic +index +indexable +indexed +indexer +indexers +indexes +indexing +indicate +indicated +indicates +indicating +indication +indications +indicative +indicatively +indicatives +indicator +indicator's +indicators +indices +indictment +indictment's +indictments +indifference +indifferent +indifferently +indigenous +indigenously +indigenousness +indigested +indigestible +indigestion +indignant +indignantly +indignation +indignities +indignity +indigo +indirect +indirected +indirecting +indirection +indirections +indirectly +indirectness +indirects +indiscernible +indiscipline +indisciplined +indiscreet +indiscreetly +indiscreetness +indiscriminate +indiscriminately +indiscriminateness +indiscriminating +indiscriminatingly +indiscrimination +indispensability +indispensable +indispensableness +indispensably +indisposed +indisposes +indistinct +indistinctive +indistinctly +indistinctness +indistinguishable +indistinguishableness +individual +individual's +individualistic +individuality +individually +individuals +indivisibility +indivisible +indivisibleness +indoctrinate +indoctrinated +indoctrinates +indoctrinating +indoctrination +indolent +indolently +indomitable +indomitableness +indoor +indoors +induce +induced +inducement +inducement's +inducements +inducer +induces +inducing +induct +inductance +inductances +inducted +inducting +induction +induction's +inductions +inductive +inductively +inductiveness +inductor +inductor's +inductors +inducts +indulge +indulged +indulgence +indulgence's +indulgences +indulger +indulges +indulging +industrial +industrialist +industrialist's +industrialists +industrially +industrials +industries +industrious +industriously +industriousness +industry +industry's +inedited +ineffective +ineffectively +ineffectiveness +inefficacy +inefficiencies +inefficiency +inefficient +inefficiently +inelastically +inelegant +inelegantly +ineloquent +ineloquently +inequalities +inequality +inequitably +inequities +inequity +inert +inertia +inertias +inertly +inertness +inescapable +inescapably +inessential +inestimable +inevitabilities +inevitability +inevitable +inevitableness +inevitably +inexact +inexactitude +inexactly +inexactness +inexcusable +inexcusableness +inexcusably +inexhaustible +inexhaustibleness +inexistent +inexorable +inexorableness +inexorably +inexpedient +inexpediently +inexpensive +inexpensively +inexpensiveness +inexperience +inexperienced +inexplainable +inexplicable +inexplicableness +inexplicably +inexpressibility +inexpressible +inexpressibleness +inexpressibly +inexpressive +inexpressively +inexpressiveness +inextensible +infallibility +infallible +infallibly +infamous +infamously +infancy +infant +infant's +infantry +infants +infeasible +infect +infected +infecting +infection +infection's +infections +infectious +infectiously +infectiousness +infective +infects +infer +inference +inference's +inferencer +inferences +inferencing +inferential +inferentially +inferior +inferior's +inferiority +inferiorly +inferiors +infernal +infernally +inferno +inferno's +infernos +inferred +inferring +infers +infertility +infest +infested +infester +infesting +infests +infidel +infidel's +infidelity +infidels +infields +infighter +infighter's +infighters +infighting +infiltrate +infiltrated +infiltrates +infiltrating +infiltration +infiltrative +infinite +infinitely +infiniteness +infinitesimal +infinitesimally +infinities +infinitive +infinitive's +infinitively +infinitives +infinitum +infinity +infirmity +infix +infix's +infixes +inflame +inflamed +inflamer +inflaming +inflammable +inflammableness +inflatable +inflate +inflated +inflater +inflates +inflating +inflation +inflationary +inflexibility +inflexible +inflexibleness +inflexibly +inflict +inflicted +inflicter +inflicting +inflictive +inflicts +inflows +influence +influenced +influencer +influences +influencing +influent +influential +influentially +influenza +inform +informal +informality +informally +informant +informant's +informants +information +informational +informations +informative +informatively +informativeness +informed +informer +informers +informing +informs +infractions +infrastructure +infrastructures +infrequent +infrequently +infringe +infringed +infringement +infringement's +infringements +infringer +infringes +infringing +infuriate +infuriated +infuriately +infuriates +infuriating +infuriatingly +infuriation +infuse +infused +infuser +infuses +infusing +infusion +infusions +ingenious +ingeniously +ingeniousness +ingenuity +inglorious +ingloriously +ingloriousness +ingot +ingrained +ingrainedly +ingrains +ingratitude +ingredient +ingredient's +ingredients +ingrown +ingrownness +ingrowth +ingrowths +inhabit +inhabitable +inhabitance +inhabitant +inhabitant's +inhabitants +inhabited +inhabiter +inhabiting +inhabits +inhale +inhaled +inhaler +inhales +inhaling +inharmonious +inharmoniously +inharmoniousness +inhere +inhered +inherent +inherently +inheres +inhering +inherit +inheritable +inheritableness +inheritance +inheritance's +inheritances +inherited +inheriting +inheritor +inheritor's +inheritors +inheritress +inheritress's +inheritresses +inheritrices +inheritrix +inherits +inhibit +inhibited +inhibiter +inhibiting +inhibition +inhibition's +inhibitions +inhibitive +inhibitors +inhibits +inholding +inholdings +inhomogeneities +inhomogeneity +inhospitable +inhospitableness +inhospitably +inhospitality +inhuman +inhumane +inhumanely +inhumanities +inhumanly +inhumanness +inion +iniquities +iniquity +iniquity's +initial +initialness +initials +initiate +initiated +initiates +initiating +initiation +initiations +initiative +initiative's +initiatives +initiator +initiator's +initiators +inject +injected +injecting +injection +injection's +injections +injective +injects +injudicious +injudiciously +injudiciousness +injunction +injunction's +injunctions +injure +injured +injurer +injures +injuries +injuring +injurious +injuriously +injuriousness +injury +injury's +injustice +injustice's +injustices +ink +inked +inker +inkers +inking +inkings +inkling +inkling's +inklings +inks +inlaid +inland +inlander +inlet +inlet's +inlets +inlier +inly +inlying +inmate +inmate's +inmates +inn +innards +innate +innately +innateness +inner +innerly +innermost +inning +innings +innocence +innocent +innocently +innocents +innocuous +innocuously +innocuousness +innovate +innovated +innovates +innovating +innovation +innovation's +innovations +innovative +innovativeness +inns +innumerability +innumerable +innumerableness +innumerably +inoperable +inopportune +inopportunely +inopportuneness +inordinate +inordinately +inordinateness +inorganic +input +input's +inputed +inputer +inputing +inputs +inputting +inquietude +inquire +inquired +inquirer +inquirers +inquires +inquiries +inquiring +inquiringly +inquiry +inquiry's +inquisition +inquisition's +inquisitions +inquisitive +inquisitively +inquisitiveness +inroad +inroads +ins +insane +insanely +insaneness +insanitary +insanity +inscribe +inscribed +inscriber +inscribes +inscribing +inscription +inscription's +inscriptions +insect +insect's +insects +insecure +insecurely +insecureness +insecurity +insensible +insensibleness +insensibly +insensitive +insensitively +insensitiveness +insensitivity +inseparable +inseparableness +insert +inserted +inserter +inserting +insertion +insertion's +insertions +inserts +insets +insetting +inside +insider +insiders +insides +insidious +insidiously +insidiousness +insight +insight's +insightful +insightfully +insights +insignia +insignias +insignificance +insignificances +insignificant +insignificantly +insincerity +insinuate +insinuated +insinuates +insinuating +insinuatingly +insinuation +insinuations +insinuative +insist +insisted +insistence +insistent +insistently +insisting +insists +insociability +insociable +insociably +insofar +insolence +insolent +insolently +insolubility +insoluble +insolubleness +insolvable +inspect +inspected +inspecting +inspection +inspection's +inspections +inspective +inspector +inspector's +inspectors +inspects +inspiration +inspiration's +inspirations +inspire +inspired +inspirer +inspires +inspiring +instabilities +instability +install +installation +installation's +installations +installed +installer +installers +installing +installment +installment's +installments +installs +instance +instanced +instances +instancing +instant +instantaneous +instantaneously +instantaneousness +instanter +instantiate +instantiated +instantiates +instantiating +instantiation +instantiation's +instantiations +instantly +instantness +instants +instated +instates +instead +insteps +instigate +instigated +instigates +instigating +instigation +instigative +instigator +instigator's +instigators +instills +instinct +instinct's +instinctive +instinctively +instincts +institute +instituted +instituter +instituters +institutes +instituting +institution +institution's +institutional +institutionally +institutions +institutive +instruct +instructed +instructing +instruction +instruction's +instructional +instructions +instructive +instructively +instructiveness +instructor +instructor's +instructors +instructs +instrument +instrumental +instrumentalist +instrumentalist's +instrumentalists +instrumentally +instrumentals +instrumentation +instrumented +instrumenting +instruments +insufficiencies +insufficiency +insufficient +insufficiently +insulate +insulated +insulates +insulating +insulation +insulations +insulator +insulator's +insulators +insult +insulted +insulter +insulting +insultingly +insults +insuperable +insupportable +insupportableness +insurance +insurances +insure +insured +insurer +insurers +insures +insurgent +insurgent's +insurgents +insuring +insurmountable +insurrection +insurrection's +insurrections +insusceptible +intact +intactness +intakes +intangible +intangible's +intangibleness +intangibles +intangibly +integer +integer's +integers +integral +integral's +integrally +integrals +integrate +integrated +integrates +integrating +integration +integrations +integrative +integrity +intellect +intellect's +intellective +intellectively +intellects +intellectual +intellectually +intellectualness +intellectuals +intelligence +intelligencer +intelligences +intelligent +intelligently +intelligibility +intelligible +intelligibleness +intelligibly +intemperance +intemperate +intemperately +intemperateness +intend +intended +intendedly +intendedness +intender +intending +intends +intense +intensely +intenseness +intensification +intensified +intensifier +intensifiers +intensifies +intensify +intensifying +intension +intensities +intensity +intensive +intensively +intensiveness +intent +intention +intentional +intentionally +intentioned +intentions +intently +intentness +intents +interact +interacted +interacting +interaction +interaction's +interactions +interactive +interactively +interactivity +interacts +intercept +intercepted +intercepter +intercepting +intercepts +interchange +interchangeability +interchangeable +interchangeableness +interchangeably +interchanged +interchanger +interchanges +interchanging +interchangings +intercity +intercommunicate +intercommunicated +intercommunicates +intercommunicating +intercommunication +interconnect +interconnected +interconnectedness +interconnecting +interconnection +interconnection's +interconnections +interconnectivity +interconnects +intercourse +interdependence +interdependencies +interdependency +interdependent +interdependently +interdisciplinary +interest +interested +interestedly +interesting +interestingly +interestingness +interests +interface +interfaced +interfacer +interfaces +interfacing +interfere +interfered +interference +interferences +interferer +interferes +interfering +interferingly +interim +interior +interior's +interiorly +interiors +interlace +interlaced +interlaces +interlacing +interleave +interleaved +interleaves +interleaving +interlink +interlinked +interlinking +interlinks +interlisp +interlisp's +intermediaries +intermediary +intermediate +intermediate's +intermediated +intermediately +intermediateness +intermediates +intermediating +intermediation +interminable +intermingle +intermingled +intermingles +intermingling +intermission +intermittent +intermittently +intermix +intermixed +intermixer +intermixes +intermixing +intermodule +intern +internal +internally +internals +international +internationality +internationally +internationals +interned +interning +interns +interpersonal +interpersonally +interplay +interpolate +interpolated +interpolates +interpolating +interpolation +interpolations +interpolative +interpose +interposed +interposer +interposes +interposing +interpret +interpretable +interpretation +interpretation's +interpretations +interpreted +interpreter +interpreters +interpreting +interpretive +interpretively +interprets +interprocess +interrelate +interrelated +interrelatedly +interrelatedness +interrelates +interrelating +interrelation +interrelations +interrelationship +interrelationship's +interrelationships +interrogate +interrogated +interrogates +interrogating +interrogation +interrogations +interrogative +interrogatively +interrogatives +interrupt +interrupted +interrupter +interrupters +interruptible +interrupting +interruption +interruption's +interruptions +interruptive +interrupts +intersect +intersected +intersecting +intersection +intersection's +intersections +intersects +intersperse +interspersed +intersperses +interspersing +interspersion +interspersions +interstage +interstate +intertask +intertwine +intertwined +intertwines +intertwining +interval +interval's +intervals +intervene +intervened +intervener +intervenes +intervening +intervention +intervention's +interventions +interview +interviewed +interviewee +interviewee's +interviewees +interviewer +interviewer's +interviewers +interviewing +interviews +interwoven +intestinal +intestinally +intestine +intestine's +intestines +intimacy +intimate +intimated +intimately +intimateness +intimater +intimates +intimating +intimation +intimations +intimidate +intimidated +intimidates +intimidating +intimidation +into +intolerability +intolerable +intolerableness +intolerably +intolerance +intolerant +intolerantly +intolerantness +intonation +intonation's +intonations +intoned +intoner +intoxicate +intoxicated +intoxicatedly +intoxicating +intoxication +intractability +intractable +intractableness +intractably +intramural +intramurally +intransigent +intransigently +intransigents +intransitive +intransitively +intransitiveness +intraprocess +intricacies +intricacy +intricate +intricately +intricateness +intrigue +intrigued +intriguer +intrigues +intriguing +intriguingly +intrinsic +intrinsically +intrinsics +introduce +introduced +introducer +introduces +introducing +introduction +introduction's +introductions +introductory +introspect +introspection +introspections +introspective +introspectively +introspectiveness +introvert +introverted +intrude +intruded +intruder +intruder's +intruders +intrudes +intruding +intrusion +intrusion's +intrusions +intrusive +intrusively +intrusiveness +intrust +intubate +intubated +intubates +intubating +intubation +intuition +intuition's +intuitionist +intuitions +intuitive +intuitively +intuitiveness +invade +invaded +invader +invaders +invades +invading +invalid +invalidate +invalidated +invalidates +invalidating +invalidation +invalidations +invalidities +invalidity +invalidly +invalidness +invalids +invaluable +invaluableness +invaluably +invariability +invariable +invariableness +invariably +invariance +invariant +invariantly +invariants +invasion +invasion's +invasions +invent +invented +inventing +invention +invention's +inventions +inventive +inventively +inventiveness +inventor +inventor's +inventories +inventors +inventory +inventory's +invents +inveracity +inverse +inversely +inverses +inversion +inversions +inversive +invert +invertebrate +invertebrate's +invertebrates +inverted +inverter +inverters +invertible +inverting +inverts +invest +invested +investigate +investigated +investigates +investigating +investigation +investigations +investigative +investigator +investigator's +investigators +investing +investment +investment's +investments +investor +investor's +investors +invests +inviability +inviable +invincible +invincibleness +invisibility +invisible +invisibleness +invisibly +invitation +invitation's +invitations +invite +invited +inviter +invites +inviting +invitingly +invocation +invocation's +invocations +invoice +invoiced +invoices +invoicing +invokable +invoke +invoked +invoker +invokers +invokes +invoking +involuntarily +involuntariness +involuntary +involve +involved +involvedly +involvement +involvement's +involvements +involver +involves +involving +invulnerable +invulnerableness +inward +inwardly +inwardness +inwards +inwrought +ioctl +iodine +ion +ions +irate +irately +irateness +ire +ire's +ires +iris +irises +irk +irked +irking +irks +irksome +irksomely +irksomeness +iron +ironed +ironer +ironical +ironically +ironicalness +ironies +ironing +ironings +ironness +irons +ironwork +ironwork's +ironworker +ironworks +irony +irrational +irrationality +irrationally +irrationalness +irrationals +irrecoverable +irrecoverableness +irreducible +irreducibly +irreflexive +irrefutable +irregular +irregularities +irregularity +irregularly +irregulars +irrelevance +irrelevances +irrelevant +irrelevantly +irrepressible +irresistible +irresistibleness +irrespective +irrespectively +irresponsible +irresponsibleness +irresponsibly +irreversible +irrigate +irrigated +irrigates +irrigating +irrigation +irrigations +irritate +irritated +irritates +irritating +irritatingly +irritation +irritations +irritative +is +island +islander +islanders +islands +isle +isle's +isles +islet +islet's +islets +isling +isn't +isolate +isolated +isolates +isolating +isolation +isolations +isometric +isometrics +isomorphic +isomorphically +isomorphism +isomorphism's +isomorphisms +isotope +isotope's +isotopes +ispell +ispell's +issuance +issue +issued +issuer +issuers +issues +issuing +isthmus +it +it'd +it'll +it's +italic +italics +itch +itches +itching +item +item's +items +iterate +iterated +iterates +iterating +iteration +iterations +iterative +iteratively +iterator +iterator's +iterators +itineraries +itinerary +its +itself +iv +ivied +ivies +ivories +ivory +ivy +ivy's +ix +jab +jab's +jabbed +jabbing +jabs +jack +jacked +jacker +jacket +jacketed +jackets +jacking +jacks +jade +jaded +jadedly +jadedness +jades +jading +jail +jailed +jailer +jailers +jailing +jails +jam +jammed +jamming +jams +janitor +janitor's +janitors +jar +jar's +jargon +jarred +jarring +jarringly +jars +jaunt +jaunt's +jaunted +jauntier +jauntiness +jaunting +jaunts +jaunty +javelin +javelin's +javelins +jaw +jaw's +jawed +jaws +jay +jazz +jealous +jealousies +jealously +jealousness +jealousy +jean +jean's +jeans +jeep +jeep's +jeeped +jeepers +jeeping +jeeps +jeer +jeer's +jeerer +jeers +jellied +jellies +jelly +jelly's +jellyfish +jellying +jenny +jerk +jerked +jerker +jerkier +jerkiness +jerking +jerkings +jerks +jerky +jersey +jersey's +jerseys +jest +jested +jester +jesting +jests +jet +jet's +jets +jetted +jetting +jewel +jewelries +jewelry +jewels +jig +jig's +jigs +jingle +jingled +jingler +jingles +jingling +job +job's +jobs +jocks +jocund +jocundly +jog +jogs +john +john's +johns +join +joined +joiner +joiners +joining +joins +joint +joint's +jointed +jointedly +jointedness +jointer +jointing +jointly +jointness +joints +joke +joked +joker +jokers +jokes +joking +jokingly +jollied +jollier +jollies +jolly +jollying +jolt +jolted +jolter +jolting +jolts +jostle +jostled +jostles +jostling +jot +jots +jotted +jotting +journal +journal's +journalism +journalist +journalist's +journalistic +journalists +journals +journey +journeyed +journeying +journeyings +journeys +joust +jousted +jouster +jousting +jousts +joy +joy's +joyful +joyfully +joyfulness +joyous +joyously +joyousness +joys +jubilee +judge +judged +judger +judges +judging +judicable +judicial +judicially +judiciaries +judiciary +judicious +judiciously +judiciousness +jug +jug's +juggle +juggled +juggler +jugglers +juggles +juggling +jugs +juice +juice's +juiced +juicer +juicers +juices +juicier +juiciest +juiciness +juicing +juicy +jumble +jumbled +jumbles +jumbling +jump +jumped +jumper +jumpers +jumpier +jumpiness +jumping +jumps +jumpy +junction +junction's +junctions +juncture +juncture's +junctures +jungle +jungle's +jungled +jungles +junior +junior's +juniors +juniper +junk +junker +junkers +junkie +junkies +junks +junky +juries +jurisdiction +jurisdiction's +jurisdictions +juror +juror's +jurors +jury +jury's +just +juster +justice +justice's +justices +justifiable +justifiably +justification +justifications +justified +justifier +justifier's +justifiers +justifies +justify +justifying +justing +justly +justness +jut +juvenile +juvenile's +juveniles +juxtapose +juxtaposed +juxtaposes +juxtaposing +kHz +keel +keeled +keeler +keeling +keels +keen +keener +keenest +keening +keenly +keenness +keep +keeper +keepers +keeping +keeps +ken +kennel +kennel's +kennels +kept +kerchief +kerchief's +kerchiefed +kerchiefs +kernel +kernel's +kernels +kerosene +ketchup +kettle +kettle's +kettles +key +keyboard +keyboard's +keyboarder +keyboarding +keyboards +keyclick +keyclick's +keyclicks +keyed +keying +keypad +keypad's +keypads +keys +keystroke +keystroke's +keystrokes +keyword +keyword's +keywords +kick +kicked +kicker +kickers +kicking +kickoff +kicks +kid +kid's +kidded +kidding +kiddingly +kidnap +kidnap's +kidnaps +kidney +kidney's +kidneys +kids +kill +killed +killer +killers +killing +killingly +killings +kills +kilobit +kilobits +kilobyte +kilobytes +kin +kind +kinder +kindergarten +kindest +kindhearted +kindheartedly +kindheartedness +kindle +kindled +kindler +kindles +kindlier +kindliness +kindling +kindly +kindness +kindnesses +kindred +kinds +king +kingdom +kingdom's +kingdoms +kinglier +kingliness +kingly +kings +kinkier +kinkiness +kinky +kinship +kinsman +kiss +kissed +kisser +kissers +kisses +kissing +kissings +kit +kit's +kitchen +kitchen's +kitchener +kitchens +kite +kited +kiter +kites +kiting +kits +kitsch +kitten +kitten's +kittened +kittening +kittens +kitties +kitty +kludge +kludge's +kludged +kludger +kludger's +kludgers +kludges +kludgey +kludging +klutz +klutz's +klutzes +klutziness +klutzy +knack +knacker +knacks +knapsack +knapsack's +knapsacks +knave +knave's +knaves +knead +kneaded +kneader +kneading +kneads +knee +kneed +kneeing +kneel +kneeled +kneeler +kneeling +kneels +knees +knell +knell's +knells +knelt +knew +knife +knifed +knifes +knifing +knight +knighted +knighthood +knighting +knightliness +knightly +knights +knit +knits +knives +knob +knob's +knobs +knock +knocked +knocker +knockers +knocking +knocks +knoll +knoll's +knolls +knot +knot's +knots +knotted +knotting +know +knowable +knower +knowhow +knowing +knowingly +knowledge +knowledgeable +knowledgeableness +knowledges +known +knows +knuckle +knuckled +knuckles +knuckling +kudos +lab +lab's +label +label's +labels +laboratories +laboratory +laboratory's +labs +labyrinth +labyrinths +lace +laced +lacer +lacerate +lacerated +lacerates +lacerating +laceration +lacerations +lacerative +laces +lacing +lack +lackadaisical +lackadaisically +lacked +lacker +lacking +lacks +lacquer +lacquered +lacquerer +lacquerers +lacquering +lacquers +lad +ladder +ladders +laded +laden +ladened +ladening +ladies +lading +lads +lady +lady's +lag +lager +lagers +lagged +lagoon +lagoon's +lagoons +lags +laid +lain +lair +lair's +lairs +lake +lake's +laker +lakes +laking +lamb +lamb's +lambda +lambda's +lambdas +lamber +lambs +lame +lamed +lamely +lameness +lament +lamentable +lamentableness +lamentation +lamentation's +lamentations +lamented +lamenting +laments +lamer +lames +lamest +laminar +laming +lamp +lamp's +lamper +lamps +lance +lanced +lancer +lancers +lances +lancing +land +landed +lander +landers +landing +landings +landladies +landlady +landlady's +landlord +landlord's +landlords +landmark +landmark's +landmarks +landowner +landowner's +landowners +lands +landscape +landscaped +landscaper +landscapes +landscaping +lane +lane's +lanes +language +language's +languages +languid +languidly +languidness +languish +languished +languisher +languishes +languishing +languishingly +lantern +lantern's +lanterns +lap +lap's +lapel +lapel's +lapels +laps +lapse +lapsed +lapser +lapses +lapsing +lard +larded +larder +larding +lards +large +largely +largeness +larger +largest +lark +lark's +larker +larks +larva +larvae +larvas +laser +laser's +lasers +lash +lashed +lasher +lashes +lashing +lashings +lass +lass's +lasses +last +lasted +laster +lasting +lastingly +lastingness +lastly +lasts +latch +latched +latches +latching +late +lated +lately +latencies +latency +latency's +lateness +latent +latently +latents +later +lateral +laterally +latest +latex +latex's +latexes +lath +lather +lathered +latherer +lathering +lathes +lathing +latitude +latitude's +latitudes +latrine +latrine's +latrines +latter +latter's +latterly +lattice +lattice's +latticed +lattices +latticing +laugh +laughable +laughableness +laughably +laughed +laugher +laughers +laughing +laughingly +laughs +laughter +laughters +launch +launched +launcher +launchers +launches +launching +launchings +launder +laundered +launderer +laundering +launderings +launders +laundries +laundry +laurel +laurel's +laurels +lava +lavatories +lavatory +lavatory's +lavender +lavendered +lavendering +lavish +lavished +lavishing +lavishly +lavishness +law +law's +lawful +lawfully +lawfulness +lawless +lawlessly +lawlessness +lawn +lawn's +lawns +laws +lawsuit +lawsuit's +lawsuits +lawyer +lawyer's +lawyerly +lawyers +lay +layer +layered +layering +layers +laying +layman +laymen +layoffs +layout +layout's +layouts +lays +lazed +lazied +lazier +laziest +lazily +laziness +lazing +lazy +lazying +lead +leaded +leaden +leadenly +leadenness +leader +leader's +leaders +leadership +leadership's +leaderships +leading +leadings +leads +leaf +leafed +leafier +leafiest +leafing +leafless +leaflet +leaflet's +leaflets +leafs +leafy +league +leagued +leaguer +leaguers +leagues +leaguing +leak +leakage +leakage's +leakages +leaked +leaker +leaking +leaks +lean +leaned +leaner +leanest +leaning +leanings +leanly +leanness +leans +leap +leaped +leaper +leaping +leaps +leapt +learn +learned +learnedly +learnedness +learner +learners +learning +learnings +learns +lease +leased +leases +leash +leash's +leashes +leasing +least +leather +leathered +leathering +leathern +leathers +leave +leaved +leaven +leavened +leavening +leaver +leavers +leaves +leaving +leavings +lecture +lectured +lecturer +lecturers +lectures +lecturing +led +ledge +ledger +ledgers +ledges +lee +leech +leech's +leeches +leer +leered +leering +leers +lees +left +leftist +leftist's +leftists +leftmost +leftover +leftover's +leftovers +lefts +leftward +leftwards +leg +legacies +legacy +legacy's +legal +legalities +legality +legally +legals +legend +legend's +legendary +legends +legged +leggings +legibility +legible +legibly +legion +legion's +legions +legislate +legislated +legislates +legislating +legislation +legislations +legislative +legislatively +legislator +legislator's +legislators +legislature +legislature's +legislatures +legitimacy +legitimate +legitimated +legitimately +legitimates +legitimating +legitimation +legs +leisure +leisured +leisureliness +leisurely +lemma +lemma's +lemmas +lemon +lemon's +lemonade +lemons +lend +lender +lenders +lending +lends +length +lengthen +lengthened +lengthener +lengthening +lengthens +lengthier +lengthiness +lengthly +lengths +lengthwise +lengthy +leniency +lenient +leniently +lens +lens's +lensed +lenser +lensers +lenses +lensing +lensings +lent +lentil +lentil's +lentils +leopard +leopard's +leopards +leprosy +less +lessen +lessened +lessening +lessens +lesser +lesses +lessing +lesson +lesson's +lessoned +lessoning +lessons +lest +lester +let +let's +lets +letter +lettered +letterer +lettering +letters +letting +lettuce +levee +levee's +leveed +levees +level +levelly +levelness +levels +lever +lever's +leverage +leveraged +leverages +leveraging +levered +levering +levers +levied +levier +levies +levy +levying +lewd +lewdly +lewdness +lexical +lexically +lexicographic +lexicographical +lexicographically +lexicon +lexicon's +lexicons +liabilities +liability +liability's +liable +liableness +liaison +liaison's +liaisons +liar +liar's +liars +liberal +liberally +liberalness +liberals +liberate +liberated +liberates +liberating +liberation +liberator +liberator's +liberators +liberties +liberty +liberty's +libido +librarian +librarian's +librarians +libraries +library +library's +libretti +license +licensed +licensee +licensee's +licensees +licenser +licenses +licensing +lichen +lichen's +lichened +lichens +lick +licked +licker +licking +licks +lid +lid's +lids +lie +lied +lieder +liege +lien +lien's +liens +lier +lies +lieu +lieutenant +lieutenant's +lieutenants +life +life's +lifeless +lifelessly +lifelessness +lifelike +lifelikeness +lifelong +lifer +lifers +lifestyle +lifestyles +lifetime +lifetime's +lifetimes +lift +lifted +lifter +lifters +lifting +lifts +light +lighted +lighten +lightened +lightener +lightening +lightens +lighter +lighter's +lighters +lightest +lighthouse +lighthouse's +lighthouses +lighting +lightly +lightness +lightning +lightning's +lightninged +lightnings +lights +lightweight +lightweights +like +liked +likelier +likeliest +likelihood +likelihoods +likeliness +likely +liken +likened +likeness +likeness's +likenesses +likening +likens +liker +likes +likest +likewise +liking +likings +lilac +lilac's +lilacs +lilied +lilies +lily +lily's +limb +limbed +limber +limbered +limbering +limberly +limberness +limbers +limbs +lime +lime's +limed +limes +limestone +liming +limit +limitability +limitably +limitation +limitation's +limitations +limited +limitedly +limitedness +limiteds +limiter +limiters +limiting +limits +limp +limped +limper +limping +limply +limpness +limps +linden +line +line's +linear +linearities +linearity +linearly +lined +linen +linen's +linens +liner +liners +lines +linger +lingered +lingerer +lingering +lingeringly +lingers +linguist +linguist's +linguistic +linguistically +linguistics +linguists +lining +linings +link +linkage +linkage's +linkages +linked +linker +linkers +linking +linkings +links +linoleum +linseed +lint +linter +lints +lion +lion's +lioness +lioness's +lionesses +lions +lip +lip's +lips +lipstick +liquefied +liquefier +liquefiers +liquefies +liquefy +liquefying +liquid +liquid's +liquidation +liquidation's +liquidations +liquidity +liquidly +liquidness +liquids +liquor +liquor's +liquored +liquoring +liquors +lisp +lisp's +lisped +lisper +lisping +lisps +list +listed +listen +listened +listener +listeners +listening +listens +lister +listers +listing +listing's +listings +lists +lit +literacy +literal +literally +literalness +literals +literariness +literary +literate +literately +literateness +literation +literature +literature's +literatures +lithe +lithely +litheness +litigate +litigated +litigates +litigating +litigation +litigator +litter +littered +litterer +littering +litters +little +littleness +littler +littlest +livable +livableness +livably +live +lived +livelier +liveliest +livelihood +liveliness +lively +liven +livened +liveness +livening +liver +liveried +livers +livery +lives +livest +liveth +living +livingly +livingness +livings +lizard +lizard's +lizards +load +loaded +loader +loaders +loading +loadings +loads +loaf +loafed +loafer +loafers +loafing +loafs +loan +loaned +loaner +loaning +loans +loath +loathe +loathed +loather +loathes +loathing +loathly +loathness +loathsome +loathsomely +loathsomeness +loaves +lobbied +lobbies +lobby +lobbying +lobe +lobe's +lobed +lobes +lobster +lobster's +lobsters +local +locale +localities +locality +locality's +locally +locals +locate +located +locater +locates +locating +location +locations +locative +locatives +locator +locator's +locators +loci +lock +locked +locker +lockers +locking +lockings +lockout +lockout's +lockouts +locks +lockup +lockup's +lockups +locomotion +locomotive +locomotive's +locomotively +locomotives +locus +locus's +locust +locust's +locusts +lodge +lodged +lodger +lodger's +lodgers +lodges +lodging +lodgings +loft +loft's +lofter +loftier +loftiness +lofts +lofty +log +log's +logarithm +logarithm's +logarithmic +logarithmically +logarithms +logged +logger +logger's +loggers +logging +logic +logic's +logical +logically +logicalness +logicals +logician +logician's +logicians +logics +login +logins +logistic +logistics +logout +logs +loin +loin's +loins +loiter +loitered +loiterer +loitering +loiters +lone +lonelier +loneliest +loneliness +lonely +loneness +loner +loners +lonesome +lonesomely +lonesomeness +long +longed +longer +longest +longing +longingly +longings +longitude +longitude's +longitudes +longly +longness +longs +longword +longword's +longwords +look +lookahead +looked +looker +lookers +looking +lookout +lookouts +looks +lookup +lookup's +lookups +loom +loomed +looming +looms +loon +loop +looped +looper +loophole +loophole's +loopholed +loopholes +loopholing +looping +loops +loose +loosed +loosely +loosen +loosened +loosener +looseness +loosening +loosens +looser +looses +loosest +loosing +loot +looted +looter +looting +loots +lord +lord's +lording +lordlier +lordliness +lordly +lords +lordship +lore +lorries +lorry +lose +loser +losers +loses +losing +losings +loss +loss's +losses +lossier +lossiest +lossy +lost +lostness +lot +lot's +lots +lotteries +lottery +lotus +loud +louden +loudened +loudening +louder +loudest +loudly +loudness +loudspeaker +loudspeaker's +loudspeakers +lounge +lounged +lounger +loungers +lounges +lounging +lousier +lousiness +lousy +lovable +lovableness +lovably +love +love's +loved +lovelier +lovelies +loveliest +loveliness +lovely +lover +lover's +lovering +loverly +lovers +loves +loving +lovingly +lovingness +low +lower +lowered +lowering +lowers +lowest +lowing +lowland +lowlander +lowlands +lowlier +lowliest +lowliness +lowly +lowness +lows +loyal +loyally +loyalties +loyalty +loyalty's +lubricant +lubricant's +lubricants +lubrication +luck +lucked +luckier +luckiest +luckily +luckiness +luckless +lucks +lucky +ludicrous +ludicrously +ludicrousness +luggage +lukewarm +lukewarmly +lukewarmness +lull +lullaby +lulled +lulls +lumber +lumbered +lumberer +lumbering +lumbers +luminous +luminously +luminousness +lump +lumped +lumpen +lumper +lumping +lumps +lunar +lunatic +lunatics +lunch +lunched +luncheon +luncheon's +luncheons +luncher +lunches +lunching +lung +lunged +lunger +lunging +lungs +lurch +lurched +lurcher +lurches +lurching +lure +lured +lurer +lures +luring +lurk +lurked +lurker +lurkers +lurking +lurks +luscious +lusciously +lusciousness +lust +lustier +lustily +lustiness +lusting +lustrous +lustrously +lustrousness +lusts +lusty +lute +lute's +luted +lutes +luting +luxuriant +luxuriantly +luxuries +luxurious +luxuriously +luxuriousness +luxury +luxury's +lying +lyingly +lyings +lymph +lynch +lynched +lyncher +lynches +lynx +lynx's +lynxes +lyre +lyre's +lyres +lyric +lyrics +ma'am +macaroni +macaroni's +mace +maced +macer +maces +machine +machine's +machined +machineries +machinery +machines +machining +macing +macro +macro's +macroeconomics +macromolecule +macromolecule's +macromolecules +macros +macroscopic +mad +madam +madams +madden +maddened +maddening +maddeningly +madder +maddest +made +mademoiselle +mademoiselles +madly +madman +madness +madras +magazine +magazine's +magazined +magazines +magazining +maggot +maggot's +maggots +magic +magical +magically +magician +magician's +magicians +magistrate +magistrate's +magistrates +magnesium +magnesiums +magnet +magnet's +magnetic +magnetically +magnetics +magnetism +magnetism's +magnetisms +magnets +magnification +magnifications +magnificence +magnificent +magnificently +magnified +magnifier +magnifiers +magnifies +magnify +magnifying +magnitude +magnitude's +magnitudes +mahogany +maid +maid's +maiden +maidenliness +maidenly +maidens +maids +mail +mailable +mailbox +mailbox's +mailboxes +mailed +mailer +mailer's +mailers +mailing +mailings +mails +maim +maimed +maimedness +maimer +maimers +maiming +maims +main +mainframe +mainframe's +mainframes +mainland +mainlander +mainlanders +mainly +mains +mainstay +maintain +maintainability +maintainable +maintained +maintainer +maintainer's +maintainers +maintaining +maintains +maintenance +maintenance's +maintenances +majestic +majesties +majesty +majesty's +major +majored +majoring +majorities +majority +majority's +majors +makable +make +makefile +makefiles +maker +makers +makes +makeshift +makeshifts +makeup +makeups +making +makings +maladies +malady +malady's +malaria +male +male's +malefactor +malefactor's +malefactors +maleness +males +malfunction +malfunctioned +malfunctioning +malfunctions +malice +malicious +maliciously +maliciousness +malignant +malignantly +mall +mall's +mallet +mallet's +mallets +malls +malnutrition +malt +malted +malting +malts +mama +mamma +mamma's +mammal +mammal's +mammals +mammas +mammoth +man +man's +manage +manageable +manageableness +managed +management +management's +managements +manager +manager's +managerial +managerially +managers +manages +managing +mandate +mandated +mandates +mandating +mandatories +mandatory +mandible +mandolin +mandolin's +mandolins +mane +mane's +maned +manes +manger +manger's +mangers +mangle +mangled +mangler +mangles +mangling +manhood +maniac +maniac's +maniacs +manicure +manicured +manicures +manicuring +manifest +manifestation +manifestation's +manifestations +manifested +manifesting +manifestly +manifestness +manifests +manifold +manifold's +manifolder +manifoldly +manifoldness +manifolds +manipulability +manipulable +manipulatable +manipulate +manipulated +manipulates +manipulating +manipulation +manipulations +manipulative +manipulativeness +manipulator +manipulator's +manipulators +manipulatory +mankind +manlier +manliest +manliness +manly +manned +manner +mannered +mannerliness +mannerly +manners +manning +manometer +manometer's +manometers +manor +manor's +manors +manpower +mans +mansion +mansion's +mansions +mantel +mantel's +mantels +mantissa +mantissa's +mantissas +mantle +mantle's +mantled +mantles +mantling +manual +manual's +manually +manuals +manufacture +manufactured +manufacturer +manufacturer's +manufacturers +manufactures +manufacturing +manure +manured +manurer +manurers +manures +manuring +manuscript +manuscript's +manuscripts +many +map +map's +maple +maple's +maples +mappable +mapped +mapping +mapping's +mappings +maps +mar +marble +marbled +marbler +marbles +marbling +march +marched +marcher +marches +marching +mare +mare's +mares +margin +margin's +marginal +marginally +marginals +margined +margining +margins +marigold +marigold's +marigolds +marijuana +marijuana's +marinate +marinated +marinates +marinating +marine +mariner +marines +maritime +maritimer +mark +markable +marked +markedly +marker +markers +market +marketability +marketable +marketed +marketer +marketing +marketings +marketplace +marketplace's +marketplaces +markets +marking +markings +marks +marquis +marquises +marriage +marriage's +marriages +married +marries +marrow +marrows +marry +marrying +mars +marsh +marsh's +marshal +marshaled +marshaler +marshalers +marshaling +marshals +marshes +mart +marten +martens +martial +martially +marts +martyr +martyr's +martyrdom +martyrs +marvel +marvels +masculine +masculinely +masculineness +masculinity +mash +mashed +masher +mashers +mashes +mashing +mashings +mask +masked +masker +masking +maskings +masks +masochist +masochist's +masochists +mason +mason's +masoned +masoning +masonry +masons +masquerade +masquerader +masquerades +masquerading +mass +massacre +massacred +massacrer +massacres +massacring +massage +massaged +massager +massages +massaging +massed +masses +massing +massinger +massive +massively +massiveness +mast +masted +master +master's +mastered +masterful +masterfully +masterfulness +mastering +masterings +masterliness +masterly +masterpiece +masterpiece's +masterpieces +masters +mastery +masts +masturbate +masturbated +masturbates +masturbating +masturbation +mat +mat's +match +matchable +matched +matcher +matchers +matches +matching +matchings +matchless +matchlessly +matchmaker +matchmaker's +matchmakers +matchmaking +matchmaking's +mate +mate's +mated +mater +material +materialism +materialism's +materially +materialness +materials +maternal +maternally +mates +math +mathematical +mathematically +mathematician +mathematician's +mathematicians +mathematics +mating +matings +matrices +matriculation +matrimony +matrix +matrixes +matron +matronly +mats +matted +matter +mattered +mattering +matters +mattress +mattress's +mattresses +maturation +mature +matured +maturely +matureness +maturer +matures +maturing +maturities +maturity +max +maxim +maxim's +maximal +maximally +maxims +maximum +maximumly +maximums +may +maybe +mayer +mayest +mayhap +mayhem +maying +mayonnaise +mayor +mayor's +mayoral +mayors +mays +maze +maze's +mazed +mazedly +mazedness +mazednesses +mazer +mazes +mazing +me +mead +meadow +meadow's +meadows +meads +meager +meagerly +meagerness +meal +meal's +meals +mean +meander +meandered +meandering +meanderings +meanders +meaner +meanest +meaning +meaning's +meaningful +meaningfully +meaningfulness +meaningless +meaninglessly +meaninglessness +meanings +meanly +meanness +means +meant +meantime +meanwhile +measles +measurable +measurably +measure +measured +measuredly +measurement +measurement's +measurements +measurer +measures +measuring +meat +meat's +meats +mechanic +mechanic's +mechanical +mechanically +mechanicals +mechanics +mechanism +mechanism's +mechanisms +med +medal +medal's +medallion +medallion's +medallions +medals +meddle +meddled +meddler +meddles +meddling +media +median +median's +medianly +medians +medias +mediate +mediated +mediately +mediateness +mediates +mediating +mediation +mediations +mediative +medic +medic's +medical +medically +medicinal +medicinally +medicine +medicine's +medicines +medics +medieval +medieval's +medievally +medievals +meditate +meditated +meditates +meditating +meditation +meditations +meditative +meditatively +meditativeness +medium +medium's +mediums +meek +meeker +meekest +meekly +meekness +meet +meeter +meeting +meetings +meetly +meets +megabit +megabits +megabyte +megabytes +megaword +megawords +melancholy +meld +melding +melds +mellow +mellowed +mellowing +mellowly +mellowness +mellows +melodies +melodious +melodiously +melodiousness +melodrama +melodrama's +melodramas +melody +melody's +melon +melon's +melons +melt +melted +melter +melting +meltingly +melts +member +member's +membered +members +membership +membership's +memberships +membrane +membrane's +membraned +membranes +memo +memo's +memoir +memoirs +memorability +memorable +memorableness +memoranda +memorandum +memorandums +memorial +memorially +memorials +memories +memory +memory's +memoryless +memos +men +men's +menace +menaced +menaces +menacing +menacingly +menagerie +menageries +mend +mended +mender +mending +mends +menial +menially +menials +mens +mensed +menses +mensing +mental +mentalities +mentality +mentally +mention +mentionable +mentioned +mentioner +mentioners +mentioning +mentions +mentor +mentor's +mentors +menu +menu's +menus +mer +mercenaries +mercenariness +mercenary +mercenary's +merchandise +merchandised +merchandiser +merchandises +merchandising +merchant +merchant's +merchants +mercies +merciful +mercifully +mercifulness +merciless +mercilessly +mercilessness +mercuries +mercury +mercy +mere +merely +merest +merge +merged +merger +mergers +merges +merging +meridian +meridians +merit +merited +meriting +meritorious +meritoriously +meritoriousness +merits +merrier +merriest +merrily +merriment +merriments +merriness +merry +mesh +meshed +meshes +meshing +mess +message +message's +messaged +messages +messaging +messed +messenger +messenger's +messengers +messes +messiah +messiahs +messier +messiest +messieurs +messily +messiness +messing +messy +met +meta +metacircular +metacircularity +metal +metal's +metalanguage +metalanguages +metallic +metallurgy +metals +metamathematical +metamorphosis +metaphor +metaphor's +metaphorical +metaphorically +metaphors +metaphysical +metaphysically +metaphysics +metavariable +mete +meted +meteor +meteor's +meteoric +meteorology +meteors +meter +meter's +metered +metering +meters +metes +method +method's +methodical +methodically +methodicalness +methodist +methodist's +methodists +methodological +methodologically +methodologies +methodologists +methodology +methodology's +methods +meting +metric +metric's +metrical +metrically +metrics +metropolis +metropolitan +mets +mew +mewed +mews +mica +mice +microbicidal +microbicide +microcode +microcoded +microcodes +microcoding +microcomputer +microcomputer's +microcomputers +microeconomics +microfilm +microfilm's +microfilmed +microfilmer +microfilms +microinstruction +microinstruction's +microinstructions +microphone +microphones +microphoning +microprocessing +microprocessor +microprocessor's +microprocessors +microprogram +microprogram's +microprogrammed +microprogramming +microprograms +microscope +microscope's +microscopes +microscopic +microsecond +microsecond's +microseconds +microstore +microwave +microwave's +microwaves +microword +microwords +mid +midday +middle +middled +middler +middles +middling +middlingly +middlings +midnight +midnightly +midnights +midpoint +midpoint's +midpoints +midst +midsts +midsummer +midway +midways +midwinter +midwinterly +mien +miens +mies +miff +miffed +miffing +miffs +might +mightier +mightiest +mightily +mightiness +mights +mighty +migrate +migrated +migrates +migrating +migration +migrations +migrative +mild +milden +milder +mildest +mildew +mildews +mildly +mildness +mile +mile's +mileage +mileages +miler +miles +milestone +milestone's +milestones +militant +militantly +militantness +militants +militaries +militarily +militarism +militarisms +military +militia +militias +milk +milked +milker +milkers +milkier +milkiness +milking +milkmaid +milkmaid's +milkmaids +milks +milky +mill +milled +miller +millers +millet +milling +million +millionaire +millionaire's +millionaires +millioned +millions +millionth +millipede +millipede's +millipedes +millisecond +milliseconds +mills +millstone +millstone's +millstones +mimic +mimicked +mimicking +mimics +mince +minced +mincer +mincers +minces +mincing +mincingly +mind +minded +mindedness +minder +minders +mindful +mindfully +mindfulness +minding +mindless +mindlessly +mindlessness +minds +mine +mined +miner +mineral +mineral's +minerals +miners +mines +ming +mingle +mingled +mingles +mingling +miniature +miniature's +miniatured +miniatures +miniaturing +minicomputer +minicomputer's +minicomputers +minimal +minimally +minimum +minimums +mining +minion +minions +minister +minister's +ministered +ministering +ministers +ministries +ministry +ministry's +mink +mink's +minks +minnow +minnow's +minnows +minor +minor's +minored +minoring +minorities +minority +minority's +minors +minstrel +minstrel's +minstrels +mint +minted +minter +minting +mints +minus +minuses +minute +minuted +minutely +minuteness +minuter +minutes +minutest +minuting +miracle +miracle's +miracles +miraculous +miraculously +miraculousness +mire +mired +mires +miring +mirror +mirrored +mirroring +mirrors +mirth +misapplication +misapplied +misapplier +misapplies +misapply +misapplying +misbehaving +miscalculation +miscalculation's +miscalculations +miscellaneous +miscellaneously +miscellaneousness +mischief +mischievous +mischievously +mischievousness +miscommunicate +miscommunicated +miscommunicates +miscommunication +misconception +misconception's +misconceptions +misconstrue +misconstrued +misconstrues +misconstruing +misdirect +misdirected +misdirection +misdirects +miser +miserable +miserableness +miserably +miseries +miserliness +miserly +misers +misery +misery's +misfeature +misfit +misfit's +misfits +misfortune +misfortune's +misfortunes +misgiving +misgivingly +misgivings +misguide +misguided +misguidedly +misguidedness +misguider +misguides +misguiding +mishap +mishap's +mishaps +misinform +misinformation +misinformed +misinforming +misinforms +misinterpret +misinterpreted +misinterpreter +misinterpreters +misinterpreting +misinterprets +mislead +misleader +misleading +misleadingly +misleadings +misleads +misled +mismatch +mismatched +mismatches +mismatching +misnomer +misnomered +misperceive +misperceived +misperceives +misplace +misplaced +misplaces +misplacing +misread +misreader +misreading +misreads +misrepresentation +misrepresentation's +misrepresentations +miss +missed +misses +missile +missile's +missiles +missing +mission +missionaries +missionary +missionary's +missioned +missioner +missioning +missions +missive +missives +misspell +misspelled +misspelling +misspellings +misspells +misstate +misstated +misstater +misstates +misstating +mist +mistakable +mistake +mistaken +mistakenly +mistaker +mistakes +mistaking +mistakingly +misted +mister +mistered +mistering +misters +mistier +mistiest +mistiness +misting +mistreat +mistreated +mistreating +mistreats +mistress +mistressly +mistrust +mistrusted +mistruster +mistrusting +mistrusts +mists +misty +mistype +mistyped +mistypes +mistyping +misunderstand +misunderstander +misunderstanders +misunderstanding +misunderstanding's +misunderstandings +misunderstands +misunderstood +misuse +misused +misuser +misuses +misusing +mite +mites +mitigate +mitigated +mitigates +mitigating +mitigation +mitigations +mitigative +mitten +mitten's +mittens +mix +mixed +mixer +mixers +mixes +mixing +mixture +mixture's +mixtures +ml +mnemonic +mnemonic's +mnemonically +mnemonics +moan +moaned +moaning +moans +moat +moat's +moats +mob +mob's +mobile +mobility +mobs +moccasin +moccasin's +moccasins +mock +mocked +mocker +mockers +mockery +mocking +mockingly +mocks +modal +modalities +modality +modality's +modally +mode +model +model's +models +modem +modems +moderate +moderated +moderately +moderateness +moderates +moderating +moderation +moderations +moderator +moderator's +moderators +modern +modernity +modernly +modernness +moderns +modes +modest +modestly +modesty +modifiability +modifiable +modifiableness +modification +modifications +modified +modifier +modifiers +modifies +modify +modifying +modular +modularities +modularity +modularly +modulate +modulated +modulates +modulating +modulation +modulations +modulator +modulator's +modulators +module +module's +modules +modulo +modulus +modus +moist +moisten +moistened +moistener +moistening +moistly +moistness +moisture +moistures +molasses +mold +molded +molder +moldered +moldering +molders +moldier +moldiness +molding +molds +moldy +mole +molecular +molecularly +molecule +molecule's +molecules +moles +molest +molested +molester +molesters +molesting +molests +molten +mom +mom's +moment +moment's +momentarily +momentariness +momentary +momently +momentous +momentously +momentousness +moments +momentum +momentums +moms +monarch +monarchies +monarchs +monarchy +monarchy's +monasteries +monastery +monastery's +monastic +monetary +money +money's +moneyed +moneyer +moneys +monitor +monitored +monitoring +monitors +monk +monk's +monkey +monkeyed +monkeying +monkeys +monks +mono +mono's +monochrome +monochromes +monograph +monograph's +monographes +monographs +monolithic +monopolies +monopoly +monopoly's +monotheism +monotone +monotonic +monotonically +monotonicity +monotonous +monotonously +monotonousness +monotony +monster +monster's +monsters +monstrous +monstrously +monstrousness +month +month's +monthlies +monthly +months +monument +monument's +monumental +monumentally +monuments +mood +mood's +moodier +moodiness +moods +moody +moon +mooned +mooning +moonlight +moonlighted +moonlighter +moonlighting +moonlights +moonlit +moons +moonshine +moonshiner +moor +moor's +moored +mooring +moorings +moors +moose +moot +mooted +mop +moped +moper +moping +mops +moral +moral's +morale +morales +moralities +morality +morally +morals +morass +morasses +morbid +morbidly +morbidness +more +mored +moreover +mores +morion +morn +morning +mornings +morphological +morphologically +morphology +morrow +morsel +morsel's +morsels +mortal +mortality +mortally +mortals +mortar +mortared +mortaring +mortars +mortgage +mortgage's +mortgaged +mortgager +mortgages +mortgaging +mortification +mortifications +mortified +mortifiedly +mortifier +mortifies +mortify +mortifying +mosaic +mosaic's +mosaics +mosquito +mosquitoes +mosquitos +moss +moss's +mosses +mossier +mossy +most +mostly +motel +motel's +motels +moth +mother +mother's +motherboard +motherboard's +motherboards +mothered +motherer +motherers +mothering +motherliness +motherly +mothers +motif +motif's +motifs +motion +motioned +motioner +motioning +motionless +motionlessly +motionlessness +motions +motivate +motivated +motivates +motivating +motivation +motivational +motivationally +motivations +motivative +motive +motived +motives +motiving +motley +motor +motorcar +motorcar's +motorcars +motorcycle +motorcycle's +motorcycles +motored +motoring +motorist +motorist's +motorists +motors +motto +mottoes +mottos +mould +moulded +moulder +mouldering +moulding +moulds +mound +mounded +mounds +mount +mountain +mountain's +mountaineer +mountaineering +mountaineers +mountainous +mountainously +mountainousness +mountains +mounted +mounter +mounting +mountings +mounts +mourn +mourned +mourner +mourners +mournful +mournfully +mournfulness +mourning +mourningly +mourns +mouse +mouser +mouses +mousing +mouth +mouthed +mouther +mouthes +mouthful +mouthing +mouths +movable +movableness +move +moved +movement +movement's +movements +mover +movers +moves +movie +movie's +movies +moving +movingly +movings +mow +mowed +mower +mowers +mowing +mows +much +muchness +muck +mucked +mucker +mucking +mucks +mud +muddied +muddier +muddiness +muddle +muddled +muddler +muddlers +muddles +muddling +muddy +muddying +muds +muff +muff's +muffin +muffin's +muffins +muffle +muffled +muffler +mufflers +muffles +muffling +muffs +mug +mug's +mugs +mulberries +mulberry +mulberry's +mule +mule's +mules +muling +multicellular +multicomponent +multidimensional +multilevel +multinational +multiple +multiple's +multiples +multiplex +multiplexed +multiplexer +multiplexers +multiplexes +multiplexing +multiplexor +multiplexor's +multiplexors +multiplicand +multiplicand's +multiplicands +multiplication +multiplications +multiplicative +multiplicatively +multiplicatives +multiplicity +multiplied +multiplier +multipliers +multiplies +multiply +multiplying +multiprocess +multiprocessing +multiprocessor +multiprocessor's +multiprocessors +multiprogram +multiprogrammed +multiprogramming +multiprogrammings +multistage +multitasking +multitude +multitude's +multitudes +multiuser +multivariate +mumble +mumbled +mumbler +mumblers +mumbles +mumbling +mumblings +mummies +mummy +mummy's +munch +munched +muncher +munches +munching +mundane +mundanely +mundaneness +municipal +municipalities +municipality +municipality's +municipally +munition +munitions +mural +murals +murder +murdered +murderer +murderers +murdering +murderous +murderously +murderousness +murders +murkier +murkiness +murky +murmur +murmured +murmurer +murmuring +murmurs +muscle +muscled +muscles +muscling +muscular +muscularly +muse +mused +muser +muses +museum +museum's +museums +mushier +mushiness +mushroom +mushroomed +mushrooming +mushrooms +mushy +music +musical +musically +musicals +musician +musicianly +musicians +musics +musing +musingly +musings +musk +musket +musket's +muskets +muskrat +muskrat's +muskrats +musks +muslin +mussel +mussel's +mussels +must +mustard +mustards +muster +mustered +mustering +musters +mustier +mustiness +musts +musty +mutability +mutable +mutableness +mutate +mutated +mutates +mutating +mutation +mutations +mutative +mutator +mutators +mute +muted +mutedly +mutely +muteness +muter +mutes +mutest +mutilate +mutilated +mutilates +mutilating +mutilation +mutilations +muting +mutinies +mutiny +mutiny's +mutter +muttered +mutterer +mutterers +muttering +mutters +mutton +mutual +mutually +muzzle +muzzle's +muzzled +muzzler +muzzles +muzzling +my +myriad +myrtle +myself +mysteries +mysterious +mysteriously +mysteriousness +mystery +mystery's +mystic +mystic's +mystical +mystically +mysticism +mysticisms +mystics +myth +myth's +mythes +mythical +mythically +mythologies +mythology +mythology's +nag +nag's +nags +nail +nailed +nailer +nailing +nails +naive +naively +naiveness +naiver +naivete +naked +nakedly +nakedness +name +name's +nameable +named +nameless +namelessly +namelessness +namely +namer +namers +names +namesake +namesake's +namesakes +naming +nanosecond +nanoseconds +nap +nap's +napkin +napkin's +napkins +naps +narcissistic +narcissus +narcissuses +narcotic +narcotics +narrative +narrative's +narratively +narratives +narrow +narrowed +narrower +narrowest +narrowing +narrowingness +narrowly +narrowness +narrows +nasal +nasally +nastier +nasties +nastiest +nastily +nastiness +nasty +nation +nation's +national +nationalist +nationalist's +nationalists +nationalities +nationality +nationality's +nationally +nationals +nations +nationwide +native +natively +nativeness +natives +nativity +natural +naturalism +naturalist +naturally +naturalness +naturals +nature +nature's +natured +natures +naught +naught's +naughtier +naughtiness +naughts +naughty +naval +navally +navies +navigable +navigableness +navigate +navigated +navigates +navigating +navigation +navigations +navigator +navigator's +navigators +navy +navy's +nay +near +nearby +neared +nearer +nearest +nearing +nearly +nearness +nears +neat +neaten +neater +neatest +neatly +neatness +neats +nebula +necessaries +necessarily +necessary +necessitate +necessitated +necessitates +necessitating +necessitation +necessitations +necessities +necessity +neck +necked +necker +necking +necklace +necklace's +necklaces +necks +necktie +necktie's +neckties +need +needed +needer +needful +needfully +needfulness +needier +neediness +needing +needle +needled +needler +needlers +needles +needless +needlessly +needlessness +needlework +needleworker +needling +needly +needn't +needs +needy +negate +negated +negater +negates +negating +negation +negations +negative +negatived +negatively +negativeness +negatives +negativing +negator +negators +neglect +neglected +neglecter +neglecting +neglects +negligence +negligible +negotiable +negotiate +negotiated +negotiates +negotiating +negotiation +negotiations +neigh +neither +neophyte +neophytes +nephew +nephew's +nephews +nerve +nerve's +nerved +nerves +nerving +nervous +nervously +nervousness +nest +nested +nester +nesting +nestle +nestled +nestler +nestles +nestling +nests +net +net's +nether +nets +netted +netting +nettle +nettled +nettles +nettling +network +network's +networked +networking +networks +neural +neurally +neurobiology +neurobiology's +neurological +neurologically +neurologists +neuron +neuron's +neurons +neutral +neutralities +neutrality +neutrally +neutralness +neutrals +neutrino +neutrino's +neutrinos +never +nevertheless +new +newborn +newborns +newcomer +newcomer's +newcomers +newer +newest +newline +newline's +newlines +newly +newness +news +newsgroup +newsgroup's +newsgroups +newsletter +newsletter's +newsletters +newsman +newsmen +newspaper +newspaper's +newspapers +newswire +newt +newts +next +nibble +nibbled +nibbler +nibblers +nibbles +nibbling +nice +nicely +niceness +nicer +nicest +niceties +nicety +niche +niches +niching +nick +nicked +nickel +nickel's +nickels +nicker +nickered +nickering +nicking +nickname +nicknamed +nicknamer +nicknames +nicks +nicotine +niece +niece's +nieces +niftier +nifties +nifty +nigh +night +night's +nighted +nighters +nightfall +nightgown +nightingale +nightingale's +nightingales +nightly +nightmare +nightmare's +nightmares +nights +nil +nilly +nimble +nimbleness +nimbler +nimblest +nimbly +nine +nines +nineteen +nineteens +nineteenth +nineties +ninetieth +ninety +ninth +nip +nips +nitrogen +nix +nixed +nixer +nixes +nixing +no +nobilities +nobility +noble +nobleman +nobleness +nobler +nobles +noblest +nobly +nobodies +nobody +nobody's +nocturnal +nocturnally +nod +nod's +nodded +nodding +node +node's +nodes +nods +noise +noised +noiseless +noiselessly +noises +noisier +noisily +noisiness +noising +noisy +nomenclature +nomenclatures +nominal +nominally +nominate +nominated +nominates +nominating +nomination +nomination's +nominations +nominative +nominatively +non +nonblocking +nonconservative +noncyclic +nondecreasing +nondescript +nondescriptly +nondestructively +nondeterminacy +nondeterminate +nondeterminately +nondeterminism +nondeterministic +nondeterministically +nondisclosure +nondisclosures +none +nonempty +nones +nonetheless +nonexistence +nonexistent +nonextensible +nonfunctional +noninteracting +noninterference +nonintuitive +nonlinear +nonlinearities +nonlinearity +nonlinearity's +nonlinearly +nonlocal +nonnegative +nonorthogonal +nonorthogonality +nonperishable +nonprocedural +nonprocedurally +nonprogrammable +nonprogrammer +nonsense +nonsensical +nonsensically +nonsensicalness +nonspecialist +nonspecialist's +nonspecialists +nonstandard +nontechnical +nontechnically +nonterminal +nonterminal's +nonterminals +nonterminating +nontermination +nontrivial +nonuniform +nonzero +nook +nook's +nooks +noon +noonday +nooning +noons +noontide +nope +nor +norm +norm's +normal +normalcy +normality +normally +normals +normed +norms +north +north's +northeast +northeaster +northeasterly +northeastern +norther +northerly +northern +northerner +northerners +northernly +northers +northing +northward +northwards +northwest +northwester +northwesterly +northwestern +nose +nosed +noses +nosing +nostril +nostril's +nostrils +not +notable +notableness +notables +notably +notation +notation's +notational +notationally +notations +notch +notched +notches +notching +note +notebook +notebook's +notebooks +noted +notedly +notedness +noter +notes +noteworthiness +noteworthy +nothing +nothingness +nothings +notice +noticeable +noticeably +noticed +notices +noticing +notification +notifications +notified +notifier +notifiers +notifies +notify +notifying +noting +notion +notions +notorious +notoriously +notoriousness +notwithstanding +noun +noun's +nouns +nourish +nourished +nourisher +nourishes +nourishing +nourishment +novel +novel's +novelist +novelist's +novelists +novels +novelties +novelty +novelty's +novice +novice's +novices +now +nowadays +nowhere +nowheres +nows +nroff +nroff's +nth +nuances +nuclear +nucleotide +nucleotide's +nucleotides +nucleus +nucleuses +nuisance +nuisance's +nuisances +null +nulled +nullification +nullified +nullifier +nullifiers +nullifies +nullify +nullifying +nulls +numb +numbed +number +numbered +numberer +numbering +numberless +numbers +numbing +numbingly +numbly +numbness +numbs +numeral +numeral's +numerally +numerals +numerator +numerator's +numerators +numeric +numerical +numerically +numerics +numerous +numerously +numerousness +nun +nun's +nuns +nuptial +nuptials +nurse +nurse's +nursed +nurser +nurseries +nursery +nursery's +nurses +nursing +nurture +nurtured +nurturer +nurtures +nurturing +nut +nut's +nutrition +nutrition's +nuts +nymph +nymphs +o'clock +oak +oaken +oaks +oar +oar's +oared +oaring +oars +oasis +oat +oaten +oater +oath +oaths +oatmeal +oats +obedience +obediences +obedient +obediently +obey +obeyed +obeyer +obeying +obeys +obfuscate +obfuscated +obfuscater +obfuscates +obfuscating +obfuscation +obfuscations +object +object's +objected +objecting +objection +objection's +objectionable +objectionableness +objections +objective +objectively +objectiveness +objectives +objector +objector's +objectors +objects +oblate +oblately +oblateness +oblation +oblations +obligate +obligated +obligately +obligates +obligating +obligation +obligation's +obligations +obligatory +oblige +obliged +obliger +obliges +obliging +obligingly +obligingness +oblique +obliquely +obliqueness +obliterate +obliterated +obliterates +obliterating +obliteration +obliterations +obliterative +obliteratively +oblivion +oblivions +oblivious +obliviously +obliviousness +oblong +oblongly +oblongness +obscene +obscenely +obscure +obscured +obscurely +obscureness +obscurer +obscures +obscuring +obscurities +obscurity +observable +observance +observance's +observances +observant +observantly +observation +observation's +observations +observatories +observatory +observe +observed +observer +observers +observes +observing +observingly +obsession +obsession's +obsessions +obsolescence +obsolete +obsoleted +obsoletely +obsoleteness +obsoletes +obsoleting +obstacle +obstacle's +obstacles +obstinacy +obstinate +obstinately +obstinateness +obstruct +obstructed +obstructer +obstructing +obstruction +obstruction's +obstructionist +obstructions +obstructive +obstructively +obstructiveness +obstructs +obtain +obtainable +obtainably +obtained +obtainer +obtaining +obtains +obviate +obviated +obviates +obviating +obviation +obviations +obvious +obviously +obviousness +occasion +occasional +occasionally +occasioned +occasioning +occasionings +occasions +occlude +occluded +occludes +occluding +occlusion +occlusion's +occlusions +occupancies +occupancy +occupant +occupant's +occupants +occupation +occupation's +occupational +occupationally +occupations +occupied +occupier +occupiers +occupies +occupy +occupying +occur +occurred +occurrence +occurrence's +occurrences +occurring +occurs +ocean +ocean's +oceans +octal +octals +octave +octaves +octopus +odd +odder +oddest +oddities +oddity +oddity's +oddly +oddness +odds +ode +ode's +oded +oder +odes +odious +odiously +odiousness +odorous +odorously +odorousness +of +off +offend +offended +offender +offenders +offending +offends +offensive +offensively +offensiveness +offensives +offer +offered +offerer +offerers +offering +offerings +offers +office +office's +officer +officer's +officered +officers +offices +official +official's +officially +officials +officiate +officiated +officiates +officiating +officiation +officiations +officio +officious +officiously +officiousness +offing +offs +offset +offset's +offsets +offspring +offsprings +oft +often +oftener +oftentimes +oh +oil +oilcloth +oiled +oiler +oilers +oilier +oiliest +oiliness +oiling +oils +oily +ointment +ointments +okay +okay's +okays +old +olden +older +oldest +oldness +olive +olive's +oliver +olives +omen +omen's +omens +ominous +ominously +ominousness +omission +omission's +omissions +omit +omits +omitted +omitting +omnipresent +omnipresently +omniscient +omnisciently +omnivore +on +onanism +once +oncer +one +one's +oneness +oner +onerous +onerously +onerousness +ones +oneself +ongoing +onion +onions +online +onliness +only +ons +onset +onset's +onsets +onto +onward +onwards +oops +ooze +oozed +oozes +oozing +opacities +opacity +opal +opal's +opals +opaque +opaquely +opaqueness +opcode +opcode's +opcodes +open +opened +opener +openers +openest +opening +opening's +openings +openly +openness +opens +opera +opera's +operable +operand +operand's +operandi +operands +operas +operate +operated +operates +operating +operation +operational +operationally +operations +operative +operatively +operativeness +operatives +operator +operator's +operators +opiate +opiates +opinion +opinion's +opinions +opium +opponent +opponent's +opponents +opportune +opportunely +opportunism +opportunistic +opportunistically +opportunities +opportunity +opportunity's +oppose +opposed +opposer +opposes +opposing +opposite +oppositely +oppositeness +opposites +opposition +oppositions +oppress +oppressed +oppresses +oppressing +oppression +oppressive +oppressively +oppressiveness +oppressor +oppressor's +oppressors +opt +opted +optic +optical +optically +optics +optimal +optimality +optimally +optimism +optimistic +optimistically +optimum +opting +option +option's +optional +optionally +options +opts +or +or's +oracle +oracle's +oracles +oral +orally +orals +orange +orange's +oranges +oration +oration's +orations +orator +orator's +oratories +orators +oratory +oratory's +orb +orbit +orbital +orbitally +orbitals +orbited +orbiter +orbiters +orbiting +orbits +orchard +orchard's +orchards +orchestra +orchestra's +orchestras +orchid +orchid's +orchids +ordain +ordained +ordainer +ordaining +ordains +ordeal +ordeals +order +ordered +orderer +ordering +orderings +orderlies +orderliness +orderly +orders +ordinal +ordinance +ordinance's +ordinances +ordinaries +ordinarily +ordinariness +ordinary +ordinate +ordinated +ordinates +ordinating +ordination +ordinations +ore +ore's +ores +organ +organ's +organic +organics +organism +organism's +organisms +organist +organist's +organists +organs +orgies +orgy +orgy's +orient +orientation +orientation's +orientations +oriented +orienting +orients +orifice +orifice's +orifices +origin +origin's +original +originality +originally +originals +originate +originated +originates +originating +origination +originations +originative +originatively +originator +originator's +originators +origins +orion +orly +ornament +ornamental +ornamentally +ornamentation +ornamentations +ornamented +ornamenting +ornaments +orphan +orphaned +orphaning +orphans +orthodox +orthodoxes +orthodoxly +orthogonal +orthogonality +orthogonally +oscillate +oscillated +oscillates +oscillating +oscillation +oscillation's +oscillations +oscillator +oscillator's +oscillators +oscillatory +oscilloscope +oscilloscope's +oscilloscopes +ostrich +ostrich's +ostriches +other +other's +otherness +others +otherwise +otter +otter's +otters +ought +oughts +ounce +ounces +our +ours +ourself +ourselves +out +outbreak +outbreak's +outbreaks +outburst +outburst's +outbursts +outcast +outcast's +outcasts +outcome +outcome's +outcomes +outcries +outcry +outdoor +outdoors +outed +outer +outermost +outfit +outfit's +outfits +outgoing +outgoingness +outgoings +outgrew +outgrow +outgrowing +outgrown +outgrows +outgrowth +outing +outing's +outings +outlast +outlasts +outlaw +outlawed +outlawing +outlaws +outlay +outlay's +outlays +outlet +outlet's +outlets +outline +outlined +outlines +outlining +outlive +outlived +outlives +outliving +outlook +outness +outperform +outperformed +outperforming +outperforms +outpost +outpost's +outposts +output +output's +outputs +outputting +outrage +outraged +outrageous +outrageously +outrageousness +outrages +outraging +outright +outrightly +outrun +outruns +outs +outset +outside +outsider +outsider's +outsiderness +outsiders +outskirts +outstanding +outstandingly +outstretched +outstrip +outstripped +outstripping +outstrips +outvote +outvoted +outvotes +outvoting +outward +outwardly +outwardness +outwards +outweigh +outweighed +outweighing +outweighs +outwit +outwits +outwitted +outwitting +oval +oval's +ovally +ovalness +ovals +ovaries +ovary +ovary's +oven +oven's +ovens +over +overall +overall's +overalls +overblown +overboard +overcame +overcast +overcasting +overcoat +overcoat's +overcoating +overcoats +overcome +overcomer +overcomes +overcoming +overcrowd +overcrowded +overcrowding +overcrowds +overdone +overdose +overdose's +overdosed +overdoses +overdosing +overdraft +overdraft's +overdrafts +overdraw +overdrawing +overdrawn +overdraws +overdrew +overdue +overemphasis +overestimate +overestimated +overestimates +overestimating +overestimation +overestimations +overflow +overflowed +overflowing +overflows +overhang +overhanging +overhangs +overhaul +overhauled +overhauler +overhauling +overhaulings +overhauls +overhead +overheads +overhear +overheard +overhearer +overhearing +overhears +overing +overjoy +overjoyed +overkill +overkill's +overlaid +overland +overlap +overlap's +overlapped +overlapping +overlaps +overlay +overlaying +overlays +overload +overloaded +overloading +overloads +overlook +overlooked +overlooking +overlooks +overly +overlying +overnight +overnighter +overnighters +overnights +overpower +overpowered +overpowering +overpoweringly +overpowers +overprint +overprinted +overprinting +overprints +overproduction +overridden +override +overrider +overrides +overriding +overrode +overrule +overruled +overrules +overruling +overrun +overruns +overs +overseas +oversee +overseeing +overseer +overseers +oversees +overshadow +overshadowed +overshadowing +overshadows +overshoot +overshooting +overshoots +overshot +oversight +oversight's +oversights +oversimplification +oversimplifications +oversimplified +oversimplifies +oversimplify +oversimplifying +overstate +overstated +overstatement +overstatement's +overstatements +overstates +overstating +overstocks +overt +overtake +overtaken +overtaker +overtakers +overtakes +overtaking +overthrew +overthrow +overthrowing +overthrown +overthrows +overtime +overtly +overtness +overtone +overtone's +overtones +overtook +overture +overture's +overtures +overturn +overturned +overturning +overturns +overuse +overview +overview's +overviews +overweight +overwhelm +overwhelmed +overwhelming +overwhelmingly +overwhelms +overwork +overworked +overworking +overworks +overwrite +overwrites +overwriting +overwritten +overwrote +overzealous +overzealousness +ovum +owe +owed +owes +owing +owl +owl's +owler +owls +own +owned +owner +owner's +owners +ownership +ownerships +owning +owns +ox +oxen +oxidation +oxide +oxide's +oxides +oxygen +oxygens +oyster +oyster's +oystering +oysters +pa +pace +pace's +paced +pacer +pacers +paces +pacific +pacification +pacifications +pacified +pacifier +pacifies +pacify +pacifying +pacing +pack +package +packaged +packager +packagers +packages +packaging +packagings +packed +packer +packers +packet +packet's +packeted +packeting +packets +packing +packs +pact +pact's +pacts +pad +pad's +padded +paddies +padding +paddings +paddle +paddled +paddler +paddles +paddling +paddy +pads +pagan +pagan's +pagans +page +page's +pageant +pageant's +pageants +paged +pager +pager's +pagers +pages +paginate +paginated +paginates +paginating +pagination +paginations +paging +paid +pail +pail's +pails +pain +pained +painful +painfully +painfulness +paining +painless +painlessly +painlessness +pains +painstaking +painstakingly +paint +painted +painter +painterliness +painterly +painters +painting +paintings +paints +pair +paired +pairing +pairings +pairs +pairwise +pal +pal's +palace +palace's +palaces +palate +palate's +palates +pale +paled +palely +paleness +paler +pales +palest +palfrey +paling +pall +palliate +palliation +palliative +palliatively +palliatives +pallid +pallidly +pallidness +palling +pally +palm +palmed +palmer +palming +palms +pals +pamphlet +pamphlet's +pamphlets +pan +pan's +panacea +panacea's +panaceas +pancake +pancake's +pancaked +pancakes +pancaking +pancreas +panda +panda's +pandas +pandemonium +pander +pandered +panderer +pandering +panders +pane +pane's +panel +panelist +panelist's +panelists +panels +panes +pang +pang's +pangs +panic +panic's +panics +panned +panning +pans +pansies +pansy +pansy's +pant +panted +panther +panther's +panthers +panties +panting +pantries +pantry +pantry's +pants +panty +papa +papal +papally +paper +paper's +paperback +paperback's +paperbacks +papered +paperer +paperers +papering +paperings +papers +paperwork +paprika +par +parachute +parachute's +parachuted +parachuter +parachutes +parachuting +parade +paraded +parader +parades +paradigm +paradigm's +paradigms +parading +paradise +paradox +paradox's +paradoxes +paradoxical +paradoxically +paradoxicalness +paraffin +paraffins +paragon +paragon's +paragons +paragraph +paragraphed +paragrapher +paragraphing +paragraphs +parallax +parallax's +parallel +parallelism +parallelogram +parallelogram's +parallelograms +parallels +paralysis +parameter +parameter's +parameterless +parameters +parametric +paramilitary +paramount +paranoia +paranoid +parapet +parapet's +parapeted +parapets +paraphrase +paraphrased +paraphraser +paraphrases +paraphrasing +parasite +parasite's +parasites +parasitic +parasitics +parcel +parcels +parch +parched +parchment +pardon +pardonable +pardonableness +pardonably +pardoned +pardoner +pardoners +pardoning +pardons +pare +parent +parent's +parentage +parental +parentally +parentheses +parenthesis +parenthetical +parenthetically +parenthood +parenting +parents +parer +pares +paring +parings +parish +parish's +parishes +parities +parity +park +parked +parker +parkers +parking +parks +parliament +parliament's +parliamentary +parliaments +parole +paroled +paroles +paroling +parried +parrot +parroting +parrots +parry +parrying +pars +parse +parsed +parser +parser's +parsers +parses +parsimony +parsing +parsings +parsley +parson +parson's +parsons +part +partake +partaker +partakes +partaking +parted +parter +parters +partial +partiality +partially +partials +participant +participant's +participants +participate +participated +participates +participating +participation +participations +participative +participatory +particle +particle's +particles +particular +particularly +particulars +partied +parties +parting +partings +partisan +partisan's +partisans +partition +partitioned +partitioner +partitioning +partitions +partly +partner +partner's +partnered +partnering +partners +partnership +partnerships +partridge +partridge's +partridges +parts +party +party's +partying +pas +pass +passage +passage's +passaged +passages +passageway +passaging +passe +passed +passenger +passenger's +passengerly +passengers +passer +passers +passes +passing +passion +passionate +passionately +passionateness +passions +passive +passively +passiveness +passives +passivity +passport +passport's +passports +password +password's +passworded +passwords +past +past's +paste +pasted +pastes +pastime +pastime's +pastimes +pasting +pastness +pastor +pastor's +pastoral +pastorally +pastoralness +pastors +pastries +pastry +pasts +pasture +pasture's +pastured +pasturer +pastures +pasturing +pat +pat's +patch +patched +patcher +patches +patching +patchwork +patchworker +patchworkers +pated +paten +patent +patentable +patented +patenter +patenters +patenting +patently +patents +pater +paternal +paternally +path +pathetic +pathname +pathname's +pathnames +pathological +pathologically +pathologies +pathologist +pathologist's +pathologists +pathology +pathos +paths +pathway +pathway's +pathways +patience +patient +patient's +patiently +patients +patriarch +patriarchs +patrician +patrician's +patricians +patriot +patriot's +patriotic +patriotism +patriots +patrol +patrol's +patrols +patron +patron's +patronage +patronly +patrons +pats +patter +pattered +patterer +pattering +patterings +pattern +patterned +patterning +patterns +patters +patties +patty +patty's +paucity +pause +paused +pauses +pausing +pave +paved +pavement +pavement's +pavements +paver +paves +pavilion +pavilion's +pavilions +paving +paw +pawed +pawing +pawn +pawn's +pawned +pawner +pawning +pawns +paws +pay +payable +paycheck +paycheck's +paychecks +payed +payer +payer's +payers +paying +payment +payment's +payments +payoff +payoff's +payoffs +payroll +payrolls +pays +pea +pea's +peace +peaceable +peaceableness +peaceful +peacefully +peacefulness +peaces +peach +peach's +peaches +peacock +peacock's +peacocks +peak +peaked +peakedness +peaking +peaks +peal +pealed +pealing +peals +peanut +peanut's +peanuts +pear +pearl +pearl's +pearler +pearlier +pearls +pearly +pears +peas +peasant +peasant's +peasantry +peasants +peat +pebble +pebble's +pebbled +pebbles +pebbling +peck +pecked +pecker +pecking +pecks +peculiar +peculiarities +peculiarity +peculiarity's +peculiarly +peculiars +pedagogic +pedagogical +pedagogically +pedagogics +pedantic +peddler +peddler's +peddlers +pedestal +pedestals +pedestrian +pedestrian's +pedestrians +pediatric +pediatrics +peek +peeked +peeking +peeks +peel +peeled +peeler +peeler's +peeling +peels +peep +peeped +peeper +peepers +peeping +peeps +peer +peered +peering +peerless +peerlessly +peerlessness +peers +peeve +peeve's +peeved +peevers +peeves +peeving +peg +peg's +pegs +pellet +pellet's +pelleted +pelleting +pellets +pelt +pelter +pelting +pelts +pen +penalties +penalty +penalty's +penance +penanced +penances +penancing +pence +pencil +pencils +pend +pended +pending +pends +pendulum +pendulum's +pendulums +penetrate +penetrated +penetrates +penetrating +penetratingly +penetration +penetrations +penetrative +penetratively +penetrativeness +penetrator +penetrator's +penetrators +penguin +penguin's +penguins +peninsula +peninsula's +peninsulas +penitent +penitentiary +penitently +penned +pennies +penniless +penning +penny +penny's +pens +pension +pensioned +pensioner +pensioners +pensioning +pensions +pensive +pensively +pensiveness +pent +pentagon +pentagon's +pentagons +penthouse +penthouse's +penthouses +people +people's +peopled +peoples +peopling +pep +pepper +peppercorn +peppercorn's +peppercorns +peppered +pepperer +peppering +peppers +per +perceivable +perceivably +perceive +perceived +perceiver +perceivers +perceives +perceiving +percent +percentage +percentages +percentile +percentiles +percents +perceptible +perceptibly +perception +perceptions +perceptive +perceptively +perceptiveness +perceptual +perceptually +perch +perchance +perched +perches +perching +percolate +percolated +percolates +percolating +percolation +percutaneous +percutaneously +peremptoriness +peremptory +perennial +perennially +perennials +perfect +perfected +perfecter +perfecting +perfection +perfectionist +perfectionist's +perfectionists +perfections +perfective +perfectively +perfectiveness +perfectly +perfectness +perfects +perforce +perform +performance +performance's +performances +performed +performer +performers +performing +performs +perfume +perfumed +perfumer +perfumes +perfuming +perhaps +peril +peril's +perilous +perilously +perilousness +perils +period +period's +periodic +periodical +periodically +periodicals +periods +peripheral +peripherally +peripherals +peripheries +periphery +periphery's +perish +perishable +perishable's +perishables +perished +perisher +perishers +perishes +perishing +perishingly +permanence +permanent +permanently +permanentness +permanents +permeate +permeated +permeates +permeating +permeation +permeations +permeative +permissibility +permissible +permissibleness +permissibly +permission +permissions +permissive +permissively +permissiveness +permit +permit's +permits +permitted +permitting +permutation +permutation's +permutations +permute +permuted +permutes +permuting +perpendicular +perpendicularly +perpendiculars +perpetrate +perpetrated +perpetrates +perpetrating +perpetration +perpetrations +perpetrator +perpetrator's +perpetrators +perpetual +perpetually +perpetuate +perpetuated +perpetuates +perpetuating +perpetuation +perplex +perplexed +perplexedly +perplexes +perplexing +perplexities +perplexity +persecute +persecuted +persecutes +persecuting +persecution +persecutive +persecutor +persecutor's +persecutors +perseverance +persevere +persevered +perseveres +persevering +persist +persisted +persistence +persistent +persistently +persister +persisting +persists +person +person's +personable +personableness +personage +personage's +personages +personal +personalities +personality +personality's +personally +personals +personification +personifications +personified +personifier +personifies +personify +personifying +personnel +persons +perspective +perspective's +perspectively +perspectives +perspicuous +perspicuously +perspicuousness +perspiration +perspirations +persuadable +persuade +persuaded +persuader +persuaders +persuades +persuading +persuasion +persuasion's +persuasions +persuasive +persuasively +persuasiveness +pertain +pertained +pertaining +pertains +pertinent +pertinently +perturb +perturbation +perturbation's +perturbations +perturbed +perturbing +perusal +peruse +perused +peruser +perusers +peruses +perusing +pervade +pervaded +pervades +pervading +pervasive +pervasively +pervasiveness +pervert +perverted +pervertedly +pervertedness +perverter +perverting +perverts +pessimistic +pest +pester +pestered +pestering +pesters +pestilence +pestilences +pests +pet +petal +petal's +petals +peter +petered +peters +petition +petitioned +petitioner +petitioning +petitions +petroleum +pets +petted +petter +petter's +petters +petticoat +petticoat's +petticoated +petticoats +pettier +pettiest +pettiness +pettinesses +petting +petty +pew +pew's +pews +pewter +pewterer +phantom +phantom's +phantoms +phase +phased +phaser +phasers +phases +phasing +pheasant +pheasant's +pheasants +phenomena +phenomenal +phenomenally +phenomenological +phenomenologically +phenomenologies +phenomenology +phenomenon +philosopher +philosopher's +philosophers +philosophic +philosophical +philosophically +philosophies +philosophy +philosophy's +phone +phone's +phoned +phoneme +phoneme's +phonemes +phonemic +phonemics +phones +phonetic +phonetics +phoning +phonograph +phonographer +phonographs +phosphate +phosphate's +phosphates +phosphoric +photo +photo's +photocopied +photocopier +photocopies +photocopy +photocopying +photograph +photographed +photographer +photographers +photographic +photographing +photographs +photography +photos +phrase +phrased +phrases +phrasing +phrasings +phyla +phylum +physic +physical +physically +physicalness +physicals +physician +physician's +physicians +physicist +physicist's +physicists +physics +physiological +physiologically +physiology +physique +physiqued +pi +piano +piano's +pianos +piazza +piazza's +piazzas +picayune +pick +picked +picker +pickering +pickers +picket +picketed +picketer +picketers +picketing +pickets +picking +pickings +pickle +pickled +pickles +pickling +picks +pickup +pickup's +pickups +picnic +picnic's +picnics +pictorial +pictorially +pictorialness +picture +pictured +pictures +picturesque +picturesquely +picturesqueness +picturing +pie +piece +pieced +piecemeal +piecer +pieces +piecewise +piecing +pied +pier +pierce +pierced +pierces +piercing +piercingly +piers +pies +pieties +piety +pig +pig's +pigeon +pigeon's +pigeons +piggyback +pigment +pigmented +pigments +pigs +pike +pike's +piked +piker +pikes +piking +pile +piled +pilers +piles +pilferage +pilgrim +pilgrim's +pilgrimage +pilgrimage's +pilgrimages +pilgrims +piling +pilings +pill +pill's +pillage +pillaged +pillager +pillages +pillaging +pillar +pillared +pillars +pillow +pillow's +pillows +pills +pilot +pilot's +piloted +piloting +pilots +pin +pin's +pinch +pinched +pincher +pinches +pinching +pine +pineapple +pineapple's +pineapples +pined +pines +ping +pinger +pinging +pining +pinion +pinioned +pinions +pink +pinked +pinker +pinkest +pinking +pinkly +pinkness +pinks +pinnacle +pinnacle's +pinnacled +pinnacles +pinnacling +pinned +pinning +pinnings +pinpoint +pinpointed +pinpointing +pinpoints +pins +pint +pint's +pinter +pints +pioneer +pioneered +pioneering +pioneers +pious +piously +piousness +pipe +piped +pipeline +pipelined +pipelines +pipelining +piper +pipers +pipes +piping +pipingly +pipings +pique +piqued +piquing +pirate +pirate's +pirated +pirates +pirating +piss +pissed +pisser +pisses +pissing +pistil +pistil's +pistils +pistol +pistol's +pistols +piston +piston's +pistons +pit +pit's +pitch +pitched +pitcher +pitchers +pitches +pitching +piteous +piteously +piteousness +pitfall +pitfall's +pitfalls +pith +pithed +pithes +pithier +pithiest +pithiness +pithing +pithy +pitiable +pitiableness +pitied +pitier +pitiers +pities +pitiful +pitifully +pitifulness +pitiless +pitilessly +pitilessness +pits +pitted +pity +pitying +pityingly +pivot +pivotal +pivotally +pivoted +pivoting +pivots +pixel +pixel's +pixels +placard +placard's +placards +place +placed +placement +placement's +placements +placer +places +placid +placidly +placidness +placing +plague +plagued +plaguer +plagues +plaguing +plaid +plaid's +plaided +plaids +plain +plainer +plainest +plainly +plainness +plains +plaintiff +plaintiff's +plaintiffs +plaintive +plaintively +plaintiveness +plait +plait's +plaiter +plaiting +plaits +plan +plan's +planar +planarity +plane +plane's +planed +planer +planers +planes +planet +planet's +planetary +planets +planing +plank +planking +planks +planned +planner +planner's +planners +planning +plans +plant +plantation +plantation's +plantations +planted +planter +planters +planting +plantings +plants +plasma +plaster +plastered +plasterer +plasterers +plastering +plasters +plastic +plasticity +plasticly +plastics +plate +plateau +plateau's +plateaus +plated +platelet +platelet's +platelets +platen +platen's +platens +plater +platers +plates +platform +platform's +platforms +plating +platings +platinum +platter +platter's +platters +plausibility +plausible +plausibleness +play +playable +played +player +player's +players +playful +playfully +playfulness +playground +playground's +playgrounds +playing +playmate +playmate's +playmates +plays +plaything +plaything's +playthings +playwright +playwright's +playwrights +plea +plea's +plead +pleaded +pleader +pleading +pleadingly +pleadings +pleads +pleas +pleasant +pleasantly +pleasantness +please +pleased +pleasely +pleaser +pleases +pleasing +pleasingly +pleasingness +pleasurable +pleasurableness +pleasure +pleasured +pleasures +pleasuring +plebeian +plebeianly +plebiscite +plebiscite's +plebiscites +pledge +pledged +pledger +pledges +pledging +plenary +plenteous +plenteously +plenteousness +plenties +plentiful +plentifully +plentifulness +plenty +pleurisy +plication +plied +plier +pliers +plies +plight +plighter +plod +plods +plot +plot's +plots +plotted +plotter +plotter's +plotters +plotting +ploy +ploy's +ploys +pluck +plucked +plucker +pluckier +pluckiness +plucking +plucky +plug +plug's +plugged +plugging +plugs +plum +plum's +plumage +plumaged +plumages +plumb +plumb's +plumbed +plumber +plumbers +plumbing +plumbs +plume +plumed +plumes +pluming +plummeting +plump +plumped +plumpen +plumper +plumply +plumpness +plums +plunder +plundered +plunderer +plunderers +plundering +plunders +plunge +plunged +plunger +plungers +plunges +plunging +plural +plurality +plurally +plurals +plus +pluses +plush +plushly +plushness +ply +plying +pneumonia +poach +poached +poacher +poachers +poaches +poaching +pocket +pocketbook +pocketbook's +pocketbooks +pocketed +pocketing +pockets +pod +pod's +pods +poem +poem's +poems +poet +poet's +poetic +poetical +poetically +poeticalness +poetics +poetries +poetry +poetry's +poets +point +pointed +pointedly +pointedness +pointer +pointers +pointier +pointiest +pointing +pointless +pointlessly +pointlessness +points +pointy +poise +poised +poises +poising +poison +poisoned +poisoner +poisoning +poisonous +poisonously +poisonousness +poisons +poke +poked +poker +pokes +poking +polar +polarities +polarity +polarity's +pole +poled +polemic +polemics +poler +poles +police +police's +policed +policeman +policeman's +policemen +policemen's +polices +policies +policing +policy +policy's +poling +polish +polished +polisher +polishers +polishes +polishing +polite +politely +politeness +politer +politest +politic +political +politically +politician +politician's +politicians +politics +poll +polled +pollen +poller +polling +polls +pollute +polluted +polluter +pollutes +polluting +pollution +pollutive +polo +polygon +polygon's +polygons +polymer +polymer's +polymers +polynomial +polynomial's +polynomials +polyphonic +pomp +pompous +pompously +pompousness +pond +ponder +pondered +ponderer +pondering +ponderous +ponderously +ponderousness +ponders +ponds +ponies +pony +pony's +poof +pool +pooled +pooling +pools +poor +poorer +poorest +poorly +poorness +pop +pop's +pope +pope's +popes +poplar +popped +poppied +poppies +popping +poppy +poppy's +pops +populace +popular +popularity +popularly +populate +populated +populates +populating +population +populations +populous +populously +populousness +porcelain +porch +porch's +porches +porcupine +porcupine's +porcupines +pore +pored +pores +poring +pork +porker +porn +pornographic +porridge +port +portability +portable +portables +portably +portal +portal's +portals +portamento +portamento's +ported +portend +portended +portending +portends +porter +portering +porters +porting +portion +portion's +portioned +portioning +portions +portlier +portliness +portly +portrait +portrait's +portraits +portray +portrayed +portrayer +portraying +portrays +ports +pose +posed +poser +posers +poses +posing +posit +posited +positing +position +positional +positioned +positioning +positions +positive +positively +positiveness +positives +posits +possess +possessed +possessedly +possessedness +possesses +possessing +possession +possession's +possessional +possessions +possessive +possessive's +possessively +possessiveness +possessives +possessor +possessor's +possessors +possibilities +possibility +possibility's +possible +possibles +possibly +possum +possum's +possums +post +postage +postal +postcard +postcard's +postcards +postcondition +postconditions +posted +poster +poster's +posterior +posteriorly +posterity +posters +posting +postings +postman +postmaster +postmaster's +postmasters +postpone +postponed +postponer +postpones +postponing +posts +postscript +postscript's +postscripts +postulate +postulated +postulates +postulating +postulation +postulations +posture +posture's +postured +posturer +postures +posturing +pot +pot's +potash +potassium +potato +potatoes +potent +potentate +potentate's +potentates +potential +potentialities +potentiality +potentially +potentials +potentiating +potentiometer +potentiometer's +potentiometers +potently +pots +potted +potter +potter's +potterer +potteries +potters +pottery +potting +pouch +pouch's +pouched +pouches +poultry +pounce +pounced +pounces +pouncing +pound +pounded +pounder +pounders +pounding +pounds +pour +poured +pourer +pourers +pouring +pouringly +pours +pout +pouted +pouter +pouting +pouts +poverty +powder +powdered +powderer +powdering +powders +power +powered +powerful +powerfully +powerfulness +powering +powerless +powerlessly +powerlessness +powers +pox +poxes +practicable +practicableness +practicably +practical +practicalities +practicality +practically +practicalness +practice +practice's +practices +practitioner +practitioner's +practitioners +pragmatic +pragmatically +pragmatics +prairie +prairies +praise +praised +praiser +praisers +praises +praising +praisingly +prance +pranced +prancer +prances +prancing +prancingly +prank +prank's +pranks +prate +prated +prater +prates +prating +pratingly +pray +prayed +prayer +prayer's +prayers +praying +prays +preach +preached +preacher +preachers +preaches +preaching +preachingly +preallocate +preallocated +preallocates +preallocating +preallocation +preallocation's +preallocations +preallocator +preallocators +preassign +preassigned +preassigning +preassigns +precarious +precariously +precariousness +precaution +precaution's +precautioned +precautioning +precautions +precede +preceded +precedence +precedence's +precedences +precedent +precedented +precedents +precedes +preceding +precept +precept's +preceptive +preceptively +precepts +precinct +precinct's +precincts +precious +preciously +preciousness +precipice +precipitate +precipitated +precipitately +precipitateness +precipitates +precipitating +precipitation +precipitative +precipitous +precipitously +precipitousness +precise +precisely +preciseness +precision +precisions +preclude +precluded +precludes +precluding +precocious +precociously +precociousness +preconceive +preconceived +preconception +preconception's +preconceptions +precondition +preconditioned +preconditions +precursor +precursor's +precursors +predate +predated +predates +predating +predation +predecessor +predecessor's +predecessors +predefine +predefined +predefines +predefining +predefinition +predefinition's +predefinitions +predetermine +predetermined +predeterminer +predetermines +predetermining +predicament +predicate +predicated +predicates +predicating +predication +predications +predicative +predict +predictability +predictable +predictably +predicted +predicting +prediction +prediction's +predictions +predictive +predictively +predictor +predictors +predicts +predominant +predominantly +predominate +predominated +predominately +predominates +predominating +predomination +preempt +preempted +preempting +preemption +preemptive +preemptively +preempts +preface +prefaced +prefacer +prefaces +prefacing +prefer +preferable +preferableness +preferably +preference +preference's +preferences +preferential +preferentially +preferred +preferring +prefers +prefix +prefixed +prefixes +prefixing +pregnant +pregnantly +prehistoric +prejudge +prejudged +prejudger +prejudice +prejudiced +prejudices +prejudicing +prelate +preliminaries +preliminary +prelude +prelude's +preluded +preluder +preludes +preluding +premature +prematurely +prematureness +prematurity +premeditated +premeditatedly +premier +premier's +premiere +premiered +premieres +premiering +premiers +premise +premise's +premised +premises +premising +premium +premium's +premiums +preoccupation +preoccupations +preoccupied +preoccupies +preoccupy +preparation +preparation's +preparations +preparative +preparative's +preparatively +preparatives +preparatory +prepare +prepared +preparedly +preparedness +preparer +prepares +preparing +prepend +prepended +prepender +prependers +prepending +prepends +preposition +preposition's +prepositional +prepositionally +prepositions +preposterous +preposterously +preposterousness +preprint +preprinted +preprinting +preprints +preprocessor +preprocessors +preproduction +preprogrammed +prerequisite +prerequisite's +prerequisites +prerogative +prerogative's +prerogatived +prerogatives +prescribe +prescribed +prescriber +prescribes +prescribing +prescription +prescription's +prescriptions +prescriptive +prescriptively +preselect +preselected +preselecting +preselects +presence +presence's +presences +present +presentation +presentation's +presentations +presented +presenter +presenters +presenting +presently +presentness +presents +preservation +preservations +preservative +preservative's +preservatives +preserve +preserved +preserver +preservers +preserves +preserving +preset +presets +preside +presided +presidency +president +president's +presidential +presidentially +presidents +presider +presides +presiding +press +pressed +presser +presses +pressing +pressingly +pressings +pressure +pressured +pressures +pressuring +prestige +presumably +presume +presumed +presumer +presumes +presuming +presumingly +presumption +presumption's +presumptions +presumptuous +presumptuously +presumptuousness +presuppose +presupposed +presupposes +presupposing +pretend +pretended +pretendedly +pretender +pretenders +pretending +pretends +pretentious +pretentiously +pretentiousness +pretext +pretext's +pretexts +prettied +prettier +pretties +prettiest +prettily +prettiness +pretty +prettying +prevail +prevailed +prevailing +prevailingly +prevails +prevalence +prevalent +prevalently +prevent +preventable +preventably +prevented +preventer +preventing +prevention +preventions +preventive +preventively +preventiveness +preventives +prevents +preview +previewed +previewer +previewers +previewing +previews +previous +previously +previousness +prey +preyed +preyer +preying +preys +price +priced +priceless +pricer +pricers +prices +pricing +prick +pricked +pricker +pricking +pricklier +prickliness +prickly +pricks +pride +prided +prides +priding +pried +prier +pries +priest +priestliness +priestly +priests +primacy +primaries +primarily +primary +primary's +prime +primed +primely +primeness +primer +primers +primes +primeval +primevally +priming +primitive +primitively +primitiveness +primitives +primrose +prince +princelier +princeliness +princely +princes +princess +princess's +princesses +principal +principalities +principality +principality's +principally +principals +principle +principled +principles +print +printable +printably +printed +printer +printers +printing +printout +printouts +prints +prior +priori +priorities +priority +priority's +priorly +priors +priory +prism +prism's +prisms +prison +prisoner +prisoner's +prisoners +prisons +privacies +privacy +private +privately +privateness +privates +privation +privations +privative +privatively +privies +privilege +privileged +privileges +privy +privy's +prize +prized +prizer +prizers +prizes +prizing +pro +pro's +probabilistic +probabilistically +probabilities +probability +probable +probably +probate +probated +probates +probating +probation +probationer +probationers +probative +probe +probed +prober +probes +probing +probings +problem +problem's +problematic +problematical +problematically +problems +procedural +procedurally +procedure +procedure's +procedures +proceed +proceeded +proceeder +proceeding +proceedings +proceeds +process +process's +processed +processes +processing +procession +processor +processor's +processors +proclaim +proclaimed +proclaimer +proclaimers +proclaiming +proclaims +proclamation +proclamation's +proclamations +proclivities +proclivity +proclivity's +procrastinate +procrastinated +procrastinates +procrastinating +procrastination +procrastinator +procrastinator's +procrastinators +procure +procured +procurement +procurement's +procurements +procurer +procurers +procures +procuring +prodigal +prodigally +prodigious +prodigiously +prodigiousness +produce +produced +producer +producers +produces +producible +producing +product +product's +production +production's +productions +productive +productively +productiveness +productivities +productivity +products +profane +profaned +profanely +profaneness +profaner +profaning +profess +professed +professedly +professes +professing +profession +profession's +professional +professionalism +professionalisms +professionally +professionals +professions +professor +professor's +professors +proffer +proffered +proffering +proffers +proficiencies +proficiency +proficient +proficiently +profile +profiled +profiler +profiler's +profilers +profiles +profiling +profit +profit's +profitability +profitable +profitableness +profitably +profited +profiteer +profiteer's +profiteers +profiter +profiters +profiting +profits +profound +profoundest +profoundly +profoundness +progeny +program +program's +programmability +programmable +programmatic +programmed +programmer +programmer's +programmers +programming +programs +progress +progressed +progresses +progressing +progression +progression's +progressions +progressive +progressively +progressiveness +prohibit +prohibited +prohibiter +prohibiting +prohibition +prohibition's +prohibitions +prohibitive +prohibitively +prohibitiveness +prohibits +project +project's +projected +projecting +projection +projection's +projections +projective +projectively +projector +projector's +projectors +projects +prolegomena +proletariat +proliferate +proliferated +proliferates +proliferating +proliferation +proliferative +prolific +prolificness +prolog +prolog's +prologs +prologue +prologue's +prologues +prolong +prolonged +prolonger +prolonging +prolongs +promenade +promenade's +promenader +promenades +promenading +prominence +prominent +prominently +promiscuity +promiscuity's +promiscuous +promiscuously +promiscuousness +promise +promised +promiser +promises +promising +promisingly +promontories +promontory +promote +promoted +promoter +promoters +promotes +promoting +promotion +promotional +promotions +promotive +promotiveness +prompt +prompted +prompter +prompters +promptest +prompting +promptings +promptly +promptness +prompts +promulgate +promulgated +promulgates +promulgating +promulgation +promulgations +prone +pronely +proneness +prong +pronged +prongs +pronoun +pronoun's +pronounce +pronounceable +pronounced +pronouncedly +pronouncement +pronouncement's +pronouncements +pronouncer +pronounces +pronouncing +pronouns +pronunciation +pronunciation's +pronunciations +proof +proof's +proofed +proofer +proofing +proofs +prop +propaganda +propagate +propagated +propagates +propagating +propagation +propagations +propagative +propel +propelled +propeller +propeller's +propellers +propels +propensities +propensity +proper +properly +properness +propertied +properties +property +prophecies +prophecy +prophecy's +prophesied +prophesier +prophesies +prophesy +prophesying +prophet +prophet's +prophetic +prophets +propitious +propitiously +propitiousness +proponent +proponent's +proponents +proportion +proportional +proportionally +proportionately +proportioned +proportioner +proportioning +proportionment +proportions +proposal +proposal's +proposals +propose +proposed +proposer +proposers +proposes +proposing +proposition +propositional +propositionally +propositioned +propositioning +propositions +propound +propounded +propounder +propounding +propounds +proprietary +proprietor +proprietor's +proprietors +propriety +props +propulsion +propulsion's +propulsions +pros +prose +prosecute +prosecuted +prosecutes +prosecuting +prosecution +prosecutions +proser +prosing +prosodic +prosodics +prospect +prospected +prospecting +prospection +prospection's +prospections +prospective +prospectively +prospectiveness +prospectives +prospector +prospector's +prospectors +prospects +prospectus +prosper +prospered +prospering +prosperity +prosperous +prosperously +prosperousness +prospers +prostitution +prostrate +prostrated +prostration +protect +protected +protectedly +protecting +protection +protection's +protections +protective +protectively +protectiveness +protector +protector's +protectorate +protectors +protects +protege +protege's +proteges +protein +protein's +proteins +protest +protest's +protestants +protestation +protestations +protested +protester +protester's +protesters +protesting +protestingly +protests +protocol +protocol's +protocols +proton +proton's +protons +protoplasm +prototype +prototype's +prototyped +prototypes +prototypical +prototypically +prototyping +protrude +protruded +protrudes +protruding +protrusion +protrusion's +protrusions +proud +prouder +proudest +proudly +provability +provable +provableness +provably +prove +proved +proven +provenly +prover +proverb +proverb's +proverbs +provers +proves +provide +provided +providence +provider +providers +provides +providing +province +province's +provinces +provincial +provincially +proving +provision +provisional +provisionally +provisioned +provisioner +provisioning +provisions +provocation +provoke +provoked +provokes +provoking +provokingly +prow +prow's +prowess +prowl +prowled +prowler +prowlers +prowling +prowls +prows +proximal +proximally +proximate +proximately +proximateness +proximity +prudence +prudent +prudently +prune +pruned +pruner +pruners +prunes +pruning +pry +prying +pryingly +psalm +psalm's +psalms +pseudo +psyche +psyche's +psyches +psychiatrist +psychiatrist's +psychiatrists +psychiatry +psychological +psychologically +psychologist +psychologist's +psychologists +psychology +psychosocial +psychosocially +pub +pub's +public +publication +publication's +publications +publicity +publicly +publicness +publics +publish +published +publisher +publishers +publishes +publishing +pubs +pucker +puckered +puckering +puckers +pudding +pudding's +puddings +puddle +puddled +puddler +puddles +puddling +puff +puffed +puffer +puffers +puffing +puffs +pull +pulled +puller +pulley +pulley's +pulleys +pulling +pullings +pulls +pulp +pulper +pulping +pulpit +pulpit's +pulpits +pulse +pulsed +pulser +pulses +pulsing +pump +pumped +pumper +pumping +pumpkin +pumpkin's +pumpkins +pumps +pun +pun's +punch +punched +puncher +puncher's +punchers +punches +punching +punchings +punctual +punctually +punctualness +punctuation +puncture +puncture's +punctured +punctures +puncturing +punier +puniness +punish +punishable +punished +punisher +punishes +punishing +punishment +punishment's +punishments +punitive +punitively +punitiveness +puns +punt +punted +punter +punters +punting +punts +puny +pup +pup's +pupa +pupas +pupil +pupil's +pupils +puppet +puppet's +puppets +puppies +puppy +puppy's +pups +purchasable +purchase +purchased +purchaser +purchasers +purchases +purchasing +pure +purely +pureness +purer +purest +purge +purged +purger +purges +purging +purification +purifications +purified +purifier +purifiers +purifies +purify +purifying +purity +purple +purpled +purpler +purples +purplest +purpling +purport +purported +purportedly +purporter +purporters +purporting +purports +purpose +purposed +purposeful +purposefully +purposefulness +purposely +purposes +purposing +purposive +purposively +purposiveness +purr +purred +purring +purringly +purrs +purse +pursed +purser +pursers +purses +pursing +pursue +pursued +pursuer +pursuers +pursues +pursuing +pursuit +pursuit's +pursuits +purview +push +pushbutton +pushbuttons +pushdown +pushed +pusher +pushers +pushes +pushing +puss +pussier +pussies +pussy +put +puts +putter +putterer +puttering +putters +putting +puzzle +puzzled +puzzlement +puzzler +puzzlers +puzzles +puzzling +puzzlings +pygmies +pygmy +pygmy's +pyramid +pyramid's +pyramids +quack +quacked +quacking +quacks +quadrant +quadrant's +quadrants +quadratic +quadratical +quadratically +quadratics +quadrature +quadrature's +quadratures +quadruple +quadrupled +quadruples +quadrupling +quadword +quadword's +quadwords +quagmire +quagmire's +quagmires +quail +quail's +quails +quaint +quaintly +quaintness +quake +quaked +quaker +quakers +quakes +quaking +qualification +qualifications +qualified +qualifiedly +qualifier +qualifiers +qualifies +qualify +qualifying +qualitative +qualitatively +qualities +quality +quality's +qualm +qualms +quandaries +quandary +quandary's +quanta +quantifiable +quantification +quantifications +quantified +quantifier +quantifiers +quantifies +quantify +quantifying +quantitative +quantitatively +quantitativeness +quantities +quantity +quantity's +quantum +quarantine +quarantine's +quarantined +quarantines +quarantining +quarrel +quarrels +quarrelsome +quarrelsomely +quarrelsomeness +quarried +quarrier +quarries +quarry +quarry's +quarrying +quart +quarter +quartered +quarterer +quartering +quarterlies +quarterly +quarters +quartet +quartet's +quartets +quarts +quartz +quash +quashed +quashes +quashing +quasi +quaver +quavered +quavering +quaveringly +quavers +quay +quays +queen +queen's +queenly +queens +queer +queerer +queerest +queerly +queerness +queers +quell +quelled +queller +quelling +quells +quench +quenched +quencher +quenches +quenching +queried +querier +queries +query +querying +quest +quested +quester +questers +questing +question +questionable +questionableness +questionably +questioned +questioner +questioners +questioning +questioningly +questionings +questionnaire +questionnaire's +questionnaires +questions +quests +queue +queue's +queued +queuer +queuer's +queuers +queues +quick +quicken +quickened +quickener +quickening +quickens +quicker +quickest +quickly +quickness +quicksilver +quiet +quieted +quieten +quietened +quietening +quietens +quieter +quietest +quieting +quietly +quietness +quiets +quietude +quill +quills +quilt +quilted +quilter +quilting +quilts +quinine +quit +quite +quits +quitter +quitter's +quitters +quitting +quiver +quivered +quivering +quivers +quiz +quizzed +quizzes +quizzing +quo +quota +quota's +quotas +quotation +quotation's +quotations +quote +quoted +quotes +quoth +quotient +quotients +quoting +rabbit +rabbit's +rabbited +rabbiter +rabbiting +rabbits +rabble +rabbled +rabbler +rabbling +raccoon +raccoon's +raccoons +race +raced +racehorse +racehorse's +racehorses +racer +racers +races +racial +racially +racing +rack +racked +racker +racket +racket's +racketeer +racketeering +racketeers +rackets +racking +racks +radar +radar's +radars +radial +radially +radiance +radiant +radiantly +radiate +radiated +radiately +radiates +radiating +radiation +radiations +radiative +radiatively +radiator +radiator's +radiators +radical +radically +radicalness +radicals +radio +radioed +radioing +radiology +radios +radish +radish's +radishes +radius +radiuses +radix +radixes +raft +rafter +raftered +rafters +rafts +rag +rag's +rage +raged +rages +ragged +raggedly +raggedness +raging +rags +raid +raided +raider +raiders +raiding +raids +rail +railed +railer +railers +railing +railroad +railroaded +railroader +railroaders +railroading +railroads +rails +railway +railway's +railways +raiment +rain +rain's +rainbow +rainbows +raincoat +raincoat's +raincoats +raindrop +raindrop's +raindrops +rained +rainfall +rainier +rainiest +raining +rains +rainy +raise +raised +raiser +raisers +raises +raisin +raising +raisins +rake +raked +raker +rakes +raking +rallied +rallies +rally +rallying +ram +ram's +ramble +rambled +rambler +ramblers +rambles +rambling +ramblingly +ramblings +ramification +ramification's +ramifications +ramp +ramp's +rampart +ramparts +ramped +ramping +ramps +rams +ramses +ran +ranch +ranched +rancher +ranchers +ranches +ranching +random +randomly +randomness +rang +range +ranged +ranger +rangers +ranges +ranging +rank +ranked +ranker +ranker's +rankers +rankest +ranking +ranking's +rankings +rankle +rankled +rankles +rankling +rankly +rankness +ranks +ransack +ransacked +ransacker +ransacking +ransacks +ransom +ransomer +ransoming +ransoms +rant +ranted +ranter +ranters +ranting +rantingly +rants +rap +rap's +rape +raped +raper +rapes +rapid +rapidity +rapidly +rapidness +rapids +raping +raps +rapt +raptly +raptness +rapture +rapture's +raptured +raptures +rapturing +rapturous +rapturously +rapturousness +rare +rarely +rareness +rarer +rarest +raring +rarities +rarity +rarity's +rascal +rascally +rascals +rash +rasher +rashes +rashly +rashness +rasp +raspberry +rasped +rasper +rasping +raspingly +raspings +rasps +raster +rasters +rat +rat's +rate +rated +rater +raters +rates +rather +ratification +ratifications +ratified +ratifies +ratify +ratifying +rating +ratings +ratio +ratio's +ration +rational +rationale +rationale's +rationales +rationalities +rationality +rationally +rationalness +rationed +rationing +rations +ratios +rats +rattle +rattled +rattler +rattlers +rattles +rattlesnake +rattlesnake's +rattlesnakes +rattling +rattlingly +ravage +ravaged +ravager +ravagers +ravages +ravaging +rave +raved +raven +ravened +ravener +ravening +ravenous +ravenously +ravenousness +ravens +raver +raves +ravine +ravine's +ravined +ravines +raving +ravings +raw +rawer +rawest +rawly +rawness +raws +ray +ray's +rayed +rays +razor +razor's +razors +re +reabbreviate +reabbreviated +reabbreviates +reabbreviating +reach +reachable +reachably +reached +reacher +reaches +reaching +reacquainted +react +reacted +reacting +reaction +reaction's +reactionaries +reactionary +reactionary's +reactions +reactivate +reactivated +reactivates +reactivating +reactivation +reactive +reactively +reactiveness +reactivity +reactor +reactor's +reactors +reacts +read +readability +readable +readableness +readapting +reader +reader's +readers +readied +readier +readies +readiest +readily +readiness +reading +readings +readjustable +readjusted +readjustments +readjusts +readout +readout's +readouts +reads +ready +readying +reaffirm +reaffirmed +reaffirming +reaffirms +reagents +real +realest +realign +realigned +realigning +realignment +realignments +realigns +realism +realist +realist's +realistic +realistically +realists +realities +reality +realizable +realizable's +realizableness +realizables +realizablies +realizably +realization +realization's +realizations +realize +realized +realizer +realizers +realizes +realizing +realizing's +realizingly +realizings +reallocate +reallocated +reallocates +reallocating +reallocation +reallocation's +reallocations +reallocator +reallocator's +reallocators +reallotments +reallots +reallotted +reallotting +really +realm +realm's +realms +realness +reals +ream +ream's +reamed +reamer +reaming +reams +reanalysis +reap +reaped +reaper +reaping +reappear +reappeared +reappearing +reappears +reapplying +reapportioned +reappraisal +reappraisals +reappraised +reappraises +reaps +rear +reared +rearer +rearing +rearmed +rearms +rearrange +rearrangeable +rearranged +rearrangement +rearrangement's +rearrangements +rearranges +rearranging +rearrest +rearrested +rears +reason +reasonable +reasonableness +reasonably +reasoned +reasoner +reasoning +reasonings +reasons +reassemble +reassembled +reassembler +reassembles +reassembling +reasserts +reassess +reassessed +reassesses +reassessing +reassessment +reassessment's +reassessments +reassign +reassignable +reassigned +reassigning +reassignment +reassignment's +reassignments +reassigns +reassurances +reassure +reassured +reassures +reassuring +reassuringly +reawaken +reawakened +reawakening +reawakens +rebate +rebate's +rebated +rebater +rebates +rebating +rebel +rebel's +rebelled +rebelling +rebellion +rebellion's +rebellions +rebellious +rebelliously +rebelliousness +rebells +rebels +rebidding +rebids +rebirth +rebirth's +rebonds +reboot +rebooted +rebooter +rebooters +rebooting +reboots +reborn +rebound +rebounded +rebounder +rebounding +rebounds +rebroadcast +rebroadcasts +rebuff +rebuffed +rebuffing +rebuffs +rebuild +rebuilding +rebuilds +rebuilt +rebuke +rebuked +rebuker +rebukes +rebuking +rebut +rebuttal +rebuttals +rebutted +rebutting +recalculate +recalculated +recalculates +recalculating +recalculation +recalculations +recall +recalled +recaller +recalling +recalls +recapitulate +recapitulated +recapitulates +recapitulating +recapitulation +recapped +recapping +recapture +recaptured +recaptures +recapturing +recast +recasting +recasts +recede +receded +recedes +receding +receipt +receipt's +receipted +receipting +receipts +receivable +receivables +receive +received +receiver +receiver's +receivers +receives +receiving +recent +recently +recentness +receptacle +receptacle's +receptacles +reception +reception's +receptions +receptive +receptively +receptiveness +receptivity +receptor +receptor's +receptors +recess +recessed +recesses +recessing +recession +recession's +recessions +recessive +recessively +recessiveness +recharged +recharges +rechartering +rechecked +rechecks +recipe +recipe's +recipes +recipient +recipient's +recipients +reciprocal +reciprocally +reciprocals +reciprocate +reciprocated +reciprocates +reciprocating +reciprocation +reciprocative +reciprocity +recirculate +recirculated +recirculates +recirculating +recirculation +recital +recital's +recitals +recitation +recitation's +recitations +recite +recited +reciter +recites +reciting +reckless +recklessly +recklessness +reckon +reckoned +reckoner +reckoning +reckonings +reckons +reclaim +reclaimable +reclaimed +reclaimer +reclaimers +reclaiming +reclaims +reclamation +reclamations +reclassification +reclassified +reclassifies +reclassify +reclassifying +recline +reclined +reclines +reclining +reclustered +reclusters +recode +recoded +recodes +recoding +recognition +recognition's +recognitions +recoil +recoiled +recoiling +recoils +recoinage +recollect +recollected +recollecting +recollection +recollection's +recollections +recollects +recombination +recombination's +recombinational +recombinations +recombine +recombined +recombines +recombining +recommenced +recommences +recommend +recommendation +recommendation's +recommendations +recommended +recommender +recommending +recommends +recompense +recompilations +recompile +recompiled +recompiles +recompiling +recompute +recomputed +recomputes +recomputing +reconcile +reconciled +reconciler +reconciles +reconciliation +reconciliation's +reconciliations +reconciling +reconditioned +reconfigurable +reconfiguration +reconfiguration's +reconfigurations +reconfigure +reconfigured +reconfigurer +reconfigures +reconfiguring +reconnect +reconnected +reconnecter +reconnecting +reconnection +reconnects +reconsider +reconsideration +reconsidered +reconsidering +reconsiders +reconsolidated +reconsolidates +reconstituted +reconstitutes +reconstruct +reconstructed +reconstructible +reconstructing +reconstruction +reconstructions +reconstructive +reconstructs +recontacted +reconvened +reconvenes +reconverts +record +recorded +recorder +recorders +recording +recordings +records +recored +recount +recounted +recounter +recounting +recounts +recourse +recourses +recover +recoverability +recoverable +recovered +recoverer +recoveries +recovering +recovers +recovery +recovery's +recreate +recreated +recreates +recreating +recreation +recreational +recreations +recreative +recruit +recruit's +recruited +recruiter +recruiter's +recruiters +recruiting +recruits +recta +rectangle +rectangle's +rectangles +rectangular +rectangularly +rector +rector's +rectors +rectum +rectum's +rectums +recur +recurrence +recurrence's +recurrences +recurrent +recurrently +recurring +recurs +recurse +recursed +recurses +recursing +recursion +recursion's +recursions +recursive +recursively +recursiveness +recurved +recyclable +recycle +recycled +recycles +recycling +red +redbreast +redden +reddened +reddening +redder +reddest +reddish +reddishness +redeclare +redeclared +redeclares +redeclaring +redecorated +redecorates +redeem +redeemed +redeemer +redeemers +redeeming +redeems +redefine +redefined +redefines +redefining +redefinition +redefinition's +redefinitions +redemption +redemptioner +redeploys +redeposit +redeposit's +redeposited +redepositing +redepositor +redepositor's +redepositors +redeposits +redesign +redesigned +redesigning +redesigns +redetermination +redetermines +redevelop +redeveloped +redeveloper +redevelopers +redeveloping +redevelopment +redevelops +redials +redirect +redirected +redirecting +redirection +redirections +redirector +redirector's +redirectors +redirects +rediscovered +rediscovers +redisplay +redisplayed +redisplaying +redisplays +redistribute +redistributed +redistributes +redistributing +redistribution +redistribution's +redistributions +redistributive +redly +redness +redoing +redone +redouble +redoubled +redoubles +redoubling +redoubtable +redraw +redrawing +redrawn +redraws +redress +redressed +redresser +redresses +redressing +reds +reduce +reduced +reducer +reducers +reduces +reducibility +reducible +reducibly +reducing +reduction +reduction's +reductions +redundancies +redundancy +redundant +redundantly +reduplicated +reed +reed's +reeder +reeding +reeds +reeducation +reef +reefer +reefing +reefs +reel +reelect +reelected +reelecting +reelects +reeled +reeler +reeling +reels +reemerged +reenactment +reenforcement +reenlists +reenter +reentered +reentering +reenters +reentrant +reestablish +reestablished +reestablishes +reestablishing +reestimating +reevaluate +reevaluated +reevaluates +reevaluating +reevaluation +reeves +reexamine +reexamined +reexamines +reexamining +refaced +refaces +refelled +refelling +refer +referee +referee's +refereed +refereeing +referees +reference +referenced +referencer +references +referencing +referendum +referent +referent's +referential +referentiality +referentially +referents +referral +referral's +referrals +referred +referrer +referring +refers +refill +refillable +refilled +refilling +refills +refine +refined +refinement +refinement's +refinements +refiner +refines +refining +refinished +reflect +reflected +reflecting +reflection +reflection's +reflections +reflective +reflectively +reflectiveness +reflectivity +reflector +reflector's +reflectors +reflects +reflex +reflex's +reflexed +reflexes +reflexive +reflexively +reflexiveness +reflexivity +reflexly +refluent +refocus +refocused +refocuses +refocusing +refolded +reform +reformable +reformat +reformation +reformative +reformats +reformatted +reformatter +reformatting +reformed +reformer +reformers +reforming +reforms +reformulate +reformulated +reformulates +reformulating +reformulation +refractoriness +refractory +refrain +refrained +refraining +refrains +refresh +refreshed +refreshen +refresher +refreshers +refreshes +refreshing +refreshingly +refreshment +refreshment's +refreshments +refried +refries +refrigerator +refrigerator's +refrigerators +refry +refrying +refuel +refuels +refuge +refuged +refugee +refugee's +refugees +refuges +refuging +refund +refund's +refunded +refunder +refunders +refunding +refunds +refusal +refusals +refuse +refused +refuser +refuses +refusing +refutable +refutation +refute +refuted +refuter +refutes +refuting +regain +regained +regaining +regains +regal +regaled +regaling +regally +regard +regarded +regarding +regardless +regardlessly +regardlessness +regards +regenerate +regenerated +regenerately +regenerateness +regenerates +regenerating +regeneration +regenerative +regeneratively +regenerators +regent +regent's +regents +regime +regime's +regimen +regiment +regimented +regiments +regimes +region +region's +regional +regionally +regions +register +registered +registering +registers +registration +registration's +registrations +registry +regreets +regress +regressed +regresses +regressing +regression +regression's +regressions +regressive +regressively +regressiveness +regret +regretful +regretfully +regretfulness +regrets +regrettable +regrettably +regretted +regretting +regrids +regroup +regrouped +regrouping +regular +regularities +regularity +regularly +regulars +regulate +regulated +regulates +regulating +regulation +regulations +regulative +regulator +regulator's +regulators +rehash +rehashed +rehashes +rehashing +rehearsal +rehearsal's +rehearsals +rehearse +rehearsed +rehearser +rehearses +rehearsing +rehoused +rehouses +reign +reigned +reigning +reigns +reimbursed +reimbursement +reimbursement's +reimbursements +rein +reincarnate +reincarnated +reincarnation +reincorporating +reincorporation +reindeer +reined +reinforce +reinforced +reinforcement +reinforcement's +reinforcements +reinforcer +reinforces +reinforcing +reining +reins +reinsert +reinserted +reinserting +reinsertions +reinserts +reinstall +reinstalled +reinstaller +reinstalling +reinstalls +reinstate +reinstated +reinstatement +reinstates +reinstating +reintegrated +reinterpret +reinterpretations +reinterpreted +reinterpreting +reinterprets +reinterviewed +reintroduce +reintroduced +reintroduces +reintroducing +reinvent +reinvented +reinventing +reinvention +reinvents +reinvested +reinvoked +reinvokes +reissue +reissued +reissuer +reissuer's +reissuers +reissues +reissuing +reiterate +reiterated +reiterates +reiterating +reiteration +reiterations +reiterative +reiteratively +reiterativeness +reject +rejected +rejecter +rejecting +rejectingly +rejection +rejection's +rejections +rejective +rejector +rejector's +rejectors +rejects +rejoice +rejoiced +rejoicer +rejoices +rejoicing +rejoicingly +rejoin +rejoined +rejoining +rejoins +rekindle +rekindled +rekindler +rekindles +rekindling +reknit +relabel +relabels +relapse +relapsed +relapser +relapses +relapsing +relate +related +relatedly +relatedness +relater +relates +relating +relation +relational +relationally +relations +relationship +relationship's +relationships +relative +relatively +relativeness +relatives +relativism +relativistic +relativistically +relativity +relativity's +relax +relaxation +relaxation's +relaxations +relaxed +relaxedly +relaxedness +relaxer +relaxes +relaxing +relay +relayed +relaying +relays +relearns +release +released +releaser +releases +releasing +relegate +relegated +relegates +relegating +relegation +relent +relented +relenting +relentless +relentlessly +relentlessness +relents +relevance +relevances +relevant +relevantly +reliabilities +reliability +reliable +reliableness +reliably +reliance +relic +relic's +relicense +relicensed +relicenser +relicenses +relicensing +relics +relied +relief +reliefs +relier +relies +relieve +relieved +relievedly +reliever +relievers +relieves +relieving +religion +religion's +religions +religious +religiously +religiousness +relinking +relinquish +relinquished +relinquishes +relinquishing +relish +relished +relishes +relishing +relive +relives +reliving +reload +reloaded +reloader +reloading +reloads +relocate +relocated +relocates +relocating +relocation +relocations +reluctance +reluctances +reluctant +reluctantly +rely +relying +remade +remain +remainder +remainder's +remaindered +remaindering +remainders +remained +remaining +remains +remark +remarkable +remarkableness +remarkably +remarked +remarking +remarks +remarriages +remarried +remedied +remedies +remedy +remedying +remember +remembered +rememberer +remembering +remembers +remembrance +remembrance's +remembrancer +remembrances +remind +reminded +reminder +reminders +reminding +reminds +reminiscence +reminiscence's +reminiscences +reminiscent +reminiscently +remissions +remittance +remittances +remixed +remnant +remnant's +remnants +remodel +remodels +remodulate +remodulated +remodulates +remodulating +remodulation +remodulator +remodulator's +remodulators +remolding +remonstrate +remonstrated +remonstrates +remonstrating +remonstration +remonstrative +remonstratively +remorse +remote +remotely +remoteness +remotest +remotion +remoulds +removable +removableness +removal +removal's +removals +remove +removed +remover +removes +removing +renaissance +renal +rename +renamed +renames +renaming +renatured +renatures +rend +render +rendered +renderer +rendering +renderings +renders +rendezvous +rendezvoused +rendezvouses +rendezvousing +rending +rendition +rendition's +renditions +rends +renegotiable +renegotiated +renegotiates +renew +renewal +renewals +renewed +renewer +renewing +renews +reno +renominated +renominates +renounce +renounced +renouncer +renounces +renouncing +renown +renowned +rent +rental +rental's +rentals +rented +renter +renter's +renters +renting +rents +renumber +renumbered +renumbering +renumbers +reopen +reopened +reopening +reopens +reorder +reordered +reordering +reorders +reoriented +repackage +repackaged +repackager +repackages +repackaging +repacks +repaid +repaint +repainted +repainter +repainters +repainting +repaints +repair +repaired +repairer +repairers +repairing +repairman +repairs +reparable +reparation +reparation's +reparations +repartition +repartitioned +repartitioner +repartitioners +repartitioning +repartitions +repast +repast's +repasts +repaving +repay +repayable +repaying +repayments +repays +repeal +repealed +repealer +repealing +repeals +repeat +repeatable +repeated +repeatedly +repeater +repeaters +repeating +repeats +repel +repels +repent +repentance +repented +repenter +repenting +repents +repercussion +repercussion's +repercussions +repertoire +repetition +repetition's +repetitions +repetitive +repetitively +repetitiveness +rephrase +rephrased +rephrases +rephrasing +repine +repined +repiner +repining +replace +replaceable +replaced +replacement +replacement's +replacements +replacer +replaces +replacing +replanted +replay +replayed +replaying +replays +repleader +replenish +replenished +replenisher +replenishes +replenishing +replete +repleteness +repletion +replica +replica's +replicas +replicate +replicated +replicates +replicating +replication +replications +replicative +replied +replier +replies +reply +replying +report +reported +reportedly +reporter +reporters +reporting +reports +repose +reposed +reposes +reposing +reposition +repositioned +repositioning +repositions +repositories +repository +repository's +repost +reposted +reposter +reposting +repostings +reposts +represent +representable +representably +representation +representation's +representational +representationally +representations +representative +representatively +representativeness +representatives +represented +representer +representing +represents +repress +repressed +represses +repressing +repression +repression's +repressions +repressive +repressively +repressiveness +reprieve +reprieved +reprieves +reprieving +reprint +reprinted +reprinter +reprinting +reprints +reprisal +reprisal's +reprisals +reproach +reproached +reproacher +reproaches +reproaching +reproachingly +reprobates +reprocessed +reproduce +reproduced +reproducer +reproducers +reproduces +reproducibilities +reproducibility +reproducible +reproducibly +reproducing +reproduction +reproduction's +reproductions +reproductive +reproductively +reproductivity +reprogrammed +reprogrammer +reprogrammer's +reprogrammers +reprogramming +reproof +reprove +reproved +reprover +reproving +reprovingly +reptile +reptile's +reptiles +republic +republic's +republican +republican's +republicans +republication +republics +republish +republished +republisher +republisher's +republishers +republishes +republishing +repudiate +repudiated +repudiates +repudiating +repudiation +repudiations +repulse +repulsed +repulses +repulsing +repulsion +repulsions +repulsive +repulsively +repulsiveness +reputable +reputably +reputation +reputation's +reputations +repute +reputed +reputedly +reputes +reputing +request +requested +requester +requesters +requesting +requestioned +requests +requiem +requiem's +requiems +require +required +requirement +requirement's +requirements +requirer +requires +requiring +requisite +requisiteness +requisites +requisition +requisitioned +requisitioner +requisitioning +requisitions +requite +requited +requiter +requiting +reran +reread +rereading +rereads +reroute +rerouted +rerouter +rerouters +reroutes +reroutings +rerun +rerunning +reruns +res +resalable +resaturated +resaturates +rescaled +rescan +rescanned +rescanning +rescans +reschedule +rescheduled +rescheduler +reschedules +rescheduling +rescue +rescued +rescuer +rescuers +rescues +rescuing +resealed +research +researched +researcher +researcher's +researchers +researches +researching +reselect +reselected +reselecting +reselects +resell +reseller +resellers +reselling +resells +resemblance +resemblance's +resemblances +resemble +resembled +resembles +resembling +resends +resent +resented +resentful +resentfully +resentfulness +resenting +resentment +resents +resequenced +reservation +reservation's +reservations +reserve +reserved +reservedly +reservedness +reserver +reserves +reserving +reservoir +reservoir's +reservoirs +reset +reseted +reseter +reseting +resets +resetting +resettings +resettled +resettles +resettling +reshape +reshaped +reshaper +reshapes +reshaping +reside +resided +residence +residence's +residences +resident +resident's +residential +residentially +residents +resider +resides +residing +residue +residue's +residues +resifted +resign +resignation +resignation's +resignations +resigned +resignedly +resignedness +resigner +resigning +resigns +resin +resin's +resined +resining +resins +resist +resistance +resistances +resistant +resistantly +resisted +resister +resistible +resistibly +resisting +resistive +resistively +resistiveness +resistivity +resistor +resistor's +resistors +resists +resize +resized +resizes +resizing +resold +resoluble +resolute +resolutely +resoluteness +resolution +resolutions +resolutive +resolvable +resolve +resolved +resolver +resolvers +resolves +resolving +resonance +resonances +resonant +resonantly +resort +resorted +resorter +resorting +resorts +resound +resounding +resoundingly +resounds +resource +resource's +resourced +resourceful +resourcefully +resourcefulness +resources +resourcing +respecified +respect +respectability +respectable +respectableness +respectably +respected +respecter +respectful +respectfully +respectfulness +respecting +respective +respectively +respectiveness +respects +respiration +respirations +respired +respires +respite +respited +respiting +resplendent +resplendently +respond +responded +respondent +respondent's +respondents +responder +responders +responding +responds +response +responser +responses +responsibilities +responsibility +responsible +responsibleness +responsibly +responsions +responsive +responsively +responsiveness +rest +restart +restarted +restarter +restarting +restarts +restate +restated +restatement +restates +restating +restaurant +restaurant's +restaurants +rested +rester +restful +restfully +restfulness +resting +restive +restively +restiveness +restless +restlessly +restlessness +restoration +restoration's +restorations +restore +restored +restorer +restorers +restores +restoring +restrain +restrained +restrainedly +restrainer +restrainers +restraining +restrains +restraint +restraint's +restraints +restrict +restricted +restrictedly +restricting +restriction +restriction's +restrictions +restrictive +restrictively +restrictiveness +restricts +restroom +restroom's +restrooms +restructure +restructured +restructures +restructuring +rests +resubmit +resubmits +resubmitted +resubmitting +result +resultant +resultantly +resultants +resulted +resulting +results +resumable +resume +resumed +resumes +resuming +resumption +resumption's +resumptions +resupplier +resupplier's +resuppliers +resurface +resurfaced +resurfacer +resurfacer's +resurfacers +resurfaces +resurfacing +resurged +resurges +resurrect +resurrected +resurrecting +resurrection +resurrection's +resurrections +resurrects +resuspended +retail +retailed +retailer +retailers +retailing +retails +retain +retained +retainer +retainers +retaining +retainment +retains +retaliation +retard +retarded +retarder +retarding +retention +retentions +retentive +retentively +retentiveness +rethinks +rethreading +reticence +reticent +reticently +reticle +reticle's +reticles +reticular +reticulate +reticulated +reticulately +reticulates +reticulating +reticulation +retied +retina +retina's +retinal +retinas +retinue +retinues +retire +retired +retiredly +retiredness +retirement +retirement's +retirements +retires +retiring +retiringly +retiringness +retitled +retold +retort +retorted +retorting +retorts +retrace +retraced +retraces +retracing +retract +retractable +retracted +retracting +retraction +retractions +retractor +retractor's +retractors +retracts +retrain +retrained +retraining +retrains +retranslated +retransmission +retransmission's +retransmissions +retransmit +retransmits +retransmitted +retransmitting +retreat +retreated +retreater +retreating +retreats +retried +retrier +retriers +retries +retrievable +retrieval +retrieval's +retrievals +retrieve +retrieved +retriever +retrievers +retrieves +retrieving +retroactively +retrospect +retrospection +retrospective +retrospectively +retry +retrying +return +returnable +returned +returner +returners +returning +returns +retype +retyped +retypes +retyping +reunion +reunion's +reunions +reunite +reunited +reuniting +reupholstering +reusable +reuse +reused +reuses +reusing +revalidated +revalidates +revalidation +revalued +revalues +revamp +revamped +revamping +revamps +reveal +revealed +revealer +revealing +reveals +revel +revelation +revelation's +revelations +revelry +revels +revenge +revenge's +revenged +revenger +revenges +revenging +revenue +revenuer +revenuers +revenues +revere +revered +reverence +reverencer +reverend +reverend's +reverends +reverently +reveres +reverified +reverifies +reverify +reverifying +revering +reversal +reversal's +reversals +reverse +reversed +reversely +reverser +reverses +reversible +reversing +reversion +reversioner +reversions +revert +reverted +reverter +reverting +revertive +reverts +revetting +review +reviewed +reviewer +reviewers +reviewing +reviews +revile +reviled +reviler +reviling +revise +revised +reviser +revises +revising +revision +revision's +revisions +revisit +revisited +revisiting +revisits +revival +revival's +revivals +revive +revived +reviver +revives +reviving +revocation +revocations +revoke +revoked +revoker +revokes +revoking +revolt +revolted +revolter +revolting +revoltingly +revolts +revolution +revolution's +revolutionaries +revolutionariness +revolutionary +revolutionary's +revolutions +revolve +revolved +revolver +revolvers +revolves +revolving +reward +rewarded +rewarder +rewarding +rewardingly +rewards +rewind +rewinded +rewinder +rewinding +rewinds +rewired +rewires +reword +reworded +rewording +rewording's +rewordings +rewords +rework +reworked +reworking +reworks +rewound +rewrite +rewriter +rewrites +rewriting +rewritings +rewritten +rewrote +rhetoric +rheumatism +rhinoceros +rhubarb +rhyme +rhymed +rhymer +rhymes +rhyming +rhythm +rhythm's +rhythmic +rhythmical +rhythmically +rhythmics +rhythms +rib +rib's +ribbed +ribbing +ribbon +ribbon's +ribbons +ribs +rice +ricer +rices +rich +richen +richened +richening +richer +riches +richest +richly +richness +rickshaw +rickshaw's +rickshaws +rid +ridden +riddle +riddled +riddler +riddles +riddling +ride +rider +rider's +riders +rides +ridge +ridge's +ridged +ridges +ridging +ridicule +ridiculed +ridiculer +ridicules +ridiculing +ridiculous +ridiculously +ridiculousness +riding +ridings +rids +rifle +rifled +rifleman +rifler +rifles +rifling +rift +rig +rig's +rigged +rigging +right +righted +righten +righteous +righteously +righteousness +righter +rightful +rightfully +rightfulness +righting +rightly +rightmost +rightness +rights +rightward +rightwards +rigid +rigidities +rigidity +rigidly +rigidness +rigorous +rigorously +rigorousness +rigs +rill +rim +rim's +rime +rimer +riming +rims +rind +rind's +rinded +rinds +ring +ringed +ringer +ringers +ringing +ringingly +ringings +rings +rinse +rinsed +rinser +rinses +rinsing +riot +rioted +rioter +rioters +rioting +riotous +riotously +riotousness +riots +rip +ripe +ripely +ripen +ripened +ripener +ripeness +ripening +ripens +riper +ripest +ripped +ripping +ripple +rippled +rippler +ripples +rippling +rips +rise +risen +riser +risers +rises +rising +risings +risk +risked +risker +risking +risks +rite +rite's +rited +rites +ritual +ritually +rituals +rival +rivalries +rivalry +rivalry's +rivals +rive +rived +riven +river +river's +rivers +riverside +rivet +riveted +riveter +riveting +rivets +riving +rivulet +rivulet's +rivulets +road +road's +roads +roadside +roadsides +roadster +roadster's +roadsters +roadway +roadway's +roadways +roam +roamed +roamer +roaming +roams +roar +roared +roarer +roaring +roaringest +roars +roast +roasted +roaster +roasting +roasts +rob +robbed +robber +robber's +robberies +robbers +robbery +robbery's +robbing +robe +robed +robes +robin +robin's +robing +robins +robot +robot's +robotic +robotics +robots +robs +robust +robustly +robustness +rock +rocked +rocker +rockers +rocket +rocket's +rocketed +rocketing +rockets +rockier +rockies +rockiness +rocking +rocks +rocky +rod +rod's +rode +rods +roe +roes +rogue +rogue's +rogues +roguing +role +role's +roles +roll +rolled +roller +rollers +rolling +rolls +romance +romanced +romancer +romancers +romances +romancing +romantic +romantic's +romantically +romantics +romp +romped +romper +rompers +romping +romps +roof +roofed +roofer +roofers +roofing +roofs +rook +rooks +room +roomed +roomer +roomers +rooming +rooms +roost +rooster +roosters +root +root's +rooted +rootedness +rooter +rooting +roots +rope +roped +roper +ropers +ropes +roping +rose +rose's +rosebud +rosebud's +rosebuds +roses +rosier +rosiness +rosy +rot +rotary +rotate +rotated +rotates +rotating +rotation +rotational +rotationally +rotations +rotative +rotatively +rotator +rotator's +rotators +rots +rotten +rottenly +rottenness +rouge +rough +roughed +roughen +roughened +roughening +roughens +rougher +roughest +roughly +roughness +rouging +round +roundabout +roundaboutness +rounded +roundedness +rounder +rounders +roundest +rounding +roundly +roundness +roundoff +rounds +roundup +roundup's +roundups +rouse +roused +rouser +rouses +rousing +rout +route +routed +router +routers +routes +routine +routinely +routines +routing +routings +rove +roved +rover +roves +roving +row +rowed +rowen +rower +rowers +rowing +rows +royal +royalist +royalist's +royalists +royally +royalties +royalty +royalty's +rub +rubbed +rubber +rubber's +rubbers +rubbing +rubbish +rubbishes +rubble +rubbled +rubbling +rubies +rubout +rubs +ruby +ruby's +rudder +rudder's +rudders +ruddier +ruddiness +ruddy +rude +rudely +rudeness +ruder +rudest +rudiment +rudiment's +rudimentariness +rudimentary +rudiments +rue +ruefully +rues +ruffian +ruffianly +ruffians +ruffle +ruffled +ruffler +ruffles +ruffling +rug +rug's +rugged +ruggedly +ruggedness +rugs +ruin +ruination +ruination's +ruinations +ruined +ruiner +ruing +ruining +ruinous +ruinously +ruinousness +ruins +rule +ruled +ruler +rulers +rules +ruling +rulings +rum +rumble +rumbled +rumbler +rumbles +rumbling +rumen +rumens +rump +rumple +rumpled +rumples +rumplier +rumpling +rumply +rumps +run +runaway +runaways +rung +rung's +rungs +runnable +runner +runner's +runners +running +runs +runtime +rupture +ruptured +ruptures +rupturing +rural +rurally +rush +rushed +rusher +rushes +rushing +russet +russeted +russeting +russets +rust +rusted +rustic +rusticate +rusticated +rusticates +rusticating +rustication +rustier +rustiness +rusting +rustle +rustled +rustler +rustlers +rustles +rustling +rusts +rusty +rut +rut's +ruthless +ruthlessly +ruthlessness +ruts +rye +rye's +sable +sable's +sables +sabotage +sabotaged +sabotages +sabotaging +sack +sacked +sacker +sacking +sacks +sacred +sacredly +sacredness +sacrifice +sacrificed +sacrificer +sacrificers +sacrifices +sacrificial +sacrificially +sacrificing +sad +sadden +saddened +saddening +saddens +sadder +saddest +saddle +saddled +saddler +saddles +saddling +sadism +sadist +sadist's +sadistic +sadistically +sadists +sadly +sadness +safe +safeguard +safeguarded +safeguarding +safeguards +safely +safeness +safer +safes +safest +safetied +safeties +safety +safetying +sag +sagacious +sagaciously +sagaciousness +sagacity +sage +sagely +sageness +sages +sags +said +sail +sailed +sailer +sailing +sailor +sailorly +sailors +sails +saint +sainted +saintliness +saintly +saints +sake +saker +sakes +salable +salad +salad's +salads +salaried +salaries +salary +sale +sale's +sales +salesman +salesmen +salespeople +salespeople's +salesperson +salesperson's +salient +saliently +saline +saliva +sallied +sallies +sallow +sallowness +sally +sallying +salmon +salmons +salon +salon's +salons +saloon +saloon's +saloons +salt +salted +salter +salters +saltier +saltiest +saltiness +salting +saltness +salts +salty +salutariness +salutary +salutation +salutation's +salutations +salute +saluted +saluter +salutes +saluting +salvage +salvaged +salvager +salvages +salvaging +salvation +salve +salver +salves +salving +same +sameness +sample +sample's +sampled +sampler +samplers +samples +sampling +samplings +sanctification +sanctified +sanctifier +sanctify +sanction +sanctioned +sanctioning +sanctions +sanctities +sanctity +sanctuaries +sanctuary +sanctuary's +sand +sandal +sandal's +sandals +sanded +sander +sanders +sandier +sandiness +sanding +sandpaper +sands +sandstone +sandstones +sandwich +sandwiched +sandwiches +sandwiching +sandy +sane +sanely +saneness +saner +sanest +sang +sanguine +sanguinely +sanguineness +sanitarium +sanitariums +sanitary +sanitation +sanity +sank +sap +sap's +sapling +sapling's +saplings +sapphire +saps +sarcasm +sarcasm's +sarcasms +sarcastic +sash +sashed +sashes +sat +satchel +satchel's +satchels +sate +sated +satellite +satellite's +satellites +sates +satin +sating +satire +satire's +satires +satirist +satirist's +satirists +satisfaction +satisfaction's +satisfactions +satisfactorily +satisfactoriness +satisfactory +satisfiability +satisfiable +satisfied +satisfier +satisfiers +satisfies +satisfy +satisfying +satisfyingly +saturate +saturated +saturater +saturates +saturating +saturation +saturations +satyr +sauce +saucepan +saucepan's +saucepans +saucer +saucers +sauces +saucier +sauciness +saucing +saucy +saunter +sauntered +saunterer +sauntering +saunters +sausage +sausage's +sausages +savage +savaged +savagely +savageness +savager +savagers +savages +savaging +save +saved +saver +savers +saves +saving +savings +saw +sawed +sawer +sawing +sawmill +sawmill's +sawmills +saws +sawtooth +say +sayer +sayers +saying +sayings +says +scabbard +scabbard's +scabbards +scaffold +scaffolding +scaffoldings +scaffolds +scalable +scalar +scalar's +scalars +scald +scalded +scalding +scalds +scale +scaled +scaler +scalers +scales +scalier +scaliness +scaling +scalings +scallop +scalloped +scalloper +scalloping +scallops +scalp +scalp's +scalper +scalping +scalps +scaly +scam +scam's +scamper +scampered +scampering +scampers +scams +scan +scandal +scandal's +scandalous +scandalously +scandalousness +scandals +scanned +scanner +scanner's +scanners +scanning +scans +scant +scantier +scanties +scantiest +scantily +scantiness +scantly +scantness +scanty +scar +scar's +scarce +scarcely +scarceness +scarcer +scarcest +scarcity +scare +scared +scarer +scares +scarf +scarfs +scarier +scaring +scarlet +scars +scary +scatter +scattered +scatterer +scattering +scatteringly +scatters +scavenger +scavenger's +scavengers +scenario +scenario's +scenarios +scene +scene's +sceneries +scenery +scenes +scenic +scenics +scent +scented +scents +schedule +schedule's +scheduled +scheduler +scheduler's +schedulers +schedules +scheduling +schema +schema's +schemas +schemata +schematic +schematically +schematics +scheme +scheme's +schemed +schemer +schemers +schemes +scheming +schizophrenia +scholar +scholarly +scholars +scholarship +scholarship's +scholarships +scholastic +scholastically +scholastics +school +schoolboy +schoolboy's +schoolboys +schooled +schooler +schoolers +schoolhouse +schoolhouse's +schoolhouses +schooling +schoolmaster +schoolmaster's +schoolmasters +schoolroom +schoolroom's +schoolrooms +schools +schoolyard +schoolyard's +schoolyards +schooner +science +science's +sciences +scientific +scientifically +scientist +scientist's +scientists +scissor +scissored +scissoring +scissors +scoff +scoffed +scoffer +scoffing +scoffs +scold +scolded +scolder +scolding +scolds +scoop +scooped +scooper +scooping +scoops +scope +scoped +scopes +scoping +scorch +scorched +scorcher +scorches +scorching +scorchingly +score +score's +scored +scorer +scorers +scores +scoring +scorings +scorn +scorned +scorner +scornful +scornfully +scornfulness +scorning +scorns +scorpion +scorpion's +scorpions +scoundrel +scoundrel's +scoundrelly +scoundrels +scour +scoured +scourer +scourge +scourger +scourging +scouring +scourings +scours +scout +scouted +scouter +scouting +scouts +scow +scowl +scowled +scowler +scowling +scowls +scramble +scrambled +scrambler +scrambles +scrambling +scrap +scrap's +scrape +scraped +scraper +scrapers +scrapes +scraping +scrapings +scrapped +scraps +scratch +scratched +scratcher +scratchers +scratches +scratching +scrawl +scrawled +scrawler +scrawling +scrawls +scream +screamed +screamer +screamers +screaming +screamingly +screams +screech +screeched +screecher +screeches +screeching +screen +screened +screener +screening +screenings +screens +screw +screwed +screwer +screwing +screws +scribble +scribbled +scribbler +scribbles +scribbling +scribe +scriber +scribes +scribing +script +script's +scripted +scripting +scripts +scripture +scriptures +scroll +scrolled +scrolling +scrolls +scrooge +scrooge's +scrooges +scrub +scrubs +scruple +scrupled +scruples +scrupling +scrupulous +scrupulously +scrupulousness +scrutiny +scuffle +scuffled +scuffles +scuffling +sculpt +sculpted +sculpting +sculptor +sculptor's +sculptors +sculpts +sculpture +sculptured +sculptures +sculpturing +scum +scum's +scums +scurried +scurry +scurrying +scuttle +scuttled +scuttles +scuttling +scythe +scythe's +scythes +scything +sea +seaboard +seacoast +seacoast's +seacoasts +seal +sealed +sealer +sealing +seals +sealy +seam +seaman +seamanly +seamed +seamen +seamer +seaming +seams +seaport +seaport's +seaports +sear +search +searched +searcher +searcher's +searchers +searches +searching +searchingly +searchings +seared +searing +searingly +sears +seas +seashore +seashore's +seashores +seaside +season +season's +seasonable +seasonableness +seasonably +seasonal +seasonally +seasoned +seasoner +seasoners +seasoning +seasonings +seasonly +seasons +seat +seated +seater +seating +seats +seaward +seawards +seaweed +seaweeds +secede +seceded +seceder +secedes +seceding +secluded +secludedly +secludedness +seclusion +second +secondaries +secondarily +secondariness +secondary +seconded +seconder +seconders +secondhand +seconding +secondly +seconds +secrecy +secret +secretarial +secretaries +secretary +secretary's +secrete +secreted +secretes +secreting +secretion +secretions +secretive +secretively +secretiveness +secretly +secrets +sect +sect's +section +sectional +sectionally +sectioned +sectioning +sections +sector +sector's +sectored +sectoring +sectors +sects +secular +secularly +secure +secured +securely +secureness +securer +secures +securing +securings +securities +security +sedge +sediment +sediment's +sediments +seduce +seduced +seducer +seducers +seduces +seducing +seductive +seductively +seductiveness +see +seed +seeded +seeder +seeders +seeding +seedings +seedling +seedling's +seedlings +seeds +seeing +seek +seeker +seekers +seeking +seekingly +seeks +seem +seemed +seeming +seemingly +seemlier +seemliness +seemly +seems +seen +seep +seeped +seeping +seeps +seer +seers +sees +seethe +seethed +seethes +seething +segment +segmentation +segmentation's +segmentations +segmented +segmenting +segments +segregate +segregated +segregates +segregating +segregation +segregative +seismic +seizable +seize +seized +seizer +seizers +seizes +seizin +seizing +seizings +seizins +seizor +seizors +seizure +seizure's +seizures +seldom +select +selected +selecting +selection +selection's +selections +selective +selectively +selectiveness +selectivity +selectness +selector +selector's +selectors +selects +self +selfish +selfishly +selfishness +selfness +selfsame +selfsameness +sell +seller +sellers +selling +sells +selves +semantic +semantical +semantically +semanticist +semanticist's +semanticists +semantics +semaphore +semaphore's +semaphores +semblance +semester +semester's +semesters +semiautomated +semicolon +semicolon's +semicolons +semiconductor +semiconductor's +semiconductors +seminal +seminally +seminar +seminar's +seminaries +seminars +seminary +seminary's +semipermanent +semipermanently +senate +senate's +senates +senator +senator's +senators +send +sender +senders +sending +sends +senior +senior's +seniority +seniors +sensation +sensation's +sensational +sensationally +sensations +sense +sensed +senseless +senselessly +senselessness +senses +sensibilities +sensibility +sensible +sensibleness +sensibly +sensing +sensitive +sensitively +sensitiveness +sensitives +sensitivities +sensitivity +sensor +sensor's +sensors +sensory +sent +sentence +sentenced +sentences +sentencing +sentential +sententially +sentiment +sentiment's +sentimental +sentimentally +sentiments +sentinel +sentinel's +sentinels +sentries +sentry +sentry's +separable +separableness +separate +separated +separately +separateness +separates +separating +separation +separations +separative +separator +separator's +separators +sequel +sequel's +sequels +sequence +sequenced +sequencer +sequencers +sequences +sequencing +sequencings +sequential +sequentiality +sequentially +sequester +sequestered +sequestering +serendipitous +serendipitously +serendipity +serene +serenely +sereneness +serenity +serf +serf's +serfs +sergeant +sergeant's +sergeants +serial +serially +serials +series +serious +seriously +seriousness +sermon +sermon's +sermons +serpent +serpent's +serpentine +serpentinely +serpents +serum +serum's +serums +servant +servant's +servants +serve +served +server +server's +servers +serves +service +serviceable +serviceableness +serviced +servicer +services +servicing +servile +servilely +servileness +serving +servings +servitude +session +session's +sessions +set +set's +sets +setter +setter's +setters +setting +settings +settle +settled +settlement +settlement's +settlements +settler +settlers +settles +settling +settlings +setup +setups +seven +sevens +seventeen +seventeens +seventeenth +seventh +seventies +seventieth +seventy +sever +several +severally +severals +severance +severe +severed +severely +severeness +severer +severest +severing +severities +severity +severity's +severs +sew +sewed +sewer +sewers +sewing +sews +sex +sexed +sexes +sexism +sexism's +sexist +sexist's +sexists +sexual +sexuality +sexually +shabbier +shabbiness +shabby +shack +shacked +shackle +shackled +shackler +shackles +shackling +shacks +shade +shaded +shader +shades +shadier +shadiest +shadily +shadiness +shading +shadings +shadow +shadowed +shadower +shadowiness +shadowing +shadows +shadowy +shady +shaft +shaft's +shafted +shafting +shafts +shaggier +shagginess +shaggy +shakable +shakably +shake +shaken +shaker +shakers +shakes +shakier +shakiness +shaking +shaky +shale +shales +shall +shallow +shallower +shallowly +shallowness +shallows +sham +sham's +shambles +shame +shamed +shameful +shamefully +shamefulness +shameless +shamelessly +shamelessness +shames +shaming +shams +shan't +shanties +shanty +shanty's +shape +shaped +shapeless +shapelessly +shapelessness +shapelier +shapeliness +shapely +shaper +shapers +shapes +shaping +sharable +share +sharecropper +sharecropper's +sharecroppers +shared +shareholder +shareholder's +shareholders +sharer +sharers +shares +sharing +shark +shark's +sharks +sharp +sharped +sharpen +sharpened +sharpener +sharpening +sharpens +sharper +sharpest +sharping +sharply +sharpness +sharps +shatter +shattered +shattering +shatteringly +shatters +shave +shaved +shaven +shaver +shaves +shaving +shavings +shawl +shawl's +shawls +she +she'd +she'll +she's +sheaf +shear +sheared +shearer +shearers +shearing +shears +sheath +sheather +sheathing +sheaths +sheaves +shed +sheds +sheep +sheer +sheered +sheerly +sheerness +sheet +sheeted +sheeter +sheeting +sheets +shelf +shelfs +shell +shell's +shelled +sheller +shelling +shells +shelter +sheltered +shelterer +sheltering +shelters +shelve +shelved +shelver +shelves +shelving +shepherd +shepherd's +shepherded +shepherding +shepherds +sheriff +sheriff's +sheriffs +shied +shield +shielded +shielder +shielding +shields +shier +shies +shiest +shift +shifted +shifter +shifters +shiftier +shiftiest +shiftily +shiftiness +shifting +shifts +shifty +shilling +shillings +shimmer +shimmered +shimmering +shin +shine +shined +shiner +shiners +shines +shingle +shingle's +shingled +shingler +shingles +shingling +shinier +shininess +shining +shiningly +shiny +ship +ship's +shipboard +shipboards +shipbuilding +shipment +shipment's +shipments +shippable +shipped +shipper +shipper's +shippers +shipping +ships +shipwreck +shipwrecked +shipwrecks +shirk +shirker +shirking +shirks +shirt +shirting +shirts +shit +shiver +shivered +shiverer +shivering +shivers +shoal +shoal's +shoals +shock +shocked +shocker +shockers +shocking +shockingly +shocks +shod +shoe +shoed +shoeing +shoemaker +shoer +shoes +shone +shook +shoot +shooter +shooters +shooting +shootings +shoots +shop +shop's +shopkeeper +shopkeeper's +shopkeepers +shopped +shopper +shopper's +shoppers +shopping +shops +shore +shore's +shored +shores +shoring +shorn +short +shortage +shortage's +shortages +shortcoming +shortcoming's +shortcomings +shortcut +shortcut's +shortcuts +shorted +shorten +shortened +shortener +shortening +shortens +shorter +shortest +shorthand +shorthanded +shorthands +shorting +shortly +shortness +shorts +shot +shot's +shotgun +shotgun's +shotguns +shots +should +shoulder +shouldered +shouldering +shoulders +shouldest +shouldn't +shout +shouted +shouter +shouters +shouting +shouts +shove +shoved +shovel +shovels +shover +shoves +shoving +show +showed +shower +showered +showering +showers +showing +showings +shown +shows +shrank +shred +shred's +shredder +shredder's +shredders +shreds +shrew +shrew's +shrewd +shrewdest +shrewdly +shrewdness +shrews +shriek +shrieked +shrieking +shrieks +shrill +shrilled +shrilling +shrillness +shrilly +shrimp +shrine +shrine's +shrines +shrink +shrinkable +shrinker +shrinking +shrinks +shrivel +shrivels +shroud +shrouded +shrouding +shrouds +shrub +shrub's +shrubbery +shrubs +shrug +shrugs +shrunk +shrunken +shudder +shuddered +shuddering +shudders +shuffle +shuffled +shuffler +shuffles +shuffling +shun +shuns +shut +shutdown +shutdown's +shutdowns +shuts +shutter +shuttered +shuttering +shutters +shutting +shuttle +shuttled +shuttles +shuttling +shy +shying +shyly +shyness +sibling +sibling's +siblings +sick +sicken +sickened +sickener +sickening +sickeningly +sicker +sickerly +sickest +sicking +sickle +sickled +sicklied +sickliness +sickling +sickly +sicklying +sickness +sickness's +sicknesses +sicks +side +sideboard +sideboard's +sideboards +sideburns +sided +sidedness +sidelight +sidelight's +sidelights +sides +sidetrack +sidetracked +sidetracking +sidetracks +sidewalk +sidewalk's +sidewalks +sideways +sidewise +siding +sidings +siege +siege's +sieges +sieging +sierra +sierras +sieve +sieve's +sievers +sieves +sieving +sift +sifted +sifter +sifting +siftings +sifts +sigh +sighed +sigher +sighing +sighs +sight +sighted +sighter +sighting +sightings +sightliness +sightly +sights +sign +signal +signally +signals +signature +signature's +signatures +signed +signer +signers +signet +significance +significances +significant +significantly +significants +signification +signified +signifier +signifies +signify +signifying +signing +signs +silence +silenced +silencer +silencers +silences +silencing +silent +silently +silentness +silents +silhouette +silhouetted +silhouettes +silicon +silicone +silicons +silk +silken +silkier +silkiest +silkily +silkiness +silks +silky +sill +sill's +sillier +silliest +silliness +sills +silly +silt +silted +silting +silts +silver +silvered +silverer +silveriness +silvering +silverly +silvers +silvery +similar +similarities +similarity +similarly +similitude +simmer +simmered +simmering +simmers +simple +simpleness +simpler +simples +simplest +simplex +simplexes +simplicities +simplicity +simplicity's +simplification +simplifications +simplified +simplifier +simplifiers +simplifies +simplify +simplifying +simplistic +simply +simulate +simulated +simulates +simulating +simulation +simulations +simulative +simulator +simulator's +simulators +simultaneity +simultaneous +simultaneously +simultaneousness +sin +sin's +since +sincere +sincerely +sincereness +sincerest +sincerity +sine +sines +sinew +sinew's +sinews +sinful +sinfully +sinfulness +sing +singable +singed +singer +singer's +singers +singing +singingly +single +singled +singleness +singles +singleton +singleton's +singletons +singling +singly +sings +singular +singularities +singularity +singularity's +singularly +sining +sinister +sinisterly +sinisterness +sink +sinked +sinker +sinkers +sinkhole +sinkholes +sinking +sinks +sinned +sinner +sinner's +sinners +sinning +sins +sinusoidal +sinusoidally +sinusoids +sip +sips +sir +sire +sired +siren +sirens +sires +siring +sirs +sirup +sister +sister's +sistered +sistering +sisterly +sisters +sit +site +site's +sited +sites +siting +sits +sitter +sitter's +sitters +sitting +sittings +situate +situated +situates +situating +situation +situational +situationally +situations +six +sixes +sixpence +sixpences +sixteen +sixteens +sixteenth +sixth +sixthly +sixties +sixtieth +sixty +sizable +sizableness +size +sized +sizer +sizers +sizes +sizing +sizings +skate +skated +skater +skater's +skaters +skates +skating +skeletal +skeletally +skeleton +skeleton's +skeletons +skeptic +skeptic's +skeptical +skeptically +skeptics +sketch +sketched +sketcher +sketches +sketchier +sketchily +sketchiness +sketching +sketchy +skew +skewed +skewer +skewered +skewering +skewers +skewing +skewness +skews +ski +skied +skien +skier +skies +skiing +skill +skilled +skillful +skillfully +skillfulness +skilling +skills +skim +skim's +skimmed +skimmer +skimmer's +skimmers +skimming +skimmings +skimp +skimped +skimping +skimps +skims +skin +skin's +skinned +skinner +skinner's +skinners +skinning +skins +skip +skipped +skipper +skipper's +skippered +skippering +skippers +skipping +skips +skirmish +skirmished +skirmisher +skirmishers +skirmishes +skirmishing +skirt +skirted +skirter +skirting +skirts +skis +skulk +skulked +skulker +skulking +skulks +skull +skull's +skulled +skulls +skunk +skunk's +skunks +sky +sky's +skying +skylark +skylarker +skylarking +skylarks +skylight +skylight's +skylights +skyscraper +skyscraper's +skyscrapers +slab +slabs +slack +slacked +slacken +slackened +slackening +slackens +slacker +slackest +slacking +slackly +slackness +slacks +slain +slam +slammed +slamming +slams +slander +slandered +slanderer +slandering +slanders +slang +slanging +slant +slanted +slanting +slantingly +slants +slap +slapped +slapping +slaps +slash +slashed +slasher +slashes +slashing +slashingly +slat +slat's +slate +slated +slater +slaters +slates +slating +slats +slaughter +slaughtered +slaughterer +slaughtering +slaughters +slave +slaved +slaver +slavered +slavering +slavery +slaves +slaving +slay +slayer +slayers +slaying +slays +sled +sled's +sledge +sledge's +sledges +sledging +sleds +sleek +sleekly +sleekness +sleep +sleeper +sleepers +sleepier +sleepily +sleepiness +sleeping +sleepless +sleeplessly +sleeplessness +sleeps +sleepy +sleet +sleeve +sleeve's +sleeved +sleeves +sleeving +sleigh +sleighs +sleken +slekened +slekening +slender +slenderer +slenderly +slenderness +slept +slew +slewed +slewing +slice +sliced +slicer +slicers +slices +slicing +slick +slicker +slickers +slickly +slickness +slicks +slid +slide +slider +sliders +slides +sliding +slier +sliest +slight +slighted +slighter +slightest +slighting +slightingly +slightly +slightness +slights +slim +slime +slimed +slimes +slimier +sliminess +sliming +slimly +slimness +slimy +sling +slinger +slinging +slings +slip +slip's +slippage +slipped +slipper +slipper's +slipperier +slipperiness +slippers +slippery +slipping +slips +slit +slit's +slits +slogan +slogan's +slogans +slop +slope +sloped +sloper +slopers +slopes +sloping +slopped +sloppier +sloppiness +slopping +sloppy +slops +slot +slot's +sloth +sloths +slots +slotted +slouch +slouched +sloucher +slouches +slouching +slow +slowed +slower +slowest +slowing +slowly +slowness +slows +slug +sluggish +sluggishly +sluggishness +slugs +slum +slum's +slumber +slumber's +slumbered +slumberer +slumbering +slumbers +slump +slumped +slumps +slums +slung +slur +slur's +slurs +sly +slyly +smack +smacked +smacker +smacking +smacks +small +smaller +smallest +smallness +smallpox +smart +smarted +smarten +smartened +smartening +smarter +smartest +smarting +smartly +smartness +smarts +smash +smashed +smasher +smashers +smashes +smashing +smashingly +smear +smeared +smearer +smearing +smears +smell +smelled +smeller +smellier +smelling +smells +smelly +smelt +smelter +smelts +smile +smiled +smiler +smiles +smiling +smilingly +smite +smiter +smith +smith's +smithies +smiths +smithy +smiting +smitten +smock +smocking +smocks +smog +smokable +smoke +smoked +smoker +smoker's +smokers +smokes +smokier +smokies +smokiness +smoking +smoky +smolder +smoldered +smoldering +smolderingly +smolders +smooth +smoothed +smoothen +smoothened +smoothening +smoother +smoothers +smoothes +smoothest +smoothing +smoothly +smoothness +smote +smother +smothered +smothering +smothers +smug +smuggle +smuggled +smuggler +smugglers +smuggles +smuggling +smugly +smugness +snail +snail's +snails +snake +snaked +snakes +snaking +snap +snapped +snapper +snapper's +snappers +snappier +snappiest +snappily +snappiness +snapping +snappy +snaps +snapshot +snapshot's +snapshots +snare +snared +snarer +snares +snarf +snarfed +snarfing +snarfings +snarfs +snaring +snarl +snarled +snarler +snarling +snarls +snatch +snatched +snatcher +snatches +snatching +sneak +sneaked +sneaker +sneakered +sneakers +sneakier +sneakiest +sneakily +sneakiness +sneaking +sneakingly +sneaks +sneaky +sneer +sneered +sneerer +sneering +sneers +sneeze +sneezed +sneezer +sneezes +sneezing +sniff +sniffed +sniffer +sniffing +sniffs +snippet +snoop +snooped +snooper +snooping +snoops +snore +snored +snorer +snores +snoring +snort +snorted +snorter +snorting +snorts +snout +snout's +snouted +snouts +snow +snowed +snowier +snowiest +snowily +snowiness +snowing +snowman +snowmen +snows +snowshoe +snowshoe's +snowshoed +snowshoer +snowshoes +snowy +snuff +snuffed +snuffer +snuffing +snuffs +snug +snuggle +snuggled +snuggles +snuggling +snugly +snugness +snugs +so +soak +soaked +soaker +soaking +soaks +soap +soaped +soaping +soaps +soar +soared +soarer +soaring +soars +sob +sober +sobered +soberer +soberest +sobering +soberly +soberness +sobers +sobs +soccer +sociability +sociable +sociably +social +socialism +socialist +socialist's +socialists +socially +societal +societally +societies +society +society's +sociological +sociologically +sociology +sock +socked +socket +socket's +sockets +socking +socks +sod +sod's +soda +sodium +sodomy +sods +sofa +sofa's +sofas +soft +soften +softened +softener +softening +softens +softer +softest +softly +softness +software +software's +softwares +soil +soiled +soiling +soils +sojourn +sojourner +sojourners +solace +solaced +solacer +solacing +solar +sold +solder +soldered +solderer +soldering +solders +soldier +soldiered +soldiering +soldierly +soldiers +sole +soled +solely +solemn +solemnity +solemnly +solemnness +soleness +soles +solicit +solicited +soliciting +solicitor +solicitors +solicits +solid +solidification +solidified +solidifies +solidify +solidifying +solidity +solidly +solidness +solids +soling +solingen +solitaire +solitariness +solitary +solitude +solitude's +solitudes +solo +solo's +soloed +soloing +solos +solubility +soluble +solution +solution's +solutions +solvable +solve +solved +solvent +solvent's +solvently +solvents +solver +solvers +solves +solving +somber +somberly +somberness +some +somebody +somebody's +someday +somehow +someone +someone's +someplace +someplace's +somers +something +sometime +sometimes +somewhat +somewhere +somewheres +son +son's +sonar +sonars +song +song's +songs +sonly +sonnet +sonnet's +sonnets +sons +soon +sooner +soonest +soot +sooth +soothe +soothed +soother +soothes +soothing +soothingly +soothingness +soothly +sophisticated +sophisticatedly +sophistication +sophomore +sophomore's +sophomores +sorcerer +sorcerer's +sorcerers +sorcery +sordid +sordidly +sordidness +sore +sorely +soreness +sorer +sores +sorest +sorrier +sorriest +sorriness +sorrow +sorrow's +sorrower +sorrowful +sorrowfully +sorrowfulness +sorrows +sorry +sort +sorted +sorter +sorters +sorting +sorts +sos +sought +soul +soul's +souled +souls +sound +sounded +sounder +soundest +sounding +sounding's +soundingly +soundings +soundly +soundness +sounds +soup +soup's +soups +sour +source +source's +sources +soured +sourer +sourest +souring +sourly +sourness +sours +south +souther +southerly +southern +southerner +southerners +southernly +southernness +southing +sovereign +sovereign's +sovereignly +sovereigns +soviet +soviet's +soviets +space +spaced +spacer +spacers +spaces +spaceship +spaceship's +spaceships +spacing +spacings +spade +spaded +spader +spades +spading +spaghetti +span +span's +spank +spanked +spanker +spanking +spanks +spanned +spanner +spanner's +spanners +spanning +spans +spare +spared +sparely +spareness +sparer +spares +sparest +sparing +sparingly +spark +sparked +sparker +sparking +sparks +sparrow +sparrow's +sparrows +sparse +sparsely +sparseness +sparser +sparsest +spat +spate +spate's +spates +spatial +spatially +spats +spatter +spattered +spawn +spawned +spawner +spawning +spawns +speak +speakable +speaker +speaker's +speakers +speaking +speaks +spear +speared +spearer +spearing +spears +special +specialist +specialist's +specialists +specially +specialness +specials +species +specifiable +specific +specifically +specification +specifications +specificities +specificity +specifics +specified +specifier +specifiers +specifies +specify +specifying +specimen +specimen's +specimens +speck +speck's +speckle +speckled +speckles +speckling +specks +spectacle +spectacled +spectacles +spectacular +spectacularly +spectator +spectator's +spectators +spectra +spectrogram +spectrogram's +spectrograms +spectroscopically +spectrum +spectrums +speculate +speculated +speculates +speculating +speculation +speculations +speculative +speculatively +speculator +speculator's +speculators +sped +speech +speech's +speeches +speechless +speechlessly +speechlessness +speed +speeded +speeder +speeders +speedier +speedily +speediness +speeding +speeds +speedup +speedup's +speedups +speedy +spell +spelled +speller +spellers +spelling +spellings +spells +spend +spender +spenders +spending +spends +spent +sphere +sphere's +spheres +spherical +spherically +sphering +spice +spiced +spices +spicier +spiciness +spicing +spicy +spider +spider's +spiders +spied +spier +spies +spike +spiked +spiker +spikes +spiking +spill +spilled +spiller +spilling +spills +spin +spinach +spinal +spinally +spindle +spindled +spindler +spindles +spindling +spine +spines +spinner +spinner's +spinners +spinning +spins +spiral +spirally +spirals +spire +spire's +spired +spires +spiring +spirit +spirited +spiritedly +spiritedness +spiriting +spirits +spiritual +spiritually +spiritualness +spirituals +spit +spite +spited +spiteful +spitefully +spitefulness +spites +spiting +spits +spitting +splash +splashed +splasher +splashers +splashes +splashing +spleen +splendid +splendidly +splendidness +splice +spliced +splicer +splicers +splices +splicing +splicings +spline +spline's +splined +splines +splinter +splintered +splintering +splinters +split +split's +splits +splitter +splitter's +splitters +splitting +splittings +spoil +spoiled +spoiler +spoilers +spoiling +spoils +spoke +spoked +spoken +spokes +spokesman +spokesmen +spoking +sponge +sponged +sponger +spongers +sponges +sponging +sponsor +sponsored +sponsoring +sponsors +sponsorship +spontaneous +spontaneously +spontaneousness +spook +spookier +spookiness +spooky +spool +spooled +spooler +spoolers +spooling +spools +spoon +spooned +spooning +spoons +spore +spore's +spored +spores +sporing +sport +sported +sporting +sportingly +sportive +sportively +sportiveness +sports +sportsman +sportsmanly +spot +spot's +spotless +spotlessly +spotlessness +spotlight +spotlight's +spotlighted +spotlighting +spotlights +spots +spotted +spotter +spotter's +spotters +spotting +spouse +spouse's +spouses +spousing +spout +spouted +spouter +spouting +spouts +sprang +sprawl +sprawled +sprawling +sprawls +spray +sprayed +sprayer +spraying +sprays +spread +spreader +spreaders +spreading +spreadings +spreads +spreadsheet +spreadsheets +spree +spree's +sprees +sprig +sprightlier +sprightliness +sprightly +spring +springer +springers +springier +springiest +springiness +springing +springs +springtime +springy +sprinkle +sprinkled +sprinkler +sprinklered +sprinkles +sprinkling +sprint +sprinted +sprinter +sprinters +sprinting +sprints +sprite +sprout +sprouted +sprouting +sprouts +spruce +spruced +sprucely +spruceness +sprucer +sprucest +sprucing +sprung +spun +spur +spur's +spurious +spuriously +spuriousness +spurn +spurned +spurner +spurning +spurns +spurs +spurt +spurted +spurting +spurts +sputter +sputtered +sputterer +spy +spying +squabble +squabbled +squabbler +squabbles +squabbling +squad +squad's +squadron +squadron's +squadrons +squads +squall +squall's +squaller +squalls +square +squared +squarely +squareness +squarer +squares +squarest +squaring +squash +squashed +squasher +squashes +squashing +squat +squatly +squatness +squats +squawk +squawked +squawker +squawking +squawks +squeak +squeaked +squeaker +squeaking +squeaks +squeal +squealed +squealer +squealing +squeals +squeeze +squeezed +squeezer +squeezes +squeezing +squid +squids +squint +squinted +squinter +squinting +squintingly +squints +squire +squire's +squires +squiring +squirm +squirmed +squirming +squirms +squirrel +squirrelly +squirrels +stab +stabbed +stabbing +stabilities +stability +stability's +stable +stabled +stableness +stabler +stables +stablest +stabling +stably +stabs +stack +stack's +stacked +stacker +stacking +stacks +staff +staff's +staffed +staffer +staffers +staffing +staffs +stag +stag's +stage +stagecoach +staged +stager +stagers +stages +stagger +staggered +staggerer +staggering +staggeringly +staggers +staging +stagnant +stagnantly +stags +staid +staidly +staidness +stain +stained +stainer +staining +stainless +stainlessly +stains +stair +stair's +staircase +staircase's +staircases +stairs +stairway +stairway's +stairways +stake +staked +stakes +staking +stale +staled +stalely +staleness +staler +stales +stalest +staling +stalk +stalked +stalker +stalking +stalks +stall +stalled +stalling +stallings +stalls +stalwart +stalwartly +stalwartness +stamen +stamen's +stamens +stamina +stammer +stammered +stammerer +stammering +stammers +stamp +stamped +stampede +stampeded +stampeder +stampedes +stampeding +stamper +stampers +stamping +stamps +stance +stance's +stances +stanch +stancher +stanchest +stand +standard +standardly +standards +standby +stander +standing +standings +standpoint +standpoint's +standpoints +stands +standstill +stanza +stanza's +stanzas +staple +stapled +stapler +staplers +staples +stapling +star +star's +starboard +starboarded +starboarding +starboards +starch +starched +starches +starching +stare +stared +starer +stares +starfish +staring +stark +starkest +starkly +starkness +starlet +starlet's +starlets +starlight +starred +starrier +starring +starry +stars +start +started +starter +starters +starting +startle +startled +startles +startling +startlingly +startlingness +starts +startup +startup's +startups +starvation +starve +starved +starver +starves +starving +state +state's +stated +statelier +stateliness +stately +statement +statement's +statements +stater +states +statesman +statesman's +statesmanly +static +statically +statics +stating +station +stationaries +stationary +stationed +stationer +stationing +stations +statistic +statistic's +statistical +statistically +statistician +statistician's +statisticians +statistics +stative +statue +statue's +statued +statues +statuesque +statuesquely +statuesqueness +stature +status +statuses +statute +statute's +statutes +statutorily +statutoriness +statutory +staunch +staunchest +staunchly +staunchness +stave +staved +staves +staving +stay +stayed +stayer +stayers +staying +stays +stdio +stead +steadfast +steadfastly +steadfastness +steadied +steadier +steadies +steadiest +steadily +steadiness +steading +steady +steadying +steak +steak's +steaks +steal +stealer +stealing +steals +stealth +stealthier +stealthily +stealthiness +stealthy +steam +steamboat +steamboat's +steamboats +steamed +steamer +steamers +steaming +steams +steamship +steamship's +steamships +steed +steeds +steel +steeled +steelers +steeling +steels +steep +steeped +steepen +steepened +steepening +steeper +steepest +steeping +steeple +steeple's +steeples +steeply +steepness +steeps +steer +steered +steerer +steering +steers +stellar +stem +stem's +stemmed +stemming +stems +stench +stench's +stenches +stencil +stencil's +stencils +stenographer +stenographer's +stenographers +step +step's +stepmother +stepmother's +stepmothers +stepped +stepper +stepping +steps +stepwise +stereo +stereo's +stereos +stereotype +stereotyped +stereotyper +stereotypers +stereotypes +stereotypical +stereotypically +stereotyping +sterile +sterling +sterlingly +sterlingness +stern +sternly +sternness +sterns +stew +steward +steward's +stewards +stewed +stewing +stews +stick +sticked +sticker +stickers +stickier +stickiest +stickily +stickiness +sticking +sticks +sticky +stiff +stiffen +stiffened +stiffener +stiffeners +stiffening +stiffens +stiffer +stiffest +stiffly +stiffness +stiffnesses +stiffs +stifle +stifled +stifler +stifles +stifling +stiflingly +stigma +stigmas +stile +stile's +stiles +still +stilled +stiller +stillest +stilling +stillness +stills +stimulant +stimulant's +stimulants +stimulate +stimulated +stimulates +stimulating +stimulation +stimulations +stimulative +stimuli +stimulus +sting +stinger +stinging +stingingly +stings +stink +stinker +stinkers +stinking +stinkingly +stinks +stint +stint's +stinted +stinter +stinting +stints +stipend +stipend's +stipends +stipple +stippled +stippler +stipples +stippling +stipulate +stipulated +stipulates +stipulating +stipulation +stipulations +stir +stirred +stirrer +stirrer's +stirrers +stirring +stirringly +stirrings +stirrup +stirrups +stirs +stitch +stitched +stitcher +stitches +stitching +stochastic +stochastically +stock +stockade +stockade's +stockaded +stockades +stockading +stocked +stocker +stockers +stockholder +stockholder's +stockholders +stocking +stockinged +stockings +stocks +stole +stole's +stoled +stolen +stoles +stomach +stomached +stomacher +stomaches +stomaching +stone +stone's +stoned +stoner +stones +stonier +stoniness +stoning +stony +stood +stool +stools +stoop +stooped +stooping +stoops +stop +stop's +stopcock +stopcocks +stopgap +stopgap's +stopgaps +stoppable +stoppage +stoppages +stopped +stopper +stopper's +stoppered +stoppering +stoppers +stopping +stops +storage +storage's +storages +store +stored +storehouse +storehouse's +storehouses +stores +storied +stories +storing +stork +stork's +storks +storm +stormed +stormier +stormiest +storminess +storming +storms +stormy +story +story's +storying +stout +stouten +stoutened +stoutening +stouter +stoutest +stoutly +stoutness +stove +stove's +stover +stoves +stow +stowed +stowing +stows +straggle +straggled +straggler +stragglers +straggles +straggling +straight +straighten +straightened +straightener +straighteners +straightening +straightens +straighter +straightest +straightforward +straightforwardly +straightforwardness +straightforwards +straightly +straightness +straightway +strain +strained +strainer +strainers +straining +strains +strait +straiten +straitened +straitening +straitly +straitness +straits +strand +stranded +strandedness +strander +stranding +strands +strange +strangely +strangeness +stranger +stranger's +strangers +strangest +strangle +strangled +strangler +stranglers +strangles +strangling +stranglings +strangulation +strangulation's +strangulations +strap +strap's +straps +stratagem +stratagem's +stratagems +strategic +strategics +strategies +strategy +strategy's +stratification +stratifications +stratified +stratifies +stratify +stratifying +stratum +straw +straw's +strawberries +strawberry +strawberry's +straws +stray +stray's +strayed +strayer +straying +strays +streak +streaked +streaking +streaks +stream +streamed +streamer +streamers +streaming +streamline +streamlined +streamliner +streamlines +streamlining +streams +street +streetcar +streetcar's +streetcars +streeters +streets +strength +strengthen +strengthened +strengthener +strengthening +strengthens +strengths +strenuous +strenuously +strenuousness +stress +stressed +stresses +stressing +stretch +stretched +stretcher +stretchers +stretches +stretching +strew +strewing +strewn +strews +strewth +stricken +strict +stricter +strictest +strictly +strictness +stride +strider +strides +striding +strife +strike +striker +strikers +strikes +striking +strikingly +string +string's +stringed +stringent +stringently +stringer +stringers +stringier +stringiest +stringiness +stringing +strings +stringy +strip +strip's +stripe +striped +striper +stripes +striping +stripped +stripper +stripper's +strippers +stripping +strips +strive +striver +strives +striving +strivings +strobe +strobe's +strobed +strobes +strobing +stroboscopic +strode +stroke +stroked +stroker +strokers +strokes +stroking +stroll +strolled +stroller +strolling +strolls +strong +stronger +strongest +stronghold +strongly +strove +struck +structural +structurally +structure +structured +structurer +structures +structuring +struggle +struggled +struggler +struggles +struggling +strung +strut +struts +strutted +strutter +strutting +stub +stub's +stubbed +stubbing +stubble +stubborn +stubbornly +stubbornness +stubs +stuck +stud +stud's +student +student's +students +studied +studiedly +studiedness +studier +studies +studio +studio's +studios +studious +studiously +studiousness +studs +study +studying +stuff +stuffed +stuffer +stuffier +stuffiest +stuffiness +stuffing +stuffings +stuffs +stuffy +stumble +stumbled +stumbler +stumbles +stumbling +stumblingly +stump +stumped +stumper +stumping +stumps +stun +stung +stunning +stunningly +stuns +stunt +stunt's +stunted +stuntedness +stunting +stunts +stupefy +stupefying +stupendous +stupendously +stupendousness +stupid +stupider +stupidest +stupidities +stupidity +stupidly +stupidness +stupor +sturdier +sturdiness +sturdy +style +styled +styler +stylers +styles +styling +stylish +stylishly +stylishness +stylistic +stylistically +stylistics +sub +subatomic +subclass +subclass's +subclasses +subcommittee +subcommittee's +subcommittees +subcomponent +subcomponent's +subcomponents +subcomputation +subcomputation's +subcomputations +subconscious +subconsciously +subconsciousness +subculture +subculture's +subcultures +subdivide +subdivided +subdivider +subdivides +subdividing +subdivision +subdivision's +subdivisions +subdue +subdued +subduedly +subduer +subdues +subduing +subexpression +subexpression's +subexpressions +subfield +subfield's +subfields +subfile +subfile's +subfiles +subgoal +subgoal's +subgoals +subgraph +subgraphs +subgroup +subgroup's +subgrouping +subgroups +subinterval +subinterval's +subintervals +subject +subject's +subjected +subjecting +subjection +subjective +subjectively +subjectiveness +subjectivity +subjects +sublimation +sublimations +sublime +sublimed +sublimely +sublimeness +sublimer +subliming +sublist +sublist's +sublists +submarine +submarined +submariner +submariners +submarines +submarining +submerge +submerged +submerges +submerging +submission +submission's +submissions +submit +submits +submitted +submitting +submode +submodes +submodule +submodule's +submodules +subnetwork +subnetwork's +subnetworks +subordinate +subordinated +subordinately +subordinateness +subordinates +subordinating +subordination +subordinative +subproblem +subproblem's +subproblems +subprocess +subprocess's +subprocesses +subprogram +subprogram's +subprograms +subproject +subproof +subproof's +subproofs +subrange +subrange's +subranges +subroutine +subroutine's +subroutines +subs +subschema +subschema's +subschemas +subscribe +subscribed +subscriber +subscribers +subscribes +subscribing +subscript +subscripted +subscripting +subscription +subscription's +subscriptions +subscripts +subsection +subsection's +subsections +subsegment +subsegment's +subsegments +subsequence +subsequence's +subsequences +subsequent +subsequently +subsequentness +subset +subset's +subsets +subside +subsided +subsides +subsidiaries +subsidiary +subsidiary's +subsidies +subsiding +subsidy +subsidy's +subsist +subsisted +subsistence +subsisting +subsists +subspace +subspace's +subspaces +substance +substance's +substances +substantial +substantially +substantialness +substantiate +substantiated +substantiates +substantiating +substantiation +substantiations +substantiative +substantive +substantively +substantiveness +substantivity +substitutability +substitutable +substitute +substituted +substituter +substitutes +substituting +substitution +substitutions +substitutive +substitutively +substrate +substrate's +substrates +substring +substrings +substructure +substructure's +substructures +subsume +subsumed +subsumes +subsuming +subsystem +subsystem's +subsystems +subtask +subtask's +subtasks +subterranean +subterraneanly +subtitle +subtitle's +subtitled +subtitles +subtitling +subtle +subtleness +subtler +subtlest +subtleties +subtlety +subtly +subtopic +subtopic's +subtopics +subtract +subtracted +subtracter +subtracter's +subtracters +subtracting +subtraction +subtractions +subtractive +subtracts +subtrahend +subtrahend's +subtrahends +subtree +subtree's +subtrees +subunit +subunit's +subunits +suburb +suburb's +suburban +suburbs +subversion +subvert +subverted +subverter +subverting +subverts +subway +subway's +subways +succeed +succeeded +succeeder +succeeding +succeeds +success +successes +successful +successfully +successfulness +succession +succession's +successions +successive +successively +successiveness +successor +successor's +successors +succinct +succinctly +succinctness +succumb +succumbed +succumbing +succumbs +such +suck +sucked +sucker +suckered +suckering +suckers +sucking +suckle +suckled +suckles +suckling +sucks +suction +sudden +suddenly +suddenness +suds +sudser +sudsing +sue +sued +sueded +sueding +suer +sues +suffer +sufferance +suffered +sufferer +sufferers +suffering +sufferings +suffers +suffice +sufficed +sufficer +suffices +sufficiency +sufficient +sufficiently +sufficing +suffix +suffixed +suffixer +suffixes +suffixing +suffocate +suffocated +suffocates +suffocating +suffocatingly +suffocation +suffocative +suffrage +sugar +sugared +sugaring +sugarings +sugars +suggest +suggested +suggester +suggestible +suggesting +suggestion +suggestion's +suggestions +suggestive +suggestively +suggestiveness +suggests +suicidal +suicidally +suicide +suicide's +suicided +suicides +suiciding +suing +suit +suit's +suitability +suitable +suitableness +suitably +suitcase +suitcase's +suitcases +suite +suited +suiters +suites +suiting +suitor +suitor's +suitors +suits +sulk +sulked +sulkies +sulkiness +sulking +sulks +sulky +sullen +sullenly +sullenness +sulphate +sulphates +sulphur +sulphured +sulphuric +sultan +sultan's +sultans +sultrier +sultriness +sultry +sum +sum's +sumer +summand +summand's +summands +summaries +summary +summary's +summation +summation's +summations +summed +summer +summer's +summered +summering +summers +summing +summit +summon +summoned +summoner +summoners +summoning +summons +summonses +sumptuous +sumptuously +sumptuousness +sums +sun +sun's +sunbeam +sunbeam's +sunbeams +sunburn +sundown +sundowner +sundowners +sundries +sundry +sung +sunglass +sunglasses +sunk +sunken +sunlight +sunlights +sunned +sunnier +sunniness +sunning +sunny +sunrise +sunrises +suns +sunset +sunsets +sunshine +sunshines +sup +super +superb +superbly +superbness +superclass +superclass's +supercomputer +supercomputer's +supercomputers +supered +superego +superego's +superegos +superficial +superficially +superficialness +superfluities +superfluity +superfluity's +superfluous +superfluously +superfluousness +superhuman +superhumanly +superhumanness +superimpose +superimposed +superimposes +superimposing +supering +superintend +superintendent +superintendent's +superintendents +superior +superior's +superiority +superiorly +superiors +superlative +superlatively +superlativeness +superlatives +supermarket +supermarket's +supermarkets +superpose +superposed +superposes +superposing +superscript +superscripted +superscripting +superscripts +supersede +superseded +superseder +supersedes +superseding +superset +superset's +supersets +superstition +superstition's +superstitions +superstitious +superstitiously +superstitiousness +supertitle +supertitle's +supertitled +supertitles +supertitling +superuser +superuser's +superusers +supervise +supervised +supervises +supervising +supervision +supervisions +supervisor +supervisor's +supervisors +supervisory +supper +supper's +suppers +supplant +supplanted +supplanter +supplanting +supplants +supple +suppled +supplely +supplement +supplemental +supplementaries +supplementary +supplemented +supplementer +supplementing +supplements +suppleness +suppler +supplication +supplied +supplier +supplier's +suppliers +supplies +suppling +supply +supply's +supplying +support +supportable +supported +supporter +supporters +supporting +supportingly +supportive +supportively +supports +suppose +supposed +supposedly +supposer +supposes +supposing +supposition +supposition's +suppositions +suppress +suppressed +suppresses +suppressing +suppression +suppressions +suppressive +suppressiveness +supremacy +supreme +supremely +supremeness +sure +sured +surely +sureness +surer +surest +sureties +surety +surf +surface +surfaced +surfaceness +surfacer +surfacers +surfaces +surfacing +surfer +surfer's +surfers +surfing +surge +surged +surgely +surgeon +surgeon's +surgeons +surgeries +surgery +surges +surgical +surgically +surging +surlier +surliness +surly +surmise +surmised +surmiser +surmises +surmising +surmount +surmounted +surmounting +surmounts +surname +surname's +surnamed +surnames +surpass +surpassed +surpasses +surpassing +surpassingly +surplus +surplus's +surpluses +surprise +surprise's +surprised +surpriser +surprises +surprising +surprisingly +surrender +surrendered +surrenderer +surrendering +surrenders +surrogate +surrogate's +surrogates +surrogation +surround +surrounded +surrounding +surroundings +surrounds +survey +surveyed +surveying +surveyor +surveyor's +surveyors +surveys +survival +survivals +survive +survived +surviver +survives +surviving +survivor +survivor's +survivors +susceptible +suspect +suspected +suspecter +suspecting +suspects +suspend +suspended +suspender +suspender's +suspenders +suspending +suspends +suspense +suspenses +suspension +suspensions +suspensive +suspensively +suspicion +suspicion's +suspicioned +suspicioning +suspicions +suspicious +suspiciously +suspiciousness +sustain +sustained +sustainer +sustaining +sustains +suture +sutured +sutures +suturing +swagger +swaggered +swaggering +swain +swain's +swains +swallow +swallowed +swallower +swallowing +swallows +swam +swamp +swamped +swamper +swampier +swampiness +swamping +swamps +swampy +swan +swan's +swans +swap +swapped +swapper +swapper's +swappers +swapping +swaps +swarm +swarmed +swarmer +swarming +swarms +swarthier +swarthiness +swarthy +swatted +sway +swayed +swayer +swaying +sways +swear +swearer +swearing +swears +sweat +sweated +sweater +sweaters +sweating +sweats +sweep +sweeper +sweepers +sweeping +sweepingly +sweepingness +sweepings +sweeps +sweet +sweeten +sweetened +sweetener +sweeteners +sweetening +sweetenings +sweetens +sweeter +sweetest +sweetheart +sweetheart's +sweethearts +sweetie +sweetie's +sweeties +sweeting +sweetly +sweetness +sweets +swell +swelled +swelling +swellings +swells +swept +swerve +swerved +swerves +swerving +swift +swifter +swiftest +swiftly +swiftness +swim +swimmer +swimmer's +swimmers +swimming +swimmingly +swims +swimsuit +swimsuit's +swimsuits +swine +swing +swinger +swingers +swinging +swingingly +swings +swipe +swiped +swipes +swiping +swirl +swirled +swirler +swirling +swirlingly +swirls +swish +swished +swisher +switch +switch's +switchboard +switchboard's +switchboards +switched +switcher +switchers +switches +switching +switchings +swollen +swoon +swooned +swooner +swooning +swooningly +swoons +swoop +swooped +swooper +swooping +swoops +sword +sword's +swords +swore +sworn +swum +swung +sycamore +syllabi +syllable +syllable's +syllabled +syllables +syllabling +syllabus +syllogism +syllogism's +syllogisms +symbiosis +symbiotic +symbol +symbol's +symbolic +symbolic's +symbolically +symbolics +symbolism +symbolisms +symbols +symmetric +symmetrical +symmetrically +symmetricalness +symmetries +symmetry +symmetry's +sympathetic +sympathies +sympathy +sympathy's +symphonies +symphony +symphony's +symposium +symposiums +symptom +symptom's +symptomatic +symptoms +synapse +synapse's +synapsed +synapses +synapsing +synchronous +synchronously +synchronousness +synchrony +syndicate +syndicated +syndicates +syndicating +syndication +syndrome +syndrome's +syndromes +synergism +synergistic +synonym +synonym's +synonymous +synonymously +synonyms +synopses +synopsis +syntactic +syntactical +syntactically +syntacticly +syntactics +syntax +syntaxes +syntheses +synthesis +synthetic +synthetics +syringe +syringed +syringes +syringing +syrup +system +system's +systematic +systematically +systematicness +systematics +systems +tab +tabernacle +tabernacle's +tabernacled +tabernacles +tabernacling +table +tableau +tableau's +tableaus +tablecloth +tablecloths +tabled +tables +tablespoon +tablespoon's +tablespoonful +tablespoonful's +tablespoonfuls +tablespoons +tablet +tablet's +tablets +tabling +taboo +taboo's +taboos +tabs +tabular +tabularly +tabulate +tabulated +tabulates +tabulating +tabulation +tabulations +tabulator +tabulator's +tabulators +tachometer +tachometer's +tachometers +tachometry +tacit +tacitly +tacitness +tack +tacked +tacker +tacking +tackle +tackle's +tackled +tackler +tackles +tackling +tacks +tact +tactics +tactile +tactilely +tag +tag's +tagged +tagging +tags +tail +tailed +tailer +tailing +tailings +tailor +tailored +tailoring +tailors +tails +taint +tainted +taints +take +taken +taker +takers +takes +taketh +taking +takings +tale +tale's +talent +talented +talents +taler +tales +talion +talk +talkative +talkatively +talkativeness +talked +talker +talkers +talkie +talking +talks +tall +taller +tallest +tallness +tallow +tame +tamed +tamely +tameness +tamer +tames +tamest +taming +tamper +tampered +tamperer +tampering +tampers +tan +tandem +tang +tanged +tangent +tangent's +tangential +tangentially +tangents +tangible +tangibleness +tangibly +tangier +tangle +tangled +tangles +tangling +tangly +tangy +tank +tanked +tanker +tankers +tanking +tanks +tanner +tanner's +tanners +tans +tantamount +tantrum +tantrum's +tantrums +tap +tap's +tape +taped +taper +tapered +taperer +tapering +tapers +tapes +tapestried +tapestries +tapestry +tapestry's +taping +tapings +tapped +tapper +tapper's +tappers +tapping +taproot +taproot's +taproots +taps +tar +tardier +tardies +tardiness +tardy +target +targeted +targeting +targets +tariff +tariff's +tariffs +taring +tarried +tarries +tarry +tarrying +tars +tart +tartly +tartness +tarts +task +tasked +tasking +tasks +taste +tasted +tasteful +tastefully +tastefulness +tasteless +tastelessly +tastelessness +taster +tasters +tastes +tasting +tatter +tattered +tattoo +tattooed +tattooer +tattoos +tau +taught +taunt +taunted +taunter +taunting +tauntingly +taunts +taut +tauten +tautened +tautening +tautly +tautness +tautological +tautologically +tautologies +tautology +tautology's +tavern +tavern's +taverner +taverns +tawnier +tawnies +tawniness +tawny +tax +taxable +taxation +taxed +taxer +taxes +taxi +taxi's +taxicab +taxicab's +taxicabs +taxied +taxiing +taxing +taxingly +taxis +taxonomic +taxonomically +taxonomy +taxpayer +taxpayer's +taxpayers +tea +teach +teachable +teachableness +teacher +teacher's +teachers +teaches +teaching +teachings +team +team's +teamed +teaming +teams +tear +tear's +teared +tearer +tearful +tearfully +tearfulness +tearing +tears +teas +tease +teased +teaser +teases +teasing +teasingly +teaspoon +teaspoon's +teaspoonful +teaspoonful's +teaspoonfuls +teaspoons +technical +technicalities +technicality +technicality's +technically +technicalness +technician +technician's +technicians +technique +technique's +techniques +technological +technologically +technologies +technologist +technologist's +technologists +technology +technology's +tedious +tediously +tediousness +tedium +teem +teemed +teeming +teemingly +teemingness +teems +teen +teenage +teenaged +teenager +teenagers +teener +teens +teeth +teethe +teethed +teether +teethes +teething +telecommunication +telecommunications +teleconference +teleconference's +teleconferenced +teleconferences +teleconferencing +telegram +telegram's +telegrams +telegraph +telegraphed +telegrapher +telegraphers +telegraphic +telegraphing +telegraphs +teleological +teleologically +teleology +telephone +telephoned +telephoner +telephoners +telephones +telephonic +telephoning +telephony +telescope +telescoped +telescopes +telescoping +teletype +teletype's +teletypes +televise +televised +televises +televising +television +televisions +televisor +televisor's +televisors +tell +teller +tellers +telling +tellingly +tellings +tells +temper +temperament +temperamental +temperamentally +temperaments +temperance +temperate +temperately +temperateness +temperature +temperature's +temperatures +tempered +temperer +tempering +tempers +tempest +tempests +tempestuous +tempestuously +tempestuousness +template +template's +templates +temple +temple's +templed +temples +temporal +temporally +temporaries +temporarily +temporariness +temporary +tempt +temptation +temptation's +temptations +tempted +tempter +tempters +tempting +temptingly +tempts +ten +ten's +tenacious +tenaciously +tenaciousness +tenant +tenant's +tenants +tend +tended +tendencies +tendency +tender +tendered +tendering +tenderly +tenderness +tenders +tending +tends +tenement +tenement's +tenements +tennis +tenor +tenor's +tenors +tens +tense +tensed +tensely +tenseness +tenser +tenses +tensest +tensing +tension +tensioned +tensioner +tensioning +tensions +tensive +tensor +tensor's +tensors +tent +tentacle +tentacled +tentacles +tentative +tentatively +tentativeness +tented +tenter +tenth +tenthes +tenting +tents +tenure +tenured +tenures +tequila +tequila's +term +termcap +termed +termer +terminal +terminal's +terminally +terminals +terminate +terminated +terminates +terminating +termination +terminations +terminative +terminatively +terminator +terminator's +terminators +terming +terminologies +terminology +terminus +termly +terms +ternary +terrace +terraced +terraces +terracing +terrain +terrain's +terrains +terrestrial +terrestrial's +terrestrially +terrestrials +terrible +terribleness +terribly +terrier +terrier's +terriers +terrific +terrificly +terrified +terrifies +terrify +terrifying +terrifyingly +territorial +territorially +territories +territory +territory's +terror +terror's +terrorism +terrorist +terrorist's +terroristic +terrorists +terrors +tertiaries +tertiary +test +test's +testability +testable +testament +testament's +testaments +tested +tester +tester's +testers +testicle +testicle's +testicles +testified +testifier +testifiers +testifies +testify +testifying +testimonies +testimony +testimony's +testing +testings +tests +text +text's +textbook +textbook's +textbooks +textile +textile's +textiles +texts +textual +textually +texture +textured +textures +texturing +than +thank +thanked +thanker +thankful +thankfully +thankfulness +thanking +thankless +thanklessly +thanklessness +thanks +thanksgiving +thanksgiving's +thanksgivings +that +that's +thatch +thatched +thatcher +thatches +thatching +thats +thaw +thawed +thawing +thaws +the +theatrical +theatrically +theatricals +theft +theft's +thefts +their +their's +theirs +them +thematic +theme +theme's +themes +themselves +then +thence +thenceforth +theologian +theologian's +theologians +theological +theologically +theologies +theology +theorem +theorem's +theorems +theoretic +theoretical +theoretically +theoreticians +theoretics +theories +theorist +theorist's +theorists +theory +theory's +therapeutic +therapeutics +therapies +therapist +therapist's +therapists +therapy +therapy's +there +there's +thereabouts +thereafter +thereby +therefore +therein +thereof +thereon +thereto +thereupon +therewith +thermodynamic +thermodynamics +thermometer +thermometer's +thermometers +thermostat +thermostat's +thermostated +thermostats +these +theses +thesis +they +they'd +they'll +they're +they've +thick +thicken +thickened +thickener +thickeners +thickening +thickens +thicker +thickest +thicket +thicket's +thicketed +thickets +thickly +thickness +thicknesses +thicks +thief +thieve +thieves +thieving +thigh +thighed +thighs +thimble +thimble's +thimbles +thin +thiner +thinest +thing +thingamajig +thingamajig's +thingamajigs +thingness +things +think +thinkable +thinkableness +thinkably +thinker +thinkers +thinking +thinkingly +thinkingness +thinks +thinly +thinner +thinners +thinness +thinnest +thins +third +thirdly +thirds +thirst +thirsted +thirster +thirstier +thirstiness +thirsts +thirsty +thirteen +thirteens +thirteenth +thirties +thirtieth +thirty +this +thistle +thong +thonged +thorn +thorn's +thornier +thorniness +thorns +thorny +thorough +thoroughfare +thoroughfare's +thoroughfares +thoroughly +thoroughness +those +though +thought +thought's +thoughtful +thoughtfully +thoughtfulness +thoughtless +thoughtlessly +thoughtlessness +thoughts +thousand +thousands +thousandth +thrash +thrashed +thrasher +thrashes +thrashing +thread +threaded +threader +threaders +threading +threads +threat +threaten +threatened +threatener +threatening +threateningly +threatens +threats +three +three's +threes +threescore +threshold +threshold's +thresholded +thresholding +thresholds +threw +thrice +thrift +thriftier +thriftiness +thrifty +thrill +thrilled +thriller +thrillers +thrilling +thrillingly +thrills +thrive +thrived +thriver +thrives +thriving +thrivingly +throat +throated +throating +throats +throb +throbbed +throbbing +throbs +throne +throne's +thrones +throng +throng's +thronging +throngs +throning +throttle +throttled +throttler +throttles +throttling +through +throughly +throughout +throughput +throw +thrower +throwing +thrown +throws +thrush +thrushes +thrust +thruster +thrusters +thrusting +thrusts +thud +thuds +thug +thug's +thugs +thumb +thumbed +thumbing +thumbs +thump +thumped +thumper +thumping +thumps +thunder +thunderbolt +thunderbolt's +thunderbolts +thundered +thunderer +thunderers +thundering +thunderingly +thunders +thunderstorm +thunderstorm's +thunderstorms +thunderstruck +thus +thusly +thwart +thwarted +thwarter +thwarting +thwartly +thwarts +thyself +tick +ticked +ticker +tickers +ticket +ticket's +ticketed +ticketing +tickets +ticking +tickle +tickled +tickler +tickles +tickling +ticklish +ticklishly +ticklishness +ticks +tidal +tidally +tide +tided +tides +tidied +tidier +tidies +tidiness +tiding +tidings +tidy +tidying +tie +tied +tier +tiered +tiers +ties +tiger +tiger's +tigers +tight +tighten +tightened +tightener +tighteners +tightening +tightenings +tightens +tighter +tightest +tightly +tightness +tights +tilde +tildes +tile +tiled +tiler +tiles +tiling +till +tillable +tilled +tiller +tillered +tillering +tillers +tilling +tills +tilt +tilted +tilter +tilters +tilting +tilts +timber +timbered +timbering +timbers +time +timed +timeless +timelessly +timelessness +timelier +timeliness +timely +timeout +timeouts +timer +timers +times +timeshare +timeshared +timeshares +timesharing +timetable +timetable's +timetabled +timetables +timetabling +timid +timidity +timidly +timidness +timing +timings +tin +tin's +tinge +tinged +tinging +tingle +tingled +tingles +tingling +tinglingly +tinier +tiniest +tinily +tininess +tinker +tinkered +tinkerer +tinkering +tinkers +tinkle +tinkled +tinkles +tinkling +tinned +tinnier +tinniest +tinnily +tinniness +tinning +tinny +tins +tint +tinted +tinter +tinting +tints +tiny +tip +tip's +tipped +tipper +tipper's +tippers +tipping +tips +tiptoe +tiptoed +tire +tired +tiredly +tiredness +tireless +tirelessly +tirelessness +tires +tiresome +tiresomely +tiresomeness +tiring +tissue +tissue's +tissued +tissues +tissuing +tit +tit's +tithe +tithe's +tither +tithes +tithing +title +titled +titles +titling +tits +titter +tittered +tittering +titters +tizzies +tizzy +to +toad +toad's +toads +toast +toasted +toaster +toasters +toastier +toasting +toasts +toasty +tobacco +today +today's +todays +toe +toe's +toed +toes +together +togetherness +toggle +toggled +toggles +toggling +toil +toiled +toiler +toilet +toilet's +toilets +toiling +toils +token +token's +tokens +told +tolerability +tolerable +tolerably +tolerance +tolerances +tolerant +tolerantly +tolerate +tolerated +tolerates +tolerating +toleration +tolerative +toll +tolled +tolling +tolls +tom +tom's +tomahawk +tomahawk's +tomahawks +tomato +tomatoes +tomb +tomb's +tombs +tomography +tomorrow +tomorrow's +tomorrows +toms +ton +ton's +tone +toned +toner +tones +tongs +tongue +tongued +tongues +tonguing +tonic +tonic's +tonics +tonight +toning +tonnage +tons +tonsil +too +took +tool +tooled +tooler +toolers +tooling +toolkit +toolkit's +toolkits +tools +tooth +toothbrush +toothbrush's +toothbrushes +toothbrushing +toothed +toothing +toothpick +toothpick's +toothpicks +top +toped +toper +topic +topic's +topical +topically +topics +toping +topmost +topological +topologically +topologies +topology +topple +toppled +topples +toppling +tops +torch +torch's +torches +tore +torment +tormented +tormenter +tormenters +tormenting +torments +torn +tornado +tornadoes +tornados +torpedo +torpedoed +torpedoes +torpedoing +torpedos +torque +torquer +torquers +torques +torquing +torrent +torrent's +torrents +torrid +torridly +torridness +tortoise +tortoise's +tortoises +torture +tortured +torturer +torturers +tortures +torturing +torus +torus's +toruses +toss +tossed +tosser +tosses +tossing +total +total's +totalities +totality +totality's +totally +totals +totter +tottered +tottering +totteringly +totters +touch +touchable +touched +toucher +touches +touchier +touchiest +touchily +touchiness +touching +touchingly +touchy +tough +toughen +toughened +toughening +toughens +tougher +toughest +toughly +toughness +tour +toured +tourer +touring +tourist +tourist's +tourists +tournament +tournament's +tournaments +tours +tow +toward +towardliness +towardly +towards +towed +towel +towel's +towels +tower +towered +towering +toweringly +towers +towing +town +town's +towner +towns +township +township's +townships +tows +toxicity +toxin +toxin's +toxins +toy +toyed +toyer +toying +toys +trace +traceable +traceableness +traced +traceless +tracelessly +tracer +tracers +traces +tracing +tracings +track +tracked +tracker +trackers +tracking +tracks +tract +tract's +tractability +tractable +tractive +tractor +tractor's +tractors +tracts +trade +traded +trademark +trademark's +trademarks +tradeoff +tradeoffs +trader +traders +trades +tradesman +trading +tradition +tradition's +traditional +traditionally +traditions +traffic +traffic's +trafficked +trafficker +trafficker's +traffickers +trafficking +traffics +tragedies +tragedy +tragedy's +tragic +tragically +trail +trailed +trailer +trailers +trailing +trailings +trails +train +trained +trainee +trainee's +trainees +trainer +trainers +training +trains +trait +trait's +traitor +traitor's +traitors +traits +trajectories +trajectory +trajectory's +tramp +tramped +tramper +tramping +trample +trampled +trampler +tramples +trampling +tramps +trance +trance's +trances +trancing +tranquil +tranquility +tranquillity +tranquilly +tranquilness +transact +transacted +transacting +transaction +transaction's +transactions +transacts +transceiver +transceiver's +transceivers +transcend +transcended +transcendent +transcendently +transcending +transcends +transcontinental +transcribe +transcribed +transcriber +transcribers +transcribes +transcribing +transcript +transcript's +transcription +transcription's +transcriptions +transcripts +transfer +transfer's +transferability +transferable +transferal +transferal's +transferals +transfered +transference +transferral +transferral's +transferrals +transferred +transferrer +transferrer's +transferrers +transferring +transfers +transfinite +transform +transformable +transformation +transformation's +transformational +transformations +transformed +transformer +transformers +transforming +transforms +transgress +transgressed +transgresses +transgressing +transgression +transgression's +transgressions +transgressive +transience +transiency +transient +transiently +transients +transistor +transistor's +transistors +transit +transition +transitional +transitionally +transitioned +transitions +transitive +transitively +transitiveness +transitivity +transitoriness +transitory +translatability +translatable +translate +translated +translates +translating +translation +translational +translations +translative +translator +translator's +translators +translucent +translucently +transmission +transmission's +transmissions +transmit +transmits +transmittal +transmitted +transmitter +transmitter's +transmitters +transmitting +transmogrification +transmogrify +transparencies +transparency +transparency's +transparent +transparently +transparentness +transpire +transpired +transpires +transpiring +transplant +transplanted +transplanter +transplanting +transplants +transport +transportability +transportation +transportations +transported +transporter +transporters +transporting +transports +transpose +transposed +transposes +transposing +transposition +trap +trap's +trapezoid +trapezoid's +trapezoidal +trapezoids +trapped +trapper +trapper's +trappers +trapping +trappings +traps +trash +trashed +trasher +trashes +trashing +traumatic +travail +travails +travel +travels +traversal +traversal's +traversals +traverse +traversed +traverser +traverses +traversing +travesties +travesty +travesty's +tray +tray's +trays +treacheries +treacherous +treacherously +treacherousness +treachery +treachery's +tread +treaded +treader +treading +treads +treason +treasure +treasured +treasurer +treasures +treasuries +treasuring +treasury +treasury's +treat +treated +treater +treaters +treaties +treating +treatise +treatise's +treatises +treatment +treatment's +treatments +treats +treaty +treaty's +treble +trebled +trebles +trebling +tree +tree's +treed +trees +treetop +treetop's +treetops +trek +trek's +treks +tremble +trembled +trembler +trembles +trembling +tremendous +tremendously +tremendousness +tremor +tremor's +tremors +trench +trenched +trencher +trenchers +trenches +trend +trending +trends +trespass +trespassed +trespasser +trespassers +trespasses +tress +tress's +tressed +tresses +trial +trial's +trials +triangle +triangle's +triangles +triangular +triangularly +tribal +tribally +tribe +tribe's +tribes +tribunal +tribunal's +tribunals +tribune +tribune's +tribunes +tributary +tribute +tribute's +tributes +tributing +trichotomy +trick +tricked +tricker +trickier +trickiest +trickiness +tricking +trickle +trickled +trickles +trickling +tricks +tricky +tried +trier +triers +tries +trifle +trifled +trifler +trifles +trifling +trigger +triggered +triggering +triggers +trigonometric +trigonometry +trihedral +trill +trilled +triller +trillion +trillions +trillionth +trim +trimer +trimly +trimmed +trimmer +trimmest +trimming +trimmings +trimness +trims +trinket +trinket's +trinketed +trinketer +trinkets +trip +trip's +triple +tripled +triples +triplet +triplet's +triplets +triplication +tripling +triply +trips +triumph +triumphal +triumphantly +triumphed +triumphing +triumphs +trivia +trivial +trivialities +triviality +trivially +trod +troff +troff's +troffer +troll +troll's +trolley +trolley's +trolleyed +trolleys +trolls +troop +trooped +trooper +troopers +trooping +troops +trophied +trophies +trophy +trophy's +trophying +tropic +tropic's +tropical +tropically +tropics +trot +trots +trouble +troubled +troublemaker +troublemaker's +troublemakers +troubler +troubles +troubleshoot +troubleshooted +troubleshooter +troubleshooters +troubleshooting +troubleshoots +troublesome +troublesomely +troublesomeness +troubling +trough +trouser +trousered +trousers +trout +trouts +trowel +trowel's +trowels +truant +truant's +truants +truce +trucing +truck +trucked +trucker +truckers +trucking +trucks +trudge +trudged +trudger +trudges +trudging +true +trued +trueness +truer +trues +truest +truing +truism +truism's +truisms +truly +trump +trumped +trumpet +trumpeted +trumpeter +trumpeting +trumpets +trumps +truncate +truncated +truncates +truncating +truncation +truncation's +truncations +trunk +trunk's +trunked +trunks +trust +trusted +trustee +trustee's +trusteed +trustees +truster +trustful +trustfully +trustfulness +trustier +trusties +trustiness +trusting +trustingly +trusts +trustworthiness +trustworthy +trusty +truth +truthful +truthfully +truthfulness +truths +try +trying +tryingly +tty +tty's +ttys +tub +tub's +tube +tubed +tuber +tuberculosis +tubers +tubes +tubing +tubs +tuck +tucked +tucker +tuckered +tuckering +tucking +tucks +tuft +tuft's +tufted +tufter +tufts +tug +tugs +tuition +tuitions +tulip +tulip's +tulips +tumble +tumbled +tumbler +tumblers +tumbles +tumbling +tumult +tumult's +tumults +tumultuous +tumultuously +tumultuousness +tunable +tunableness +tune +tuned +tuner +tuners +tunes +tunic +tunic's +tunics +tuning +tuning's +tunings +tunnel +tunnels +tuple +tuple's +tuples +turban +turban's +turbaned +turbans +turbulence +turbulence's +turbulent +turbulently +turf +turkey +turkey's +turkeys +turmoil +turmoil's +turmoils +turn +turnable +turned +turner +turners +turning +turnings +turnip +turnip's +turnips +turnkey +turnkeys +turnover +turnovers +turns +turpentine +turquoise +turret +turret's +turreted +turrets +turtle +turtle's +turtles +turtling +tutor +tutored +tutorial +tutorial's +tutorials +tutoring +tutors +twain +twang +twanging +twas +tweak +tweaked +tweaker +tweaking +tweaks +tweed +tweezer +tweezers +twelfth +twelve +twelves +twenties +twentieth +twenty +twice +twig +twig's +twigs +twilight +twilight's +twilights +twill +twilled +twilling +twin +twin's +twine +twined +twiner +twines +twining +twinkle +twinkled +twinkler +twinkles +twinkling +twins +twirl +twirled +twirler +twirling +twirlingly +twirls +twist +twisted +twister +twisters +twisting +twists +twitch +twitched +twitcher +twitching +twitter +twittered +twitterer +twittering +two +two's +twofold +twos +tying +type +type's +typed +typedef +typedefs +typer +types +typewriter +typewriter's +typewriters +typhoid +typical +typically +typicalness +typification +typified +typifies +typify +typifying +typing +typist +typist's +typists +typographic +typographical +typographically +typography +typos +tyranny +tyrant +tyrant's +tyrants +ubiquitous +ubiquitously +ubiquitousness +ubiquity +ugh +uglier +ugliest +ugliness +ugly +ulcer +ulcer's +ulcered +ulcering +ulcers +ultimate +ultimately +ultimateness +umbrella +umbrella's +umbrellas +umpire +umpire's +umpired +umpires +umpiring +unabashed +unabashedly +unabated +unabatedly +unabbreviated +unable +unabridged +unaccelerated +unacceptability +unacceptable +unacceptably +unaccessible +unaccommodated +unaccompanied +unaccomplished +unaccountably +unaccounted +unaccustomed +unaccustomedly +unachievable +unachieved +unacknowledged +unacquainted +unadaptable +unadjustable +unadjusted +unadopted +unadorned +unadulterated +unadulteratedly +unadvised +unadvisedly +unaffected +unaffectedly +unaffectedness +unaffectionate +unaffectionately +unafraid +unaggregated +unaided +unalienability +unalienable +unaligned +unallocated +unalloyed +unalterable +unalterableness +unalterably +unaltered +unambiguous +unambiguously +unambitious +unanchored +unanimous +unanimously +unannounced +unanswerable +unanswered +unanticipated +unanticipatedly +unapologetically +unappealing +unappealingly +unappreciated +unapproachability +unapproachable +unappropriated +unapt +unaptly +unaptness +unarguable +unarguably +unarmed +unarticulated +unary +unashamed +unashamedly +unasked +unassailable +unassailableness +unassembled +unassigned +unassigns +unassisted +unassuming +unassumingness +unattached +unattainability +unattainable +unattended +unattenuated +unattractive +unattractively +unattractiveness +unattributed +unauthentic +unauthenticated +unavailability +unavailable +unavailing +unavailingly +unavailingness +unavoidable +unavoidably +unaware +unawarely +unawareness +unawares +unbacked +unbalanced +unbalancedness +unbanned +unbanning +unbans +unbarbered +unbarred +unbated +unbearable +unbearably +unbeatable +unbeatably +unbeaten +unbeautifully +unbecoming +unbecomingly +unbecomingness +unbelievable +unbelievably +unbelieving +unbelievingly +unbelted +unbendable +unbetrothed +unbiased +unbiasedness +unbidden +unblemished +unblinded +unblinking +unblinkingly +unblock +unblocked +unblocking +unblocks +unblown +unblushing +unblushingly +unbodied +unbolted +unboned +unbonneted +unborn +unbound +unbounded +unboundedness +unbowed +unbranched +unbreakable +unbreathable +unbred +unbridled +unbroken +unbudging +unbudgingly +unbuffered +unbuilt +unbundled +unburdened +unbureaucratic +unburied +unburned +unbuttered +unbuttoned +unbuttons +uncaged +uncalculating +uncalled +uncandidly +uncanniness +uncanny +uncared +uncaring +uncatchable +uncaught +uncaused +unceasing +unceasingly +uncensored +uncertain +uncertainly +uncertainness +uncertainties +uncertainty +uncertified +unchallenged +unchangeability +unchangeable +unchangeably +unchanged +unchanging +unchangingly +unchangingness +uncharacteristically +uncharged +uncharitable +uncharitableness +uncharted +unchartered +uncheckable +unchecked +unchivalrously +unchosen +uncivil +uncivilly +unclaimed +unclamorous +unclamorously +unclamorousness +unclarity +unclassified +uncle +uncle's +unclean +uncleanliness +uncleanly +uncleanness +unclear +uncleared +unclenched +uncles +unclipped +unclosed +unclothed +unclouded +uncloudedly +unclustered +uncluttered +uncoated +uncoded +uncoiled +uncoined +uncomfortable +uncomfortably +uncomforted +uncommented +uncommitted +uncommon +uncommonly +uncommonness +uncomplaining +uncomplainingly +uncompleted +uncomplimentary +uncomprehending +uncomprehendingly +uncompress +uncompressed +uncompresses +uncompressing +uncompromising +uncompromisingly +uncomputable +unconceivable +unconcerned +unconcernedly +unconcernedness +unconditional +unconditionally +unconditioned +unconfined +unconfirmed +unconformity +unconnected +unconquerable +unconscious +unconsciously +unconsciousness +unconsidered +unconsolidated +unconstitutional +unconstitutionality +unconstitutionally +unconstrained +uncontaminated +uncontested +uncontrollability +uncontrollable +uncontrollably +uncontrolled +unconventional +unconventionally +unconvertible +unconvinced +unconvincing +unconvincingly +unconvincingness +uncool +uncooled +uncooperative +uncoordinated +uncorked +uncorrectable +uncorrected +uncorrelated +uncountable +uncountably +uncounted +uncouth +uncouthly +uncouthness +uncovenanted +uncover +uncovered +uncovering +uncovers +uncreated +uncritically +uncrowned +uncrushable +uncured +uncurled +uncynical +uncynically +undamaged +undamped +undaunted +undauntedly +undebatable +undecidable +undecided +undeclared +undecomposable +undecorated +undefended +undefinability +undefinable +undefined +undefinedness +undeformed +undelete +undeleted +undemocratic +undemocratically +undemonstrative +undemonstratively +undemonstrativeness +undeniable +undeniableness +undeniably +undepicted +under +underbrush +underdone +underestimate +underestimated +underestimates +underestimating +underestimation +underestimations +underflow +underflowed +underflowing +underflows +underfoot +undergo +undergoes +undergoing +undergone +undergrad +undergrad's +undergrads +undergraduate +undergraduate's +undergraduates +underground +undergrounder +underivable +underived +underlie +underlies +underline +underlined +underlines +underling +underling's +underlings +underlining +underlinings +underly +underlying +undermine +undermined +undermines +undermining +underneath +underpayment +underpayment's +underpayments +underpinning +underpinnings +underplay +underplayed +underplaying +underplays +underscore +underscored +underscores +understand +understandability +understandable +understandably +understanding +understandingly +understandings +understands +understated +understood +undertake +undertaken +undertaker +undertaker's +undertakers +undertakes +undertaking +undertakings +undertook +underway +underwear +underwent +underworld +underwrite +underwriter +underwriters +underwrites +underwriting +undescended +undesigned +undesigning +undesirability +undesirable +undesirableness +undesirably +undesired +undetectable +undetected +undetermined +undeveloped +undeviated +undeviating +undeviatingly +undid +undies +undifferentiated +undigested +undignified +undiluted +undiminished +undimmed +undiplomatic +undirected +undisciplined +undisclosed +undiscovered +undiscussed +undisguised +undisguisedly +undismayed +undisputed +undisrupted +undissociated +undistinguished +undistorted +undistributed +undisturbed +undivided +undo +undocumented +undoer +undoes +undoing +undoings +undomesticated +undone +undoubled +undoubted +undoubtedly +undrained +undramatically +undreamed +undress +undressed +undresses +undressing +undried +undrinkable +undue +unduly +undumper +undumper's +undutiful +undutifully +undutifulness +undying +unearned +unearthliness +unearthly +uneasily +uneasiness +uneasy +uneconomical +unedited +unelected +unembellished +unemotional +unemotionally +unemphatic +unemphatically +unemployable +unemployed +unemployment +unencumbered +unending +unendingly +unendurable +unendurableness +unendurably +unenlightening +unenthusiastic +unenthusiastically +unenumerated +unenvied +unequal +unequally +unequivocal +unequivocally +unerring +unerringly +unessential +unethically +unevaluated +uneven +unevenly +unevenness +uneventful +uneventfully +unexamined +unexampled +unexceptionally +unexcused +unexpanded +unexpected +unexpectedly +unexpectedness +unexpended +unexperienced +unexplainable +unexplained +unexploited +unexplored +unexpressed +unextended +unfading +unfadingly +unfair +unfairly +unfairness +unfaith +unfaithful +unfaithfully +unfaithfulness +unfaltering +unfalteringly +unfamiliar +unfamiliarity +unfamiliarly +unfashionable +unfashionably +unfastened +unfathered +unfeathered +unfeigned +unfeignedly +unfenced +unfettered +unfilial +unfilially +unfilled +unfinished +unfired +unfit +unfitly +unfitness +unfitted +unfixed +unflagging +unflaggingly +unflattering +unflatteringly +unfledged +unflinching +unflinchingly +unfocused +unfold +unfolded +unfolding +unfolds +unforeseen +unforgeable +unforgettable +unforgettably +unforgivable +unforgiving +unforgivingness +unformatted +unformed +unforthcoming +unfortunate +unfortunately +unfortunates +unfounded +unfrequented +unfriendliness +unfriendly +unfrosted +unfruitful +unfruitfully +unfruitfulness +unfulfilled +unfunded +unfunnily +unfurnished +ungainliness +ungainly +ungallantly +ungenerously +ungirt +unglazed +unglued +ungot +ungotten +ungoverned +ungraceful +ungracefully +ungracefulness +ungraciously +ungraded +ungrammatical +ungrateful +ungratefully +ungratefulness +ungratified +ungrounded +unguarded +unguardedly +unguardedness +unguessable +unguessed +unguided +unhallow +unhallowed +unhampered +unhandily +unhandsomely +unhappier +unhappiest +unhappily +unhappiness +unhappy +unharmed +unhealthily +unhealthiness +unhealthy +unheard +unheeded +unheeding +unhelm +unhelpfully +unheralded +unhesitating +unhesitatingly +unhinged +unhitched +unhooks +unhoped +unhurriedly +unhysterical +unhysterically +unicorn +unicorn's +unicorns +unidentifiable +unidentified +unidirectional +unidirectionality +unidirectionally +unification +unifications +unified +unifier +unifiers +unifies +uniform +uniformed +uniforming +uniformities +uniformity +uniformly +uniformness +uniforms +unify +unifying +unilluminating +unimaginable +unimaginably +unimaginatively +unimpaired +unimpassioned +unimpeded +unimplemented +unimportance +unimportant +unimpressed +unimproved +unincorporated +unindented +uninfected +uninfluenced +uninformatively +uninformed +uninhabited +uninhibited +uninhibitedly +uninhibitedness +uninitiated +uninjured +uninspired +uninspiring +uninstantiated +uninsulated +unintelligent +unintelligently +unintelligibility +unintelligible +unintelligibleness +unintelligibly +unintended +unintentional +unintentionally +uninteresting +uninterestingly +uninterpretable +uninterpreted +uninterrupted +uninterruptedly +uninterruptedness +uninterviewed +uninvited +union +union's +unions +unique +uniquely +uniqueness +unison +unit +unit's +unite +united +unitedly +uniter +unites +unities +uniting +unitive +units +unity +unity's +univalve +univalve's +univalves +universal +universality +universally +universalness +universals +universe +universe's +universes +universities +university +university's +unjacketed +unjam +unjammed +unjamming +unjoined +unjust +unjustifiable +unjustified +unjustly +unjustness +unkind +unkindliness +unkindly +unkindness +unknit +unknowable +unknowing +unknowingly +unknown +unknowns +unlaced +unlamented +unlashed +unlaundered +unlawful +unlawfully +unlawfulness +unleaded +unleash +unleashed +unleashes +unleashing +unleavened +unless +unlettered +unlicensed +unlicked +unlike +unlikelihood +unlikelihoods +unlikeliness +unlikely +unlikeness +unlimbers +unlimited +unlimitedly +unlined +unlink +unlinked +unlinking +unlinks +unlisted +unload +unloaded +unloader +unloaders +unloading +unloads +unlock +unlocked +unlocking +unlocks +unlogged +unloved +unluckily +unluckiness +unlucky +unmade +unmagnified +unmaintainable +unmaintained +unmaliciously +unmanageable +unmanageably +unmanaged +unmanned +unmannered +unmanneredly +unmannerliness +unmannerly +unmapped +unmaps +unmarked +unmarried +unmarrieds +unmasked +unmatchable +unmatched +unmated +unmates +unmeant +unmeasurable +unmentionable +unmentionables +unmentioned +unmerciful +unmercifully +unmeshed +unmistakable +unmistakably +unmitigated +unmitigatedly +unmitigatedness +unmixed +unmoderated +unmodifiable +unmodified +unmolested +unmotivated +unmount +unmountable +unmounted +unmoved +unmurmuring +unnameable +unnamed +unnatural +unnaturally +unnaturalness +unnecessarily +unnecessary +unneeded +unnegated +unnerve +unnerved +unnerves +unnerving +unnervingly +unnoticed +unnourished +unnumbered +unobservable +unobservables +unobserved +unobtainable +unoccupied +unofficial +unofficially +unopened +unordered +unoriginals +unorthodoxly +unpack +unpackaged +unpackages +unpacked +unpacker +unpacking +unpacks +unpadded +unpaged +unpaid +unpainted +unpaired +unparliamentary +unparsed +unpartitioned +unpatriotic +unpaved +unperceived +unperformed +unperturbed +unperturbedly +unplaced +unplagued +unplanned +unpleasant +unpleasantly +unpleasantness +unpleased +unplowed +unplugged +unplugging +unplugs +unplumbed +unpolled +unpolluted +unpopular +unpopularity +unprecedented +unprecedentedly +unpredictability +unpredictable +unpredictably +unpredicted +unprejudiced +unprescribed +unpreserved +unpretending +unpretentious +unpretentiously +unpretentiousness +unpriced +unprimed +unprincipled +unprincipledness +unprintable +unprinted +unprivileged +unproblematic +unproblematical +unproblematically +unprocessed +unprofitable +unprofitableness +unprofitably +unprojected +unpromising +unpromisingly +unprompted +unpronounceable +unpropagated +unpropertied +unprotected +unprotectedly +unprovability +unprovable +unproved +unproven +unprovided +unpublished +unpunched +unpunished +unqualified +unqualifiedly +unquantifiable +unquenched +unquestionably +unquestioned +unquestioningly +unquoted +unranked +unrated +unravel +unravels +unreachable +unreacted +unread +unreadability +unreadable +unreal +unrealism +unrealistic +unrealistically +unrealized +unrealizes +unreasonable +unreasonableness +unreasonably +unreassuringly +unreconstructed +unrecordable +unrecorded +unrecoverable +unredeemed +unreferenced +unrefined +unreflected +unregister +unregistered +unregistering +unregisters +unregulated +unrehearsed +unreinforced +unrelated +unreleased +unrelenting +unrelentingly +unreliabilities +unreliability +unreliable +unreliably +unremarked +unreported +unrepresentable +unrepresented +unrequested +unrequited +unreserved +unreservedly +unreservedness +unresisted +unresisting +unresolved +unresponsive +unresponsively +unresponsiveness +unrest +unrestrained +unrestrainedly +unrestrainedness +unrestricted +unrestrictedly +unrestrictive +unreturned +unrevealing +unrifled +unrighteous +unrighteously +unrighteousness +unroll +unrolled +unrolling +unrolls +unromantically +unrotated +unruffled +unruled +unruliness +unruly +unsafe +unsafely +unsaid +unsalted +unsanitary +unsatisfactorily +unsatisfactory +unsatisfiability +unsatisfiable +unsatisfied +unsatisfying +unsaturated +unsaved +unscheduled +unschooled +unscientific +unscientifically +unscramble +unscrambled +unscrambler +unscrambles +unscrambling +unscratched +unscreened +unscrews +unscripted +unscrupulous +unscrupulously +unscrupulousness +unsealed +unseals +unseasonable +unseasonableness +unseasonably +unseasoned +unsecured +unseeded +unseeing +unseemly +unseen +unsegmented +unsegregated +unselected +unselfish +unselfishly +unselfishness +unsent +unserved +unserviced +unsettled +unsettledness +unsettling +unsettlingly +unshaded +unshakable +unshaken +unshared +unsharpened +unshaved +unshaven +unsheathing +unshelled +unsheltered +unshielded +unshod +unsigned +unsimplified +unsized +unskilled +unskillful +unskillfully +unskillfulness +unslings +unsloped +unslung +unsmiling +unsmilingly +unsnap +unsnapped +unsnapping +unsnaps +unsociability +unsociable +unsociableness +unsociably +unsocial +unsocially +unsolicited +unsolvable +unsolved +unsophisticated +unsophistication +unsorted +unsought +unsound +unsounded +unsoundly +unsoundness +unsparing +unsparingly +unspeakable +unspecified +unspent +unspoiled +unspoken +unspotted +unsprayed +unsprung +unstable +unstableness +unstably +unstacked +unstacks +unstained +unstapled +unstaring +unstated +unsteadily +unsteadiness +unsteady +unstemmed +unstinting +unstintingly +unstoppable +unstopped +unstrained +unstratified +unstreamed +unstressed +unstriped +unstructured +unstrung +unstuck +unsubscripted +unsubstantially +unsubstantiated +unsubstituted +unsuccessful +unsuccessfully +unsuffixed +unsuitability +unsuitable +unsuitably +unsuited +unsung +unsupportable +unsupported +unsure +unsurpassed +unsurprised +unsurprising +unsurprisingly +unsuspected +unsuspecting +unsuspended +unswerving +unsymmetrically +unsympathetic +untamed +untampered +untaped +untapped +untaught +untented +unterminated +untestable +untested +unthematic +unthinkable +unthinkably +unthinkingly +untidiness +untidy +untie +untied +unties +until +untimeliness +untimely +untitled +unto +untold +untouchable +untouchable's +untouchables +untouched +untoward +untowardly +untowardness +untraceable +untraced +untracked +untrained +untransformed +untranslated +untransposed +untreated +untried +untrod +untroubled +untrue +untruly +untrusted +untrustworthiness +untruth +untruthful +untruthfully +untruthfulness +untutored +untwisted +untying +untyped +unusable +unused +unusual +unusually +unusualness +unuttered +unvalued +unvarnished +unvarying +unveil +unveiled +unveiling +unveils +unventilated +unverified +unvisited +unvoiced +unwaged +unwanted +unwarily +unwarranted +unwashed +unwashedness +unwatched +unwavering +unwaveringly +unwearied +unweariedly +unweighed +unwelcome +unwept +unwholesome +unwholesomely +unwieldiness +unwieldy +unwilled +unwilling +unwillingly +unwillingness +unwind +unwinder +unwinders +unwinding +unwinds +unwinking +unwired +unwise +unwisely +unwiser +unwisest +unwitnessed +unwitting +unwittingly +unwonted +unwontedly +unwontedness +unworldliness +unworldly +unworn +unworthiness +unworthy +unwound +unwounded +unwoven +unwrap +unwrapped +unwrapping +unwraps +unwrinkled +unwritable +unwritten +unyielded +unyielding +unyieldingly +up +upbraid +upbraider +upbringing +upcoming +update +updated +updater +updates +updating +upfield +upgrade +upgraded +upgrades +upgrading +upheld +uphill +uphold +upholder +upholders +upholding +upholds +upholster +upholstered +upholsterer +upholsterers +upholstering +upholsters +upkeep +upland +uplander +uplands +uplift +uplifted +uplifter +uplifting +uplifts +upload +uploaded +uploading +uploads +upon +upper +uppermost +uppers +upright +uprightly +uprightness +uprising +uprising's +uprisings +uproar +uproot +uprooted +uprooter +uprooting +uproots +ups +upset +upsets +upsetting +upshot +upshot's +upshots +upside +upsides +upstairs +upstream +upturn +upturned +upturning +upturns +upward +upwardly +upwardness +upwards +urban +urchin +urchin's +urchins +urge +urged +urgent +urgently +urger +urges +urging +urgings +urinate +urinated +urinates +urinating +urination +urine +urn +urn's +urning +urns +us +usability +usable +usably +usage +usages +use +used +useful +usefully +usefulness +useless +uselessly +uselessness +user +user's +users +uses +usher +ushered +ushering +ushers +using +usual +usually +usualness +usurp +usurped +usurper +utensil +utensil's +utensils +utilities +utility +utility's +utmost +utopian +utopian's +utopians +utter +utterance +utterance's +utterances +uttered +utterer +uttering +utterly +uttermost +utters +uucp +uucp's +vacancies +vacancy +vacancy's +vacant +vacantly +vacantness +vacate +vacated +vacates +vacating +vacation +vacationed +vacationer +vacationers +vacationing +vacations +vacillate +vacillated +vacillates +vacillating +vacillatingly +vacillation +vacillations +vacillator +vacillator's +vacillators +vacuo +vacuous +vacuously +vacuousness +vacuum +vacuumed +vacuuming +vacuums +vagabond +vagabond's +vagabonds +vagaries +vagary +vagary's +vagina +vagina's +vaginas +vagrant +vagrantly +vagrants +vague +vaguely +vagueness +vaguer +vaguest +vainly +vale +vale's +valedictorian +valedictorian's +valence +valence's +valences +valentine +valentine's +valentines +vales +valet +valet's +valets +valiant +valiantly +valiantness +valid +validate +validated +validates +validating +validation +validations +validity +validly +validness +valley +valley's +valleys +valuable +valuableness +valuables +valuably +valuation +valuation's +valuations +valuator +valuators +value +valued +valuer +valuers +values +valuing +valve +valve's +valved +valves +valving +van +van's +vane +vane's +vaned +vanes +vanilla +vanish +vanished +vanisher +vanishes +vanishing +vanishingly +vanities +vanity +vanquish +vanquished +vanquisher +vanquishes +vanquishing +vans +vantage +vantages +variability +variable +variable's +variableness +variables +variably +variance +variance's +variances +variant +variantly +variants +variation +variation's +variations +varied +variedly +varier +varies +varieties +variety +variety's +various +variously +variousness +varnish +varnish's +varnished +varnisher +varnishers +varnishes +varnishing +vary +varying +varyingly +varyings +vase +vase's +vases +vassal +vassals +vast +vaster +vastest +vastly +vastness +vat +vat's +vats +vaudeville +vault +vaulted +vaulter +vaulting +vaults +vaunt +vaunted +vaunter +veal +vealer +vealing +vector +vector's +vectored +vectoring +vectors +veer +veered +veering +veeringly +veers +vegetable +vegetable's +vegetables +vegetarian +vegetarian's +vegetarians +vegetate +vegetated +vegetates +vegetating +vegetation +vegetative +vegetatively +vegetativeness +vehemence +vehement +vehemently +vehicle +vehicle's +vehicles +vehicular +veil +veiled +veiling +veils +vein +veined +veiner +veining +veins +velocities +velocity +velocity's +velvet +vend +vender +vending +vendor +vendor's +vendors +venerable +venerableness +vengeance +venison +venom +venomous +venomously +venomousness +vent +vented +venter +ventilate +ventilated +ventilates +ventilating +ventilation +ventilations +ventilative +venting +ventral +ventrally +ventricle +ventricle's +ventricles +vents +venture +ventured +venturer +venturers +ventures +venturing +venturings +veracity +veranda +veranda's +verandaed +verandas +verb +verb's +verbal +verbally +verbatim +verbose +verbosely +verboseness +verbs +verdict +verdicts +verdure +verdured +verge +verger +verges +verier +veriest +verifiability +verifiable +verifiableness +verification +verifications +verified +verifier +verifier's +verifiers +verifies +verify +verifying +verily +veritable +veritableness +vermin +versa +versatile +versatilely +versatileness +versatility +verse +versed +verser +verses +versing +version +versions +versus +vertebrate +vertebrate's +vertebrates +vertebration +vertex +vertexes +vertical +vertically +verticalness +verticals +vertices +very +vessel +vessel's +vessels +vest +vested +vestige +vestige's +vestiges +vestigial +vestigially +vesting +vests +veteran +veteran's +veterans +veterinarian +veterinarian's +veterinarians +veterinary +veto +vetoed +vetoer +vetoes +vetoing +vetting +vex +vexation +vexed +vexedly +vexes +vexing +vi +vi's +via +viability +viable +viably +vial +vial's +vials +vibrate +vibrated +vibrates +vibrating +vibration +vibrations +vice +vice's +viceroy +vices +vicing +vicinities +vicinity +vicious +viciously +viciousness +vicissitude +vicissitude's +vicissitudes +victim +victim's +victims +victor +victor's +victories +victorious +victoriously +victoriousness +victors +victory +victory's +victual +victuals +video +videos +videotape +videotape's +videotaped +videotapes +videotaping +vie +vied +vier +vies +view +viewable +viewed +viewer +viewers +viewing +viewings +viewpoint +viewpoint's +viewpoints +views +vigilance +vigilant +vigilante +vigilante's +vigilantes +vigilantly +vignette +vignette's +vignetted +vignetter +vignettes +vignetting +vigorous +vigorously +vigorousness +vii +viii +vile +vilely +vileness +viler +vilest +vilification +vilifications +vilified +vilifier +vilifies +vilify +vilifying +villa +villa's +village +village's +villager +villagers +villages +villain +villain's +villainous +villainously +villainousness +villains +villainy +villas +vindictive +vindictively +vindictiveness +vine +vine's +vinegar +vinegars +vines +vineyard +vineyard's +vineyards +vining +vintage +vintager +vintages +violate +violated +violates +violating +violation +violations +violative +violator +violator's +violators +violence +violent +violently +violet +violet's +violets +violin +violin's +violinist +violinist's +violinists +violins +viper +viper's +vipers +viral +virally +virgin +virgin's +virginity +virgins +virtual +virtually +virtue +virtue's +virtues +virtuoso +virtuoso's +virtuosos +virtuous +virtuously +virtuousness +virus +virus's +viruses +vis +visa +visaed +visage +visaged +visaing +visas +viscosities +viscosity +viscount +viscount's +viscounts +viscous +viscously +viscousness +visibilities +visibility +visible +visibleness +visibly +vision +vision's +visionariness +visionary +visioned +visioning +visions +visit +visitation +visitation's +visitations +visited +visiting +visitor +visitor's +visitors +visits +visor +visor's +visored +visors +vista +vista's +vistaed +vistas +visual +visually +visuals +vita +vitae +vital +vitality +vitally +vitals +vitamin +vitamin's +vitamins +vivid +vividly +vividness +vizier +vocabularies +vocabulary +vocal +vocally +vocals +vocation +vocation's +vocational +vocationally +vocations +vogue +voice +voiced +voicer +voicers +voices +voicing +void +voided +voider +voiding +voidness +voids +volatile +volatileness +volatiles +volatilities +volatility +volcanic +volcano +volcano's +volcanos +volley +volleyball +volleyball's +volleyballs +volleyed +volleyer +volleying +volleys +volt +voltage +voltages +volts +volume +volume's +volumed +volumes +voluming +voluntarily +voluntariness +voluntary +volunteer +volunteered +volunteering +volunteers +vomit +vomited +vomiter +vomiting +vomits +vortex +vortexes +vote +voted +voter +voters +votes +voting +votive +votively +votiveness +vouch +voucher +vouchers +vouches +vouching +vow +vowed +vowel +vowel's +vowels +vower +vowing +vows +voyage +voyaged +voyager +voyagers +voyages +voyaging +voyagings +vulgar +vulgarly +vulnerabilities +vulnerability +vulnerable +vulnerableness +vulture +vulture's +vultures +wade +waded +wader +waders +wades +wading +wafer +wafer's +wafered +wafering +wafers +waffle +waffle's +waffled +waffles +waffling +waft +wafter +wag +wage +waged +wager +wagered +wagerer +wagering +wagers +wages +waging +wagon +wagon's +wagons +wags +wail +wailed +wailer +wailing +wails +waist +waist's +waistcoat +waistcoat's +waistcoated +waistcoats +waisted +waister +waists +wait +waited +waiter +waiter's +waiters +waiting +waitress +waitress's +waitresses +waits +waive +waived +waiver +waiverable +waivers +waives +waiving +wake +waked +waken +wakened +wakener +wakening +waker +wakes +waking +walk +walkable +walked +walker +walkers +walking +walks +walkway +walkway's +walkways +wall +wall's +walled +waller +wallet +wallet's +wallets +walling +wallow +wallowed +wallower +wallowing +wallows +walls +walnut +walnut's +walnuts +walrus +walrus's +walruses +waltz +waltzed +waltzer +waltzes +waltzing +wan +wand +wander +wandered +wanderer +wanderers +wandering +wanderings +wanders +wane +waned +wanes +waning +wanly +wanness +want +wanted +wanter +wanting +wanton +wantoner +wantonly +wantonness +wants +war +war's +warble +warbled +warbler +warbles +warbling +ward +warded +warden +wardens +warder +warding +wardrobe +wardrobe's +wardrobes +wards +ware +warehouse +warehoused +warehouser +warehouses +warehousing +wares +warfare +warier +wariest +warily +wariness +waring +warlike +warm +warmed +warmer +warmers +warmest +warming +warmly +warmness +warms +warmth +warn +warned +warner +warning +warningly +warnings +warns +warp +warp's +warped +warper +warping +warps +warrant +warranted +warranter +warranties +warranting +warrants +warranty +warranty's +warred +warring +warrior +warrior's +warriors +wars +warship +warship's +warships +wart +wart's +warted +warts +wary +was +wash +washed +washer +washers +washes +washing +washings +wasn't +wasp +wasp's +wasps +waste +wasted +wasteful +wastefully +wastefulness +waster +wastes +wasting +wastingly +watch +watched +watcher +watchers +watches +watchful +watchfully +watchfulness +watching +watchings +watchman +watchword +watchword's +watchwords +water +watered +waterer +waterfall +waterfall's +waterfalls +wateriness +watering +waterings +waterproof +waterproofed +waterproofer +waterproofing +waterproofness +waterproofs +waters +waterway +waterway's +waterways +watery +wave +waved +waveform +waveform's +waveforms +wavefront +wavefront's +wavefronts +wavelength +wavelengths +waver +wavered +waverer +wavering +waveringly +wavers +waves +waving +wax +waxed +waxen +waxer +waxers +waxes +waxier +waxiness +waxing +waxy +way +way's +ways +wayside +waysides +wayward +waywardly +waywardness +we +we'd +we'll +we're +we've +weak +weaken +weakened +weakener +weakening +weakens +weaker +weakest +weakliness +weakly +weakness +weakness's +weaknesses +wealth +wealthier +wealthiest +wealthiness +wealths +wealthy +wean +weaned +weaner +weaning +weapon +weapon's +weaponed +weapons +wear +wearable +wearer +wearied +wearier +wearies +weariest +wearily +weariness +wearing +wearingly +wearisome +wearisomely +wearisomeness +wears +weary +wearying +weasel +weasel's +weasels +weather +weathercock +weathercock's +weathercocks +weathered +weatherer +weathering +weatherly +weathers +weave +weaver +weavers +weaves +weaving +web +web's +weber +webs +wed +wedded +wedding +wedding's +weddings +wedge +wedged +wedges +wedging +weds +wee +weed +weeded +weeder +weeding +weeds +week +week's +weekday +weekday's +weekdays +weekend +weekend's +weekender +weekends +weeklies +weekly +weeks +weep +weeped +weeper +weepers +weeping +weeps +weigh +weighed +weigher +weighing +weighings +weighs +weight +weighted +weighter +weighting +weightings +weights +weird +weirdly +weirdness +welcome +welcomed +welcomely +welcomeness +welcomer +welcomes +welcoming +weld +welded +welder +welders +welding +weldings +welds +welfare +well +welled +welling +wellness +wells +wench +wench's +wencher +wenches +went +wept +were +weren't +west +wester +westered +westering +westerlies +westerly +western +westerner +westerners +westing +westward +westwards +wet +wetly +wetness +wets +wetted +wetter +wettest +wetting +whack +whacked +whacker +whacking +whacks +whale +whaler +whales +whaling +whammies +whammy +wharf +wharfs +wharves +what +what's +whatchamacallit +whatchamacallit's +whatchamacallits +whatever +whatsoever +wheat +wheaten +wheel +wheeled +wheeler +wheelers +wheeling +wheelings +wheels +whelp +when +whence +whenever +whens +where +where's +whereabouts +whereas +whereby +wherein +whereupon +wherever +whether +whew +whey +which +whichever +while +whiled +whiles +whiling +whilst +whim +whim's +whimper +whimpered +whimpering +whimpers +whims +whimsical +whimsically +whimsicalness +whimsied +whimsies +whimsy +whimsy's +whine +whined +whiner +whines +whining +whiningly +whip +whip's +whipped +whipper +whipper's +whippers +whipping +whipping's +whippings +whips +whirl +whirled +whirler +whirling +whirlpool +whirlpool's +whirlpools +whirls +whirlwind +whirr +whirring +whisk +whisked +whisker +whiskered +whiskers +whiskey +whiskey's +whiskeys +whisking +whisks +whisper +whispered +whisperer +whispering +whisperingly +whisperings +whispers +whistle +whistled +whistler +whistlers +whistles +whistling +whit +white +whited +whitely +whiten +whitened +whitener +whiteners +whiteness +whitening +whitens +whiter +whites +whitespace +whitest +whitewash +whitewashed +whitewasher +whitewashing +whiting +whittle +whittled +whittler +whittles +whittling +whittlings +whiz +whizzed +whizzes +whizzing +who +who's +whoever +whole +wholehearted +wholeheartedly +wholeness +wholes +wholesale +wholesaled +wholesaler +wholesalers +wholesales +wholesaling +wholesome +wholesomely +wholesomeness +wholly +whom +whomever +whoop +whooped +whooper +whooping +whoops +whore +whore's +whores +whoring +whorl +whorl's +whorled +whorls +whose +why +wick +wicked +wickedly +wickedness +wicker +wicking +wicks +wide +widely +widen +widened +widener +wideness +widening +widens +wider +widespread +widest +widget +widget's +widgets +widow +widowed +widower +widowers +widows +width +widths +wield +wielded +wielder +wielding +wields +wife +wife's +wifeliness +wifely +wig +wig's +wigs +wigwam +wild +wildcat +wildcat's +wildcats +wilder +wilderness +wildest +wilding +wildly +wildness +wile +wiled +wiles +wilier +wiliness +wiling +will +willed +willer +willful +willfully +willfulness +willing +willingly +willingness +willings +willow +willow's +willower +willows +wills +wilt +wilted +wilting +wilts +wily +win +wince +winced +winces +wincing +wind +winded +winder +winders +windier +windiness +winding +windmill +windmill's +windmilling +windmills +window +window's +windowed +windowing +windows +winds +windy +wine +wined +winer +winers +wines +wing +winged +winger +wingers +winging +wings +wining +wink +winked +winker +winking +winks +winner +winner's +winners +winning +winningly +winnings +wins +winter +wintered +winterer +wintering +winterly +winters +wintrier +wintriness +wintry +wipe +wiped +wiper +wipers +wipes +wiping +wire +wired +wireless +wirer +wires +wiretap +wiretap's +wiretaps +wirier +wiriness +wiring +wirings +wiry +wisdom +wisdoms +wise +wised +wisely +wiseness +wiser +wises +wisest +wish +wished +wisher +wishers +wishes +wishful +wishfully +wishfulness +wishing +wising +wisp +wisp's +wisps +wistful +wistfully +wistfulness +wit +wit's +witch +witchcraft +witches +witching +with +withal +withdraw +withdrawal +withdrawal's +withdrawals +withdrawer +withdrawing +withdrawn +withdrawnness +withdraws +withdrew +wither +withered +withering +witheringly +withers +withheld +withhold +withholder +withholders +withholding +withholdings +withholds +within +without +withstand +withstanding +withstands +withstood +witness +witnessed +witnesses +witnessing +wits +wittier +wittiest +wittiness +witty +wives +wizard +wizard's +wizardly +wizards +woe +woeful +woefully +woeness +woke +woken +wolf +wolfer +wolves +woman +woman's +womanhood +womanliness +womanly +womb +womb's +wombed +wombs +women +women's +womens +won't +wonder +wondered +wonderer +wonderful +wonderfully +wonderfulness +wondering +wonderingly +wonderland +wonderland's +wonderment +wonders +wondrous +wondrously +wondrousness +wont +wonted +wontedly +wontedness +wonting +woo +wood +wood's +woodchuck +woodchuck's +woodchucks +woodcock +woodcock's +woodcocks +wooded +wooden +woodenly +woodenness +woodier +woodiness +wooding +woodland +woodlander +woodman +woodpecker +woodpecker's +woodpeckers +woods +woodser +woodwork +woodworker +woodworking +woody +wooed +wooer +woof +woofed +woofer +woofers +woofing +woofs +wooing +wool +wooled +woolen +woolens +woollier +woollies +woolliness +woolly +wools +wooly +woos +word +word's +worded +wordier +wordily +wordiness +wording +wordings +words +wordy +wore +work +workable +workableness +workably +workaround +workaround's +workarounds +workbench +workbench's +workbenches +workbook +workbook's +workbooks +worked +worker +worker's +workers +workhorse +workhorse's +workhorses +working +workingman +workings +workload +workloads +workman +workmanly +workmanship +workmen +workmen's +works +workshop +workshop's +workshops +workspace +workspaces +workstation +workstation's +workstations +world +world's +worlders +worldliness +worldly +worlds +worldwide +worm +wormed +wormer +worming +worms +worn +worried +worriedly +worrier +worriers +worries +worrisome +worrisomely +worrisomeness +worry +worrying +worryingly +worse +worser +worship +worshipful +worshipfully +worshipfulness +worships +worst +worsted +worth +worthier +worthies +worthiest +worthiness +worthing +worthless +worthlessly +worthlessness +worths +worthwhile +worthwhileness +worthy +would +wouldest +wouldn't +wound +wounded +wounding +wounds +wove +woven +wrangle +wrangled +wrangler +wranglers +wrangles +wrangling +wrap +wrap's +wrapped +wrapper +wrapper's +wrappers +wrapping +wrappings +wraps +wrath +wreak +wreaks +wreath +wreathed +wreathes +wreathing +wreck +wreckage +wrecked +wrecker +wreckers +wrecking +wrecks +wren +wren's +wrench +wrenched +wrenches +wrenching +wrenchingly +wrens +wrest +wrested +wrester +wresting +wrestle +wrestled +wrestler +wrestles +wrestling +wrestlings +wrests +wretch +wretched +wretchedly +wretchedness +wretches +wriggle +wriggled +wriggler +wriggles +wriggling +wring +wringer +wringing +wrings +wrinkle +wrinkled +wrinkles +wrinkling +wrist +wrist's +wrists +wristwatch +wristwatch's +wristwatches +writ +writ's +writable +write +writer +writer's +writers +writes +writhe +writhed +writhes +writhing +writing +writings +writs +written +wrong +wronged +wronger +wrongest +wronging +wrongly +wrongness +wrongs +wrote +wrought +wrung +xi +xii +xiii +xiv +xix +xv +xvi +xvii +xviii +xx +yacc +yacc's +yank +yanked +yanking +yanks +yard +yard's +yarded +yarding +yards +yardstick +yardstick's +yardsticks +yarn +yarn's +yarned +yarning +yarns +yawn +yawner +yawning +yawningly +yawns +yea +yeah +year +year's +yearly +yearn +yearned +yearner +yearning +yearningly +yearnings +yearns +years +yeas +yeast +yeast's +yeasts +yecch +yell +yelled +yeller +yelling +yellow +yellowed +yellower +yellowest +yellowing +yellowish +yellowness +yellows +yells +yelp +yelped +yelper +yelping +yelps +yeoman +yeomanly +yeomen +yes +yeses +yesterday +yesterday's +yesterdays +yet +yield +yielded +yielder +yielding +yields +yoke +yoke's +yokes +yoking +yon +yonder +you +you'd +you'll +you're +you've +young +younger +youngest +youngly +youngness +youngster +youngster's +youngsters +your +your's +yours +yourself +yourselves +youth +youth's +youthes +youthful +youthfully +youthfulness +yuck +yummier +yummy +yuppie +yuppie's +yuppies +zap +zapped +zapping +zaps +zeal +zealous +zealously +zealousness +zebra +zebra's +zebras +zenith +zero +zeroed +zeroes +zeroing +zeros +zeroth +zest +zigzag +zinc +zinc's +zodiac +zodiacs +zonal +zonally +zone +zoned +zonely +zoner +zones +zoning +zoo +zoo's +zoological +zoologically +zoom +zoomed +zooming +zooms +zoos +acclimatization +acclimatization's +acclimatizations +acclimatized +accouterment +accouterment's +accouterments +acknowledgment +acknowledgment's +acknowledgments +actualization +actualization's +actualizations +aerosolize +aerosolized +agonize +agonized +agonizedlies +agonizedly +agonizer +agonizers +agonizes +agonizing +agonizingly +airfoil +airfoils +airplane +airplane's +airplanes +alphabetize +alphabetized +alphabetizer +alphabetizers +alphabetizes +alphabetizing +aluminum +aluminum's +aluminums +amenorrhea +amortize +amortized +amortizes +amortizing +amphitheater +amphitheater's +amphitheaters +analog +analog's +analogs +analyzable +analyze +analyzed +analyzer +analyzers +analyzes +analyzing +anemia +anemia's +anemias +anemic +anemics +anesthesia +anesthesia's +anesthesias +anesthetic +anesthetic's +anesthetically +anesthetics +anesthetize +anesthetized +anesthetizer +anesthetizer's +anesthetizers +anesthetizes +anesthetizing +anodize +anodized +anodizes +anodizing +antagonize +antagonized +antagonizer +antagonizers +antagonizes +antagonizing +apologize +apologized +apologizer +apologizers +apologizes +apologizing +appall +appalls +appareled +appetizer +appetizing +appetizingly +arbor +arbor's +arbored +arbors +archaize +archaized +archaizer +archaizers +archaizes +archaizing +ardor +ardor's +ardors +arithmetize +arithmetized +arithmetizes +armor +armor's +armored +armorer +armorer's +armorers +armoried +armories +armoring +armors +armory +armory's +atomization +atomization's +atomizations +atomize +atomized +atomizer +atomizers +atomizes +atomizing +authorization +authorization's +authorizations +authorize +authorized +authorizer +authorizers +authorizes +authorizing +autodialer +axiomatization +axiomatization's +axiomatizations +axiomatize +axiomatized +axiomatizes +axiomatizing +balkanize +balkanized +balkanizing +baptize +baptized +baptizer +baptizers +baptizes +baptizing +barreled +barreling +bastardize +bastardized +bastardizes +bastardizing +bedeviled +bedeviling +behavior +behavior's +behavioral +behaviorally +behaviored +behaviorism +behaviorism's +behaviorisms +behavioristic +behavioristics +behaviors +behoove +behoove's +behooved +behooves +behooving +behooving's +behoovingly +behoovings +belabor +belabor's +belabored +belaboring +belabors +beveled +beveling +bevelings +bowdlerize +bowdlerized +bowdlerizer +bowdlerizes +bowdlerizing +brutalize +brutalized +brutalizes +brutalizing +burglarize +burglarized +burglarizes +burglarizing +busheled +busheling +bushelings +caliber +calibers +canaled +canaling +canceled +cancelled +canceler +canceling +candor +candor's +candors +cannibalize +cannibalized +cannibalizes +cannibalizing +canonicalization +canonicalize +canonicalized +canonicalizes +canonicalizing +capitalization +capitalization's +capitalizations +capitalize +capitalized +capitalizer +capitalizers +capitalizes +capitalizing +carbonization +carbonization's +carbonizations +carbonize +carbonized +carbonizer +carbonizers +carbonizes +carbonizing +catalog +catalog's +cataloged +cataloger +cataloging +catalogs +categorization +categorization's +categorizations +categorize +categorized +categorizer +categorizers +categorizes +categorizing +center +center's +centered +centerer +centerers +centering +centerings +centerpiece +centerpiece's +centerpieces +centers +centimeter +centimeter's +centimeters +centralization +centralization's +centralizations +centralize +centralized +centralizer +centralizers +centralizes +centralizing +channeled +channeler +channeler's +channelers +channeling +characterizable +characterizable's +characterizables +characterization +characterization's +characterizations +characterize +characterized +characterizer +characterizers +characterizes +characterizing +checkbook +checkbook's +checkbooks +chiseled +chiseler +chiselers +civilization +civilization's +civilizations +civilize +civilized +civilizedness +civilizer +civilizers +civilizes +civilizing +clamor +clamored +clamorer +clamorer's +clamorers +clamoring +clamors +cognizance +cognizant +colonization +colonization's +colonizations +colonize +colonized +colonizer +colonizers +colonizes +colonizing +color +color's +colored +coloreds +colorer +colorer's +colorers +colorful +colorfully +colorfulness +coloring +colorings +colorless +colorlessly +colorlessness +colors +columnize +columnized +columnizes +columnizing +compartmentalize +compartmentalized +compartmentalizes +compartmentalizing +computerize +computerized +computerizes +computerizing +conceptualization +conceptualization's +conceptualizations +conceptualize +conceptualized +conceptualizer +conceptualizes +conceptualizing +counseled +counseling +counselor +counselor's +counselors +criticize +criticized +criticizer +criticizers +criticizes +criticizing +criticizinglies +criticizingly +crystallize +crystallized +crystallizer +crystallizers +crystallizes +crystallizing +customizable +customization +customization's +customizations +customize +customized +customizer +customizers +customizes +customizing +decentralization +decentralization's +decentralizations +decentralized +defense +defense's +defensed +defenseless +defenselessly +defenselessness +defenses +defensing +demeanor +demeanor's +demeanors +demoralize +demoralized +demoralizer +demoralizers +demoralizes +demoralizing +demoralizingly +dialed +dialer +dialers +dialing +dialings +dichotomize +dichotomized +dichotomizes +dichotomizing +digitize +digitized +digitizer +digitizer's +digitizers +digitizes +digitizing +dishonor +dishonored +dishonorer +dishonorer's +dishonorers +dishonoring +dishonors +disorganized +draftsman +dueled +dueler +duelers +dueling +duelings +economize +economized +economizer +economizers +economizes +economizing +editorialize +editorialized +editorializer +editorializes +editorializing +enameled +enameler +enamelers +enameling +enamelings +endeavor +endeavor's +endeavored +endeavorer +endeavorer's +endeavorers +endeavoring +endeavors +enroll +enrollment +enrollment's +enrollments +enrolls +epitomize +epitomized +epitomizer +epitomizers +epitomizes +epitomizing +equaled +equaling +equalization +equalization's +equalizations +equalize +equalized +equalizer +equalizer's +equalizers +equalizes +equalizing +equalizings +esthetic +esthetic's +esthetically +esthetics +eviler +evilest +factorization +factorization's +factorizations +familiarization +familiarization's +familiarizations +familiarize +familiarized +familiarizer +familiarizers +familiarizes +familiarizing +familiarizingly +fantasize +fantasized +fantasizer +fantasizes +fantasizing +favor +favor's +favorable +favorable's +favorableness +favorables +favorably +favored +favored's +favoredly +favoredness +favoreds +favorer +favorer's +favorers +favoring +favoring's +favoringly +favorings +favorite +favorite's +favorites +favors +fertilization +fertilization's +fertilizations +fertilize +fertilized +fertilizer +fertilizers +fertilizes +fertilizing +fervor +fervor's +fervors +fiber +fiber's +fibered +fiberglass +fibers +finalization +finalizations +finalize +finalized +finalizes +finalizing +flavor +flavor's +flavored +flavorer +flavorer's +flavorers +flavoring +flavorings +flavors +formalization +formalization's +formalizations +formalize +formalized +formalizer +formalizers +formalizes +formalizing +fueled +fueler +fuelers +fueling +fulfill +fulfillment +fulfillment's +fulfillments +fulfills +funneled +funneling +generalization +generalization's +generalizations +generalize +generalized +generalizer +generalizers +generalizes +generalizing +glamorize +glamorized +glamorizer +glamorizers +glamorizes +glamorizing +gospeler +gospelers +gossiped +gossiping +gram +gram's +grams +graveled +graveling +groveled +groveler +grovelers +groveling +grovelingly +harbor +harbor's +harbored +harborer +harborer's +harborers +harboring +harbors +harmonize +harmonized +harmonizer +harmonizers +harmonizes +harmonizing +honor +honorable +honorable's +honorableness +honorables +honorablies +honorably +honored +honorer +honorer's +honorers +honoring +honors +hospitalize +hospitalized +hospitalizes +hospitalizing +humor +humor's +humored +humorer +humorers +humoring +humors +hypothesize +hypothesized +hypothesizer +hypothesizers +hypothesizes +hypothesizing +idealization +idealization's +idealizations +idealize +idealized +idealizer +idealizers +idealizes +idealizing +imperiled +incognizance +incognizant +individualize +individualized +individualizer +individualizers +individualizes +individualizing +individualizingly +industrialization +industrialization's +industrializations +informalizes +initialed +initialer +initialing +initialization +initialization's +initializations +initialize +initialized +initializer +initializers +initializes +initializing +institutionalize +institutionalized +institutionalizes +institutionalizing +internalization +internalization's +internalizations +internalize +internalized +internalizes +internalizing +italicize +italicized +italicizes +italicizing +itemization +itemization's +itemizations +itemize +itemized +itemizer +itemizers +itemizes +itemizing +jeopardize +jeopardized +jeopardizes +jeopardizing +jeweled +jeweler +jewelers +jeweling +journalize +journalized +journalizer +journalizers +journalizes +journalizing +judgment +judgment's +judgments +kidnaped +kidnaper +kidnaper's +kidnapers +kidnaping +kidnaping's +kidnapings +kilogram +kilogram's +kilograms +kilometer +kilometer's +kilometers +labeled +labeler +labeler's +labelers +labeling +labor +labored +labored's +laboredly +laboredness +laborer +laborer's +laborers +laboring +laboring's +laboringly +laborings +labors +laureled +legalization +legalization's +legalizations +legalize +legalized +legalizes +legalizing +leveled +leveler +levelers +levelest +leveling +liberalize +liberalized +liberalizer +liberalizers +liberalizes +liberalizing +license's +linearizable +linearize +linearized +linearizes +linearizing +linearizion +liter +liters +localization +localization's +localizations +localize +localized +localizer +localizers +localizes +localizing +luster +lustered +lustering +lusters +magnetization +magnetization's +magnetizations +maneuver +maneuvered +maneuverer +maneuvering +maneuvers +marveled +marveling +marvelous +marvelously +marvelousness +materialize +materialized +materializer +materializers +materializes +materializing +maximize +maximized +maximizer +maximizers +maximizes +maximizing +mechanization +mechanization's +mechanizations +mechanize +mechanized +mechanizer +mechanizers +mechanizes +mechanizing +medaled +medaling +memorization +memorization's +memorizations +memorize +memorized +memorizer +memorizers +memorizes +memorizing +metaled +metaling +millimeter +millimeter's +millimeters +miniaturization +miniaturizations +miniaturize +miniaturized +miniaturizes +miniaturizing +minimization +minimization's +minimizations +minimize +minimized +minimizer +minimizers +minimizes +minimizing +misjudgment +misjudgment's +misjudgments +miter +mitered +miterer +mitering +modeled +modeler +modelers +modeling +modelings +modernize +modernized +modernizer +modernizers +modernizes +modernizing +modularization +modularize +modularized +modularizes +modularizing +motorize +motorized +motorizes +motorizing +multileveled +mustache +mustached +mustaches +nationalization +nationalization's +nationalizations +nationalize +nationalized +nationalizer +nationalizers +nationalizes +nationalizing +naturalization +naturalization's +naturalizations +neighbor +neighbor's +neighbored +neighborer +neighborer's +neighborers +neighborhood +neighborhood's +neighborhoods +neighboring +neighborings +neighborliness +neighborly +neighbors +neutralize +neutralized +neutralizer +neutralizers +neutralizes +neutralizing +nickeled +nickeling +normalization +normalization's +normalizations +normalize +normalized +normalizer +normalizers +normalizes +normalizing +notarize +notarized +notarizes +notarizing +odor +odor's +odored +odors +offense +offense's +offenses +optimization +optimization's +optimizations +optimize +optimized +optimizer +optimizer's +optimizers +optimizes +optimizing +organizable +organizable's +organizables +organization +organization's +organizational +organizational's +organizationally +organizationals +organizations +organize +organized +organizer +organizers +organizes +organizing +oxidize +oxidized +oxidizer +oxidizers +oxidizes +oxidizing +oxidizings +pajama +pajama's +pajamaed +pajamas +paneled +paneling +panelings +paralleled +paralleling +parallelization +parallelization's +parallelizations +parallelize +parallelized +parallelizer +parallelizers +parallelizes +parallelizing +paralyze +paralyzed +paralyzedlies +paralyzedly +paralyzer +paralyzer's +paralyzers +paralyzes +paralyzing +paralyzinglies +paralyzingly +parameterizable +parameterization +parameterization's +parameterizations +parameterize +parameterized +parameterizes +parameterizing +parceled +parceling +parenthesized +parlor +parlor's +parlors +patronize +patronized +patronizer +patronizers +patronizes +patronizing +patronizing's +patronizingly +patronizings +penalize +penalized +penalizes +penalizing +penciled +penciling +pencilings +personalization +personalization's +personalizations +personalize +personalized +personalizes +personalizing +petaled +philosophize +philosophized +philosophizer +philosophizers +philosophizes +philosophizing +plow +plowed +plower +plowing +plowman +plows +pluralization +pluralization's +pluralizations +pluralize +pluralized +pluralizer +pluralizers +pluralizes +pluralizing +polarization +polarization's +polarizations +popularization +popularization's +popularizations +popularize +popularized +popularizer +popularizers +popularizes +popularizing +practiced +practicer +practicing +preinitialize +preinitialized +preinitializes +preinitializing +pressurize +pressurized +pressurizer +pressurizers +pressurizes +pressurizing +pretense +pretenses +pretension +pretensions +pretensive +prioritize +prioritized +prioritizer +prioritizers +prioritizes +prioritizing +prioritizings +productize +productized +productizer +productizers +productizes +productizing +proselytize +proselytized +proselytizer +proselytizers +proselytizes +proselytizing +publicize +publicized +publicizes +publicizing +pulverize +pulverized +pulverizer +pulverizers +pulverizes +pulverizing +quantization +quantization's +quantizations +quantize +quantized +quantizer +quantizer's +quantizers +quantizes +quantizing +quarreled +quarreler +quarrelers +quarreling +queuing +randomize +randomized +randomizer +randomizes +randomizing +rationalize +rationalized +rationalizer +rationalizers +rationalizes +rationalizing +reacclimatization +reacclimatization's +reacclimatizations +reacknowledgment +reacknowledgment's +reacknowledgments +reactualization +reactualization's +reactualizations +reanalyze +reanalyzed +reanalyzer +reanalyzers +reanalyzes +reanalyzing +reapologizes +reauthorization +reauthorization's +reauthorizations +reauthorizes +rebrutalizes +recapitalization +recapitalization's +recapitalizations +recapitalized +recapitalizes +recarbonization +recarbonization's +recarbonizations +recarbonizer +recarbonizers +recarbonizes +recategorized +recentralization +recentralization's +recentralizations +recentralizes +recivilization +recivilization's +recivilizations +recivilizes +recognizability +recognizable +recognizably +recognizance +recognize +recognized +recognizedlies +recognizedly +recognizer +recognizers +recognizes +recognizing +recognizinglies +recognizingly +recolonization +recolonization's +recolonizations +recolonizes +recolored +recolors +reconceptualizing +recriticizes +recrystallized +recrystallizes +redialed +refavors +refertilization +refertilization's +refertilizations +refertilizes +refueled +refueling +reharmonizes +rehonors +reinitialize +reinitialized +reinitializes +reinitializing +reitemizes +relabeled +relabeler +relabelers +relabeling +remagnetization +remagnetization's +remagnetizations +rematerializes +rememorizes +remodeled +remodeling +renormalized +renormalizes +reorganization +reorganization's +reorganizations +reorganize +reorganized +reorganizer +reorganizers +reorganizes +reorganizing +reoxidizes +repatronizes +reprogram +reprograms +repulverizes +resepulchers +restandardization +restandardization's +restandardizations +restandardizes +resterilizes +resymbolization +resymbolization's +resymbolizations +resymbolizes +resynchronizations +resynchronized +resynchronizes +resynthesizes +retranquilizes +reutilization +reutilizes +reveled +reveler +revelers +reveling +revelings +revisualizes +revolutionize +revolutionized +revolutionizer +revolutionizers +revolutionizes +revolutionizing +rigor +rigor's +rigors +rivaled +rivaling +ruble +ruble's +rubles +rumor +rumor's +rumored +rumorer +rumorer's +rumorers +rumoring +rumors +saber +saber's +sabered +sabering +sabers +sanitize +sanitized +sanitizer +sanitizes +sanitizing +savior +savior's +saviors +savor +savored +savorer +savorer's +savorers +savorier +savories +savoriest +savoriness +savoring +savoringlies +savoringly +savors +savory +savory's +scepter +scepter's +sceptered +sceptering +scepters +scrutinize +scrutinized +scrutinizer +scrutinizers +scrutinizes +scrutinizing +scrutinizinglies +scrutinizingly +sepulcher +sepulcher's +sepulchered +sepulchers +sequentialize +sequentialized +sequentializes +sequentializing +serialization +serialization's +serializations +serialize +serialized +serializes +serializing +shoveled +shoveler +shovelers +shoveling +shriveled +shriveling +signaled +signaler +signalers +signaling +siphon +siphon's +siphoned +siphoning +siphons +socialize +socialized +socializer +socializes +socializing +specialization +specialization's +specializations +specialize +specialized +specializer +specializers +specializes +specializing +specialties +specialty +specialty's +specter +specter's +spectered +specters +spiraled +spiraling +splendor +splendor's +splendors +squirreled +squirreling +stabilize +stabilized +stabilizer +stabilizers +stabilizes +stabilizing +standardization +standardization's +standardizations +standardize +standardized +standardizer +standardizers +standardizes +standardizing +stenciled +stenciler +stencilers +stenciling +sterilization +sterilization's +sterilizations +sterilize +sterilized +sterilizer +sterilizers +sterilizes +sterilizing +stylized +subsidize +subsidized +subsidizer +subsidizers +subsidizes +subsidizing +succor +succored +succorer +succorer's +succorers +succoring +succors +summarization +summarization's +summarizations +summarize +summarized +summarizer +summarizers +summarizes +summarizing +symboled +symboling +symbolization +symbolization's +symbolizations +symbolize +symbolized +symbolizer +symbolizers +symbolizes +symbolizing +sympathize +sympathized +sympathizer +sympathizers +sympathizes +sympathizing +sympathizing's +sympathizingly +sympathizings +synchronization +synchronization's +synchronizations +synchronize +synchronized +synchronizer +synchronizers +synchronizes +synchronizing +synthesize +synthesized +synthesizer +synthesizers +synthesizes +synthesizing +systematize +systematized +systematizer +systematizers +systematizes +systematizing +tantalize +tantalized +tantalizer +tantalizers +tantalizes +tantalizing +tantalizinglies +tantalizingly +tantalizingness +tantalizingnesses +terrorize +terrorized +terrorizer +terrorizers +terrorizes +terrorizing +theater +theater's +theaters +theorization +theorization's +theorizations +theorize +theorized +theorizer +theorizers +theorizes +theorizing +tire's +titer +titers +totaled +totaler +totaler's +totalers +totaling +toweled +toweling +towelings +tranquilize +tranquilized +tranquilizer +tranquilizer's +tranquilizers +tranquilizes +tranquilizing +tranquilizing's +tranquilizingly +tranquilizings +transistorize +transistorized +transistorizes +transistorizing +traveled +traveler +traveler's +travelers +traveling +travelings +trivialize +trivialized +trivializes +trivializing +troweler +trowelers +tumor +tumor's +tumored +tumors +tunneled +tunneler +tunnelers +tunneling +tunnelings +unacclimatized +unamortized +unanalyzable +unanalyzed +unantagonized +unantagonizing +unapologizing +unappetizing +unappetizingly +unarmored +unauthorized +unauthorizedly +unauthorizedness +unauthorizes +unbaptized +unbaptizes +unbastardized +unbrutalized +unbrutalizes +uncanceled +uncapitalized +uncategorized +uncharacterized +uncivilized +uncivilizedly +uncivilizedness +uncivilizes +uncolonized +uncolonizes +uncolored +uncoloredly +uncoloredness +uncoloreds +uncriticized +uncriticizing +uncriticizingly +uncrystallized +undefenses +undishonored +undisorganized +uneconomizing +unendeavored +unepitomized +unequaled +unequalized +unequalizes +unfamiliarized +unfavorable +unfavorable's +unfavorableness +unfavorables +unfavorably +unfavored +unfavored's +unfavorings +unfavorite +unfavorite's +unfavorites +unfertilized +unflavored +unformalized +ungeneralized +unharmonized +unharmonizes +unhonorables +unhonorablies +unhonorably +unhonored +unhumored +unidealized +unindividualized +unindividualizes +uninitialized +unionization +unionize +unionized +unionizer +unionizers +unionizes +unionizing +unitalicized +unitemized +unjournalized +unlabeled +unlabored +unlabored's +unlaborings +unlegalized +unleveled +unleveling +unliberalized +unlocalized +unlocalizes +unmechanized +unmechanizes +unmemorized +unminimized +unmodernized +unmodernizes +unmotorized +unnationalized +unneighbored +unneighborliness +unneighborly +unneutralized +unnormalized +unnormalizes +unoptimized +unoptimizes +unorganizable +unorganizable's +unorganizables +unorganized +unorganizedly +unorganizedness +unoxidized +unparalleled +unparameterized +unparceled +unpatronized +unpatronizing's +unpenalized +unphilosophized +unphilosophizes +unpopularizes +unpracticed +unpulverized +unpulverizes +unraveled +unraveling +unrecognizable +unrecognized +unrecognizing +unrecognizingly +unreorganized +unrivaled +unrumored +unsabered +unsavored +unsavoredly +unsavoredness +unscepters +unscrutinized +unscrutinizing +unscrutinizingly +unsepulchers +unsiphons +unsocialized +unspecialized +unspecializing +unstandardized +unsterilized +unsubsidized +unsuccored +unsummarized +unsymbolized +unsympathized +unsympathizing +unsympathizing's +unsympathizingly +unsympathizings +unsynchronized +unsynthesized +unsystematized +unsystematizedly +unsystematizing +untantalized +unterrorized +untranquilized +unverbalized +unvictimized +unvisualized +unwomanized +unwomanizes +utilization +utilize +utilized +utilizer +utilizers +utilizes +utilizing +valor +valor's +valors +vandalize +vandalized +vandalizes +vandalizing +vapor +vapor's +vapored +vaporer +vaporer's +vaporers +vaporing +vaporing's +vaporingly +vaporings +vapors +vectorization +vectorizing +verbalize +verbalized +verbalizer +verbalizers +verbalizes +verbalizing +victimize +victimized +victimizer +victimizers +victimizes +victimizing +victualer +victualers +vigor +vigor's +vigors +visualize +visualized +visualizer +visualizers +visualizes +visualizing +wagoner +wagoner's +wagoners +weaseled +weaseling +womanize +womanized +womanizer +womanizers +womanizes +womanizing +worshiped +worshiper +worshiper's +worshipers +worshiping +Christianizing +Europeanization +Europeanization's +Europeanizations +Europeanized +Sanskritize +acclimatize +acclimatizer +acclimatizers +acclimatizes +acclimatizing +actualize +actualized +actualizes +actualizing +aggrandizement +aggrandizement's +aggrandizements +americanized +amortization +amortization's +amortizations +animized +annualized +asshole +asshole's +assholes +balkanization +biosynthesized +bucketfuls +bureaucratization +bureaucratization's +bureaucratizations +caliper +calipers +cancelate +cancelated +canonized +cauterize +cauterized +cauterizes +cauterizing +caviler +cavilers +centerline +centerlines +civilizational +civilizational's +civilizationals +cognizable +colorimeter +colorimeter's +colorimeters +colorimetry +commercialization +commercialization's +commercializations +communize +communized +communizes +communizing +computerization +conventionalized +crystallization +crystallization's +crystallizations +decentralizing +deemphasize +deemphasized +deemphasizer +deemphasizers +deemphasizes +deemphasizing +deglycerolized +dehumanize +dehumanized +dehumanizes +dehumanizing +demineralization +demineralization's +demineralizations +democratization +democratization's +democratizations +democratize +democratized +democratizer +democratizes +democratizing +demoralization +demoralization's +demoralizations +demythologization +demythologize +demythologized +demythologizer +demythologizes +demythologizing +depersonalization +depersonalization's +depersonalizations +depersonalized +deputized +destabilize +destabilized +destabilizes +destabilizing +destigmatization +desynchronize +desynchronized +desynchronizes +desynchronizing +detribalize +detribalized +detribalizes +detribalizing +diagonalizable +dialyzed +diarrhea +diarrhea's +diarrheal +diarrheas +dichotomization +digitalization +digitalization's +digitalizations +digitization +diopter +discolored +discolored's +discoloredness +discoloreds +discolors +disfavor +disfavored +disfavorer +disfavorer's +disfavorers +disfavoring +disfavors +disheveled +disorganization +disorganization's +disorganizations +doweling +downdraft +draftier +draftiness +draftsperson +drafty +dramatization +dramatization's +dramatizations +dramatize +dramatized +dramatizer +dramatizers +dramatizes +dramatizing +duelist +duelists +dynamized +edema +edema's +edemas +edematous +emphasize +emphasized +emphasizer +emphasizers +emphasizes +emphasizing +energized +energizes +enthrall +enthralls +epicenter +epicenter's +epicenters +esthete +esthetes +eulogize +eulogized +eulogizer +eulogizers +eulogizes +eulogizing +exorcize +exorcized +exorcizes +exorcizing +extemporize +extemporized +extemporizer +extemporizers +extemporizes +extemporizing +externalization +externalization's +externalizations +favoritism +favoritism's +favoritisms +federalize +federalized +federalizes +federalizing +fetid +fetidly +fetidness +fetus +fetus's +fetuses +fiberboard +fossilized +fraternize +fraternized +fraternizer +fraternizers +fraternizes +fraternizing +galvanizing +generalizable +generalizable's +generalizables +germanized +gimbaled +glottalization +glycerolized +grueling +gruelingly +gynecological +gynecological's +gynecologicals +gynecologist +gynecologist's +gynecologists +harmonization +harmonization's +harmonizations +homeomorph +homeopath +homogenization +homogenization's +homogenizations +homogenize +homogenized +homogenizer +homogenizers +homogenizes +homogenizing +honoree +hospitalization +hospitalization's +hospitalizations +humanize +humanized +humanizer +humanizers +humanizes +humanizing +hydrolyzed +hypnotized +hypophysectomized +idolize +idolized +idolizer +idolizers +idolizes +idolizing +immobilize +immobilized +immobilizer +immobilizes +immobilizing +immortalized +immunization +immunization's +immunizations +impersonalized +industrialized +industrializing +inhumanizes +institutionalization +institutionalization's +institutionalizations +internationalization +internationalization's +internationalizations +internationalized +ionize +ionized +ionizer +ionizers +ionizes +ionizing +ionizings +ionizion +ionizions +kinesthesis +kinesthetic +kinesthetically +kinesthetics +legitimize +legitimized +legitimizer +legitimizes +legitimizing +libeler +libelers +libelous +libelously +liberalization +liberalization's +liberalizations +licensable +lionize +lionized +lionizer +lionizers +lionizes +lionizing +magnetized +maneuverability +maneuverable +marbleized +marbleizing +maximization +maximization's +maximizations +memorialized +mesmerized +metabolized +metalization +metalization's +metalizations +metropolitanization +milligram +milligram's +milligrams +milliliter +milliliter's +milliliters +mineralized +misbehavior +misbehavior's +misbehaviors +misdemeanor +misdemeanor's +misdemeanors +mobilization +mobilization's +mobilizations +mobilize +mobilized +mobilizer +mobilizes +mobilizing +modernization +modernization's +modernizations +monetization +monetize +monetized +monetizes +monetizing +monopolization +monopolization's +monopolizations +monopolize +monopolized +monopolizer +monopolizers +monopolizes +monopolizing +multicolor +multicolor's +multicolored +multicolors +narcotizes +nasalization +nasalization's +nasalizations +nasalized +naturalized +neutralization +neutralization's +neutralizations +nominalized +novelized +ocher +ocher's +ochers +operationalization +operationalizations +operationalize +operationalized +orthogonalization +orthogonalized +orthopedic +orthopedics +ostracized +outmaneuver +outmaneuvered +outmaneuvering +outmaneuvers +overemphasize +overemphasized +overemphasizer +overemphasizers +overemphasizes +overemphasizing +palatalization +palatalize +palatalized +palatalizes +palatalizing +palletized +panelization +panelized +parenthesize +parenthesizes +parenthesizing +pasteurization +pasteurizations +pedaled +pedaling +peptizing +platinize +platinized +platinizes +platinizing +plowshare +plowshare's +plowshares +polarize +polarized +polarizer +polarizers +polarizes +polarizing +politicized +polymerizations +proletarianization +proletarianized +pronominalization +pronominalize +pummeled +pyorrhea +pyorrhea's +pyorrheas +pyrolyze +pyrolyze's +pyrolyzer +pyrolyzes +radiopasteurization +radiosterilization +radiosterilized +rancor +rancor's +rancors +randomization +randomization's +randomizations +rationalization +rationalization's +rationalizations +reacclimatizes +reactualizes +realizabilities +realizability +realizability's +reconceptualization +recrystallization +recrystallization's +recrystallizations +recrystallize +recrystallizing +reemphasize +reemphasized +reemphasizer +reemphasizers +reemphasizes +reemphasizing +regularizing +reharmonization +rehumanizes +remobilization +remobilization's +remobilizations +remobilizes +remonetization +remonetize +remonetized +remonetizes +remonetizing +repopularize +revaporization +revaporization's +revaporizations +revisualization +revisualization's +revisualizations +revitalization +revitalize +revitalized +revitalizer +revitalizers +revitalizes +revitalizing +ritualized +romanticize +romanticizes +romanticizing +rubberized +satirizes +scandalized +scandalizing +sectionalized +secularization +secularization's +secularizations +secularized +sensitized +sentimentalize +sentimentalized +sentimentalizer +sentimentalizers +sentimentalizes +sentimentalizing +sexualized +signalizes +sniveled +sniveler +snivelers +sniveling +snivelings +socialization +socialization's +socializations +stabilization +stabilization's +stabilizations +stigmatization +stigmatization's +stigmatizations +stigmatized +stylization +stylization's +stylizations +subcategorizing +subsidization +subsidization's +subsidizations +substerilization +suburbanization +suburbanization's +suburbanizations +suburbanized +suburbanizing +swiveled +swiveling +systematization +systematization's +systematizations +systemization +systemization's +systemizations +teaseled +teaseling +teetotaler +temporize +temporized +temporizer +temporizer's +temporizers +temporizes +temporizing +temporizing's +temporizingly +temporizings +theatergoer +theatergoer's +theatergoers +theatergoing +theatergoing's +theatergoings +thru +tine's +tinseled +tinseling +traditionalized +travelog +travelog's +travelogs +trialization +triangularization +triangularizations +tricolor +tricolor's +tricolored +tricolors +tyrannize +tyrannized +tyrannizer +tyrannizers +tyrannizes +tyrannizing +tyrannizing's +tyrannizingly +tyrannizings +unamortization +unamortization's +unamortizations +uncanonized +uncauterized +uncauterized's +uncauterizeds +undemocratizes +underutilization +underutilized +undialyzed +undialyzed's +undialyzeds +undiscoloreds +undramatized +undramatized's +undramatizeds +unenergized +unenergized's +unenergizeds +uneulogized +uneulogized's +uneulogizeds +unfossilized +unfossilized's +unfossilizeds +unfraternizing +unfraternizing's +unfraternizings +unhydrolyzed +unhydrolyzed's +unhydrolyzeds +unidolized +unidolized's +unidolizeds +unimmortalized +unindustrialized +unindustrialized's +unindustrializeds +unitized +universalize +universalized +universalizer +universalizers +universalizes +universalizing +unmagnetized +unmagnetized's +unmagnetizeds +unmemorialized +unmemorialized's +unmemorializeds +unmesmerized +unmineralized +unmineralized's +unmineralizeds +unmobilized +unmobilized's +unmobilizeds +unmonopolized +unmonopolizes +unnaturalized +unpatronizing +unpolarized +unpolarized's +unpolarizeds +unsatirizes +unsavories +unsavoriness +unsavory +unsavory's +unscandalized +unsecularized +unsensitized +unsentimentalizes +unstigmatized +unstigmatized's +unstigmatizeds +untemporizings +untrammeled +unvocalized +unvocalized's +unvocalizeds +unvulcanized +unvulcanized's +unvulcanizeds +updraft +urbanization +urbanization's +urbanizations +urbanized +vacuolization +vacuolization's +vacuolizations +vaporization +vaporization's +vaporizations +varicolored +varicolored's +varicoloreds +velarize +velarized +velarizes +velarizing +visualization +visualization's +visualizations +vocalization +vocalization's +vocalizations +vocalize +vocalized +vocalizer +vocalizers +vocalizes +vocalizing +volatilization +volatilization's +volatilizations +vulcanized +watercolor +watercolor's +watercolored +watercoloring +watercolorist +watercolorists +watercolors +yodeled +yodeler +yodeling +deprecation +info +sync +synch +java +Java +doc +Doc +Mon +Tue +Wed +Thur +Fri +Sat +Sun +initially +I +formatter:off +formatter:on diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/ru_RU.dictionary b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/ru_RU.dictionary new file mode 100644 index 0000000..dd6765a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/dictionaries/ru_RU.dictionary @@ -0,0 +1 @@ +Unexpected error. File contents could not be restored from local history during undo/redo. \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/plugin.properties b/product/com.excelsior.xds.ui.editor.spellcheck/plugin.properties new file mode 100644 index 0000000..ae58526 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/plugin.properties @@ -0,0 +1,2 @@ +pluginName=Text editor spellcheck +spelling.default_engine_label=XDS spelling engine \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/plugin.xml b/product/com.excelsior.xds.ui.editor.spellcheck/plugin.xml new file mode 100644 index 0000000..26d1ca1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/plugin.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/AddWordProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/AddWordProposal.java new file mode 100644 index 0000000..1485d54 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/AddWordProposal.java @@ -0,0 +1,171 @@ +/******************************************************************************* + * Copyright (c) 2000, 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.text.MessageFormat; + +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.dialogs.MessageDialogWithToggle; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.texteditor.spelling.SpellingProblem; + +import com.excelsior.xds.core.preferences.PreferenceKey; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckEngine; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; +import com.excelsior.xds.ui.editor.spellcheck.internal.plugin.SpellcheckPlugin; +import com.excelsior.xds.ui.images.ImageUtils; + +/** + * Proposal to add the unknown word to the dictionaries. + * + * @since 3.0 + */ +public class AddWordProposal implements ICompletionProposal { + + private static final PreferenceKey PREF_KEY_PREF_KEY_DO_NOT_ASK = + new PreferenceKey(SpellcheckPlugin.PLUGIN_ID, "do_not_ask_to_install_user_dictionary", false); //$NON-NLS-1$ + + /** The invocation context */ + private final IQuickAssistInvocationContext fContext; + + /** The word to add */ + private final String fWord; + + + /** + * Creates a new add word proposal + * + * @param word + * The word to add + * @param context + * The invocation context + */ + public AddWordProposal(final String word, final IQuickAssistInvocationContext context) { + fContext= context; + fWord= word; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument) + */ + public final void apply(final IDocument document) { + + final ISpellCheckEngine engine= SpellCheckEngine.getInstance(); + final ISpellChecker checker= engine.getSpellChecker(); + + if (checker == null) + return; + + if (!checker.acceptsWords()) { + final Shell shell; + if (fContext != null && fContext.getSourceViewer() != null) + shell= fContext.getSourceViewer().getTextWidget().getShell(); + else + shell= WorkbenchUtils.getWorkbenchWindowShell(); + + if (!canAskToConfigure() || !askUserToConfigureUserDictionary(shell)) + return; + + String[] preferencePageIds= new String[] { "org.eclipse.ui.editors.preferencePages.Spelling" }; //$NON-NLS-1$ + PreferencesUtil.createPreferenceDialogOn(shell, preferencePageIds[0], preferencePageIds, null).open(); + } + + if (checker.acceptsWords()) { + checker.addWord(fWord); + if (fContext != null && fContext.getSourceViewer() != null) + SpellingProblem.removeAll(fContext.getSourceViewer(), fWord); + } + } + + /** + * Asks the user whether he wants to configure a user dictionary. + * + * @param shell the shell + * @return true if the user wants to configure the user dictionary + * @since 3.3 + */ + private boolean askUserToConfigureUserDictionary(Shell shell) { + MessageDialogWithToggle toggleDialog= MessageDialogWithToggle.openYesNoQuestion( + shell, + Messages.Spelling_add_askToConfigure_title, + Messages.Spelling_add_askToConfigure_question, + Messages.Spelling_add_askToConfigure_ignoreMessage, + false, + null, + null); + + PREF_KEY_PREF_KEY_DO_NOT_ASK.setStoredBoolean(toggleDialog.getToggleState()); + + return toggleDialog.getReturnCode() == IDialogConstants.YES_ID; + } + + /** + * Tells whether this proposal can ask to + * configure a user dictionary. + * + * @return true if it can ask the user + */ + static boolean canAskToConfigure() { + return !PREF_KEY_PREF_KEY_DO_NOT_ASK.getStoredBoolean(); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return MessageFormat.format(Messages.Spelling_add_info, new Object[] { WordCorrectionProposal.getHtmlRepresentation(fWord)}); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation() + */ + public final IContextInformation getContextInformation() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + return MessageFormat.format(Messages.Spelling_addWordProposal, new Object[] { WordCorrectionProposal.getHtmlRepresentation(fWord)}); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() + */ + public Image getImage() { + return ImageUtils.getImage(ImageUtils.CORRECTION_ADD); + } + + /* + * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() + */ + public int getRelevance() { + return Integer.MIN_VALUE; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument) + */ + public final Point getSelection(final IDocument document) { + return new Point(fContext.getOffset(), fContext.getLength()); + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ChangeCaseProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ChangeCaseProposal.java new file mode 100644 index 0000000..2f8b81d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ChangeCaseProposal.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.util.Locale; + +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; + +/** + * Proposal to change the letter case of a word. + * + * @since 3.0 + */ +public class ChangeCaseProposal extends WordCorrectionProposal { + + /** + * Creates a new change case proposal. + * + * @param arguments The problem arguments associated with the spelling problem + * @param offset The offset in the document where to apply the proposal + * @param length The length in the document to apply the proposal + * @param context The invocation context for this proposal + * @param locale The locale to use for the case change + */ + public ChangeCaseProposal(final String[] arguments, final int offset, final int length, final IQuickAssistInvocationContext context, final Locale locale) { + super(Character.isLowerCase(arguments[0].charAt(0)) ? Character.toUpperCase(arguments[0].charAt(0)) + arguments[0].substring(1) : arguments[0], arguments, offset, length, context, Integer.MAX_VALUE); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString() + */ + @Override + public String getDisplayString() { + return Messages.Spelling_case_label; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DefaultSpellingEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DefaultSpellingEngine.java new file mode 100644 index 0000000..e7a5660 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DefaultSpellingEngine.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.util.HashMap; +import java.util.Map; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.content.IContentType; +import org.eclipse.core.runtime.content.IContentTypeManager; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.ui.texteditor.spelling.ISpellingEngine; +import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector; +import org.eclipse.ui.texteditor.spelling.SpellingContext; + +import com.excelsior.xds.core.XdsCorePlugin; + +public class DefaultSpellingEngine implements ISpellingEngine{ + /** Text content type */ + private static final IContentType TEXT_CONTENT_TYPE= Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT); + + private static final IContentType XDS_SOURCE_CONTENT_TYPE = Platform.getContentTypeManager().getContentType(XdsCorePlugin.CONTENT_TYPE_XDS_SOURCE); + + /** Available spelling engines by content type */ + private Map fEngines= new HashMap(); + + public DefaultSpellingEngine() { + if (TEXT_CONTENT_TYPE != null) + fEngines.put(TEXT_CONTENT_TYPE, new TextSpellingEngine()); + + if (XDS_SOURCE_CONTENT_TYPE != null) { + fEngines.put(XDS_SOURCE_CONTENT_TYPE, new ModulaSpellingEngine()); + } + } + + @Override + public void check(IDocument document, IRegion[] regions, + SpellingContext context, ISpellingProblemCollector collector, + IProgressMonitor monitor) { + ISpellingEngine engine = getEngine(context.getContentType()); + if (engine == null){ + engine = getEngine(TEXT_CONTENT_TYPE); + } + + if (engine != null){ + engine.check(document, regions, context, collector, monitor); + } + } + + /** + * Returns a spelling engine for the given content type or + * null if none could be found. + * + * @param contentType the content type + * @return a spelling engine for the given content type or + * null if none could be found + */ + private ISpellingEngine getEngine(IContentType contentType) { + if (contentType == null) + return null; + + if (fEngines.containsKey(contentType)) + return fEngines.get(contentType); + + return getEngine(contentType.getBaseType()); + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DisableSpellCheckingProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DisableSpellCheckingProposal.java new file mode 100644 index 0000000..f06dcd3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/DisableSpellCheckingProposal.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright (c) 2007, 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.spelling.SpellingService; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; +import com.excelsior.xds.ui.images.ImageUtils; + + +/** + * Proposal to disable spell checking. + * + * @since 3.3 + */ +public class DisableSpellCheckingProposal implements ICompletionProposal { + + /** The invocation context */ + private IQuickAssistInvocationContext fContext; + + /** + * Creates a new proposal. + * + * @param context the invocation context + */ + public DisableSpellCheckingProposal(IQuickAssistInvocationContext context) { + fContext= context; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument) + */ + public final void apply(final IDocument document) { + IPreferenceStore store= EditorsUI.getPreferenceStore(); + store.setValue(SpellingService.PREFERENCE_SPELLING_ENABLED, false); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return Messages.Spelling_disable_info; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation() + */ + public final IContextInformation getContextInformation() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + return Messages.Spelling_disable_label; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() + */ + public Image getImage() { + return ImageUtils.getImage(ImageUtils.CORRECTION_TURN_OFF); + } + /* + * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() + */ + public final int getRelevance() { + return Integer.MIN_VALUE + 1; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument) + */ + public final Point getSelection(final IDocument document) { + return new Point(fContext.getOffset(), fContext.getLength()); + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/HoverInfoWithSpellingAnnotation.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/HoverInfoWithSpellingAnnotation.java new file mode 100644 index 0000000..40b7514 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/HoverInfoWithSpellingAnnotation.java @@ -0,0 +1,334 @@ +/** + * see org.eclipse.cdt.internal.ui.text.c.hover.AbstractAnnotationHover + */ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.text.MessageFormat; + +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRewriteTarget; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.ITextViewerExtension; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension2; +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.FocusEvent; +import org.eclipse.swt.events.FocusListener; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.KeyListener; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.MouseListener; +import org.eclipse.swt.events.PaintEvent; +import org.eclipse.swt.events.PaintListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; +import org.eclipse.swt.widgets.ScrollBar; +import org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess; +import org.eclipse.ui.texteditor.spelling.SpellingAnnotation; + +import com.excelsior.xds.ui.editor.commons.HoverInformationControl; +import com.excelsior.xds.ui.editor.commons.IHoverInfo; + +public class HoverInfoWithSpellingAnnotation implements IHoverInfo{ + //---------- Hover data: + + private final SpellingAnnotation fSpellingAnnotation; + private final ITextViewer fViewer; + private final int fOffset; + + public HoverInfoWithSpellingAnnotation(SpellingAnnotation spellingAnnotation, ITextViewer viewer, int offset) { + this.fSpellingAnnotation = spellingAnnotation; + this.fViewer = viewer; + this.fOffset = offset; + } + + + //---------- Hover painting and functionality: + + private Composite fParent; + private HoverInformationControl fMIControl; + private DefaultMarkerAnnotationAccess fMarkerAnnotationAccess= new DefaultMarkerAnnotationAccess(); + + + @Override + public void deferredCreateContent(Composite parent, HoverInformationControl miControl) + { + this.fParent = parent; + this.fMIControl = miControl; + + GridLayout layout= new GridLayout(1, false); + layout.verticalSpacing= 0; + layout.marginWidth= 0; + layout.marginHeight= 0; + fParent.setLayout(layout); + + // fillToolbar(); + + createAnnotationInformation(fParent, fSpellingAnnotation); + setColorAndFont(fParent, fParent.getForeground(), fParent.getBackground(), JFaceResources.getDialogFont()); + + ICompletionProposal[] proposals= fSpellingAnnotation.getSpellingProblem().getProposals(); + if (proposals.length > 0) + createCompletionProposalsControl(fParent, proposals); + + fParent.layout(true); + } + + private void createAnnotationInformation(Composite parent, final Annotation annotation) { + Composite composite= new Composite(parent, SWT.NONE); + composite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false)); + GridLayout layout= new GridLayout(2, false); + layout.marginHeight= 2; + layout.marginWidth= 2; + layout.horizontalSpacing= 0; + composite.setLayout(layout); + + final Canvas canvas= new Canvas(composite, SWT.NO_FOCUS); + GridData gridData= new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false); + gridData.widthHint= 17; + gridData.heightHint= 16; + canvas.setLayoutData(gridData); + canvas.addPaintListener(new PaintListener() { + public void paintControl(PaintEvent e) { + e.gc.setFont(null); + fMarkerAnnotationAccess.paint(annotation, e.gc, canvas, new Rectangle(0, 0, 16, 16)); + } + }); + + StyledText text= new StyledText(composite, SWT.MULTI | SWT.WRAP | SWT.READ_ONLY); + GridData data= new GridData(SWT.FILL, SWT.FILL, true, true); + text.setLayoutData(data); + text.setText(annotation.getText()); + } + + private void setColorAndFont(Control control, Color foreground, Color background, Font font) { + control.setForeground(foreground); + control.setBackground(background); + control.setFont(font); + + if (control instanceof Composite) { + Control[] children= ((Composite) control).getChildren(); + for (Control element : children) { + setColorAndFont(element, foreground, background, font); + } + } + } + + private void createCompletionProposalsControl(Composite parent, ICompletionProposal[] proposals) { + Composite composite= new Composite(parent, SWT.NONE); + composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + GridLayout layout2= new GridLayout(1, false); + layout2.marginHeight= 0; + layout2.marginWidth= 0; + layout2.verticalSpacing= 2; + composite.setLayout(layout2); + + Label separator= new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL); + GridData gridData= new GridData(SWT.FILL, SWT.CENTER, true, false); + separator.setLayoutData(gridData); + + Label quickFixLabel= new Label(composite, SWT.NONE); + GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); + layoutData.horizontalIndent= 4; + quickFixLabel.setLayoutData(layoutData); + String text; + if (proposals.length == 1) { + text= "1 quick fix available:"; + } else { + text= MessageFormat.format("{0} quick fixes available:", new Object[] {String.valueOf(proposals.length)}); + } + quickFixLabel.setText(text); + + setColorAndFont(composite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); + createCompletionProposalsList(composite, proposals); + } + + private void createCompletionProposalsList(Composite parent, ICompletionProposal[] proposals) { + final ScrolledComposite scrolledComposite= new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL); + GridData gridData= new GridData(SWT.FILL, SWT.FILL, true, true); + scrolledComposite.setLayoutData(gridData); + scrolledComposite.setExpandVertical(false); + scrolledComposite.setExpandHorizontal(false); + + Composite composite= new Composite(scrolledComposite, SWT.NONE); + composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + GridLayout layout= new GridLayout(3, false); + layout.verticalSpacing= 2; + composite.setLayout(layout); + + final Link[] links= new Link[proposals.length]; + for (int i= 0; i < proposals.length; i++) { + Label indent= new Label(composite, SWT.NONE); + GridData gridData1= new GridData(SWT.BEGINNING, SWT.CENTER, false, false); + gridData1.widthHint= 0; + indent.setLayoutData(gridData1); + + links[i] = createCompletionProposalLink(composite, proposals[i]); + } + + scrolledComposite.setContent(composite); + setColorAndFont(scrolledComposite, parent.getForeground(), parent.getBackground(), JFaceResources.getDialogFont()); + + Point contentSize= composite.computeSize(SWT.DEFAULT, SWT.DEFAULT); + composite.setSize(contentSize); + + Point constraints= fMIControl.getInfoSizeConstraints(); + if (constraints != null && contentSize.x < constraints.x) { + ScrollBar horizontalBar= scrolledComposite.getHorizontalBar(); + + int scrollBarHeight; + if (horizontalBar == null) { + Point scrollSize= scrolledComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT); + scrollBarHeight= scrollSize.y - contentSize.y; + } else { + scrollBarHeight= horizontalBar.getSize().y; + } + gridData.heightHint= contentSize.y - scrollBarHeight; + } + + for (int i= 0; i < links.length; i++) { + final int index= i; + final Link link= links[index]; + link.addKeyListener(new KeyListener() { + public void keyPressed(KeyEvent e) { + switch (e.keyCode) { + case SWT.ARROW_DOWN: + if (index + 1 < links.length) { + links[index + 1].setFocus(); + } + break; + case SWT.ARROW_UP: + if (index > 0) { + links[index - 1].setFocus(); + } + break; + default: + break; + } + } + + public void keyReleased(KeyEvent e) { + } + }); + + link.addFocusListener(new FocusListener() { + public void focusGained(FocusEvent e) { + int currentPosition= scrolledComposite.getOrigin().y; + int hight= scrolledComposite.getSize().y; + int linkPosition= link.getLocation().y; + + if (linkPosition < currentPosition) { + if (linkPosition < 10) + linkPosition= 0; + + scrolledComposite.setOrigin(0, linkPosition); + } else if (linkPosition + 20 > currentPosition + hight) { + scrolledComposite.setOrigin(0, linkPosition - hight + link.getSize().y); + } + } + + public void focusLost(FocusEvent e) { + } + }); + } + } + + private Link createCompletionProposalLink(Composite parent, final ICompletionProposal proposal) { + Label proposalImage= new Label(parent, SWT.NONE); + proposalImage.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); + Image image= proposal.getImage(); + if (image != null) { + proposalImage.setImage(image); + + proposalImage.addMouseListener(new MouseListener() { + + public void mouseDoubleClick(MouseEvent e) { + } + + public void mouseDown(MouseEvent e) { + } + + public void mouseUp(MouseEvent e) { + if (e.button == 1) { + apply(proposal); + } + } + + }); + } + + Link proposalLink= new Link(parent, SWT.WRAP); + proposalLink.setLayoutData(new GridData(SWT.BEGINNING, SWT.CENTER, false, false)); + proposalLink.setText("" + proposal.getDisplayString() + ""); //$NON-NLS-1$ //$NON-NLS-2$ + proposalLink.addSelectionListener(new SelectionAdapter() { + /* + * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent) + */ + @Override + public void widgetSelected(SelectionEvent e) { + apply(proposal); + } + }); + + return proposalLink; + } + + private void apply(ICompletionProposal p) { + //Focus needs to be in the text viewer, otherwise linked mode does not work + fMIControl.dispose(); + + IRewriteTarget target= null; + try { + IDocument document= fViewer.getDocument(); + + if (fViewer instanceof ITextViewerExtension) { + ITextViewerExtension extension= (ITextViewerExtension) fViewer; + target= extension.getRewriteTarget(); + } + + if (target != null) + target.beginCompoundChange(); + + if (p instanceof ICompletionProposalExtension2) { + ICompletionProposalExtension2 e= (ICompletionProposalExtension2) p; + e.apply(fViewer, (char) 0, SWT.NONE, fOffset); + } else if (p instanceof ICompletionProposalExtension) { + ICompletionProposalExtension e= (ICompletionProposalExtension) p; + e.apply(document, (char) 0, fOffset); + } else { + p.apply(document); + } + + Point selection= p.getSelection(document); + if (selection != null) { + fViewer.setSelectedRange(selection.x, selection.y); + fViewer.revealRange(selection.x, selection.y); + } + } finally { + if (target != null) + target.endCompoundChange(); + } + } + + @Override + public void setVisible(boolean visible) { + } + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IHtmlTagConstants.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IHtmlTagConstants.java new file mode 100644 index 0000000..e2f5dd2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IHtmlTagConstants.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +/** + * Html tag constants. + * + * @since 3.0 + */ +public interface IHtmlTagConstants { + + /** Html tag close prefix */ + public static final String HTML_CLOSE_PREFIX= "', ' ', '&', '^', '~', '\"' }; + + /** + * Html entity start. + * @since 3.3 + */ + public static final char HTML_ENTITY_START= '&'; + /** + * Html entity end. + * @since 3.3 + */ + public static final char HTML_ENTITY_END= ';'; + + /** Html entity codes */ + public static final String[] HTML_ENTITY_CODES= new String[] { "<", ">", " ", "&", "ˆ", "˜", """ }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ + + /** Html general tags */ + public static final String[] HTML_GENERAL_TAGS= new String[] { "a", "b", "blockquote", "br", "code", "dd", "dl", "dt", "em", "hr", "h1", "h2", "h3", "h4", "h5", "h6", "i", "li", "nl", "ol", "p", "pre", "q", "strong", "tbody", "td", "th", "tr", "tt", "ul" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$ //$NON-NLS-18$ //$NON-NLS-19$ //$NON-NLS-20$ //$NON-NLS-21$ //$NON-NLS-22$ //$NON-NLS-23$ //$NON-NLS-24$ //$NON-NLS-25$ //$NON-NLS-26$ //$NON-NLS-27$ //$NON-NLS-28$ //$NON-NLS-29$ //$NON-NLS-30$ + + /** Html tag postfix */ + public static final char HTML_TAG_POSTFIX= '>'; + + /** Html tag prefix */ + public static final char HTML_TAG_PREFIX= '<'; +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IJavaDocTagConstants.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IJavaDocTagConstants.java new file mode 100644 index 0000000..531dbc6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/IJavaDocTagConstants.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + + +/** + * Javadoc tag constants. + * + * @since 3.0 + */ +public interface IJavaDocTagConstants { + + + /** Javadoc link tags */ + public static final String[] JAVADOC_LINK_TAGS= new String[] { "@docRoot", "@inheritDoc", "@link", "@linkplain" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + /** Javadoc parameter tags */ + public static final String[] JAVADOC_PARAM_TAGS= new String[] { "@exception", "@param", "@serialField", "@throws"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + /** Javadoc reference tags */ + public static final String[] JAVADOC_REFERENCE_TAGS= new String[] { "@see" }; //$NON-NLS-1$ + + /** Javadoc root tags */ + public static final String[] JAVADOC_ROOT_TAGS= new String[] { "@author", "@deprecated", "@return", "@see", "@serial", "@serialData", "@since", "@version", "@inheritDoc", "@category", "@value", "@literal", "@code", "@noinstantiate", "@noreference", "@noimplement", "@noextend", "@nooverride" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ //$NON-NLS-13$ //$NON-NLS-14$ //$NON-NLS-15$ //$NON-NLS-16$ //$NON-NLS-17$ //$NON-NLS-18$ + + /** Javadoc tag prefix */ + public static final char JAVADOC_TAG_PREFIX= '@'; +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingEngine.java new file mode 100644 index 0000000..adfa232 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingEngine.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.core.runtime.AssertionFailedException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITypedRegion; +import org.eclipse.jface.text.TextUtilities; +import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector; + +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; + + +/** + * Java spelling engine + * + * @since 3.1 + */ +public class ModulaSpellingEngine extends SpellingEngine { + + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.SpellingEngine#check(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IRegion[], org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker, org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + protected void check(IDocument document, IRegion[] regions, ISpellChecker checker, ISpellingProblemCollector collector, IProgressMonitor monitor) { + SpellEventListener listener= new SpellEventListener(collector, document); + boolean isIgnoringModulaStrings= PreferenceKeys.PKEY_SPELLING_IGNORE_MODULA_STRINGS.getStoredBoolean(); + try { + for (int i= 0; i < regions.length; i++) { + IRegion region= regions[i]; + ITypedRegion[] partitions= TextUtilities.computePartitioning(document, IModulaPartitions.M2_PARTITIONING, region.getOffset(), region.getLength(), false); + for (int index= 0; index < partitions.length; index++) { + if (monitor != null && monitor.isCanceled()) + return; + + if (listener.isProblemsThresholdReached()) + return; + + ITypedRegion partition= partitions[index]; + final String type= partition.getType(); + + if (isIgnoringModulaStrings && (type.equals(IModulaPartitions.M2_CONTENT_TYPE_SINGLE_QUOTE_STRING) || type.equals(IModulaPartitions.M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING))) + continue; + + if (type.equals(IModulaPartitions.M2_CONTENT_TYPE_PRAGMA)) + continue; + + if (!type.equals(IDocument.DEFAULT_CONTENT_TYPE)) + checker.execute(listener, new SpellCheckIterator(document, partition, checker.getLocale())); + } + } + } catch (BadLocationException x) { + // ignore: the document has been changed in another thread and will be checked again + } catch (AssertionFailedException x) { + // ignore: the document has been changed in another thread and will be checked again + } + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingHover.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingHover.java new file mode 100644 index 0000000..82526c3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingHover.java @@ -0,0 +1,122 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.util.Iterator; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IInformationControl; +import org.eclipse.jface.text.IInformationControlCreator; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextHover; +import org.eclipse.jface.text.ITextHoverExtension; +import org.eclipse.jface.text.ITextHoverExtension2; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.Position; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.jface.text.source.IAnnotationModel; +import org.eclipse.jface.text.source.ISourceViewerExtension2; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.spelling.SpellingAnnotation; + +import com.excelsior.xds.ui.editor.commons.HoverInformationControl; + +public class ModulaSpellingHover implements ITextHover, ITextHoverExtension, + ITextHoverExtension2 { + @Override + public IInformationControlCreator getHoverControlCreator() { + return new IInformationControlCreator() { + public IInformationControl createInformationControl(Shell parent) { + return new HoverInformationControl(parent, EditorsUI.getTooltipAffordanceString()); + } + }; + } + + @Override + public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { + return null; + } + + @Override + public HoverInfoWithSpellingAnnotation getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) { + return getSpellingHover(textViewer, hoverRegion); + } + + @Override + public IRegion getHoverRegion(ITextViewer textViewer, int offset) { + return findWord(textViewer.getDocument(), offset); + } + + private IRegion findWord(IDocument document, int offset) { + int start = -2; + int end = -1; + + try { + + int pos = offset; + char c; + + while (pos >= 0) { + c = document.getChar(pos); + if (!Character.isUnicodeIdentifierPart(c)) { + break; + } + --pos; + } + + start = pos; + + pos = offset; + int length = document.getLength(); + + while (pos < length) { + c = document.getChar(pos); + if (!Character.isUnicodeIdentifierPart(c)) { + break; + } + ++pos; + } + + end = pos; + + } catch (BadLocationException x) { + } + + if (start >= -1 && end > -1) { + if (start == offset && end == offset) { + return new Region(offset, 0); + } else if (start == offset) { + return new Region(start, end - start); + } else { + return new Region(start + 1, end - start - 1); + } + } + + return null; + } + + private HoverInfoWithSpellingAnnotation getSpellingHover(ITextViewer textViewer, IRegion hoverRegion) { + IAnnotationModel model= null; + if (textViewer instanceof ISourceViewerExtension2) { + model = ((ISourceViewerExtension2)textViewer).getVisualAnnotationModel(); + } else if (textViewer instanceof SourceViewer) { + model= ((SourceViewer)textViewer).getAnnotationModel(); + } + if (model != null) { + @SuppressWarnings("rawtypes") + Iterator e= model.getAnnotationIterator(); + while (e.hasNext()) { + Annotation a= (Annotation) e.next(); + if (a instanceof SpellingAnnotation) { + Position p= model.getPosition(a); + if (p != null && p.overlapsWith(hoverRegion.getOffset(), hoverRegion.getLength())) { + return new HoverInfoWithSpellingAnnotation((SpellingAnnotation)a, textViewer, p.getOffset()); + } + } + } + } + return null; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingProblem.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingProblem.java new file mode 100644 index 0000000..82d1cdb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/ModulaSpellingProblem.java @@ -0,0 +1,237 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; +import org.eclipse.jface.text.source.TextInvocationContext; +import org.eclipse.ui.texteditor.spelling.SpellingProblem; + +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckEngine; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellEvent; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.RankedWordProposal; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; + +/** + * A {@link SpellingProblem} that adapts a {@link ISpellEvent}. + *

+ * TODO: remove {@link ISpellEvent} notification mechanism + *

+ */ +public class ModulaSpellingProblem extends SpellingProblem { + + /** Spell event */ + private ISpellEvent fSpellEvent; + + /** + * The associated document. + * + * @since 3.3 + */ + private IDocument fDocument; + + /** + * Initialize with the given spell event. + * + * @param spellEvent the spell event + * @param document the document + */ + public ModulaSpellingProblem(ISpellEvent spellEvent, IDocument document) { + Assert.isLegal(document != null); + Assert.isLegal(spellEvent != null); + fSpellEvent= spellEvent; + fDocument= document; + } + + /* + * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getOffset() + */ + @Override + public int getOffset() { + return fSpellEvent.getBegin(); + } + + /* + * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getLength() + */ + @Override + public int getLength() { + return fSpellEvent.getEnd() - fSpellEvent.getBegin() + 1; + } + + /* + * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getMessage() + */ + @Override + public String getMessage() { + if (isSentenceStart() && isDictionaryMatch()){ + return String.format(Messages.Spelling_error_case_label, fSpellEvent.getWord()); + } + return String.format(Messages.Spelling_error_label, fSpellEvent.getWord()); + } + + /* + * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getProposals() + */ + @Override + public ICompletionProposal[] getProposals() { + return getProposals(null); + } + + /* + * @see org.eclipse.ui.texteditor.spelling.SpellingProblem#getProposals(org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext) + * @since 3.4 + */ + @Override + public ICompletionProposal[] getProposals(IQuickAssistInvocationContext context) { + String[] arguments= getArguments(); + if (arguments == null) + return new ICompletionProposal[0]; + + if (arguments[0].indexOf('&') != -1 && isIgnoringAmpersand()) + return new ICompletionProposal[0]; // no proposals for now + + final int threshold= PreferenceKeys.PKEY_SPELLING_PROPOSAL_THRESHOLD.getStoredInt(); + int size= 0; + List proposals= null; + + RankedWordProposal proposal= null; + ICompletionProposal[] result= null; + int index= 0; + + boolean fixed= false; + boolean match= false; + boolean sentence= false; + + final ISpellCheckEngine engine= SpellCheckEngine.getInstance(); + final ISpellChecker checker= engine.getSpellChecker(); + + if (checker != null) { + + if (context == null) + context= new TextInvocationContext(null, getOffset(), getLength()); + else + context= new TextInvocationContext(context.getSourceViewer(), getOffset(), getLength()); + + // FIXME: this is a pretty ugly hack + fixed= arguments[0].charAt(0) == IHtmlTagConstants.HTML_TAG_PREFIX + || arguments[0].charAt(0) == IJavaDocTagConstants.JAVADOC_TAG_PREFIX; + + if ((sentence && match) && !fixed) + result= new ICompletionProposal[] { new ChangeCaseProposal( + arguments, getOffset(), getLength(), context, engine + .getLocale()) }; + else { + + proposals= new ArrayList(checker.getProposals(arguments[0], + sentence)); + size= proposals.size(); + + if (threshold > 0 && size > threshold) { + + Collections.sort(proposals); + proposals= proposals + .subList(size - threshold - 1, size - 1); + size= proposals.size(); + } + + boolean extendable= !fixed ? (checker.acceptsWords() || AddWordProposal.canAskToConfigure()) : false; + result= new ICompletionProposal[size + (extendable ? 3 : 2)]; + + for (index= 0; index < size; index++) { + + proposal= proposals.get(index); + result[index]= new WordCorrectionProposal(proposal + .getText(), arguments, getOffset(), getLength(), + context, proposal.getRank()); + } + + if (extendable) + result[index++]= new AddWordProposal(arguments[0], context); + + result[index++]= new WordIgnoreProposal(arguments[0], context); + result[index++]= new DisableSpellCheckingProposal(context); + } + } + + return result; + } + + private boolean isIgnoringAmpersand() { + return true; + } + + public String[] getArguments() { + + String prefix= ""; //$NON-NLS-1$ + String postfix= ""; //$NON-NLS-1$ + String word; + try { + word= fDocument.get(getOffset(), getLength()); + } catch (BadLocationException e) { + return null; + } + + try { + + IRegion line= fDocument.getLineInformationOfOffset(getOffset()); + prefix= fDocument.get(line.getOffset(), getOffset() - line.getOffset()); + int postfixStart= getOffset() + getLength(); + postfix= fDocument.get(postfixStart, line.getOffset() + line.getLength() - postfixStart); + + } catch (BadLocationException exception) { + // Do nothing + } + return new String[] { + word, + prefix, + postfix, + isSentenceStart() ? Boolean.toString(true) : Boolean + .toString(false), + isDictionaryMatch() ? Boolean.toString(true) : Boolean + .toString(false) }; + } + + /** + * Returns true iff the corresponding word was found in the dictionary. + *

+ * NOTE: to be removed, see {@link #getProposals()} + *

+ * + * @return true iff the corresponding word was found in the dictionary + */ + public boolean isDictionaryMatch() { + return fSpellEvent.isMatch(); + } + + /** + * Returns true iff the corresponding word starts a sentence. + *

+ * NOTE: to be removed, see {@link #getProposals()} + *

+ * + * @return true iff the corresponding word starts a sentence + */ + public boolean isSentenceStart() { + return fSpellEvent.isStart(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategy.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategy.java new file mode 100644 index 0000000..498de74 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategy.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.content.IContentType; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.reconciler.DirtyRegion; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.spelling.SpellingReconcileStrategy; + +import com.excelsior.xds.core.XdsCorePlugin; + +/** + * Reconcile strategy for spell checking comments. + */ +public class SourceCodeSpellingReconcileStrategy extends SpellingReconcileStrategy +{ + /** The content type of the underlying editor input */ + private IContentType contentType; + + /** + * Creates a new comment reconcile strategy. + * + * @param viewer the source viewer + * @param editor the text editor to operate on + */ + public SourceCodeSpellingReconcileStrategy(ISourceViewer viewer) { + super(viewer, EditorsUI.getSpellingService()); + } + + /** + * {@inheritDoc} + */ + @Override + protected IContentType getContentType() { + if (contentType == null) { + contentType = Platform.getContentTypeManager().getContentType(XdsCorePlugin.CONTENT_TYPE_XDS_SOURCE); + } + return contentType; + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(IRegion region) { + if (isSpellingEnabled()) { + super.reconcile(region); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { + if (isSpellingEnabled()) { + super.reconcile(dirtyRegion, subRegion); + } + } + + + private boolean isSpellingEnabled() { + return true; + } + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategyProvider.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategyProvider.java new file mode 100644 index 0000000..0859b25 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SourceCodeSpellingReconcileStrategyProvider.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; +import org.eclipse.jface.text.source.ISourceViewer; + +import com.excelsior.xds.ui.editor.modula.reconciling.IReconcilingStrategyProvider; + +public class SourceCodeSpellingReconcileStrategyProvider implements + IReconcilingStrategyProvider { + + public SourceCodeSpellingReconcileStrategyProvider() { + } + + @Override + public IReconcilingStrategy createReconcilingStrategy(ISourceViewer viewer) { + return new SourceCodeSpellingReconcileStrategy(viewer); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckEngine.java new file mode 100644 index 0000000..87cb068 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckEngine.java @@ -0,0 +1,503 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Collections; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Locale; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.FileLocator; +import org.eclipse.core.runtime.Platform; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.core.variables.IStringVariableManager; +import org.eclipse.core.variables.VariablesPlugin; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.spelling.SpellingService; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceConstants; +import com.excelsior.xds.core.preferences.PreferenceKey; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.DefaultSpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckEngine; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellDictionary; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.LocaleSensitiveSpellDictionary; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.PersistentSpellDictionary; +import com.excelsior.xds.ui.editor.spellcheck.internal.plugin.SpellcheckPlugin; + + +/** + * Spell check engine for Java source spell checking. + * + * @since 3.0 + */ +public class SpellCheckEngine implements ISpellCheckEngine, IPropertyChangeListener, IPreferenceChangeListener { + + /** The dictionary location */ + public static final String DICTIONARY_LOCATION= "dictionaries/"; //$NON-NLS-1$ + + /** The singleton engine instance */ + private static ISpellCheckEngine fgEngine= null; + + /** + * Caches the locales of installed dictionaries. + * + * @since 3.3 + */ + private static Set fgLocalesWithInstalledDictionaries; + + /** + * Returns the locales for which this + * spell check engine has dictionaries in certain location. + * + * @param location dictionaries location + * @return The available locales for this engine + */ + private static Set getLocalesWithInstalledDictionaries(URL location) { + String[] fileNames; + try { + URL url= FileLocator.toFileURL(location); + File file= new File(url.getFile()); + if (!file.isDirectory()) + return Collections.emptySet(); + fileNames= file.list(); + if (fileNames == null) + return Collections.emptySet(); + } catch (IOException ex) { + LogHelper.logError(ex); + return Collections.emptySet(); + } + + Set localesWithInstalledDictionaries= new HashSet(); + int fileNameCount= fileNames.length; + for (int i= 0; i < fileNameCount; i++) { + String fileName= fileNames[i]; + int localeEnd= fileName.indexOf(".dictionary"); //$NON-NLS-1$ + if (localeEnd > 1) { + String localeName= fileName.substring(0, localeEnd); + int languageEnd=localeName.indexOf('_'); + if (languageEnd == -1) + localesWithInstalledDictionaries.add(new Locale(localeName)); + else if (languageEnd == 2 && localeName.length() == 5) + localesWithInstalledDictionaries.add(new Locale(localeName.substring(0, 2), localeName.substring(3))); + else if (localeName.length() > 6 && localeName.charAt(5) == '_') + localesWithInstalledDictionaries.add(new Locale(localeName.substring(0, 2), localeName.substring(3, 5), localeName.substring(6))); + } + } + + return localesWithInstalledDictionaries; + } + + + /** + * Returns the locales for which this + * spell check engine has dictionaries. + * + * @return The available locales for this engine + */ + public static Set getLocalesWithInstalledDictionaries() { + if (fgLocalesWithInstalledDictionaries != null) + return fgLocalesWithInstalledDictionaries; + + Enumeration locations; + try { + locations= getDictionaryLocations(); + if (locations == null) + return fgLocalesWithInstalledDictionaries= Collections.emptySet(); + } catch (IOException ex) { + LogHelper.logError(ex); + return fgLocalesWithInstalledDictionaries= Collections.emptySet(); + } + + fgLocalesWithInstalledDictionaries= new HashSet(); + + while (locations.hasMoreElements()) { + URL location= locations.nextElement(); + Set locales= getLocalesWithInstalledDictionaries(location); + fgLocalesWithInstalledDictionaries.addAll(locales); + } + + return fgLocalesWithInstalledDictionaries; + } + + /** + * Returns the default locale for this engine. + * + * @return The default locale + */ + public static Locale getDefaultLocale() { + return Locale.getDefault(); + } + + /** + * Returns the dictionary closest to the given locale. + * + * @param locale the locale + * @return the dictionary or null if none is suitable + * @since 3.3 + */ + public ISpellDictionary findDictionary(Locale locale) { + ISpellDictionary dictionary= fLocaleDictionaries.get(locale); + if (dictionary != null) + return dictionary; + + // Try same language + String language= locale.getLanguage(); + Iterator> iter= fLocaleDictionaries.entrySet().iterator(); + while (iter.hasNext()) { + Entry entry= iter.next(); + Locale dictLocale= entry.getKey(); + if (dictLocale.getLanguage().equals(language)) + return entry.getValue(); + } + + return null; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#findDictionary(java.util.Locale) + * @since 3.3 + */ + public static Locale findClosestLocale(Locale locale) { + if (locale == null || locale.toString().length() == 0) + return locale; + + if (getLocalesWithInstalledDictionaries().contains(locale)) + return locale; + + // Try same language + String language= locale.getLanguage(); + Iterator iter= getLocalesWithInstalledDictionaries().iterator(); + while (iter.hasNext()) { + Locale dictLocale= iter.next(); + if (dictLocale.getLanguage().equals(language)) + return dictLocale; + } + + // Try whether American English is present + Locale defaultLocale= Locale.US; + if (getLocalesWithInstalledDictionaries().contains(defaultLocale)) + return defaultLocale; + + return null; + } + + /** + * Returns the enumeration of URLs for the dictionary locations where + * the Platform dictionaries are located. + *

+ * This is in org.eclipse.jdt.ui/dictionaries/ + * which can also be populated via fragments. + *

+ * + * @throws IOException if there is an I/O error + * @return The dictionary locations, or null iff the locations are not known + */ + public static Enumeration getDictionaryLocations() throws IOException { + final SpellcheckPlugin plugin= SpellcheckPlugin.getDefault(); + if (plugin != null) + return plugin.getBundle().getResources("/" + DICTIONARY_LOCATION); //$NON-NLS-1$ + return null; + } + + /** + * Returns the singleton instance of the spell check engine. + * + * @return The singleton instance of the spell check engine + */ + public static synchronized final ISpellCheckEngine getInstance() { + + if (fgEngine == null) + fgEngine= new SpellCheckEngine(); + + return fgEngine; + } + + /** + * Shuts down the singleton instance of the spell check engine. + */ + public static synchronized final void shutdownInstance() { + if (fgEngine != null) { + fgEngine.shutdown(); + fgEngine= null; + } + } + + /** The registered locale insensitive dictionaries */ + private Set fGlobalDictionaries= new HashSet(); + + /** The spell checker for fLocale */ + private ISpellChecker fChecker= null; + + /** The registered locale sensitive dictionaries */ + private Map fLocaleDictionaries= new HashMap(); + + /** The user dictionary */ + private ISpellDictionary fUserDictionary= null; + + /** + * Creates a new spell check manager. + */ + private SpellCheckEngine() { + + try { + + Locale locale= null; + final Enumeration locations= getDictionaryLocations(); + + while (locations != null && locations.hasMoreElements()) { + URL location= locations.nextElement(); + + for (final Iterator iterator= getLocalesWithInstalledDictionaries(location).iterator(); iterator.hasNext();) { + + locale= iterator.next(); + fLocaleDictionaries.put(locale, new LocaleSensitiveSpellDictionary(locale, location)); + } + } + + } catch (IOException exception) { + // Do nothing + } + + PreferenceKeys.PKEY_SPELLING_LOCALE.addChangeListener(this); + EditorsUI.getPreferenceStore().addPropertyChangeListener(this); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#getSpellChecker() + */ + public synchronized final ISpellChecker getSpellChecker() throws IllegalStateException { + if (fGlobalDictionaries == null) + throw new IllegalStateException("spell checker has been shut down"); //$NON-NLS-1$ + + Locale locale= getCurrentLocale(); + if (fUserDictionary == null && "".equals(locale.toString())) //$NON-NLS-1$ + return null; + + if (fChecker != null && fChecker.getLocale().equals(locale)) + return fChecker; + + resetSpellChecker(); + + fChecker= new DefaultSpellChecker(locale); + resetUserDictionary(); + + for (Iterator iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) { + ISpellDictionary dictionary= iterator.next(); + fChecker.addDictionary(dictionary); + } + + ISpellDictionary dictionary= findDictionary(fChecker.getLocale()); + if (dictionary != null) + fChecker.addDictionary(dictionary); + + return fChecker; + } + + /** + * Returns the current locale of the spelling preferences. + * + * @param store the preference store + * @return The current locale of the spelling preferences + */ + private Locale getCurrentLocale() { + String locale = PreferenceKeys.PKEY_SPELLING_LOCALE.getStoredValue(); + if (PreferenceConstants.PREF_VALUE_NO_LOCALE.equals(locale)) { + locale = Platform.getNL(); + } + return convertToLocale(locale); + } + + public static Locale convertToLocale(String locale) { + Locale defaultLocale= SpellCheckEngine.getDefaultLocale(); + if (locale.equals(defaultLocale.toString())) + return defaultLocale; + + int length= locale.length(); + if (length >= 5) + return new Locale(locale.substring(0, 2), locale.substring(3, 5)); + + if (length == 2 && locale.indexOf('_') == -1) + return new Locale(locale); + + if (length == 3 && locale.charAt(0) == '_') + return new Locale("", locale.substring(1)); //$NON-NLS-1$ + + return new Locale(""); //$NON-NLS-1$ + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellCheckEngine#getLocale() + */ + public synchronized final Locale getLocale() { + if (fChecker == null) + return null; + + return fChecker.getLocale(); + } + + /* + * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent) + */ + public final void propertyChange(final PropertyChangeEvent event) { + if (event.getProperty().equals(SpellingService.PREFERENCE_SPELLING_ENABLED) && !EditorsUI.getPreferenceStore().getBoolean(SpellingService.PREFERENCE_SPELLING_ENABLED)) { + if (this == fgEngine) + SpellCheckEngine.shutdownInstance(); + else + shutdown(); + } + } + + @Override + public void preferenceChange(PreferenceChangeEvent event) { + String key = event.getKey(); + if (key.equals(PreferenceKeys.PKEY_SPELLING_LOCALE.getKey())) { + resetSpellChecker(); + return; + } + + if (key.equals( + PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY.getKey()) + || key.equals(PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.getKey())) { + resetUserDictionary(); + return; + } + } + + + /** + * Resets the current checker's user dictionary. + */ + private synchronized void resetUserDictionary() { + if (fChecker == null) + return; + + // Update user dictionary + if (fUserDictionary != null) { + fChecker.removeDictionary(fUserDictionary); + fUserDictionary.unload(); + fUserDictionary= null; + } + + String filePath= PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY.getStoredValue(); + + VariablesPlugin variablesPlugin= VariablesPlugin.getDefault(); + if (variablesPlugin == null) + return; + + IStringVariableManager variableManager= variablesPlugin.getStringVariableManager(); + try { + filePath= variableManager.performStringSubstitution(filePath); + } catch (CoreException e) { + LogHelper.logError(e); + return; + } + if (filePath.length() > 0) { + try { + File file= new File(filePath); + if (!file.exists() && !file.createNewFile()) + return; + + final URL url= new URL("file", null, filePath); //$NON-NLS-1$ + InputStream stream= url.openStream(); + if (stream != null) { + try { + fUserDictionary= new PersistentSpellDictionary(url); + fChecker.addDictionary(fUserDictionary); + } finally { + stream.close(); + } + } + } catch (MalformedURLException exception) { + // Do nothing + } catch (IOException exception) { + // Do nothing + } + } + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#registerDictionary(org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary) + */ + public synchronized final void registerGlobalDictionary(final ISpellDictionary dictionary) { + fGlobalDictionaries.add(dictionary); + resetSpellChecker(); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#registerDictionary(java.util.Locale, org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary) + */ + public synchronized final void registerDictionary(final Locale locale, final ISpellDictionary dictionary) { + fLocaleDictionaries.put(locale, dictionary); + resetSpellChecker(); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckEngine#unload() + */ + public synchronized final void shutdown() { + + PreferenceKey.removeChangeListener(PreferenceKeys.PKEY_SPELLING_LOCALE.getQualifier(), this); + EditorsUI.getPreferenceStore().removePropertyChangeListener(this); + + ISpellDictionary dictionary= null; + for (final Iterator iterator= fGlobalDictionaries.iterator(); iterator.hasNext();) { + dictionary= iterator.next(); + dictionary.unload(); + } + fGlobalDictionaries= null; + + for (final Iterator iterator= fLocaleDictionaries.values().iterator(); iterator.hasNext();) { + dictionary= iterator.next(); + dictionary.unload(); + } + fLocaleDictionaries= null; + + fUserDictionary= null; + fChecker= null; + } + + private synchronized void resetSpellChecker() { + if (fChecker != null) { + ISpellDictionary dictionary= fLocaleDictionaries.get(fChecker.getLocale()); + if (dictionary != null) + dictionary.unload(); + } + fChecker= null; + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellCheckEngine#unregisterDictionary(org.eclipse.jdt.ui.text.spelling.engine.ISpellDictionary) + */ + public synchronized final void unregisterDictionary(final ISpellDictionary dictionary) { + fGlobalDictionaries.remove(dictionary); + fLocaleDictionaries.values().remove(dictionary); + dictionary.unload(); + resetSpellChecker(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckIterator.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckIterator.java new file mode 100644 index 0000000..ca40c5c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellCheckIterator.java @@ -0,0 +1,422 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.text.BreakIterator; +import java.util.LinkedList; +import java.util.Locale; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.TextUtilities; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.DefaultSpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckIterator; + + +/** + * Iterator to spell check javadoc comment regions. + * + * @since 3.0 + */ +public class SpellCheckIterator implements ISpellCheckIterator { + + /** + * The token that denotes whitespace. + * + * @since 3.6 + */ + private static final int WHITE_SPACE_TOKEN= -1; + + /** The content of the region */ + protected final String fContent; + + /** The line delimiter */ + private final String fDelimiter; + + /** The last token */ + protected String fLastToken= null; + + /** The next break */ + protected int fNext= 1; + + /** The offset of the region */ + protected final int fOffset; + + /** The predecessor break */ + private int fPredecessor; + + /** The previous break */ + protected int fPrevious= 0; + + /** The sentence breaks */ + private final LinkedList fSentenceBreaks= new LinkedList(); + + /** Does the current word start a sentence? */ + private boolean fStartsSentence= false; + + /** The successor break */ + protected int fSuccessor; + + /** The word iterator */ + private final BreakIterator fWordIterator; + + private boolean fIsIgnoringSingleLetters; + + /** + * Creates a new spell check iterator. + * + * @param document the document containing the specified partition + * @param region the region to spell check + * @param locale the locale to use for spell checking + */ + public SpellCheckIterator(IDocument document, IRegion region, Locale locale) { + this(document, region, locale, BreakIterator.getWordInstance(locale)); + } + + /** + * Creates a new spell check iterator. + * + * @param document the document containing the specified partition + * @param region the region to spell check + * @param locale the locale to use for spell checking + * @param breakIterator the break-iterator + */ + public SpellCheckIterator(IDocument document, IRegion region, Locale locale, BreakIterator breakIterator) { + fOffset= region.getOffset(); + fWordIterator= breakIterator; + fDelimiter= TextUtilities.getDefaultLineDelimiter(document); + + String content; + try { + + content= document.get(region.getOffset(), region.getLength()); + + } catch (Exception exception) { + content= ""; //$NON-NLS-1$ + } + fContent= content; + + fWordIterator.setText(content); + fPredecessor= fWordIterator.first(); + fSuccessor= fWordIterator.next(); + + final BreakIterator iterator= BreakIterator.getSentenceInstance(locale); + iterator.setText(content); + + int offset= iterator.current(); + while (offset != BreakIterator.DONE) { + + fSentenceBreaks.add(new Integer(offset)); + offset= iterator.next(); + } + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellCheckIterator#setIgnoreSingleLetters(boolean) + * @since 3.3 + */ + public void setIgnoreSingleLetters(boolean state) { + fIsIgnoringSingleLetters= state; + } + + /* + * @see org.eclipse.spelling.done.ISpellCheckIterator#getBegin() + */ + public final int getBegin() { + return fPrevious + fOffset; + } + + /* + * @see org.eclipse.spelling.done.ISpellCheckIterator#getEnd() + */ + public final int getEnd() { + return fNext + fOffset - 1; + } + + /* + * @see java.util.Iterator#hasNext() + */ + public final boolean hasNext() { + return fSuccessor != BreakIterator.DONE; + } + + /** + * Does the specified token consist of at least one letter and digits + * only? + * + * @param begin the begin index + * @param end the end index + * @return true iff the token consists of digits and at + * least one letter only, false otherwise + */ + protected final boolean isAlphaNumeric(final int begin, final int end) { + + char character= 0; + + boolean letter= false; + for (int index= begin; index < end; index++) { + + character= fContent.charAt(index); + if (Character.isLetter(character)) + letter= true; + + if (!Character.isLetterOrDigit(character)) + return false; + } + return letter; + } + + /** + * Checks the last token against the given tags? + * + * @param tags the tags to check + * @return true iff the last token is in the given array + */ + protected final boolean isToken(final String[] tags) { + return isToken(fLastToken, tags); + } + + /** + * Checks the given token against the given tags? + * + * @param token the token to check + * @param tags the tags to check + * @return true iff the last token is in the given array + * @since 3.3 + */ + protected final boolean isToken(final String token, final String[] tags) { + + if (token != null) { + + for (int index= 0; index < tags.length; index++) { + + if (token.equals(tags[index])) + return true; + } + } + return false; + } + + /** + * Is the current token a single letter token surrounded by + * non-whitespace characters? + * + * @param begin the begin index + * @return true iff the token is a single letter token, + * false otherwise + */ + protected final boolean isSingleLetter(final int begin) { + if (!Character.isLetter(fContent.charAt(begin))) + return false; + + if (begin > 0 && !Character.isWhitespace(fContent.charAt(begin - 1))) + return false; + + if (begin < fContent.length() - 1 && !Character.isWhitespace(fContent.charAt(begin + 1))) + return false; + + return true; + } + + /** + * Does the specified token look like an URL? + * + * @param begin the begin index + * @return true iff this token look like an URL, + * false otherwise + */ + protected final boolean isUrlToken(final int begin) { + + for (int index= 0; index < DefaultSpellChecker.URL_PREFIXES.length; index++) { + + if (fContent.startsWith(DefaultSpellChecker.URL_PREFIXES[index], begin)) + return true; + } + return false; + } + + /** + * Does the specified token consist of whitespace only? + * + * @param begin the begin index + * @param end the end index + * @return true iff the token consists of whitespace + * only, false otherwise + */ + protected final boolean isWhitespace(final int begin, final int end) { + + for (int index= begin; index < end; index++) { + + if (!Character.isWhitespace(fContent.charAt(index))) + return false; + } + return true; + } + + /* + * @see java.util.Iterator#next() + */ + public String next() { + + String token= nextToken(); + while (token == null && fSuccessor != BreakIterator.DONE) + token= nextToken(); + + fLastToken= token; + + return token; + } + + /** + * Advances the end index to the next word break. + */ + protected final void nextBreak() { + + fNext= fSuccessor; + fPredecessor= fSuccessor; + + fSuccessor= fWordIterator.next(); + } + + /** + * Returns the next sentence break. + * + * @return the next sentence break + */ + protected final int nextSentence() { + return fSentenceBreaks.getFirst().intValue(); + } + + /** + * Determines the next token to be spell checked. + * + * @return the next token to be spell checked, or null + * iff the next token is not a candidate for spell checking. + */ + protected String nextToken() { + + String token= null; + + fPrevious= fPredecessor; + fStartsSentence= false; + + nextBreak(); + + boolean update= false; + if (fNext - fPrevious > 0) { + + if (fSuccessor != BreakIterator.DONE && fContent.charAt(fPrevious) == IJavaDocTagConstants.JAVADOC_TAG_PREFIX) { + + nextBreak(); + if (Character.isLetter(fContent.charAt(fPrevious + 1))) { + update= true; + token= fContent.substring(fPrevious, fNext); + } else + fPredecessor= fNext; + + } else if (fSuccessor != BreakIterator.DONE && fContent.charAt(fPrevious) == IHtmlTagConstants.HTML_TAG_PREFIX && (Character.isLetter(fContent.charAt(fNext)) || fContent.charAt(fNext) == '/')) { + + if (fContent.startsWith(IHtmlTagConstants.HTML_CLOSE_PREFIX, fPrevious)) + nextBreak(); + + nextBreak(); + + if (fSuccessor != BreakIterator.DONE && fContent.charAt(fNext) == IHtmlTagConstants.HTML_TAG_POSTFIX) { + + nextBreak(); + if (fSuccessor != BreakIterator.DONE) { + update= true; + token= fContent.substring(fPrevious, fNext); + } + } + } else if (fSuccessor != BreakIterator.DONE && fContent.charAt(fPrevious) == IHtmlTagConstants.HTML_ENTITY_START && (Character.isLetter(fContent.charAt(fNext)))) { + nextBreak(); + if (fSuccessor != BreakIterator.DONE && fContent.charAt(fNext) == IHtmlTagConstants.HTML_ENTITY_END) { + nextBreak(); + if (isToken(fContent.substring(fPrevious, fNext), IHtmlTagConstants.HTML_ENTITY_CODES)) { + skipTokens(fPrevious, IHtmlTagConstants.HTML_ENTITY_END); + update= true; + } else + token= fContent.substring(fPrevious, fNext); + } else + token= fContent.substring(fPrevious, fNext); + + update= true; + } else if (!isWhitespace(fPrevious, fNext) && isAlphaNumeric(fPrevious, fNext)) { + + if (isUrlToken(fPrevious)) + skipTokens(fPrevious, WHITE_SPACE_TOKEN); + else if (isToken(IJavaDocTagConstants.JAVADOC_PARAM_TAGS)) + fLastToken= null; + else if (isToken(IJavaDocTagConstants.JAVADOC_REFERENCE_TAGS)) { + fLastToken= null; + skipTokens(fPrevious, fDelimiter.charAt(0)); + } else if (fNext - fPrevious > 1 || isSingleLetter(fPrevious) && !fIsIgnoringSingleLetters) + token= fContent.substring(fPrevious, fNext); + + update= true; + } + } + + if (update && fSentenceBreaks.size() > 0) { + + if (fPrevious >= nextSentence()) { + + while (fSentenceBreaks.size() > 0 && fPrevious >= nextSentence()) + fSentenceBreaks.removeFirst(); + + fStartsSentence= (fLastToken == null) || (token != null); + } + } + return token; + } + + /* + * @see java.util.Iterator#remove() + */ + public final void remove() { + throw new UnsupportedOperationException(); + } + + /** + * Skip the tokens until the stop character is reached. + * + * @param begin the begin index + * @param stop the stop character + */ + protected final void skipTokens(final int begin, final int stop) { + final boolean isStoppingOnWhiteSpace= stop == WHITE_SPACE_TOKEN; + int end= begin; + while (end < fContent.length()) { + char ch= fContent.charAt(end); + if (ch == stop || isStoppingOnWhiteSpace && Character.isWhitespace(ch)) + break; + end++; + } + + if (end < fContent.length()) { + + fNext= end; + fPredecessor= fNext; + + fSuccessor= fWordIterator.following(fNext); + } else + fSuccessor= BreakIterator.DONE; + } + + /* + * @see org.eclipse.spelling.done.ISpellCheckIterator#startsSentence() + */ + public final boolean startsSentence() { + return fStartsSentence; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingEngine.java new file mode 100644 index 0000000..adab1d6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingEngine.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.ui.texteditor.spelling.ISpellingEngine; +import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector; +import org.eclipse.ui.texteditor.spelling.SpellingContext; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckEngine; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellEvent; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellEventListener; + + +/** + * Internal abstract spelling engine, subclasses provide a content-type specific implementation. + * + * @since 3.1 + */ +public abstract class SpellingEngine implements ISpellingEngine { + + /** + * {@link ISpellEvent}listener that forwards events as + * {@link org.eclipse.ui.texteditor.spelling.SpellingProblem}. + */ + protected static class SpellEventListener implements ISpellEventListener { + + /** Spelling problem collector */ + private ISpellingProblemCollector fCollector; + + /** + * The document. + * @since 3.3 + */ + private IDocument fDocument; + + private int fProblemsThreshold; + private int fProblemCount; + + /** + * Initialize with the given spelling problem collector. + * + * @param collector the spelling problem collector + * @param document the document + */ + public SpellEventListener(ISpellingProblemCollector collector, IDocument document) { + fCollector= collector; + fDocument= document; + fProblemsThreshold= 100; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEventListener#handle(org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent) + */ + public void handle(ISpellEvent event) { + if (isProblemsThresholdReached()) + return; + fProblemCount++; + fCollector.accept(new ModulaSpellingProblem(event, fDocument)); + } + + boolean isProblemsThresholdReached() { + return fProblemCount >= fProblemsThreshold; + } + } + + /* + * @see org.eclipse.ui.texteditor.spelling.ISpellingEngine#check(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IRegion[], org.eclipse.ui.texteditor.spelling.SpellingContext, org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector, org.eclipse.core.runtime.IProgressMonitor) + */ + public void check(IDocument document, IRegion[] regions, SpellingContext context, ISpellingProblemCollector collector, IProgressMonitor monitor) { + if (collector != null) { + final ISpellCheckEngine spellingEngine= SpellCheckEngine.getInstance(); + ISpellChecker checker= spellingEngine.getSpellChecker(); + if (checker != null) + check(document, regions, checker, collector, monitor); + } + } + + /** + * Spell checks the given document regions with the given arguments. + * + * @param document the document + * @param regions the regions + * @param checker the spell checker + * @param collector the spelling problem collector + * @param monitor the progress monitor, can be null + */ + protected abstract void check(IDocument document, IRegion[] regions, ISpellChecker checker, ISpellingProblemCollector collector, IProgressMonitor monitor); + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingPreferenceBlock.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingPreferenceBlock.java new file mode 100644 index 0000000..94ff953 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/SpellingPreferenceBlock.java @@ -0,0 +1,557 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +// see org.eclipse.jdt.internal.ui.preferences.SpellingConfigurationBlock + +import java.io.File; +import java.util.ArrayList; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Locale; +import java.util.Set; + +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.variables.IStringVariableManager; +import org.eclipse.core.variables.VariablesPlugin; +import org.eclipse.debug.ui.StringVariableSelectionDialog; +import org.eclipse.jface.dialogs.DialogPage; +import org.eclipse.jface.preference.PreferenceStore; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.FileDialog; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.ide.dialogs.EncodingFieldEditor; +import org.eclipse.ui.texteditor.spelling.IPreferenceStatusMonitor; +import org.eclipse.ui.texteditor.spelling.ISpellingPreferenceBlock; + +import com.excelsior.xds.core.preferences.PreferenceConstants; +import com.excelsior.xds.core.preferences.PreferenceKey; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.commons.utils.SwtUtils; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; + +public class SpellingPreferenceBlock implements ISpellingPreferenceBlock { + + private HashSet hsPrefCBoxes; + private HashSet hsAllControls; + private HashSet hsEnabledControls; + + private ArrayList locValues; + private ArrayList locLabels; + + + private Text fDictionaryPath; + private Text fTextMaxPerFile; + private Text fTextMaxProposals; + private Composite fEncodingEditorParent; + private EncodingFieldEditor fEncodingEditor; + private Combo fCmbLocales; + + private IPreferenceStatusMonitor statusMonitor; + + /** The status for the workspace dictionary file */ + private IStatus fFileStatus = new MyStatus (IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, ""); //$NON-NLS-1$ + + /** The status for the proposal threshold */ + private IStatus fThresholdStatus = new MyStatus (IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, ""); //$NON-NLS-1$ + + /** The status for the encoding field editor */ + private IStatus fEncodingFieldEditorStatus = new MyStatus (IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, ""); //$NON-NLS-1$ + + + public SpellingPreferenceBlock() { + } + + + + @Override + public Control createControl(Composite parent) { + hsPrefCBoxes = new HashSet(); + hsAllControls = new HashSet(); + locValues = new ArrayList(); + locLabels = new ArrayList(); + + Composite composite= new Composite(parent, SWT.NONE); + composite.setLayout(new GridLayout()); + + Group user= new Group(composite, SWT.NONE); + user.setText(Messages.SpellingPreferenceBlock_Options); + user.setLayout(new GridLayout()); + user.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + hsAllControls.add(user); + + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreWordsWithDigits, PreferenceKeys.PKEY_SPELLING_IGNORE_DIGITS); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreMixedCaseWords, PreferenceKeys.PKEY_SPELLING_IGNORE_MIXED); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreCapitalization, PreferenceKeys.PKEY_SPELLING_IGNORE_SENTENCE); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreUpperCaseWords, PreferenceKeys.PKEY_SPELLING_IGNORE_UPPER); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreURLs, PreferenceKeys.PKEY_SPELLING_IGNORE_URLS); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreNonLettersBoundaries, PreferenceKeys.PKEY_SPELLING_IGNORE_NON_LETTERS); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreSingleLetters, PreferenceKeys.PKEY_SPELLING_IGNORE_SINGLE_LETTERS); + new PreferenceCheckbox(user, Messages.SpellingPreferenceBlock_IgnoreM2Strings, PreferenceKeys.PKEY_SPELLING_IGNORE_MODULA_STRINGS); + + final Set locales= SpellCheckEngine.getLocalesWithInstalledDictionaries(); + boolean hasPlaformDictionaries= locales.size() > 0; + + final Group engine= new Group(composite, SWT.NONE); + if (hasPlaformDictionaries) + engine.setText(Messages.SpellingPreferenceBlock_Dictionaries); + else + engine.setText(Messages.SpellingPreferenceBlock_Dictionary); + engine.setLayout(new GridLayout(4, false)); + engine.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + hsAllControls.add(engine); + + if (hasPlaformDictionaries) { + for (final Iterator iterator= locales.iterator(); iterator.hasNext();) { + Locale locale= iterator.next(); + locLabels.add(locale.getDisplayName()); + locValues.add(locale.toString()); + } + locLabels.add(Messages.SpellingPreferenceBlock_none); + locValues.add(PreferenceConstants.PREF_VALUE_NO_LOCALE); + + hsAllControls.add(SWTFactory.createLabel(engine, Messages.SpellingPreferenceBlock_PlatformDictionary + ':', 1)); + + fCmbLocales = SWTFactory.createCombo(engine, 2, SWT.READ_ONLY); + fCmbLocales.setItems(locLabels.toArray(new String[0])); + new Label(engine, SWT.NONE); // placeholder + hsAllControls.add(fCmbLocales); + } + + hsAllControls.add(SWTFactory.createLabel(engine, Messages.SpellingPreferenceBlock_UserDefDictionary + ':', 1)); + fDictionaryPath = SWTFactory.createSingleText(engine, 2); + fDictionaryPath.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validateAbsoluteFilePath(); + } + }); + + Composite buttons=new Composite(engine, SWT.NONE); + buttons.setLayout(new GridLayout(2,true)); + buttons.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); + + Button button= SWTFactory.createPushButton(buttons, Messages.SpellingPreferenceBlock_Browse, null); + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(final SelectionEvent event) { + handleBrowseButtonSelected(); + } + }); + hsAllControls.add(button); + + button= SWTFactory.createPushButton(buttons, Messages.SpellingPreferenceBlock_Variables, null); + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + handleVariablesButtonSelected(); + } + }); + hsAllControls.add(button); + + // Description for user dictionary + new Label(engine, SWT.NONE); // filler + hsAllControls.add(SWTFactory.createLabel(engine, Messages.SpellingPreferenceBlock_UserDictDesc, 3)); + + createEncodingFieldEditor(engine); + + Group advanced= new Group(composite, SWT.NONE); + advanced.setText(Messages.SpellingPreferenceBlock_Advanced); + advanced.setLayout(new GridLayout(3, false)); + advanced.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); + hsAllControls.add(advanced); + + fTextMaxPerFile = createNumEFWithLabel(advanced, Messages.SpellingPreferenceBlock_MaxProblems + ':', 4); + fTextMaxPerFile.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validateTresholds(); + } + }); + + fTextMaxProposals = createNumEFWithLabel(advanced, Messages.SpellingPreferenceBlock_MaxProposals + ':', 4); + fTextMaxProposals.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validateTresholds(); + } + }); + + setAllFromStore(); + return composite; + } + + private Text createNumEFWithLabel(Composite parent, String label, int digits) { + hsAllControls.add(SWTFactory.createLabel(parent, label, 1)); + + Text txt = SWTFactory.createSingleText(parent, 2, SWT.BORDER | SWT.SINGLE); + hsAllControls.add(txt); + + GridData data= new GridData(GridData.HORIZONTAL_ALIGN_FILL); + int wh = SwtUtils.getTextWidth(txt, "0") * (digits+1); //$NON-NLS-1$ + data.widthHint= wh; + data.horizontalSpan= 2; + txt.setLayoutData(data); + + return txt; + } + + private void createEncodingFieldEditor(Composite composite) { + Label filler= new Label(composite, SWT.NONE); + GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan= 4; + filler.setLayoutData(gd); + + Label label= new Label(composite, SWT.NONE); + label.setText(Messages.SpellingPreferenceBlock_Encoding + ':'); + label.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING)); + hsAllControls.add(label); + + fEncodingEditorParent= new Composite(composite, SWT.NONE); + GridLayout layout= new GridLayout(2, false); + layout.marginWidth= 0; + layout.marginHeight= 0; + fEncodingEditorParent.setLayout(layout); + gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan= 3; + fEncodingEditorParent.setLayoutData(gd); + + fEncodingEditor= new EncodingFieldEditor(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING, "", null, fEncodingEditorParent); //$NON-NLS-1$ + + PreferenceStore tmpStore= new PreferenceStore(); + String defaultEncoding= ResourcesPlugin.getEncoding(); + tmpStore.setDefault(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING, defaultEncoding); + String encoding= PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.getStoredValue(); + if (encoding != null && encoding.length() > 0) { + tmpStore.setValue(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING, encoding); + } + fEncodingEditor.setPreferenceStore(tmpStore); + + // Redirect status messages from the field editor to the status change listener + DialogPage fakePage= new DialogPage() { + public void createControl(Composite c) { + } + @Override + public void setErrorMessage(String newMessage) { + if (newMessage != null && !newMessage.isEmpty()) { + fEncodingFieldEditorStatus = new MyStatus(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, newMessage); + } else { + fEncodingFieldEditorStatus = new MyStatus (IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, null); + } + updateStatus(); + } + }; + fEncodingEditor.setPage(fakePage); + + fEncodingEditor.load(); + + if (encoding == null || encoding.equals(defaultEncoding) || encoding.length() == 0) + fEncodingEditor.loadDefault(); + + } + + + @Override + public void initialize(IPreferenceStatusMonitor statusMonitor) { + this.statusMonitor = statusMonitor; + validateAll(); + } + + @Override + public void setEnabled(boolean enabled) { + fEncodingEditor.setEnabled(enabled, fEncodingEditorParent); + + if (enabled && hsEnabledControls != null) { + for (Control ctr : hsEnabledControls) + ctr.setEnabled(true); + hsEnabledControls= null; + } + if (!enabled && hsEnabledControls == null) { + hsEnabledControls = new HashSet(); + for (Control ctr : hsAllControls) { + if (ctr.getEnabled()) { + hsEnabledControls.add(ctr); + ctr.setEnabled(false); + } + } + } + } + + protected void handleVariablesButtonSelected() { + StringVariableSelectionDialog dialog= new StringVariableSelectionDialog(fDictionaryPath.getShell()); + if (dialog.open() == Window.OK) + fDictionaryPath.setText(fDictionaryPath.getText() + dialog.getVariableExpression()); + } + + protected void handleBrowseButtonSelected() { + final FileDialog dialog= new FileDialog(fDictionaryPath.getShell(), SWT.OPEN); + dialog.setText(Messages.SpellingPreferenceBlock_SelectUserDictionary); + dialog.setFilterPath(fDictionaryPath.getText()); + + final String path= dialog.open(); + if (path != null) + fDictionaryPath.setText(path); + } + + + @Override + public boolean canPerformOk() { + return true; + } + + @Override + public void performOk() { + for (PreferenceCheckbox pcb : hsPrefCBoxes) { + pcb.prefKey.setStoredBoolean(pcb.cbox.getSelection()); + } + + PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY.setStoredValue(fDictionaryPath.getText().trim()); + + fEncodingEditor.store(); + if (fEncodingEditor.presentsDefaultValue()) { + PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.setStoredValue(""); //$NON-NLS-1$ + } else { + PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.setStoredValue( + fEncodingEditor.getPreferenceStore().getString(PreferenceConstants.SPELLING_USER_DICTIONARY_ENCODING)); + } + + if (fCmbLocales != null) { + int idx = fCmbLocales.getSelectionIndex(); + PreferenceKeys.PKEY_SPELLING_LOCALE.setStoredValue( + idx >= 0 ? locValues.get(idx) : PreferenceConstants.PREF_VALUE_NO_LOCALE); + } + + PreferenceKeys.PKEY_SPELLING_PROBLEMS_THRESHOLD.setStoredInt(getIntFrom(fTextMaxPerFile)); + PreferenceKeys.PKEY_SPELLING_PROPOSAL_THRESHOLD.setStoredInt(getIntFrom(fTextMaxProposals)); + + SourceCodeTextEditor.refreshEditorsConfiguration(ModulaEditor.class); + } + + private int getIntFrom(Text text) { + String s = text.getText().trim(); + int res = -1; + for (int i=0; i < s.length(); ++i) { + char ch = s.charAt(i); + if (ch >= '0' && ch <= '9') { + if (res < 0) { + res = ch - '0'; + } else { + res = res * 10 + ch - '0'; + } + } else { + res = -1; + break; + } + } + return res; + } + + + private void selLocale(String locValue) { + if (fCmbLocales != null) { + + Locale locale= SpellCheckEngine.convertToLocale(locValue); + locale= SpellCheckEngine.findClosestLocale(locale); + if (locale != null) { + locValue= locale.toString(); + } else { + locValue= PreferenceConstants.PREF_VALUE_NO_LOCALE; + } + + int idx = 0; + for (String v : locValues) { + if (v.equals(locValue)) { + fCmbLocales.select(idx); + return; + } + ++idx; + } + fCmbLocales.select(fCmbLocales.getItemCount() - 1); // err? select 'none' (it is the last) + } + } + + + @Override + public void performDefaults() { + for (PreferenceCheckbox pcb : hsPrefCBoxes) { + pcb.cbox.setSelection(pcb.prefKey.getDefBooleanValue()); + } + + fDictionaryPath.setText(PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY.getDefStringValue()); + + String enc = PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.getDefStringValue(); + fEncodingEditor.getPreferenceStore().setValue(fEncodingEditor.getPreferenceName(), enc); + if (enc.isEmpty()) { + fEncodingEditor.loadDefault(); + } else { + fEncodingEditor.load(); + } + + selLocale(PreferenceConstants.PREF_VALUE_NO_LOCALE); + + fTextMaxPerFile.setText("" + PreferenceKeys.PKEY_SPELLING_PROBLEMS_THRESHOLD.getDefIntValue()); // $//$NON-NLS-1$ + fTextMaxProposals.setText("" + PreferenceKeys.PKEY_SPELLING_PROPOSAL_THRESHOLD.getDefIntValue()); // $//$NON-NLS-1$ + + validateAll(); + } + + @Override + public void performRevert() { + setAllFromStore(); + } + + @Override + public void dispose() { + } + + private void setAllFromStore() { + for (PreferenceCheckbox pcb : hsPrefCBoxes) { + pcb.cbox.setSelection(pcb.prefKey.getStoredBoolean()); + } + + fDictionaryPath.setText(PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY.getStoredValue()); + + String enc = PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.getStoredValue(); + fEncodingEditor.getPreferenceStore().setValue(fEncodingEditor.getPreferenceName(), enc); + if (enc.isEmpty()) { + fEncodingEditor.loadDefault(); + } else { + fEncodingEditor.load(); + } + + selLocale(PreferenceKeys.PKEY_SPELLING_LOCALE.getStoredValue()); + + fTextMaxPerFile.setText("" + PreferenceKeys.PKEY_SPELLING_PROBLEMS_THRESHOLD.getStoredInt()); // $//$NON-NLS-1$ + fTextMaxProposals.setText("" + PreferenceKeys.PKEY_SPELLING_PROPOSAL_THRESHOLD.getStoredInt()); // $//$NON-NLS-1$ + + validateAll(); + } + + + private void validateAll() { + validateAbsoluteFilePath(); + validateTresholds(); + updateStatus(); + } + + + private void validateAbsoluteFilePath() { + MyStatus ms = new MyStatus(IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, null); + String path = fDictionaryPath == null ? "" : fDictionaryPath.getText().trim(); //$NON-NLS-1$ + if (!path.isEmpty()) { + IStringVariableManager variableManager= VariablesPlugin.getDefault().getStringVariableManager(); + try { + path= variableManager.performStringSubstitution(path); + if (path.length() > 0) { + final File file= new File(path); + if (!file.exists() || !file.isFile() || !file.isAbsolute() || !file.canRead()) { + ms = new MyStatus(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.SpellingPreferenceBlock_BadDictFile); + } else if (!file.getParentFile().canWrite() || !file.canWrite()) { + ms = new MyStatus(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.SpellingPreferenceBlock_RWAccessRequired); + } + } + } catch (CoreException e) { + ms = new MyStatus(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, e.getLocalizedMessage()); + } + } + + if (ms.matches(IStatus.ERROR) || fFileStatus.matches(IStatus.ERROR)) { + fFileStatus = ms; + updateStatus(); + } + } + + private void validateTresholds() { + MyStatus ms = new MyStatus(IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, null); + for (Text text : new Text[]{fTextMaxPerFile, fTextMaxProposals}) { + if (text != null) { + int v = getIntFrom(text); + if (v < 0) { + String s = text.getText().trim(); + ms = new MyStatus(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, + s.isEmpty() ? Messages.SpellingPreferenceBlock_NumberRequired : + String.format(Messages.SpellingPreferenceBlock_InvalidInt, s)); + break; + } + } + + } + if (ms.matches(IStatus.ERROR) || fThresholdStatus.matches(IStatus.ERROR)) { + fThresholdStatus = ms; + updateStatus(); + } + } + + private void updateStatus() { + if (statusMonitor != null) { + IStatus status[] = new IStatus[] { fThresholdStatus, fFileStatus, fEncodingFieldEditorStatus }; + IStatus max= null; + for (int i= 0; i < status.length; i++) { + IStatus curr= status[i]; + if (curr.matches(IStatus.ERROR)) { + max = curr; + break; + } + if (max == null || curr.getSeverity() > max.getSeverity()) { + max= curr; + } + } + + statusMonitor.statusChanged(max); + } + } + + private class MyStatus extends Status { + + public MyStatus(int severity, String pluginId, String message) { + super(severity, pluginId, message); + messageWithNull = "".equals(message) ? null : message; //$NON-NLS-1$ + } + + private String messageWithNull; + + @Override + protected void setMessage(String message) { + messageWithNull = message; + super.setMessage(message); + } + + @Override + public String getMessage() { + return messageWithNull; + } + + + } + + private class PreferenceCheckbox { + private Button cbox; + private PreferenceKey prefKey; + + public PreferenceCheckbox(Composite parent, String label, PreferenceKey prefKey) { + this.prefKey = prefKey; + cbox = SWTFactory.createCheckbox(parent, label, 1); + hsAllControls.add(cbox); + hsPrefCBoxes.add(this); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/TextSpellingEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/TextSpellingEngine.java new file mode 100644 index 0000000..6e64938 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/TextSpellingEngine.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; + +/** + * Text spelling engine + * + * @since 3.1 + */ +public class TextSpellingEngine extends SpellingEngine { + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.SpellingEngine#check(org.eclipse.jface.text.IDocument, org.eclipse.jface.text.IRegion[], org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker, org.eclipse.ui.texteditor.spelling.ISpellingProblemCollector, org.eclipse.core.runtime.IProgressMonitor) + */ + @Override + protected void check(IDocument document, IRegion[] regions, ISpellChecker checker, ISpellingProblemCollector collector, IProgressMonitor monitor) { + SpellEventListener listener= new SpellEventListener(collector, document); + for (int i= 0; i < regions.length; i++) { + if (monitor != null && monitor.isCanceled()) + return; + if (listener.isProblemsThresholdReached()) + return; + checker.execute(listener, new SpellCheckIterator(document, regions[i], checker.getLocale())); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordCorrectionProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordCorrectionProposal.java new file mode 100644 index 0000000..292a764 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordCorrectionProposal.java @@ -0,0 +1,173 @@ +/******************************************************************************* + * Copyright (c) 2000, 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; +import com.excelsior.xds.ui.images.ImageUtils; + +/** + * Proposal to correct the incorrectly spelled word. + * + * @since 3.0 + */ +public class WordCorrectionProposal implements ICompletionProposal { + + /** + * Returns the html representation of the specified string. + * + * @param string + * The string to return the html representation for + * @return The html representation for the string + */ + public static String getHtmlRepresentation(final String string) { + + final int length= string.length(); + final StringBuffer buffer= new StringBuffer(string); + + for (int offset= length - 1; offset >= 0; offset--) { + + for (int index= 0; index < IHtmlTagConstants.HTML_ENTITY_CHARACTERS.length; index++) { + + if (string.charAt(offset) == IHtmlTagConstants.HTML_ENTITY_CHARACTERS[index]) { + + buffer.replace(offset, offset + 1, String.valueOf(IHtmlTagConstants.HTML_ENTITY_CODES[index])); + break; + } + } + } + return buffer.toString(); + } + + /** The invocation context */ + private final IQuickAssistInvocationContext fContext; + + /** The length in the document */ + private final int fLength; + + /** The line where to apply the correction */ + private final String fLine; + + /** The offset in the document */ + private final int fOffset; + + /** The relevance of this proposal */ + private final int fRelevance; + + /** The word to complete */ + private final String fWord; + + /** + * Creates a new word correction proposal. + * + * @param word the corrected word + * @param arguments the problem arguments associated with the spelling problem + * @param offset the offset in the document where to apply the proposal + * @param length the lenght in the document to apply the proposal + * @param context the invocation context for this proposal + * @param relevance the relevance of this proposal + */ + public WordCorrectionProposal(final String word, final String[] arguments, final int offset, final int length, final IQuickAssistInvocationContext context, final int relevance) { + + fWord= Character.isUpperCase(arguments[0].charAt(0)) ? Character.toUpperCase(word.charAt(0)) + word.substring(1) : word; + + fOffset= offset; + fLength= length; + fContext= context; + fRelevance= relevance; + + final StringBuffer buffer= new StringBuffer(80); + + buffer.append("...
"); //$NON-NLS-1$ + buffer.append(getHtmlRepresentation(arguments[1])); + buffer.append(""); //$NON-NLS-1$ + buffer.append(getHtmlRepresentation(fWord)); + buffer.append(""); //$NON-NLS-1$ + buffer.append(getHtmlRepresentation(arguments[2])); + buffer.append("
..."); //$NON-NLS-1$ + + fLine= buffer.toString(); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument) + */ + public final void apply(final IDocument document) { + try { + document.replace(fOffset, fLength, fWord); + } catch (BadLocationException exception) { + // Do nothing + } + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return fLine; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation() + */ + public final IContextInformation getContextInformation() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + return String.format(Messages.Spelling_correct_label, fWord); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() + */ + public Image getImage() { + return ImageUtils.getImage(ImageUtils.CORRECTION_RENAME); + } + + /* + * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() + */ + public final int getRelevance() { + return fRelevance; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument) + */ + public final Point getSelection(final IDocument document) { + + int offset= fContext.getOffset(); + int length= fContext.getLength(); + + final int delta= fWord.length() - fLength; + if (offset <= fOffset && offset + length >= fOffset) + length += delta; + else if (offset > fOffset && offset + length > fOffset + fLength) { + offset += delta; + length -= delta; + } else + length += delta; + + return new Point(offset, length); + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordIgnoreProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordIgnoreProposal.java new file mode 100644 index 0000000..d4828d1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/WordIgnoreProposal.java @@ -0,0 +1,112 @@ +/******************************************************************************* + * Copyright (c) 2000, 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal; + +import java.text.MessageFormat; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.quickassist.IQuickAssistInvocationContext; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; +import org.eclipse.ui.texteditor.spelling.SpellingProblem; + +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellCheckEngine; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine.ISpellChecker; +import com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.Messages; +import com.excelsior.xds.ui.images.ImageUtils; + +/** + * Proposal to ignore the word during the current editing session. + * + * @since 3.0 + */ +public class WordIgnoreProposal implements ICompletionProposal { + + /** The invocation context */ + private IQuickAssistInvocationContext fContext; + + /** The word to ignore */ + private String fWord; + + /** + * Creates a new spell ignore proposal. + * + * @param word + * The word to ignore + * @param context + * The invocation context + */ + public WordIgnoreProposal(final String word, final IQuickAssistInvocationContext context) { + fWord= word; + fContext= context; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#apply(org.eclipse.jface.text.IDocument) + */ + public final void apply(final IDocument document) { + + final ISpellCheckEngine engine= SpellCheckEngine.getInstance(); + final ISpellChecker checker= engine.getSpellChecker(); + + if (checker != null) { + checker.ignoreWord(fWord); + ISourceViewer sourceViewer= fContext.getSourceViewer(); + if (sourceViewer != null) + SpellingProblem.removeAll(sourceViewer, fWord); + } + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return MessageFormat.format(Messages.Spelling_ignore_info, new Object[] { WordCorrectionProposal.getHtmlRepresentation(fWord)}); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getContextInformation() + */ + public final IContextInformation getContextInformation() { + return null; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + return MessageFormat.format(Messages.Spelling_ignore_label, new Object[] { fWord }); + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getImage() + */ + public Image getImage() { + return ImageUtils.getImage(ImageUtils.CORRECTION_TURN_OFF); + } + /* + * @see org.eclipse.jdt.ui.text.java.IJavaCompletionProposal#getRelevance() + */ + public final int getRelevance() { + return Integer.MIN_VALUE + 1; + } + + /* + * @see org.eclipse.jface.text.contentassist.ICompletionProposal#getSelection(org.eclipse.jface.text.IDocument) + */ + public final Point getSelection(final IDocument document) { + return new Point(fContext.getOffset(), fContext.getLength()); + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/AbstractSpellDictionary.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/AbstractSpellDictionary.java new file mode 100644 index 0000000..a884fb0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/AbstractSpellDictionary.java @@ -0,0 +1,742 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.io.BufferedReader; +import java.io.FileNotFoundException; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.UnsupportedEncodingException; +import java.net.MalformedURLException; +import java.net.URL; +import java.nio.charset.Charset; +import java.nio.charset.CharsetDecoder; +import java.nio.charset.CodingErrorAction; +import java.nio.charset.MalformedInputException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; + + +/** + * Partial implementation of a spell dictionary. + * + * @since 3.0 + */ +public abstract class AbstractSpellDictionary implements ISpellDictionary { + + /** + * Byte array wrapper + * @since 3.6 + */ + private static class ByteArrayWrapper { + + private static int hashCode(byte[] array) { + int prime= 31; + if (array == null) + return 0; + int result= 1; + for (int index= 0; index < array.length; index++) { + result= prime * result + array[index]; + } + return result; + } + + private byte[] byteArray; + + public ByteArrayWrapper(byte[] byteArray) { + this.byteArray= byteArray; + } + @Override + public int hashCode() { + final int prime= 31; + int result= 1; + result= prime * result + ByteArrayWrapper.hashCode(byteArray); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (!(obj instanceof ByteArrayWrapper)) + return false; + ByteArrayWrapper other= (ByteArrayWrapper)obj; + if (!Arrays.equals(byteArray, other.byteArray)) + return false; + return true; + } + } + + + /** + * Canonical name for UTF-8 encoding + * @since 3.6 + */ + private static final String UTF_8= "UTF-8"; //$NON-NLS-1$ + + /** The bucket capacity */ + protected static final int BUCKET_CAPACITY= 4; + + /** The word buffer capacity */ + protected static final int BUFFER_CAPACITY= 32; + + /** The distance threshold */ + protected static final int DISTANCE_THRESHOLD= 160; + + /** + * The hash load factor + * @since 3.6 + */ + protected static final float LOAD_FACTOR= 0.85f; + + /** The phonetic distance algorithm */ + private IPhoneticDistanceAlgorithm fDistanceAlgorithm= new DefaultPhoneticDistanceAlgorithm(); + + /** The mapping from phonetic hashes to word lists */ + private final Map fHashBuckets= new HashMap(getInitialSize(), LOAD_FACTOR); + + /** The phonetic hash provider */ + private IPhoneticHashProvider fHashProvider= new DefaultPhoneticHashProvider(); + + /** Is the dictionary already loaded? */ + private boolean fLoaded= false; + /** + * Must the dictionary be loaded? + * @since 3.2 + */ + private boolean fMustLoad= true; + + /** + * Tells whether to strip non-letters at word boundaries. + * @since 3.3 + */ + boolean fIsStrippingNonLetters= true; + + /** + * Returns the initial size of dictionary. + * + * @return The initial size of dictionary. + * @since 3.6 + */ + protected int getInitialSize() { + return 32; + } + + /** + * Returns all candidates with the same phonetic hash. + * + * @param hash + * The hash to retrieve the candidates of + * @return Array of candidates for the phonetic hash + */ + protected final Object getCandidates(final String hash) { + ByteArrayWrapper hashBytes; + try { + hashBytes= new ByteArrayWrapper(hash.getBytes(UTF_8)); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return null; + } + return fHashBuckets.get(hashBytes); + } + + /** + * Returns all candidates that have a phonetic hash within a bounded + * distance to the specified word. + * + * @param word + * The word to find the nearest matches for + * @param sentence + * true iff the proposals start a new sentence, + * false otherwise + * @param hashs + * Array of close hashes to find the matches + * @return Set of ranked words with bounded distance to the specified word + */ + protected final Set getCandidates(final String word, final boolean sentence, final ArrayList hashs) { + + int distance= 0; + String hash= null; + + final StringBuffer buffer= new StringBuffer(BUFFER_CAPACITY); + final HashSet result= new HashSet(BUCKET_CAPACITY * hashs.size()); + + for (int index= 0; index < hashs.size(); index++) { + + hash= hashs.get(index); + + final Object candidates= getCandidates(hash); + if (candidates == null) + continue; + else if (candidates instanceof byte[]) { + String candidate; + try { + candidate= new String((byte[])candidates, UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return result; + } + distance= fDistanceAlgorithm.getDistance(word, candidate); + if (distance < DISTANCE_THRESHOLD) { + buffer.setLength(0); + buffer.append(candidate); + if (sentence) + buffer.setCharAt(0, Character.toUpperCase(buffer.charAt(0))); + result.add(new RankedWordProposal(buffer.toString(), -distance)); + } + continue; + } + + @SuppressWarnings("unchecked") + final ArrayList candidateList= (ArrayList)candidates; + int candidateSize= Math.min(500, candidateList.size()); // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=195357 + for (int offset= 0; offset < candidateSize; offset++) { + + String candidate; + try { + candidate= new String(candidateList.get(offset), UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return result; + } + distance= fDistanceAlgorithm.getDistance(word, candidate); + + if (distance < DISTANCE_THRESHOLD) { + + buffer.setLength(0); + buffer.append(candidate); + + if (sentence) + buffer.setCharAt(0, Character.toUpperCase(buffer.charAt(0))); + + result.add(new RankedWordProposal(buffer.toString(), -distance)); + } + } + } + return result; + } + + /** + * Returns all approximations that have a phonetic hash with smallest + * possible distance to the specified word. + * + * @param word + * The word to find the nearest matches for + * @param sentence + * true iff the proposals start a new sentence, + * false otherwise + * @param result + * Set of ranked words with smallest possible distance to the + * specified word + */ + protected final void getCandidates(final String word, final boolean sentence, final Set result) { + + int distance= 0; + int minimum= Integer.MAX_VALUE; + + StringBuffer buffer= new StringBuffer(BUFFER_CAPACITY); + + final Object candidates= getCandidates(fHashProvider.getHash(word)); + if (candidates == null) + return; + else if (candidates instanceof byte[]) { + String candidate; + try { + candidate= new String((byte[])candidates, UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return; + } + distance= fDistanceAlgorithm.getDistance(word, candidate); + buffer.append(candidate); + if (sentence) + buffer.setCharAt(0, Character.toUpperCase(buffer.charAt(0))); + result.add(new RankedWordProposal(buffer.toString(), -distance)); + return; + } + + @SuppressWarnings("unchecked") + final ArrayList candidateList= (ArrayList)candidates; + final ArrayList matches= new ArrayList(candidateList.size()); + + for (int index= 0; index < candidateList.size(); index++) { + String candidate; + try { + candidate= new String(candidateList.get(index), UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return; + } + distance= fDistanceAlgorithm.getDistance(word, candidate); + + if (distance <= minimum) { + + if (distance < minimum) + matches.clear(); + + buffer.setLength(0); + buffer.append(candidate); + + if (sentence) + buffer.setCharAt(0, Character.toUpperCase(buffer.charAt(0))); + + matches.add(new RankedWordProposal(buffer.toString(), -distance)); + minimum= distance; + } + } + + result.addAll(matches); + } + + /** + * Tells whether this dictionary is empty. + * + * @return true if this dictionary is empty + * @since 3.3 + */ + protected boolean isEmpty() { + return fHashBuckets.size() == 0; + } + + /** + * Returns the used phonetic distance algorithm. + * + * @return The phonetic distance algorithm + */ + protected final IPhoneticDistanceAlgorithm getDistanceAlgorithm() { + return fDistanceAlgorithm; + } + + /** + * Returns the used phonetic hash provider. + * + * @return The phonetic hash provider + */ + protected final IPhoneticHashProvider getHashProvider() { + return fHashProvider; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#getProposals(java.lang.String,boolean) + */ + public Set getProposals(final String word, final boolean sentence) { + + try { + + if (!fLoaded) { + synchronized (this) { + fLoaded= load(getURL()); + if (fLoaded) + compact(); + } + } + + } catch (MalformedURLException exception) { + // Do nothing + } + + final String hash= fHashProvider.getHash(word); + final char[] mutators= fHashProvider.getMutators(); + + final ArrayList neighborhood= new ArrayList((word.length() + 1) * (mutators.length + 2)); + neighborhood.add(hash); + + final Set candidates= getCandidates(word, sentence, neighborhood); + neighborhood.clear(); + + char previous= 0; + char next= 0; + + char[] characters= word.toCharArray(); + for (int index= 0; index < word.length() - 1; index++) { + + next= characters[index]; + previous= characters[index + 1]; + + characters[index]= previous; + characters[index + 1]= next; + + neighborhood.add(fHashProvider.getHash(new String(characters))); + + characters[index]= next; + characters[index + 1]= previous; + } + + final String sentinel= word + " "; //$NON-NLS-1$ + + characters= sentinel.toCharArray(); + int offset= characters.length - 1; + + while (true) { + + for (int index= 0; index < mutators.length; index++) { + + characters[offset]= mutators[index]; + neighborhood.add(fHashProvider.getHash(new String(characters))); + } + + if (offset == 0) + break; + + characters[offset]= characters[offset - 1]; + --offset; + } + + char mutated= 0; + characters= word.toCharArray(); + + for (int index= 0; index < word.length(); index++) { + + mutated= characters[index]; + for (int mutator= 0; mutator < mutators.length; mutator++) { + + characters[index]= mutators[mutator]; + neighborhood.add(fHashProvider.getHash(new String(characters))); + } + characters[index]= mutated; + } + + characters= word.toCharArray(); + final char[] deleted= new char[characters.length - 1]; + + for (int index= 0; index < deleted.length; index++) + deleted[index]= characters[index]; + + next= characters[characters.length - 1]; + offset= deleted.length; + + while (true) { + + neighborhood.add(fHashProvider.getHash(new String(characters))); + if (offset == 0) + break; + + previous= next; + next= deleted[offset - 1]; + + deleted[offset - 1]= previous; + --offset; + } + + neighborhood.remove(hash); + final Set matches= getCandidates(word, sentence, neighborhood); + + if (matches.size() == 0 && candidates.size() == 0) + getCandidates(word, sentence, candidates); + + candidates.addAll(matches); + + return candidates; + } + + /** + * Returns the URL of the dictionary word list. + * + * @throws MalformedURLException + * if the URL could not be retrieved + * @return The URL of the dictionary word list + */ + protected abstract URL getURL() throws MalformedURLException; + + /** + * Hashes the word into the dictionary. + * + * @param word + * The word to hash in the dictionary + */ + protected final void hashWord(final String word) { + + final String hash= fHashProvider.getHash(word); + ByteArrayWrapper hashBytes; + byte[] wordBytes; + try { + hashBytes= new ByteArrayWrapper(hash.getBytes(UTF_8)); + wordBytes= word.getBytes(UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return; + } + + Object bucket= fHashBuckets.get(hashBytes); + + if (bucket == null) { + fHashBuckets.put(hashBytes, wordBytes); + } else if (bucket instanceof ArrayList) { + @SuppressWarnings("unchecked") + ArrayList bucketList= (ArrayList)bucket; + bucketList.add(wordBytes); + } else { + ArrayList list= new ArrayList(BUCKET_CAPACITY); + list.add(bucket); + list.add(wordBytes); + fHashBuckets.put(hashBytes, list); + } + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#isCorrect(java.lang.String) + */ + public boolean isCorrect(String word) { + word= stripNonLetters(word); + try { + + if (!fLoaded) { + synchronized (this) { + fLoaded= load(getURL()); + if (fLoaded) + compact(); + } + } + + } catch (MalformedURLException exception) { + // Do nothing + } + + final Object candidates= getCandidates(fHashProvider.getHash(word)); + if (candidates == null) + return false; + else if (candidates instanceof byte[]) { + String candidate; + try { + candidate= new String((byte[])candidates, UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return false; + } + if (candidate.equals(word) || candidate.equals(word.toLowerCase())) + return true; + return false; + } + @SuppressWarnings("unchecked") + final ArrayList candidateList= (ArrayList)candidates; + byte[] wordBytes; + byte[] lowercaseWordBytes; + try { + wordBytes= word.getBytes(UTF_8); + lowercaseWordBytes= word.toLowerCase().getBytes(UTF_8); + } catch (UnsupportedEncodingException e) { + LogHelper.logError(e); + return false; + } + for (int index= 0; index < candidateList.size(); index++) { + byte[] candidate= candidateList.get(index); + if (Arrays.equals(candidate, wordBytes) || Arrays.equals(candidate, lowercaseWordBytes)) { + return true; + } + } + return false; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#setStripNonLetters(boolean) + * @since 3.3 + */ + public void setStripNonLetters(boolean state) { + fIsStrippingNonLetters= state; + } + + /** + * Strips non-letter characters from the given word. + *

+ * This will only happen if the corresponding preference is enabled. + *

+ * + * @param word the word to strip + * @return the stripped word + * @since 3.3 + */ + protected String stripNonLetters(String word) { + if (!fIsStrippingNonLetters) + return word; + + int i= 0; + int j= word.length() - 1; + while (i <= j && !Character.isLetter(word.charAt(i))) + i++; + if (i > j) + return ""; //$NON-NLS-1$ + + while (j > i && !Character.isLetter(word.charAt(j))) + j--; + + return word.substring(i, j+1); + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellDictionary#isLoaded() + */ + public synchronized final boolean isLoaded() { + return fLoaded || fHashBuckets.size() > 0; + } + + /** + * Loads a dictionary word list from disk. + * + * @param url + * The URL of the word list to load + * @return true iff the word list could be loaded, false + * otherwise + */ + protected synchronized boolean load(final URL url) { + if (!fMustLoad) + return fLoaded; + + if (url != null) { + InputStream stream= null; + int line= 0; + try { + stream= url.openStream(); + if (stream != null) { + String word= null; + + // Setup a reader with a decoder in order to read over malformed input if needed. + CharsetDecoder decoder= Charset.forName(getEncoding()).newDecoder(); + decoder.onMalformedInput(CodingErrorAction.REPORT); + decoder.onUnmappableCharacter(CodingErrorAction.REPORT); + final BufferedReader reader= new BufferedReader(new InputStreamReader(stream, decoder)); + + boolean doRead= true; + while (doRead) { + try { + word= reader.readLine(); + } catch (MalformedInputException ex) { + // Tell the decoder to replace malformed input in order to read the line. + decoder.onMalformedInput(CodingErrorAction.REPLACE); + decoder.reset(); + word= reader.readLine(); + decoder.onMalformedInput(CodingErrorAction.REPORT); + +// String message= Messages.format(JavaUIMessages.AbstractSpellingDictionary_encodingError, new String[] { word, decoder.replacement(), BasicElementLabels.getURLPart(url.toString()) }); + String message = "Encoding error"; + IStatus status= new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, IStatus.OK, message, ex); + LogHelper.log(status); + + doRead= word != null; + continue; + } + doRead= word != null; + if (doRead) + hashWord(word); + } + return true; + } + } catch (FileNotFoundException ex) { + String urlString= url.toString(); + String lowercaseUrlString= urlString.toLowerCase(); + if (urlString.equals(lowercaseUrlString)) + LogHelper.logError(ex); + else + try { + return load(new URL(lowercaseUrlString)); + } catch (MalformedURLException e) { + LogHelper.logError(e); + } + } catch (IOException exception) { + if (line > 0) { +// String message= Messages.format(JavaUIMessages.AbstractSpellingDictionary_encodingError, new Object[] { new Integer(line), BasicElementLabels.getURLPart(url.toString()) }); + String message = "Encoding error"; + + IStatus status= new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, IStatus.OK, message, exception); + LogHelper.log(status); + } else + LogHelper.logError(exception); + } finally { + fMustLoad= false; + try { + if (stream != null) + stream.close(); + } catch (IOException x) { + } + } + } + return false; + } + + /** + * Compacts the dictionary. + * + * @since 3.3. + */ + private void compact() { + Iterator iter= fHashBuckets.values().iterator(); + while (iter.hasNext()) { + Object element= iter.next(); + if (element instanceof ArrayList) + ((ArrayList)element).trimToSize(); + } + } + + /** + * Sets the phonetic distance algorithm to use. + * + * @param algorithm + * The phonetic distance algorithm + */ + protected final void setDistanceAlgorithm(final IPhoneticDistanceAlgorithm algorithm) { + fDistanceAlgorithm= algorithm; + } + + /** + * Sets the phonetic hash provider to use. + * + * @param provider + * The phonetic hash provider + */ + protected final void setHashProvider(final IPhoneticHashProvider provider) { + fHashProvider= provider; + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellDictionary#unload() + */ + public synchronized void unload() { + fLoaded= false; + fMustLoad= true; + fHashBuckets.clear(); + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellDictionary#acceptsWords() + */ + public boolean acceptsWords() { + return false; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#addWord(java.lang.String) + */ + public void addWord(final String word) { + // Do nothing + } + + /** + * Returns the encoding of this dictionary. + * + * @return the encoding of this dictionary + * @since 3.3 + */ + protected abstract String getEncoding(); + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticDistanceAlgorithm.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticDistanceAlgorithm.java new file mode 100644 index 0000000..f56c836 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticDistanceAlgorithm.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2000, 2007 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +/** + * Default phonetic distance algorithm for English words. + *

+ * This algorithm implements the Levenshtein text edit distance. + *

+ * + * @since 3.0 + */ +public final class DefaultPhoneticDistanceAlgorithm implements IPhoneticDistanceAlgorithm { + + /** The change case cost */ + public static final int COST_CASE= 10; + + /** The insert character cost */ + public static final int COST_INSERT= 95; + + /** The remove character cost */ + public static final int COST_REMOVE= 95; + + /** The substitute characters cost */ + public static final int COST_SUBSTITUTE= 100; + + /** The swap characters cost */ + public static final int COST_SWAP= 90; + + /* + * @see org.eclipse.spelling.done.IPhoneticDistanceAlgorithm#getDistance(java.lang.String,java.lang.String) + */ + public final int getDistance(final String from, final String to) { + + final char[] first= (" " + from).toCharArray(); //$NON-NLS-1$ + final char[] second= (" " + to).toCharArray(); //$NON-NLS-1$ + + final int rows= first.length; + final int columns= second.length; + + final int[][] metric= new int[rows][columns]; + for (int column= 1; column < columns; column++) + metric[0][column]= metric[0][column - 1] + COST_REMOVE; + + for (int row= 1; row < rows; row++) + metric[row][0]= metric[row - 1][0] + COST_INSERT; + + char source, target; + + int swap= Integer.MAX_VALUE; + int change= Integer.MAX_VALUE; + + int minimum, diagonal, insert, remove; + for (int row= 1; row < rows; row++) { + + source= first[row]; + for (int column= 1; column < columns; column++) { + + target= second[column]; + diagonal= metric[row - 1][column - 1]; + + if (source == target) { + metric[row][column]= diagonal; + continue; + } + + change= Integer.MAX_VALUE; + if (Character.toLowerCase(source) == Character.toLowerCase(target)) + change= COST_CASE + diagonal; + + swap= Integer.MAX_VALUE; + if (row != 1 && column != 1 && source == second[column - 1] && first[row - 1] == target) + swap= COST_SWAP + metric[row - 2][column - 2]; + + minimum= COST_SUBSTITUTE + diagonal; + if (swap < minimum) + minimum= swap; + + remove= metric[row][column - 1]; + if (COST_REMOVE + remove < minimum) + minimum= COST_REMOVE + remove; + + insert= metric[row - 1][column]; + if (COST_INSERT + insert < minimum) + minimum= COST_INSERT + insert; + if (change < minimum) + minimum= change; + + metric[row][column]= minimum; + } + } + return metric[rows - 1][columns - 1]; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticHashProvider.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticHashProvider.java new file mode 100644 index 0000000..a5d380b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultPhoneticHashProvider.java @@ -0,0 +1,683 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +/** + * Default phonetic hash provider for english languages. + *

+ * This algorithm uses an adapted version double metaphone algorithm by + * Lawrence Philips. + *

+ * + * @since 3.0 + */ +public final class DefaultPhoneticHashProvider implements IPhoneticHashProvider { + + private static final String[] meta01= { "ACH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta02= { "BACHER", "MACHER", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta03= { "CAESAR", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta04= { "CHIA", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta05= { "CH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta06= { "CHAE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta07= { "HARAC", "HARIS", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta08= { "HOR", "HYM", "HIA", "HEM", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + private static final String[] meta09= { "CHORE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta10= { "VAN ", "VON ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta11= { "SCH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta12= { "ORCHES", "ARCHIT", "ORCHID", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta13= { "T", "S", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta14= { "A", "O", "U", "E", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + private static final String[] meta15= { "L", "R", "N", "M", "B", "H", "F", "V", "W", " ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ + private static final String[] meta16= { "MC", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta17= { "CZ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta18= { "WICZ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta19= { "CIA", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta20= { "CC", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta21= { "I", "E", "H", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta22= { "HU", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta23= { "UCCEE", "UCCES", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta24= { "CK", "CG", "CQ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta25= { "CI", "CE", "CY", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta26= { "GN", "KN", "PN", "WR", "PS", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ + private static final String[] meta27= { " C", " Q", " G", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta28= { "C", "K", "Q", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta29= { "CE", "CI", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta30= { "DG", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta31= { "I", "E", "Y", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta32= { "DT", "DD", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta33= { "B", "H", "D", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta34= { "B", "H", "D", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta35= { "B", "H", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta36= { "C", "G", "L", "R", "T", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ + private static final String[] meta37= { "EY", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta38= { "LI", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta39= { "ES", "EP", "EB", "EL", "EY", "IB", "IL", "IN", "IE", "EI", "ER", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ //$NON-NLS-10$ //$NON-NLS-11$ //$NON-NLS-12$ + private static final String[] meta40= { "ER", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta41= { "DANGER", "RANGER", "MANGER", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta42= { "E", "I", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta43= { "RGY", "OGY", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta44= { "E", "I", "Y", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta45= { "AGGI", "OGGI", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta46= { "VAN ", "VON ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta47= { "SCH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta48= { "ET", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta49= { "C", "X", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta50= { "JOSE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta51= { "SAN ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta52= { "SAN ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta53= { "JOSE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta54= { "L", "T", "K", "S", "N", "M", "B", "Z", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ + private static final String[] meta55= { "S", "K", "L", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta56= { "ILLO", "ILLA", "ALLE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta57= { "AS", "OS", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta58= { "A", "O", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta59= { "ALLE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta60= { "UMB", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta61= { "ER", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta62= { "P", "B", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta63= { "IE", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta64= { "ME", "MA", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta65= { "ISL", "YSL", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta66= { "SUGAR", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta67= { "SH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta68= { "HEIM", "HOEK", "HOLM", "HOLZ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + private static final String[] meta69= { "SIO", "SIA", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta70= { "SIAN", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta71= { "M", "N", "L", "W", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + private static final String[] meta72= { "Z", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta73= { "Z", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta74= { "SC", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta75= { "OO", "ER", "EN", "UY", "ED", "EM", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ + private static final String[] meta76= { "ER", "EN", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta77= { "I", "E", "Y", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + private static final String[] meta78= { "AI", "OI", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta79= { "S", "Z", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta80= { "TION", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta81= { "TIA", "TCH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta82= { "TH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta83= { "TTH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta84= { "OM", "AM", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta85= { "VAN ", "VON ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta86= { "SCH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta87= { "T", "D", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta88= { "WR", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta89= { "WH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta90= { "EWSKI", "EWSKY", "OWSKI", "OWSKY", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ + private static final String[] meta91= { "SCH", "" }; //$NON-NLS-1$ //$NON-NLS-2$ + private static final String[] meta92= { "WICZ", "WITZ", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta93= { "IAU", "EAU", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta94= { "AU", "OU", "" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + private static final String[] meta95= { "W", "K", "CZ", "WITZ" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + + /** The mutator characters */ + private static final char[] MUTATOR_CHARACTERS= { 'A', 'B', 'X', 'S', 'K', 'J', 'T', 'F', 'H', 'L', 'M', 'N', 'P', 'R', '0' }; + + /** The vowel characters */ + private static final char[] VOWEL_CHARACTERS= new char[] { 'A', 'E', 'I', 'O', 'U', 'Y' }; + + /** + * Test whether the specified string contains one of the candidates in the + * list. + * + * @param candidates + * Array of candidates to check + * @param token + * The token to check for occurrences of the candidates + * @param offset + * The offset where to begin checking in the string + * @param length + * The length of the range in the string to check + * @return true iff the string contains one of the + * candidates, false otherwise. + */ + protected static final boolean hasOneOf(final String[] candidates, final char[] token, final int offset, final int length) { + + if (offset < 0 || offset >= token.length || candidates.length == 0) + return false; + + final String checkable= new String(token, offset, length); + for (int index= 0; index < candidates.length; index++) { + + if (candidates[index].equals(checkable)) + return true; + } + return false; + } + + /** + * Test whether the specified token contains one of the candidates in the + * list. + * + * @param candidates + * Array of candidates to check + * @param token + * The token to check for occurrences of the candidates + * @return true iff the string contains one of the + * candidates, false otherwise. + */ + protected static final boolean hasOneOf(final String[] candidates, final String token) { + + for (int index= 0; index < candidates.length; index++) { + + if (token.indexOf(candidates[index]) >= 0) + return true; + } + return false; + } + + /** + * Tests whether the specified token contains a vowel at the specified + * offset. + * + * @param token + * The token to check for a vowel + * @param offset + * The offset where to begin checking in the token + * @param length + * The length of the range in the token to check + * @return true iff the token contains a vowel, false + * otherwise. + */ + protected static final boolean hasVowel(final char[] token, final int offset, final int length) { + + if (offset >= 0 && offset < length) { + + final char character= token[offset]; + for (int index= 0; index < VOWEL_CHARACTERS.length; index++) { + + if (VOWEL_CHARACTERS[index] == character) + return true; + } + } + return false; + } + + /* + * @see org.eclipse.spelling.done.IPhoneticHasher#getHash(java.lang.String) + */ + public final String getHash(final String word) { + + final String input= word.toUpperCase() + " "; //$NON-NLS-1$ + final char[] hashable= input.toCharArray(); + + final boolean has95= hasOneOf(meta95, input); + final StringBuffer buffer= new StringBuffer(hashable.length); + + int offset= 0; + if (hasOneOf(meta26, hashable, 0, 2)) + offset += 1; + + if (hashable[0] == 'X') { + buffer.append('S'); + offset += 1; + } + + while (offset < hashable.length) { + + switch (hashable[offset]) { + case 'A' : + case 'E' : + case 'I' : + case 'O' : + case 'U' : + case 'Y' : + if (offset == 0) + buffer.append('A'); + offset += 1; + break; + case 'B' : + buffer.append('P'); + if (hashable[offset + 1] == 'B') + offset += 2; + else + offset += 1; + break; + case 'C' : + if ((offset > 1) && !hasVowel(hashable, offset - 2, hashable.length) && hasOneOf(meta01, hashable, (offset - 1), 3) && (hashable[offset + 2] != 'I') && (hashable[offset + 2] != 'E') || hasOneOf(meta02, hashable, (offset - 2), 6)) { + buffer.append('K'); + offset += 2; + break; + } + if ((offset == 0) && hasOneOf(meta03, hashable, offset, 6)) { + buffer.append('S'); + offset += 2; + break; + } + if (hasOneOf(meta04, hashable, offset, 4)) { + buffer.append('K'); + offset += 2; + break; + } + if (hasOneOf(meta05, hashable, offset, 2)) { + if ((offset > 0) && hasOneOf(meta06, hashable, offset, 4)) { + buffer.append('K'); + offset += 2; + break; + } + if ((offset == 0) && hasOneOf(meta07, hashable, (offset + 1), 5) || hasOneOf(meta08, hashable, offset + 1, 3) && !hasOneOf(meta09, hashable, 0, 5)) { + buffer.append('K'); + offset += 2; + break; + } + if (hasOneOf(meta10, hashable, 0, 4) || hasOneOf(meta11, hashable, 0, 3) || hasOneOf(meta12, hashable, offset - 2, 6) || hasOneOf(meta13, hashable, offset + 2, 1) || (hasOneOf(meta14, hashable, offset - 1, 1) || (offset == 0)) && hasOneOf(meta15, hashable, offset + 2, 1)) { + buffer.append('K'); + } else { + if (offset > 0) { + if (hasOneOf(meta16, hashable, 0, 2)) + buffer.append('K'); + else + buffer.append('X'); + } else { + buffer.append('X'); + } + } + offset += 2; + break; + } + if (hasOneOf(meta17, hashable, offset, 2) && !hasOneOf(meta18, hashable, offset, 4)) { + buffer.append('S'); + offset += 2; + break; + } + if (hasOneOf(meta19, hashable, offset, 2)) { + buffer.append('X'); + offset += 2; + break; + } + if (hasOneOf(meta20, hashable, offset, 2) && !((offset == 1) && hashable[0] == 'M')) { + if (hasOneOf(meta21, hashable, offset + 2, 1) && !hasOneOf(meta22, hashable, offset + 2, 2)) { + if (((offset == 1) && (hashable[offset - 1] == 'A')) || hasOneOf(meta23, hashable, (offset - 1), 5)) + buffer.append("KS"); //$NON-NLS-1$ + else + buffer.append('X'); + offset += 3; + break; + } else { + buffer.append('K'); + offset += 2; + break; + } + } + if (hasOneOf(meta24, hashable, offset, 2)) { + buffer.append('K'); + offset += 2; + break; + } else if (hasOneOf(meta25, hashable, offset, 2)) { + buffer.append('S'); + offset += 2; + break; + } + buffer.append('K'); + if (hasOneOf(meta27, hashable, offset + 1, 2)) + offset += 3; + else if (hasOneOf(meta28, hashable, offset + 1, 1) && !hasOneOf(meta29, hashable, offset + 1, 2)) + offset += 2; + else + offset += 1; + break; + case '\u00C7' : + buffer.append('S'); + offset += 1; + break; + case 'D' : + if (hasOneOf(meta30, hashable, offset, 2)) { + if (hasOneOf(meta31, hashable, offset + 2, 1)) { + buffer.append('J'); + offset += 3; + break; + } else { + buffer.append("TK"); //$NON-NLS-1$ + offset += 2; + break; + } + } + buffer.append('T'); + if (hasOneOf(meta32, hashable, offset, 2)) { + offset += 2; + } else { + offset += 1; + } + break; + case 'F' : + if (hashable[offset + 1] == 'F') + offset += 2; + else + offset += 1; + buffer.append('F'); + break; + case 'G' : + if (hashable[offset + 1] == 'H') { + if ((offset > 0) && !hasVowel(hashable, offset - 1, hashable.length)) { + buffer.append('K'); + offset += 2; + break; + } + if (offset < 3) { + if (offset == 0) { + if (hashable[offset + 2] == 'I') + buffer.append('J'); + else + buffer.append('K'); + offset += 2; + break; + } + } + if ((offset > 1) && hasOneOf(meta33, hashable, offset - 2, 1) || ((offset > 2) && hasOneOf(meta34, hashable, offset - 3, 1)) || ((offset > 3) && hasOneOf(meta35, hashable, offset - 4, 1))) { + offset += 2; + break; + } else { + if ((offset > 2) && (hashable[offset - 1] == 'U') && hasOneOf(meta36, hashable, offset - 3, 1)) { + buffer.append('F'); + } else { + if ((offset > 0) && (hashable[offset - 1] != 'I')) + buffer.append('K'); + } + offset += 2; + break; + } + } + if (hashable[offset + 1] == 'N') { + if ((offset == 1) && hasVowel(hashable, 0, hashable.length) && !has95) { + buffer.append("KN"); //$NON-NLS-1$ + } else { + if (!hasOneOf(meta37, hashable, offset + 2, 2) && (hashable[offset + 1] != 'Y') && !has95) { + buffer.append("N"); //$NON-NLS-1$ + } else { + buffer.append("KN"); //$NON-NLS-1$ + } + } + offset += 2; + break; + } + if (hasOneOf(meta38, hashable, offset + 1, 2) && !has95) { + buffer.append("KL"); //$NON-NLS-1$ + offset += 2; + break; + } + if ((offset == 0) && ((hashable[offset + 1] == 'Y') || hasOneOf(meta39, hashable, offset + 1, 2))) { + buffer.append('K'); + offset += 2; + break; + } + if ((hasOneOf(meta40, hashable, offset + 1, 2) || (hashable[offset + 1] == 'Y')) && !hasOneOf(meta41, hashable, 0, 6) && !hasOneOf(meta42, hashable, offset - 1, 1) && !hasOneOf(meta43, hashable, offset - 1, 3)) { + buffer.append('K'); + offset += 2; + break; + } + if (hasOneOf(meta44, hashable, offset + 1, 1) || hasOneOf(meta45, hashable, offset - 1, 4)) { + if (hasOneOf(meta46, hashable, 0, 4) || hasOneOf(meta47, hashable, 0, 3) || hasOneOf(meta48, hashable, offset + 1, 2)) { + buffer.append('K'); + } else { + buffer.append('J'); + } + offset += 2; + break; + } + if (hashable[offset + 1] == 'G') + offset += 2; + else + offset += 1; + buffer.append('K'); + break; + case 'H' : + if (((offset == 0) || hasVowel(hashable, offset - 1, hashable.length)) && hasVowel(hashable, offset + 1, hashable.length)) { + buffer.append('H'); + offset += 2; + } else { + offset += 1; + } + break; + case 'J' : + if (hasOneOf(meta50, hashable, offset, 4) || hasOneOf(meta51, hashable, 0, 4)) { + if ((offset == 0) && (hashable[offset + 4] == ' ') || hasOneOf(meta52, hashable, 0, 4)) { + buffer.append('H'); + } else { + buffer.append('J'); + } + offset += 1; + break; + } + if ((offset == 0) && !hasOneOf(meta53, hashable, offset, 4)) { + buffer.append('J'); + } else { + if (hasVowel(hashable, offset - 1, hashable.length) && !has95 && ((hashable[offset + 1] == 'A') || hashable[offset + 1] == 'O')) { + buffer.append('J'); + } else { + if (offset == (hashable.length - 1)) { + buffer.append('J'); + } else { + if (!hasOneOf(meta54, hashable, offset + 1, 1) && !hasOneOf(meta55, hashable, offset - 1, 1)) { + buffer.append('J'); + } + } + } + } + if (hashable[offset + 1] == 'J') + offset += 2; + else + offset += 1; + break; + case 'K' : + if (hashable[offset + 1] == 'K') + offset += 2; + else + offset += 1; + buffer.append('K'); + break; + case 'L' : + if (hashable[offset + 1] == 'L') { + if (((offset == (hashable.length - 3)) && hasOneOf(meta56, hashable, offset - 1, 4)) || ((hasOneOf(meta57, hashable, (hashable.length - 1) - 1, 2) || hasOneOf(meta58, hashable, hashable.length - 1, 1)) && hasOneOf(meta59, hashable, offset - 1, 4))) { + buffer.append('L'); + offset += 2; + break; + } + offset += 2; + } else + offset += 1; + buffer.append('L'); + break; + case 'M' : + if ((hasOneOf(meta60, hashable, offset - 1, 3) && (((offset + 1) == (hashable.length - 1)) || hasOneOf(meta61, hashable, offset + 2, 2))) || (hashable[offset + 1] == 'M')) + offset += 2; + else + offset += 1; + buffer.append('M'); + break; + case 'N' : + if (hashable[offset + 1] == 'N') + offset += 2; + else + offset += 1; + buffer.append('N'); + break; + case '\u00D1' : + offset += 1; + buffer.append('N'); + break; + case 'P' : + if (hashable[offset + 1] == 'N') { + buffer.append('F'); + offset += 2; + break; + } + if (hasOneOf(meta62, hashable, offset + 1, 1)) + offset += 2; + else + offset += 1; + buffer.append('P'); + break; + case 'Q' : + if (hashable[offset + 1] == 'Q') + offset += 2; + else + offset += 1; + buffer.append('K'); + break; + case 'R' : + if (!((offset == (hashable.length - 1)) && !has95 && hasOneOf(meta63, hashable, offset - 2, 2) && !hasOneOf(meta64, hashable, offset - 4, 2))) + buffer.append('R'); + if (hashable[offset + 1] == 'R') + offset += 2; + else + offset += 1; + break; + case 'S' : + if (hasOneOf(meta65, hashable, offset - 1, 3)) { + offset += 1; + break; + } + if ((offset == 0) && hasOneOf(meta66, hashable, offset, 5)) { + buffer.append('X'); + offset += 1; + break; + } + if (hasOneOf(meta67, hashable, offset, 2)) { + if (hasOneOf(meta68, hashable, offset + 1, 4)) + buffer.append('S'); + else + buffer.append('X'); + offset += 2; + break; + } + if (hasOneOf(meta69, hashable, offset, 3) || hasOneOf(meta70, hashable, offset, 4)) { + buffer.append('S'); + offset += 3; + break; + } + if (((offset == 0) && hasOneOf(meta71, hashable, offset + 1, 1)) || hasOneOf(meta72, hashable, offset + 1, 1)) { + buffer.append('S'); + if (hasOneOf(meta73, hashable, offset + 1, 1)) + offset += 2; + else + offset += 1; + break; + } + if (hasOneOf(meta74, hashable, offset, 2)) { + if (hashable[offset + 2] == 'H') + if (hasOneOf(meta75, hashable, offset + 3, 2)) { + if (hasOneOf(meta76, hashable, offset + 3, 2)) { + buffer.append("X"); //$NON-NLS-1$ + } else { + buffer.append("SK"); //$NON-NLS-1$ + } + offset += 3; + break; + } else { + buffer.append('X'); + offset += 3; + break; + } + if (hasOneOf(meta77, hashable, offset + 2, 1)) { + buffer.append('S'); + offset += 3; + break; + } + buffer.append("SK"); //$NON-NLS-1$ + offset += 3; + break; + } + if (!((offset == (hashable.length - 1)) && hasOneOf(meta78, hashable, offset - 2, 2))) + buffer.append('S'); + if (hasOneOf(meta79, hashable, offset + 1, 1)) + offset += 2; + else + offset += 1; + break; + case 'T' : + if (hasOneOf(meta80, hashable, offset, 4)) { + buffer.append('X'); + offset += 3; + break; + } + if (hasOneOf(meta81, hashable, offset, 3)) { + buffer.append('X'); + offset += 3; + break; + } + if (hasOneOf(meta82, hashable, offset, 2) || hasOneOf(meta83, hashable, offset, 3)) { + if (hasOneOf(meta84, hashable, (offset + 2), 2) || hasOneOf(meta85, hashable, 0, 4) || hasOneOf(meta86, hashable, 0, 3)) { + buffer.append('T'); + } else { + buffer.append('0'); + } + offset += 2; + break; + } + if (hasOneOf(meta87, hashable, offset + 1, 1)) { + offset += 2; + } else + offset += 1; + buffer.append('T'); + break; + case 'V' : + if (hashable[offset + 1] == 'V') + offset += 2; + else + offset += 1; + buffer.append('F'); + break; + case 'W' : + if (hasOneOf(meta88, hashable, offset, 2)) { + buffer.append('R'); + offset += 2; + break; + } + if ((offset == 0) && (hasVowel(hashable, offset + 1, hashable.length) || hasOneOf(meta89, hashable, offset, 2))) { + buffer.append('A'); + } + if (((offset == (hashable.length - 1)) && hasVowel(hashable, offset - 1, hashable.length)) || hasOneOf(meta90, hashable, offset - 1, 5) || hasOneOf(meta91, hashable, 0, 3)) { + buffer.append('F'); + offset += 1; + break; + } + if (hasOneOf(meta92, hashable, offset, 4)) { + buffer.append("TS"); //$NON-NLS-1$ + offset += 4; + break; + } + offset += 1; + break; + case 'X' : + if (!((offset == (hashable.length - 1)) && (hasOneOf(meta93, hashable, offset - 3, 3) || hasOneOf(meta94, hashable, offset - 2, 2)))) + buffer.append("KS"); //$NON-NLS-1$ + if (hasOneOf(meta49, hashable, offset + 1, 1)) + offset += 2; + else + offset += 1; + break; + case 'Z' : + if (hashable[offset + 1] == 'H') { + buffer.append('J'); + offset += 2; + break; + } else { + buffer.append('S'); + } + if (hashable[offset + 1] == 'Z') + offset += 2; + else + offset += 1; + break; + default : + offset += 1; + } + } + return buffer.toString(); + } + + /* + * @see org.eclipse.spelling.done.IPhoneticHasher#getMutators() + */ + public final char[] getMutators() { + return MUTATOR_CHARACTERS; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultSpellChecker.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultSpellChecker.java new file mode 100644 index 0000000..82b1e59 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/DefaultSpellChecker.java @@ -0,0 +1,334 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Collections; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Locale; +import java.util.Set; + +import org.eclipse.core.runtime.Assert; + +import com.excelsior.xds.core.preferences.PreferenceKeys; + + +/** + * Default spell checker for standard text. + * + * @since 3.0 + */ +public class DefaultSpellChecker implements ISpellChecker { + + /** Array of URL prefixes */ + public static final String[] URL_PREFIXES= new String[] { "http://", "https://", "www.", "ftp://", "ftps://", "news://", "mailto://" }; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ + + /** + * Does this word contain digits? + * + * @param word the word to check + * @return true iff this word contains digits, false> otherwise + */ + protected static boolean isDigits(final String word) { + + for (int index= 0; index < word.length(); index++) { + + if (Character.isDigit(word.charAt(index))) + return true; + } + return false; + } + + /** + * Does this word contain mixed-case letters? + * + * @param word + * The word to check + * @param sentence + * true iff the specified word starts a new + * sentence, false otherwise + * @return true iff the contains mixed-case letters, false + * otherwise + */ + protected static boolean isMixedCase(final String word, final boolean sentence) { + + final int length= word.length(); + boolean upper= Character.isUpperCase(word.charAt(0)); + + if (sentence && upper && (length > 1)) + upper= Character.isUpperCase(word.charAt(1)); + + if (upper) { + + for (int index= length - 1; index > 0; index--) { + if (Character.isLowerCase(word.charAt(index))) + return true; + } + } else { + + for (int index= length - 1; index > 0; index--) { + if (Character.isUpperCase(word.charAt(index))) + return true; + } + } + return false; + } + + /** + * Does this word contain upper-case letters only? + * + * @param word + * The word to check + * @return true iff this word only contains upper-case + * letters, false otherwise + */ + protected static boolean isUpperCase(final String word) { + + for (int index= word.length() - 1; index >= 0; index--) { + + if (Character.isLowerCase(word.charAt(index))) + return false; + } + return true; + } + + /** + * Does this word look like an URL? + * + * @param word + * The word to check + * @return true iff this word looks like an URL, false + * otherwise + */ + protected static boolean isUrl(final String word) { + + for (int index= 0; index < URL_PREFIXES.length; index++) { + + if (word.startsWith(URL_PREFIXES[index])) + return true; + } + return false; + } + + /** + * The dictionaries to use for spell checking. Synchronized to avoid + * concurrent modifications. + */ + private final Set fDictionaries= Collections.synchronizedSet(new HashSet()); + + /** + * The words to be ignored. Synchronized to avoid concurrent modifications. + */ + private final Set fIgnored= Collections.synchronizedSet(new HashSet()); + + /** + * The locale of this checker. + * @since 3.3 + */ + private Locale fLocale; + + /** + * Creates a new default spell checker. + * + * @param store the preference store for this spell checker + * @param locale the locale + */ + public DefaultSpellChecker(Locale locale) { + Assert.isLegal(locale != null); + + fLocale= locale; + } + + /* + * @see org.eclipse.spelling.done.ISpellChecker#addDictionary(org.eclipse.spelling.done.ISpellDictionary) + */ + public final void addDictionary(final ISpellDictionary dictionary) { + // synchronizing is necessary as this is a write access + fDictionaries.add(dictionary); + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellChecker#acceptsWords() + */ + public boolean acceptsWords() { + // synchronizing might not be needed here since acceptWords is + // a read-only access and only called in the same thread as + // the modifying methods add/checkWord (?) + Set copy; + synchronized (fDictionaries) { + copy= new HashSet(fDictionaries); + } + + ISpellDictionary dictionary= null; + for (final Iterator iterator= copy.iterator(); iterator.hasNext();) { + + dictionary= iterator.next(); + if (dictionary.acceptsWords()) + return true; + } + return false; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker#addWord(java.lang.String) + */ + public void addWord(final String word) { + // synchronizing is necessary as this is a write access + Set copy; + synchronized (fDictionaries) { + copy= new HashSet(fDictionaries); + } + + final String addable= word.toLowerCase(); + for (final Iterator iterator= copy.iterator(); iterator.hasNext();) { + ISpellDictionary dictionary= iterator.next(); + if (dictionary.acceptsWords()) + dictionary.addWord(addable); + } + + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.ISpellChecker#checkWord(java.lang.String) + */ + public final void checkWord(final String word) { + // synchronizing is necessary as this is a write access + fIgnored.remove(word.toLowerCase()); + } + + /* + * @see org.eclipse.spelling.done.ISpellChecker#execute(org.eclipse.spelling.ISpellCheckTokenizer) + */ + public void execute(final ISpellEventListener listener, final ISpellCheckIterator iterator) { + + final boolean ignoreDigits= PreferenceKeys.PKEY_SPELLING_IGNORE_DIGITS.getStoredBoolean(); + final boolean ignoreMixed= PreferenceKeys.PKEY_SPELLING_IGNORE_MIXED.getStoredBoolean(); + final boolean ignoreSentence= PreferenceKeys.PKEY_SPELLING_IGNORE_SENTENCE.getStoredBoolean(); + final boolean ignoreUpper= PreferenceKeys.PKEY_SPELLING_IGNORE_UPPER.getStoredBoolean(); + final boolean ignoreURLS= PreferenceKeys.PKEY_SPELLING_IGNORE_URLS.getStoredBoolean(); + final boolean ignoreNonLetters= PreferenceKeys.PKEY_SPELLING_IGNORE_NON_LETTERS.getStoredBoolean(); + final boolean ignoreSingleLetters= PreferenceKeys.PKEY_SPELLING_IGNORE_SINGLE_LETTERS.getStoredBoolean(); + final int problemsThreshold= PreferenceKeys.PKEY_SPELLING_PROBLEMS_THRESHOLD.getStoredInt(); + + iterator.setIgnoreSingleLetters(ignoreSingleLetters); + + Iterator iter= fDictionaries.iterator(); + while (iter.hasNext()) + iter.next().setStripNonLetters(ignoreNonLetters); + + String word= null; + boolean starts= false; + int problemCount= 0; + + while (problemCount <= problemsThreshold && iterator.hasNext()) { + + word= iterator.next(); + if (word != null) { + + // synchronizing is necessary as this is called inside the reconciler + if (!fIgnored.contains(word)) { + + starts= iterator.startsSentence(); + if (!isCorrect(word)) { + + boolean isMixed= isMixedCase(word, true); + boolean isUpper= isUpperCase(word); + boolean isDigits= isDigits(word); + boolean isURL= isUrl(word); + + if ( !ignoreMixed && isMixed || !ignoreUpper && isUpper || !ignoreDigits && isDigits || !ignoreURLS && isURL || !(isMixed || isUpper || isDigits || isURL)) { + listener.handle(new SpellEvent(this, word, iterator.getBegin(), iterator.getEnd(), starts, false)); + problemCount++; + } + + } else { + + if (!ignoreSentence && starts && Character.isLowerCase(word.charAt(0))) { + listener.handle(new SpellEvent(this, word, iterator.getBegin(), iterator.getEnd(), true, true)); + problemCount++; + } + } + } + } + } + } + + /* + * @see org.eclipse.spelling.done.ISpellChecker#getProposals(java.lang.String,boolean) + */ + public Set getProposals(final String word, final boolean sentence) { + + // synchronizing might not be needed here since getProposals is + // a read-only access and only called in the same thread as + // the modifing methods add/removeDictionary (?) + Set copy; + synchronized (fDictionaries) { + copy= new HashSet(fDictionaries); + } + + ISpellDictionary dictionary= null; + final HashSet proposals= new HashSet(); + + for (final Iterator iterator= copy.iterator(); iterator.hasNext();) { + + dictionary= iterator.next(); + proposals.addAll(dictionary.getProposals(word, sentence)); + } + return proposals; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker#ignoreWord(java.lang.String) + */ + public final void ignoreWord(final String word) { + // synchronizing is necessary as this is a write access + fIgnored.add(word.toLowerCase()); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker#isCorrect(java.lang.String) + */ + public final boolean isCorrect(final String word) { + // synchronizing is necessary as this is called from execute + Set copy; + synchronized (fDictionaries) { + copy= new HashSet(fDictionaries); + } + + if (fIgnored.contains(word.toLowerCase())) + return true; + + ISpellDictionary dictionary= null; + for (final Iterator iterator= copy.iterator(); iterator.hasNext();) { + + dictionary= iterator.next(); + if (dictionary.isCorrect(word)) + return true; + } + return false; + } + + /* + * @see org.eclipse.spelling.done.ISpellChecker#removeDictionary(org.eclipse.spelling.done.ISpellDictionary) + */ + public final void removeDictionary(final ISpellDictionary dictionary) { + // synchronizing is necessary as this is a write access + fDictionaries.remove(dictionary); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellChecker#getLocale() + * @since 3.3 + */ + public Locale getLocale() { + return fLocale; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticDistanceAlgorithm.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticDistanceAlgorithm.java new file mode 100644 index 0000000..454fc01 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticDistanceAlgorithm.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +/** + * Interface of algorithms to compute the phonetic distance between two words. + * + * @since 3.0 + */ +public interface IPhoneticDistanceAlgorithm { + + /** + * Returns the non-negative phonetic distance between two words + * + * @param from + * The first word + * @param to + * The second word + * @return The non-negative phonetic distance between the words. + */ + public int getDistance(String from, String to); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticHashProvider.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticHashProvider.java new file mode 100644 index 0000000..e7e36f8 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/IPhoneticHashProvider.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +/** + * Interface of hashers to compute the phonetic hash for a word. + * + * @since 3.0 + */ +public interface IPhoneticHashProvider { + + /** + * Returns the phonetic hash for the word. + * + * @param word + * The word to get the phonetic hash for + * @return The phonetic hash for the word + */ + public String getHash(String word); + + /** + * Returns an array of characters to compute possible mutations. + * + * @return Array of possible mutator characters + */ + public char[] getMutators(); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckEngine.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckEngine.java new file mode 100644 index 0000000..0cb6db9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckEngine.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright (c) 2000, 2008 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Locale; + +/** + * Interface for a spell check engine. + *

+ * This engine can be configured with multiple + * dictionaries. + *

+ * + * @since 3.0 + */ +public interface ISpellCheckEngine { + + /** + * Returns a spell checker configured with the global + * dictionaries and the locale dictionary that correspond to the current + * {@linkplain PreferenceConstants#SPELLING_LOCALE locale preference}. + *

+ * Note: Changes to the spelling engine dictionaries + * are not propagated to this spell checker.

+ * + * @return a configured instance of the spell checker or null if none + * @throws IllegalStateException if called after being shut down + */ + ISpellChecker getSpellChecker() throws IllegalStateException; + + /** + * Returns the locale of the current spell check engine. + * + * @return the locale of the current spell check engine + */ + Locale getLocale(); + + /** + * Registers a global dictionary. + * + * @param dictionary the global dictionary to register + */ + void registerGlobalDictionary(ISpellDictionary dictionary); + + /** + * Registers a dictionary tuned for the specified locale with this engine. + * + * @param locale + * The locale to register the dictionary with + * @param dictionary + * The dictionary to register + */ + void registerDictionary(Locale locale, ISpellDictionary dictionary); + + /** + * Shuts down this spell check engine and its associated components. + *

+ * Further calls to this engine result in exceptions. + *

+ */ + void shutdown(); + + /** + * Unregisters a dictionary previously registered either by a call to + * registerDictionary(Locale,ISpellDictionary) or registerDictionary(ISpellDictionary). + *

+ * If the dictionary was not registered before, nothing happens.

+ * + * @param dictionary the dictionary to unregister + */ + void unregisterDictionary(ISpellDictionary dictionary); + +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckIterator.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckIterator.java new file mode 100644 index 0000000..ca93c88 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellCheckIterator.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Iterator; + +/** + * Interface for iterators used for spell checking. + * + * @since 3.0 + */ +public interface ISpellCheckIterator extends Iterator { + + /** + * Returns the begin index (inclusive) of the current word. + * + * @return The begin index of the current word + */ + public int getBegin(); + + /** + * Returns the end index (exclusive) of the current word. + * + * @return The end index of the current word + */ + public int getEnd(); + + /** + * Does the current word start a new sentence? + * + * @return true iff the current word starts a new sentence, false otherwise + */ + public boolean startsSentence(); + + /** + * Tells whether to ignore single letters + * from being checked. + * + * @since 3.3 + * @param state true if single letters should be ignored + */ + public void setIgnoreSingleLetters(boolean state); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellChecker.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellChecker.java new file mode 100644 index 0000000..1c77e91 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellChecker.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Locale; +import java.util.Set; + +/** + * Interface for spell checkers. + * + * @since 3.0 + */ +public interface ISpellChecker { + + /** + * Adds a dictionary to the list of active dictionaries. + * + * @param dictionary + * The dictionary to add + */ + void addDictionary(ISpellDictionary dictionary); + + /** + * Returns whether this spell checker accepts word additions. + * + * @return true if word additions are accepted, false otherwise + */ + boolean acceptsWords(); + + /** + * Adds the specified word to the set of correct words. + * + * @param word + * The word to add to the set of correct words + */ + void addWord(String word); + + /** + * Checks the specified word until calling ignoreWord(String). + * + * @param word + * The word to check + */ + void checkWord(String word); + + /** + * Checks the spelling with the spell check iterator. Implementations must + * be thread safe as this may be called inside a reconciler thread. + * + * @param listener the spell event listener + * @param iterator the iterator to use for spell checking + */ + void execute(ISpellEventListener listener, ISpellCheckIterator iterator); + + /** + * Returns the ranked proposals for a word. + * + * @param word + * The word to retrieve the proposals for + * @param sentence + * true iff the proposals should start a + * sentence, false otherwise + * @return Set of ranked proposals for the word + */ + Set getProposals(String word, boolean sentence); + + /** + * Ignores the specified word until calling checkWord(String). + * + * @param word + * The word to ignore + */ + void ignoreWord(String word); + + /** + * Is the specified word correctly spelled? Implementations must be thread + * safe as this may be called from within a reconciler thread. + * + * @param word + * The word to check its spelling + * @return true iff the word is correctly spelled, false + * otherwise + */ + boolean isCorrect(String word); + + /** + * Remove a dictionary from the list of active dictionaries. + * + * @param dictionary + * The dictionary to remove + */ + void removeDictionary(ISpellDictionary dictionary); + + /** + * Returns the current locale of the spell check engine. + * + * @return The current locale of the engine + * @since 3.3 + */ + Locale getLocale(); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellDictionary.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellDictionary.java new file mode 100644 index 0000000..53df4eb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellDictionary.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Set; + +/** + * Interface of dictionaries to use for spell checking. + * + * @since 3.0 + */ +public interface ISpellDictionary { + + /** + * Returns whether this dictionary accepts new words. + * + * @return true if this dictionary accepts new words, false otherwise + */ + public boolean acceptsWords(); + + /** + * Externalizes the specified word. + * + * @param word + * The word to externalize in the dictionary + */ + public void addWord(String word); + + /** + * Returns the ranked word proposals for an incorrectly spelled word. + * + * @param word + * The word to retrieve the proposals for + * @param sentence + * true iff the proposals start a new sentence, + * false otherwise + * @return Array of ranked word proposals + */ + public Set getProposals(String word, boolean sentence); + + /** + * Is the specified word correctly spelled? + * + * @param word the word to spell check + * @return true iff this word is correctly spelled, false otherwise + */ + public boolean isCorrect(String word); + + /** + * Is the dictionary loaded? + * + * @return true iff it is loaded, false otherwise + */ + public boolean isLoaded(); + + /** + * Empties the dictionary. + */ + public void unload(); + + /** + * Tells whether to strip non-letters from word boundaries. + * + * @param state true if non-letters should be stripped + * @since 3.3 + */ + public void setStripNonLetters(boolean state); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEvent.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEvent.java new file mode 100644 index 0000000..4303bdd --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEvent.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Set; + +/** + * Event fired by spell checkers. + * + * @since 3.0 + */ +public interface ISpellEvent { + + /** + * Returns the begin index of the incorrectly spelled word. + * + * @return The begin index of the word + */ + public int getBegin(); + + /** + * Returns the end index of the incorrectly spelled word. + * + * @return The end index of the word + */ + public int getEnd(); + + /** + * Returns the proposals for the incorrectly spelled word. + * + * @return Array of proposals for the word + */ + public Set getProposals(); + + /** + * Returns the incorrectly spelled word. + * + * @return The incorrect word + */ + public String getWord(); + + /** + * Was the incorrectly spelled word found in the dictionary? + * + * @return true iff the word was found, false otherwise + */ + public boolean isMatch(); + + /** + * Does the incorrectly spelled word start a new sentence? + * + * @return true iff the word starts a new sentence, false otherwise + */ + public boolean isStart(); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEventListener.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEventListener.java new file mode 100644 index 0000000..87bc02f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/ISpellEventListener.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright (c) 2000, 2005 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + + +/** + * Interface for spell event listeners. + * + * @since 3.0 + */ +public interface ISpellEventListener { + + /** + * Handles a spell event. + * + * @param event + * Event to handle + */ + public void handle(ISpellEvent event); +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/LocaleSensitiveSpellDictionary.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/LocaleSensitiveSpellDictionary.java new file mode 100644 index 0000000..45b2acb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/LocaleSensitiveSpellDictionary.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.net.MalformedURLException; +import java.net.URL; +import java.util.Locale; + + +/** + * Platform wide read-only locale sensitive dictionary for spell checking. + * + * @since 3.0 + */ +public class LocaleSensitiveSpellDictionary extends AbstractSpellDictionary { + + /** The locale of this dictionary */ + private final Locale fLocale; + + /** The location of the dictionaries */ + private final URL fLocation; + + /** + * Creates a new locale sensitive spell dictionary. + * + * @param locale + * The locale for this dictionary + * @param location + * The location of the locale sensitive dictionaries + */ + public LocaleSensitiveSpellDictionary(final Locale locale, final URL location) { + fLocation= location; + fLocale= locale; + } + + /** + * Returns the locale of this dictionary. + * + * @return The locale of this dictionary + */ + public final Locale getLocale() { + return fLocale; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getURL() + */ + @Override + protected final URL getURL() throws MalformedURLException { + return new URL(fLocation, fLocale.toString() + ".dictionary"); //$NON-NLS-1$ + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getInitialSize() + * @since 3.6 + */ + @Override + protected int getInitialSize() { + return 32 * 1024; + } + + @Override + protected String getEncoding() { + return "UTF-8"; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/PersistentSpellDictionary.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/PersistentSpellDictionary.java new file mode 100644 index 0000000..ce5be4f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/PersistentSpellDictionary.java @@ -0,0 +1,111 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + * Benjamin Muskalla - [spell checking][implementation] PersistentSpellDictionary closes wrong stream - https://bugs.eclipse.org/bugs/show_bug.cgi?id=236421 + *******************************************************************************/ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.io.FileOutputStream; +import java.io.IOException; +import java.net.URL; +import java.nio.ByteBuffer; +import java.nio.charset.Charset; + +import org.eclipse.core.resources.ResourcesPlugin; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceKeys; + + +/** + * Persistent modifiable word-list based dictionary. + * + * @since 3.0 + */ +public class PersistentSpellDictionary extends AbstractSpellDictionary { + + /** The word list location */ + private final URL fLocation; + + /** + * Creates a new persistent spell dictionary. + * + * @param url the URL of the word list for this dictionary + */ + public PersistentSpellDictionary(final URL url) { + fLocation= url; + } + + /* + * @see org.eclipse.jdt.ui.text.spelling.engine.AbstractSpellDictionary#acceptsWords() + */ + @Override + public boolean acceptsWords() { + return true; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellDictionary#addWord(java.lang.String) + */ + @Override + public void addWord(final String word) { + if (isCorrect(word)) + return; + + FileOutputStream fileStream= null; + try { + Charset charset= Charset.forName(getEncoding()); + ByteBuffer byteBuffer= charset.encode(word + "\n"); //$NON-NLS-1$ + int size= byteBuffer.limit(); + final byte[] byteArray; + if (byteBuffer.hasArray()) + byteArray= byteBuffer.array(); + else { + byteArray= new byte[size]; + byteBuffer.get(byteArray); + } + + fileStream= new FileOutputStream(fLocation.getPath(), true); + + // Encoding UTF-16 charset writes a BOM. In which case we need to cut it away if the file isn't empty + int bomCutSize= 0; + if (!isEmpty() && "UTF-16".equals(charset.name())) //$NON-NLS-1$ + bomCutSize= 2; + + fileStream.write(byteArray, bomCutSize, size - bomCutSize); + } catch (IOException e) { + LogHelper.logError(e); + return; + } finally { + try { + if (fileStream != null) + fileStream.close(); + } catch (IOException e) { + } + } + + hashWord(word); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.AbstractSpellDictionary#getURL() + */ + @Override + protected final URL getURL() { + return fLocation; + } + + @Override + protected String getEncoding() { + String encoding= PreferenceKeys.PKEY_SPELLING_USER_DICTIONARY_ENCODING.getStoredValue(); + if (encoding == null || encoding.length() == 0) + encoding= ResourcesPlugin.getEncoding(); + return encoding; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/RankedWordProposal.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/RankedWordProposal.java new file mode 100644 index 0000000..0d46de3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/RankedWordProposal.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +/** + * Ranked word proposal for quick fix and content assist. + * + * @since 3.0 + */ +public class RankedWordProposal implements Comparable { + + /** The word rank */ + private int fRank; + + /** The word text */ + private final String fText; + + /** + * Creates a new ranked word proposal. + * + * @param text + * The text of this proposal + * @param rank + * The rank of this proposal + */ + public RankedWordProposal(final String text, final int rank) { + fText= text; + fRank= rank; + } + + /* + * @see java.lang.Comparable#compareTo(java.lang.Object) + */ + public final int compareTo(RankedWordProposal word) { + + final int rank= word.getRank(); + + if (fRank < rank) + return -1; + + if (fRank > rank) + return 1; + + return 0; + } + + /* + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public final boolean equals(Object object) { + + if (object instanceof RankedWordProposal) + return object.hashCode() == hashCode(); + + return false; + } + + /** + * Returns the rank of the word + * + * @return The rank of the word + */ + public final int getRank() { + return fRank; + } + + /** + * Returns the text of this word. + * + * @return The text of this word + */ + public final String getText() { + return fText; + } + + /* + * @see java.lang.Object#hashCode() + */ + @Override + public final int hashCode() { + return fText.hashCode(); + } + + /** + * Sets the rank of the word. + * + * @param rank + * The rank to set + */ + public final void setRank(final int rank) { + fRank= rank; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/SpellEvent.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/SpellEvent.java new file mode 100644 index 0000000..66cdc2b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/engine/SpellEvent.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright (c) 2000, 2011 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 + *******************************************************************************/ + +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.engine; + +import java.util.Set; + +/** + * Spell event fired for words detected by a spell check iterator. + * + * @since 3.0 + */ +public class SpellEvent implements ISpellEvent { + + /** The begin index of the word in the spell checkable medium */ + private final int fBegin; + + /** The spell checker that causes the event */ + private final ISpellChecker fChecker; + + /** The end index of the word in the spell checkable medium */ + private final int fEnd; + + /** Was the word found in the dictionary? */ + private final boolean fMatch; + + /** Does the word start a new sentence? */ + private final boolean fSentence; + + /** The word that causes the spell event */ + private final String fWord; + + /** + * Creates a new spell event. + * + * @param checker + * The spell checker that causes the event + * @param word + * The word that causes the event + * @param begin + * The begin index of the word in the spell checkable medium + * @param end + * The end index of the word in the spell checkable medium + * @param sentence + * true iff the word starts a new sentence, + * false otherwise + * @param match + * true iff the word was found in the dictionary, + * false otherwise + */ + protected SpellEvent(final ISpellChecker checker, final String word, final int begin, final int end, final boolean sentence, final boolean match) { + fChecker= checker; + fEnd= end; + fBegin= begin; + fWord= word; + fSentence= sentence; + fMatch= match; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#getBegin() + */ + public final int getBegin() { + return fBegin; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#getEnd() + */ + public final int getEnd() { + return fEnd; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#getProposals() + */ + public final Set getProposals() { + return fChecker.getProposals(fWord, fSentence); + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#getWord() + */ + public final String getWord() { + return fWord; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#isMatch() + */ + public final boolean isMatch() { + return fMatch; + } + + /* + * @see org.eclipse.jdt.internal.ui.text.spelling.engine.ISpellEvent#isStart() + */ + public final boolean isStart() { + return fSentence; + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/Messages.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/Messages.java new file mode 100644 index 0000000..5e690e9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/Messages.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.ui.editor.modula.spellcheck.internal.nls.messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object}); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + public static String Spelling_add_askToConfigure_ignoreMessage; + public static String Spelling_add_askToConfigure_question; + public static String Spelling_add_askToConfigure_title; + public static String Spelling_add_info; + public static String Spelling_addWordProposal; + public static String Spelling_case_label; + public static String Spelling_correct_label; + public static String Spelling_disable_info; + public static String Spelling_disable_label; + public static String Spelling_error_case_label; + public static String Spelling_error_label; + public static String Spelling_ignore_info; + public static String Spelling_ignore_label; + + public static String SpellingPreferenceBlock_BadDictFile; + public static String SpellingPreferenceBlock_Browse; + public static String SpellingPreferenceBlock_Dictionaries; + public static String SpellingPreferenceBlock_Dictionary; + public static String SpellingPreferenceBlock_Encoding; + public static String SpellingPreferenceBlock_IgnoreCapitalization; + public static String SpellingPreferenceBlock_IgnoreM2Strings; + public static String SpellingPreferenceBlock_IgnoreMixedCaseWords; + public static String SpellingPreferenceBlock_IgnoreNonLettersBoundaries; + public static String SpellingPreferenceBlock_IgnoreSingleLetters; + public static String SpellingPreferenceBlock_IgnoreUpperCaseWords; + public static String SpellingPreferenceBlock_IgnoreURLs; + public static String SpellingPreferenceBlock_IgnoreWordsWithDigits; + public static String SpellingPreferenceBlock_InvalidInt; + public static String SpellingPreferenceBlock_MaxProblems; + public static String SpellingPreferenceBlock_MaxProposals; + public static String SpellingPreferenceBlock_none; + public static String SpellingPreferenceBlock_NumberRequired; + public static String SpellingPreferenceBlock_Options; + public static String SpellingPreferenceBlock_PlatformDictionary; + public static String SpellingPreferenceBlock_RWAccessRequired; + public static String SpellingPreferenceBlock_SelectUserDictionary; + public static String SpellingPreferenceBlock_UserDefDictionary; + public static String SpellingPreferenceBlock_UserDictDesc; + public static String SpellingPreferenceBlock_Variables; + public static String SpellingPreferenceBlock_Advanced; + + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + private Messages() { + } +} diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages.properties b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages.properties new file mode 100644 index 0000000..3be3c14 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/modula/spellcheck/internal/nls/messages.properties @@ -0,0 +1,39 @@ +Spelling_add_askToConfigure_ignoreMessage=&Do not show 'Add word' proposals if user dictionary is missing +Spelling_add_askToConfigure_question=A user dictionary is needed to add words.\nDo you want to configure it now?\n +Spelling_add_askToConfigure_title=Missing User Dictionary +Spelling_add_info=Adds the word ''{0}'' to the dictionary +Spelling_addWordProposal=Add ''{0}'' to dictionary +Spelling_case_label=Change to upper case +Spelling_correct_label=Change to ''%s'' +Spelling_disable_info=Disables spell checking. +Spelling_disable_label=Disable spell checking +Spelling_error_case_label=The word ''%s'' should have an initial upper case letter +Spelling_error_label=The word ''%s'' is not correctly spelled +Spelling_ignore_info=Ignores ''{0}'' during the current session +Spelling_ignore_label=Ignore ''{0}'' during the current session +SpellingPreferenceBlock_Advanced=Advanced +SpellingPreferenceBlock_BadDictFile=Invalid dictionary file name +SpellingPreferenceBlock_Browse=Browse... +SpellingPreferenceBlock_Dictionaries=Dictionaries +SpellingPreferenceBlock_Dictionary=Dictionary +SpellingPreferenceBlock_Encoding=Encoding +SpellingPreferenceBlock_IgnoreCapitalization=Ignore sentence capitalization +SpellingPreferenceBlock_IgnoreM2Strings=Ignore Modula-2 string literals +SpellingPreferenceBlock_IgnoreMixedCaseWords=Ignore mixed case words +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=Ignore non-letters at word boundaries +SpellingPreferenceBlock_IgnoreSingleLetters=Ignore single letters +SpellingPreferenceBlock_IgnoreUpperCaseWords=Ignore upper case words +SpellingPreferenceBlock_IgnoreURLs=Ignore internet addresses +SpellingPreferenceBlock_IgnoreWordsWithDigits=Ignore words with digits +SpellingPreferenceBlock_InvalidInt='%s' is not a valid positive integer +SpellingPreferenceBlock_MaxProblems=Maximim number of problems reported per file +SpellingPreferenceBlock_MaxProposals=Maximim number of correction proposals +SpellingPreferenceBlock_none=none +SpellingPreferenceBlock_NumberRequired=A positive integer must be specified +SpellingPreferenceBlock_Options=Options +SpellingPreferenceBlock_PlatformDictionary=Platform dictionary +SpellingPreferenceBlock_RWAccessRequired=The dictionary file must accessible for read and write +SpellingPreferenceBlock_SelectUserDictionary=Select user dictionary +SpellingPreferenceBlock_UserDefDictionary=User defined dictionary +SpellingPreferenceBlock_UserDictDesc=The user dictionary is a text file with one word on each line +SpellingPreferenceBlock_Variables=Variables... \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/spellcheck/internal/plugin/SpellcheckPlugin.java b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/spellcheck/internal/plugin/SpellcheckPlugin.java new file mode 100644 index 0000000..224bd35 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor.spellcheck/src/com/excelsior/xds/ui/editor/spellcheck/internal/plugin/SpellcheckPlugin.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.editor.spellcheck.internal.plugin; + +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.osgi.framework.BundleContext; + +/** + * The activator class controls the plug-in life cycle + */ +public class SpellcheckPlugin extends AbstractUIPlugin { + + // The plug-in ID + public static final String PLUGIN_ID = "com.excelsior.xds.ui.editor.spellcheck"; //$NON-NLS-1$ + + // The shared instance + private static SpellcheckPlugin plugin; + + /** + * The constructor + */ + public SpellcheckPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static SpellcheckPlugin getDefault() { + return plugin; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/.classpath b/product/com.excelsior.xds.ui.editor/.classpath new file mode 100644 index 0000000..b862a29 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor/.project b/product/com.excelsior.xds.ui.editor/.project new file mode 100644 index 0000000..30426c3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/.project @@ -0,0 +1,28 @@ + + + com.excelsior.xds.ui.editor + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/product/com.excelsior.xds.ui.editor/META-INF/MANIFEST.MF b/product/com.excelsior.xds.ui.editor/META-INF/MANIFEST.MF new file mode 100644 index 0000000..3034457 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/META-INF/MANIFEST.MF @@ -0,0 +1,52 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: %pluginName +Bundle-SymbolicName: com.excelsior.xds.ui.editor;singleton:=true +Bundle-Version: 1.7.0.qualifier +Bundle-Activator: com.excelsior.xds.ui.editor.XdsEditorsPlugin +Bundle-Vendor: Excelsior LLC +Bundle-Localization: plugin +Require-Bundle: org.eclipse.ui, + org.eclipse.core.runtime, + org.eclipse.jface.text, + org.eclipse.core.resources, + org.eclipse.ui.ide, + com.excelsior.xds.ui.commons;bundle-version="1.7.0", + com.excelsior.xds.core;bundle-version="1.7.0", + org.eclipse.ui.editors, + org.apache.commons.io, + org.apache.commons.lang, + com.excelsior.xds.ui;bundle-version="1.7.0", + org.eclipse.ui.workbench.texteditor, + org.eclipse.help, + com.excelsior.xds.parser;bundle-version="1.7.0", + com.excelsior.xds.core.model;bundle-version="1.7.0", + org.eclipse.ui.browser, + org.apache.commons.collections, + org.eclipse.ui.navigator, + org.eclipse.search, + com.google.guava, + com.excelsior.xds.core.search;bundle-version="1.7.0", + org.eclipse.ltk.core.refactoring, + org.eclipse.ltk.ui.refactoring, + com.excelsior.xds.core.refactoring;bundle-version="1.7.0", + org.eclipse.compare, + com.excelsior.xds.core.ide;bundle-version="1.7.0", + com.excelsior.xds.builder;bundle-version="1.7.0", + org.eclipse.debug.core, + org.eclipse.text, + org.eclipse.debug.ui, + com.excelsior.xds.ui.editor.commons;bundle-version="1.7.0", + org.eclipse.e4.core.di, + org.eclipse.core.filesystem;bundle-version="1.4.100" +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 +Bundle-ActivationPolicy: lazy +Import-Package: org.eclipse.core.variables, + org.eclipse.debug.ui, + org.eclipse.ui.views.contentoutline, + org.ini4j +Export-Package: com.excelsior.xds.ui.editor, + com.excelsior.xds.ui.editor.modula, + com.excelsior.xds.ui.editor.modula.hyperlink, + com.excelsior.xds.ui.editor.modula.utils, + com.excelsior.xds.ui.editor.modula.reconciling diff --git a/product/com.excelsior.xds.ui.editor/build.properties b/product/com.excelsior.xds.ui.editor/build.properties new file mode 100644 index 0000000..f4db3b5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/build.properties @@ -0,0 +1,8 @@ +source.. = src/ +output.. = bin/ +bin.includes = META-INF/,\ + .,\ + icons/,\ + plugin.xml,\ + plugin.properties + diff --git a/product/com.excelsior.xds.ui.editor/icons/m2_def_file.gif b/product/com.excelsior.xds.ui.editor/icons/m2_def_file.gif new file mode 100644 index 0000000..242881d Binary files /dev/null and b/product/com.excelsior.xds.ui.editor/icons/m2_def_file.gif differ diff --git a/product/com.excelsior.xds.ui.editor/icons/m2_mod_file.gif b/product/com.excelsior.xds.ui.editor/icons/m2_mod_file.gif new file mode 100644 index 0000000..4edb4ab Binary files /dev/null and b/product/com.excelsior.xds.ui.editor/icons/m2_mod_file.gif differ diff --git a/product/com.excelsior.xds.ui.editor/icons/m2_sym_file.gif b/product/com.excelsior.xds.ui.editor/icons/m2_sym_file.gif new file mode 100644 index 0000000..ad9b786 Binary files /dev/null and b/product/com.excelsior.xds.ui.editor/icons/m2_sym_file.gif differ diff --git a/product/com.excelsior.xds.ui.editor/icons/mark_occurrences.gif b/product/com.excelsior.xds.ui.editor/icons/mark_occurrences.gif new file mode 100644 index 0000000..fd7c175 Binary files /dev/null and b/product/com.excelsior.xds.ui.editor/icons/mark_occurrences.gif differ diff --git a/product/com.excelsior.xds.ui.editor/icons/template.gif b/product/com.excelsior.xds.ui.editor/icons/template.gif new file mode 100644 index 0000000..65c2632 Binary files /dev/null and b/product/com.excelsior.xds.ui.editor/icons/template.gif differ diff --git a/product/com.excelsior.xds.ui.editor/plugin.properties b/product/com.excelsior.xds.ui.editor/plugin.properties new file mode 100644 index 0000000..49deab7 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/plugin.properties @@ -0,0 +1,96 @@ +pluginName=XDS Modula-2 Editors + +preferencePages.editor = Editor +preferencePages.templates = Templates +preferencePages.codeStyle = Code Style +preferencePages.formatter = Formatter +preferencePages.markOccurrences = Mark Occurrences + +editors.modEditor = Modula-2 Program Module Editor +editors.defEditor = Modula-2 Definition Module Editor +editors.ob2Editor = Oberon-2 Module Editor +editors.odfEditor = Oberon-2 Pseudo Definition Module Editor +editors.txtTextFile = XDS Text File Editor +editors.prjFile = XDS Project File Editor +editors.htmlEditor = Internal Web Browser +editors.symFileEditor = XDS Symbol File Editor + +contentTypes.prj = XDS Project File +contentTypes.res = XDS Debug Script Output +contentTypes.txt = XDS Text File +contentTypes.htm = HTML file +contentTypes.ldp = XDS Debug Scripts Bundle +contentTypes.pkt = XDS Debug Script +contentTypes.mod = Modula-2 Program Module +contentTypes.def = Modula-2 Definition Module +contentTypes.ob2 = Oberon-2 Module +contentTypes.odf = Oberon-2 Pseudo Definition Module + +templates.context.type.modula = XDS Modula-2 + +xds.keybinding.scheme.name = XDS Modula-2 + +contexts.m2sources = Editing Modula-2 Sources +contexts.m2sources.desc = Editing Modula-2 Sources Context + +#--- Commands --- +commands.source.name = Source +commands.source.desc = Modula-2 Source Actions + +commands.toggleComment.name = Toggle Comment +commands.toggleComment.desc = Toggle comment the selected lines + +commands.AddBlockComment.name = Add Block Comment +commands.AddBlockComment.desc = Enclose the selection with a block comment + +commands.RemoveBlockComment.name = Remove Block Comment +commands.RemoveBlockComment.desc = Remove the block comment enclosing the selection + +commands.showHelp.name = Display keyword help +commands.showHelp.desc = Display help for the selected keyword + +commands.showQuickOutline.name = Quick Outline +commands.showQuickOutline.desc = Displays quick outline for the active Modula-2/Oberon-2 editor + +commands.openDeclaration.name = Open Declaration +commands.openDeclaration.desc = Open an editor on the selected element's declaration + +commands.openCoupledModule.name = Open Coupled Module +commands.openCoupledModule.desc = Open a coupled definition module or implementation module in the Modula-2 editor + +commands.modula.indent.name = Correct Indentation +commands.modula.indent.desc = Corrects the indentation of the selected lines + +commands.modula.format.name = Format +commands.modula.format.desc = Format the selected text + +commands.modula.toggleMarkOccurrences.name = Toggle Mark Occurrences +commands.modula.toggleMarkOccurrences.desc = Toggles mark occurrences in Modula-2 editors +commands.modula.toggleMarkOccurrences.tooltip = Toggle Mark Occurrences + +commands.modula.selectEnclosingElement.name = Select Enclosing Element +commands.modula.selectEnclosingElement.desc = Select Enclosing Element in Modula-2 editors + +commands.modula.restoreLastSelection.name = Restore Last Selection +commands.modula.restoreLastSelection.desc = Restore Last Selection in Modula-2 editors + +commands.findDeclarations.name = Search Declarations +commands.findDeclarations.desc = Search for declarations of the selected element in the workspace + +commands.findReferences.name = Search References +commands.findReferences.desc = Search for references to the selected element in the workspace + +commands.refactoring.rename.name = &Rename +commands.refactoring.rename.desc = Rename refactoring + +#--- Hyperlinking --- +hyperlink.target.ModulaCode = Modula-2 Editor +hyperlink.detector.ModulaDeclaration = Modula-2 Element + +#--- Actions --- +OpenDeclarations_label=Open Declaration +OpenDeclarations_tooltip=Open an editor on the selected element's declaration + +annotation.occurrence=Modula-2 Occurrences +annotation.writeOccurrence=Modula-2 Write Occurrences +annotation.construction=Modula-2 Operator Structure \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/plugin.xml b/product/com.excelsior.xds.ui.editor/plugin.xml new file mode 100644 index 0000000..0385db0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/plugin.xml @@ -0,0 +1,979 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/product/com.excelsior.xds.ui.editor/schema/modulaEditorHover.exsd b/product/com.excelsior.xds.ui.editor/schema/modulaEditorHover.exsd new file mode 100644 index 0000000..092f57a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/schema/modulaEditorHover.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/product/com.excelsior.xds.ui.editor/schema/modulaEditorReconcilingStrategyContribution.exsd b/product/com.excelsior.xds.ui.editor/schema/modulaEditorReconcilingStrategyContribution.exsd new file mode 100644 index 0000000..0604277 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/schema/modulaEditorReconcilingStrategyContribution.exsd @@ -0,0 +1,102 @@ + + + + + + + + + [Enter description of this extension point.] + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + [Enter the first release in which this extension point appears.] + + + + + + + + + [Enter extension point usage example here.] + + + + + + + + + [Enter API information here.] + + + + + + + + + [Enter information about supplied implementation of this extension point.] + + + + + diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/XdsEditorsPlugin.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/XdsEditorsPlugin.java new file mode 100644 index 0000000..b0318e0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/XdsEditorsPlugin.java @@ -0,0 +1,167 @@ +package com.excelsior.xds.ui.editor; + +import java.io.IOException; + +import org.eclipse.e4.core.di.InjectorFactory; +import org.eclipse.jface.text.templates.ContextTypeRegistry; +import org.eclipse.jface.text.templates.persistence.TemplateStore; +import org.eclipse.ui.editors.text.templates.ContributionContextTypeRegistry; +import org.eclipse.ui.editors.text.templates.ContributionTemplateStore; +import org.eclipse.ui.plugin.AbstractUIPlugin; +import org.eclipse.ui.texteditor.IDocumentProvider; +import org.osgi.framework.BundleContext; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.commons.utils.SwtUtils; +import com.excelsior.xds.ui.editor.internal.manager.EditorManager; +import com.excelsior.xds.ui.editor.modula.ModulaDocumentProvider; +import com.excelsior.xds.ui.editor.modula.ModulaSyntaxColorer; +import com.excelsior.xds.ui.editor.modula.template.SourceCodeTemplateContextType; +import com.excelsior.xds.ui.editor.oberon.OberonDocumentProvider; +import com.excelsior.xds.ui.tools.colorers.IModulaSyntaxColorer; + +/** + * The activator class controls the "com.excelsior.xds.ui.editor" plug-in life cycle + */ +@SuppressWarnings("restriction") +public class XdsEditorsPlugin extends AbstractUIPlugin +{ + /** + * The plug-in ID + */ + public static final String PLUGIN_ID = "com.excelsior.xds.ui.editor"; //$NON-NLS-1$ + + /** + * The key to store customized templates. + */ + private static final String TEMPLATES_KEY = "com.excelsior.xds.ui.editor.templates.key"; //$NON-NLS-1$ + + + /** + * The key to store customized templates. + */ + public static final String HYPERLINK_TARGET_MODULA_CODE = "com.excelsior.xds.ui.ModulaCode"; //$NON-NLS-1$ + + + // The shared instance + private static XdsEditorsPlugin plugin; + + /** + * The template store for XDS editors. + */ + private ContributionTemplateStore templateStore; + + /** + * The template context type registry for XDS editors. + */ + private ContributionContextTypeRegistry templateContextTypeRegistry; + + /** + * The shared Modula-2 source file document provider. + */ + private IDocumentProvider modulaDocumentProvider; + + /** + * The shared Oberon-2 source file document provider. + */ + private IDocumentProvider oberonDocumentProvider; + + /** + * The constructor + */ + public XdsEditorsPlugin() { + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) + */ + public void start(BundleContext context) throws Exception { + super.start(context); + plugin = this; + SwtUtils.executeInUiThread(new Runnable() { + @Override + public void run() { + EditorManager.getInstance().initialize(); + } + }); + + InjectorFactory.getDefault(). + addBinding(IModulaSyntaxColorer.class).implementedBy(ModulaSyntaxColorer.class); + } + + /* + * (non-Javadoc) + * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) + */ + public void stop(BundleContext context) throws Exception { + plugin = null; + super.stop(context); + } + + /** + * Returns the shared instance + * + * @return the shared instance + */ + public static XdsEditorsPlugin getDefault() { + return plugin; + } + + /** + * Returns the template store for XDS editors templates. + * + * @return the template store + */ + public synchronized TemplateStore getTemplateStore() { + if (templateStore == null) { + templateStore = new ContributionTemplateStore(getContextTypeRegistry(), getPreferenceStore(), TEMPLATES_KEY); + try { + templateStore.load(); + } catch (IOException e) { + LogHelper.logError(e); + } + } + return templateStore; + } + + /** + * Return the context type registry. + * + * @return the context type registry + */ + public synchronized ContextTypeRegistry getContextTypeRegistry() { + if (templateContextTypeRegistry == null) { + templateContextTypeRegistry = new ContributionContextTypeRegistry(); + templateContextTypeRegistry.addContextType(SourceCodeTemplateContextType.MODULA_CONTEXTTYPE); + } + return templateContextTypeRegistry; + } + + + /** + * Returns the shared document provider for Modula-2 source files + * used by this plug-in instance. + * + * @return the shared document provider for Modula-2 source files + */ + public synchronized IDocumentProvider getModulaDocumentProvider() { + if (modulaDocumentProvider == null) { + modulaDocumentProvider = new ModulaDocumentProvider(); + } + return modulaDocumentProvider; + } + + /** + * Returns the shared document provider for oberon-2 source files + * used by this plug-in instance. + * + * @return the shared document provider for Oberon-2 source files + */ + public synchronized IDocumentProvider getOberonDocumentProvider() { + if (oberonDocumentProvider == null) { + oberonDocumentProvider = new OberonDocumentProvider(); + } + return oberonDocumentProvider; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/manager/EditorManager.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/manager/EditorManager.java new file mode 100644 index 0000000..8824543 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/manager/EditorManager.java @@ -0,0 +1,96 @@ +package com.excelsior.xds.ui.editor.internal.manager; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IResource; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.IPartListener; +import org.eclipse.ui.IPartService; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchWindow; + +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.model.IEditableXdsModel; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsNonWorkspaceCompilationUnit; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + + +public class EditorManager { + public void initialize() { + IWorkbenchWindow window = WorkbenchUtils.getActiveWorkbenchWindow(); + IPartService partService = window.getPartService(); + partService.addPartListener(new ViewPartListener()); + } + + private class ViewPartListener implements IPartListener { + @Override + public void partOpened(IWorkbenchPart part) { + IEditorPart editorPart = getEditorPart(part); + if (editorPart != null) { + IEditorInput editorInput = editorPart.getEditorInput(); + IResource resource = (IResource)editorInput.getAdapter(IResource.class); + if (resource == null) { + IFileStore fileStore = CoreEditorUtils.editorInputToFileStore(editorInput); + if (fileStore != null) { + IEditableXdsModel editableModel = XdsModelManager.getEditableModel(); + editableModel.createNonWorkspaceXdsElement(fileStore); + } + } + } + } + + @Override + public void partClosed(IWorkbenchPart part) { + IEditorPart editorPart = getEditorPart(part); + if (editorPart != null) { + IEditorInput editorInput = editorPart.getEditorInput(); + IResource resource = (IResource)editorInput.getAdapter(IResource.class); + IFileStore fileStore = CoreEditorUtils.editorInputToFileStore(editorInput); + if (resource == null) { + if (fileStore != null) { + IEditableXdsModel editableModel = XdsModelManager.getEditableModel(); + IXdsElement xdsElement = editableModel.getNonWorkspaceXdsElement(fileStore); + if (xdsElement instanceof IXdsNonWorkspaceCompilationUnit) { + IXdsNonWorkspaceCompilationUnit compilationUnit = (IXdsNonWorkspaceCompilationUnit) xdsElement; + editableModel.removeNonWorkspaceXdsElement(compilationUnit); + } + } + } + ModulaAst modulaAst = ModulaEditorSymbolUtils.getModulaAst(editorInput); + XdsParserManager.discardModulaAst(modulaAst); + } + } + + @Override + public void partActivated(IWorkbenchPart part) { + } + + @Override + public void partBroughtToTop(IWorkbenchPart part) { + } + + @Override + public void partDeactivated(IWorkbenchPart part) { + } + + IEditorPart getEditorPart(IWorkbenchPart part) { + if (part instanceof IEditorPart) { + return (IEditorPart) part; + } + return null; + } + } + + private static class EditorManagerHolder{ + static EditorManager INSTANCE = new EditorManager(); + } + + public static EditorManager getInstance(){ + return EditorManagerHolder.INSTANCE; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/modula/hover/ModulaEditorHoverRegistry.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/modula/hover/ModulaEditorHoverRegistry.java new file mode 100644 index 0000000..0ea21e2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/modula/hover/ModulaEditorHoverRegistry.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.ui.editor.internal.modula.hover; + +import org.eclipse.jface.text.ITextHover; + +import com.excelsior.xds.core.extensionpoint.ExtensionRegistry; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; + +public class ModulaEditorHoverRegistry extends ExtensionRegistry { + public static ModulaEditorHoverRegistry get() { + return ModulaEditorHoverRegistryHolder.instance; + } + + private static class ModulaEditorHoverRegistryHolder { + static ModulaEditorHoverRegistry instance = new ModulaEditorHoverRegistry(XdsEditorsPlugin.PLUGIN_ID, "modulaEditorHover", "class"); //$NON-NLS-1$ //$NON-NLS-2$ + static { + instance.contributions(); + } + } + + private ModulaEditorHoverRegistry(String pluginId, + String extensionPointName, String executableExtensionPropertyName) { + super(pluginId, extensionPointName, executableExtensionPropertyName); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/Messages.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/Messages.java new file mode 100644 index 0000000..f7b1503 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/Messages.java @@ -0,0 +1,460 @@ +package com.excelsior.xds.ui.editor.internal.nls; + +import java.text.MessageFormat; + +import org.eclipse.osgi.util.NLS; + +public class Messages extends NLS +{ + private static final String BUNDLE_NAME = "com.excelsior.xds.ui.editor.internal.nls.messages"; //$NON-NLS-1$ + + public static String format(String message, Object object) { + return MessageFormat.format(message, new Object[] { object}); + } + + public static String format(String message, Object[] objects) { + return MessageFormat.format(message, objects); + } + + + public static String CodeStylePreferencePage_ExpandTreeToEdit; + + public static String CreateProfileDialog_InitFromProfile; + public static String CreateProfileDialog_NameExists; + public static String CreateProfileDialog_NewProfile; + public static String CreateProfileDialog_OpenEditDlg; + public static String CreateProfileDialog_ProfName; + public static String CreateProfileDialog_ProfNameEmpty; + + public static String MarkOccurrencesPreferencePage_LinkText; + public static String MarkOccurrencesPreferencePage_MarkOccurrencesOfElement; + + public static String ModifyDialog_Export; + public static String ModifyDialog_ProfileName; + + public static String ModulaContextualCompletionProcessor_CloseBlockComment; + + public static String ModulaContextualCompletionProcessor_ClosePragma; + + public static String ModulaContextualCompletionProcessor_ExternalDeps; + + public static String ModulaContextualCompletionProcessor_inProjectPath; + + public static String ModulaContextualCompletionProcessor_SdkLibrary; + + public static String ModulaOccurrencesMarker_StructureOf; + + public static String ModulaTokens_Text; + public static String ModulaTokens_Brackets; + public static String ModulaTokens_Strings; + public static String ModulaTokens_Numbers; + public static String ModulaTokens_SystemModuleKeywords; + public static String ModulaTokens_Keywords; + public static String ModulaTokens_BuiltinConstants; + + public static String ModulaTokens_Pragmas; + public static String ModulaTokens_CompilerPragmas; + public static String ModulaTokens_PragmaKeywords; + public static String ModulaTokens_InactiveCode; + + public static String ModulaTokens_Comments; + public static String ModulaTokens_BlockComments; + public static String ModulaTokens_EndOfLineComments; + public static String ModulaTokens_TodoTask; + + public static String DeclarationsSearchGroup_Declarations; + + public static String EditorPreferencePage_HlghlightOperatorsStructure; + + public static String EditorPreferencePage_LinkToAnnotationsPage; + + public static String EditorPreferencePage_LinkToColorSettingsPage; + + public static String FindDeclarationsAction_SearchDeclsOfSelInWorkspace; + public static String FindDeclarationsAction_Workspace; + public static String FindDeclarationsProjectAction_Project; + + public static String FindDeclarationsProjectAction_SearchDeclsOfSelInPrj; + + public static String FindReferencesAction_SearchRefsToSelInWorkspace; + public static String FindReferencesAction_Workspace; + + public static String FindReferencesProjectAction_Project; + public static String FindReferencesProjectAction_SearchRefsToSelInPrj; + + public static String FormatterModifyDialog_CantModifyDefProfile; + public static String FormatterModifyDialog_Indentation; + public static String FormatterModifyDialog_LineWrapping; + public static String FormatterModifyDialog_NewLines; + public static String FormatterModifyDialog_WhiteSpace; + + public static String FormatterPreferencePage_ActiveProfile; + public static String FormatterPreferencePage_Edit; + public static String FormatterPreferencePage_ExportAll; + public static String FormatterPreferencePage_Import; + public static String FormatterPreferencePage_New; + public static String FormatterPreferencePage_Preview; + public static String FormatterPreferencePage_Profile; + public static String FormatterPreferencePage_Remove; + + public static String FormatterProfile_AssignInExpr; + public static String FormatterProfile_AssignInExpr2; + public static String FormatterProfile_AssignInModuleAlias; + public static String FormatterProfile_AssignInModuleAlias2; + + public static String FormatterProfile_BeginInMod; + public static String FormatterProfile_BeginInProc; + public static String FormatterProfile_BeginInProc2; + public static String FormatterProfile_BinaryOps; + + public static String FormatterProfile_CaseInVarRec; + public static String FormatterProfile_CaseStatements; + public static String FormatterProfile_Case; + public static String FormatterProfile_CaseStmt; + + public static String FormatterProfile_Colon; + public static String FormatterProfile_ColonFormParams; + public static String FormatterProfile_ColonFormParams2; + public static String FormatterProfile_ColonInCase; + public static String FormatterProfile_ColonInCase2; + public static String FormatterProfile_ColonInRetType; + public static String FormatterProfile_ColonInRetType2; + public static String FormatterProfile_ColonInTypeDef; + public static String FormatterProfile_ColonInVar; + + public static String FormatterProfile_Comma; + public static String FormatterProfile_CommaInEnum; + public static String FormatterProfile_CommaInFormParams; + public static String FormatterProfile_CommaInFormParams2; + public static String FormatterProfile_CommaInImportLists; + public static String FormatterProfile_CommaInImportLists2; + public static String FormatterProfile_CommaInMd; + public static String FormatterProfile_CommaInMd2; + + public static String FormatterProfile_CommaInParList; + public static String FormatterProfile_CommaInParList2; + + public static String FormatterProfile_Constants; + public static String FormatterProfile_ConstGlob; + public static String FormatterProfile_ConstLoc; + + public static String FormatterProfile_ControlStatements; + public static String FormatterProfile_CtrlStmt; + + public static String FormatterProfile_DeclAndDefs; + public static String FormatterProfile_Declarations; + + public static String FormatterProfile_Do; + public static String FormatterProfile_Dot; + public static String FormatterProfile_Dot2; + + public static String FormatterProfile_ElseInCase; + public static String FormatterProfile_ElseInIf; + public static String FormatterProfile_ElseInVarRec; + public static String FormatterProfile_Elsif; + + public static String FormatterProfile_End; + public static String FormatterProfile_EndInMod; + public static String FormatterProfile_EndInMod2; + public static String FormatterProfile_EndInProc; + public static String FormatterProfile_EndInProc2; + public static String FormatterProfile_EndInRec; + public static String FormatterProfile_EndInVarRec; + + public static String FormatterProfile_EnumType; + + public static String FormatterProfile_Equ; + public static String FormatterProfile_EquInConst; + public static String FormatterProfile_EquInMd; + public static String FormatterProfile_EquInMd2; + + public static String FormatterProfile_Except; + public static String FormatterProfile_Export; + public static String FormatterProfile_Expressions; + public static String FormatterProfile_Finally; + public static String FormatterProfile_For; + public static String FormatterProfile_From; + public static String FormatterProfile_If; + public static String FormatterProfile_IfStatements; + + public static String FormatterProfile_Import; + public static String FormatterProfile_ImportSimple; + + public static String FormatterProfile_IndexExpr; + + public static String FormatterProfile_LBracket; + public static String FormatterProfile_LBracketInExpr; + public static String FormatterProfile_LBracketInExpr2; + public static String FormatterProfile_LBracketInRange; + + public static String FormatterProfile_Loop; + + public static String FormatterProfile_LParenth; + public static String FormatterProfile_LParenthInEnum; + public static String FormatterProfile_LParenthInExpr; + public static String FormatterProfile_LParenthInExpr2; + public static String FormatterProfile_LParenthInProcCall; + public static String FormatterProfile_LParenthInProcCall2; + public static String FormatterProfile_LParenthInProcDecl; + public static String FormatterProfile_LParenthInProcDecl2; + + public static String FormatterProfile_Modules; + + public static String FormatterProfile_OfInCase; + public static String FormatterProfile_OfInVarRec; + + public static String FormatterProfile_OtherStatements; + + public static String FormatterProfile_ParenthExpr; + + public static String FormatterProfile_Procedure; + public static String FormatterProfile_Procedures; + public static String FormatterProfile_ProcInvoc; + + public static String FormatterProfile_PtrDeref; + public static String FormatterProfile_PtrDeref2; + + public static String FormatterProfile_Range; + public static String FormatterProfile_Range2; + public static String FormatterProfile_RangeType; + + public static String FormatterProfile_RBracket; + public static String FormatterProfile_RBracketInExpr; + public static String FormatterProfile_RBracketInExpr2; + public static String FormatterProfile_RBracketInRange; + + public static String FormatterProfile_Record; + public static String FormatterProfile_RecordType; + + public static String FormatterProfile_Repeat; + + public static String FormatterProfile_RParenth; + public static String FormatterProfile_RParenthInEnum; + public static String FormatterProfile_RParenthInExpr; + public static String FormatterProfile_RParenthInExpr2; + public static String FormatterProfile_RParenthInProcCall; + public static String FormatterProfile_RParenthInProcCall2; + public static String FormatterProfile_RParenthInProcDecl; + public static String FormatterProfile_RParenthInProcDecl2; + + public static String FormatterProfile_Semicolon; + public static String FormatterProfile_Semicolon2; + public static String FormatterProfile_SemicolonFormParams; + public static String FormatterProfile_SemicolonFormParams2; + + public static String FormatterProfile_Separator; + public static String FormatterProfile_SeparatorInCase; + public static String FormatterProfile_SeparatorInCase2; + public static String FormatterProfile_SeparatorInRecordTypeDef; + + public static String FormatterProfile_SepInCase; + public static String FormatterProfile_SepInVarRec; + + public static String FormatterProfile_SetsForAllBinaryOps; + public static String FormatterProfile_SetsForAllUnaryOps; + + public static String FormatterProfile_StmtClosedParenthesis; + public static String FormatterProfile_StmtClosedParenthesis2; + public static String FormatterProfile_StmtOpenedParenthesis; + public static String FormatterProfile_StmtOpenedParenthesis2; + + public static String FormatterProfile_Then; + + public static String FormatterProfile_TypeGlob; + public static String FormatterProfile_TypeLoc; + public static String FormatterProfile_Types; + + public static String FormatterProfile_UnaryOps; + + public static String FormatterProfile_Until; + + public static String FormatterProfile_VarGlob; + public static String FormatterProfile_Variables; + public static String FormatterProfile_VarLoc; + + public static String FormatterProfile_While; + + public static String FormatterProfile_With; + + public static String FormatterProfile_XdsBuiltIn; + + public static String IndentationTabPage_DeclOfLocalMods; + public static String IndentationTabPage_DeclOfLocalProcs; + public static String IndentationTabPage_DeclOfRecFields; + public static String IndentationTabPage_DeclWithinModule; + public static String IndentationTabPage_DeclWithinProc; + public static String IndentationTabPage_DeclWithinVCT; + + public static String IndentationTabPage_GeneralSettings; + public static String IndentationTabPage_Indent; + public static String IndentationTabPage_IndentSize; + public static String IndentationTabPage_Mixed; + public static String IndentationTabPage_Preview; + + public static String IndentationTabPage_SpacesOnly; + public static String IndentationTabPage_SpacesToWrappedLines; + + public static String IndentationTabPage_Statements; + public static String IndentationTabPage_StatementsInCase; + public static String IndentationTabPage_StatementsInCaseAlt; + + public static String IndentationTabPage_TabPolicy; + public static String IndentationTabPage_TabSize; + public static String IndentationTabPage_UseTabs; + + public static String SpellingPreferenceBlock_Advanced; + public static String SpellingPreferenceBlock_BadDictFile; + + public static String SpellingPreferenceBlock_Browse; + public static String SpellingPreferenceBlock_Dictionaries; + public static String SpellingPreferenceBlock_Dictionary; + public static String SpellingPreferenceBlock_Encoding; + public static String SpellingPreferenceBlock_IgnoreCapitalization; + public static String SpellingPreferenceBlock_IgnoreM2Strings; + public static String SpellingPreferenceBlock_IgnoreMixedCaseWords; + public static String SpellingPreferenceBlock_IgnoreNonLettersBoundaries; + public static String SpellingPreferenceBlock_IgnoreSingleLetters; + public static String SpellingPreferenceBlock_IgnoreUpperCaseWords; + public static String SpellingPreferenceBlock_IgnoreURLs; + public static String SpellingPreferenceBlock_IgnoreWordsWithDigits; + public static String SpellingPreferenceBlock_InvalidInt; + public static String SpellingPreferenceBlock_MaxProblems; + public static String SpellingPreferenceBlock_MaxProposals; + public static String SpellingPreferenceBlock_none; + public static String SpellingPreferenceBlock_NumberRequired; + public static String SpellingPreferenceBlock_Options; + public static String SpellingPreferenceBlock_PlatformDictionary; + public static String SpellingPreferenceBlock_RWAccessRequired; + public static String SpellingPreferenceBlock_SelectUserDictionary; + public static String SpellingPreferenceBlock_UserDefDictionary; + public static String SpellingPreferenceBlock_UserDictDesc; + public static String SpellingPreferenceBlock_Variables; + + public static String XdsEditorPreferencePage_link; + public static String XdsEditorPreferencePage_HighlightBrackets; + public static String XdsEditorPreferencePage_MatchedBracketsColor; + public static String XdsEditorPreferencePage_UnmatchedBracketsColor; + public static String XdsEditorPreferencePage_HighlightInactiveCode; + + public static String XdsOutlineFilter_ConstantsName; + public static String XdsOutlineFilter_ConstantsDesc; + + public static String XdsOutlineFilter_ImportName; + public static String XdsOutlineFilter_ImportDesc; + + public static String XdsOutlineFilter_LocModulesName; + public static String XdsOutlineFilter_LocModulesDesc; + + public static String XdsOutlineFilter_ProceduresName; + public static String XdsOutlineFilter_ProceduresDesc; + + public static String XdsOutlineFilter_FormalParametersName; + public static String XdsOutlineFilter_FormalParametersDesc; + + public static String XdsOutlineFilter_TypesName; + public static String XdsOutlineFilter_TypesDesc; + + public static String XdsOutlineFilter_RecordFieldsName; + public static String XdsOutlineFilter_RecordFieldsDesc; + + public static String XdsOutlineFilter_GlobalVariablesName; + public static String XdsOutlineFilter_GlobalVariablesDesc; + + public static String XdsOutlineFilter_LocalVariablesName; + public static String XdsOutlineFilter_LocalVariablesDesc; + + public static String XdsOutlineFiltersDialog_DeselectAll; + public static String XdsOutlineFiltersDialog_FilterDescription; + public static String XdsOutlineFiltersDialog_SelectAll; + public static String XdsOutlineFiltersDialog_SelectToExclude; + public static String XdsOutlineFiltersDialog_ViewFilters; + + public static String XdsOutlinePage_CollapseAll; + public static String XdsOutlinePage_ExpandAll; + public static String XdsOutlinePage_Loading; + + public static String XdsOutlinePage_Filters; + public static String XdsOutlinePage_LinkWithEditor; + public static String XdsOutlinePage_Sort; + + public static String XdsOutlinePageContentProvider_0; + + public static String XdsQuickOutlineDialog_Filters; + + public static String XdsQuickOutlineDialog_SortAlphabetically; + + public static String UpdateModel; + + public static String HyperlinkText_ModulaDeclaration; + + public static String OccurrencesMarker_MarkingOccurrences; + public static String OccurrencesMarker_OccurrenceOf; + public static String OccurrencesMarker_WriteOccurrencesMarker; + + public static String OpenDeclarations_description; + public static String OpenDeclarations_label; + public static String OpenDeclarations_tooltip; + + public static String ProfileManager_ExportProfile; + public static String ProfileManager_ExportProfiles; + public static String ProfileManager_ImportedProfiles; + public static String ProfileManager_ImportProfiles; + public static String ProfileManager_NoProfilesFound; + public static String ProfileManager_ReplaceQuestion; + + public static String ReferencesSearchGroup_References; + + + public static String TabLineWrapping_GeneralSettings; + public static String TabLineWrapping_InvalidValue; + public static String TabLineWrapping_MaxLineWidth; + public static String TabLineWrapping_SetWidthToPreview; + + public static String TabPageWhiteSpace_InsertSpace; + public static String TabPageWhiteSpace_InsSpaceAfter; + public static String TabPageWhiteSpace_InsSpaceBefore; + + public static String TabPageNewLines_InsertNewLine; + public static String TabPageNewLines_InsNewlineAfter; + public static String TabPageNewLines_InsNewlineBefore; + + public static String SymFileEditor_CannotOpenFile; + + public static String ModulaEditor_GrayingMarkers; + + static { + // initialize resource bundle + NLS.initializeMessages(BUNDLE_NAME, Messages.class); + } + + public static String Spelling_add_askToConfigure_ignoreMessage; + + public static String Spelling_add_askToConfigure_question; + + public static String Spelling_add_askToConfigure_title; + + public static String Spelling_add_info; + + public static String Spelling_addWordProposal; + + public static String Spelling_case_label; + + public static String Spelling_correct_label; + + public static String Spelling_disable_info; + + public static String Spelling_disable_label; + + public static String Spelling_error_case_label; + + public static String Spelling_error_label; + + public static String Spelling_ignore_info; + + public static String Spelling_ignore_label; + + public static String SyntaxColoringPreferencePage_Modula2; + + private Messages() { + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/messages.properties b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/messages.properties new file mode 100644 index 0000000..7f49322 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/nls/messages.properties @@ -0,0 +1,344 @@ +CodeStylePreferencePage_ExpandTreeToEdit=Expand the tree to edit Code Style preferences +CreateProfileDialog_InitFromProfile=Initialize settings with the following profile +CreateProfileDialog_NameExists=A profile with this name already exists +CreateProfileDialog_NewProfile=New Profile +CreateProfileDialog_OpenEditDlg=Open the edit dialog now +CreateProfileDialog_ProfName=Profile name +CreateProfileDialog_ProfNameEmpty=Profile name is empty +MarkOccurrencesPreferencePage_LinkText=The appearance can be configured on the 'Annotations' preference page. +MarkOccurrencesPreferencePage_MarkOccurrencesOfElement=Mark occurrences of the selected element in the current file. +ModifyDialog_Export=Export... +ModifyDialog_ProfileName=Profile name + +ModulaContextualCompletionProcessor_CloseBlockComment=close block comment +ModulaContextualCompletionProcessor_ClosePragma=close pragma +ModulaContextualCompletionProcessor_ExternalDeps=\ - /{0}/External Dependencies [{1}] +ModulaContextualCompletionProcessor_inProjectPath=\ - /{0}/{1} +ModulaContextualCompletionProcessor_SdkLibrary=\ - /{0}/SDK Library [{1}]/{2} +ModulaOccurrencesMarker_StructureOf=Structure of '%s' +ModulaTokens_Text=General text +ModulaTokens_Brackets=Brackets +ModulaTokens_Numbers=Numbers +ModulaTokens_Strings=Strings +ModulaTokens_SystemModuleKeywords=SYSTEM module identifiers +ModulaTokens_Keywords=Keywords +ModulaTokens_BuiltinConstants=Built-in constants + +ModulaTokens_Pragmas=Pragma text +ModulaTokens_PragmaKeywords=Pragma keywords +ModulaTokens_CompilerPragmas=Compiler pragmas +ModulaTokens_InactiveCode=Inactive code + +ModulaTokens_Comments=Comments +ModulaTokens_BlockComments=Block comments +ModulaTokens_EndOfLineComments=End of line comments +ModulaTokens_TodoTask=Task tags + +DeclarationsSearchGroup_Declarations=Declarations +EditorPreferencePage_HlghlightOperatorsStructure=Highlight operators structure +EditorPreferencePage_LinkToAnnotationsPage=Preferences of highlighting can be configured on the 'Annotations' page. +EditorPreferencePage_LinkToColorSettingsPage=Preferences of highlighting can be configured on the 'Syntax Coloring' page. +FindDeclarationsAction_SearchDeclsOfSelInWorkspace=Search for Declarations of the Selected Element in the Workspace +FindDeclarationsAction_Workspace=&Workspace +FindDeclarationsProjectAction_Project=&Project +FindDeclarationsProjectAction_SearchDeclsOfSelInPrj=Search for Declarations of the Selected Element in the Project +FindReferencesAction_SearchRefsToSelInWorkspace=Search for References of the Selected Element in the Workspace +FindReferencesAction_Workspace=&Workspace +FindReferencesProjectAction_Project=&Project +FindReferencesProjectAction_SearchRefsToSelInPrj=Search for References of the Selected Element in the Project +FormatterModifyDialog_CantModifyDefProfile=Can't modify built-in profile +FormatterModifyDialog_Indentation=Indentation +FormatterModifyDialog_LineWrapping=Line wrapping +FormatterModifyDialog_NewLines=New lines +FormatterModifyDialog_WhiteSpace=White space +FormatterPreferencePage_ActiveProfile=A&ctive profile +FormatterPreferencePage_Edit=&Edit... +FormatterPreferencePage_ExportAll=E&xport All... +FormatterPreferencePage_Import=I&mport... +FormatterPreferencePage_New=Ne&w... +FormatterPreferencePage_Preview=Preview +FormatterPreferencePage_Profile=Profile '%s' +FormatterPreferencePage_Remove=&Remove +FormatterProfile_AssignInExpr=Assignment ':=' +FormatterProfile_AssignInExpr2=Assignment ':=' in expressions +FormatterProfile_AssignInModuleAlias=Assignment ':=' in module alias declarations +FormatterProfile_AssignInModuleAlias2=Assignment ':=' in module alias declarations +FormatterProfile_BeginInMod=BEGIN keyword in module +FormatterProfile_BeginInProc=BEGIN keyword +FormatterProfile_BeginInProc2=BEGIN keyword in procedure +FormatterProfile_BinaryOps=Binary operations +FormatterProfile_Case=CASE keyword +FormatterProfile_CaseInVarRec=CASE keyword in variant record +FormatterProfile_CaseStatements=Case statements +FormatterProfile_CaseStmt=CASE statement +FormatterProfile_Colon=Colon ':' +FormatterProfile_ColonFormParams=Colon ':' in formal parameter +FormatterProfile_ColonFormParams2=Colon ':' in formal parameter declaration +FormatterProfile_ColonInCase=Colon ':' +FormatterProfile_ColonInCase2=Colon ':' in CASE statement +FormatterProfile_ColonInRetType=Colon ':' in return type +FormatterProfile_ColonInRetType2=Colon ':' in return type declarations +FormatterProfile_ColonInTypeDef=Colon ':' in record type declarations +FormatterProfile_ColonInVar=Colon ':' in variables declarations +FormatterProfile_Comma=Comma ',' +FormatterProfile_CommaInEnum=Comma ',' in enumeration type declarations +FormatterProfile_CommaInFormParams=Comma ',' in formal parameters +FormatterProfile_CommaInFormParams2=Comma ',' in formal parameters declarations +FormatterProfile_CommaInImportLists=Comma ',' in import lists +FormatterProfile_CommaInImportLists2=Comma ',' in import lists +FormatterProfile_CommaInMd=Comma ',' in multiple declarations +FormatterProfile_CommaInMd2=Comma ',' in multiple variables declarations +FormatterProfile_CommaInParList=Comma ',' in parameters list +FormatterProfile_CommaInParList2=Comma ',' in parameters list +FormatterProfile_Constants=Constants +FormatterProfile_ConstGlob=CONST keyword in global declarations +FormatterProfile_ConstLoc=CONST keyword in local declarations +FormatterProfile_ControlStatements=Control statements +FormatterProfile_CtrlStmt=Control statements +FormatterProfile_DeclAndDefs=Declarations +FormatterProfile_Declarations=Declarations +FormatterProfile_Do=DO keyword +FormatterProfile_Dot=Dot '.' +FormatterProfile_Dot2=Dot '.' +FormatterProfile_ElseInCase=ELSE keyword in CASE statement +FormatterProfile_ElseInIf=ELSE keyword in IF statement +FormatterProfile_ElseInVarRec=ELSE keyword in variant record +FormatterProfile_Elsif=ELSIF keyword +FormatterProfile_End=END keyword +FormatterProfile_EndInMod=END keyword +FormatterProfile_EndInMod2=END keyword in module +FormatterProfile_EndInProc=END keyword +FormatterProfile_EndInProc2=END keyword in procedure +FormatterProfile_EndInRec=END keyword in record definition +FormatterProfile_EndInVarRec=END keyword in variant record +FormatterProfile_EnumType=Enumeration types +FormatterProfile_Equ=Equal '=' in constant declarations +FormatterProfile_EquInConst=Equal '=' in constant declarations +FormatterProfile_EquInMd=Equal '=' in type declarations +FormatterProfile_EquInMd2=Equal '=' in type declarations +FormatterProfile_Except=EXCEPT keyword +FormatterProfile_Export=EXPORT keyword +FormatterProfile_Expressions=Expressions +FormatterProfile_Finally=FINALLY keyword +FormatterProfile_For=FOR keyword +FormatterProfile_From=FROM keyword in unqualified import +FormatterProfile_If=IF keyword +FormatterProfile_IfStatements=If statements +FormatterProfile_Import=Import +FormatterProfile_ImportSimple=IMPORT keyword in simple import +FormatterProfile_IndexExpr=Index expressions +FormatterProfile_LBracket=Opening bracket '[' +FormatterProfile_LBracketInExpr=Opening bracket '[' +FormatterProfile_LBracketInExpr2=Opening bracket '[' in index expressions +FormatterProfile_LBracketInRange=Opening bracket '[' in range type declarations +FormatterProfile_Loop=LOOP keyword +FormatterProfile_LParenth=Opening parenthesis '(' +FormatterProfile_LParenthInEnum=Opening parenthesis '(' in enumeration type declarations +FormatterProfile_LParenthInExpr=Opening parenthesis '(' +FormatterProfile_LParenthInExpr2=Opening parenthesis '(' in expressions +FormatterProfile_LParenthInProcCall=Opening parenthesis '(' in procedure invocations +FormatterProfile_LParenthInProcCall2=Opening parenthesis '(' in procedure invocations +FormatterProfile_LParenthInProcDecl=Opening parenthesis '(' in procedure declarations +FormatterProfile_LParenthInProcDecl2=Opening parenthesis '(' in procedure declarations +FormatterProfile_Modules=Modules +FormatterProfile_OfInCase=OF keyword in CASE statement +FormatterProfile_OfInVarRec=OF keyword in variant record +FormatterProfile_OtherStatements=Other statements +FormatterProfile_ParenthExpr=Parenthesized expressions +FormatterProfile_Procedure=PROCEDURE keyword +FormatterProfile_Procedures=Procedures +FormatterProfile_ProcInvoc=Procedure invocations +FormatterProfile_PtrDeref=Pointer dereference '^' +FormatterProfile_PtrDeref2=Pointer dereference '^' in expressions +FormatterProfile_Range=Range '..' +FormatterProfile_Range2=Range '..' in range type declarations +FormatterProfile_RangeType=Range types +FormatterProfile_RBracket=Closing bracket ']' +FormatterProfile_RBracketInExpr=Closing bracket ']' +FormatterProfile_RBracketInExpr2=Closing bracket ']' in index expressions +FormatterProfile_RBracketInRange=Closing bracket ']' in range type declarations +FormatterProfile_Record=RECORD keyword +FormatterProfile_RecordType=Record types +FormatterProfile_Repeat=REPEAT keyword +FormatterProfile_RParenth=Closing parenthesis ')' +FormatterProfile_RParenthInEnum=Closing parenthesis ')' in enumeration type declarations +FormatterProfile_RParenthInExpr=Closing parenthesis ')' +FormatterProfile_RParenthInExpr2=Closing parenthesis ')' in expressions +FormatterProfile_RParenthInProcCall=Closing parenthesis ')' in procedure invocations +FormatterProfile_RParenthInProcCall2=Closing parenthesis ')' in procedure invocations +FormatterProfile_RParenthInProcDecl=Closing parenthesis ')' in procedure declarations +FormatterProfile_RParenthInProcDecl2=Closing parenthesis ')' in procedure declarations +FormatterProfile_Semicolon=Semicolon ';' +FormatterProfile_Semicolon2=Semicolon ';' +FormatterProfile_SemicolonFormParams=Semicolon ';' in formal parameters +FormatterProfile_SemicolonFormParams2=Semicolon ';' in formal parameters declarations +FormatterProfile_Separator=Separator '|' +FormatterProfile_SeparatorInCase=Separator '|' +FormatterProfile_SeparatorInCase2=Separator '|' in CASE statement +FormatterProfile_SeparatorInRecordTypeDef=Separator '|' in variant record declarations +FormatterProfile_SepInCase=CASE variant separator '|' +FormatterProfile_SepInVarRec=Variant record separator '|' +FormatterProfile_SetsForAllBinaryOps=Binary operations +FormatterProfile_SetsForAllUnaryOps=Unary operations +FormatterProfile_StmtClosedParenthesis=Last closing parenthesis ')' +FormatterProfile_StmtClosedParenthesis2=Last closing parenthesis ')' in control statement +FormatterProfile_StmtOpenedParenthesis=First opening parenthesis '(' +FormatterProfile_StmtOpenedParenthesis2=First opening parenthesis '(' in control statement +FormatterProfile_Then=THEN keyword +FormatterProfile_TypeGlob=TYPE keyword in global declarations +FormatterProfile_TypeLoc=TYPE keyword in local declarations +FormatterProfile_Types=Types +FormatterProfile_UnaryOps=Unary operations +FormatterProfile_Until=UNTIL keyword +FormatterProfile_VarGlob=VAR keyword in global declarations +FormatterProfile_Variables=Variables +FormatterProfile_VarLoc=VAR keyword in local declarations +FormatterProfile_While=WHILE keyword +FormatterProfile_With=WITH keyword +FormatterProfile_XdsBuiltIn=XDS [built-in] + +IndentationTabPage_DeclOfLocalMods=Declarations of local modules (size) +IndentationTabPage_DeclOfLocalProcs=Declarations of local procedures (size) +IndentationTabPage_DeclOfRecFields=Declarations of record fields +IndentationTabPage_DeclWithinModule=Declarations within module +IndentationTabPage_DeclWithinProc=Declarations within procedure +IndentationTabPage_DeclWithinVCT=Declarations within VAR/TYPE/CONST block +IndentationTabPage_GeneralSettings=General settings +IndentationTabPage_Indent=Indent +IndentationTabPage_IndentSize=Indentation size +IndentationTabPage_Mixed=Mixed +IndentationTabPage_Preview=Preview +IndentationTabPage_SpacesOnly=Spaces only +IndentationTabPage_SpacesToWrappedLines=Use spaces to indent wrapped lines +IndentationTabPage_Statements=Statements within operator/procedure/module body +IndentationTabPage_StatementsInCase=Statements within CASE body +IndentationTabPage_StatementsInCaseAlt=Statements within CASE alternative (size) +IndentationTabPage_TabPolicy=Tab policy +IndentationTabPage_TabSize=Tab size +IndentationTabPage_UseTabs=Use tabs + +SpellingPreferenceBlock_Advanced=Advanced +SpellingPreferenceBlock_BadDictFile=Invalid dictionary file name +SpellingPreferenceBlock_Browse=Browse... +SpellingPreferenceBlock_Dictionaries=Dictionaries +SpellingPreferenceBlock_Dictionary=Dictionary +SpellingPreferenceBlock_Encoding=Encoding +SpellingPreferenceBlock_IgnoreCapitalization=Ignore sentence capitalization +SpellingPreferenceBlock_IgnoreM2Strings=Ignore Modula-2 string literals +SpellingPreferenceBlock_IgnoreMixedCaseWords=Ignore mixed case words +SpellingPreferenceBlock_IgnoreNonLettersBoundaries=Ignore non-letters at word boundaries +SpellingPreferenceBlock_IgnoreSingleLetters=Ignore single letters +SpellingPreferenceBlock_IgnoreUpperCaseWords=Ignore upper case words +SpellingPreferenceBlock_IgnoreURLs=Ignore internet addresses +SpellingPreferenceBlock_IgnoreWordsWithDigits=Ignore words with digits +SpellingPreferenceBlock_InvalidInt='%s' is not a valid positive integer +SpellingPreferenceBlock_MaxProblems=Maximim number of problems reported per file +SpellingPreferenceBlock_MaxProposals=Maximim number of correction proposals +SpellingPreferenceBlock_none=none +SpellingPreferenceBlock_NumberRequired=A positive integer must be specified +SpellingPreferenceBlock_Options=Options +SpellingPreferenceBlock_PlatformDictionary=Platform dictionary +SpellingPreferenceBlock_RWAccessRequired=The dictionary file must accessible for read and write +SpellingPreferenceBlock_SelectUserDictionary=Select user dictionary +SpellingPreferenceBlock_UserDefDictionary=User defined dictionary +SpellingPreferenceBlock_UserDictDesc=The user dictionary is a text file with one word on each line +SpellingPreferenceBlock_Variables=Variables... + +XdsEditorPreferencePage_link=XDS Modula-2 editor preferences. See 'Text Editors' for general text editor preferences and 'Colors and Fonts' to configure the font. +XdsEditorPreferencePage_HighlightBrackets=Highlight matching brackets +XdsEditorPreferencePage_MatchedBracketsColor=Matched brackets highlight color +XdsEditorPreferencePage_UnmatchedBracketsColor=Unmatched brackets highlight color +XdsEditorPreferencePage_HighlightInactiveCode=Highlight inactive code + +XdsOutlineFilter_ConstantsName=Constants +XdsOutlineFilter_ConstantsDesc=Hides constants and enumeration elements declarations + +XdsOutlineFilter_ImportName=Import lists +XdsOutlineFilter_ImportDesc=Hides all import lists + +XdsOutlineFilter_LocModulesName=Local modules +XdsOutlineFilter_LocModulesDesc=Hides local modules + +XdsOutlineFilter_ProceduresName=Procedures +XdsOutlineFilter_ProceduresDesc=Hides procedures declarations + +XdsOutlineFilter_FormalParametersName=Procedure parameters +XdsOutlineFilter_FormalParametersDesc=Hides procedures parameters + +XdsOutlineFilter_TypesName=Types +XdsOutlineFilter_TypesDesc=Hides types declarations + +XdsOutlineFilter_RecordFieldsName=Record fields +XdsOutlineFilter_RecordFieldsDesc=Hides records fields + +XdsOutlineFilter_GlobalVariablesName=Global variables +XdsOutlineFilter_GlobalVariablesDesc=Hides global variables declarations + +XdsOutlineFilter_LocalVariablesName=Local variables +XdsOutlineFilter_LocalVariablesDesc=Hides local variables declarations + +XdsOutlineFiltersDialog_DeselectAll=Deselect All +XdsOutlineFiltersDialog_FilterDescription=Filter description: +XdsOutlineFiltersDialog_SelectAll=Select All +XdsOutlineFiltersDialog_SelectToExclude=Select the elements to exclude from the view: +XdsOutlineFiltersDialog_ViewFilters=View element filters + +XdsOutlinePage_CollapseAll=Collapse All +XdsOutlinePage_ExpandAll=Expand All +XdsOutlinePage_Filters=Filters +XdsOutlinePage_LinkWithEditor=Link with Editor +XdsOutlinePage_Sort=Sort +XdsOutlinePage_Loading=Loading ... + +XdsOutlinePageContentProvider_0=Build UI model tree + +XdsQuickOutlineDialog_Filters=Filters... +XdsQuickOutlineDialog_SortAlphabetically=Sort alphabetically + +UpdateModel=Update model + +HyperlinkText_ModulaDeclaration=Open Declaration +ProfileManager_ExportProfile=Export profile +ProfileManager_ExportProfiles=Export profiles +ProfileManager_ImportedProfiles=Imported %d profile(s):\n\n +ProfileManager_ImportProfiles=Import profiles +ProfileManager_NoProfilesFound=No profiles found in '%s'. +ProfileManager_ReplaceQuestion=File '%s' already exists.\nDo you want to replace it? +OccurrencesMarker_MarkingOccurrences=Marking occurrences +OccurrencesMarker_OccurrenceOf=Occurrence of '%s' +OccurrencesMarker_WriteOccurrencesMarker=Write occurrence of '%s' +OpenDeclarations_description=Open Declaration +OpenDeclarations_label=Open Declaration +OpenDeclarations_tooltip=Open Declaration +ReferencesSearchGroup_References=References + +TabLineWrapping_GeneralSettings=General settings +TabLineWrapping_InvalidValue=Invalid value: please enter number between 0 and 9999. +TabLineWrapping_MaxLineWidth=Maximum line width +TabLineWrapping_SetWidthToPreview=Set line width for preview window +TabPageWhiteSpace_InsertSpace=Insert space +TabPageWhiteSpace_InsSpaceAfter=Insert space after +TabPageWhiteSpace_InsSpaceBefore=Insert space before + +TabPageNewLines_InsertNewLine=Insert new line +TabPageNewLines_InsNewlineAfter=Insert new line after +TabPageNewLines_InsNewlineBefore=Insert new line before + +SymFileEditor_CannotOpenFile=(*\r\n * Could not open the editor:\r\n * The Sym-File Viewer cannot handle the given file.\r\n *) + +Spelling_add_askToConfigure_ignoreMessage=&Do not show 'Add word' proposals if user dictionary is missing +Spelling_add_askToConfigure_question=A user dictionary is needed to add words.\nDo you want to configure it now?\n +Spelling_add_askToConfigure_title=Missing User Dictionary +Spelling_add_info=Adds the word ''{0}'' to the dictionary +Spelling_addWordProposal=Add ''{0}'' to dictionary +Spelling_case_label=Change to upper case +Spelling_correct_label=Change to ''%s'' +Spelling_disable_info=Disables spell checking. +Spelling_disable_label=Disable spell checking +Spelling_error_case_label=The word ''%s'' should have an initial upper case letter +Spelling_error_label=The word ''%s'' is not correctly spelled +Spelling_ignore_info=Ignores ''{0}'' during the current session +Spelling_ignore_label=Ignore ''{0}'' during the current session +ModulaEditor_GrayingMarkers=Graying markers + +SyntaxColoringPreferencePage_Modula2=Modula-2 \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CodeStylePreferencePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CodeStylePreferencePage.java new file mode 100644 index 0000000..14cff8d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CodeStylePreferencePage.java @@ -0,0 +1,49 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class CodeStylePreferencePage extends PreferencePage implements IWorkbenchPreferencePage +{ + + public CodeStylePreferencePage() { + } + + public CodeStylePreferencePage(String title) { + super(title); + } + + public CodeStylePreferencePage(String title, ImageDescriptor image) { + super(title, image); + } + + @Override + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(final Composite parent) { + Composite comp = new Composite(parent, SWT.NONE); + GridLayout layout = new GridLayout(); + layout.marginHeight = 0; + layout.marginWidth = 0; + comp.setLayout(layout); + + Label descLabel = new Label(comp, SWT.NONE); + descLabel.setText(Messages.CodeStylePreferencePage_ExpandTreeToEdit); + + noDefaultAndApplyButton(); + + return comp; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CreateProfileDialog.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CreateProfileDialog.java new file mode 100644 index 0000000..510af70 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/CreateProfileDialog.java @@ -0,0 +1,178 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import java.util.List; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.dialogs.StatusDialog; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager.IProfile; + +public class CreateProfileDialog extends StatusDialog { + + + private static final String PREF_OPEN_EDIT_DIALOG= XdsEditorsPlugin.PLUGIN_ID + ".create_profile_dialog.open_edit"; //$NON-NLS-1$ + + private Text fNameText; + private Combo fProfileCombo; + private Button fEditCheckbox; + + private final static Status fOk= new Status(IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, ""); //$NON-NLS-1$ + private final static Status fEmpty= new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.CreateProfileDialog_ProfNameEmpty); + private final static Status fDuplicate= new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.CreateProfileDialog_NameExists); + + private final ProfileManager fProfileManager; + private final IProfile fProfileFactory; + private final List fProfilesList; + private final List fProfileNamesList; + + private IProfile fCreatedProfile; + protected boolean fOpenEditDialog; + + + public CreateProfileDialog(Shell parentShell, ProfileManager profileManager, IProfile profileFactory) { + super(parentShell); + fProfileManager= profileManager; + fProfileFactory= profileFactory; + fProfilesList= fProfileManager.getProfiles(); + fProfileNamesList= fProfileManager.getProfileNames(); + } + + + @Override + public void create() { + super.create(); + setTitle(Messages.CreateProfileDialog_NewProfile); + } + + @Override + public Control createDialogArea(Composite parent) { + + final int numColumns= 2; + + final Composite composite= (Composite) super.createDialogArea(parent); + ((GridLayout) composite.getLayout()).numColumns= numColumns; + + // Create "Profile name:" label + GridData gd = new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan = numColumns; + gd.widthHint= convertWidthInCharsToPixels(60); + final Label nameLabel = new Label(composite, SWT.WRAP); + nameLabel.setText(Messages.CreateProfileDialog_ProfName + ':'); + nameLabel.setLayoutData(gd); + + // Create text field to enter name + gd = new GridData( GridData.FILL_HORIZONTAL); + gd.horizontalSpan= numColumns; + fNameText= new Text(composite, SWT.SINGLE | SWT.BORDER); + fNameText.setLayoutData(gd); + fNameText.addModifyListener( new ModifyListener() { + public void modifyText(ModifyEvent e) { + doValidation(); + } + }); + + // Create "Initialize settings ..." label + gd = new GridData(); + gd.horizontalSpan = numColumns; + Label profileLabel = new Label(composite, SWT.WRAP); + profileLabel.setText(Messages.CreateProfileDialog_InitFromProfile + ':'); + profileLabel.setLayoutData(gd); + + gd= new GridData(GridData.FILL_HORIZONTAL); + gd.horizontalSpan= numColumns; + fProfileCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY); + fProfileCombo.setLayoutData(gd); + fProfileCombo.setVisibleItemCount(30); + + + // "Open the edit dialog now" checkbox + gd= new GridData(); + gd.horizontalSpan= numColumns; + fEditCheckbox= new Button(composite, SWT.CHECK); + fEditCheckbox.setText(Messages.CreateProfileDialog_OpenEditDlg); + fEditCheckbox.addSelectionListener(new SelectionListener() { + public void widgetSelected(SelectionEvent e) { + fOpenEditDialog= ((Button)e.widget).getSelection(); + } + public void widgetDefaultSelected(SelectionEvent e) { + } + }); + + final IDialogSettings dialogSettings= XdsEditorsPlugin.getDefault().getDialogSettings();//.get(PREF_OPEN_EDIT_DIALOG); + if (dialogSettings.get(PREF_OPEN_EDIT_DIALOG) != null) { + fOpenEditDialog= dialogSettings.getBoolean(PREF_OPEN_EDIT_DIALOG); + } else { + fOpenEditDialog= true; + } + fEditCheckbox.setSelection(fOpenEditDialog); + + fProfileCombo.setItems(fProfileNamesList.toArray(new String[0])); + fProfileCombo.setText(fProfileManager.getActiveProfileName()); + updateStatus(fEmpty); + + applyDialogFont(composite); + + fNameText.setFocus(); + + return composite; + } + + + /** + * Validate the current settings + */ + protected void doValidation() { + final String name= fNameText.getText().trim(); + + if (fProfileNamesList.contains(name)) { + updateStatus(fDuplicate); + return; + } + if (name.length() == 0) { + updateStatus(fEmpty); + return; + } + updateStatus(fOk); + } + + + @Override + protected void okPressed() { + if (!getStatus().isOK()) + return; + + XdsEditorsPlugin.getDefault().getDialogSettings().put(PREF_OPEN_EDIT_DIALOG, fOpenEditDialog); + + IProfile from = fProfilesList.get(fProfileCombo.getSelectionIndex()); + fCreatedProfile = fProfileFactory.createFromProfile(from, fNameText.getText().trim()); + + fProfileManager.add(fCreatedProfile); + super.okPressed(); + } + + public final IProfile getCreatedProfile() { + return fCreatedProfile; + } + + public final boolean openEditDialog() { + return fOpenEditDialog; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/EditorPreferencePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/EditorPreferencePage.java new file mode 100644 index 0000000..c861a0a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/EditorPreferencePage.java @@ -0,0 +1,234 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import org.eclipse.jface.preference.ColorSelector; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferenceConverter; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Link; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.AnnotationPreference; + +import com.excelsior.xds.core.help.IXdsHelpContextIds; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.commons.utils.HelpUtils; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.text.PairedBracketsPainter; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class EditorPreferencePage extends PreferencePage + implements IWorkbenchPreferencePage, + IXdsEditorsPreferenceIds +{ + + private Button cbShowBrackets; + private ColorSelector clrShowBrackets; + private ColorSelector clrShowBracketsNoMatch; + private Label labelShowBrackets; + private Label labelShowBracketsNoMatch; + + private Button cbConstructions; + + private Button cbInactiveCode; + + public EditorPreferencePage() { + } + + public EditorPreferencePage(String title) { + super(title); + } + + public EditorPreferencePage(String title, ImageDescriptor image) { + super(title, image); + } + + @Override + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(final Composite parent) { + parent.setLayout(new GridLayout()); + HelpUtils.setHelp(parent, IXdsHelpContextIds.MODULA2_EDITOR_PREFERENCE_PAGE); + + Composite composite= new Composite(parent, SWT.NONE); + GridLayout layout= new GridLayout(); + layout.numColumns= 3; + composite.setLayout(layout); + + // XDS Modula-2 editor preferences. See 'Text Editors' for general text .... + Link link= new Link(composite, SWT.NONE); + link.setText(Messages.XdsEditorPreferencePage_link); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + if ("org.eclipse.ui.preferencePages.GeneralTextEditor".equals(e.text)) //$NON-NLS-1$ + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null); + else if ("org.eclipse.ui.preferencePages.ColorsAndFonts".equals(e.text)) //$NON-NLS-1$ + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, "selectFont:org.eclipse.jface.textfont"); //$NON-NLS-1$ +// else if ("org.eclipse.ui.editors.preferencePages.Annotations".equals(e.text)) //$NON-NLS-1$ +// PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null); //$NON-NLS-1$ + + } + }); + GridData gridData = new GridData(GridData.FILL_HORIZONTAL); + gridData.widthHint= 300; // only expand further if anyone else requires it + gridData.horizontalSpan = 3; + link.setLayoutData(gridData); + + SWTFactory.createVerticalSpacer(composite, 0.5); + + // [v] Highlight matching brackets + cbShowBrackets = SWTFactory.createCheckbox(composite, Messages.XdsEditorPreferencePage_HighlightBrackets, 3); + cbShowBrackets.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + reenableAll(); + } + @Override + public void widgetDefaultSelected(SelectionEvent e) {} + }); + + // Matching brackets highlight color: [ ] + SWTFactory.createLabel(composite, " ", 1); //$NON-NLS-1$ + labelShowBrackets = SWTFactory.createLabel(composite, Messages.XdsEditorPreferencePage_MatchedBracketsColor+':', 1); + clrShowBrackets = SWTFactory.createColorSelector(composite, 1); + + // No matching brackets highlight color: [ ] + SWTFactory.createLabel(composite, " ", 1); //$NON-NLS-1$ + labelShowBracketsNoMatch = SWTFactory.createLabel(composite, Messages.XdsEditorPreferencePage_UnmatchedBracketsColor+':', 1); + clrShowBracketsNoMatch = SWTFactory.createColorSelector(composite, 1); + + SWTFactory.createVerticalSpacer(composite, 0.5); + + // [v] Highlight operators structure + cbConstructions = SWTFactory.createCheckbox(composite, Messages.EditorPreferencePage_HlghlightOperatorsStructure, 3); + cbConstructions.addSelectionListener(new SelectionListener() { + @Override + public void widgetSelected(SelectionEvent e) { + reenableAll(); + } + @Override + public void widgetDefaultSelected(SelectionEvent e) {} + }); + + // See _Annotations_ page to configure highlighting settings + Label label = SWTFactory.createLabel(composite, " ", 1); //$NON-NLS-1$ + gridData = new GridData(); + gridData.heightHint= clrShowBrackets.getButton().computeSize(SWT.DEFAULT, SWT.DEFAULT).y; + label.setLayoutData(gridData); + + link= new Link(composite, SWT.NONE); + link.setText(Messages.EditorPreferencePage_LinkToAnnotationsPage); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + String data= null; + AnnotationPreference preference= EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference("com.excelsior.xds.ui.editor.constructionMarkerAnnotation"); //$NON-NLS-1$ + if (preference != null) + data= preference.getPreferenceLabel(); + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, data); + } + }); + gridData = new GridData(GridData.FILL_HORIZONTAL); + gridData.horizontalSpan = 2; + gridData.widthHint= 300; + link.setLayoutData(gridData); + + SWTFactory.createVerticalSpacer(composite, 0.5); + + // [v] Highlight inactive code + cbInactiveCode = SWTFactory.createCheckbox(composite, Messages.XdsEditorPreferencePage_HighlightInactiveCode, 3); + + // See _Syntax_Coloring_ page to configure highlighting settings + label = SWTFactory.createLabel(composite, " ", 1); //$NON-NLS-1$ + gridData = new GridData(); + gridData.heightHint= clrShowBrackets.getButton().computeSize(SWT.DEFAULT, SWT.DEFAULT).y; + label.setLayoutData(gridData); + + link= new Link(composite, SWT.NONE); + link.setText(Messages.EditorPreferencePage_LinkToColorSettingsPage); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, null); + } + }); + gridData = new GridData(GridData.FILL_HORIZONTAL); + gridData.horizontalSpan = 2; + gridData.widthHint= 300; + link.setLayoutData(gridData); + + + //// Set values: + IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + if (store != null) { + initEditorPrefsInStoreIfNeed(store); + cbShowBrackets.setSelection(store.getBoolean(PREF_HIGHLIGHT_MATCHING_BRACKETS)); + clrShowBrackets.setColorValue(PreferenceConverter.getColor(store, PREF_MATCHED_BRACKETS_COLOR)); + clrShowBracketsNoMatch.setColorValue(PreferenceConverter.getColor(store, PREF_UNMATCHED_BRACKETS_COLOR)); + cbConstructions.setSelection(PreferenceKeys.PKEY_HIGHLIGHT_CONSTRUCTIONS.getStoredBoolean()); + cbInactiveCode.setSelection(PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.getStoredBoolean()); + } + reenableAll(); + + return composite; + } + + @Override + public boolean performOk() { + IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + if (store != null) { + initEditorPrefsInStoreIfNeed(store); + store.setValue(PREF_HIGHLIGHT_MATCHING_BRACKETS, cbShowBrackets.getSelection()); + PreferenceConverter.setValue(store, PREF_MATCHED_BRACKETS_COLOR, clrShowBrackets.getColorValue()); + PreferenceConverter.setValue(store, PREF_UNMATCHED_BRACKETS_COLOR, clrShowBracketsNoMatch.getColorValue()); + PreferenceKeys.PKEY_HIGHLIGHT_CONSTRUCTIONS.setStoredBoolean(cbConstructions.getSelection()); + PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.setStoredBoolean(cbInactiveCode.getSelection()); + } + return true; + } + + @Override + public void performDefaults() { + cbShowBrackets.setSelection(true); + clrShowBrackets.setColorValue(PairedBracketsPainter.DEF_RGB_MATCHED); + clrShowBracketsNoMatch.setColorValue(PairedBracketsPainter.DEF_RGB_UNMATCHED); + cbConstructions.setSelection(true); + reenableAll(); + } + + private void reenableAll() { + boolean b = cbShowBrackets.getSelection(); + clrShowBrackets.setEnabled(b); + clrShowBracketsNoMatch.setEnabled(b); + labelShowBrackets.setEnabled(b); + labelShowBracketsNoMatch.setEnabled(b); + } + + public static void initEditorPrefsInStoreIfNeed(IPreferenceStore store) { + if (store != null) { + if (!store.contains(PREF_UNMATCHED_BRACKETS_COLOR)) { + // NOTE: store.contains(ModulaEditor.EDITOR_MATCHING_BRACKETS) does not works - for boolean with FALSE value it returns TRUE averytime + store.setValue(PREF_HIGHLIGHT_MATCHING_BRACKETS, true); + PreferenceConverter.setValue(store, PREF_MATCHED_BRACKETS_COLOR, PairedBracketsPainter.DEF_RGB_MATCHED); + PreferenceConverter.setValue(store, PREF_UNMATCHED_BRACKETS_COLOR, PairedBracketsPainter.DEF_RGB_UNMATCHED); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/IXdsEditorsPreferenceIds.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/IXdsEditorsPreferenceIds.java new file mode 100644 index 0000000..6a9fa4b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/IXdsEditorsPreferenceIds.java @@ -0,0 +1,38 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; + +/** + * Preference constants used in the XDS editors preference store. + * + * @author lion + */ +public interface IXdsEditorsPreferenceIds { + + public static final String PREFIX = XdsEditorsPlugin.PLUGIN_ID + "."; //$NON-NLS-1$ + + /** + * A named preference that controls enable/disable highlight matching brackets. + *

+ * Value is of type Boolean. + *

+ */ + public final static String PREF_HIGHLIGHT_MATCHING_BRACKETS = PREFIX + "HighlightMatchingBrackets"; //$NON-NLS-1$ + + /** + * A named preference that holds a color of matched brackets. + *

+ * Value is of type RGB. + *

+ */ + public final static String PREF_MATCHED_BRACKETS_COLOR = PREFIX + "MatchedBracketsColor"; //$NON-NLS-1$ + + /** + * A named preference that holds a color of unmatched brackets. + *

+ * Value is of type RGB. + *

+ */ + public final static String PREF_UNMATCHED_BRACKETS_COLOR = PREFIX + "UnmatchedBracketsColor"; //$NON-NLS-1$ + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/MarkOccurrencesPreferencePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/MarkOccurrencesPreferencePage.java new file mode 100644 index 0000000..7782dd3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/MarkOccurrencesPreferencePage.java @@ -0,0 +1,91 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Link; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.dialogs.PreferencesUtil; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.AnnotationPreference; + +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class MarkOccurrencesPreferencePage extends PreferencePage implements + IWorkbenchPreferencePage { + + private Button cboxOnOff; + + @Override + public IPreferenceStore getPreferenceStore() { + return XdsEditorsPlugin.getDefault().getPreferenceStore(); + } + + //--- Preference page: + + public MarkOccurrencesPreferencePage() { + setPreferenceStore(XdsEditorsPlugin.getDefault().getPreferenceStore()); + } + + @Override + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(final Composite parent) { + Composite composite= new Composite(parent, SWT.NONE); + GridLayout layout= new GridLayout(); + layout.numColumns= 1; + layout.marginHeight= 0; + layout.marginWidth= 0; + composite.setLayout(layout); + + Link link= new Link(composite, SWT.NONE); + link.setText(Messages.MarkOccurrencesPreferencePage_LinkText); + link.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + String data= null; + AnnotationPreference preference= EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference("org.eclipse.jdt.ui.occurrences"); //$NON-NLS-1$ + if (preference != null) + data= preference.getPreferenceLabel(); + PreferencesUtil.createPreferenceDialogOn(parent.getShell(), e.text, null, data); + } + }); + + SWTFactory.createLabel(composite, "", 1); //$NON-NLS-1$ + + cboxOnOff = SWTFactory.createCheckbox(composite, Messages.MarkOccurrencesPreferencePage_MarkOccurrencesOfElement, 1); + + initFromStore(); + return composite; + } + + @Override + protected void performDefaults() { + super.performDefaults(); + PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.setStoredBoolean(true); + initFromStore(); + } + + @Override + public boolean performOk() { + PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.setStoredBoolean(cboxOnOff.getSelection()); + return super.performOk(); + } + + private void initFromStore() { + cboxOnOff.setSelection(PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean()); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ModifyDialog.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ModifyDialog.java new file mode 100644 index 0000000..b67d82e --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ModifyDialog.java @@ -0,0 +1,231 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import java.util.ArrayList; +import java.util.List; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.events.SelectionListener; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +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; +import org.eclipse.swt.widgets.TabFolder; +import org.eclipse.swt.widgets.TabItem; +import org.eclipse.swt.widgets.Text; + +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.dialogs.StatusDialog; + +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + + +public abstract class ModifyDialog extends StatusDialog { + + /** + * The keys to retrieve the preferred area from the dialog settings. + */ + private static final String DS_KEY_PREFERRED_WIDTH= "modify_dialog.preferred_width"; //$NON-NLS-1$ + private static final String DS_KEY_PREFERRED_HEIGHT= "modify_dialog.preferred_height"; //$NON-NLS-1$ + private static final String DS_KEY_PREFERRED_X= "modify_dialog.preferred_x"; //$NON-NLS-1$ + private static final String DS_KEY_PREFERRED_Y= "modify_dialog.preferred_y"; //$NON-NLS-1$ + + + /** + * The key to store the number (beginning at 0) of the tab page which had the + * focus last time. + */ + private static final String DS_KEY_LAST_FOCUS= "modify_dialog.last_focus"; //$NON-NLS-1$ + + private final String fKeyPreferredWidth; + private final String fKeyPreferredHight; + private final String fKeyPreferredX; + private final String fKeyPreferredY; + private final String fKeyLastFocus; + private final boolean fNewProfile; + private final List fTabPages; + private final IDialogSettings fDialogSettings; + private Text txtProfileName; + private TabFolder fTabFolder; + + public ModifyDialog(Shell parentShell, String title, String dialogPreferencesKey, boolean fNewProfile) { + super(parentShell); + + this.fNewProfile = fNewProfile; + + String plg = XdsEditorsPlugin.PLUGIN_ID; + fKeyPreferredWidth= plg + dialogPreferencesKey + DS_KEY_PREFERRED_WIDTH; + fKeyPreferredHight= plg + dialogPreferencesKey + DS_KEY_PREFERRED_HEIGHT; + fKeyPreferredX= plg + dialogPreferencesKey + DS_KEY_PREFERRED_X; + fKeyPreferredY= plg + dialogPreferencesKey + DS_KEY_PREFERRED_Y; + fKeyLastFocus= plg + dialogPreferencesKey + DS_KEY_LAST_FOCUS; + + setTitle(title); + setStatusLineAboveButtons(false); + fTabPages= new ArrayList(); + fDialogSettings= XdsEditorsPlugin.getDefault().getDialogSettings(); + } + + /* + * @see org.eclipse.jface.dialogs.Dialog#isResizable() + * @since 3.4 + */ + @Override + protected boolean isResizable() { + return true; + } + + protected abstract void addPages(); + + @Override + public void create() { + super.create(); + int lastFocusNr= 0; + try { + lastFocusNr= fDialogSettings.getInt(fKeyLastFocus); + if (lastFocusNr < 0) lastFocusNr= 0; + if (lastFocusNr > fTabPages.size() - 1) lastFocusNr= fTabPages.size() - 1; + } catch (NumberFormatException x) { + lastFocusNr= 0; + } + + if (!fNewProfile) { + fTabFolder.setSelection(lastFocusNr); + ((IModifyDialogTabPage)fTabFolder.getSelection()[0].getData()).setInitialFocus(); + } + } + + + + @Override + protected Control createDialogArea(Composite parent) { + + final Composite composite= (Composite)super.createDialogArea(parent); + + Composite nameComposite= new Composite(composite, SWT.NONE); + nameComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + nameComposite.setLayout(new GridLayout(3, false)); + + SWTFactory.createLabel(nameComposite, Messages.ModifyDialog_ProfileName + ':', 1); + txtProfileName = SWTFactory.createSingleText(nameComposite, 1); + SWTFactory.createPushButton(nameComposite, Messages.ModifyDialog_Export, null).addSelectionListener( new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleExportButton(); + } + }); + + fTabFolder = new TabFolder(composite, SWT.NONE); + fTabFolder.setFont(composite.getFont()); + fTabFolder.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + addPages(); + + applyDialogFont(composite); + + fTabFolder.addSelectionListener(new SelectionListener() { + public void widgetDefaultSelected(SelectionEvent e) {} + public void widgetSelected(SelectionEvent e) { + final TabItem tabItem= (TabItem)e.item; + final IModifyDialogTabPage page= (IModifyDialogTabPage)tabItem.getData(); + fDialogSettings.put(fKeyLastFocus, fTabPages.indexOf(page)); + page.makeVisible(); + } + }); + + //PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, getHelpContextId()); + + return composite; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.window.Window#getInitialSize() + */ + @Override + protected Point getInitialSize() { + Point initialSize= super.getInitialSize(); + try { + int lastWidth= fDialogSettings.getInt(fKeyPreferredWidth); + if (initialSize.x > lastWidth) + lastWidth= initialSize.x; + int lastHeight= fDialogSettings.getInt(fKeyPreferredHight); + if (initialSize.y > lastHeight) + lastHeight= initialSize.y; + return new Point(lastWidth, lastHeight); + } catch (NumberFormatException ex) { + } + return initialSize; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point) + */ + @Override + protected Point getInitialLocation(Point initialSize) { + try { + return new Point(fDialogSettings.getInt(fKeyPreferredX), fDialogSettings.getInt(fKeyPreferredY)); + } catch (NumberFormatException ex) { + return super.getInitialLocation(initialSize); + } + } + + @Override + public boolean close() { + final Rectangle shell= getShell().getBounds(); + + fDialogSettings.put(fKeyPreferredWidth, shell.width); + fDialogSettings.put(fKeyPreferredHight, shell.height); + fDialogSettings.put(fKeyPreferredX, shell.x); + fDialogSettings.put(fKeyPreferredY, shell.y); + + return super.close(); + } + + protected final void addTabPage(String title, IModifyDialogTabPage tabPage) { + final TabItem tabItem= new TabItem(fTabFolder, SWT.NONE); + applyDialogFont(tabItem.getControl()); + tabItem.setText(title); + tabItem.setData(tabPage); + tabItem.setControl(tabPage.createContents(fTabFolder)); + fTabPages.add(tabPage); + } + + abstract protected void handleExportButton(); + + protected Text getTxtProfileName() { + return txtProfileName; + } + + public interface IModifyDialogTabPage { + + /** + * Create the contents of this tab page. + * + * @param parent the parent composite + * @return created content control + */ + public Composite createContents(Composite parent); + + /** + * This is called when the page becomes visible. + * Common tasks to do include: + *
  • Updating the preview.
  • + *
  • Setting the focus
  • + *
+ */ + public void makeVisible(); + + /** + * Each tab page should remember where its last focus was, and reset it + * correctly within this method. This method is only called after + * initialization on the first tab page to be displayed in order to restore + * the focus of the last session. + */ + public void setInitialFocus(); + + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/Modula2TemplatesPreferencePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/Modula2TemplatesPreferencePage.java new file mode 100644 index 0000000..555ca9c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/Modula2TemplatesPreferencePage.java @@ -0,0 +1,51 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; +import org.eclipse.ui.texteditor.templates.TemplatePreferencePage; + +import com.excelsior.xds.core.help.IXdsHelpContextIds; +import com.excelsior.xds.ui.commons.utils.HelpUtils; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; + +/** + * Preference page for Modula-2 code templates. + */ +public class Modula2TemplatesPreferencePage extends TemplatePreferencePage + implements IWorkbenchPreferencePage +{ + public Modula2TemplatesPreferencePage() { + super(); + } + + @Override + protected Control createContents(Composite ancestor) { + HelpUtils.setHelp(ancestor, IXdsHelpContextIds.MODULA2_TEMPLATES_PREFERENCE_PAGE); + return super.createContents(ancestor); + } + + + /* (non-Javadoc) + * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench) + */ + @Override + public void init(IWorkbench workbench) { + super.init(workbench); + setPreferenceStore(XdsEditorsPlugin.getDefault().getPreferenceStore()); + setTemplateStore(XdsEditorsPlugin.getDefault().getTemplateStore()); + setContextTypeRegistry(XdsEditorsPlugin.getDefault().getContextTypeRegistry()); + } + + /* (non-Javadoc) + * @see org.eclipse.jface.preference.PreferencePage#performOk() + */ + @SuppressWarnings("deprecation") + @Override + public boolean performOk() { + boolean ok = super.performOk(); + XdsEditorsPlugin.getDefault().savePluginPreferences(); + return ok; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ProfileManager.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ProfileManager.java new file mode 100644 index 0000000..62f970c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/ProfileManager.java @@ -0,0 +1,292 @@ +package com.excelsior.xds.ui.editor.internal.preferences; + +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; +import java.io.StringReader; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.IMemento; +import org.eclipse.ui.XMLMemento; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class ProfileManager { + private static final String ID_PROFILES_COUNT = ".PROFILES_COUNT"; //$NON-NLS-1$ + private static final String ID_ACTIVE_PROFILE_NAME = ".ACTIVE_PROFILE_NAME"; //$NON-NLS-1$ + private static final String ID_PROFILE = ".PROFILE_"; //$NON-NLS-1$ + private static final String XML_FORMATTER_PROFILE_SECTION = "FormatterProfileSection_"; //$NON-NLS-1$ + private static String importExportPath = null; + + private String activeProfileName; + private List profiles; + private final IProfile profileFactory; + private final String idInStore; + + + public ProfileManager(List initialProfiles, IProfile profileFactory, String idInStore) { + this.profileFactory = profileFactory; + this.idInStore = idInStore; + if (initialProfiles != null) { + profiles = initialProfiles; + } else { + profiles = new ArrayList(); + } + setActiveProfileName(""); //$NON-NLS-1$ + } + + public String getActiveProfileName() { + if (activeProfileName.isEmpty() && profiles.size()>0) { + return profiles.get(0).getName(); + } + return activeProfileName; + } + + public void setActiveProfileName(String activeProfileName) { + this.activeProfileName = activeProfileName; + IProfile ip = getActiveProfile(); + if (ip != null) { + ip.reActivate(); + } + } + + public IProfile getActiveProfile() { + return getProfile(activeProfileName); + } + + public IProfile getProfile(String name) { + for (IProfile ip : profiles) { + if (ip.getName().equals(name)) { + return ip; + } + } + return null; + } + + public IProfile get(int idx) { + return profiles.get(idx); + } + + public int size() { + return profiles.size(); + } + + public void remove(int idx) { + profiles.remove(idx); + } + + public void add(IProfile ip) { + profiles.add(ip); + } + + public List getProfiles() { + return Collections.unmodifiableList(profiles); + } + + public List getProfileNames() { + ArrayList lst = new ArrayList(); + for (IProfile ip : profiles) { + lst.add(ip.getName()); + } + return lst; + } + + public void saveToStore(IPreferenceStore ips) { + int oldCount = ips.getInt(idInStore + ID_PROFILES_COUNT); + + ips.setValue(idInStore + ID_ACTIVE_PROFILE_NAME, activeProfileName); + int prfCount = 0; + for (IProfile ip : profiles) { + if (!ip.isDefaultProfile()) { + XMLMemento memento = XMLMemento.createWriteRoot("tagFormatterProfile"); //$NON-NLS-1$ + ip.toMemento(memento); + StringWriter sw = new StringWriter(); + try { + memento.save(sw); + } catch(Exception e) { + LogHelper.logError(e); + } + ips.setValue(idInStore + ID_PROFILE + prfCount++, sw.toString()); + } + } + ips.setValue(idInStore + ID_PROFILES_COUNT, prfCount); + while (prfCount < oldCount) { + ips.setDefault(idInStore + ID_PROFILE + prfCount++, ""); //$NON-NLS-1$ + } + + IProfile ip = getActiveProfile(); + if (ip != null) { + ip.reActivate(); + } + } + + /** + * Read all profiles from the given store to this profile manager + * @param ips + */ + public void readFromStore(IPreferenceStore ips) { + int allCount = ips.getInt(idInStore + ID_PROFILES_COUNT); + for (int cnt=0; cnt < allCount; ++cnt) { + try { + String xml = ips.getString(idInStore + ID_PROFILE + cnt); + StringReader reader = new StringReader(xml); + XMLMemento memento = XMLMemento.createReadRoot(reader); + IProfile ip = profileFactory.createFromMemento(memento); + if (ip != null) { + String name = ip.getName(); + IProfile ipOld = getProfile(name); + if (ipOld == null) { + profiles.add(ip); + } else { + ipOld.copyFrom(ip); + } + } + } catch (Exception e) { + LogHelper.logError(e); + } + } + setActiveProfileName(ips.getString(idInStore + ID_ACTIVE_PROFILE_NAME)); + } + + public static String readActiveProfileNameFromStore(IPreferenceStore ips, String id) { + return ips.getString(id + ID_ACTIVE_PROFILE_NAME); + } + + public static IProfile readProfileFromStore(String profName, IPreferenceStore ips, String id, IProfile profileFactory) { + int allCount = ips.getInt(id + ID_PROFILES_COUNT); + for (int cnt=0; cnt < allCount; ++cnt) { + try { + String xml = ips.getString(id + ID_PROFILE + cnt); + StringReader reader = new StringReader(xml); + XMLMemento memento = XMLMemento.createReadRoot(reader); + IProfile ip = profileFactory.createFromMemento(memento); + if (ip != null && profName.equals(ip.getName())) { + return ip; + } + } catch (Exception e) { + LogHelper.logError(e); + } + } + return null; + } + + //////// Export/import dialogs: + + /** + * Play export dialog and do the export + * + * @param prof - null to export all or the given profile + * @param pm - profile manager to get profiles from (when 'prof' == null) + */ + public static void exportProfiles(Shell shell, IProfile prof, ProfileManager pm) { + String title = prof==null ? Messages.ProfileManager_ExportProfile : Messages.ProfileManager_ExportProfiles; + String s = SWTFactory.browseFile(shell, true, title, new String[]{"*.xml"}, importExportPath); //$NON-NLS-1$ + if (s != null) { + File f = new File(s); + if (f.exists()) { + if (!SWTFactory.YesNoQuestion(shell, title, + String.format(Messages.ProfileManager_ReplaceQuestion, s))) + { + return; + } + } + + importExportPath = f.getParentFile().getAbsolutePath(); + XMLMemento memento = XMLMemento.createWriteRoot("tagExportedFormatterProfiles"); //$NON-NLS-1$ + int memNum = 0; + int total = prof == null ? pm.size() : 1; + for (int num=0; num < total; ++num) { + IProfile ip = prof == null ? pm.get(num) : prof; + IMemento childMem = memento.createChild(XML_FORMATTER_PROFILE_SECTION + memNum++); + ip.toMemento(childMem); + } + try { + f.delete(); + FileWriter fw = new FileWriter(f); + memento.save(fw); + fw.close(); + } catch(Exception e) { + LogHelper.logError(e); + } + } + } + + + + + /** + * Play import dialog and do the import + * + */ + public void importProfiles(Shell shell) { + String title = Messages.ProfileManager_ImportProfiles; + String s = SWTFactory.browseFile(shell, false, title, new String[]{"*.xml"}, importExportPath); //$NON-NLS-1$ + if (s != null) { + ArrayList addedProfs = new ArrayList(); + try { + File f = new File(s); + importExportPath = f.getParentFile().getAbsolutePath(); + FileReader fr = new FileReader(f); + XMLMemento memento = XMLMemento.createReadRoot(fr); + for (int memNum=0; true; ++memNum) { + IMemento childMem = memento.getChild(XML_FORMATTER_PROFILE_SECTION + memNum); + if (childMem == null) { + break; + } + IProfile ip = profileFactory.createFromMemento(childMem); + if (ip != null && !ip.isDefaultProfile()) { + IProfile ipOld = getProfile(ip.getName()); + if (ipOld == null) { + add(ip); + addedProfs.add(ip); + } else if (!ipOld.isDefaultProfile()) { + ipOld.copyFrom(ip); + addedProfs.add(ip); + } + } + } + } catch (Exception e) { + LogHelper.logError(e); + } + + String desc = String.format(Messages.ProfileManager_NoProfilesFound, s); + if (!addedProfs.isEmpty()) { + desc = String.format(Messages.ProfileManager_ImportedProfiles, addedProfs.size()); + for (IProfile ip : addedProfs) { + desc += ip.getName(); + desc += "\n"; //$NON-NLS-1$ + } + } + SWTFactory.OkMessageBox(shell, title, desc); + } + } + + + public interface IProfile { + public String getName(); + public boolean isDefaultProfile(); // not saved to store, should be passed to ProfileManager constructor + public void reActivate(); // profile becomes active or it is active and its settings was changed + public void copyFrom(IProfile ip); + public void toMemento(IMemento memento); + + //--- all IProfile may work as its class factory: + + /** + * + * @param xml + * @param subRoot - null to create profile from the xml root or xml section name to get profile from it + * @return + */ + public IProfile createFromMemento(IMemento memento); + + public IProfile createFromProfile(IProfile from, String newName); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterModifyDialog.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterModifyDialog.java new file mode 100644 index 0000000..8a5c174 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterModifyDialog.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; + +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ModifyDialog; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager; + +public class FormatterModifyDialog extends ModifyDialog { + private FormatterProfile fp; + private boolean isDefProfile; + + private IStatus errDefStatus = new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.FormatterModifyDialog_CantModifyDefProfile); + + public FormatterModifyDialog(Shell parentShell, String title, String dialogPreferencesKey, FormatterProfile fp, boolean fNewProfile, boolean isDefProfile) { + super(parentShell, title, dialogPreferencesKey, fNewProfile); + this.fp = fp; + this.isDefProfile = isDefProfile; + } + + @Override + public void create() { + super.create(); + if (isDefProfile) { + super.updateStatus(errDefStatus); + } + } + + @Override + protected Control createDialogArea(Composite parent) { + Control res = super.createDialogArea(parent); + Text txtProfileName = this.getTxtProfileName(); + txtProfileName.setText(fp.getName()); + txtProfileName.setEditable(false); + return res; + } + + /** + * To use from tab validators, preserves error status for default profiles + */ + @Override + protected void updateStatus(IStatus status) { + if (isDefProfile && !status.matches(IStatus.ERROR)) { + status = errDefStatus; + } + super.updateStatus(status); + } + + @Override + protected void addPages() { + addTabPage(Messages.FormatterModifyDialog_Indentation, new TabPageIndentation(fp)); + addTabPage(Messages.FormatterModifyDialog_WhiteSpace, new TabPageWhiteSpace(fp)); + addTabPage(Messages.FormatterModifyDialog_NewLines, new TabPageNewLines(fp)); + addTabPage(Messages.FormatterModifyDialog_LineWrapping, new TabLineWrapping(fp, this)); + } + + @Override + protected void handleExportButton() { + ProfileManager.exportProfiles(getShell(), fp, null); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterPreferencePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterPreferencePage.java new file mode 100644 index 0000000..5369ef4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterPreferencePage.java @@ -0,0 +1,276 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import java.util.ArrayList; + +import org.eclipse.jface.dialogs.Dialog; +import org.eclipse.jface.preference.PreferencePage; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.ui.IWorkbench; +import org.eclipse.ui.IWorkbenchPreferencePage; + +import com.excelsior.xds.core.help.IXdsHelpContextIds; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.ui.commons.utils.HelpUtils; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.CreateProfileDialog; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager.IProfile; + + +public class FormatterPreferencePage extends PreferencePage implements IWorkbenchPreferencePage +/* + * NOTE: all profile-type-depended code here is located in numeral places, all other code uses IProfile only + * + * To create other profile-based preference pages we can transform it to abstract class with + * abstract private void initValues(); + * abstract private void handleNewButton(); + * abstract private void handleEditButton(); + * and some specific preview. + * + */ +{ + + private static final String DLG_PREFERENCES_ID = "com.excelsior.xds.ui.editor.internal.preferences.FormatterPreferencePageDlg"; //$NON-NLS-1$ + + private Button fEditButton; + private Button fDeleteButton; + private Combo fProfileCombo; + private FormatterPreview fPreview; + + private ProfileManager fProfileManager; + + + public FormatterPreferencePage() { + } + + public FormatterPreferencePage(String title) { + super(title); + } + + public FormatterPreferencePage(String title, ImageDescriptor image) { + super(title, image); + } + + @Override + public void init(IWorkbench workbench) { + } + + @Override + protected Control createContents(Composite parent) { + HelpUtils.setHelp(parent, IXdsHelpContextIds.MODULA2_FORMATTER_PREFERENCE_PAGE); + Composite composite= new Composite(parent, SWT.NONE); + GridLayout layout= new GridLayout(); + layout.marginHeight= 0; + layout.marginWidth= 0; + composite.setLayout(layout); + composite.setFont(parent.getFont()); + + GridData data= new GridData(GridData.FILL, GridData.FILL, true, true); + + Control fConfigurationBlockControl= createPreferenceContent(composite); + fConfigurationBlockControl.setLayoutData(data); + + Dialog.applyDialogFont(composite); + + initValues(); + + return composite; + } + + + private Composite createPreferenceContent(Composite parent) { + + final int numColumns = 5; + + final Composite fComposite = new Composite(parent, SWT.NONE); + fComposite.setFont(parent.getFont()); + final GridLayout layout = new GridLayout(numColumns, false); + layout.marginHeight = 0; + layout.marginWidth = 0; + fComposite.setLayout(layout); + + SWTFactory.createLabel(fComposite, Messages.FormatterPreferencePage_ActiveProfile+':', numColumns); + + fProfileCombo = SWTFactory.createCombo(fComposite, 3, SWT.DROP_DOWN | SWT.READ_ONLY); + fProfileCombo.setFont(fComposite.getFont()); + fProfileCombo.setVisibleItemCount(30); + fProfileCombo.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleComboSelection(); + } + }); + + fEditButton = SWTFactory.createPushButton(fComposite, Messages.FormatterPreferencePage_Edit, null); + fEditButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleEditButton(false); + } + }); + + fDeleteButton = SWTFactory.createPushButton(fComposite, Messages.FormatterPreferencePage_Remove, null); + fDeleteButton.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleDeleteButton(); + } + }); + + SWTFactory.createPushButton(fComposite, Messages.FormatterPreferencePage_New, null).addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleNewButton(); + } + }); + + SWTFactory.createPushButton(fComposite, Messages.FormatterPreferencePage_Import, null).addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleImportButton(); + } + }); + + SWTFactory.createPushButton(fComposite, Messages.FormatterPreferencePage_ExportAll, null).addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + handleExportButton(); + } + }); + + SWTFactory.createLabel(fComposite, "", numColumns); //$NON-NLS-1$ + + configurePreview(fComposite, numColumns, fProfileManager); + +// new ProfileComboController(); + + return fComposite; + } + + private void configurePreview(Composite composite, int numColumns, ProfileManager profileManager) { + SWTFactory.createLabel(composite, Messages.FormatterPreferencePage_Preview+':', numColumns); + fPreview = new FormatterPreview(composite, "indent_preview.mod", XdsSourceType.Modula); //$NON-NLS-1$ + + final GridData gd = new GridData(GridData.FILL_VERTICAL | GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan = numColumns; + gd.verticalSpan= 7; + gd.widthHint = 0; + gd.heightHint = 0; + fPreview.getTextWidget().setLayoutData(gd); + } + + + private void initValues() { + ArrayList defLst = new ArrayList(); + defLst.add(new FormatterProfile()); + fProfileManager = new ProfileManager(defLst, new FormatterProfile(), FormatterProfile.ID_FORMAT_PREFS); + fProfileManager.readFromStore(XdsEditorsPlugin.getDefault().getPreferenceStore()); + String activeProfileName = fProfileManager.getActiveProfileName(); + int idx = 0; + for (int i=0; i leafsNodes; + private static HashMap pstToTokenMap; + private Color defBackgroundColor; + private String initialText; + + public FormatterPreview(Composite parent, String resFileName, XdsSourceType xdsSourceType) { + super(parent, SWT.MULTI | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.READ_ONLY); + this.xdsSourceType = xdsSourceType; + this.styledText = this.getTextWidget(); + + String resPath = RESOURCE_FOLDER_LOCATION + resFileName; + try(InputStream resourceStream = ResourceUtils.getPluginResourceAsStream(ResourceUtils.getXdsResourcesPluginBundle(), resPath)) { + this.initialText = IOUtils.toString(resourceStream); + } + catch (Exception e) { + this.initialText = "** Internal error: can't read " + resPath + "\n** Preview not available"; //$NON-NLS-1$ //$NON-NLS-2$ + } + + Font font= JFaceResources.getTextFont(); + styledText.setFont(font); + defBackgroundColor = getEditorBackgroundColor(EditorsPlugin.getDefault().getPreferenceStore()); + styledText.setBackground(defBackgroundColor); + + styledText.setText(initialText); + colorIt(); + } + + public void turnOnMarginPainter() { + fMarginPainter= new MarginPainter(this); + fMarginPainter.setMarginRulerStyle(SWT.LINE_DOT); + fMarginPainter.setMarginRulerColor(new Color(Display.getDefault(), 0,0,0)); + this.addPainter(fMarginPainter); + } + + public void setProfile(FormatterProfile fp) { + try { + int top = styledText.getTopPixel(); + int hor = styledText.getHorizontalPixel(); + ModulaTextFormatter m2f = new ModulaTextFormatter(fp); + Document doc = new Document(initialText); + BuildSettings buildSettings = DefaultBuildSettingsHolder.DefaultBuildSettings; + ParserCriticalErrorReporter errorReporter = ParserCriticalErrorReporter.getInstance(); + IImportResolver defaultImportResolver = new DefaultImportResolver(buildSettings, errorReporter, null); + XdsParser parser = new XdsParser(null, doc.get(), new XdsSettings(buildSettings, xdsSourceType), defaultImportResolver, errorReporter); + ModulaAst ast = parser.parseModule(); + m2f.doFormat(doc, ast, 0, doc.getLength(), false); + styledText.setText(doc.get()); + styledText.setHorizontalPixel(hor); + styledText.setTopPixel(top); + if (fMarginPainter != null) { + fMarginPainter.setMarginRulerColumn(fp.getWrappingWidth()); + } + } catch (Exception e) {e.printStackTrace();} + colorIt(); + } + + private void colorIt() { + try { + if (pstToTokenMap == null) { + initTokenMap(); + } + // Parse text: + Document doc = new Document(styledText.getText()); + BuildSettings buildSettings = DefaultBuildSettingsHolder.DefaultBuildSettings; + ParserCriticalErrorReporter errorReporter = ParserCriticalErrorReporter.getInstance(); + IImportResolver defaultImportResolver = new DefaultImportResolver(buildSettings, errorReporter, null); + XdsParser parser = new XdsParser(null, doc.get(), new XdsSettings(buildSettings, xdsSourceType), defaultImportResolver, errorReporter); + ModulaAst ast = parser.parseModule(); + leafsNodes = new ArrayList(); + // Fill Leaf array: + collectLeafs(ast); + Collections.sort(leafsNodes, new Comparator() { + public int compare(PstLeafNode a, PstLeafNode b) { + return a.getOffset() - b.getOffset(); + } + }); + // Search matched M2Token for elements in the leaf array and collect style ranges for them: + ArrayList asr = new ArrayList(); + for (PstLeafNode pln : leafsNodes) { + ModulaTokens mt = pstToTokenMap.get(pln.getElementType()); + if (mt == null) { + mt = ModulaTokens.Default; + } + int style = mt.getToken().getStyleWhenEnabled(); + StyleRange sr = new StyleRange(); + sr.fontStyle = (style & (SWT.BOLD | SWT.ITALIC)); + sr.underline = (style & TextAttribute.UNDERLINE) != 0; + sr.strikeout = (style & TextAttribute.STRIKETHROUGH) != 0; + sr.foreground = new Color(Display.getDefault(), mt.getToken().getRgbWhenEnabled()); + sr.background = defBackgroundColor; + sr.start = pln.getOffset(); + sr.length = pln.getLength(); + asr.add(sr); + } + if (asr.size() > 0) { + styledText.setStyleRanges(asr.toArray(new StyleRange[asr.size()])); + } + } catch (Exception e) {} + } + + + private void collectLeafs(PstNode pn) { + if (pn instanceof PstCompositeNode) { + for (PstNode n : ((PstCompositeNode)pn).getChildren()) { + collectLeafs(n); + } + } else if (pn instanceof PstLeafNode) { + leafsNodes.add((PstLeafNode)pn); + } + } + + + private Color getEditorBackgroundColor(IPreferenceStore preferenceStore) { + if (preferenceStore.getBoolean(AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT)) { + return null; + } else { + RGB rgb = PreferenceConverter.getColor(preferenceStore, AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND); + return new Color(Display.getDefault(), rgb); + } + } + + + /** + * pstToTokenMap translates 'IElementType' (token type in Ats terms) + * to 'ModulaTokens' (token type in terms of editor colorer) + */ + private void initTokenMap() { + pstToTokenMap = new HashMap(); +//TODO: +// Pragma (Messages.ModulaTokens_Pragmas, "Pragmas", new RGB(0x80, 0, 0x80), SWT.ITALIC), //$NON-NLS-1$ +// PragmaKeyword (Messages.ModulaTokens_PragmaKeywords, "PragmaKeywords", new RGB(0x80, 0, 0x80), SWT.ITALIC+SWT.BOLD), //$NON-NLS-1$ +// SystemModuleKeyword(Messages.ModulaTokens_SystemModuleKeywords, "SystemModuleKeywords", new RGB(0, 0, 0x80), SWT.BOLD), //$NON-NLS-1$ + + pstToTokenMap.put(ModulaTokenTypes.BLOCK_COMMENT, ModulaTokens.BlockComment); + pstToTokenMap.put(ModulaTokenTypes.CPP_BLOCK_COMMENT, ModulaTokens.BlockComment); + + pstToTokenMap.put(ModulaTokenTypes.END_OF_LINE_COMMENT , ModulaTokens.EndOfLineComment); + pstToTokenMap.put(ModulaTokenTypes.CPP_END_OF_LINE_COMMENT , ModulaTokens.EndOfLineComment); + + pstToTokenMap.put(ModulaTokenTypes.DEC_INTEGER_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.OCT_INTEGER_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.HEX_INTEGER_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.REAL_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.LONG_REAL_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.COMPLEX_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.LONG_COMPLEX_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.CHAR_HEX_LITERAL , ModulaTokens.Number); + pstToTokenMap.put(ModulaTokenTypes.CHAR_OCT_LITERAL , ModulaTokens.Number); + + pstToTokenMap.put(ModulaTokenTypes.STRING_LITERAL, ModulaTokens.String); + + pstToTokenMap.put(ModulaTokenTypes.LBRACKET , ModulaTokens.Bracket); + pstToTokenMap.put(ModulaTokenTypes.RBRACKET , ModulaTokens.Bracket); + pstToTokenMap.put(ModulaTokenTypes.LPARENTH , ModulaTokens.Bracket); + pstToTokenMap.put(ModulaTokenTypes.RPARENTH , ModulaTokens.Bracket); + pstToTokenMap.put(ModulaTokenTypes.LBRACE , ModulaTokens.Bracket); + pstToTokenMap.put(ModulaTokenTypes.RBRACE , ModulaTokens.Bracket); + + pstToTokenMap.put(ModulaTokenTypes.AND , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.AND_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.ASM_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.ARRAY_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.BEGIN_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.BY_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.CASE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.CONST_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.DEFINITION_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.DIV_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.DO_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.ELSE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.ELSIF_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.END_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.EXCEPT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.EXIT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.EXPORT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.FINALLY_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.FOR_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.FORWARD_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.FROM_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.IF_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.IMPLEMENTATION_KEYWORD, ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.IMPORT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.IN_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.IS_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.LOOP_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.MOD_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.MODULE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.NOT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.OF_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.OR_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.PACKEDSET_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.POINTER_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.PROCEDURE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.QUALIFIED_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.RECORD_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.REM_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.REPEAT_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.RETRY_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.RETURN_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.SEQ_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.SET_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.THEN_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.TO_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.TYPE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.UNTIL_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.VAR_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.WHILE_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.WITH_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.LABEL_KEYWORD , ModulaTokens.Keyword); + pstToTokenMap.put(ModulaTokenTypes.GOTO_KEYWORD , ModulaTokens.Keyword); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterProfile.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterProfile.java new file mode 100644 index 0000000..a97fecf --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/FormatterProfile.java @@ -0,0 +1,1253 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; + +import org.eclipse.ui.IMemento; + +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager; +import com.excelsior.xds.ui.editor.internal.preferences.ProfileManager.IProfile; + +public class FormatterProfile implements IProfile { + + + /////////// Indents settings ------------------------------------------- + /////////// Indents settings ------------------------------------------- + /////////// Indents settings ------------------------------------------- + + private static final int RANGE_CHECKBOX_UNCHECKED_BIT = 0x10000000; + + public static String TAB_SIZE_PROPERTY_NAME = "com.excelsior.xds.ui.editor.internal.preferences.formatter.activeTabSize"; //$NON-NLS-1$ + + public enum IndentSetting { + UseSpacesToIndentWrappedLines("useSpacesToIndentWrappedLines"), //$NON-NLS-1$ + IndentDeclInModule("indentDeclInModule"), //$NON-NLS-1$ + IndentDeclInProc("indentDeclInProc"), //$NON-NLS-1$ + IndentDeclInVCT("indentDeclInVCT"), //$NON-NLS-1$ + IndentDeclOfLocalProc("indentDeclOfLocalProc", 0, 32, true), //$NON-NLS-1$ + IndentDeclOfLocalMods("indentDeclOfLocalMods", 0, 32, true), //$NON-NLS-1$ + IndentDeclOfRecFields("indentDeclOfRecFields"), //$NON-NLS-1$ + IndentStatements("indentStatements"), //$NON-NLS-1$ + IndentInCaseBody("indentStatementsInCaseBody"), //$NON-NLS-1$ + IndentInCaseAlternative("indentCaseAlternative", 0, 32, true), //$NON-NLS-1$ + IndentSize("indentSize", 0, 32, false), //$NON-NLS-1$ + TabSize("tabSize", 1, 32, false), //$NON-NLS-1$ + TabMode("tabMode", TABMODE_SPACES, TABMODE_MIXED, false); //$NON-NLS-1$ + + public boolean isRange() { + return isRange; + } + + public int getMinVal() { + return minVal; + } + + public int getMaxVal() { + return maxVal; + } + + public boolean isRangeWithCheckbox() { + return isRangeWithCheckbox; + } + + + private IndentSetting(String name) { + this.isRange = false; + this.name = name; + this.minVal = 0; + this.maxVal = 1; + } + + private IndentSetting(String name, int minVal, int maxVal, boolean isRangeWithCheckbox) { + this.isRange = true; + this.name = name; + this.minVal = minVal; + this.maxVal = maxVal; + this.isRangeWithCheckbox = isRangeWithCheckbox; + } + + private String name; + private boolean isRange; // false => boolean + private int minVal; + private int maxVal; + private boolean isRangeWithCheckbox; // setting value is 0 or negative => checked off + } + + // This order: + public static final int TABMODE_SPACES = 0; + public static final int TABMODE_TABS = 1; + public static final int TABMODE_MIXED = 2; + + public static final String ID_FORMAT_PREFS = "com.excelsior.xds.ui.editor.internal.preferences.FormatterPreference.Prefs"; //$NON-NLS-1$ + + private static final String NAME_UNICAL_KEY = "formatterProfileName_34781689923"; // magic name to never accept import from incorrect xml files //$NON-NLS-1$ + private static final String DEF_PROFILE_NAME = Messages.FormatterProfile_XdsBuiltIn; + + private String name; + private boolean isDefProfile; + private static volatile FormatterProfile cachedActiveProfile; + private static volatile String cachedActiveProfileName; + private HashMap hmIndentSettings; + + // Create default profile + public FormatterProfile() { + name = DEF_PROFILE_NAME; + isDefProfile = true; + // Def settings: + hmIndentSettings = new HashMap(); + + hmIndentSettings.put(IndentSetting.IndentSize.name, 2); + hmIndentSettings.put(IndentSetting.TabSize.name, 2); + hmIndentSettings.put(IndentSetting.TabMode.name, TABMODE_SPACES); + // Booleans: + hmIndentSettings.put(IndentSetting.UseSpacesToIndentWrappedLines.name, 1); + hmIndentSettings.put(IndentSetting.IndentDeclInModule.name, 0); + hmIndentSettings.put(IndentSetting.IndentDeclInProc.name, 0); + hmIndentSettings.put(IndentSetting.IndentDeclInVCT.name, 1); + hmIndentSettings.put(IndentSetting.IndentDeclOfLocalProc.name, 2); + hmIndentSettings.put(IndentSetting.IndentDeclOfLocalMods.name, 2); + hmIndentSettings.put(IndentSetting.IndentDeclOfRecFields.name, 1); + hmIndentSettings.put(IndentSetting.IndentStatements.name, 1); + hmIndentSettings.put(IndentSetting.IndentInCaseBody.name, 0); + hmIndentSettings.put(IndentSetting.IndentInCaseAlternative.name, 2); + + // White spaces: + hmWhiteSettings = new HashMap(); + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + int tags = (wss.isDefInsSpaceBefore() ? W_TAG_INS_L_SPACE : 0) | + (wss.isDefInsSpaceAfter() ? W_TAG_INS_R_SPACE : 0); + hmWhiteSettings.put(wss, tags); + } + + // Statement settings: + hmStmtSettingsBefore = new HashMap(); + hmStmtSettingsAfter = new HashMap(); + for (NewlineSetting ss : NewlineSetting.values()) { + hmStmtSettingsBefore.put(ss, ss.insNewLineBeforeDef); + hmStmtSettingsAfter.put(ss, ss.insNewLineAfterDef); + } + + // Line wrapping settings: + wrappingWidth = 160; + + } + + public FormatterProfile(String name) { + this(); + this.name = name; + this.isDefProfile = false; + } + + public FormatterProfile(String name, FormatterProfile copyFrom) { + copyFrom(copyFrom); + this.name = name; + } + + private FormatterProfile(IMemento memento) { + this(""); //$NON-NLS-1$ + name = memento.getString(NAME_UNICAL_KEY); + isDefProfile = memento.getBoolean("isDefProfile"); //$NON-NLS-1$ + for (IndentSetting bs : IndentSetting.values()) { + try { + int val = memento.getInteger(bs.name); + boolean unchecked = false; + if (bs.isRangeWithCheckbox) { + unchecked = ((val & RANGE_CHECKBOX_UNCHECKED_BIT) != 0); + val &= ~RANGE_CHECKBOX_UNCHECKED_BIT; + } + setValue(bs, val, unchecked); + } catch (Exception e) {} // NPE in old profiles for unknown keys + } + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + try { + int val = memento.getInteger(wss.name()); + hmWhiteSettings.put(wss, val); + } catch (Exception e) {} // NPE in old profiles for unknown keys + } + for (NewlineSetting ss : NewlineSetting.values()) { + try { + int val = ss.insNewLineBeforeDef; + if (val >= 0) { + val = memento.getInteger(ss.name() + "_Before"); //$NON-NLS-1$ + } + hmStmtSettingsBefore.put(ss, val); + + val = ss.insNewLineAfterDef; + if (val >= 0) { + val = memento.getInteger(ss.name() + "_After"); //$NON-NLS-1$ + } + hmStmtSettingsAfter.put(ss, val); + } catch (Exception e) {} // NPE in old profiles for unknown keys + } + try { + wrappingWidth = memento.getInteger(WRAPPING_WIDTH_MEMENTO_KEY); + } catch (Exception e) {} // NPE in old profiles for unknown keys + } + + public void toMemento(IMemento memento) { + cachedActiveProfile = null; // smth changed. drop cache + cachedActiveProfileName = null; // + + memento.putString(NAME_UNICAL_KEY, name); + memento.putBoolean("isDefProfile", isDefProfile); //$NON-NLS-1$ + + for (IndentSetting bs : IndentSetting.values()) { + memento.putInteger(bs.name, hmIndentSettings.get(bs.name)); + } + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + memento.putInteger(wss.name(), hmWhiteSettings.get(wss)); + } + for (NewlineSetting ss : NewlineSetting.values()) { + memento.putInteger(ss.name() + "_Before", hmStmtSettingsBefore.get(ss)); //$NON-NLS-1$ + memento.putInteger(ss.name() + "_After", hmStmtSettingsAfter.get(ss)); //$NON-NLS-1$ + } + memento.putInteger(WRAPPING_WIDTH_MEMENTO_KEY, wrappingWidth); + } + + /** + * There are 2 ways to get active profile: initialize whole ProfileManager with all profiles OR + * use this method. + * @return + */ + public static FormatterProfile getActiveProfile() { + String actName = ProfileManager.readActiveProfileNameFromStore(XdsEditorsPlugin.getDefault().getPreferenceStore(), ID_FORMAT_PREFS); + if (cachedActiveProfile != null && cachedActiveProfileName != null && cachedActiveProfileName.equals(actName)) { + return cachedActiveProfile; + } + + FormatterProfile fp = new FormatterProfile(); // def. profile + if (actName != null && !actName.isEmpty() && !actName.equals(DEF_PROFILE_NAME)) { + IProfile ip = ProfileManager.readProfileFromStore(actName, XdsEditorsPlugin.getDefault().getPreferenceStore(), ID_FORMAT_PREFS, fp); + if (ip != null && actName.equals(ip.getName())) { + fp = (FormatterProfile)ip; + } + } + + cachedActiveProfileName = actName; + cachedActiveProfile = fp; + return fp; + } + + //// Getters/setters: + + public void setName(String name) { + this.name = name; + } + + @Override + public String getName() { + return name; + } + + @Override + public boolean isDefaultProfile() { + return isDefProfile; + } + + @Override + public void reActivate() { + // Editors listens for this value and redraws tabs: + XdsEditorsPlugin.getDefault().getPreferenceStore().setValue(TAB_SIZE_PROPERTY_NAME, hmIndentSettings.get(IndentSetting.TabSize.name)); + } + + +// @Override +// public IProfile createFromXml(String xml, String subRoot) { +//// FormatterProfile fp = new FormatterProfile(xml, subRoot, false); +//// return fp.name.isEmpty() ? null : fp; +// return null; +// } + + @Override + public IProfile createFromMemento(IMemento memento) { + FormatterProfile fp = new FormatterProfile(memento); + return fp.name.isEmpty() ? null : fp; + } + + @Override + public IProfile createFromProfile(IProfile from, String newName) { + FormatterProfile fp = new FormatterProfile(newName); + fp.copyFrom((FormatterProfile)from); + fp.setName(newName); + return fp; + } + + + @Override + /** + * Copies all except 'isDefault', it will be 'false' + * 'ip' - FormattedProfile + */ + public void copyFrom(IProfile ip) { + FormatterProfile fp = (FormatterProfile)ip; + + isDefProfile = false; + name = fp.name; + + hmIndentSettings = new HashMap(fp.hmIndentSettings); + hmWhiteSettings = new HashMap(fp.hmWhiteSettings); + hmStmtSettingsBefore = new HashMap(fp.hmStmtSettingsBefore); + hmStmtSettingsAfter = new HashMap(fp.hmStmtSettingsAfter); + + wrappingWidth = fp.wrappingWidth; + } + + + //------------------------------ Getters/setters for indent settings: ------------------------------------------- + + public boolean getAsBoolean(IndentSetting bs) { + int v = hmIndentSettings.get(bs.name); + return v != 0; + } + + public int getValue(IndentSetting bs) { + int val = hmIndentSettings.get(bs.name); + if (bs.isRangeWithCheckbox && ((val & RANGE_CHECKBOX_UNCHECKED_BIT) != 0)) { + return 0; + } + return val; + } + + public int getValueForDialog(IndentSetting bs) { + int val = hmIndentSettings.get(bs.name); + if (bs.isRangeWithCheckbox) { + val &= ~RANGE_CHECKBOX_UNCHECKED_BIT; + } + return val; + } + + + public boolean getRangeCheckboxUncheckedState(IndentSetting bs) { + if (bs.isRangeWithCheckbox) { + int val = hmIndentSettings.get(bs.name); + return (val & RANGE_CHECKBOX_UNCHECKED_BIT) != 0; + } + return false; + } + + public void setBoolean(IndentSetting bs, boolean val) { + hmIndentSettings.put(bs.name, val ? 1 : 0); + } + + public void setValue(IndentSetting bs, int val) { + setValue(bs, val, false); + + } + + public void setValue(IndentSetting bs, int val, boolean isRangeCheckboxUnchecked) { + val = Math.max(val, bs.getMinVal()); + val = Math.min(val, bs.getMaxVal()); + if (bs.isRangeWithCheckbox && isRangeCheckboxUnchecked) { + val |= RANGE_CHECKBOX_UNCHECKED_BIT; + } + hmIndentSettings.put(bs.name, val); + } + + + /////////// White space settings ------------------------------------------- + /////////// White space settings ------------------------------------------- + /////////// White space settings ------------------------------------------- + + private HashMap hmWhiteSettings; + + // default settings: + private static final int W_TAG_INS_L_SPACE = 0x00000001; + private static final int W_TAG_INS_R_SPACE = 0x00000002; + + public enum WhiteSpaceCategory { + + DeclImport(Messages.FormatterProfile_Import, "", null), //$NON-NLS-1$ + + DeclVariables(Messages.FormatterProfile_Variables, "", null), //$NON-NLS-1$ + DeclTypesRange(Messages.FormatterProfile_RangeType, "", null), //$NON-NLS-1$ + DeclTypesEnum(Messages.FormatterProfile_EnumType, "", null), //$NON-NLS-1$ + DeclTypesRecord(Messages.FormatterProfile_RecordType, "", null), //$NON-NLS-1$ + DeclTypes(Messages.FormatterProfile_Types, "", new WhiteSpaceCategory[]{DeclTypesRange, DeclTypesEnum, DeclTypesRecord}), //$NON-NLS-1$ + DeclConstants(Messages.FormatterProfile_Constants, "", null), //$NON-NLS-1$ + DeclProcedures(Messages.FormatterProfile_Procedures, "", null), //$NON-NLS-1$ + Declarations(Messages.FormatterProfile_DeclAndDefs, "", new WhiteSpaceCategory[]{DeclVariables, DeclTypes, DeclConstants, DeclProcedures}), //$NON-NLS-1$ + + StmtCase(Messages.FormatterProfile_CaseStmt, "", null), //$NON-NLS-1$ + Statements(Messages.FormatterProfile_CtrlStmt, "", new WhiteSpaceCategory[]{StmtCase}), //$NON-NLS-1$ + + BinaryOperations(Messages.FormatterProfile_BinaryOps, Messages.FormatterProfile_SetsForAllBinaryOps, null), + UnaryOperations(Messages.FormatterProfile_UnaryOps, Messages.FormatterProfile_SetsForAllUnaryOps, null), + ParenthesizedExpressions(Messages.FormatterProfile_ParenthExpr, "", null), //$NON-NLS-1$ + IndexExpressions(Messages.FormatterProfile_IndexExpr, "", null), //$NON-NLS-1$ + ProcedureInvocations(Messages.FormatterProfile_ProcInvoc, "", null), //$NON-NLS-1$ + Expressions(Messages.FormatterProfile_Expressions, "", new WhiteSpaceCategory[]{BinaryOperations, UnaryOperations, ParenthesizedExpressions, IndexExpressions, ProcedureInvocations}), //$NON-NLS-1$ + + RootCategory("", "", new WhiteSpaceCategory[]{ DeclImport //$NON-NLS-1$ //$NON-NLS-2$ + , Declarations + , Statements + , Expressions} ); + + private WhiteSpaceCategory(String name, String settingsString, WhiteSpaceCategory children[]) { + this.name = name; + this.settingsString = settingsString; + this.children = children; + } + + @Override + public String toString() { + return name; + } + + public String toSettingsString() { + return settingsString.isEmpty() ? name : settingsString; + } + + + public WhiteSpaceCategory getParent() { + for (WhiteSpaceCategory wsc : WhiteSpaceCategory.values()) { + if (wsc.children != null) { + for (WhiteSpaceCategory ccc : wsc.children) { + if (this.equals(ccc)) { + return wsc; + } + } + } + } + return null; + } + + public ArrayList getChildren() { + ArrayList al = new ArrayList(); + if (children != null) { + for (WhiteSpaceCategory wsc : children) { + al.add(wsc); + } + } + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + if (this.equals(wss.getCategory())) { + al.add(wss); + } + } + return al; + } + + private WhiteSpaceCategory children[]; + private String name; + private String settingsString; + } + + + + public enum WhiteSpaceSetting { + // !!! + // NOTE: the same ModulaTokenTypes settings are searched in the this definition order, first matched one will be found! + // !!! + + // Declarations / Variables: + WSpaceCommaInVars (ModulaTokenTypes.COMMA, ModulaElementTypes.VARIABLE_LIST, WhiteSpaceCategory.DeclVariables, + "-+", Messages.FormatterProfile_CommaInMd, Messages.FormatterProfile_CommaInMd2), //$NON-NLS-1$ + WSpaceColonInDeclVars (ModulaTokenTypes.COLON, ModulaElementTypes.VARIABLE_DECLARATION, WhiteSpaceCategory.DeclVariables, + "-+", Messages.FormatterProfile_Colon, Messages.FormatterProfile_ColonInVar), //$NON-NLS-1$ + + // Declarations / Constants: + WSpaceEquInDeclConsts (ModulaTokenTypes.EQU, ModulaElementTypes.CONSTANT_DECLARATION, WhiteSpaceCategory.DeclConstants, + "++", Messages.FormatterProfile_Equ, Messages.FormatterProfile_EquInConst), //$NON-NLS-1$ + + // Declarations / Types: + WSpaceEquInDeclTypes (ModulaTokenTypes.EQU, ModulaElementTypes.TYPE_DECLARATION, WhiteSpaceCategory.DeclTypes, + "++", Messages.FormatterProfile_EquInMd, Messages.FormatterProfile_EquInMd2), //$NON-NLS-1$ + WSpaceLBracketInRange (ModulaTokenTypes.LBRACKET, ModulaElementTypes.RANGE_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesRange, + "+-", Messages.FormatterProfile_LBracket, Messages.FormatterProfile_LBracketInRange), //$NON-NLS-1$ + WSpaceRBracketInRange (ModulaTokenTypes.RBRACKET, ModulaElementTypes.RANGE_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesRange, + "-+", Messages.FormatterProfile_RBracket, Messages.FormatterProfile_RBracketInRange), //$NON-NLS-1$ + WSpaceRange (ModulaTokenTypes.RANGE, ModulaElementTypes.RANGE_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesRange, + "--", Messages.FormatterProfile_Range, Messages.FormatterProfile_Range2), //$NON-NLS-1$ + WSpaceCommaInEnum (ModulaTokenTypes.COMMA, ModulaElementTypes.ENUMERATION_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesEnum, + "++", Messages.FormatterProfile_Comma, Messages.FormatterProfile_CommaInEnum), //$NON-NLS-1$ + WSpaceLParenthInEnum (ModulaTokenTypes.LPARENTH, ModulaElementTypes.ENUMERATION_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesEnum, + "+-", Messages.FormatterProfile_LParenth, Messages.FormatterProfile_LParenthInEnum), //$NON-NLS-1$ + WSpaceRParenthInEnum (ModulaTokenTypes.RPARENTH, ModulaElementTypes.ENUMERATION_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesEnum, + "-+", Messages.FormatterProfile_RParenth, Messages.FormatterProfile_RParenthInEnum), //$NON-NLS-1$ + WSpaceColonInRecDef (ModulaTokenTypes.COLON, ModulaElementTypes.RECORD_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesRecord, + "-+", Messages.FormatterProfile_Colon, Messages.FormatterProfile_ColonInTypeDef), //$NON-NLS-1$ + WSpaceSepInRecDef (ModulaTokenTypes.SEP, ModulaElementTypes.RECORD_TYPE_DEFINITION, WhiteSpaceCategory.DeclTypesRecord, + "++", Messages.FormatterProfile_Separator, Messages.FormatterProfile_SeparatorInRecordTypeDef), //$NON-NLS-1$ + + // Declarations / Procedures: + WSpaceLParenthInProc (ModulaTokenTypes.LPARENTH, ModulaElementTypes.FORMAL_PARAMETER_BLOCK, WhiteSpaceCategory.DeclProcedures, + "--", Messages.FormatterProfile_LParenthInProcDecl, Messages.FormatterProfile_LParenthInProcDecl2), //$NON-NLS-1$ + WSpaceRParenthInProc (ModulaTokenTypes.RPARENTH, ModulaElementTypes.FORMAL_PARAMETER_BLOCK, WhiteSpaceCategory.DeclProcedures, + "--", Messages.FormatterProfile_RParenthInProcDecl, Messages.FormatterProfile_RParenthInProcDecl2), //$NON-NLS-1$ + WSpaceCommaInFormParams (ModulaTokenTypes.COMMA, ModulaElementTypes.FORMAL_PARAMETER_LIST, WhiteSpaceCategory.DeclProcedures, + "-+", Messages.FormatterProfile_CommaInFormParams, Messages.FormatterProfile_CommaInFormParams2), //$NON-NLS-1$ + WSpaceSemicolonInFormParams(ModulaTokenTypes.SEMICOLON,ModulaElementTypes.FORMAL_PARAMETER_DECLARATION, WhiteSpaceCategory.DeclProcedures, + "-+", Messages.FormatterProfile_SemicolonFormParams, Messages.FormatterProfile_SemicolonFormParams2), //$NON-NLS-1$ + WSpaceColonInParams (ModulaTokenTypes.COLON, ModulaElementTypes.FORMAL_PARAMETER_DECLARATION, WhiteSpaceCategory.DeclProcedures, + "-+", Messages.FormatterProfile_ColonFormParams, Messages.FormatterProfile_ColonFormParams2), //$NON-NLS-1$ + WSpaceColonInRetType (ModulaTokenTypes.COLON, ModulaElementTypes.RESULT_TYPE, WhiteSpaceCategory.DeclProcedures, + "-+", Messages.FormatterProfile_ColonInRetType, Messages.FormatterProfile_ColonInRetType2), //$NON-NLS-1$ + + // Declarations / Import modules: + WSpaceCommaInImport (ModulaTokenTypes.COMMA, ModulaElementTypes.IMPORT_FRAGMENT_LIST, WhiteSpaceCategory.DeclImport, + "-+", Messages.FormatterProfile_CommaInImportLists, Messages.FormatterProfile_CommaInImportLists2, 1), //$NON-NLS-1$ + WSpaceBecomesInImport (ModulaTokenTypes.BECOMES, ModulaElementTypes.ALIAS_DECLARATION, WhiteSpaceCategory.DeclImport, + "++", Messages.FormatterProfile_AssignInModuleAlias, Messages.FormatterProfile_AssignInModuleAlias2), //$NON-NLS-1$ + + // Control statements / Case statement: + WSpaceColon (ModulaTokenTypes.COLON, null, WhiteSpaceCategory.StmtCase, + "-+", Messages.FormatterProfile_ColonInCase, Messages.FormatterProfile_ColonInCase2), // def after WSpaceColonInParams, WSpaceColonInRetType, WSpaceColonInRecDef //$NON-NLS-1$ + WSpaceSep (ModulaTokenTypes.SEP, null, WhiteSpaceCategory.StmtCase, + "++", Messages.FormatterProfile_SeparatorInCase, Messages.FormatterProfile_SeparatorInCase2), //$NON-NLS-1$ + + // Control statements: + WSpaceLParenthInStmt (ModulaTokenTypes.LPARENTH, null, WhiteSpaceCategory.Statements, + "+-", Messages.FormatterProfile_StmtOpenedParenthesis, Messages.FormatterProfile_StmtOpenedParenthesis2), // def before WSpaceLParenthInExpr //$NON-NLS-1$ + WSpaceRParenthInStmt (ModulaTokenTypes.RPARENTH, null, WhiteSpaceCategory.Statements, + "-+", Messages.FormatterProfile_StmtClosedParenthesis, Messages.FormatterProfile_StmtClosedParenthesis2), // def before WSpaceRParenthInExpr //$NON-NLS-1$ + + // Expressions / Procedure invocations: + WSpaceLParenthInProcCall(ModulaTokenTypes.LPARENTH, ModulaElementTypes.DESIGNATOR, WhiteSpaceCategory.ProcedureInvocations, + "--", Messages.FormatterProfile_LParenthInProcCall, Messages.FormatterProfile_LParenthInProcCall2), //$NON-NLS-1$ + WSpaceRParenthInProcCall(ModulaTokenTypes.RPARENTH, ModulaElementTypes.DESIGNATOR, WhiteSpaceCategory.ProcedureInvocations, + "--", Messages.FormatterProfile_RParenthInProcCall, Messages.FormatterProfile_RParenthInProcCall2), //$NON-NLS-1$ + WSpaceCommaInCall (ModulaTokenTypes.COMMA, ModulaElementTypes.DESIGNATOR, WhiteSpaceCategory.ProcedureInvocations, + "-+", Messages.FormatterProfile_CommaInParList, Messages.FormatterProfile_CommaInParList2), //$NON-NLS-1$ + + // Expressions / Binary operations: (shrinked in settings dialog into one "Binary operations" item) + WSpaceBinaryPlus (ModulaTokenTypes.PLUS, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Plus '+'", "Plus '+'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryMinus (ModulaTokenTypes.MINUS, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Minus '-'", "Minus '-'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryTimes (ModulaTokenTypes.TIMES, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Multiplication '*'", "Multiplication '*'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinarySlash (ModulaTokenTypes.SLASH, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Division '/'", "Division '/'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryAnd (ModulaTokenTypes.AND, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "And '&'", "And '&'", 1), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryEqu (ModulaTokenTypes.EQU, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Equal '='", "Equal '='"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryNeq (ModulaTokenTypes.NEQ, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Not equal '#' or '<>'", "Not equal '#' or '<>'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryLss (ModulaTokenTypes.LSS, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Lower '<'", "Lower '<'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryGtr (ModulaTokenTypes.GTR, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Greater '>'", "Greater '>'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryLteq (ModulaTokenTypes.LTEQ, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Lower or Equal '<='", "Lower or equal '<='"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryGteq (ModulaTokenTypes.GTEQ, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Greater or Equal '>='", "Greater or equal '>='"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryLShift (ModulaTokenTypes.LEFT_SHIFT, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Left shift '<<'", "Left shift '<<'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryRShift (ModulaTokenTypes.RIGHT_SHIFT, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Right shift '>>'", "Right shift '>>'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + WSpaceBinaryExponent (ModulaTokenTypes.EXPONENT, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.BinaryOperations, + "++", "Exponent '**'", "Exponent '**'"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + // Expressions / Unary operations: (shrinked in settings dialog into one "Unary operations" item) + WSpaceUnaryNot (ModulaTokenTypes.NOT, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.UnaryOperations, + "+-", "Not operation '~'", "Not operation '~'", 1), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + //XXX hbz how to recognize unary +/- -- see tree for x := 2.3e-1 - - (- 1 +2 + -3); + // UnaryPlus(ModulaTokenTypes.PLUS, WhiteSpaceCategory.RootCategory, + // new IElementType[]{ModulaElementTypes.EXPRESSION, ModulaElementTypes.FACTOR}, "+-", "Unary plus '+'"), + // UnaryMinus(ModulaTokenTypes.MINUS, WhiteSpaceCategory.RootCategory, + // new IElementType[]{ModulaElementTypes.EXPRESSION, ModulaElementTypes.FACTOR}, "+-", "Unary minus '-'"), + + // Expressions / Parenthesized expressions: + WSpaceLParenthInExpr (ModulaTokenTypes.LPARENTH, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.ParenthesizedExpressions, + "--", Messages.FormatterProfile_LParenthInExpr, Messages.FormatterProfile_LParenthInExpr2), // def after WSpaceLParenthInProc* //$NON-NLS-1$ + WSpaceRParenthInExpr (ModulaTokenTypes.RPARENTH, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.ParenthesizedExpressions, + "--", Messages.FormatterProfile_RParenthInExpr, Messages.FormatterProfile_RParenthInExpr2), // def after WSpaceRParenthInProc* //$NON-NLS-1$ + + // Expressions / Index expressions: + WSpaceLBracket (ModulaTokenTypes.LBRACKET, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.IndexExpressions, + "--", Messages.FormatterProfile_LBracketInExpr, Messages.FormatterProfile_LBracketInExpr2), //$NON-NLS-1$ + WSpaceRBracket (ModulaTokenTypes.RBRACKET, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.IndexExpressions, + "--", Messages.FormatterProfile_RBracketInExpr, Messages.FormatterProfile_RBracketInExpr2), //$NON-NLS-1$ + + // Expressions: + WSpaceBinaryBecomes (ModulaTokenTypes.BECOMES, null, WhiteSpaceCategory.Expressions, + "++", Messages.FormatterProfile_AssignInExpr, Messages.FormatterProfile_AssignInExpr2), //$NON-NLS-1$ + WSpaceRUnaryBar (ModulaTokenTypes.BAR, ModulaElementTypes.EXPRESSION, WhiteSpaceCategory.Expressions, + "-+", Messages.FormatterProfile_PtrDeref, Messages.FormatterProfile_PtrDeref2), //$NON-NLS-1$ + + // Not categorized: + WSpaceSemicolon (ModulaTokenTypes.SEMICOLON, null, WhiteSpaceCategory.RootCategory, + "-+", Messages.FormatterProfile_Semicolon, Messages.FormatterProfile_Semicolon2), // hidden in settings dialog //$NON-NLS-1$ + WSpaceDot (ModulaTokenTypes.DOT, null, WhiteSpaceCategory.RootCategory, + "--", Messages.FormatterProfile_Dot, Messages.FormatterProfile_Dot2); // hidden in settings dialog //$NON-NLS-1$ + // don't support it: WSpaceAlias(ModulaTokenTypes.ALIAS, null, WhiteSpaceCategory.Declarations, "++", "Alias '::='"), + + private IElementType getElementType() { + return etype; + } + + private boolean testElement(PstLeafNode pln) { + if (etype.equals(pln.getElementType())) { + if (len > 0 && len != pln.getLength()) { + return false; + } + if (this.equals(WSpaceLParenthInStmt)) { + PstNode stmt = isFirstChild(pln, ModulaElementTypes.FACTOR); + stmt = isFirstChild(stmt, ModulaElementTypes.TERM); + + if (isFirstChild(stmt, ModulaElementTypes.CASE_VARIANT_SELECTOR) != null) { + return true; // CASE (smth) OF + } + stmt = isFirstChild(stmt, ModulaElementTypes.EXPRESSION); + + if (stmt != null && stmt.getParent() != null) { + IElementType et = stmt.getParent().getElementType(); + return et.equals( ModulaElementTypes.FOR_STATEMENT) || + et.equals( ModulaElementTypes.IF_STATEMENT) || + et.equals( ModulaElementTypes.WHILE_STATEMENT) || + et.equals( ModulaElementTypes.REPEAT_STATEMENT) || + et.equals( ModulaElementTypes.RETURN_STATEMENT); + } + return false; + + } else if (this.equals(WSpaceRParenthInStmt)) { + PstNode stmt = isLastChild(pln, ModulaElementTypes.FACTOR); + stmt = isLastChild(stmt, ModulaElementTypes.TERM); + + if (isFirstChild(stmt, ModulaElementTypes.CASE_VARIANT_SELECTOR) != null) { + return true; // CASE (smth) OF + } + stmt = isLastChild(stmt, ModulaElementTypes.EXPRESSION); + + if (stmt != null && stmt.getParent() != null) { + IElementType et = stmt.getParent().getElementType(); + return et.equals( ModulaElementTypes.FOR_STATEMENT) || + et.equals( ModulaElementTypes.IF_STATEMENT) || + et.equals( ModulaElementTypes.WHILE_STATEMENT) || + et.equals( ModulaElementTypes.REPEAT_STATEMENT); + } + return false; + } + + if (hsParentType == null) { + return true; + } + for (PstNode n = pln.getParent(); n != null; n = n.getParent()) { + if (hsParentType.contains(n.getElementType())) { + return true; + } + } + + } + return false; + } + + private PstNode isFirstChild(PstNode child, IElementType expectedParentType) { + try { + PstNode parent = child.getParent(); + if (parent != null && + parent.getElementType().equals(expectedParentType) && + ((PstCompositeNode)parent).getChildren().get(0) == child) + { + return parent; + } + } catch (Exception e) {} + return null; + } + + private PstNode isLastChild(PstNode child, IElementType expectedParentType) { + try { + PstNode parent = child.getParent(); + if (parent != null && + parent.getElementType().equals(expectedParentType)) + { + List children = ((PstCompositeNode)parent).getChildren(); + if (children.get(children.size()-1) == child) { + return parent; + } + } + } catch (Exception e) {} + return null; + } + + ///////////// + + private WhiteSpaceSetting (IElementType etype, WhiteSpaceCategory cat, IElementType parentTypes[], String defSettings, + String propText, String settingsText, int len) + { + this.etype = etype; + this.wcategory = cat; + this.propText = propText; + this.settingsText = settingsText; + this.len = len; + this.isDefInsSpaceBefore = defSettings.charAt(0)=='+'; + this.isDefInsSpaceAfter = defSettings.charAt(1)=='+'; + if (parentTypes != null) { + this.hsParentType = new HashSet(parentTypes.length); + for (IElementType et : parentTypes) { + hsParentType.add(et); + } + } + } + + private WhiteSpaceSetting (IElementType etype, IElementType parentType, WhiteSpaceCategory cat, String defSettings, + String propText, String genetiveText) + { + this(etype, cat, parentType == null ? null : new IElementType[]{parentType}, defSettings, propText, genetiveText, 0); + } + + private WhiteSpaceSetting (IElementType etype, IElementType parentType, WhiteSpaceCategory cat, String defSettings, + String propText, String genetiveText, int len) + { + this(etype, cat, parentType == null ? null : new IElementType[]{parentType}, defSettings, propText, genetiveText, len); + } + + @Override + public String toString() { + return propText; + } + + public String toSettingsString() { + return settingsText.isEmpty() ? toString() : settingsText; + } + + public boolean isDefInsSpaceBefore() { + return isDefInsSpaceBefore; + } + + public boolean isDefInsSpaceAfter() { + return isDefInsSpaceAfter; + } + + public WhiteSpaceCategory getCategory() { + return wcategory; + } + + private IElementType etype; + private HashSet hsParentType; + private WhiteSpaceCategory wcategory; + private String propText; + private String settingsText; + private int len; // 0 or length of the token (to recognize "&" and "AND" and so on) + + private boolean isDefInsSpaceBefore; + private boolean isDefInsSpaceAfter; + + } // WhiteSpaceSetting + + private static HashMap> hmToSearchWhites; + static { + hmToSearchWhites = new HashMap>(); + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + IElementType et = wss.getElementType(); + ArrayList al = hmToSearchWhites.get(et); + if (al != null) { + al.add(wss); + } else { + al = new ArrayList(); + al.add(wss); + hmToSearchWhites.put(et, al); + } + } + } + + public WhiteSpaceSetting searchWhiteSpaceSetting(PstLeafNode pln) { + ArrayList al = hmToSearchWhites.get(pln.getElementType()); + if (al != null) { + for (WhiteSpaceSetting wss : al) { + if (wss.testElement(pln)) { + return wss; + } + } + } + return null; + } + + public boolean isInsSpaceBefore(WhiteSpaceSetting wss) { + return (hmWhiteSettings.get(wss) & W_TAG_INS_L_SPACE) != 0; + } + + public boolean isInsSpaceAfter(WhiteSpaceSetting wss) { + return (hmWhiteSettings.get(wss) & W_TAG_INS_R_SPACE) != 0; + } + + public void setInsSpaceBefore(WhiteSpaceSetting wss, boolean ins) { + int bits = hmWhiteSettings.get(wss); + if (ins) { + bits |= W_TAG_INS_L_SPACE; + } else { + bits &= ~W_TAG_INS_L_SPACE; + } + hmWhiteSettings.put(wss, bits); + } + + public void setInsSpaceAfter(WhiteSpaceSetting wss, boolean ins) { + int bits = hmWhiteSettings.get(wss); + if (ins) { + bits |= W_TAG_INS_R_SPACE; + } else { + bits &= ~W_TAG_INS_R_SPACE; + } + hmWhiteSettings.put(wss, bits); + } + + + /////////// Control statements settings ------------------------------------------- + /////////// Control statements settings ------------------------------------------- + /////////// Control statements settings ------------------------------------------- + + private HashMap hmStmtSettingsBefore; + private HashMap hmStmtSettingsAfter; + + private enum SpecialCheckId { + None, + CheckParent, + InGlobalScope, + InLocalScope, + RecordVariant, // parent == RECORD_VARIANT_LIST or RECORD_VARIANT + ModuleEnd, // parent == null or LOCAL_MODULE + } + + +// public enum NewlineSettingCategory { +// NlscRoot, +// NlscDeclarations, +// NlscDeclTypes, +// NlscDeclProcs, +// NlscDeclMods, +// NlscStatements, +// NlscStmtIf, +// NlscStmtCase, +// NlscStmtOther +// } + + + public enum NewlineSettingCategory { + NlscDeclMods(Messages.FormatterProfile_Modules, "", null), //$NON-NLS-1$ + NlscDeclTypes(Messages.FormatterProfile_Types, "", null), //$NON-NLS-1$ + NlscDeclProcs(Messages.FormatterProfile_Procedures, "", null), //$NON-NLS-1$ + NlscDeclarations(Messages.FormatterProfile_Declarations, "", new NewlineSettingCategory[]{NlscDeclMods, NlscDeclTypes, NlscDeclProcs}), //$NON-NLS-1$ + + NlscStmtIf(Messages.FormatterProfile_IfStatements, "", null), //$NON-NLS-1$ + NlscStmtCase(Messages.FormatterProfile_CaseStatements, "", null), //$NON-NLS-1$ + NlscStmtOther(Messages.FormatterProfile_OtherStatements, "", null), //$NON-NLS-1$ + NlscStatements(Messages.FormatterProfile_ControlStatements, "", new NewlineSettingCategory[]{NlscStmtIf, NlscStmtCase, NlscStmtOther}), //$NON-NLS-1$ + + NlscRoot("", "", new NewlineSettingCategory[]{NlscDeclarations, NlscStatements}); //$NON-NLS-1$ //$NON-NLS-2$ + + private NewlineSettingCategory(String name, String settingsString, NewlineSettingCategory children[]) { + this.name = name; + this.settingsString = settingsString; + this.children = children; + } + + @Override + public String toString() { + return name; + } + + public String toSettingsString() { + return settingsString.isEmpty() ? name : settingsString; + } + + + public NewlineSettingCategory getParent() { + for (NewlineSettingCategory nsc : NewlineSettingCategory.values()) { + if (nsc.children != null) { + for (NewlineSettingCategory ccc : nsc.children) { + if (this.equals(ccc)) { + return nsc; + } + } + } + } + return null; + } + + public ArrayList getChildren() { + ArrayList al = new ArrayList(); + if (children != null) { + for (NewlineSettingCategory nsc : children) { + al.add(nsc); + } + } + for (NewlineSetting nss : NewlineSetting.values()) { + if (this.equals(nss.getCategory())) { + al.add(nss); + } + } + return al; + } + + private NewlineSettingCategory children[]; + private String name; + private String settingsString; + } + + + public enum NewlineSetting{ + // "01" - x - do nothing and don't show control (-2) + // ' ' - do nothing (-1) + // 0 - force to remove line + // 1,2.. - insert this number of newlines + // Formatter knows all but user interface uses now {x, ' ', 1} only + + // Declarations + // Declarations/Types + NlsTypRecord (ModulaTokenTypes.RECORD_KEYWORD, ModulaElementTypes.RECORD_TYPE_DEFINITION, NewlineSettingCategory.NlscDeclTypes, + "x1", Messages.FormatterProfile_Record), //$NON-NLS-1$ + + NlsTypEnd (ModulaTokenTypes.END_KEYWORD, ModulaElementTypes.RECORD_TYPE_DEFINITION, NewlineSettingCategory.NlscDeclTypes, + "1x", Messages.FormatterProfile_EndInRec), //$NON-NLS-1$ + + NlsTypCase (ModulaTokenTypes.CASE_KEYWORD, ModulaElementTypes.RECORD_VARIANT_FIELD_BLOCK, NewlineSettingCategory.NlscDeclTypes, + "1x", Messages.FormatterProfile_CaseInVarRec), //$NON-NLS-1$ + + NlsTypOf (ModulaTokenTypes.OF_KEYWORD, ModulaElementTypes.RECORD_VARIANT_FIELD_BLOCK, NewlineSettingCategory.NlscDeclTypes, + "x1", Messages.FormatterProfile_OfInVarRec), //$NON-NLS-1$ + + NlsTypSep (ModulaTokenTypes.SEP, SpecialCheckId.RecordVariant, NewlineSettingCategory.NlscDeclTypes, + "1 ", Messages.FormatterProfile_SepInVarRec), //$NON-NLS-1$ + + NlsTypElse (ModulaTokenTypes.ELSE_KEYWORD, ModulaElementTypes.RECORD_VARIANT_ELSE_PART, NewlineSettingCategory.NlscDeclTypes, + "1 ", Messages.FormatterProfile_ElseInVarRec), //$NON-NLS-1$ + + NlsTypEndCase(ModulaTokenTypes.END_KEYWORD, ModulaElementTypes.RECORD_VARIANT_FIELD_BLOCK, NewlineSettingCategory.NlscDeclTypes, + "1x", Messages.FormatterProfile_EndInVarRec), //$NON-NLS-1$ + + // Declarations/Procedures + NlsProc (ModulaTokenTypes.PROCEDURE_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscDeclProcs, + "1x", Messages.FormatterProfile_Procedure), //$NON-NLS-1$ + + NlsProcBegin (ModulaTokenTypes.BEGIN_KEYWORD, ModulaElementTypes.PROCEDURE_BODY, NewlineSettingCategory.NlscDeclProcs, + "11", Messages.FormatterProfile_BeginInProc, Messages.FormatterProfile_BeginInProc2), //$NON-NLS-1$ + + NlsProcEnd (ModulaTokenTypes.END_KEYWORD, ModulaElementTypes.PROCEDURE_DECLARATION, NewlineSettingCategory.NlscDeclProcs, + "1x", Messages.FormatterProfile_EndInProc, Messages.FormatterProfile_EndInProc2), //$NON-NLS-1$ + + // Declarations/Modules + NlsModImport (ModulaTokenTypes.IMPORT_KEYWORD, ModulaElementTypes.SIMPLE_IMPORT, NewlineSettingCategory.NlscDeclMods, + "1x", Messages.FormatterProfile_ImportSimple), //$NON-NLS-1$ + + NlsModFrom (ModulaTokenTypes.FROM_KEYWORD, ModulaElementTypes.UNQUALIFIED_IMPORT, NewlineSettingCategory.NlscDeclMods, + "1x", Messages.FormatterProfile_From), //$NON-NLS-1$ + + NlsModExport (ModulaTokenTypes.EXPORT_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscDeclMods, + "1x", Messages.FormatterProfile_Export), // //$NON-NLS-1$ + + NlsModBegin (ModulaTokenTypes.BEGIN_KEYWORD, ModulaElementTypes.MODULE_BODY, NewlineSettingCategory.NlscDeclMods, + "11", Messages.FormatterProfile_BeginInMod), //$NON-NLS-1$ + + NlsModExcept (ModulaTokenTypes.EXCEPT_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscDeclMods, + "11", Messages.FormatterProfile_Except), // //$NON-NLS-1$ + + NlsModFinal (ModulaTokenTypes.FINALLY_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscDeclMods, + "11", Messages.FormatterProfile_Finally), // //$NON-NLS-1$ + + NlsModEnd (ModulaTokenTypes.END_KEYWORD, SpecialCheckId.ModuleEnd, NewlineSettingCategory.NlscDeclMods, + "1x", Messages.FormatterProfile_EndInMod, Messages.FormatterProfile_EndInMod2), //$NON-NLS-1$ + + // Declarations + + NlsConstGlob (ModulaTokenTypes.CONST_KEYWORD, SpecialCheckId.InGlobalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_ConstGlob), //$NON-NLS-1$ + + NlsConstLoc (ModulaTokenTypes.CONST_KEYWORD, SpecialCheckId.InLocalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_ConstLoc), //$NON-NLS-1$ + + NlsTypeGlob (ModulaTokenTypes.TYPE_KEYWORD, SpecialCheckId.InGlobalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_TypeGlob), //$NON-NLS-1$ + + NlsTypeLoc (ModulaTokenTypes.TYPE_KEYWORD, SpecialCheckId.InLocalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_TypeLoc), //$NON-NLS-1$ + + NlsVarGlobal (ModulaTokenTypes.VAR_KEYWORD, SpecialCheckId.InGlobalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_VarGlob), //$NON-NLS-1$ + + NlsVarLocal (ModulaTokenTypes.VAR_KEYWORD, SpecialCheckId.InLocalScope, NewlineSettingCategory.NlscDeclarations, + "11", Messages.FormatterProfile_VarLoc), //$NON-NLS-1$ + + + // Control statements + // Control statements/If statements + NlsIf (ModulaTokenTypes.IF_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtIf, + "1x", Messages.FormatterProfile_If), //$NON-NLS-1$ + + NlsIfThen (ModulaTokenTypes.THEN_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtIf, + " 1", Messages.FormatterProfile_Then), //$NON-NLS-1$ + + NlsIfElsif (ModulaTokenTypes.ELSIF_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtIf, + "1x", Messages.FormatterProfile_Elsif), //$NON-NLS-1$ + + NlsElse (ModulaTokenTypes.ELSE_KEYWORD, ModulaElementTypes.IF_STATEMENT, NewlineSettingCategory.NlscStmtIf, + "11", Messages.FormatterProfile_ElseInIf), //$NON-NLS-1$ + + // Control statements/Case statements + NlsCase (ModulaTokenTypes.CASE_KEYWORD, ModulaElementTypes.CASE_STATEMENT, NewlineSettingCategory.NlscStmtCase, + "1x", Messages.FormatterProfile_Case), //$NON-NLS-1$ + + NlsCaseOf (ModulaTokenTypes.OF_KEYWORD, ModulaElementTypes.CASE_STATEMENT, NewlineSettingCategory.NlscStmtCase, + "x1", Messages.FormatterProfile_OfInCase), //$NON-NLS-1$ + + NlsCaseSep (ModulaTokenTypes.SEP, ModulaElementTypes.CASE_VARIANT_LIST, NewlineSettingCategory.NlscStmtCase, + "1 ", Messages.FormatterProfile_SepInCase), //$NON-NLS-1$ + + NlsElseInCase(ModulaTokenTypes.ELSE_KEYWORD, ModulaElementTypes.CASE_ELSE_PART, NewlineSettingCategory.NlscStmtCase, + "1 ", Messages.FormatterProfile_ElseInCase), //$NON-NLS-1$ + + // Control statements/Other statements + NlsFor (ModulaTokenTypes.FOR_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1x", Messages.FormatterProfile_For), //$NON-NLS-1$ + + NlsLoop (ModulaTokenTypes.LOOP_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1 ", Messages.FormatterProfile_Loop), //$NON-NLS-1$ + + NlsRepeat (ModulaTokenTypes.REPEAT_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1 ", Messages.FormatterProfile_Repeat), //$NON-NLS-1$ + + NlsUntil (ModulaTokenTypes.UNTIL_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1x", Messages.FormatterProfile_Until), //$NON-NLS-1$ + + NlsWhile (ModulaTokenTypes.WHILE_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1x", Messages.FormatterProfile_While), //$NON-NLS-1$ + + NlsWith (ModulaTokenTypes.WITH_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + "1x", Messages.FormatterProfile_With), //$NON-NLS-1$ + + NlsDo (ModulaTokenTypes.DO_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStmtOther, + " 1", Messages.FormatterProfile_Do), //$NON-NLS-1$ + + // Control statements + NlsEnd (ModulaTokenTypes.END_KEYWORD, SpecialCheckId.None, NewlineSettingCategory.NlscStatements, + "1x", Messages.FormatterProfile_End); //$NON-NLS-1$ + + + +// NlsTypeLoc (ModulaTokenTypes.TYPE_KEYWORD, SpecialCheckId.InLocalScope, "11", "TYPE keyword in local scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsTypeGlob (ModulaTokenTypes.TYPE_KEYWORD, SpecialCheckId.InGlobalScope, "11", "TYPE keyword in global scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsConstLoc (ModulaTokenTypes.CONST_KEYWORD, SpecialCheckId.InLocalScope, "10", "CONST keyword in local scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsConstGlob (ModulaTokenTypes.CONST_KEYWORD, SpecialCheckId.InGlobalScope, "11", "CONST keyword in global scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsVarLocal (ModulaTokenTypes.VAR_KEYWORD, SpecialCheckId.InLocalScope, "10", "VAR keyword in local scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsVarGlobal (ModulaTokenTypes.VAR_KEYWORD, SpecialCheckId.InGlobalScope, "11", "VAR keyword in global scope"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsSemicolon (ModulaTokenTypes.SEMICOLON, SpecialCheckId.None, " 1", "Semicolon ';'"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsArray (ModulaTokenTypes.ARRAY_KEYWORD, SpecialCheckId.None, "00", "ARRAY keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsOfInArr (ModulaTokenTypes.OF_KEYWORD, ModulaElementTypes.ARRAY_TYPE_DEFINITION, "00", "OF keyword in ARRAY type definition"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsOfInCase (ModulaTokenTypes.OF_KEYWORD, ModulaElementTypes.CASE_STATEMENT, "00", "OF keyword in CASE statement"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsPackedset (ModulaTokenTypes.PACKEDSET_KEYWORD, SpecialCheckId.None, "00", "PACKEDSET keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsPointer (ModulaTokenTypes.POINTER_KEYWORD, SpecialCheckId.None, "00", "POINTER keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsToInPtr (ModulaTokenTypes.TO_KEYWORD, ModulaElementTypes.POINTER_TYPE_DEFINITION, "00", "TO keyword in POINTER type definition"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsToInFor (ModulaTokenTypes.TO_KEYWORD, ModulaElementTypes.FOR_STATEMENT, "00", "TO keyword in FOR statement"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsDoInWhile (ModulaTokenTypes.DO_KEYWORD, ModulaElementTypes.WHILE_STATEMENT, "01", "DO keyword in WHILE statement"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsDoInWith (ModulaTokenTypes.DO_KEYWORD, ModulaElementTypes.MODULA_WITH_STATEMENT, "01", "DO keyword in WITH statement"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsProcedure (ModulaTokenTypes.PROCEDURE_KEYWORD, SpecialCheckId.None, "00", "PROCEDURE keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsRecord (ModulaTokenTypes.RECORD_KEYWORD, SpecialCheckId.None, "00", "RECORD keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsIF (ModulaTokenTypes.IF_KEYWORD, SpecialCheckId.None, "10", "IF keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsThen (ModulaTokenTypes.THEN_KEYWORD, SpecialCheckId.None, "01", "THEN keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsElse (ModulaTokenTypes.ELSE_KEYWORD, SpecialCheckId.None, "11", "ELSE keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsElsif (ModulaTokenTypes.ELSIF_KEYWORD, SpecialCheckId.None, "10", "ELSIF keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsBegin (ModulaTokenTypes.BEGIN_KEYWORD, SpecialCheckId.None, "11", "BEGIN keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsEnd (ModulaTokenTypes.END_KEYWORD, SpecialCheckId.None, "1 ", "END keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsFor (ModulaTokenTypes.FOR_KEYWORD, SpecialCheckId.None, "10", "FOR keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsBy (ModulaTokenTypes.BY_KEYWORD, SpecialCheckId.None, "00", "BY keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsCase (ModulaTokenTypes.CASE_KEYWORD, SpecialCheckId.None, "10", "CASE keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsExcept (ModulaTokenTypes.EXCEPT_KEYWORD, SpecialCheckId.None, "1 ", "EXCEPT keyword"), // //$NON-NLS-1$ //$NON-NLS-2$ +// NlsExit (ModulaTokenTypes.EXIT_KEYWORD, SpecialCheckId.None, "1 ", "EXIT keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsExport (ModulaTokenTypes.EXPORT_KEYWORD, SpecialCheckId.None, "10", "EXPORT keyword"), // //$NON-NLS-1$ //$NON-NLS-2$ +// NlsFinally (ModulaTokenTypes.FINALLY_KEYWORD, SpecialCheckId.None, "1 ", "FINALLY keyword"), // //$NON-NLS-1$ //$NON-NLS-2$ +// NlsForward (ModulaTokenTypes.FORWARD_KEYWORD, SpecialCheckId.None, "10", "FORWARD keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsFrom (ModulaTokenTypes.FROM_KEYWORD, SpecialCheckId.None, "10", "FROM keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsImportQual(ModulaTokenTypes.IMPORT_KEYWORD, ModulaElementTypes.SIMPLE_IMPORT, "10", "IMPORT keyword in qualified import"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsImportUnq (ModulaTokenTypes.IMPORT_KEYWORD, ModulaElementTypes.UNQUALIFIED_IMPORT, "10", "IMPORT keyword in unqualified import"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsIn (ModulaTokenTypes.IN_KEYWORD, SpecialCheckId.None, "00", "IN keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsIs (ModulaTokenTypes.IS_KEYWORD, SpecialCheckId.None, "00", "IS keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsLoop (ModulaTokenTypes.LOOP_KEYWORD, SpecialCheckId.None, "11", "LOOP keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsRepeat (ModulaTokenTypes.REPEAT_KEYWORD, SpecialCheckId.None, "11", "REPEAT keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsRetry (ModulaTokenTypes.RETRY_KEYWORD, SpecialCheckId.None, "1 ", "RETRY keyword"), // //$NON-NLS-1$ //$NON-NLS-2$ +// NlsReturn (ModulaTokenTypes.RETURN_KEYWORD, SpecialCheckId.None, "1 ", "RETURN keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsSeq (ModulaTokenTypes.SEQ_KEYWORD, SpecialCheckId.None, "00", "SEQ keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsSet (ModulaTokenTypes.SET_KEYWORD, SpecialCheckId.None, " 0", "SET keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsUntil (ModulaTokenTypes.UNTIL_KEYWORD, SpecialCheckId.None, "10", "UNTIL keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsWhile (ModulaTokenTypes.WHILE_KEYWORD, SpecialCheckId.None, "10", "WHILE keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsWith (ModulaTokenTypes.WITH_KEYWORD, SpecialCheckId.None, "10", "WITH keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsLabel (ModulaTokenTypes.LABEL_KEYWORD, SpecialCheckId.None, "10", "LABEL keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsGoto (ModulaTokenTypes.GOTO_KEYWORD, SpecialCheckId.None, "10", "GOTO keyword"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsSep (ModulaTokenTypes.SEP, SpecialCheckId.None, "10", "Separator '|' (in CASE statements)"), //$NON-NLS-1$ //$NON-NLS-2$ +// NlsComma (ModulaTokenTypes.COMMA, SpecialCheckId.None, "00", "Comma ','"), // diff //$NON-NLS-1$ //$NON-NLS-2$ +// NlsColon (ModulaTokenTypes.COLON, SpecialCheckId.None, "00", "Colon ':'"); // diff //$NON-NLS-1$ //$NON-NLS-2$ + + + + private NewlineSetting(IElementType etype, SpecialCheckId specialCheckId, NewlineSettingCategory category, + String defInss, String stmtName, String settingsText) { + this.etype = etype; + this.specialCheckId = specialCheckId; + this.category = category; + this.stmtName = stmtName; + this.settingsText = settingsText; + + insNewLineBeforeDef = char2val(defInss.charAt(0)); + insNewLineAfterDef = char2val(defInss.charAt(1)); + } + + private int char2val(char ch) { + if (ch >= '0' && ch <= '9') { + return ch - '0'; + } else if (ch == ' ') { + return -1; + } + return -2; // 'x' + } + + private NewlineSetting(IElementType etype, SpecialCheckId specialCheckId, NewlineSettingCategory category, String defInss, String stmtName) { + this(etype, specialCheckId, category, defInss, stmtName, stmtName); + } + + private NewlineSetting(IElementType etype, IElementType etParent, NewlineSettingCategory category, String defInss, + String stmtName, String settingsText) { + this(etype, SpecialCheckId.CheckParent, category, defInss, stmtName, settingsText); + this.etParent = etParent; + } + + private NewlineSetting(IElementType etype, IElementType etParent, NewlineSettingCategory category, String defInss, String stmtName) { + this(etype, SpecialCheckId.CheckParent, category, defInss, stmtName, stmtName); + this.etParent = etParent; + } + + + public int insNewLineBeforeDef() { + return insNewLineBeforeDef; + } + + public int insNewLineAfterDef() { + return insNewLineAfterDef; + } + + private boolean testElement(PstLeafNode pln) { + if (!etype.equals(pln.getElementType())) { + return false; + } + PstNode parent = pln.getParent(); + IElementType parentType = parent == null ? null : parent.getElementType(); + + if ((this == NlsVarGlobal || this == NlsVarLocal) && + ModulaElementTypes.FORMAL_PARAMETER_DECLARATION.equals(parentType)) + { + return false; // exclude "VAR" keyword in parameters + } + + switch(specialCheckId) { + case None: + return true; + case CheckParent: + return this.etParent.equals(parentType); + case RecordVariant: + return ModulaElementTypes.RECORD_VARIANT_LIST.equals(parentType) || + ModulaElementTypes.RECORD_VARIANT.equals(parentType); + case ModuleEnd: + return ModulaElementTypes.PROGRAM_MODULE.equals(parentType) || + ModulaElementTypes.LOCAL_MODULE.equals(parentType); + case InGlobalScope: + case InLocalScope: + boolean procFound = false; + for (PstNode n = parent; n != null; n = n.getParent()) { + if (n.getElementType().equals(ModulaElementTypes.PROCEDURE_DECLARATION)) { + procFound = true; + break; + } + } + return (specialCheckId == SpecialCheckId.InLocalScope) == procFound; + } + return false; + } + + @Override + public String toString() { + return stmtName; + } + + public String toSettingsString() { + return settingsText; + } + + public NewlineSettingCategory getCategory() { + return category; + } + + private IElementType etype; + private SpecialCheckId specialCheckId; + private NewlineSettingCategory category; + private String stmtName; + private String settingsText; + private int insNewLineBeforeDef; // 0 - don't insert, + private int insNewLineAfterDef; // 1,2.. lines to insert, -1 - hz, -2 - hz + don't show control + private IElementType etParent; // for SpecialCheckId.CheckParent + } + + private static HashMap> hmToSearchStmt; + static { + hmToSearchStmt = new HashMap>(); + for (NewlineSetting ss : NewlineSetting.values()) { + IElementType et = ss.etype; + ArrayList al = hmToSearchStmt.get(et); + if (al != null) { + al.add(ss); + } else { + al = new ArrayList(); + al.add(ss); + hmToSearchStmt.put(et, al); + } + } + } + + public NewlineSetting searchStmtSetting(PstLeafNode pln) { + ArrayList al = hmToSearchStmt.get(pln.getElementType()); + if (al != null) { + for (NewlineSetting ss : al) { + if (ss.testElement(pln)) { + return ss; + } + } + } + return null; + } + + + /** + * @return 0..9 - prefer to have this number of newlines + * or -1 - no matter + */ + public int getInsNewLinesBefore(NewlineSetting ss) { + return (hmStmtSettingsBefore.get(ss)); + } + public int getInsNewLinesAfter(NewlineSetting ss) { + return (hmStmtSettingsAfter.get(ss)); + } + + + /** + * @param val 0..9 - prefer to have this number of newlines + * or -1 - no matter + */ + public void setInsNewLineBefore(NewlineSetting ss, int val) { + hmStmtSettingsBefore.put(ss, val); + } + public void setInsNewLineAfter(NewlineSetting ss, int val) { + hmStmtSettingsAfter.put(ss, val); + } + + /////////// Line wrapping settings ------------------------------------------- + /////////// Line wrapping settings ------------------------------------------- + /////////// Line wrapping settings ------------------------------------------- + + private static final String WRAPPING_WIDTH_MEMENTO_KEY = "LineWrappingWidth"; //$NON-NLS-1$ + + private int wrappingWidth; + + public int getWrappingWidth() { + return wrappingWidth; + } + + public void setWrappingWidth(int w) { + wrappingWidth = w; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabLineWrapping.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabLineWrapping.java new file mode 100644 index 0000000..b1d757e --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabLineWrapping.java @@ -0,0 +1,278 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.events.ControlListener; +import org.eclipse.swt.events.ModifyEvent; +import org.eclipse.swt.events.ModifyListener; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +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.Group; +import org.eclipse.swt.widgets.Layout; +import org.eclipse.swt.widgets.Text; + +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.commons.utils.SwtUtils; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ModifyDialog.IModifyDialogTabPage; + +public class TabLineWrapping implements IModifyDialogTabPage { + private FormatterProfile fp; + private FormatterModifyDialog fmtDialog; + private FormatterPreview fPreview; + private final IDialogSettings fDialogSettings; + + private Text textWrappingWidth; + private Text textDemoWidth; + + private static final String DEMO_WRAP_WIDTH_KEY = XdsEditorsPlugin.PLUGIN_ID + "TabLineWrapping.DEMO_WRAP_WIDTH"; //$NON-NLS-1$ + + public TabLineWrapping(FormatterProfile fp, FormatterModifyDialog fmtDialog) { + this.fp = fp; + this.fmtDialog = fmtDialog; + fDialogSettings = XdsEditorsPlugin.getDefault().getDialogSettings(); + } + + @Override + public Composite createContents(Composite parent) { + Font font = parent.getFont(); + + final SashForm sashForm= new SashForm(parent, SWT.HORIZONTAL); + sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + Composite scrollContainer = new Composite(sashForm, SWT.NONE); + + GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); + scrollContainer.setLayoutData(gridData); + + GridLayout layout= new GridLayout(2, false); + layout.marginHeight= 0; + layout.marginWidth= 0; + layout.horizontalSpacing= 0; + layout.verticalSpacing= 0; + scrollContainer.setLayout(layout); + + ScrolledComposite scroll= new ScrolledComposite(scrollContainer, SWT.V_SCROLL | SWT.H_SCROLL); + scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + scroll.setExpandHorizontal(true); + scroll.setExpandVertical(true); + + final Composite settingsContainer= new Composite(scroll, SWT.NONE); + settingsContainer.setFont(sashForm.getFont()); + settingsContainer.setLayout(new PageLayout(scroll, 400, 400)); + settingsContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + scroll.setContent(settingsContainer); + settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + scroll.pack(true); + scroll.addControlListener(new ControlListener() { + public void controlMoved(ControlEvent e) { + } + public void controlResized(ControlEvent e) { + settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + } + }); + + + Composite compL= new Composite(settingsContainer, SWT.NONE); + compL.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + layout= new GridLayout(1, false); + compL.setLayout(layout); + + Composite compR = new Composite(sashForm, SWT.NONE); + layout = new GridLayout(2, true); + compR.setLayout(layout); + compR.setFont(font); + GridData gd = new GridData(GridData.FILL_BOTH); + compR.setLayoutData(gd); + + // --General settings-------- + Group grp = SWTFactory.createGroup(compL, Messages.TabLineWrapping_GeneralSettings, 2, 1, GridData.FILL_HORIZONTAL); + + // Maximum line width: [ 123] + int textWidthHint = SwtUtils.getTextWidth(grp, "9999999999"); //$NON-NLS-1$ + SWTFactory.createLabel(grp, Messages.TabLineWrapping_MaxLineWidth + ':', 1); + textWrappingWidth = SWTFactory.createSingleText(grp, 1); + gd = new GridData(GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END); + gd.widthHint = textWidthHint; + textWrappingWidth.setLayoutData(gd); + textWrappingWidth.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validate(false); + } + }); + + configurePreview(compR, 2); + + // Set line width for preview window: [ 123] + SWTFactory.createLabel(compR, Messages.TabLineWrapping_SetWidthToPreview + ':', 1); + textDemoWidth = SWTFactory.createSingleText(compR, 1); + gd = new GridData(GridData.BEGINNING); + gd.widthHint = textWidthHint; + textDemoWidth.setLayoutData(gd); + + + textDemoWidth.addModifyListener(new ModifyListener() { + @Override + public void modifyText(ModifyEvent e) { + validate(true); + } + }); + + // Init values: + + textWrappingWidth.setText("" + fp.getWrappingWidth()); //$NON-NLS-1$ + + int demoWidth = 40; + try { + demoWidth = fDialogSettings.getInt(DEMO_WRAP_WIDTH_KEY); + } catch (Exception e) {} + textDemoWidth.setText("" + demoWidth); //$NON-NLS-1$ + + updatePreviewWidth(demoWidth); + + return sashForm; + } + + + private void configurePreview(Composite composite, int numColumns) { + SWTFactory.createLabel(composite, Messages.IndentationTabPage_Preview+':', numColumns); + fPreview = new FormatterPreview(composite, "indent_preview.mod", XdsSourceType.Modula); //$NON-NLS-1$ + + final GridData gd = new GridData(GridData.FILL_VERTICAL | GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan = numColumns; + gd.widthHint = 0; + gd.heightHint = 0; + fPreview.getTextWidget().setLayoutData(gd); + fPreview.turnOnMarginPainter(); + fPreview.setProfile(fp); + } + + @Override + public void makeVisible() { + fPreview.setProfile(fp); + } + + @Override + public void setInitialFocus() { + } + + + + private static class PageLayout extends Layout { + + private final ScrolledComposite fContainer; + private final int fMinimalWidth; + private final int fMinimalHight; + + private PageLayout(ScrolledComposite container, int minimalWidth, int minimalHight) { + fContainer= container; + fMinimalWidth= minimalWidth; + fMinimalHight= minimalHight; + } + + @Override + public Point computeSize(Composite composite, int wHint, int hHint, boolean force) { + if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { + return new Point(wHint, hHint); + } + + int x = fMinimalWidth; + int y = fMinimalHight; + Control[] children = composite.getChildren(); + for (int i = 0; i < children.length; i++) { + Point size = children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, force); + x = Math.max(x, size.x); + y = Math.max(y, size.y); + } + + Rectangle area= fContainer.getClientArea(); + if (area.width > x) { + fContainer.setExpandHorizontal(true); + } else { + fContainer.setExpandHorizontal(false); + } + + if (area.height > y) { + fContainer.setExpandVertical(true); + } else { + fContainer.setExpandVertical(false); + } + + if (wHint != SWT.DEFAULT) { + x = wHint; + } + if (hHint != SWT.DEFAULT) { + y = hHint; + } + + return new Point(x, y); + } + + @Override + public void layout(Composite composite, boolean force) { + Rectangle rect = composite.getClientArea(); + Control[] children = composite.getChildren(); + for (int i = 0; i < children.length; i++) { + children[i].setSize(rect.width, rect.height); + } + } + } + + private final static Status fOk= new Status(IStatus.OK, XdsEditorsPlugin.PLUGIN_ID, ""); //$NON-NLS-1$ + private final static Status fBadValue= new Status(IStatus.ERROR, XdsEditorsPlugin.PLUGIN_ID, Messages.TabLineWrapping_InvalidValue); + + private void validate(boolean repaintPreview) { + int valDemo = getValue(textDemoWidth); + int valFp = getValue(textWrappingWidth); + if (valDemo >= 0) { + fDialogSettings.put(DEMO_WRAP_WIDTH_KEY, valDemo); + if (repaintPreview) { + updatePreviewWidth(valDemo); + } + } + if (valFp >= 0) { + fp.setWrappingWidth(valFp); + } + fmtDialog.updateStatus(valDemo>=0 && valFp>=0 ? fOk : fBadValue); + } + + private int getValue(Text txt) { + int val = -1; + String s = txt.getText().trim(); + if (!s.isEmpty()) { + val = 0; + for (int i=0; i= '0' && ch <= '9') { + val = val * 10 + ch - '0'; + } else { + val = -1; + break; + } + } + } + return (val >= 0 && val <= 9999) ? val : -1; + } + + private void updatePreviewWidth(int width) { + FormatterProfile fp1 = new FormatterProfile(); + fp1.copyFrom(fp); + fp1.setWrappingWidth(width); + fPreview.setProfile(fp1); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageIndentation.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageIndentation.java new file mode 100644 index 0000000..5003810 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageIndentation.java @@ -0,0 +1,293 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.custom.ScrolledComposite; +import org.eclipse.swt.events.ControlEvent; +import org.eclipse.swt.events.ControlListener; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Combo; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.Layout; + +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ModifyDialog.IModifyDialogTabPage; + +public class TabPageIndentation implements IModifyDialogTabPage { + private static final int IDX_SPACES_ONLY = 0; + private static final int IDX_USE_TABS = 1; + private static final int IDX_MIXED = 2; + + private int prefHeight; + private FormatterProfile fp; + private Combo cmbTabPolicy; + private FormatterPreview fPreview; + + + public TabPageIndentation(FormatterProfile fp) { + this.fp = fp; + } + + @Override + public Composite createContents(Composite parent) { + Font font = parent.getFont(); + + final SashForm sashForm= new SashForm(parent, SWT.HORIZONTAL); + sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + Composite scrollContainer = new Composite(sashForm, SWT.NONE); + + GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, false); + scrollContainer.setLayoutData(gridData); + + GridLayout layout= new GridLayout(2, false); + layout.marginHeight= 0; + layout.marginWidth= 0; + layout.horizontalSpacing= 0; + layout.verticalSpacing= 0; + scrollContainer.setLayout(layout); + + ScrolledComposite scroll= new ScrolledComposite(scrollContainer, SWT.V_SCROLL | SWT.H_SCROLL); + scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + scroll.setExpandHorizontal(true); + scroll.setExpandVertical(true); + + final Composite settingsContainer= new Composite(scroll, SWT.NONE); + settingsContainer.setFont(sashForm.getFont()); + settingsContainer.setLayout(new PageLayout(scroll, 400, 400)); + settingsContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + scroll.setContent(settingsContainer); + settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + scroll.pack(true); + scroll.addControlListener(new ControlListener() { + public void controlMoved(ControlEvent e) { + } + public void controlResized(ControlEvent e) { + settingsContainer.setSize(settingsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT)); + } + }); + + + Composite compL= new Composite(settingsContainer, SWT.NONE); + compL.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + layout= new GridLayout(1, false); + compL.setLayout(layout); + + Composite compR = new Composite(sashForm, SWT.NONE); + layout = new GridLayout(1, true); + compR.setLayout(layout); + compR.setFont(font); + GridData gd = new GridData(GridData.FILL_BOTH); + compR.setLayoutData(gd); + + { // deterine preferred items height 'prefHeight' + Combo cmb = SWTFactory.createCombo(compL, 1, SWT.DROP_DOWN | SWT.READ_ONLY, GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END); + prefHeight = cmb.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).y; + cmb.dispose(); + } + + + // --General settings-------- + Group grp = SWTFactory.createGroup(compL, Messages.IndentationTabPage_GeneralSettings, 2, 1, GridData.FILL_HORIZONTAL); + + // Tab policy: + SWTFactory.createLabel(grp, Messages.IndentationTabPage_TabPolicy + ':', 1); + cmbTabPolicy = SWTFactory.createCombo(grp, 1, SWT.DROP_DOWN | SWT.READ_ONLY, GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END); + cmbTabPolicy.add(Messages.IndentationTabPage_SpacesOnly); + cmbTabPolicy.add(Messages.IndentationTabPage_UseTabs); + cmbTabPolicy.add(Messages.IndentationTabPage_Mixed); + int tabm = fp.getValue(FormatterProfile.IndentSetting.TabMode); + cmbTabPolicy.select(tabm == FormatterProfile.TABMODE_MIXED ? IDX_MIXED : + tabm == FormatterProfile.TABMODE_TABS ? IDX_USE_TABS : IDX_SPACES_ONLY); + cmbTabPolicy.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + switch (cmbTabPolicy.getSelectionIndex()) { + case IDX_SPACES_ONLY: fp.setValue(FormatterProfile.IndentSetting.TabMode, FormatterProfile.TABMODE_SPACES); break; + case IDX_USE_TABS: fp.setValue(FormatterProfile.IndentSetting.TabMode, FormatterProfile.TABMODE_TABS); break; + case IDX_MIXED: fp.setValue(FormatterProfile.IndentSetting.TabMode, FormatterProfile.TABMODE_MIXED); break; + } + fPreview.setProfile(fp); + } + }); + // Use spaces to indent wrapped lines + Button __tmp_disable = (Button)addSettingControl(grp, FormatterProfile.IndentSetting.UseSpacesToIndentWrappedLines, Messages.IndentationTabPage_SpacesToWrappedLines); + __tmp_disable.setEnabled(false); //XXX temporary disabled not inplemented control + // Indentation size: + addSettingControl(grp, FormatterProfile.IndentSetting.IndentSize, Messages.IndentationTabPage_IndentSize + ':'); + // Tab size: + addSettingControl(grp, FormatterProfile.IndentSetting.TabSize, Messages.IndentationTabPage_TabSize + ':'); + + // --Indent-------- + grp = SWTFactory.createGroup(compL, Messages.IndentationTabPage_Indent, 2, 1, GridData.FILL_HORIZONTAL); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclInModule, Messages.IndentationTabPage_DeclWithinModule); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclInProc, Messages.IndentationTabPage_DeclWithinProc); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclInVCT, Messages.IndentationTabPage_DeclWithinVCT); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclOfLocalProc, Messages.IndentationTabPage_DeclOfLocalProcs + ':'); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclOfLocalMods, Messages.IndentationTabPage_DeclOfLocalMods + ':'); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentDeclOfRecFields, Messages.IndentationTabPage_DeclOfRecFields); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentStatements, Messages.IndentationTabPage_Statements); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentInCaseBody, Messages.IndentationTabPage_StatementsInCase); + addSettingControl(grp, FormatterProfile.IndentSetting.IndentInCaseAlternative, Messages.IndentationTabPage_StatementsInCaseAlt + ':'); + + configurePreview(compR, 1); + + return sashForm; + } + + private Control addSettingControl(Composite parent, FormatterProfile.IndentSetting bs, String label) { + if (bs.isRange()) { + Button cbox = null; + if (bs.isRangeWithCheckbox()) { + cbox = SWTFactory.createCheckbox(parent, label, 1); + } else { + SWTFactory.createLabel(parent, label, 1); + } + Combo cmb = SWTFactory.createCombo(parent, 1, SWT.DROP_DOWN | SWT.READ_ONLY, GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_END); + for (int i=bs.getMinVal(); i<=bs.getMaxVal(); ++i) { + cmb.add(""+i); //$NON-NLS-1$ + } + cmb.select(fp.getValueForDialog(bs) - bs.getMinVal()); + SettingSelectionListener ssl = new SettingSelectionListener(cmb, cbox, bs); + cmb.addSelectionListener(ssl); + if (cbox != null) { + boolean unch = fp.getRangeCheckboxUncheckedState(bs); + cbox.setSelection(!unch); + cmb.setEnabled(!unch); + cbox.addSelectionListener(ssl); + } + return cmb; + } else { + Button cb = SWTFactory.createCheckbox(parent, label, 2); + cb.setSelection(fp.getAsBoolean(bs)); + cb.addSelectionListener(new SettingSelectionListener(cb, null, bs)); + + GridData gd = (GridData)cb.getLayoutData(); + gd.heightHint = prefHeight; + cb.setLayoutData(gd); + + return cb; + } + } + + private void configurePreview(Composite composite, int numColumns) { + SWTFactory.createLabel(composite, Messages.IndentationTabPage_Preview+':', numColumns); + fPreview = new FormatterPreview(composite, "indent_preview.mod", XdsSourceType.Modula); //$NON-NLS-1$ + + final GridData gd = new GridData(GridData.FILL_VERTICAL | GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan = numColumns; + gd.widthHint = 0; + gd.heightHint = 0; + fPreview.getTextWidget().setLayoutData(gd); + fPreview.setProfile(fp); + } + + @Override + public void makeVisible() { + fPreview.setProfile(fp); + } + + @Override + public void setInitialFocus() { + cmbTabPolicy.setFocus(); + } + + + private class SettingSelectionListener extends SelectionAdapter { + private Control ctrl; + private Button rangeChbox; + private FormatterProfile.IndentSetting bs; + + public SettingSelectionListener(Control ctrl, Button rangeChbox, FormatterProfile.IndentSetting bs) { + this.ctrl = ctrl; + this.rangeChbox = rangeChbox; + this.bs = bs; + } + public void widgetSelected(SelectionEvent e) { + if (ctrl instanceof Button) { + fp.setBoolean(bs, ((Button)ctrl).getSelection()); + } else if (ctrl instanceof Combo) { + if (rangeChbox != null && !rangeChbox.getSelection()) { + fp.setValue(bs, ((Combo)ctrl).getSelectionIndex() + bs.getMinVal(), true); + ctrl.setEnabled(false); + } else { + fp.setValue(bs, ((Combo)ctrl).getSelectionIndex() + bs.getMinVal(), false); + ctrl.setEnabled(true); + } + } + fPreview.setProfile(fp); + } + } + + private static class PageLayout extends Layout { + + private final ScrolledComposite fContainer; + private final int fMinimalWidth; + private final int fMinimalHight; + + private PageLayout(ScrolledComposite container, int minimalWidth, int minimalHight) { + fContainer= container; + fMinimalWidth= minimalWidth; + fMinimalHight= minimalHight; + } + + @Override + public Point computeSize(Composite composite, int wHint, int hHint, boolean force) { + if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT) { + return new Point(wHint, hHint); + } + + int x = fMinimalWidth; + int y = fMinimalHight; + Control[] children = composite.getChildren(); + for (int i = 0; i < children.length; i++) { + Point size = children[i].computeSize(SWT.DEFAULT, SWT.DEFAULT, force); + x = Math.max(x, size.x); + y = Math.max(y, size.y); + } + + Rectangle area= fContainer.getClientArea(); + if (area.width > x) { + fContainer.setExpandHorizontal(true); + } else { + fContainer.setExpandHorizontal(false); + } + + if (area.height > y) { + fContainer.setExpandVertical(true); + } else { + fContainer.setExpandVertical(false); + } + + if (wHint != SWT.DEFAULT) { + x = wHint; + } + if (hHint != SWT.DEFAULT) { + y = hHint; + } + + return new Point(x, y); + } + + @Override + public void layout(Composite composite, boolean force) { + Rectangle rect = composite.getClientArea(); + Control[] children = composite.getChildren(); + for (int i = 0; i < children.length; i++) { + children[i].setSize(rect.width, rect.height); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageNewLines.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageNewLines.java new file mode 100644 index 0000000..f236ccc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageNewLines.java @@ -0,0 +1,252 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import java.util.ArrayList; + +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.TreeItem; + +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ModifyDialog.IModifyDialogTabPage; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.NewlineSetting; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.NewlineSettingCategory; + +public class TabPageNewLines implements IModifyDialogTabPage { + private FormatterProfile fp; + private FormatterPreview fPreview; + private TreeViewer fTreeViewer; + private Group fPropsGroup; + private ArrayList optsControls = new ArrayList(); + private static String treeInitialSelectionText; + + + public TabPageNewLines(FormatterProfile fp) { + this.fp = fp; + } + + @Override + public Composite createContents(Composite parent) { + Font font = parent.getFont(); + + final SashForm sashForm= new SashForm(parent, SWT.HORIZONTAL); + sashForm.setLayoutData(new GridData(GridData.FILL_BOTH)); + + + Composite compL = new Composite(sashForm, SWT.NONE); + GridLayout layout = new GridLayout(1, true); + compL.setLayout(layout); + compL.setFont(font); + GridData gd = new GridData(GridData.FILL_BOTH); + compL.setLayoutData(gd); + + Composite compR = new Composite(sashForm, SWT.NONE); + layout = new GridLayout(1, true); + compR.setLayout(layout); + compR.setFont(font); + gd = new GridData(GridData.FILL_BOTH); + compR.setLayoutData(gd); + + SWTFactory.createLabel(compL, Messages.TabPageNewLines_InsertNewLine + ':', 1); + + final SashForm sashFormL= new SashForm(compL, SWT.VERTICAL); + sashFormL.setLayoutData(new GridData(GridData.FILL_BOTH)); + + fTreeViewer= new TreeViewer(sashFormL, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL); + gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); + gd.heightHint= SWTFactory.getCharHeight(parent) * 3; + fTreeViewer.getControl().setLayoutData(gd); + + fTreeViewer.setContentProvider(new TreeContentProvider()); + fTreeViewer.setLabelProvider(new LabelProvider()); + fTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() { + @Override + public void selectionChanged(SelectionChangedEvent event) { + handleTreeSelection(); + } + }); + fTreeViewer.setInput(fp); + + fPropsGroup = SWTFactory.createGroup(sashFormL, "", 2, 1, GridData.FILL_BOTH); //$NON-NLS-1$ + fPropsGroup.setFont(font); + gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); + gd.heightHint= SWTFactory.getCharHeight(parent) * 3; + fPropsGroup.setLayoutData(gd); + + sashFormL.setWeights(new int[]{2,1}); + + configurePreview(compR, 1); + + try { + TreeItem its[] = fTreeViewer.getTree().getItems(); + for (TreeItem it : its) { + if (it.getData().toString().equals(treeInitialSelectionText)) { + fTreeViewer.getTree().setSelection(it); + handleTreeSelection(); + break; + } + } + + } catch (Exception e) {} + + return sashForm; + } + + + private void configurePreview(Composite composite, int numColumns) { + SWTFactory.createLabel(composite, Messages.IndentationTabPage_Preview+':', numColumns); + fPreview = new FormatterPreview(composite, "newlines_preview.mod", XdsSourceType.Modula); //$NON-NLS-1$ + + final GridData gd = new GridData(GridData.FILL_VERTICAL | GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan = numColumns; + gd.widthHint = 0; + gd.heightHint = 0; + fPreview.getTextWidget().setLayoutData(gd); + fPreview.setProfile(fp); + } + + + private void handleTreeSelection() { + for (int i = optsControls.size() - 1; i >= 0; --i) { + optsControls.get(i).dispose(); + } + optsControls.clear(); + + TreeItem sel[] = fTreeViewer.getTree().getSelection(); + if (sel.length > 0) { + Object selObj = (sel[0].getData()); + String title = null; + + if (selObj instanceof NewlineSetting) { +// optsControls.add(SWTFactory.createLabel(fPropsGroup, "Preferred number of lines to insert", 2)); +// optsControls.add(SWTFactory.createLabel(fPropsGroup, "", 2)); + NewlineSetting ss = (NewlineSetting)selObj; + int v = fp.getInsNewLinesBefore(ss); + mkChkbox(ss, v, true); + v = fp.getInsNewLinesAfter(ss); + mkChkbox(ss, v, false); + title = ((NewlineSetting)selObj).toSettingsString(); + } else if (selObj instanceof NewlineSettingCategory) { + title = ((NewlineSettingCategory)selObj).toSettingsString(); + } + fPropsGroup.setText(title == null ? "" : ' ' + title + ' '); //$NON-NLS-1$ + } + + fPropsGroup.layout(); // to redraw it + } + + private void mkChkbox(final NewlineSetting ss, int initValue, final boolean isBefore) { + // initValue: 0 - don't insert, remove if any + // 1,2.. lines to insert, + // -1 - do nothing + // -2 - don't show control + // Now we use only -1, 1 or -2 (but formatter may support all) + if (initValue == -1 || initValue == 1) { + final Button cb = SWTFactory.createCheckbox(fPropsGroup, + isBefore ? Messages.TabPageNewLines_InsNewlineBefore + : Messages.TabPageNewLines_InsNewlineAfter, 2); + optsControls.add(cb); + cb.setSelection(initValue == 1); + cb.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + int val = cb.getSelection() ? 1 : -1; + if (isBefore) { + fp.setInsNewLineBefore(ss, val); + } else { + fp.setInsNewLineAfter(ss, val); + } + fPreview.setProfile(fp); + } + }); + } + } + + +// private void mkCbox(final NewlineSetting ss, int initValue, final boolean isBefore) { +// String text = isBefore ? "Before" + ':' : "After" + ':'; +// optsControls.add(SWTFactory.createLabel(fPropsGroup, text, 1)); +// +// final Combo combo = SWTFactory.createCombo(fPropsGroup, 1, SWT.DROP_DOWN | SWT.READ_ONLY); +// optsControls.add(combo); +// combo.add("No matter"); // -1 +// combo.add("No new line"); // 0 +// combo.add("One new line symbol"); // 1 +// combo.add("One blank line"); // 2 +// combo.add("Two blank lines"); // 3 +// combo.add("Three blank lines"); // 4 +// combo.add("Four blank lines"); // 5 +// combo.select(1 + Math.min(Math.max(initValue, -1), 5)); +// combo.addSelectionListener(new SelectionAdapter() { +// @Override public void widgetSelected(SelectionEvent e) { +// int val = combo.getSelectionIndex() - 1; +// if (isBefore) { +// fp.setInsNewLineBefore(ss, val); +// } else { +// fp.setInsNewLineAfter(ss, val); +// } +// fPreview.setProfile(fp); +// } +// }); +// } + + + @Override + public void makeVisible() { + fPreview.setProfile(fp); + } + + @Override + public void setInitialFocus() { + //cmbTabPolicy.setFocus(); + } + + + private static class TreeContentProvider implements ITreeContentProvider { + + public Object[] getElements(Object inputElement) { + return getChildren(NewlineSettingCategory.NlscRoot); + } + + public Object[] getChildren(Object parentElement) { + if (parentElement instanceof NewlineSettingCategory) { + return ((NewlineSettingCategory)parentElement).getChildren().toArray(); + } + return new Object[0]; + } + + public Object getParent(Object element) { + if (element instanceof NewlineSettingCategory) { + return ((NewlineSettingCategory)element).getParent(); + } else if (element instanceof NewlineSetting) { + return ((NewlineSetting)element).getCategory(); + } + return null; + } + + public boolean hasChildren(Object element) { + return (element instanceof NewlineSettingCategory); + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} + + public void dispose() {} + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageWhiteSpace.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageWhiteSpace.java new file mode 100644 index 0000000..850a909 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/internal/preferences/formatter/TabPageWhiteSpace.java @@ -0,0 +1,241 @@ +package com.excelsior.xds.ui.editor.internal.preferences.formatter; + +import java.util.ArrayList; + +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Group; +import org.eclipse.swt.widgets.TreeItem; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.ModifyDialog.IModifyDialogTabPage; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.WhiteSpaceCategory; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.WhiteSpaceSetting; + +public class TabPageWhiteSpace implements IModifyDialogTabPage { + private FormatterProfile fp; + private FormatterPreview fPreview; + private TreeViewer fTreeViewer; + private Group fPropsGroup; + private ArrayList optsControls = new ArrayList(); + private static String treeInitialSelectionText; + + + public TabPageWhiteSpace(FormatterProfile fp) { + this.fp = fp; + } + + @Override + public Composite createContents(Composite parent) { + Font font = parent.getFont(); + + final SashForm sashForm= new SashForm(parent, SWT.HORIZONTAL); + sashForm.setLayoutData(new GridData(GridData.FILL_BOTH)); + + + Composite compL = new Composite(sashForm, SWT.NONE); + GridLayout layout = new GridLayout(1, true); + compL.setLayout(layout); + compL.setFont(font); + GridData gd = new GridData(GridData.FILL_BOTH); + compL.setLayoutData(gd); + + Composite compR = new Composite(sashForm, SWT.NONE); + layout = new GridLayout(1, true); + compR.setLayout(layout); + compR.setFont(font); + gd = new GridData(GridData.FILL_BOTH); + compR.setLayoutData(gd); + + SWTFactory.createLabel(compL, Messages.TabPageWhiteSpace_InsertSpace + ':', 1); + + final SashForm sashFormL= new SashForm(compL, SWT.VERTICAL); + sashFormL.setLayoutData(new GridData(GridData.FILL_BOTH)); + + fTreeViewer= new TreeViewer(sashFormL, SWT.SINGLE | SWT.BORDER | SWT.V_SCROLL); + gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); + gd.heightHint= SWTFactory.getCharHeight(parent) * 3; + fTreeViewer.getControl().setLayoutData(gd); + + fTreeViewer.setContentProvider(new TreeContentProvider()); + fTreeViewer.setLabelProvider(new LabelProvider()); + fTreeViewer.addSelectionChangedListener(new ISelectionChangedListener() { + @Override + public void selectionChanged(SelectionChangedEvent event) { + handleTreeSelection(); + } + }); + fTreeViewer.setInput(fp); + + fPropsGroup = SWTFactory.createGroup(sashFormL, "", 1, 1, GridData.FILL_BOTH); //$NON-NLS-1$ + fPropsGroup.setFont(font); + gd = new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); + gd.heightHint= SWTFactory.getCharHeight(parent) * 3; + fPropsGroup.setLayoutData(gd); + + sashFormL.setWeights(new int[]{2,1}); + + configurePreview(compR, 1); + + try { + TreeItem its[] = fTreeViewer.getTree().getItems(); + for (TreeItem it : its) { + if (it.getData().toString().equals(treeInitialSelectionText)) { + fTreeViewer.getTree().setSelection(it); + handleTreeSelection(); + break; + } + } + + } catch (Exception e) {} + + return sashForm; + } + + + private void configurePreview(Composite composite, int numColumns) { + SWTFactory.createLabel(composite, Messages.IndentationTabPage_Preview+':', numColumns); + fPreview = new FormatterPreview(composite, "indent_preview.mod", XdsSourceType.Modula); //$NON-NLS-1$ + + final GridData gd = new GridData(GridData.FILL_VERTICAL | GridData.GRAB_HORIZONTAL | GridData.HORIZONTAL_ALIGN_FILL); + gd.horizontalSpan = numColumns; + gd.widthHint = 0; + gd.heightHint = 0; + fPreview.getTextWidget().setLayoutData(gd); + fPreview.setProfile(fp); + } + + + private void handleTreeSelection() { + for (int i = optsControls.size()-1; i>=0; --i) { + optsControls.get(i).dispose(); + } + optsControls.clear(); + + TreeItem sel[] = fTreeViewer.getTree().getSelection(); + if (sel.length > 0) { + Object selObj = (sel[0].getData()); + ArrayList alWss = new ArrayList(); + String caption = ""; //$NON-NLS-1$ + if (selObj instanceof WhiteSpaceSetting) { + alWss.add((WhiteSpaceSetting)selObj); + caption = ((WhiteSpaceSetting)selObj).toSettingsString(); + } else if (selObj instanceof WhiteSpaceCategory) { + caption = ((WhiteSpaceCategory)selObj).toSettingsString(); + if (WhiteSpaceCategory.BinaryOperations.equals(selObj) || WhiteSpaceCategory.UnaryOperations.equals(selObj)) { + for (WhiteSpaceSetting wss : WhiteSpaceSetting.values()) { + if (wss.getCategory().equals(selObj)) { + alWss.add(wss); + } + } + } + } + + fPropsGroup.setText(caption.isEmpty() ? "" : (" " + caption + " ") ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + + if (alWss.size() > 0) { + mkCbox(alWss, true); + mkCbox(alWss, false); + } + } + fPropsGroup.layout(); // to redraw it + } + + private void mkCbox(final ArrayList alWss, final boolean isBefore) { + final Button cb = SWTFactory.createCheckbox(fPropsGroup, isBefore ? Messages.TabPageWhiteSpace_InsSpaceBefore : Messages.TabPageWhiteSpace_InsSpaceAfter, 1); + optsControls.add(cb); + cb.setSelection(isBefore ? fp.isInsSpaceBefore(alWss.get(0)) : fp.isInsSpaceAfter(alWss.get(0))); + cb.addSelectionListener(new SelectionAdapter() { + @Override public void widgetSelected(SelectionEvent e) { + boolean ins = cb.getSelection(); + for (WhiteSpaceSetting wss : alWss) { + if (isBefore) { + fp.setInsSpaceBefore(wss, ins); + } else { + fp.setInsSpaceAfter(wss, ins); + } + } + fPreview.setProfile(fp); + } + }); + } + + + @Override + public void makeVisible() { + fPreview.setProfile(fp); + } + + @Override + public void setInitialFocus() { + //cmbTabPolicy.setFocus(); + } + + + private static class TreeContentProvider implements ITreeContentProvider { + + public Object[] getElements(Object inputElement) { + return getChildren(WhiteSpaceCategory.RootCategory); + } + + public Object[] getChildren(Object parentElement) { + ArrayList al = null; + if (parentElement instanceof WhiteSpaceCategory) { + WhiteSpaceCategory wsc = (WhiteSpaceCategory)parentElement; + if (!wsc.equals(WhiteSpaceCategory.BinaryOperations) && !wsc.equals(WhiteSpaceCategory.UnaryOperations)) { + al = wsc.getChildren(); + // don't manage "." : + int idx = al.indexOf(WhiteSpaceSetting.WSpaceDot); + if (idx >= 0) { + al.remove(idx); + } + // don't manage ";" : + idx = al.indexOf(WhiteSpaceSetting.WSpaceSemicolon); + if (idx >= 0) { + al.remove(idx); + } + } + } + return al==null ? new Object[0] : al.toArray(); + } + + public Object getParent(Object element) { + if (element instanceof WhiteSpaceCategory) { + return ((WhiteSpaceCategory)element).getParent(); + } else if (element instanceof WhiteSpaceSetting) { + return ((WhiteSpaceSetting)element).getCategory(); + } + return null; + } + + public boolean hasChildren(Object element) { + if (element instanceof WhiteSpaceCategory) { + WhiteSpaceCategory wsc = (WhiteSpaceCategory)element; + if (!wsc.equals(WhiteSpaceCategory.BinaryOperations) && !wsc.equals(WhiteSpaceCategory.UnaryOperations)) { + return true; + } + } + return false; + } + + public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {} + + public void dispose() {} + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaEditorActionDefinitionIds.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaEditorActionDefinitionIds.java new file mode 100644 index 0000000..ff057ce --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaEditorActionDefinitionIds.java @@ -0,0 +1,14 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; + +public interface IModulaEditorActionDefinitionIds extends + ITextEditorActionDefinitionIds { + /** + * Action definition ID of the open declaration action + * (value "com.excelsior.xds.ui.editor.modula.opendecl"). + */ + public static final String OPEN_DECL = "com.excelsior.xds.ui.editor.modula.opendecl"; //$NON-NLS-1$ + public static final String FIND_DECL = "com.excelsior.xds.ui.editor.modula.finddecl"; //$NON-NLS-1$ + public static final String FIND_REFS = "com.excelsior.xds.ui.editor.modula.findrefs"; //$NON-NLS-1$ +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaKeywords.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaKeywords.java new file mode 100644 index 0000000..2a44810 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaKeywords.java @@ -0,0 +1,81 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.util.Arrays; +import java.util.HashSet; + +/** + * Keywords and pervasive identifiers of Modula-2 language. + * + * An identifier is a list of alphanumeric and low line ("_") characters starting + * with a letter. The ISO Standard permits an implementation-defined set of national + * alphanumeric characters to be used in identifiers. XDS defines this set as empty. + */ +public interface IModulaKeywords { + + /** + * Keywords in fact are identifiers reserved by the language for special use. + * They can not be redeclared, unlike the pervasive identifiers. + */ + public static final HashSet KEYWORDS = new HashSet(Arrays.asList( + "ASM", //$NON-NLS-1$ + "AND", "ARRAY", "BEGIN", "BY", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "CASE", "CONST", "DEFINITION", "DIV", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "DO", "ELSE", "ELSIF", "END", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "EXIT", "EXCEPT", "EXPORT", "FINALLY", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "FOR", "FORWARD", "FROM", "IF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "IMPLEMENTATION", "IMPORT" , "IN", "LOOP", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "MOD", "MODULE", "NOT", "OF", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "OR", "PACKEDSET", "POINTER", "PROCEDURE",//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "QUALIFIED", "RECORD", "REM", "RETRY", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "REPEAT", "RETURN", "SET", "SEQ", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "THEN", "TO", "TYPE", "UNTIL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "VAR", "WHILE", "WITH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-4$ + "~", "&" //$NON-NLS-1$ //$NON-NLS-2$ + )); + + /** + * Pervasive identifiers are not reserved words; if redeclared in a program, + * they will no longer have their predefined meaning in the scope of + * the redeclared identifier. + */ + public static final HashSet PERVASIVE_IDENTIFIERS = new HashSet(Arrays.asList( + "ABS", "ASSERT", "BITSET", "BOOLEAN", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "CARDINAL", "CAP", "CHR", "CHAR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "COMPLEX", "CMPLX", "DEC", "DISPOSE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "EXCL", "FALSE", "FLOAT", "HALT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "HIGH", "IM", "INC", "INCL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "INT", "INTERRUPTIBLE", "INTEGER", "LENGTH", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "LFLOAT", "LONGCOMPLEX", "LONGINT", "LONGREAL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "MAX", "MIN", "NEW", "NIL", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "ODD", "ORD", "PROC", "PROTECTION",//$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "RE", "REAL", "SIZE", "TRUE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "TRUNC", "UNINTERRUPTIBLE", "VAL" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + )); + + + /** + * Subset of pervasive identifiers which includes identifiers of Modula-2 + * built-in constants. + */ + public static final HashSet PERVASIVE_CONSTANTS = new HashSet(Arrays.asList( + "FALSE", "NIL", "TRUE" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + )); + + + /** + * Identifiers declared in the SYSTEM module. + */ + public static final HashSet SYSTEM_IDENTIFIERS = new HashSet(Arrays.asList( + "SYSTEM", "BITSPERLOC", "LOCSPERWORD", "LOCSPERBYTE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "LOC", "ADDRESS", "WORD", "BYTE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "ADDADR", "SUBADR", "DIFADR", "MAKEADR", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "ADR", "REF", "ROTATE", "SHIFT", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "CAST", "TSIZE", "INT8", "INT16", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "INT32", "CARD8", "CARD16", "CARD32", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "BOOL8", "BOOL16", "BOOL32", "INDEX", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "DIFADR_TYPE", "INT", "CARD", "int", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "unsigned", "size_t", "void", "MOVE", //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + "FILL", "GET", "PUT", "CC" //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ + )); + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaPartitions.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaPartitions.java new file mode 100644 index 0000000..b8cff3b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/IModulaPartitions.java @@ -0,0 +1,48 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.jface.text.IDocument; + +/** + * Definition of Modula-2 partitioning and its partitions. + */ +public interface IModulaPartitions { + + /** + * The uniquely identifier of the Modula-2 partitioning. + */ + public static final String M2_PARTITIONING = "__m2_partitioning__"; //$NON-NLS-1$ + + public static final String M2_CONTENT_TYPE_DEFAULT = IDocument.DEFAULT_CONTENT_TYPE; + public static final String M2_CONTENT_TYPE_BLOCK_COMMENT = "__m2_block_comment"; //$NON-NLS-1$ + public static final String M2_CONTENT_TYPE_END_OF_LINE_COMMENT = "__m2_end_of_line_comment"; //$NON-NLS-1$ + public static final String M2_CONTENT_TYPE_SINGLE_QUOTE_STRING = "__m2_single_quote_string__"; //$NON-NLS-1$ + public static final String M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING = "__m2_double_quote_string__"; //$NON-NLS-1$ + public static final String M2_CONTENT_TYPE_PRAGMA = "__m2_pragma__"; //$NON-NLS-1$ + public static final String M2_CONTENT_TYPE_DISABLED_CODE = "__m2_disabled_code__"; //$NON-NLS-1$ + + /** + * Array with legal content types of Modula-2 partitioner. + */ + public final static String[] LEGAL_CONTENT_TYPES = new String[] { + M2_CONTENT_TYPE_BLOCK_COMMENT, + M2_CONTENT_TYPE_END_OF_LINE_COMMENT, + M2_CONTENT_TYPE_SINGLE_QUOTE_STRING, + M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING, + M2_CONTENT_TYPE_PRAGMA, + M2_CONTENT_TYPE_DISABLED_CODE + }; + + /** + * All configured content types for the Modula-2 source viewer. + */ + public final static String[] ALL_CONFIGURED_CONTENT_TYPES = new String[] { + M2_CONTENT_TYPE_DEFAULT, + M2_CONTENT_TYPE_BLOCK_COMMENT, + M2_CONTENT_TYPE_END_OF_LINE_COMMENT, + M2_CONTENT_TYPE_SINGLE_QUOTE_STRING, + M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING, + M2_CONTENT_TYPE_PRAGMA, + M2_CONTENT_TYPE_DISABLED_CODE + }; + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/Modula.txt b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/Modula.txt new file mode 100644 index 0000000..26205e5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/Modula.txt @@ -0,0 +1,26 @@ +<* +M2EXTENSIONS *> +IMPLEMENTATION MODULE HuffChan; + +(* + This module shows how to redefine standard IO file functions. + It provides functions for reading and writing packed files + opened in Raw mode. +*) + +IMPORT IOChan, IOLink, ChanConsts, IOConsts, SYSTEM, Strings; +FROM Storage IMPORT ALLOCATE, DEALLOCATE; +FROM SYSTEM IMPORT BYTE ; + +CONST + rbldFrq = 512; (* means: every 512 bytes rebuild table *) + szText = "The string"; + +TYPE + charTap = POINTER TO ARRAY [0..MAX(INTEGER)-1] OF CHAR ; + smbTp = POINTER TO smbT; + + smbT = RECORD (* Huffman's tree *) + ch : CHAR ; + n : CARDINAL ; -- frequncy of char ch + left,right,next : smbTp; + END ; diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaAutoEditStrategy.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaAutoEditStrategy.java new file mode 100644 index 0000000..3241cff --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaAutoEditStrategy.java @@ -0,0 +1,641 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; + +import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy; +import org.eclipse.jface.text.DocumentCommand; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.TextUtilities; + +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; +import com.excelsior.xds.ui.editor.modula.format.ModulaTextFormatter; + +public class ModulaAutoEditStrategy extends DefaultIndentLineAutoEditStrategy { + private static enum ProcessingResult{NONE, INDENT_ON_ENTER, INDENT_OF_INSERTION, PAIR_OPERATOR_INSERTED, PAIR_OPERATOR_REINDENTED}; + private static final HashMap> hmEndPairs; + private static final HashSet hsEnd; + private static final HashMap hsAddIndentOperators; + + private ModulaTextFormatter m2f; + + @Override + public void customizeDocumentCommand(IDocument doc, DocumentCommand cmd) { + ProcessingResult r1 = ProcessingResult.NONE; + ProcessingResult r2 = ProcessingResult.NONE; + try { + boolean isEnterPressed = (TextUtilities.equals(doc.getLegalLineDelimiters(), cmd.text) != -1); + r1 = insertIndentIfNeed(doc, cmd, isEnterPressed); + r2 = checkTypingAfterLine(doc, cmd, isEnterPressed, r1); + } catch (Exception e) {} + + m2f = null; + if (r1 == ProcessingResult.NONE && r2 == ProcessingResult.NONE) { + super.customizeDocumentCommand(doc, cmd); + } + } + + private ModulaTextFormatter getM2Formatter() { + if (m2f == null) { + m2f = new ModulaTextFormatter(); + } + return m2f; + } + + private int calcIndentLen(String indent) { + int tabSize = getM2Formatter().getTabSize(); + int res = 0; + for (int i=0; i "\r\n ") + int incIndent = calcIncIndentOnEnter(doc, cmd.offset, true); + if (incIndent > 0) { + IRegion region = doc.getLineInformation(doc.getLineOfOffset(cmd.offset)); + String oldIndent = indentFromStr(doc.get(region.getOffset(), region.getLength())); + int oldIndentLen = calcIndentLen(oldIndent); + String indent = getM2Formatter().constructIndent(oldIndentLen + incIndent, oldIndent); + cmd.text = cmd.text + indent; + return ProcessingResult.INDENT_ON_ENTER; + } + } else if (cmd.text.length() > 1) { + // Paste command. Re-indent all pasted lines to insertion point + int insLen = cmd.text.length(); + int insLinesCnt = 1; + boolean insHasNoText = true; + for (int i=0; i 1) { + if (!isDefinitionBlock) { + + int dec1stIndent = 0; + if (!skipStartLineIndent && offsInDocStartLine>0) { + // insertion point is after some whitespace + // dec1stIndent := width of this space, need to recalc indent of 1st inserted line + String extraIndent = docStartLineText.substring(0, offsInDocStartLine); + dec1stIndent = calcIndentLen(indentFromStr(extraIndent)); + } + + int lev; + { // look into line before and calculate preferref indent level under it: + int lineToIndentUnderNum = skipStartLineIndent ? docStartLineNum : Math.max(docStartLineNum-1, 0); + IRegion reg; + String lineText = ""; + ; + for (int lineToIndentUnderMin = Math.max(0, lineToIndentUnderNum - 10); + lineToIndentUnderNum >= lineToIndentUnderMin; + --lineToIndentUnderNum) + { + // skip some empty lines (if any) to find line to indent under + reg = doc.getLineInformation(lineToIndentUnderNum); + lineText = doc.get(reg.getOffset(), reg.getLength()); + if (!lineText.trim().isEmpty()) { + break; + } else { + lineText = ""; + } + } + + String oldIndent = indentFromStr(lineText); + int oldIndentLen = calcIndentLen(oldIndent); + int incIndent = calcIncIndentOnEnter(doc, doc.getLineOffset(lineToIndentUnderNum), false); + lev = oldIndentLen + Math.max(incIndent, 0); + } + + int doc1stLineNumToIndent = docStartLineNum + (skipStartLineIndent ? 1 : 0); + doc1stLineNumToIndent = Math.min(doc1stLineNumToIndent, doc.getNumberOfLines() - 1); + region = doc.getLineInformation(doc1stLineNumToIndent); + String regionIndent = indentFromStr(doc.get(region.getOffset(), region.getLength())); + + // commonIndent - indent to use. Mix of tabs and spaces + String commonIndent = getM2Formatter().constructIndent(lev, regionIndent); + String commonIndent1st = getM2Formatter().constructIndent(lev - dec1stIndent, regionIndent); + + StringBuilder sbNewText = new StringBuilder(); + int insertionIndentLen = -1; // Internal indent in the insertion (calc from its 1st line) + boolean is1stLine = true; + for (String insLine : linesFrom(cmd.text)) { + if (skipStartLineIndent && is1stLine) { + sbNewText.append(insLine); // add insertion line as is + } else { + String ilIndent = indentFromStr(insLine); + int ilIndentLen = calcIndentLen(ilIndent); + + if (insertionIndentLen < 0) { + insertionIndentLen = ilIndentLen; // 1st line to indent - assume that it is insertion internal + // indent to be cut off from all inserted lines + } + + sbNewText.append(is1stLine ? commonIndent1st : commonIndent); // add common indent + for (int i = 0; i < ilIndentLen - insertionIndentLen; ++i) { + sbNewText.append(' '); // add intermediate indent + } + sbNewText.append(insLine.substring(ilIndent.length())); // add insertion line w/o indent + } + is1stLine = false; + } + cmd.text = sbNewText.toString(); // replace insertion text with re-indented one + + } else { // if (!isDefinitionBlock) + + StringBuilder sbNewText = new StringBuilder(); + boolean is1stLine = true; + int indentLev = -1; + String indent = ""; + for (String insLine : linesFrom(cmd.text)) { + if (skipStartLineIndent && is1stLine) { + sbNewText.append(insLine); // add insertion line as is + } else { + String ilIndent = indentFromStr(insLine); + int ilIndentLen = calcIndentLen(ilIndent); + + if (indentLev != ilIndentLen) { + indentLev = ilIndentLen; + indent = getM2Formatter().constructIndent(ilIndentLen, ""); + } + + sbNewText.append(indent); // add indent converted into our tab/space style + sbNewText.append(insLine.substring(ilIndent.length())); // add insertion line w/o indent + } + is1stLine = false; + } + cmd.text = sbNewText.toString(); // replace insertion text with re-indented one + + } + return ProcessingResult.INDENT_OF_INSERTION; + } + } + + + } + return ProcessingResult.NONE; + } + + + /** + * + * @param text + * @return TRUE when it is starts like whole construction (ex: "(* comment *) \n\rVAR a : TT...") + * which shouldn't be aligned under lines before + */ + private boolean isDefinitionBlock(String text) { + try { + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(text); + + while (true) { + TokenType token = input.nextToken(); + if (ModulaTokenTypes.WHITE_SPACE == token || + ModulaTokenTypes.BLOCK_COMMENT == token || + ModulaTokenTypes.END_OF_LINE_COMMENT == token ) + { + continue; + } else if (ModulaTokenTypes.TYPE_KEYWORD == token || + ModulaTokenTypes.VAR_KEYWORD == token || + ModulaTokenTypes.CONST_KEYWORD == token || + ModulaTokenTypes.PROCEDURE_KEYWORD == token || + ModulaTokenTypes.MODULE_KEYWORD == token || + ModulaTokenTypes.BEGIN_KEYWORD == token || + ModulaTokenTypes.END_KEYWORD == token) + { + return true; + } + break; + } + } catch (IOException e) { + e.printStackTrace(); + } + return false; + } + + private int calcIncIndentOnEnter(IDocument doc, int start, boolean isEnterPressed) { + try { + IRegion region = doc.getLineInformation(doc.getLineOfOffset(start)); + String partType = TextUtilities.getPartition(doc, IModulaPartitions.M2_PARTITIONING, region.getOffset(), false).getType(); + if (!IModulaPartitions.M2_CONTENT_TYPE_DEFAULT.equals(partType)) { + return -1; + } + + String line = doc.get(region.getOffset(), region.getLength()); + int cursorPos = start - region.getOffset(); + + // Get non-whitespace tokens from this line + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(line); + ArrayList alTokens = new ArrayList(); + try { + while (true) { + TokenType token = input.nextToken(); + if (token != ModulaTokenTypes.WHITE_SPACE) { + alTokens.add(new TokenWithPos(token, input.getTokenOffset())); + } + if (ModulaTokenTypes.EOF == token) { + break; + } + } + } catch (IOException e) { + } + ////// + if (alTokens.size() > 0) { + int res = -1; + TokenType token0 = alTokens.get(0).token; + int minPos = alTokens.get(0).pos; // min. cursor position to indent _under_ this construction + int maxPos = -1; // position before 'END' in this string if any + if (hsAddIndentOperators.containsKey(token0)) { + res = getM2Formatter().getIndentStatements(); + minPos += hsAddIndentOperators.get(token0); + } + else if (ModulaTokenTypes.CASE_KEYWORD.equals(token0)) { + res = getM2Formatter().getIndentInCase(); + minPos += 4; + } + else if (ModulaTokenTypes.VAR_KEYWORD.equals(token0)) { + res = getM2Formatter().getIndentDeclInVCT(); + minPos += 3; + } + else if (ModulaTokenTypes.CONST_KEYWORD.equals(token0)) { + res = getM2Formatter().getIndentDeclInVCT(); + minPos += 5; + } + else if (ModulaTokenTypes.TYPE_KEYWORD.equals(token0)) { + res = getM2Formatter().getIndentDeclInVCT(); + minPos += 4; + } + else if (alTokens.size() >= 3 && + token0.equals(ModulaTokenTypes.IDENTIFIER) && + alTokens.get(1).token.equals(ModulaTokenTypes.EQU) && + alTokens.get(2).token.equals(ModulaTokenTypes.RECORD_KEYWORD)) + { // = RECORD + res = getM2Formatter().getIndentDeclOfRecFields(); + minPos = alTokens.get(2).pos + 6; + } + + if (res != -1) { + // check that there is no 'END' in this line: + for (TokenWithPos t : alTokens) { + if (ModulaTokenTypes.END_KEYWORD.equals(t.token)) { + maxPos = t.pos-1; + break; + } else if (ModulaTokenTypes.END_OF_LINE_COMMENT.equals(t.token)) { + break; + } + } + + if (isEnterPressed && (cursorPos < minPos || (maxPos >= 0 && cursorPos > maxPos))) { + res = -1; // line is splitted in bad place, no new indentation required + } + } + return res; + } + } catch (Exception e) {} + return -1; + } + + private ArrayList linesFrom(String text) { + StringBuilder sb = new StringBuilder(); + ArrayList res = new ArrayList(); + boolean crlf = false; + for (int i=0; i 0) res.add(sb.toString()); + return res; + } + + + + //------------------------------------------------------------------------------------------------------------------------------------- + // Complete pair operators + //------------------------------------------------------------------------------------------------------------------------------------- + + private ProcessingResult checkTypingAfterLine(IDocument doc, + DocumentCommand cmd, + boolean isEnterPressed, + ProcessingResult onEnterResult) throws Exception + { + if (cmd.text.length() == 0 || cmd.length != 0) { + return ProcessingResult.NONE; // no normal typing/pasting + } + + IRegion reg = doc.getLineInformationOfOffset(cmd.offset); + + if (cmd.offset != reg.getOffset() + reg.getLength()) { + return ProcessingResult.NONE; // no at the end of the line + } + + String curLine = doc.get(reg.getOffset(), reg.getLength()); + String curLineIndent = indentFromStr(curLine); + + if (isEnterPressed) { + // Process after line ended with THEN, LOOP, DO, OF: insert pair " END;" + + String crlf = cmd.text; + String nextLineIndent = ""; + + if (onEnterResult == ProcessingResult.INDENT_ON_ENTER) { + // cmd.text is now + // get this parts from it: + for (int i = cmd.text.length()-1; i>=0; --i) { + char ch = cmd.text.charAt(i); + if (ch != ' ' && ch != '\t') { + crlf = cmd.text.substring(0,i+1); + nextLineIndent = cmd.text.substring(i+1); + break; + } + } + } + + String lineT = curLine.trim(); + if (endsWithWord(lineT, "THEN") || endsWithWord(lineT, "LOOP") || endsWithWord(lineT, "DO") || endsWithWord(lineT, "OF") ) { + boolean skip = false; + int curLineIndentLen = calcIndentLen(curLineIndent); + int nextLineNum = doc.getLineOfOffset(cmd.offset) + 1; + int lnumTo = Math.min(doc.getNumberOfLines()-1, nextLineNum+10); + for (int lnum = nextLineNum; lnum <= lnumTo; ++lnum) { + IRegion lreg = doc.getLineInformation(lnum); + String str = doc.get(lreg.getOffset(), lreg.getLength()); + String ind = indentFromStr(str); + if (ind.length() != str.length()) { + int indLen = calcIndentLen(ind); + if (indLen > curLineIndentLen) { + skip = true; + break; + } else if (indLen < curLineIndentLen) { + break; + } else { + str = str.trim(); + if (str.startsWith("END")) { + if (str.length() == 3 || !isIdentifierChar(str.charAt(3))) { + skip = true; + } + } else if (str.startsWith("ELSE")) { + if (str.length() == 4 || !isIdentifierChar(str.charAt(4))) { + skip = true; + } + } else if (str.startsWith("|") || str.contains(":")) { + skip = true; + } + break; + } + } + } + + // skip when the next string starts from "END" or is indented more then current + if (skip) { + return ProcessingResult.NONE; + } else { + cmd.text = crlf + nextLineIndent + crlf + curLineIndent + "END;"; + cmd.caretOffset= cmd.offset + crlf.length() + nextLineIndent.length(); + cmd.shiftsCaret= false; + return ProcessingResult.PAIR_OPERATOR_INSERTED; + } + } + } + + + if (!isIdentifierChar(cmd.text.charAt(0))) { + //Process typing after " END", " ELSE" etc. -- re-indent this END etc. under its opening command + + String endWord = curLine.substring(curLineIndent.length()); + HashSet hsOpen = hmEndPairs.get(endWord); + if (hsOpen != null) { + // The current line ~= 'END' (..ELSE etc.) Some text is going to be inserted after this 'END' + // So: try to indent END, ELSE etc. under its beginning token from hsOpen + String prevIndent = getIndentOfOpenLine(hsOpen, doc, cmd.offset); + if (prevIndent != null) { + String nextIndent = ""; + if (TextUtilities.equals(doc.getLegalLineDelimiters(), cmd.text) != -1) { + //XXX + // " END" + -- not indented in SmartTypingProcessor(?? - see Todo above) => next string should be indented too + nextIndent = prevIndent; + } + cmd.offset = reg.getOffset(); + cmd.length = curLine.length(); + cmd.text = prevIndent + endWord + cmd.text + nextIndent; + return ProcessingResult.PAIR_OPERATOR_REINDENTED; + } + } + } + + return ProcessingResult.NONE; + } + + + private String getIndentOfOpenLine(HashSet hsOpen, IDocument doc, int offset) { + try { + boolean isItEnd = (hsOpen == hsEnd); + int endLineNum = doc.getLineOfOffset(offset); + IRegion region = doc.getLineInformation(endLineNum); + + int endIndentLen = calcIndentLen(indentFromStr(doc.get(region.getOffset(), region.getLength()))); + + int skipPair = 0; + for (int lineNum = endLineNum-1; lineNum >= 0 && lineNum >= endLineNum-200; --lineNum) { + region = doc.getLineInformation(lineNum); + String partType = TextUtilities.getPartition(doc, IModulaPartitions.M2_PARTITIONING, region.getOffset(), false).getType(); + if (!IModulaPartitions.M2_CONTENT_TYPE_DEFAULT.equals(partType)) { + continue; + } + + String line = doc.get(region.getOffset(), region.getLength()); + String indent = indentFromStr(line); + int indentLen = calcIndentLen(indent); + line = line.trim(); + + if (isItEnd && line.startsWith("END") && (line.length()==3 || !isIdentifierChar(line.charAt(3)))) { + ++skipPair; + } + + if (indentLen > endIndentLen) { + continue; + } + + // Get all non-whitespace token from this line + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(line); + ArrayList alTokens = new ArrayList(); + try { + while (true) { + TokenType token = input.nextToken(); + if (token != ModulaTokenTypes.WHITE_SPACE) { + alTokens.add(token); + } + if (ModulaTokenTypes.EOF == token) { + break; + } + } + } catch (IOException e) { + } + + if (!alTokens.isEmpty()) { + if (hsOpen.contains(alTokens.get(0))) { + if (skipPair-- == 0) { + return indent; + } + } else if (isItEnd && alTokens.size() >= 3) { + // = RECORD / ... / END --- secial processing + if (alTokens.get(0).equals(ModulaTokenTypes.IDENTIFIER) && + alTokens.get(1).equals(ModulaTokenTypes.EQU) && + alTokens.get(2).equals(ModulaTokenTypes.RECORD_KEYWORD)) + { + if (skipPair-- == 0) { + return indent; + } + } + } else if (ModulaTokenTypes.PROCEDURE_KEYWORD.equals(alTokens.get(0))) { + break; // Don't cross PROCEDURE bound + } + } + } // for + + } catch (Exception e) {} + return null; + } + + + private boolean isIdentifierChar(char ch) { + ch = Character.toUpperCase(ch); + return ((ch>='A' && ch<='Z') || (ch>='0' && ch<='9') || ch == '_'); + } + + + private boolean endsWithWord(String line, String s) { + if (!line.endsWith(s)) { + return false; + } + if ((line.length() > s.length()) && isIdentifierChar(line.charAt(line.length() - s.length() - 1))) { + return false; + } + return true; + } + + + static { + hsAddIndentOperators = new HashMap(); + // , + hsAddIndentOperators.put(ModulaTokenTypes.IF_KEYWORD, 2); + hsAddIndentOperators.put(ModulaTokenTypes.THEN_KEYWORD, 4); + hsAddIndentOperators.put(ModulaTokenTypes.ELSIF_KEYWORD, 5); + hsAddIndentOperators.put(ModulaTokenTypes.ELSE_KEYWORD, 4); + hsAddIndentOperators.put(ModulaTokenTypes.FOR_KEYWORD, 3); + hsAddIndentOperators.put(ModulaTokenTypes.WHILE_KEYWORD, 5); + hsAddIndentOperators.put(ModulaTokenTypes.LOOP_KEYWORD, 4); + hsAddIndentOperators.put(ModulaTokenTypes.REPEAT_KEYWORD, 6); + hsAddIndentOperators.put(ModulaTokenTypes.BEGIN_KEYWORD, 5); + hsAddIndentOperators.put(ModulaTokenTypes.WITH_KEYWORD, 4); + + + hmEndPairs = new HashMap>(); + HashSet hs; + + hs = new HashSet(); + hs.add(ModulaTokenTypes.IF_KEYWORD); + hs.add(ModulaTokenTypes.THEN_KEYWORD); + hs.add(ModulaTokenTypes.ELSIF_KEYWORD); + hs.add(ModulaTokenTypes.CASE_KEYWORD); + hmEndPairs.put("ELSE", hs); + + hs = new HashSet(); + hs.add(ModulaTokenTypes.IF_KEYWORD); + hs.add(ModulaTokenTypes.THEN_KEYWORD); + hs.add(ModulaTokenTypes.ELSIF_KEYWORD); + hmEndPairs.put("ELSIF", hs); + + hs = new HashSet(); + hs.add(ModulaTokenTypes.REPEAT_KEYWORD); + hmEndPairs.put("UNTIL", hs); + + hs = new HashSet(); + hs.add(ModulaTokenTypes.PROCEDURE_KEYWORD); + hs.add(ModulaTokenTypes.MODULE_KEYWORD); + hmEndPairs.put("BEGIN", hs); + + hs = new HashSet(); + hs.add(ModulaTokenTypes.IF_KEYWORD); + hs.add(ModulaTokenTypes.THEN_KEYWORD); + hs.add(ModulaTokenTypes.ELSIF_KEYWORD); + hs.add(ModulaTokenTypes.ELSE_KEYWORD); + hs.add(ModulaTokenTypes.FOR_KEYWORD); + hs.add(ModulaTokenTypes.WHILE_KEYWORD); + hs.add(ModulaTokenTypes.LOOP_KEYWORD); + hs.add(ModulaTokenTypes.BEGIN_KEYWORD); + hs.add(ModulaTokenTypes.WITH_KEYWORD); + hs.add(ModulaTokenTypes.CASE_KEYWORD); + hmEndPairs.put("END", hs); + hsEnd = hs; + } + + private static class TokenWithPos { + public TokenWithPos(TokenType token, int pos) { + this.token = token; + this.pos = pos; + } + public TokenType token; + public int pos; + + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaContentAssistant.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaContentAssistant.java new file mode 100644 index 0000000..e55b314 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaContentAssistant.java @@ -0,0 +1,91 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.lang.reflect.Method; +import java.util.Objects; + +import org.eclipse.jface.text.contentassist.ContentAssistEvent; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.contentassist.ICompletionListener; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.swt.widgets.Table; +import org.eclipse.swt.widgets.TableItem; + +import com.excelsior.xds.core.utils.ReflectionUtils; + +public class ModulaContentAssistant extends ContentAssistant { + private ICompletionProposal lastSelectedProposal; + private boolean isAssistSessionRestarted; + private final ISourceViewer sourceViewer; + + public ModulaContentAssistant(ISourceViewer sourceViewer) { + this.sourceViewer = sourceViewer; + addCompletionListener(new CompletionListener()); + } + + public ISourceViewer getSourceViewer() { + return sourceViewer; + } + + @Override + public boolean isProposalPopupActive() { + return super.isProposalPopupActive(); + } + + public boolean isAssistSessionRestarted() { + return isAssistSessionRestarted; + } + + public String showPossibleCompletions(boolean isRestarted) { + isAssistSessionRestarted = isRestarted; + + ICompletionProposal targetProposal = lastSelectedProposal; + String result = super.showPossibleCompletions(); + if (isRestarted) { + selectProposal(targetProposal); + } + isAssistSessionRestarted = false; + return result; + } + + private void selectProposal(ICompletionProposal proposal) { + try{ + Object fProposalPopup = ReflectionUtils.getField(this.getClass(), "fProposalPopup", this, true); + Object fProposalTable = ReflectionUtils.getField(fProposalPopup.getClass(), "fProposalTable", fProposalPopup, true); + if (fProposalTable instanceof Table) { + Table table = (Table) fProposalTable; + int i = 0; + for (;i < table.getItemCount(); i++) { + TableItem item = table.getItem(i); + if (Objects.equals(item.getData(), proposal)) { + break; + } + } + if (i < table.getItemCount()) { + Method selectMethod = ReflectionUtils.findMethod(fProposalPopup.getClass(), "selectProposal", int.class, boolean.class); + ReflectionUtils.invokeMethod(selectMethod, fProposalPopup, i, false); + } + } + } + catch(AssertionError e) { + } + } + + private final class CompletionListener implements + ICompletionListener { + @Override + public void selectionChanged(ICompletionProposal proposal, + boolean smartToggle) { + lastSelectedProposal = proposal; + } + + @Override + public void assistSessionStarted(ContentAssistEvent event) { + } + + @Override + public void assistSessionEnded(ContentAssistEvent event) { + lastSelectedProposal = null; + } + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentProvider.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentProvider.java new file mode 100644 index 0000000..c58d1e0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentProvider.java @@ -0,0 +1,59 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.DocumentEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentListener; +import org.eclipse.ui.editors.text.ForwardingDocumentProvider; +import org.eclipse.ui.editors.text.TextFileDocumentProvider; +import org.eclipse.ui.texteditor.IDocumentProvider; + +/** + * The shared text file document provider specialized for Modula-2 source files. + */ +public class ModulaDocumentProvider extends ForwardingDocumentProvider { + + /** + * Creates a new Modula-2 source file document provider and sets up the parent chain. + */ + public ModulaDocumentProvider() { + super( IModulaPartitions.M2_PARTITIONING + , new ModulaDocumentSetupParticipant() + , new TextFileDocumentProvider() ); + } + + public ModulaDocumentProvider(IDocumentProvider parentProvider) { + super( IModulaPartitions.M2_PARTITIONING + , new ModulaDocumentSetupParticipant() + , parentProvider); + } + + /** + * {@inheritDoc} + */ + @Override + public void connect(Object element) throws CoreException { + super.connect(element); + IDocument document = getDocument(element); + if (document != null) { + setupDocumentListener(document); + } + } + + /** + * Creates and sets document's listener. + * + * @param document the document for setup + */ + public static void setupDocumentListener(IDocument document) { + document.addDocumentListener(new IDocumentListener() { + @Override + public void documentAboutToBeChanged(DocumentEvent event) { + } + @Override + public void documentChanged(DocumentEvent event) { + } + }); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentSetupParticipant.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentSetupParticipant.java new file mode 100644 index 0000000..dda396b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDocumentSetupParticipant.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.core.filebuffers.IDocumentSetupParticipant; +import org.eclipse.core.filebuffers.IDocumentSetupParticipantExtension; +import org.eclipse.core.filebuffers.LocationKind; +import org.eclipse.core.runtime.IPath; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentPartitioner; + +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.editor.commons.PartitionUtils; +import com.excelsior.xds.ui.editor.modula.scanner.rules.ModulaRuleBasedPartitionScanner; + +/** + * The document setup participant for a Modula-2 source file document. + */ +public class ModulaDocumentSetupParticipant implements IDocumentSetupParticipant + , IDocumentSetupParticipantExtension +{ + + /** + * {@inheritDoc} + */ + @Override + public void setup(IDocument document) { + setupPartitioner(document); + } + + /** + * {@inheritDoc} + */ + @Override + public void setup(IDocument document, IPath location, LocationKind locationKind) { + setup(document); + } + + /** + * Creates and sets document's partitioner. + * + * @param document the document for setup + * @see org.eclipse.core.filebuffers.IDocumentSetupParticipant#setup(org.eclipse.jface.text.IDocument) + */ + public static void setupPartitioner(IDocument document) { + if (PartitionUtils.getPartitioner(document, IModulaPartitions.M2_PARTITIONING) == null) { + IDocumentPartitioner partitioner = createDocumentPartitioner(); + PartitionUtils.setDocumentPartitioning(document, IModulaPartitions.M2_PARTITIONING, partitioner); + } + } + + /** + * Factory method for creating a Modula-2 specific document partitioner. + * + * @return a newly created properties file document partitioner + */ + + public static ModulaFastPartitioner createDocumentPartitioner() { + ModulaFastPartitioner modulaFastPartitioner = new ModulaFastPartitioner( new ModulaRuleBasedPartitionScanner() + , IModulaPartitions.LEGAL_CONTENT_TYPES ); + modulaFastPartitioner.setShowInactiveCode(PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.getStoredBoolean()); + return modulaFastPartitioner; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDoubleClickStrategy.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDoubleClickStrategy.java new file mode 100644 index 0000000..ad1dedc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaDoubleClickStrategy.java @@ -0,0 +1,115 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.DefaultTextDoubleClickStrategy; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITypedRegion; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.TextUtilities; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenSets; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; + +public class ModulaDoubleClickStrategy extends DefaultTextDoubleClickStrategy { + @Override + protected IRegion findExtendedDoubleClickSelection(IDocument document, + int offset) { + try { + ITypedRegion region = TextUtilities.getPartition(document, IModulaPartitions.M2_PARTITIONING, offset, true); + if (region.getType() == IModulaPartitions.M2_CONTENT_TYPE_DEFAULT) { + _XdsFlexScanner lexer = new _XdsFlexScanner(); + IRegion lineReg = document.getLineInformationOfOffset(offset); + lexer.reset(document.get(lineReg.getOffset(), lineReg.getLength())); + + List candidates = new ArrayList<>(); + TokenType tokenType; + while ( ( tokenType = lexer.nextToken()) != ModulaTokenTypes.EOF) { + if (ModulaTokenTypes.WHITE_SPACE.getDesignator().equals(tokenType.getDesignator())) { + continue; + } + int tokenOffset = lineReg.getOffset() + lexer.getTokenOffset(); + if (tokenOffset <= offset && offset <= tokenOffset + lexer.yylength()) { + candidates.add(new TokenRegion(new Region(tokenOffset, lexer.yylength()), tokenType)); + } + } + if (candidates.size() > 0){ + if (candidates.size() > 1){ + Collections.sort(candidates, new TokenRegionComparator()); + } + return candidates.get(candidates.size() - 1); + } + } + } catch (BadLocationException | IOException e) { + LogHelper.logError(e); + } + return super.findExtendedDoubleClickSelection(document, offset); + } + + private static final class TokenRegionComparator implements + Comparator, ModulaTokenSets { + private static final Set PUNCTUATION_SET = new HashSet<>( + Arrays.asList(PLUS, MINUS, TIMES, COLON, SLASH, BAR, SEP, COMMA, DOT, RANGE, BECOMES, SEMICOLON)); + { + PUNCTUATION_SET.addAll(BRACKETS_SET); + } + + @Override + public int compare(TokenRegion r1, TokenRegion r2) { + return weight(r1) - weight(r2); + } + + int weight(TokenRegion r) { + TokenType tokenType = r.getTokenType(); + if (PUNCTUATION_SET.contains(tokenType)) { + return 0; + } + else if (KEYWORD_SET.contains(tokenType)) { + return 1; + } + else if (LITERAL_SET.contains(tokenType)) { + return 2; + } + else if (IDENTIFIER.equals(tokenType)) { + return 3; + } + return -1; + } + } + + private static class TokenRegion implements IRegion{ + private final IRegion region; + private final TokenType tokenType; + + TokenRegion(IRegion region, TokenType tokenType) { + this.region = region; + this.tokenType = tokenType; + } + + @Override + public int getLength() { + return region.getLength(); + } + + @Override + public int getOffset() { + return region.getOffset(); + } + + public TokenType getTokenType() { + return tokenType; + } + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditor.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditor.java new file mode 100644 index 0000000..35ce4c4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditor.java @@ -0,0 +1,825 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.util.Objects; + +import org.apache.commons.lang.ObjectUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IMarker; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.resources.IResourceRuleFactory; +import org.eclipse.core.resources.IWorkspaceRunnable; +import org.eclipse.core.resources.ResourcesPlugin; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IAdaptable; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.jobs.ISchedulingRule; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.debug.core.DebugEvent; +import org.eclipse.debug.core.DebugPlugin; +import org.eclipse.debug.core.IDebugEventSetListener; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.DocumentEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentListener; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextInputListener; +import org.eclipse.jface.text.contentassist.IContentAssistant; +import org.eclipse.jface.text.source.CompositeRuler; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.text.source.IVerticalRuler; +import org.eclipse.jface.text.source.ImageUtilities; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.graphics.GC; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Rectangle; +import org.eclipse.swt.widgets.Canvas; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorSite; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.ISharedImages; +import org.eclipse.ui.PartInitException; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.actions.ActionGroup; +import org.eclipse.ui.internal.texteditor.LineNumberColumn; +import org.eclipse.ui.navigator.ICommonMenuConstants; +import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants; +import org.eclipse.ui.texteditor.IDocumentProvider; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.MarkerAnnotation; +import org.eclipse.ui.texteditor.rulers.IColumnSupport; +import org.eclipse.ui.texteditor.rulers.RulerColumnDescriptor; +import org.eclipse.ui.texteditor.rulers.RulerColumnRegistry; +import org.eclipse.ui.views.contentoutline.IContentOutlinePage; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.builder.buildsettings.IBuildSettingsCacheListener; +import com.excelsior.xds.core.compiler.compset.CompilationSetManager; +import com.excelsior.xds.core.ide.symbol.ParseTask; +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelListenerAdapter; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.marker.XdsMarkerConstants; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.utils.launch.LaunchConfigurationUtils; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.commons.utils.UiUtils; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.commons.annotations.MarkerAnnotationPaintHandler; +import com.excelsior.xds.ui.editor.commons.debug.DebugCommons; +import com.excelsior.xds.ui.editor.commons.text.PairedBracketsMatcher; +import com.excelsior.xds.ui.editor.commons.text.PairedBracketsPainter; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.internal.preferences.EditorPreferencePage; +import com.excelsior.xds.ui.editor.internal.preferences.IXdsEditorsPreferenceIds; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile; +import com.excelsior.xds.ui.editor.modula.actions.DeclarationsSearchGroup; +import com.excelsior.xds.ui.editor.modula.actions.OpenDeclarationsAction; +import com.excelsior.xds.ui.editor.modula.actions.OpenViewActionGroup; +import com.excelsior.xds.ui.editor.modula.actions.ReferencesSearchGroup; +import com.excelsior.xds.ui.editor.modula.commons.InactiveCodeRefresher; +import com.excelsior.xds.ui.editor.modula.commons.InactiveCodeRefresher.ITextPresentation; +import com.excelsior.xds.ui.editor.modula.commons.ModulaEditorCommons; +import com.excelsior.xds.ui.editor.modula.outline.ModulaOutlinePage; +import com.excelsior.xds.ui.editor.modula.text.ModulaPairedBracketsMatcher; +import com.excelsior.xds.ui.editor.modula.utils.ModulaAstUtils; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +/** + * Modula-2 source code editor. + */ +@SuppressWarnings("restriction") +public class ModulaEditor extends SourceCodeTextEditor +{ + public static final String CONTEXT_ID = "com.excelsior.xds.ui.modulaEditorScope"; //$NON-NLS-1$ + + /** The end of line comment prefix. */ + public static final String eolCommentPrefix = "--"; //$NON-NLS-1$ + + private ModulaOutlinePage outlinePage; + private ActionGroup openInViewActionGroup; + private ActionGroup declarationsSearchGroup; + private ActionGroup referencesSearchGroup; + private ModulaOccurrencesMarker occurrencesMarker; + private IDocumentListener documentListener; + + private final TokenManager tokenManager = new TokenManager(); + + private SymbolModelListener symbolModelListener; + private IBuildSettingsCacheListener buildSettingsCacheListener = new BuildSettingsCacheListener(); + + private IPropertyChangeListener editorPluginPreferenceListener; + private IPreferenceChangeListener corePluginPreferenceListener; + + private IDebugEventSetListener debugEventSetListener; + + public ModulaEditor() { + super(); + documentListener = new ModulaDocumentListener(); + setDocumentProvider(createDocumentProvider()); + configuration = new ModulaSourceViewerConfiguration(tokenManager, this + , getPreferenceStore() + , eolCommentPrefix ); + setSourceViewerConfiguration(configuration); + + final IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + editorPluginPreferenceListener = new IPropertyChangeListener() { + // used when settings are imported via "org.eclipse.ui.preferenceTransfer" extension point + @Override + public void propertyChange(PropertyChangeEvent event) { + handleXdsPreferenceStoreChanged(store, event); + } + }; + store.addPropertyChangeListener(editorPluginPreferenceListener); + + corePluginPreferenceListener = new IPreferenceChangeListener() { + @Override + public void preferenceChange(PreferenceChangeEvent e) { + if (PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.isChanged(e)) { + ModulaEditorCommons.configureModulaFastPartitioner(getEditorDocument(ModulaEditor.this)); + refreshInactiveCodePartitions(); + } + else if (PreferenceKeys.OVERRIDE_SHOW_LINE_NUMBER_COLUMN.isChanged(e)){ + refreshLineNumberColumn(); + } + } + }; + PreferenceKeys.addChangeListener(corePluginPreferenceListener); + + occurrencesMarker = new ModulaOccurrencesMarker(); + + addAnnotationPaintHandler(new NotInCompilationSetMarkerHandler()); + addAnnotationPaintHandler(new GrayBuildMarkerHandler()); + + setEditorContextMenuId("#ModulaEditorContext"); //$NON-NLS-1$ + setRulerContextMenuId("#ModulaEditorRulerContext"); //$NON-NLS-1$ + + /* + * refresh isEditable state on debug events (CREATE,TERMINATE) - i.e. when debugging started or terminated. + * */ + debugEventSetListener = new IDebugEventSetListener() { + @Override + public void handleDebugEvents(DebugEvent[] events) { + for (DebugEvent e : events) { + if (e.getKind() == DebugEvent.CREATE || e.getKind() == DebugEvent.TERMINATE) { + if (isSourceCorrespondsToSameDebugSession(e)) { + refreshLineNumberColumn(); + + // update 'read only' state of the editor - will call isEditable() + Display.getDefault().asyncExec( + () -> validateState(getEditorInput())); + } + } + } + } + }; + DebugPlugin.getDefault().addDebugEventListener(debugEventSetListener); + } + + private boolean isSourceCorrespondsToSameDebugSession(DebugEvent e) { + if (e.getSource() instanceof IAdaptable) { + IAdaptable adaptable = (IAdaptable) e.getSource(); + ILaunch launch = (ILaunch)adaptable.getAdapter(ILaunch.class); + if (launch != null){ + try { + IProject iProjectOfLaunch = LaunchConfigurationUtils.getProject(launch.getLaunchConfiguration()); + return Objects.equals(getProject(), iProjectOfLaunch); + } catch (CoreException err) { + LogHelper.logError(err); + } + } + } + return false; + } + + private void refreshLineNumberColumn(){ + Display.getDefault().asyncExec(() ->{ + IVerticalRuler ruler= getVerticalRuler(); + // The following sequence mimics what happens during the setInput method. + // For now, this is the only known way to get the LineNumberColumn to update its visible status. + + // called at the end of org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(Composite) + if (ruler instanceof CompositeRuler) { + updateContributedRulerColumns((CompositeRuler) ruler); + } + + // called at the end of AbstractDecoratedTextEditor.doSetInput(IEditorInput) + RulerColumnDescriptor lineNumberColumnDescriptor= RulerColumnRegistry.getDefault().getColumnDescriptor(LineNumberColumn.ID); + if (lineNumberColumnDescriptor != null) { + IColumnSupport columnSupport= (IColumnSupport)getAdapter(IColumnSupport.class); + columnSupport.setColumnVisible(lineNumberColumnDescriptor, isLineNumberRulerVisible() || isPrefQuickDiffAlwaysOn()); + } + + // force redraw of the ruler`s content. + IVerticalRuler verticalRuler = getVerticalRuler(); + if (verticalRuler != null) { + verticalRuler.update(); + } + }); + } + + @Override + protected boolean isLineNumberRulerVisible() { + return isProjectInDebug() && PreferenceKeys.OVERRIDE_SHOW_LINE_NUMBER_COLUMN.getStoredBoolean()? true : super.isLineNumberRulerVisible(); + } + + @Override + public void init(IEditorSite site, IEditorInput input) throws PartInitException + { + super.init(site, input); + } + + @Override + public void createPartControl(Composite parent) { + super.createPartControl(parent); + } + + @Override + public void refreshConfiguration() { + tokenManager.clear(); // forget all cached tokens - so resetting styles of the ModulaTokens can succeed. + super.refreshConfiguration(); + } + + protected void installSymbolModelListener() { + uninstallSymbolModelListener(); + IEditorInput editorInput = getEditorInput(); + ParsedModuleKey parsedModuleKey = CoreEditorUtils.editorInputToParsedModuleKey(editorInput); + if (parsedModuleKey != null) { + IProject project = CoreEditorUtils.getIProjectFrom(editorInput); + symbolModelListener = new SymbolModelListener(project, parsedModuleKey, true, true); + SymbolModelManager.instance().addListener(symbolModelListener, true, true); + } + } + + private void installBuildSettingsCacheListener(){ + BuildSettingsCache.addListener(buildSettingsCacheListener); + } + + private void uninstallBuildSettingsCacheListener(){ + BuildSettingsCache.removeListener(buildSettingsCacheListener); + } + + + protected void uninstallSymbolModelListener() { + if (symbolModelListener != null) { + SymbolModelManager.instance().removeListener(symbolModelListener); + symbolModelListener = null; + } + } + + @Override + protected void createActions() { + super.createActions(); + + openInViewActionGroup = createOpenViewActionGroup(); + declarationsSearchGroup = createDeclarationsSearchGroup(); + referencesSearchGroup = createReferencesSearchGroup(); + } + + + @Override + public boolean isEditable() { + return isProjectInDebug()? false : super.isEditable(); + } + + /** + * @return whether project related to {@link IResource} of the {@link IEditorInput} (if there is such) is being debugged. + */ + private boolean isProjectInDebug() { + return DebugCommons.isProjectInDebug(getProject()); + } + + /** + * @return project related to {@link IResource} of the {@link IEditorInput} (if there is such) + */ + private IProject getProject() { + return CoreEditorUtils.getIProjectFrom(getEditorInput()); + } + + @Override + public void dispose() { + super.dispose(); + + uninstallBuildSettingsCacheListener(); + uninstallSymbolModelListener(); + + if (openInViewActionGroup != null) { + openInViewActionGroup.dispose(); + openInViewActionGroup = null; + } + + if (declarationsSearchGroup != null) { + declarationsSearchGroup.dispose(); + declarationsSearchGroup = null; + } + + if (referencesSearchGroup != null) { + referencesSearchGroup.dispose(); + referencesSearchGroup = null; + } + + UiUtils.dispose(tokenManager); + + DebugPlugin.getDefault().removeDebugEventListener(debugEventSetListener); + PreferenceKeys.removeChangeListener(corePluginPreferenceListener); + XdsEditorsPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(editorPluginPreferenceListener); + } + + @Override + protected void editorContextMenuAboutToShow(IMenuManager menu) { + super.editorContextMenuAboutToShow(menu); + + addAction(menu, ICommonMenuConstants.GROUP_OPEN, OpenDeclarationsAction.ID); //$NON-NLS-1$ + + if (openInViewActionGroup != null) { + openInViewActionGroup.fillContextMenu(menu); + } + + if (declarationsSearchGroup != null) { + declarationsSearchGroup.fillContextMenu(menu); + } + + if (referencesSearchGroup != null) { + referencesSearchGroup.fillContextMenu(menu); + } + } + + + + /** + * Creates document provider for this editor. + * + * @return the document provider + */ + protected IDocumentProvider createDocumentProvider() { + return XdsEditorsPlugin.getDefault().getModulaDocumentProvider(); + } + + /** + * {@inheritDoc} + */ + @Override + protected void initializeKeyBindingScopes() { + setKeyBindingScopes(new String[] {CONTEXT_ID}); + } + + /** + * {@inheritDoc} + */ + @Override + public String getEOLCommentPrefix() { + return eolCommentPrefix; + } + + /** + * {@inheritDoc} + */ + @Override + protected PairedBracketsMatcher getPairedBraceMatcher() { + return new ModulaPairedBracketsMatcher(); + } + + + /** + * {@inheritDoc} + */ + @Override + @SuppressWarnings("rawtypes") + public Object getAdapter(Class required) + { + if (IContentOutlinePage.class.equals(required)) + { + if (outlinePage == null) + { + outlinePage = createOutlinePage(); + if (getEditorInput() != null) + outlinePage.setInput(getEditorInput()); + } + return outlinePage; + } + else if (ISourceViewer.class.equals(required)) { + return getSourceViewer(); + } + + return super.getAdapter(required); + } + + /** + * {@inheritDoc} + */ + @Override + protected void doSetInput(IEditorInput newInput) throws CoreException + { + IEditorInput oldInput = getEditorInput(); + if (oldInput != null) { // discard AST for the old input - this occurs when refactoring renames resource + ModulaAst modulaAst = ModulaEditorSymbolUtils.getModulaAst(oldInput); + XdsParserManager.discardModulaAst(modulaAst); + } + + super.doSetInput(newInput); + setOutlinePageInput(outlinePage, newInput); + installSymbolModelListener(); + installBuildSettingsCacheListener(); + } + + @Override + protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) + { + ISourceViewer viewer = super.createSourceViewer(parent, ruler, styles); + + // TODO: BEGIN Replace with AbstractPreferenceInitializer + IPreferenceStore xdsStore = XdsEditorsPlugin.getDefault().getPreferenceStore(); + EditorPreferencePage.initEditorPrefsInStoreIfNeed(xdsStore); + // TODO: END Replace with AbstractPreferenceInitializer + + PairedBracketsMatcher braceMatcher = getPairedBraceMatcher(); + if (braceMatcher != null) { + PairedBracketsPainter.installToEditor( viewer + , braceMatcher + , xdsStore + , IXdsEditorsPreferenceIds.PREF_HIGHLIGHT_MATCHING_BRACKETS + , IXdsEditorsPreferenceIds.PREF_MATCHED_BRACKETS_COLOR + , IXdsEditorsPreferenceIds.PREF_UNMATCHED_BRACKETS_COLOR ); + } + + occurrencesMarker.setViewer(viewer, this); + + viewer.addTextInputListener(new ITextInputListener() { + @Override + public void inputDocumentChanged(IDocument oldInput, IDocument newInput) { + } + + @Override + public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput) { + if (oldInput != null) { + oldInput.removeDocumentListener(documentListener); + } + if (newInput != null) { + newInput.addDocumentListener(documentListener); + } + } + }); + + return viewer; + } + /** + * {@inheritDoc} + */ + @Override + protected void handlePreferenceStoreChanged(PropertyChangeEvent event) { + String property= event.getProperty(); + if (AbstractDecoratedTextEditorPreferenceConstants.EDITOR_TAB_WIDTH.equals(property)) { + // Ignore common editor tabs size, use our tabs from formatter settings + return; + } + super.handlePreferenceStoreChanged(event); + } + + protected void handleXdsPreferenceStoreChanged(IPreferenceStore store, PropertyChangeEvent event) { + String property= event.getProperty(); + if (FormatterProfile.TAB_SIZE_PROPERTY_NAME.equals(property)) { + int tabSize = store.getInt(FormatterProfile.TAB_SIZE_PROPERTY_NAME); + StyledText stext = getSourceViewer().getTextWidget(); + if (tabSize != stext.getTabs()) { + stext.setTabs(tabSize); + if (isTabsToSpacesConversionEnabled()) { + uninstallTabsToSpacesConverter(); + installTabsToSpacesConverter(); + } + } + } + } + + protected ActionGroup createOpenViewActionGroup() { + return new OpenViewActionGroup(this); + } + + protected ActionGroup createDeclarationsSearchGroup() { + return new DeclarationsSearchGroup(this); + } + + protected ActionGroup createReferencesSearchGroup() { + return new ReferencesSearchGroup(this); + } + + /** + * Creates the outline page used with this editor. + * + * @return the created Modula-2 outline page + */ + protected ModulaOutlinePage createOutlinePage() { + ModulaOutlinePage page = new ModulaOutlinePage(this, getSourceViewer().getTextWidget()); + setOutlinePageInput(page, getEditorInput()); + return page; + } + + /** + * Sets the input of the editor's outline page. + * + * @param page the Modula-2 outline page + * @param input the editor input + */ + protected void setOutlinePageInput(ModulaOutlinePage page, IEditorInput input) { + if (page != null) { + page.setInput(input); + } + } + + protected void reconciled(ParsedModuleKey key, ModulaAst ast) { + if (outlinePage != null) { + outlinePage.doRefresh(); + } + occurrencesMarker.reconciled(); + refreshContentProposals(); + repartitionAndRefresh(ast); + } + + private void refreshContentProposals() { + final IContentAssistant contentAssistant = configuration.getContentAssistant(getSourceViewer()); + if (contentAssistant instanceof ModulaContentAssistant) { + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + if (isDisposed()) { + return; + } + ModulaContentAssistant modulaContentAssistant = (ModulaContentAssistant) contentAssistant; + if (modulaContentAssistant.isProposalPopupActive()) { + modulaContentAssistant.showPossibleCompletions(true); + } + } + }); + } + } + + private void refreshInactiveCodePartitions() { + ModulaAst ast = ModulaAstUtils.getAstIfUpToDate(this); + repartitionAndRefresh(ast); + } + + /** + * Recomputes partitioning and refreshes editor, in case there are disabled code regions. + * + * @param ast + */ + private void repartitionAndRefresh(final ModulaAst ast) + { + InactiveCodeRefresher inactiveCodeRefresher = new InactiveCodeRefresher(ast, new ITextPresentation() { + @Override + public boolean isDisposed() { + return ModulaEditor.this.isDisposed(); + } + + @Override + public void invalidateTextPresentation() { + ISourceViewer sourceViewer = ModulaEditor.this.getSourceViewer(); + if (sourceViewer != null) { + sourceViewer.invalidateTextPresentation(); + } + } + }, () -> getEditorDocument(this)); + inactiveCodeRefresher.refresh(); + } + + /** + * Schedules re-parse of the module whose source is being edited + */ + private void scheduleReparse() { + ParseTask task = ParseTaskFactory.create(getEditorInput()); + task.setNeedModulaAst(true); + task.setParseImportSection(false); + task.setForce(false); + SymbolModelManager.instance().scheduleParse(task, null); + } + + private static IDocument getEditorDocument(ITextEditor editor) { + IDocument document = null; + IDocumentProvider documentProvider = editor.getDocumentProvider(); + if (documentProvider != null) { + document = documentProvider.getDocument(editor.getEditorInput()); + } + return document; + } + + private final class SymbolModelListener extends SymbolModelListenerAdapter { + public SymbolModelListener(IProject project, ParsedModuleKey targetModuleKey, boolean isReportOnExistingModule, boolean isNeedModulaAst) { + super(targetModuleKey); + } + + @Override + public void parsed(ParsedModuleKey key, IModuleSymbol moduleSymbol, ModulaAst ast) { + reconciled(key, ast); + } + + /* (non-Javadoc) + * + * For now, only possible way for the module to be removed from the model + * while the editor is opened is when SDK was changed - so schedule reparse + * + * @see com.excelsior.xds.builder.symbol.SymbolModelListenerAdapter#removed(com.excelsior.xds.parser.commons.symbol.ParsedModuleKey) + */ + @Override + public void removed(ParsedModuleKey key) { + scheduleReparse(); + } + } + + private final class BuildSettingsCacheListener implements IBuildSettingsCacheListener{ + @Override + public void buildSettingsReload(IProject p) { + IEditorInput editorInput = getEditorInput(); + if (ObjectUtils.equals(p, CoreEditorUtils.getIProjectFrom(editorInput))) { + ParseTask parseTask = ParseTaskFactory.create(editorInput); + parseTask.setNeedModulaAst(true); + SymbolModelManager.instance().scheduleParse(parseTask, null); + } + } + } + + private final class NotInCompilationSetMarkerHandler extends MarkerAnnotationPaintHandler { + @Override + public boolean paint(SourceCodeTextEditor editor, MarkerAnnotation annotation, + GC gc, Canvas canvas, Rectangle bounds) { + IMarker marker = annotation.getMarker(); + try { + if (marker.exists() && XdsMarkerConstants.PARSER_PROBLEM.equals(marker.getType())) { + boolean isInCompilationSet = CompilationSetManager.getInstance().isInCompilationSet((IFile)marker.getResource()); + if (!isInCompilationSet) { + int actualSeverity = marker.getAttribute(XdsMarkerConstants.PARSER_PROBLEM_SEVERITY_ATTRIBUTE, -1); + if (actualSeverity > -1) { + Image image = null; + switch (actualSeverity) { + case IMarker.SEVERITY_ERROR: + image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); + break; + case IMarker.SEVERITY_WARNING: + image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); + break; + default: + break; + } + + if (image != null) { + ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP); + return true; + } + + return false; + } + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + return false; + } + + @Override + public void dispose() { + } + } + + private final class GrayBuildMarkerHandler extends MarkerAnnotationPaintHandler { + private Image grayErrorImage; + private Image grayWarningImage; + + @Override + public boolean paint(SourceCodeTextEditor editor, MarkerAnnotation annotation, + GC gc, Canvas canvas, Rectangle bounds) + { + IMarker marker = annotation.getMarker(); + try { + if (grayErrorImage == null) { + Image image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_ERROR_TSK); + grayErrorImage= new Image(Display.getCurrent(), image, SWT.IMAGE_GRAY); + image = PlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJS_WARN_TSK); + grayWarningImage= new Image(Display.getCurrent(), image, SWT.IMAGE_GRAY); + } + + + if (marker.exists() && XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE.equals(marker.getType())) { + if (marker.getAttribute(XdsMarkerConstants.MARKER_GRAY_STATE, false)) + { + Image image = null; + int severity = marker.getAttribute(IMarker.SEVERITY, -1); + switch (severity) { + case IMarker.SEVERITY_ERROR: + image = grayErrorImage; + break; + case IMarker.SEVERITY_WARNING: + image = grayWarningImage; + break; + default: + break; + } + + if (image != null) { + ImageUtilities.drawImage(image, gc, canvas, bounds, SWT.CENTER, SWT.TOP); + return true; + } + } + } + } catch (CoreException e) { + LogHelper.logError(e); + } + return false; + } + + @Override + public void dispose() { + UiUtils.dispose(grayErrorImage); + grayErrorImage = null; // to prevent ImageUtils from attempts to draw it + UiUtils.dispose(grayWarningImage); + grayWarningImage = null; // to prevent ImageUtils from attempts to draw it + } + } + + /** + * Listens to text changes and makes gray BUILD_PROBLEM_MARKER_TYPE markers + * on the changed lines + * + * @author fsa + */ + private final class ModulaDocumentListener implements IDocumentListener { + @Override + public void documentAboutToBeChanged(DocumentEvent event) { + grayChangedLineMarkers(event); + } + + @Override + public void documentChanged(DocumentEvent event) { + + } + + } + + private void grayChangedLineMarkers(DocumentEvent event) { + try { + final IMarker[][] builderMarkers = new IMarker[1][]; + IEditorInput input = getEditorInput(); + IFile file = null; + if (input instanceof IFileEditorInput) { + file = ((IFileEditorInput)input).getFile(); + builderMarkers[0] = file.findMarkers(XdsMarkerConstants.BUILD_PROBLEM_MARKER_TYPE, false, IResource.DEPTH_INFINITE); + } + else { + return; + } + + IDocument doc = event.getDocument(); + // offs/end := affected area length + int offs = event.getOffset(); + int end = offs + event.getLength(); + + int begLine = doc.getLineOfOffset(offs); + int endLine = doc.getLineOfOffset(end); + IRegion endReg = doc.getLineInformation(endLine); + + // offs/end := affected area includes whole 1st/last lines + final int offsParam = doc.getLineOffset(begLine); + final int endParam = endReg.getOffset() + endReg.getLength(); + + if (file != null) { + IResourceRuleFactory ruleFactory = ResourcesPlugin.getWorkspace().getRuleFactory(); + ISchedulingRule markerRule = ruleFactory.markerRule(file); + ResourceUtils.scheduleWorkspaceRunnable(new IWorkspaceRunnable() { + @Override + public void run(IProgressMonitor monitor) throws CoreException { + monitor.beginTask(Messages.ModulaEditor_GrayingMarkers, builderMarkers[0].length); + for (IMarker im : builderMarkers[0]) { + int moffs = im.getAttribute(IMarker.CHAR_START, -1); + if (offsParam <= moffs && moffs < endParam) { + im.setAttribute(XdsMarkerConstants.MARKER_GRAY_STATE, true); + } + monitor.worked(1); + } + monitor.done(); + } + }, markerRule, Messages.ModulaEditor_GrayingMarkers, false); + } + } catch (BadLocationException e) { + LogHelper.logError(e); + } + catch (CoreException e) { + LogHelper.logError(e); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditorTextHover.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditorTextHover.java new file mode 100644 index 0000000..09aee8c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaEditorTextHover.java @@ -0,0 +1,515 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.preference.JFacePreferences; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IInformationControl; +import org.eclipse.jface.text.IInformationControlCreator; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextHover; +import org.eclipse.jface.text.ITextHoverExtension; +import org.eclipse.jface.text.ITextHoverExtension2; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.StyleRange; +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.search.modula.utils.ModulaSearchUtils; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.parser.commons.ast.IAstFrameChild; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.commons.swt.resources.ResourceRegistry; +import com.excelsior.xds.ui.commons.utils.XStyledString; +import com.excelsior.xds.ui.editor.commons.HoverInfoWithText; +import com.excelsior.xds.ui.editor.commons.HoverInformationControl; +import com.excelsior.xds.ui.editor.commons.IHoverInfo; +import com.excelsior.xds.ui.editor.commons.text.EditorTextUtils; +import com.excelsior.xds.ui.editor.internal.modula.hover.ModulaEditorHoverRegistry; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; +import com.excelsior.xds.ui.viewers.ModulaSymbolDescriptions; +import com.excelsior.xds.ui.viewers.ModulaSymbolImages; + +/** + * Standard implementation of class for providing hover information + * for Modula-2/Oberon-2 elements. + */ +public class ModulaEditorTextHover implements ITextHover + , ITextHoverExtension + , ITextHoverExtension2 +{ + private static final int MAX_LINES_FROM_SOURCE_IN_HOVER = 60; + + private final ITextEditor editor; + private final ITextHover defaultHover; + private final Color fDecorationColor; + + private final ResourceRegistry resourceRegistry; + + private final IProject project; // project of the IFile being processed in this editor + + private static List hoverContributors = new ArrayList(); + + private ITextHover lastReturnedHover; + + public ModulaEditorTextHover(ITextEditor editor, ITextHover defaultHover, ResourceRegistry resourceRegistry) { + this.editor = editor; + if (editor != null) { + this.project = CoreEditorUtils.getIProjectFrom(editor.getEditorInput()); + } + else{ + this.project = null; + } + this.defaultHover = defaultHover; + this.fDecorationColor = JFaceResources.getColorRegistry().get(JFacePreferences.DECORATIONS_COLOR); + this.resourceRegistry = resourceRegistry; + + ModulaEditorHoverRegistry.get().contributions().stream() + .forEach(ModulaEditorTextHover::addContributer); + } + + /** + * Register a ITextHover tooltip contributor + * + * @param hoverContributor + */ + private static void addContributer(ITextHover hoverContributor) { + hoverContributors.add(hoverContributor); + } + + /** + * {@inheritDoc} + */ + @Override + public String getHoverInfo(ITextViewer textViewer, IRegion hoverRegion) { + // Check through the contributed hover providers. + for (ITextHover hoverContributer : hoverContributors) { + @SuppressWarnings("deprecation") + String hoverText = hoverContributer.getHoverInfo(textViewer, + hoverRegion); + + if (hoverText != null) { + lastReturnedHover = hoverContributer; + + return hoverText; + } + } + + return String.valueOf(getHoverInfo2(textViewer, hoverRegion)); + } + + /** + * {@inheritDoc} + */ + @Override + public Object getHoverInfo2(ITextViewer textViewer, IRegion hoverRegion) { + // Overridden from ITextHoverExtension2. We try and return the richest + // help available; this + // means trying to call getHoverInfo2() on any contributors, and falling + // back on getHoverInfo(). + lastReturnedHover = null; + + // Check through the contributed hover providers. + for (ITextHover hoverContributer : hoverContributors) { + if (hoverContributer instanceof ITextHoverExtension2) { + Object hoverInfo = ((ITextHoverExtension2) hoverContributer) + .getHoverInfo2(textViewer, hoverRegion); + + if (hoverInfo != null) { + lastReturnedHover = hoverContributer; + return hoverInfo; + } + } else { + @SuppressWarnings("deprecation") + String hoverText = hoverContributer.getHoverInfo(textViewer, + hoverRegion); + + if (hoverText != null) { + lastReturnedHover = hoverContributer; + return hoverText; + } + } + } + + return getModulaDocHover(textViewer, hoverRegion); + } + + private Object getModulaDocHover(ITextViewer textViewer, IRegion hoverRegion) { + PstLeafNode pstLeafNode = ModulaEditorSymbolUtils.getPstLeafNode( + editor, hoverRegion.getOffset() + ); + + if (defaultHover != null && pstLeafNode == null) { + hoverRegion = defaultHover.getHoverRegion(textViewer, hoverRegion.getOffset()); + } + + IHoverInfo hoverInfo = null; + + @SuppressWarnings("deprecation") + String defStr = defaultHover.getHoverInfo(textViewer, hoverRegion); + if (defStr != null) { + XStyledString xss = new XStyledString(resourceRegistry); + xss.append(defStr); + hoverInfo = new HoverInfoWithText(xss, false); + } + + if (pstLeafNode != null) { + if (hoverInfo == null) { + IModulaSymbol symbol = ModulaEditorSymbolUtils.getModulaSymbolExt(textViewer.getDocument(), pstLeafNode); + if (symbol != null) { + IModuleSymbol editedModule = ModulaSymbolUtils.getHostModule(pstLeafNode); + hoverInfo = getSymbolHoverInfo(project, symbol, editedModule, textViewer.getDocument()); + } + } + + if (hoverInfo == null) { + hoverInfo = getPragmaHoverInfo(pstLeafNode, textViewer.getDocument()); + } + + } + + return hoverInfo; + } + + /** + * {@inheritDoc} + */ + @Override + public IRegion getHoverRegion(ITextViewer textViewer, int offset) { + return EditorTextUtils.findWord(textViewer.getDocument(), offset); + } + + /** + * Returns the information which should be presented when a hover popup is shown + * for the specified symbol. + * + * @param p - project of the IFile being processed in the editor for which to compute this hovering information. Can be null for the non-workspace elements. + * @param symbol the symbol which is used to determine the hover display information. + * @param module the currently edited module + * @param document the document this hover info applies to + * + * @return the hover popup display information, or null if none available. + */ + protected IHoverInfo getSymbolHoverInfo(IProject project, IModulaSymbol symbol, IModuleSymbol module + , IDocument document ) + { + if (symbol instanceof IForwardTypeSymbol) { + IModulaSymbol actualTypeSymbol = ((IForwardTypeSymbol)symbol).getActualTypeSymbol(); + if (actualTypeSymbol != null) { + symbol = actualTypeSymbol; + } + } + + IHoverInfo hoverInfo = getSymbolSourceTextHover(project, symbol, module, document); + + if (hoverInfo == null) { + hoverInfo = getSymbolOutlineHover(symbol); + } + + return hoverInfo; + } + + private IDocument getDocumentWithSymbol(IProject project,IModulaSymbol symbol) { + IDocument document = null; + IFile symbolFile = ModulaSymbolUtils.findFileForSymbol(project, symbol); + if (symbolFile != null && !symbolFile.getName().toLowerCase().endsWith(".sym")) { // //$NON-NLS-1$ + document = ModulaSearchUtils.evalNonFileBufferDocument(symbolFile); + if (document == null) { + // not contained in changed editors => get it from file: + document = ModulaSearchUtils.getDocumentForIFile(symbolFile, null); + } + } + return document; + } + + /** + * Creates hover with source text where the symbol is defined if possible + * + * @param symbol the symbol which is used to determine the hover display information. + * @param module the currently edited module + * + * @return the hover popup display information, or null if none available. + */ + protected IHoverInfo getSymbolSourceTextHover(IProject project, IModulaSymbol symbol + , IModuleSymbol module + , IDocument document ) + { + if (!ModulaSymbolUtils.isSymbolFromModule(module, symbol)) { + document = getDocumentWithSymbol(project, symbol); + } + + if (symbol instanceof IProcedureDefinitionSymbol) { + // Try to show procedure body for procedure declarations (in FORWARDs or .def files) + IModulaSymbol decl = ((IProcedureDefinitionSymbol)symbol).getDeclarationSymbol(); + if (decl != null) { + symbol = decl; + if (!ModulaSymbolUtils.isSymbolFromModule(module, symbol)) { + document = getDocumentWithSymbol(project, symbol); + } + } + } + + ITextRegion textRegion = symbol.getDeclarationTextRegion(); + + int nameOffs = -1; // symbol name inside + int nameLen = 0; // hover text + { + ITextRegion nameRegion = symbol.getNameTextRegion(); + if (nameRegion != null && textRegion != null) { + nameOffs = nameRegion.getOffset() - textRegion.getOffset(); + nameLen = nameRegion.getLength(); + } + } + + if ((document != null) && (textRegion != null)) { + int startLine; + try { + startLine = document.getLineOfOffset(textRegion.getOffset()); + int offset = document.getLineOffset(startLine); + int addLen = (textRegion.getOffset() - offset); + int length = textRegion.getLength() + addLen; + nameOffs += addLen; + + String dots = ""; + { // trim text if it is longer than MAX_LINES_FROM_SOURCE_IN_HOVER lines: + int topLine = startLine + MAX_LINES_FROM_SOURCE_IN_HOVER; + if (topLine < document.getNumberOfLines()) { + int topOffs = document.getLineOffset(topLine); + if (topOffs < offset + length) { + length = topOffs - offset; + dots = "\n....."; // //$NON-NLS-1$ + } + } + } + + String text = document.get(offset, length); + + + // Add "VAR ...\r\n" before if need: + { + ModulaTokenType declWord = null; + if (symbol instanceof IVariableSymbol) { + declWord = ModulaTokenTypes.VAR_KEYWORD; + } else if (symbol instanceof ITypeSymbol) { + declWord = ModulaTokenTypes.TYPE_KEYWORD; + } else if (symbol instanceof IConstantSymbol) { + declWord = ModulaTokenTypes.CONST_KEYWORD; + } + + if (declWord != null) { + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(text); + TokenType tok = null; + while (true) { + tok = input.nextToken(); + if (ModulaTokenTypes.EOF == tok) { + break; + } else if (ModulaTokenTypes.WHITE_SPACE == tok + || ModulaTokenTypes.BLOCK_COMMENT == tok + || ModulaTokenTypes.END_OF_LINE_COMMENT == tok) + { + continue; + } else if (declWord == tok) { + declWord = null; // 'VAR' found, don't add it + break; + } + } + } + + if (declWord != null) { + String s = declWord.getDesignator() + "\r\n"; //$NON-NLS-1$ + text = s + text; + nameOffs += s.length(); + } + } + + XStyledString xssHover; + ModulaSyntaxColorer fc = new ModulaSyntaxColorer(resourceRegistry); + if (nameOffs >=0 && nameOffs + nameLen <= text.length() && + symbol.getName().equals(text.substring(nameOffs, nameOffs+nameLen))) + { + // Highlight background under symbol. It is difficult to merge color ranges so do it: + xssHover = fc.color(text.substring(0, nameOffs), null); // "VAR " + + XStyledString xss = fc.color(symbol.getName(), null); // "varName" + List lsr = xss.getStyleRanges(); + if (lsr.size() == 1) { + StyleRange sr = lsr.get(0); + sr.background = new Color(Display.getDefault(), 212, 212, 212); + } + xssHover.append(xss); + + xssHover.append(fc.color(text.substring(nameOffs + nameLen), null)); // " : Type;" + } else { + xssHover = fc.color(text, null); + nameOffs = -1; + } + xssHover.append(dots); + + return new HoverInfoWithText(xssHover, true, nameOffs); + } catch (Exception e) { + LogHelper.logError(e); + } + } + return null; + } + + + /** + * Create hover with symbol type description (as in outline view) + */ + protected IHoverInfo getSymbolOutlineHover(IModulaSymbol symbol) { + Image icon; + String description; + + if (symbol instanceof IModuleAliasSymbol) { + IModuleSymbol moduleSymbol = ((IModuleAliasSymbol)symbol).getReference(); + if (moduleSymbol == null) { + return null; + } + description = " := " + moduleSymbol.getName(); + icon = ModulaSymbolImages.getImage(moduleSymbol); + } else { + description = ModulaSymbolDescriptions.getSymbolDescription(symbol); + icon = ModulaSymbolImages.getImage(symbol); + } + + XStyledString xss = new XStyledString(resourceRegistry); + if (icon != null) { + xss.append(" "); + xss.append(icon); + xss.append(" "); + } + xss.append(symbol.getName(), SWT.NONE); + xss.append(description, fDecorationColor); + xss.append(" "); + return new HoverInfoWithText(xss, false); + } + + + /** + * Check if pstLeafNode is part of pragma structure and create pragma structure hover in this case + */ + protected IHoverInfo getPragmaHoverInfo(PstLeafNode pstLeafNode, IDocument document) { + IHoverInfo hoverInfo = null; + try { + PstNode pragmaStmt = null; + for(PstNode n = pstLeafNode.getParent(); n != null; n = n.getParent()) { + IElementType et = n.getElementType(); + if (ModulaElementTypes.PRAGMA_IF_STATEMENT.equals(et) || + ModulaElementTypes.PRAGMA_ELSIF_STATEMENT.equals(et) || + ModulaElementTypes.PRAGMA_ELSE_STATEMENT.equals(et) || + ModulaElementTypes.PRAGMA_END_STATEMENT.equals(et)) + { + pragmaStmt = n; + break; + } + } + + IAstFrameNode frameNode = null; + + if (pragmaStmt instanceof IAstFrameNode) { + frameNode = (IAstFrameNode)pragmaStmt; + } else if (pragmaStmt instanceof IAstFrameChild) { + frameNode = ((IAstFrameChild)pragmaStmt).getAstFrameNode(); + } + + if (frameNode != null) { + ArrayList alFrame = new ArrayList(frameNode.getFrameNodes()); + Collections.sort(alFrame, new Comparator() { + public int compare(PstNode n1, PstNode n2) { + return n2.getOffset() - n2.getOffset(); + } + }); + + StringBuilder sb = new StringBuilder(); + int lastEnd = -1; + for (PstNode n : alFrame) { + List children = ((PstCompositeNode)n.getParent()).getChildren(); + int offs = -1; + int end = -1; + for (PstNode child : children) { + IElementType et = child.getElementType(); + if (PragmaTokenTypes.PRAGMA_BEGIN.equals(et) && offs<0) { + offs = child.getOffset(); + } else if (PragmaTokenTypes.PRAGMA_END.equals(et) && offs>=0 && end < 0) { + end = child.getOffset() + child.getLength(); + break; + } + } + if (offs >= 0 && end > offs) { + if (offs >= lastEnd) { // to don't make duplicates for IF & THEN in <* IF zz THEN *> + if (sb.length() > 0) { + sb.append("\r\n"); + } + sb.append(document.get(offs, end-offs)); + } + lastEnd = end; + } else { + throw new Exception(); // bad tree - can't make hover + } + } + + if (sb.length() > 0) { + try(ResourceRegistry resourceRegistry = new ResourceRegistry()){ + ModulaSyntaxColorer colorer = new ModulaSyntaxColorer(resourceRegistry); + XStyledString xss = colorer.color(sb.toString()); + hoverInfo = new HoverInfoWithText(xss, true); + } + } + } + } catch (Exception e) {} // hs what may crash on bad tree + + return hoverInfo; + } + + /** + * {@inheritDoc} + */ + @Override + public IInformationControlCreator getHoverControlCreator() { + if (lastReturnedHover instanceof ITextHoverExtension) { + return ((ITextHoverExtension) lastReturnedHover).getHoverControlCreator(); + } else { + return new IInformationControlCreator() { + public IInformationControl createInformationControl(Shell parent) { + return new HoverInformationControl(parent, EditorsUI.getTooltipAffordanceString()); + } + }; + } + } + +} + diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaFastPartitioner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaFastPartitioner.java new file mode 100644 index 0000000..649785d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaFastPartitioner.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.jface.text.rules.FastPartitioner; + +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.editor.modula.scanner.rules.ModulaRuleBasedPartitionScanner; + +public class ModulaFastPartitioner extends FastPartitioner { + + public ModulaFastPartitioner(ModulaRuleBasedPartitionScanner scanner, String[] legalContentTypes) { + super(scanner, legalContentTypes); + } + + private ModulaRuleBasedPartitionScanner getScanner() { + return (ModulaRuleBasedPartitionScanner) fScanner; + } + + public void setModulaAst(ModulaAst ast) { + ModulaRuleBasedPartitionScanner scanner = getScanner(); + scanner.setModulaAst(ast); + } + + public void setShowInactiveCode(boolean isShowInactiveCode) { + ModulaRuleBasedPartitionScanner scanner = getScanner(); + scanner.setShowInactiveCode(isShowInactiveCode); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaInformationProvider.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaInformationProvider.java new file mode 100644 index 0000000..e0055c8 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaInformationProvider.java @@ -0,0 +1,83 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.jface.text.IInformationControl; +import org.eclipse.jface.text.IInformationControlCreator; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextHover; +import org.eclipse.jface.text.ITextHoverExtension2; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.information.IInformationProvider; +import org.eclipse.jface.text.information.IInformationProviderExtension; +import org.eclipse.jface.text.information.IInformationProviderExtension2; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.editors.text.EditorsUI; + +import com.excelsior.xds.ui.editor.commons.HoverInformationControl; + +public class ModulaInformationProvider implements IInformationProvider, IInformationProviderExtension, IInformationProviderExtension2 { + + private ModulaSourceViewerConfiguration svConfig; + private ITextHover hover; + + public ModulaInformationProvider(ModulaSourceViewerConfiguration svConfig) { + this.svConfig = svConfig; + } + + private void createHover(ITextViewer textViewer) { + if (hover == null && textViewer instanceof ISourceViewer) { + hover = svConfig.getTextHover((ISourceViewer)textViewer, IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + } + } + + /* + * @see IInformationProvider#getSubject(ITextViewer, int) + */ + public IRegion getSubject(ITextViewer textViewer, int offset) { + createHover(textViewer); + if (hover != null) { + return hover.getHoverRegion(textViewer, offset); + } + return null; + } + + /** + * @see IInformationProvider#getInformation(ITextViewer, IRegion) + * @deprecated + */ + public String getInformation(ITextViewer textViewer, IRegion subject) { + createHover(textViewer); + if (hover != null) { + String s = hover.getHoverInfo(textViewer, subject); + if (s != null && s.trim().length() > 0) { + return s; + } + } + return null; + } + + /* + * @see org.eclipse.jface.text.information.IInformationProviderExtension#getInformation2(org.eclipse.jface.text.ITextViewer, org.eclipse.jface.text.IRegion) + */ + public Object getInformation2(ITextViewer textViewer, IRegion subject) { + createHover(textViewer); + if (hover instanceof ITextHoverExtension2) { + return ((ITextHoverExtension2)hover).getHoverInfo2(textViewer, subject); + } + return null; + } + + /* + * @see IInformationProviderExtension2#getInformationPresenterControlCreator() + * @since 3.1 + */ + public IInformationControlCreator getInformationPresenterControlCreator() { + return new IInformationControlCreator() { + public IInformationControl createInformationControl(Shell parent) { + HoverInformationControl mic = new HoverInformationControl(parent, EditorsUI.getTooltipAffordanceString()); + IInformationControlCreator creatorWithFocus = mic.getInformationPresenterControlCreator(); + return creatorWithFocus.createInformationControl(parent); + } + }; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaOccurrencesMarker.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaOccurrencesMarker.java new file mode 100644 index 0000000..d6b7f44 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaOccurrencesMarker.java @@ -0,0 +1,370 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.jface.text.Position; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.jface.text.source.IAnnotationModel; +import org.eclipse.jface.text.source.IAnnotationModelExtension; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.swt.custom.CaretEvent; +import org.eclipse.swt.custom.CaretListener; + +import com.excelsior.xds.core.ide.symbol.utils.EntityUtils; +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.core.text.TextPosition; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.utils.AstUtils; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.utils.ModulaAstUtils; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +public class ModulaOccurrencesMarker { + + public static final String OCCURENCE_ANNOTATION_ID = "com.excelsior.xds.ui.editor.occurrenceMarkerAnnotation"; //$NON-NLS-1$ + public static final String WRITE_ANNOTATION_ID = "com.excelsior.xds.ui.editor.writeOccurrenceMarkerAnnotation"; //$NON-NLS-1$ + + public static final String CONSTRUCTION_ANNOTATION_ID = "com.excelsior.xds.ui.editor.constructionMarkerAnnotation"; //$NON-NLS-1$ + + private final static HashSet hsOccurrencesTypes; + private final static HashSet hsConstructionTypes; + private final static HashSet hsAllTypes; + static { + hsOccurrencesTypes = new HashSet(); + hsOccurrencesTypes.add(OCCURENCE_ANNOTATION_ID); + hsOccurrencesTypes.add(WRITE_ANNOTATION_ID); + + hsConstructionTypes = new HashSet(); + hsConstructionTypes.add(CONSTRUCTION_ANNOTATION_ID); + + hsAllTypes = new HashSet(); + hsAllTypes.add(OCCURENCE_ANNOTATION_ID); + hsAllTypes.add(WRITE_ANNOTATION_ID); + hsAllTypes.add(CONSTRUCTION_ANNOTATION_ID); + } + + + final private MarkOccurencesJob markingJob; + private boolean isOccurrenceMarkerOn = true; + private boolean isConstructionMarkerOn = true; + private ISourceViewer viewer; + private SourceCodeTextEditor sourceEditor; + private volatile int caretOffset = -1; + + + private static final int DELAY_BEFORE_PROCESS_ACTIVITY = 200; // wait before process new cursor pos etc. + + public ModulaOccurrencesMarker() { + markingJob = new MarkOccurencesJob(); + + PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.addChangeListener(new IPreferenceChangeListener() { + @Override + public void preferenceChange(PreferenceChangeEvent event) { + if (PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getKey().equals(event.getKey())) { + reReadStore(); + } + } + }); + + PreferenceKeys.PKEY_HIGHLIGHT_CONSTRUCTIONS.addChangeListener(new IPreferenceChangeListener() { + @Override + public void preferenceChange(PreferenceChangeEvent event) { + if (PreferenceKeys.PKEY_HIGHLIGHT_CONSTRUCTIONS.getKey().equals(event.getKey())) { + reReadStore(); + } + } + }); + reReadStore(); + } + + public void setViewer(ISourceViewer viewer, SourceCodeTextEditor sourceEditor) { + if (this.viewer != null) { + LogHelper.logError("ModulaOccurrencesMarker.setViewer() is called more than one time!"); // $//$NON-NLS-1$ + } else { + this.viewer = viewer; + this.sourceEditor = sourceEditor; + viewer.getTextWidget().addCaretListener(new CaretListener() { + @Override + public void caretMoved(CaretEvent event) { + caretOffset = event.caretOffset; + reMark(false); + } + }); + } + } + + private void reReadStore() { + boolean bOcc = PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean(); + boolean bCon = PreferenceKeys.PKEY_HIGHLIGHT_CONSTRUCTIONS.getStoredBoolean(); + if (isOccurrenceMarkerOn != bOcc || isConstructionMarkerOn != bCon) { + isOccurrenceMarkerOn = bOcc; + isConstructionMarkerOn = bCon; + reMark(true); + } + } + + public void reconciled() { + reMark(false); + } + + + private void reMark(boolean force) { + if (sourceEditor != null && sourceEditor.getEditorInput() != null) { + if (isOccurrenceMarkerOn || isConstructionMarkerOn || force) { + markingJob.reMarkRequest(); + } + } + } + + /////------- JOB + + private class MarkOccurencesJob extends Job { + private IModulaSymbol prevMarkedSymbol; + + public MarkOccurencesJob() { + super(Messages.OccurrencesMarker_MarkingOccurrences); + } + + public void reMarkRequest() { + this.schedule(DELAY_BEFORE_PROCESS_ACTIVITY); + } + + public IStatus run(IProgressMonitor monitor) { + try { + if (sourceEditor.isDisposed()) { + return Status.OK_STATUS; + } + if (!isOccurrenceMarkerOn) { + removeAnnotations(hsOccurrencesTypes); + prevMarkedSymbol = null; + } + if (!isConstructionMarkerOn) { + removeAnnotations(hsConstructionTypes); + } + + if (!(isOccurrenceMarkerOn || isConstructionMarkerOn) || (caretOffset < 0)) { + return Status.OK_STATUS; + } + + ModulaAst ast = ModulaAstUtils.getAstIfUpToDate(sourceEditor); + if (ast == null) { + // remove marks and cross fingers for reconcile + removeAnnotations(hsAllTypes); + return Status.OK_STATUS; + } + + IProject iProject = CoreEditorUtils.getIProjectFrom(sourceEditor.getEditorInput()); + + IModulaSymbol symToMark = null; + ArrayList constructionRegions = new ArrayList(); + String frameName = ""; + + if (isOccurrenceMarkerOn) { + /// Try to find symbol to mark its occurrences: + try { + PstNode identNode = ModulaEditorSymbolUtils.getIdentifierPstLeafNode(ast, caretOffset); + if (identNode != null && identNode.getElementType() == ModulaTokenTypes.IDENTIFIER) { + String idTxt = sourceEditor.getDocumentProvider().getDocument(sourceEditor.getEditorInput()).get(identNode.getOffset(), identNode.getLength()); + IModulaSymbol sym = ModulaSymbolUtils.getSymbol(identNode); + if (sym != null && sym.getName().equals(idTxt)) { // tree may be bad + symToMark = sym; + } + } + } catch (Exception e) { + // hz what may crash on bad tree + symToMark = null; + } + if (symToMark != null && symToMark == prevMarkedSymbol) { + return Status.OK_STATUS; // Old markers are valid. Do nothing. + } + prevMarkedSymbol = null; + } + + if (isConstructionMarkerOn) { + // No symbol => try to find construction here: + if (symToMark == null) { + IAstFrameNode fr = ModulaAstUtils.findConstructionNear(ast, caretOffset, null); + if (fr != null) { + for (PstNode n : fr.getFrameNodes()) { + constructionRegions.add(new Region(n.getOffset(), n.getLength())); + } + frameName = fr.getFrameName(); + } + } + } + + Map newAnnotations = null; + if (symToMark != null) { + IModuleSymbol curModule = ast.getModuleSymbol(); + Collection symPositions = getRelatedUsages(iProject, ast, curModule, symToMark); + newAnnotations = createOccurrencesAnnotations(symToMark, symPositions); + prevMarkedSymbol = symToMark; + } else if (!constructionRegions.isEmpty()){ + String annotationTooltip = String.format(Messages.ModulaOccurrencesMarker_StructureOf, frameName); + newAnnotations = createConstructionAnnotations(constructionRegions, annotationTooltip); + } + replaceAnnotations(hsAllTypes, newAnnotations); + + } catch (Exception e) { + e.printStackTrace(); + } + return Status.OK_STATUS; + } + + private void removeAnnotations(Set types) { + replaceAnnotations(types, null); + } + + private void replaceAnnotations(Set types, Map newAnnotations) { + final Annotation[] remove = findExistentAnnotations(types); + final IAnnotationModel model = viewer.getAnnotationModel(); + if (model instanceof IAnnotationModelExtension) { + final IAnnotationModelExtension eModel = (IAnnotationModelExtension) model; + eModel.replaceAnnotations(remove, newAnnotations); + } else if (model != null) { + for (final Annotation annotation : remove) { + model.removeAnnotation(annotation); + } + for (final Annotation annotation : newAnnotations.keySet()) { + model.addAnnotation(annotation, newAnnotations.get(annotation)); + } + } + } + + + private Annotation[] findExistentAnnotations(Set types) { + final IAnnotationModel model = viewer.getAnnotationModel(); + final List annotations = new ArrayList(); + if (model != null) { + final Iterator it = model.getAnnotationIterator(); + while (it.hasNext()) { + final Annotation annotation = (Annotation) it.next(); + String type = annotation.getType(); + if (types.contains(type)) { + annotations.add(annotation); + } + } + } + return annotations.toArray(new Annotation[annotations.size()]); + } + + + private Map createOccurrencesAnnotations(IModulaSymbol symToMark, Collection symPositions) { + final Map map = new HashMap(); + if (symPositions != null && symToMark != null) { + for (TextPosition pos : symPositions) { + String msg = String.format(Messages.OccurrencesMarker_OccurrenceOf, symToMark.getName()); + Annotation annotation = new Annotation(OCCURENCE_ANNOTATION_ID, false, msg); + //TODO: write occurrences when need: + //String.format(Messages.OccurrencesMarker_WriteOccurrencesMarker, symToMark.getName()); + //Annotation annotation = new Annotation(WRITE_ANNOTATION_ID, false, msg); + Position position = new Position(pos.getOffset(), symToMark.getName().length()); + map.put(annotation, position); + } + } + return map; + } + + private Map createConstructionAnnotations(ArrayList regions, String msg) { + final Map map = new HashMap(); + for (Region reg : regions) { + Annotation annotation = new Annotation(CONSTRUCTION_ANNOTATION_ID, false, msg); + Position position = new Position(reg.getOffset(), reg.getLength()); + map.put(annotation, position); + } + return map; + } + + } // class MarkingJob + + + //////////////////////////////////////////////////////////////// + // + // Finding of occurrences of symbol: + // + //////////////////////////////////////////////////////////////// + + /** + * Returns usages (as positions) of given {@code symbol} in the given {@code module} plus some related usage : + *
    + *
  1. For the symbol itself - position of its declaration, if also in the current module
  2. + *
  3. For the {@code IProcedureDefinitionSymbol} - also usages of the related {@code IProcedureDeclarationSymbol}
  4. + *
  5. For the {@code IProcedureDeclarationSymbol}- also usages of forward declaration to this given {@code IProcedureDeclarationSymbol}
  6. + *
+ * @param ast + * + * @param module + * @param symbol + * @return + */ + private static Collection getRelatedUsages(IProject project, ModulaAst ast, final IModuleSymbol module, IModulaSymbol startingSymbol) { + Collection usages = new HashSet(); + + if (module != null && startingSymbol != null) { + Collection symbols = EntityUtils.syncGetRelatedSymbols(project, false, startingSymbol); + for (IModulaSymbol symbol : symbols) { + if (symbol == null) { + continue; + } + if (JavaUtils.isOneOf(symbol, IProcedureDeclarationSymbol.class, IModuleSymbol.class)) { + if (symbol.getPosition() != null && ModulaSymbolUtils.isSymbolFromModule(module, symbol)) { + PstLeafNode identifierNode = ModulaEditorSymbolUtils.getIdentifierPstLeafNode(ast, symbol.getPosition().getOffset()); + List identifierNodes = AstUtils.getIdentifierNodesOfParent(identifierNode); + if (identifierNodes.size() == 2) { + PstNode identifier = identifierNodes.get(identifierNodes.size() - 1); + usages.add(new TextPosition(0, 0, identifier.getOffset())); + } + } + } + + addSymbolUsages(module, symbol, usages); + addSymbolDefinitionPosition(module, symbol, usages); + } + } + + return usages; + } + + private static void addSymbolDefinitionPosition(IModuleSymbol module, IModulaSymbol symbol, Collection usages) { + if (symbol.getPosition() != null && ModulaSymbolUtils.isSymbolFromModule(module, symbol)) { + usages.add(symbol.getPosition()); + } + } + + private static void addSymbolUsages(IModuleSymbol module, IModulaSymbol symbol, Collection usages) { + if (symbol != null) { + Collection symbolUsages = module.getSymbolUsages(symbol); + if (symbolUsages != null) { + usages.addAll(symbolUsages); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaPartitionTokens.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaPartitionTokens.java new file mode 100644 index 0000000..5b5614d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaPartitionTokens.java @@ -0,0 +1,27 @@ +package com.excelsior.xds.ui.editor.modula; + +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +/** + * Tokens returned by Modula-2 partition scanner. + * + * @author lion + */ +public interface ModulaPartitionTokens { + + static final IToken BLOCK_COMMENT_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT); + + static final IToken END_OF_LINE_COMMENT_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_END_OF_LINE_COMMENT); + + static final IToken SINGLE_QUOTE_STRING_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_SINGLE_QUOTE_STRING); + + static final IToken DOUBLE_QUOTE_STRING_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING); + + static final IToken PRAGMA_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_PRAGMA); + + static final IToken DISABLED_CODE = new Token(IModulaPartitions.M2_CONTENT_TYPE_DISABLED_CODE); + + static final IToken DEFAULT_TOKEN = new Token(IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSourceViewerConfiguration.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSourceViewerConfiguration.java new file mode 100644 index 0000000..d2b9b19 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSourceViewerConfiguration.java @@ -0,0 +1,355 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.util.Map; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.text.DefaultIndentLineAutoEditStrategy; +import org.eclipse.jface.text.DefaultInformationControl; +import org.eclipse.jface.text.IAutoEditStrategy; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IInformationControl; +import org.eclipse.jface.text.IInformationControlCreator; +import org.eclipse.jface.text.ITextDoubleClickStrategy; +import org.eclipse.jface.text.ITextHover; +import org.eclipse.jface.text.contentassist.IContentAssistant; +import org.eclipse.jface.text.information.IInformationPresenter; +import org.eclipse.jface.text.information.InformationPresenter; +import org.eclipse.jface.text.presentation.IPresentationReconciler; +import org.eclipse.jface.text.presentation.PresentationReconciler; +import org.eclipse.jface.text.reconciler.IReconciler; +import org.eclipse.jface.text.rules.DefaultDamagerRepairer; +import org.eclipse.jface.text.rules.ITokenScanner; +import org.eclipse.jface.text.source.Annotation; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.AbstractSourceViewerConfiguration; +import com.excelsior.xds.ui.editor.commons.scanner.rules.CommentScanner; +import com.excelsior.xds.ui.editor.commons.scanner.rules.SingleTokenScanner; +import com.excelsior.xds.ui.editor.modula.contentassist2.ModulaAssistProcessor2; +import com.excelsior.xds.ui.editor.modula.format.ModulaTextFormatter; +import com.excelsior.xds.ui.editor.modula.reconciler.ModulaCompositeReconcilingStrategy; +import com.excelsior.xds.ui.editor.modula.reconciler.ModulaReconciler; +import com.excelsior.xds.ui.editor.modula.scanner.jflex.ModulaFlexBasedScanner; +import com.excelsior.xds.ui.editor.modula.scanner.jflex.ModulaPragmaFlexBasedScanner; + +/** + * Configuration for a source viewer which shows a Modula-2 source file. + */ +public class ModulaSourceViewerConfiguration extends AbstractSourceViewerConfiguration +{ + /** The text editor to operate on. */ + private final ITextEditor textEditor; + + /** The Modula-2 code scanner. */ + private ITokenScanner modulaCodeScaner; + + /** The Modula-2 block comment scanner. */ + private ITokenScanner blockCommentScaner; + + /** The Modula-2 single-line comment scanner. */ + private ITokenScanner endOfLineCommentScaner; + + /** The Modula-2 string scanner. */ + private ITokenScanner stringScaner; + + /** The Modula-2 compiler pragma scanner. */ + private ITokenScanner pragmaScaner; + + /** The prefixes to be used by the the prefix text operation by default. */ + private final String[] defaultPrefixes; + + private ModulaContentAssistant contentAssistant; + + private SingleTokenScanner inactiveCodeScaner; + + private TokenManager tokenManager; + + public ModulaSourceViewerConfiguration( TokenManager tokenManager, ITextEditor editor + , IPreferenceStore editorPreferenceStore + , String eolCommentPrefix ) + { + super(editorPreferenceStore); + textEditor = editor; + IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + ModulaTokens.initStylesInStore(store); + ModulaTokens.updateTokensFromStore(store, false); + ModulaTokens.addStoreListener(); + + defaultPrefixes = new String[] {eolCommentPrefix, ""}; //$NON-NLS-1$ + + createScanners(tokenManager); + this.tokenManager = tokenManager; + } + + private void createScanners(TokenManager tokenManager) { + modulaCodeScaner = new ModulaFlexBasedScanner(tokenManager); + + blockCommentScaner = new CommentScanner( tokenManager.createFrom(ModulaTokens.BlockComment.getToken()) + , tokenManager.createFrom(ModulaTokens.TodoTask.getToken()) ); + endOfLineCommentScaner = new CommentScanner( tokenManager.createFrom(ModulaTokens.EndOfLineComment.getToken()) + , tokenManager.createFrom(ModulaTokens.TodoTask.getToken()) ); + stringScaner = new SingleTokenScanner(tokenManager.createFrom(ModulaTokens.String.getToken())); + inactiveCodeScaner = new SingleTokenScanner(tokenManager.createFrom(ModulaTokens.InactiveCode.getToken())); + pragmaScaner = new ModulaPragmaFlexBasedScanner(tokenManager); + } + + @Override + public void refresh() { + /*** + * re-create scanners because simple scanners like {@link SingleTokenScanner} cache reference to the concrete color. + */ + createScanners(tokenManager); + } + + /** + * {@inheritDoc} + */ + @Override + public String getConfiguredDocumentPartitioning(ISourceViewer sourceViewer) { + return IModulaPartitions.M2_PARTITIONING; + } + + /** + * {@inheritDoc} + */ + @Override + public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) { + return IModulaPartitions.ALL_CONFIGURED_CONTENT_TYPES; + } + + /** + * {@inheritDoc} + */ + @Override + public String[] getDefaultPrefixes(ISourceViewer sourceViewer, String contentType) { + return defaultPrefixes; + } + + /** + * {@inheritDoc} + */ + @Override + public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) + { + PresentationReconciler reconciler = new PresentationReconciler(); + reconciler.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); + DefaultDamagerRepairer dr; + + dr = new DefaultDamagerRepairer(getModulaCodeScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + + dr = new DefaultDamagerRepairer(getEndOfLineCommentScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_END_OF_LINE_COMMENT); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_END_OF_LINE_COMMENT); + + dr = new DefaultDamagerRepairer(getBlockCommentScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT); + + dr = new DefaultDamagerRepairer(getStringScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_SINGLE_QUOTE_STRING); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_SINGLE_QUOTE_STRING); + + dr = new DefaultDamagerRepairer(getStringScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_DOUBLE_QUOTE_STRING); + + dr = new DefaultDamagerRepairer(getPragmaScanner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_PRAGMA); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_PRAGMA); + + dr = new DefaultDamagerRepairer(getInactiveCodeScaner()); + reconciler.setDamager(dr, IModulaPartitions.M2_CONTENT_TYPE_DISABLED_CODE); + reconciler.setRepairer(dr, IModulaPartitions.M2_CONTENT_TYPE_DISABLED_CODE); + + return reconciler; + } + + + /** + * Returns the editor in which the configured viewer(s) will reside. + * + * @return the enclosing editor + */ + protected ITextEditor getEditor() { + return textEditor; + } + + + /** + * Returns the Modula-2 source code scanner for this configuration. + * + * @return the Modula-2 source code scanner + */ + protected ITokenScanner getModulaCodeScanner() { + return modulaCodeScaner; + } + + /** + * Returns the Modula-2 block comment scanner for this configuration. + * + * @return the Modula-2 block comment scanner + */ + protected ITokenScanner getBlockCommentScanner() { + return blockCommentScaner; + } + + /** + * Returns the Modula-2 single-line comment scanner for this configuration. + * + * @return the Modula-2 single-line comment scanner + */ + protected ITokenScanner getEndOfLineCommentScanner() { + return endOfLineCommentScaner; + } + + /** + * Returns the Modula-2 string scanner for this configuration. + * + * @return the Modula-2 string scanner + */ + protected ITokenScanner getStringScanner() { + return stringScaner; + } + + /** + * Returns the Modula-2 compiler pragma scanner for this configuration. + * + * @return the Modula-2 compiler pragma scanner + */ + protected ITokenScanner getPragmaScanner() { + return pragmaScaner; + } + + protected SingleTokenScanner getInactiveCodeScaner() { + return inactiveCodeScaner; + } + + /** + * {@inheritDoc} + */ + @Override + public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) { + if (contentAssistant == null) { + contentAssistant = new ModulaContentAssistant(sourceViewer); + contentAssistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer)); + +// configureContentAssistanceProcessorsOld(contentAssistant); + configureContentAssistanceProcessors(contentAssistant); + contentAssistant.setRepeatedInvocationMode(true); + contentAssistant.setAutoActivationDelay(100); + contentAssistant.enableAutoActivation(true); + contentAssistant.enablePrefixCompletion(false); + contentAssistant.enableColoredLabels(true); + contentAssistant.enableAutoInsert(true); + + contentAssistant.setInformationControlCreator(getInformationControlCreator(sourceViewer)); + } + + return contentAssistant; + } + + private static void configureContentAssistanceProcessors(ModulaContentAssistant contentAssistant) { + contentAssistant.setContentAssistProcessor(new ModulaAssistProcessor2(contentAssistant), IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + } + + /** + * {@inheritDoc} + */ + @Override + public ITextHover getTextHover(ISourceViewer sourceViewer, String contentType) { + ITextHover defaultHover = super.getTextHover(sourceViewer, contentType); + return new ModulaEditorTextHover(getEditor(), defaultHover, tokenManager); + } + + /** + * {@inheritDoc} + */ + @Override + protected Map getHyperlinkDetectorTargets(ISourceViewer sourceViewer) { + @SuppressWarnings("unchecked") + Map targets= super.getHyperlinkDetectorTargets(sourceViewer); + targets.put(XdsEditorsPlugin.HYPERLINK_TARGET_MODULA_CODE, textEditor); //$NON-NLS-1$ + return targets; + } + + /** + * {@inheritDoc} + */ + @Override + public IReconciler getReconciler(ISourceViewer sourceViewer) { + final ITextEditor editor = getEditor(); + if (editor != null) { + ModulaCompositeReconcilingStrategy strategy = new ModulaCompositeReconcilingStrategy(sourceViewer, textEditor); + ModulaReconciler reconciler = new ModulaReconciler(textEditor, strategy); + reconciler.setIsAllowedToModifyDocument(false); + reconciler.setDelay(500); +// return super.getReconciler(sourceViewer); + return reconciler; + } + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public int getTabWidth(ISourceViewer sourceViewer) { + return (new ModulaTextFormatter()).getTabSize(); + } + + /** + * {@inheritDoc} + */ + @Override + public IAutoEditStrategy[] getAutoEditStrategies( ISourceViewer sourceViewer + , String contentType ) + { + IAutoEditStrategy strategy = IDocument.DEFAULT_CONTENT_TYPE.equals(contentType) + ? new ModulaAutoEditStrategy() + : new DefaultIndentLineAutoEditStrategy(); + return new IAutoEditStrategy[] { strategy }; + } + + /** + * {@inheritDoc} + */ + @Override + public IInformationPresenter getInformationPresenter(ISourceViewer sourceViewer) { + IInformationControlCreator icc = new IInformationControlCreator() { + public IInformationControl createInformationControl(Shell parent) { + return new DefaultInformationControl(parent, true); + } + }; + InformationPresenter ip = new InformationPresenter(icc); + ModulaInformationProvider mip = new ModulaInformationProvider(this); + ip.setInformationProvider(mip, IModulaPartitions.M2_CONTENT_TYPE_DEFAULT); + return ip; + + } + + @Override + protected boolean isShownInText(Annotation annotation) { + if (ModulaOccurrencesMarker.OCCURENCE_ANNOTATION_ID.equals(annotation.getType()) || + ModulaOccurrencesMarker.WRITE_ANNOTATION_ID.equals(annotation.getType())) + { + return false; + } + return super.isShownInText(annotation); + } + + public ITextEditor getTextEditor() { + return textEditor; + } + + @Override + public ITextDoubleClickStrategy getDoubleClickStrategy( + ISourceViewer sourceViewer, String contentType) { + return new ModulaDoubleClickStrategy(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColorer.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColorer.java new file mode 100644 index 0000000..858d41c --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColorer.java @@ -0,0 +1,139 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.io.IOException; +import java.util.Map; + +import org.eclipse.swt.graphics.Color; +import org.eclipse.swt.graphics.RGB; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenSets; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaKeywordType; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenType; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenTypes; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; +import com.excelsior.xds.ui.commons.swt.resources.ResourceRegistry; +import com.excelsior.xds.ui.commons.utils.XStyledString; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.RgbStyle; +import com.excelsior.xds.ui.tools.colorers.IModulaSyntaxColorer; + +public class ModulaSyntaxColorer implements IModulaSyntaxColorer { + private final ResourceRegistry resourceRegistry; + + public ModulaSyntaxColorer(ResourceRegistry resourceRegistry) { + this.resourceRegistry = resourceRegistry; + } + + public ModulaSyntaxColorer() { + resourceRegistry = new ResourceRegistry(false); + } + + public XStyledString color(String m2text, Map colorConvertationMap) { + XStyledString ssRes = new XStyledString(resourceRegistry); + + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(m2text); + + boolean wasTimes = false; + boolean inPragma = false; + + while (true) { + TokenType token; + try { + token = input.nextToken(); + ModulaTokens cs = ModulaTokens.Default; + ModulaTokens csSetForAll = null; + int tokOffs = input.getTokenOffset(); + int tokLen = input.yylength(); + + if (ModulaTokenTypes.EOF == token) { + break; + } else if (token.getClass().equals(PragmaKeywordType.class)) { + cs = ModulaTokens.PragmaKeyword; + } else if (inPragma) { + cs = ModulaTokens.Pragma; + if (PragmaTokenTypes.PRAGMA_END == token) { + inPragma = false; + } + } else if (token.getClass().equals(PragmaTokenType.class)) { + cs = ModulaTokens.Pragma; + if (PragmaTokenTypes.PRAGMA_BEGIN == token) { + inPragma = true; + } + } else if (ModulaTokenTypes.RPARENTH == token && wasTimes) { + csSetForAll = ModulaTokens.BlockComment; // unexpected "*)" - it all was block comment + } else if (ModulaTokenTypes.GTR == token && wasTimes) { + csSetForAll = ModulaTokens.Pragma; // unexpected "*>" - it all was pragma + } else if (ModulaTokenSets.KEYWORD_SET.contains(token)) { + cs = ModulaTokens.Keyword; + } else if (ModulaTokenTypes.BLOCK_COMMENT == token) { + cs = ModulaTokens.BlockComment; + } else if (ModulaTokenTypes.END_OF_LINE_COMMENT == token) { + cs = ModulaTokens.EndOfLineComment; + } else if (ModulaTokenSets.STRING_LITERAL_SET.contains(token)) { + cs = ModulaTokens.String; + } else if (ModulaTokenSets.LITERAL_SET.contains(token)) { + cs = ModulaTokens.Number; + } else if (ModulaTokenSets.BRACKETS_SET.contains(token)) { + cs = ModulaTokens.Bracket; + } else if (ModulaTokenTypes.IDENTIFIER == token) { + String tokText = m2text.substring(tokOffs, tokOffs + tokLen); + if (IModulaKeywords.PERVASIVE_CONSTANTS.contains(tokText)) { + cs = ModulaTokens.BuiltinConstant; // assume that it is keyword too + } else if (IModulaKeywords.PERVASIVE_IDENTIFIERS.contains(tokText)) { + cs = ModulaTokens.Keyword; // assume that it is keyword too + } else if (IModulaKeywords.SYSTEM_IDENTIFIERS.contains(tokText)) { + cs = ModulaTokens.SystemModuleKeyword; + } + } + + if (csSetForAll != null) { + ssRes = new XStyledString(resourceRegistry); + append(ssRes, m2text.substring(0, tokOffs + tokLen), csSetForAll.getToken(), colorConvertationMap); + } else { + append(ssRes, m2text.substring(tokOffs, tokOffs + tokLen), cs.getToken(), colorConvertationMap); + } + + wasTimes = ModulaTokenTypes.TIMES == token; // '*' + } catch (IOException e) { + LogHelper.logError(e); + } + } + return ssRes; + } + + private void append(XStyledString ss, String text, PersistentTokenDescriptor pt, Map colorConvertationMap) { + if (pt == null) { + ss.append(text); + } else { + if (pt.isDisabled()) { + pt = ModulaTokens.Default.getToken(); + } + + RGB rgb = pt.getRgbWhenEnabled(); + int style = pt.getStyleWhenEnabled(); + + if (colorConvertationMap != null) { + RgbStyle rs = colorConvertationMap.get(pt); + if (rs != null) { + rgb = rs.rgb; + style = rs.style; + } + } + + Color clr = resourceRegistry.createColor(rgb); + ss.append(text, clr, style); + } + } + + + //--- IFastSyntaxColorer: + + @Override + public XStyledString color(String m2text) throws Exception { + return color(m2text, null); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColoringPreferences.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColoringPreferences.java new file mode 100644 index 0000000..3003966 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaSyntaxColoringPreferences.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import org.eclipse.jface.preference.IPreferenceStore; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.commons.utils.XStyledString; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.ITokens; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.RgbStyle; +import com.excelsior.xds.ui.editor.commons.preferences.AbstractSyntaxColoring; +import com.excelsior.xds.ui.editor.commons.preferences.ITokenModification; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class ModulaSyntaxColoringPreferences extends AbstractSyntaxColoring { + public ModulaSyntaxColoringPreferences() { + } + + @Override + public String getLanguageId() { + return "Modula";//$NON-NLS-1$ + } + + @Override + public String getLanguageName() { + return Messages.SyntaxColoringPreferencePage_Modula2; + } + + @Override + public String getTemplateText() { + return getTemplateText("Modula.txt"); //$NON-NLS-1$ + } + + @Override + public ITokens getDefaultToken() { + return ModulaTokens.Default; + } + + @Override + public List getTokens() { + return Arrays.asList(ModulaTokens.values()); + } + + @Override + public XStyledString doColor(TokenManager tokenManager, String text, + Map colorConversion) + throws IOException { + ModulaSyntaxColorer colorer = new ModulaSyntaxColorer(tokenManager); + return colorer.color(text, colorConversion); + } + + @Override + public void save(List tokenModifications) { + IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + doSave(store, ModulaTokens.PREFS_ID, tokenModifications); + ModulaTokens.updateTokensFromStore(store, true); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaTokens.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaTokens.java new file mode 100644 index 0000000..2384f4b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/ModulaTokens.java @@ -0,0 +1,148 @@ +package com.excelsior.xds.ui.editor.modula; + +import java.io.StringReader; +import java.util.ArrayList; + +import org.eclipse.jface.preference.IPreferenceStore; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.swt.SWT; +import org.eclipse.swt.graphics.RGB; +import org.ini4j.Ini; +import org.ini4j.Wini; + +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.ITokens; +import com.excelsior.xds.ui.editor.commons.PersistentTokenDescriptor; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +/** + * Modula-2 tokens for syntax coloring. + * + * NOTE: Names of Modula-2 tokens are used in the resource file "colorPreview_Modula.txt". + * Refactoring actions don't care about this resource file. + * + * The order of tokens' declaration defines the order in which this items will be shown to UI dialogs. + * + * @author lion, fsa + */ +public enum ModulaTokens implements ITokens { + Default (Messages.ModulaTokens_Text, "Text", new RGB(0, 0, 0), SWT.NONE, null), //$NON-NLS-1$ + + Keyword (Messages.ModulaTokens_Keywords, "Keywords", new RGB(0, 0, 0x80), SWT.BOLD, null), //$NON-NLS-1$ + BuiltinConstant (Messages.ModulaTokens_BuiltinConstants, "BuiltinConstants", new RGB(0, 0, 0xff), SWT.NONE, null), //$NON-NLS-1$ + SystemModuleKeyword(Messages.ModulaTokens_SystemModuleKeywords, "SystemModuleKeywords", new RGB(0, 0, 0x80), SWT.BOLD, null), //$NON-NLS-1$ + + Number (Messages.ModulaTokens_Numbers, "Numbers", new RGB(0, 0, 0xff), SWT.NONE, null), //$NON-NLS-1$ + String (Messages.ModulaTokens_Strings, "Strings", new RGB(0, 0, 0xff), SWT.NONE, null), //$NON-NLS-1$ + Bracket (Messages.ModulaTokens_Brackets, "Brackets", new RGB(0, 0, 0 ), SWT.NONE, null), //$NON-NLS-1$ + + // Comments + BlockComment (Messages.ModulaTokens_BlockComments, "BlComments", new RGB(0x00, 0x80, 0x00), SWT.ITALIC, Messages.ModulaTokens_Comments), //$NON-NLS-1$ + EndOfLineComment (Messages.ModulaTokens_EndOfLineComments, "EolComments", new RGB(0x00, 0x80, 0x00), SWT.ITALIC, Messages.ModulaTokens_Comments), //$NON-NLS-1$ + TodoTask (Messages.ModulaTokens_TodoTask, "TodoTask", new RGB(0x00, 0x80, 0x00), SWT.ITALIC+SWT.BOLD, Messages.ModulaTokens_Comments), //$NON-NLS-1$ + + // Compiler pragmas + Pragma (Messages.ModulaTokens_Pragmas, "Pragmas", new RGB(0x80, 0x00, 0x80), SWT.ITALIC, Messages.ModulaTokens_CompilerPragmas), //$NON-NLS-1$ + PragmaKeyword (Messages.ModulaTokens_PragmaKeywords, "PragmaKeywords", new RGB(0x80, 0x00, 0x80), SWT.ITALIC+SWT.BOLD, Messages.ModulaTokens_CompilerPragmas), //$NON-NLS-1$ + InactiveCode (Messages.ModulaTokens_InactiveCode, "InactiveCode", new RGB(0xC0, 0xC0, 0xC0), SWT.NONE, Messages.ModulaTokens_CompilerPragmas), //$NON-NLS-1$ + ; + + + + // Note: PREFS_ID used in "org.eclipse.ui.preferenceTransfer" extension point: + public static final String PREFS_ID = XdsEditorsPlugin.PLUGIN_ID + ".ModulaTokens.Preferencies"; //$NON-NLS-1$ + private final PersistentTokenDescriptor token; + private final String categoryName; // subroot in color settings dialog or null to show in root + + + + ModulaTokens (String name, String id, RGB rgb, int style, String category) { + ITokens it = (id.equals("Text")) ? null : this; //$NON-NLS-1$ + token = new PersistentTokenDescriptor(name, "ModulaToken." + id, rgb, style, it); //$NON-NLS-1$ + categoryName = category; + } + + + /** + * Initializes highlight colors/styles in store if they are absent in it. + * + * @param store the preference store + */ + public static void initStylesInStore(IPreferenceStore store) { + if (!store.contains(PREFS_ID)) { + ArrayList al = new ArrayList(); + for (ModulaTokens modulaToken : ModulaTokens.values()) { + modulaToken.token.preferenciesToIni(al); + } + StringBuilder sb = new StringBuilder(); + for (String s : al) { + sb.append(s).append("\n"); //$NON-NLS-1$ + } + store.setValue(PREFS_ID, sb.toString()); + } + } + + /** + * Sets highlight colors/styles from store, + * refresh editors if refreshEditors is set. + * + * @param store the preference store + * @param refreshEditors + */ + public static void updateTokensFromStore(IPreferenceStore store, boolean refreshEditors) { + String strs = ""; //$NON-NLS-1$ + if (store.contains(PREFS_ID)) { + strs = store.getString(PREFS_ID); + } + + try { + Ini ini = new Wini(new StringReader(strs)); + for (ModulaTokens modulaToken : ModulaTokens.values()) { + modulaToken.token.preferenciesFromIni(ini); + } + + if (refreshEditors) { + SourceCodeTextEditor.refreshEditorsConfiguration(ModulaEditor.class); + } + } catch (Exception e) { + LogHelper.logError(e); + } + } + + /** + * + */ + public static void addStoreListener() { + final IPreferenceStore store = XdsEditorsPlugin.getDefault().getPreferenceStore(); + store.addPropertyChangeListener(new IPropertyChangeListener() { + // used when settings are imported via "org.eclipse.ui.preferenceTransfer" extension point + @Override + public void propertyChange(PropertyChangeEvent event) { + String prop = event.getProperty(); + if (PREFS_ID.equals(prop)) { + updateTokensFromStore(store, true); + } + } + }); + } + + + @Override + public PersistentTokenDescriptor getDefaultColoring() { + return Default.token; + } + + + @Override + public PersistentTokenDescriptor getToken() { + return token; + } + + @Override + public String getCategoryName() { + return categoryName; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/DeclarationsSearchGroup.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/DeclarationsSearchGroup.java new file mode 100644 index 0000000..951e0d9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/DeclarationsSearchGroup.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.search.ui.IContextMenuConstants; +import org.eclipse.ui.actions.ActionGroup; +import org.eclipse.ui.texteditor.ITextEditorActionConstants; + +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.IModulaEditorActionDefinitionIds; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class DeclarationsSearchGroup extends ActionGroup { + + private ModulaEditor editor; + + private FindAction findDeclarationsAction; + private FindAction findDeclarationsProjectAction; + + /** + * @param editor + */ + public DeclarationsSearchGroup(ModulaEditor editor) { + this.editor = editor; + + findDeclarationsAction= new FindDeclarationsProjectAction(editor); + findDeclarationsAction.setActionDefinitionId(IModulaEditorActionDefinitionIds.FIND_DECL); + if (editor != null){ + editor.setAction(IModulaEditorActionDefinitionIds.FIND_DECL, findDeclarationsAction); + } + findDeclarationsProjectAction = new FindDeclarationsProjectAction(editor); + } + /* + * Method declared on ActionGroup. + */ + @Override + public void fillContextMenu(IMenuManager menu) { + super.fillContextMenu(menu); + + IMenuManager incomingMenu = menu; + + IMenuManager declarationsMenu = new MenuManager(Messages.DeclarationsSearchGroup_Declarations, IContextMenuConstants.GROUP_SEARCH); + + if (editor != null){ + menu.appendToGroup(ITextEditorActionConstants.GROUP_FIND, declarationsMenu); + } else { + incomingMenu.appendToGroup(IContextMenuConstants.GROUP_SEARCH, declarationsMenu); + } + incomingMenu = declarationsMenu; + + incomingMenu.add(findDeclarationsAction); + incomingMenu.add(findDeclarationsProjectAction); + } + /* + * Overrides method declared in ActionGroup + */ + @Override + public void dispose() { + super.dispose(); + findDeclarationsAction = null; + findDeclarationsProjectAction = null; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindAction.java new file mode 100644 index 0000000..81b02c3 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindAction.java @@ -0,0 +1,58 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.core.resources.IResource; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.search.ui.NewSearchUI; +import org.eclipse.search.ui.text.FileTextSearchScope; + +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; +import com.excelsior.xds.ui.search.modula.ModulaSearchQuery; + +public abstract class FindAction extends SelectionParseAction { + + protected FindAction(ModulaEditor editor, String text, String tooltipText) { + super(editor); + setText(text); + setToolTipText(tooltipText); + } + + @Override + public void run() { + ITextSelection textSelection = getSelectedStringFromEditor(); + if (textSelection != null) { + ISourceViewer textViewer = (ISourceViewer)editor.getAdapter(ISourceViewer.class); + + PstLeafNode pstLeafNode = ModulaEditorSymbolUtils.getIdentifierPstLeafNode(editor, textSelection.getOffset()); + if (pstLeafNode != null) { + IModulaSymbol symbol = ModulaEditorSymbolUtils.getModulaSymbol( + textViewer.getDocument(), pstLeafNode + ); + IResource searchScope = getSearchScope(); + if (symbol != null && searchScope != null) { + NewSearchUI.activateSearchResultView(); + NewSearchUI.runQueryInBackground(new ModulaSearchQuery(getInput(symbol, searchScope))); + } + } + } + } + + private ModulaSearchInput getInput(IModulaSymbol symbol, IResource searchScope) { + ModulaSearchInput m2SearchInput = new ModulaSearchInput(searchScope.getProject()); + m2SearchInput.setCaseSensitive(false); + m2SearchInput.setLimitTo(getLimitTo()); + m2SearchInput.setSearchFor(ModulaSearchInput.SEARCH_FOR_ANY_ELEMENT); + m2SearchInput.setSearchInFlags(ModulaSearchInput.SEARCH_IN_ALL_SOURCES); + m2SearchInput.setSearchScope(FileTextSearchScope.newSearchScope(new IResource[]{searchScope}, new String[]{"*"}, false)); //$NON-NLS-1$ + m2SearchInput.setSymbolToSearchFor(symbol); + m2SearchInput.setSearchString(symbol.getName()); + return m2SearchInput; + } + + protected abstract int getLimitTo(); + protected abstract IResource getSearchScope(); +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsAction.java new file mode 100644 index 0000000..d7f70ba --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsAction.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class FindDeclarationsAction extends FindAction { + + public FindDeclarationsAction(ModulaEditor editor) { + super(editor, Messages.FindDeclarationsAction_Workspace, Messages.FindDeclarationsAction_SearchDeclsOfSelInWorkspace); + } + + @Override + protected int getLimitTo() { + return ModulaSearchInput.LIMIT_TO_DECLARATIONS; + } + + @Override + protected IResource getSearchScope() { + return ResourceUtils.getWorkspaceRoot(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsProjectAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsProjectAction.java new file mode 100644 index 0000000..ecf8754 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindDeclarationsProjectAction.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class FindDeclarationsProjectAction extends FindAction { + + public FindDeclarationsProjectAction(ModulaEditor editor) { + super(editor, Messages.FindDeclarationsProjectAction_Project, Messages.FindDeclarationsProjectAction_SearchDeclsOfSelInPrj); + } + + @Override + protected int getLimitTo() { + return ModulaSearchInput.LIMIT_TO_DECLARATIONS; + } + + @Override + protected IResource getSearchScope() { + IFile activeFile = WorkbenchUtils.getActiveFile(); + if (activeFile != null) { + return activeFile.getProject(); + } + return null; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesAction.java new file mode 100644 index 0000000..643a1c7 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesAction.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class FindReferencesAction extends FindAction { + + public FindReferencesAction(ModulaEditor editor) { + super(editor, Messages.FindReferencesAction_Workspace, Messages.FindReferencesAction_SearchRefsToSelInWorkspace); + } + + @Override + protected int getLimitTo() { + return ModulaSearchInput.LIMIT_TO_USAGES; + } + + @Override + protected IResource getSearchScope() { + return ResourceUtils.getWorkspaceRoot(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesProjectAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesProjectAction.java new file mode 100644 index 0000000..32c08d2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/FindReferencesProjectAction.java @@ -0,0 +1,30 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; + +import com.excelsior.xds.core.search.modula.ModulaSearchInput; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class FindReferencesProjectAction extends FindAction { + + public FindReferencesProjectAction(ModulaEditor editor) { + super(editor, Messages.FindReferencesProjectAction_Project, Messages.FindReferencesProjectAction_SearchRefsToSelInPrj); + } + + @Override + protected int getLimitTo() { + return ModulaSearchInput.LIMIT_TO_USAGES; + } + + @Override + protected IResource getSearchScope() { + IFile activeFile = WorkbenchUtils.getActiveFile(); + if (activeFile != null) { + return activeFile.getProject(); + } + return null; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenDeclarationsAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenDeclarationsAction.java new file mode 100644 index 0000000..29fbe85 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenDeclarationsAction.java @@ -0,0 +1,42 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.hyperlink.IHyperlink; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.jface.viewers.ISelection; + +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.hyperlink.ModulaDeclarationHyperlinkDetector; + +public class OpenDeclarationsAction extends Action +{ + public static final String ID = "com.excelsior.xds.ui.editor.actions.modula.OpenDeclaration"; //$NON-NLS-1$ + + private ModulaEditor modulaEditor; + + public OpenDeclarationsAction(ModulaEditor modulaEditor) { + this.modulaEditor = modulaEditor; + setText(Messages.OpenDeclarations_label); + setToolTipText(Messages.OpenDeclarations_tooltip); + setDescription(Messages.OpenDeclarations_description); + } + + @Override + public void run() { + ISelection selection = modulaEditor.getSelectionProvider().getSelection(); + if (selection instanceof ITextSelection) { + ITextSelection textSelection = (ITextSelection)selection; + ModulaDeclarationHyperlinkDetector hld = new ModulaDeclarationHyperlinkDetector(); + hld.setContext(modulaEditor); + ISourceViewer viewer = (ISourceViewer)modulaEditor.getAdapter(ISourceViewer.class); + IHyperlink[] links = hld.detectHyperlinks(viewer, new Region(textSelection.getOffset(), 0), false); + if (links != null && links.length > 0) { + links[0].open(); + } + } + super.run(); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenViewActionGroup.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenViewActionGroup.java new file mode 100644 index 0000000..0d702e5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/OpenViewActionGroup.java @@ -0,0 +1,34 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.jface.action.Action; +import org.eclipse.ui.IActionBars; +import org.eclipse.ui.actions.ActionGroup; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.ui.editor.modula.IModulaEditorActionDefinitionIds; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class OpenViewActionGroup extends ActionGroup +{ + private Action openDeclarationAction; + + public OpenViewActionGroup(ITextEditor part) { + if (part instanceof ModulaEditor) { + openDeclarationAction = new OpenDeclarationsAction((ModulaEditor) part); + openDeclarationAction.setActionDefinitionId(IModulaEditorActionDefinitionIds.OPEN_DECL); + part.setAction(OpenDeclarationsAction.ID, openDeclarationAction); //$NON-NLS-1$ + } + } + + @Override + public void fillActionBars(IActionBars actionBar) { + super.fillActionBars(actionBar); + setGlobalActionHandlers(actionBar); + } + + private void setGlobalActionHandlers(IActionBars actionBars) { + if (openDeclarationAction != null) { + actionBars.setGlobalActionHandler(OpenDeclarationsAction.ID, openDeclarationAction); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/ReferencesSearchGroup.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/ReferencesSearchGroup.java new file mode 100644 index 0000000..e36443f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/ReferencesSearchGroup.java @@ -0,0 +1,63 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.search.ui.IContextMenuConstants; +import org.eclipse.ui.actions.ActionGroup; +import org.eclipse.ui.texteditor.ITextEditorActionConstants; + +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.IModulaEditorActionDefinitionIds; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class ReferencesSearchGroup extends ActionGroup { + + private ModulaEditor editor; + + private FindAction findReferencesAction; + private FindAction findReferencesProjectAction; + + /** + * @param editor + */ + public ReferencesSearchGroup(ModulaEditor editor) { + this.editor = editor; + + findReferencesAction = new FindReferencesProjectAction(editor); + findReferencesAction.setActionDefinitionId(IModulaEditorActionDefinitionIds.FIND_REFS); + if (editor != null){ + editor.setAction(IModulaEditorActionDefinitionIds.FIND_REFS, findReferencesAction); + } + findReferencesProjectAction = new FindReferencesProjectAction(editor); + } + /* + * Method declared on ActionGroup. + */ + @Override + public void fillContextMenu(IMenuManager menu) { + super.fillContextMenu(menu); + + IMenuManager incomingMenu = menu; + + IMenuManager declarationsMenu = new MenuManager(Messages.ReferencesSearchGroup_References, IContextMenuConstants.GROUP_SEARCH); + + if (editor != null){ + menu.appendToGroup(ITextEditorActionConstants.GROUP_FIND, declarationsMenu); + } else { + incomingMenu.appendToGroup(IContextMenuConstants.GROUP_SEARCH, declarationsMenu); + } + incomingMenu = declarationsMenu; + + incomingMenu.add(findReferencesAction); + incomingMenu.add(findReferencesProjectAction); + } + /* + * Overrides method declared in ActionGroup + */ + @Override + public void dispose() { + super.dispose(); + findReferencesAction = null; + findReferencesProjectAction = null; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/SelectionParseAction.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/SelectionParseAction.java new file mode 100644 index 0000000..f4806b7 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/actions/SelectionParseAction.java @@ -0,0 +1,50 @@ +package com.excelsior.xds.ui.editor.modula.actions; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.ui.IWorkbenchSite; + +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +public class SelectionParseAction extends Action { + + protected IWorkbenchSite site; + protected ModulaEditor editor; + + public SelectionParseAction() { + super(); + } + + public SelectionParseAction(ModulaEditor editor) { + super(); + this.editor = editor; + site = editor.getSite(); + } + + public SelectionParseAction(IWorkbenchSite site) { + super(); + this.site = site; + } + + public IWorkbenchSite getSite() { + return site; + } + + protected ISelection getSelection() { + ISelection sel = null; + if (site != null && site.getSelectionProvider() != null) { + sel = site.getSelectionProvider().getSelection(); + } + + return sel; + } + + protected ITextSelection getSelectedStringFromEditor() { + ISelection selection = getSelection(); + if (!(selection instanceof ITextSelection)) + return null; + + return (ITextSelection) selection; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/AddBlockCommentHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/AddBlockCommentHandler.java new file mode 100644 index 0000000..a3df9b2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/AddBlockCommentHandler.java @@ -0,0 +1,148 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import java.util.ArrayList; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.DocumentRewriteSession; +import org.eclipse.jface.text.DocumentRewriteSessionType; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentExtension4; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.TextSelection; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.text.edits.MultiTextEdit; +import org.eclipse.text.edits.ReplaceEdit; +import org.eclipse.text.edits.TextEdit; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.ITextEditorExtension; +import org.eclipse.ui.texteditor.ITextEditorExtension2; + +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +/** + * A command handler to enclose the selection with a block comment. + */ +public class AddBlockCommentHandler extends AbstractHandler implements IHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + IDocument doc = WorkbenchUtils.getActiveDocument(); + IEditorInput input = WorkbenchUtils.getActiveInput(); + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + + boolean isTextOperationAllowed = (selection != null) && (doc != null) + && (input != null) && (editor != null) + && (editor instanceof ModulaEditor); + + if (isTextOperationAllowed) { + ITextEditor iTextEditor = (ITextEditor)editor; + final ITextOperationTarget operationTarget = (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); + String commentPrefix = ((SourceCodeTextEditor)editor).getEOLCommentPrefix(); + isTextOperationAllowed = (operationTarget != null) + && (operationTarget instanceof TextViewer) + && (validateEditorInputState(iTextEditor)) + && (commentPrefix != null); + + if ((isTextOperationAllowed)) { + int startLine = selection.getStartLine(); + int endLine = selection.getEndLine(); + int selOffset = selection.getOffset(); + int selLen = selection.getLength(); + int realEndLine = doc.getLineOfOffset(selOffset + selLen); // for selection end at pos=0 (endLine is line before here) + + // Are cursor and anchor at 0 positions? + boolean is0pos = false; + if (doc.getLineOffset(startLine) == selOffset) { + if ((doc.getLineOffset(endLine) + doc.getLineLength(endLine) == selOffset + selLen)) { + is0pos = true; + } + } + + + ArrayList edits = null; + int offsAfter[] = {0}; + if (is0pos || selLen == 0) { + edits = commentWholeLines(startLine, (selLen == 0) ? startLine : endLine, realEndLine, doc, offsAfter); + } else { + edits = commentRange(selOffset, selLen, "(*", "*)", offsAfter); //$NON-NLS-1$ //$NON-NLS-2$ + } + + if (edits != null && !edits.isEmpty()) { + DocumentRewriteSession drws = null; + try { + if (doc instanceof IDocumentExtension4) { + drws = ((IDocumentExtension4)doc).startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED); + } + MultiTextEdit edit= new MultiTextEdit(0, doc.getLength()); + edit.addChildren((TextEdit[]) edits.toArray(new TextEdit[edits.size()])); + edit.apply(doc, TextEdit.CREATE_UNDO); + iTextEditor.getSelectionProvider().setSelection(new TextSelection(offsAfter[0], 0)); + } + finally { + if (doc instanceof IDocumentExtension4 && drws != null) { + ((IDocumentExtension4)doc).stopRewriteSession(drws); + } + } + + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + protected boolean validateEditorInputState(ITextEditor editor) { + if (editor instanceof ITextEditorExtension2) + return ((ITextEditorExtension2) editor).validateEditorInputState(); + else if (editor instanceof ITextEditorExtension) + return !((ITextEditorExtension) editor).isEditorInputReadOnly(); + else if (editor != null) + return editor.isEditable(); + else + return false; + } + + private ArrayList commentRange(int offset, int length, String openStr, String closeStr, int offsAfter[]) { + //System.out.println("commentRange " + offset + " "+ length); + ArrayList edits = new ArrayList(); + + edits.add(new ReplaceEdit(offset, 0, openStr)); + edits.add(new ReplaceEdit(offset + length, 0, closeStr)); + offsAfter[0] = offset + openStr.length() + length + closeStr.length(); + return edits; + } + + private ArrayList commentWholeLines(int startLine, int endLine, int realEndLine, IDocument doc, int offsAfter[]) throws BadLocationException { + //System.out.println("commentWholeLines " + startLine + " " + endLine); + int beg = doc.getLineOffset(startLine); + int end = doc.getLineOffset(endLine) + doc.getLineInformation(endLine).getLength(); + + String crlf = doc.getLineDelimiter(endLine); + if (crlf == null) crlf = ""; //$NON-NLS-1$ + + boolean isSingleLine = (startLine == realEndLine); + String openStr = isSingleLine ? "(*" : "(*" + crlf; //$NON-NLS-1$ //$NON-NLS-2$ + String closeStr = isSingleLine ? " *)" : crlf+"*)"; //$NON-NLS-1$ //$NON-NLS-2$ + ArrayList edits = commentRange(beg, end-beg, openStr, closeStr, offsAfter); + offsAfter[0] += crlf.length(); + return edits; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/FormatModulaTextHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/FormatModulaTextHandler.java new file mode 100644 index 0000000..4eff677 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/FormatModulaTextHandler.java @@ -0,0 +1,24 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; + +import com.excelsior.xds.ui.editor.modula.format.ModulaTextFormatter; + +/** + * A command handler to format a Modula-2 source code in the active editor. + */ +public class FormatModulaTextHandler extends AbstractHandler implements IHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + (new ModulaTextFormatter()).doFormat(); + return null; + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/IndentModulaTextHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/IndentModulaTextHandler.java new file mode 100644 index 0000000..fd0bb17 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/IndentModulaTextHandler.java @@ -0,0 +1,20 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +import com.excelsior.xds.ui.editor.modula.format.ModulaTextFormatter; + +public class IndentModulaTextHandler extends AbstractHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + (new ModulaTextFormatter()).doIndent(); + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ModulaContextHelpHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ModulaContextHelpHandler.java new file mode 100644 index 0000000..e0ff697 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ModulaContextHelpHandler.java @@ -0,0 +1,73 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.ui.PlatformUI; + +import com.excelsior.xds.ui.commons.utils.SelectionUtils; +import com.excelsior.xds.ui.commons.utils.WordAndRegion; +import com.excelsior.xds.ui.editor.modula.IModulaKeywords; + +/** + * A command handler to display help for Modula-2 keywords and pervasive identifier. + */ +public class ModulaContextHelpHandler extends AbstractHandler implements IHandler +{ + public static final String M2_HELP_PLUGIN = "com.excelsior.xds.help.modula2"; //$NON-NLS-1$ + + /** + * Calls the help support system to display the context help of given + * Modual-2 pervasive identifier. + *

+ * May only be called from a UI thread. + *

+ * + * @param identifier + * the Modula-2 pervasive identifier to display + */ + private static void displayModulaKeywordHelp(String word) { + PlatformUI.getWorkbench().getHelpSystem().displayHelp( + M2_HELP_PLUGIN + ".keyword_" + word //$NON-NLS-1$ + ); + } + + /** + * Calls the help support system to display the context help of given + * Modual-2 pervasive identifier. + *

+ * May only be called from a UI thread. + *

+ * + * @param identifier + * the Modula-2 pervasive identifier to display + */ + private static void displayModulaPervasiveIdHelp(String identifier) { + PlatformUI.getWorkbench().getHelpSystem().displayHelp( + M2_HELP_PLUGIN + ".pervasive_identifier_" + identifier //$NON-NLS-1$ + ); + } + + + /* + * @see org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands.ExecutionEvent) + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + WordAndRegion wordUnderCursor = SelectionUtils.getWordUnderCursor(false); + if (wordUnderCursor != null) { + if (IModulaKeywords.KEYWORDS.contains(wordUnderCursor.word)) { + displayModulaKeywordHelp(wordUnderCursor.word); + } + else if (IModulaKeywords.PERVASIVE_IDENTIFIERS.contains(wordUnderCursor.word)) { + displayModulaPervasiveIdHelp(wordUnderCursor.word); + } + else { + PlatformUI.getWorkbench().getHelpSystem().search(wordUnderCursor.word); + } + } + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/OpenCoupledModuleHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/OpenCoupledModuleHandler.java new file mode 100644 index 0000000..6acc85f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/OpenCoupledModuleHandler.java @@ -0,0 +1,87 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; +import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.ide.symbol.utils.EntityUtils; +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.parser.modula.symbol.IDefinitionModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IImplemantationModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +/** + * A command handler to open coupled definition module or implementation module + * in the active editor. + */ +public class OpenCoupledModuleHandler extends AbstractHandler implements IHandler +{ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + final ITextEditor editor = (ITextEditor) WorkbenchUtils.getActiveEditor(false); + if (editor instanceof ModulaEditor) { + Job getTargetModuleSymbolJob = new Job("Target module symbol job") { + @Override + protected IStatus run(IProgressMonitor monitor) { + final IModuleSymbol tagretModuleSymbol = getTargetModuleSymbol(editor); + if (tagretModuleSymbol != null) { + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + IProject project = CoreEditorUtils.getIProjectFrom(editor.getEditorInput()); + openModuleInEditor(project, tagretModuleSymbol); + } + }); + } + return Status.OK_STATUS; + } + }; + getTargetModuleSymbolJob.schedule(); + } + return null; + } + + private static IModuleSymbol getTargetModuleSymbol(ITextEditor editor) { + IModuleSymbol tagretModuleSymbol = null; + IXdsElement xdsElement = XdsModelManager.getModel().getXdsElement(editor.getEditorInput()); + if (xdsElement instanceof IXdsCompilationUnit) { + IModuleSymbol activeModuleSymbol = ((IXdsCompilationUnit)xdsElement).getSymbol(); + if (activeModuleSymbol instanceof IDefinitionModuleSymbol) { + tagretModuleSymbol = EntityUtils.syncGetImplementationModuleSymbol(null, false, (IDefinitionModuleSymbol)activeModuleSymbol); + } + else if (activeModuleSymbol instanceof IImplemantationModuleSymbol) { + tagretModuleSymbol = EntityUtils.syncGetDefinitionModuleSymbol(null, false, (IImplemantationModuleSymbol)activeModuleSymbol); + } + } + return tagretModuleSymbol; + } + + private static void openModuleInEditor (IProject project, IModuleSymbol moduleSymbol) { + IFile moduleFile = ModulaSymbolUtils.findFirstFileForSymbol(project, moduleSymbol); + if (moduleFile != null) { + try { + CoreEditorUtils.openInEditor(moduleFile, true); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/QuickOutlineHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/QuickOutlineHandler.java new file mode 100644 index 0000000..bb882dc --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/QuickOutlineHandler.java @@ -0,0 +1,26 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; + +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.outline.ModulaQuickOutlineDialog; + +/** + * A command handler to open outline pop-up dialog in the active editor. + */ +public class QuickOutlineHandler extends AbstractHandler implements IHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + ModulaQuickOutlineDialog dlg = new ModulaQuickOutlineDialog(WorkbenchUtils.getActivePartShell()); + dlg.open(); + return null; + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RemoveBlockCommentHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RemoveBlockCommentHandler.java new file mode 100644 index 0000000..3ead9e4 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RemoveBlockCommentHandler.java @@ -0,0 +1,200 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import java.util.ArrayList; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.DocumentRewriteSession; +import org.eclipse.jface.text.DocumentRewriteSessionType; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentExtension4; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.ITypedRegion; +import org.eclipse.jface.text.TextSelection; +import org.eclipse.jface.text.TextUtilities; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.text.edits.MultiTextEdit; +import org.eclipse.text.edits.ReplaceEdit; +import org.eclipse.text.edits.TextEdit; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.ITextEditorExtension; +import org.eclipse.ui.texteditor.ITextEditorExtension2; + +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; + +/** + * A command handler to remove the block comment enclosing the selection. + */ +public class RemoveBlockCommentHandler extends AbstractHandler implements IHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + IDocument doc = WorkbenchUtils.getActiveDocument(); + IEditorInput input = WorkbenchUtils.getActiveInput(); + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + + boolean isTextOperationAllowed = (selection != null) && (doc != null) + && (input != null) && (editor != null) + && (editor instanceof ModulaEditor); + + if (isTextOperationAllowed) { + ITextEditor iTextEditor = (ITextEditor)editor; + final ITextOperationTarget operationTarget = (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); + String commentPrefix = ((SourceCodeTextEditor)editor).getEOLCommentPrefix(); + isTextOperationAllowed = (operationTarget != null) + && (operationTarget instanceof TextViewer) + && (validateEditorInputState(iTextEditor)) + && (commentPrefix != null); + + if ((isTextOperationAllowed)) { + int pos = selection.getOffset(); + + ITypedRegion partition = TextUtilities.getPartition(doc, IModulaPartitions.M2_PARTITIONING, pos, false); + if (!partition.getType().equals(IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT)) { + if (pos > 1) { + // is cursor is exactly after "(* ... *)" ? + partition = TextUtilities.getPartition(doc, IModulaPartitions.M2_PARTITIONING, pos-2, false); + } + } + + if (!partition.getType().equals(IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT)) { + // Search next (**) comment near cursor and uncomment it. Test 2 next lines. + partition = searchCommentStart(doc, pos, 0); + if (partition == null) { + partition = searchCommentStart(doc, pos, 1); + } + } + + ArrayList edits = new ArrayList(); + int offsAfter = 0; + + if (partition != null) { + // Uncomment this partition + int offs = partition.getOffset(); + int len = partition.getLength(); + if (len >= 4 && // check it for diff case.. + doc.get(offs, 2).equals("(*") && + doc.get(offs+len-2, 2).equals("*)")) + { + // CRLF-s lengths when comment is "(*" .... "*)" + // in this case it will be removed with the comment: + int crlf1 = 0; + int crlf2 = 0; + { + int lin1 = doc.getLineOfOffset(offs); + int lin2 = doc.getLineOfOffset(offs + len - 1); + if (doc.getLineInformation(lin1).getLength() == 2 && + doc.getLineInformation(lin2).getLength() == 2) + { // lines are exactly "(*" and "*)" + String s = doc.getLineDelimiter(lin1); + crlf1 = s != null ? s.length() : 0; + + if (lin2 > lin1 + 1) { + s = doc.getLineDelimiter(lin2-1); + crlf2 = s != null ? s.length() : 0; + } + } + } + + edits.add(new ReplaceEdit(offs, 2 + crlf1, "")); + edits.add(new ReplaceEdit(offs+len-2 - crlf2, 2 + crlf2, "")); + offsAfter = offs + len - 4 - crlf1 - crlf2; + + // if offsAfter is on the end of line - jump to beginning of the next line: + boolean eol = true; + int lnum = doc.getLineOfOffset(offs + len - 1); + IRegion reg = doc.getLineInformation(lnum); + String line = doc.get(reg.getOffset(), reg.getLength()); + line = line.substring(offs+len - reg.getOffset()); // line tail after "*)" + for (char ch : line.toCharArray()) { + if (ch != ' ' && ch != '\t') { + eol = false; + break; + } + + } + if (eol) { + String crlf = doc.getLineDelimiter(lnum); + if (crlf != null) { + offsAfter += line.length() + crlf.length(); + } + } + } + } + + if (!edits.isEmpty()) { + DocumentRewriteSession drws = null; + try { + if (doc instanceof IDocumentExtension4) { + drws = ((IDocumentExtension4)doc).startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED); + } + MultiTextEdit edit= new MultiTextEdit(0, doc.getLength()); + edit.addChildren((TextEdit[]) edits.toArray(new TextEdit[edits.size()])); + edit.apply(doc, TextEdit.CREATE_UNDO); + iTextEditor.getSelectionProvider().setSelection(new TextSelection(offsAfter, 0)); + } + finally { + if (doc instanceof IDocumentExtension4 && drws != null) { + ((IDocumentExtension4)doc).stopRewriteSession(drws); + } + } + + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + protected boolean validateEditorInputState(ITextEditor editor) { + if (editor instanceof ITextEditorExtension2) + return ((ITextEditorExtension2) editor).validateEditorInputState(); + else if (editor instanceof ITextEditorExtension) + return !((ITextEditorExtension) editor).isEditorInputReadOnly(); + else if (editor != null) + return editor.isEditable(); + else + return false; + } + + private ITypedRegion searchCommentStart(IDocument doc, int pos, int addLines) throws BadLocationException { + int lnum = doc.getLineOfOffset(pos); + lnum += addLines; + if (lnum < doc.getNumberOfLines()) { + IRegion reg = doc.getLineInformation(lnum); + String line = doc.get(reg.getOffset(), reg.getLength()); + for (int i = addLines > 0 ? 0 : pos - reg.getOffset(); i < line.length(); ++i) { + if (line.charAt(i) == '(' && + i+1 < line.length() && + line.charAt(i+1) == '*') + { + ITypedRegion partition = TextUtilities.getPartition(doc, IModulaPartitions.M2_PARTITIONING, + reg.getOffset() + i, false); + if (partition.getType().equals(IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT)) { + return partition; + } + } + } + } + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RestoreLastSelectionHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RestoreLastSelectionHandler.java new file mode 100644 index 0000000..acf0e58 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/RestoreLastSelectionHandler.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; + +public class RestoreLastSelectionHandler extends AbstractHandler +{ + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + SelectEnclosingElementHandler.restoreSelection(); + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/SelectEnclosingElementHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/SelectEnclosingElementHandler.java new file mode 100644 index 0000000..799995d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/SelectEnclosingElementHandler.java @@ -0,0 +1,147 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import java.util.Stack; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextOperationTarget; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.TextSelection; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.texteditor.ITextEditor; +import com.excelsior.xds.parser.commons.ast.TokenTypes; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +public class SelectEnclosingElementHandler extends AbstractHandler +{ + private static final Object syncObj = new Object(); + private static final Stack stack = new Stack(); + private static String curEditor = ""; + + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + IDocument doc = WorkbenchUtils.getActiveDocument(); + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + + if ((selection != null) && (doc != null) && (editor instanceof ModulaEditor)) + { + ITextEditor iTextEditor = (ITextEditor)editor; + final ITextOperationTarget operationTarget = (ITextOperationTarget) editor.getAdapter(ITextOperationTarget.class); + + if (operationTarget instanceof TextViewer) { + int initialSelOffs = selection.getOffset(); + int initialSelLen = selection.getLength(); + + // Determine if it is first step: + boolean is1st = false; + if (stack.isEmpty()) { + // stack is empty? + is1st = true; + } else { + // stack top is not match curret selection or other editor window? + SelInfo si = stack.peek(); + if ((si.offs != initialSelOffs) || (si.len != initialSelLen) || !editor.toString().equals(curEditor)) { + stack.clear(); + is1st = true; + } + } + + int selOffs = initialSelOffs; + int selEnd = selOffs + initialSelLen; + PstNode pn = ModulaEditorSymbolUtils.getPstLeafNode(iTextEditor, selOffs); + + if (is1st && pn != null && (selOffs == selEnd) && pn.getElementType().equals(TokenTypes.WHITE_SPACE)) { + // jump from whitespace side to the nearest node: + int eof = doc.getLength(); + if ((selOffs > 0) && (selOffs == pn.getOffset())) { + --selOffs; + --selEnd; + pn = ModulaEditorSymbolUtils.getPstLeafNode(iTextEditor, selOffs); + } else if ((selOffs+1 < eof) && selOffs == pn.getOffset() + pn.getLength()) { + ++selOffs; + ++selEnd; + pn = ModulaEditorSymbolUtils.getPstLeafNode(iTextEditor, selOffs); + } + } + + for (; pn != null; pn = pn.getParent()) { + int offs = pn.getOffset(); + int len = pn.getLength(); + int end = offs + len; + if ((offs < selOffs && end >= selEnd) || (offs <= selOffs && end > selEnd)) { + // Do selection: + iTextEditor.getSelectionProvider().setSelection(new TextSelection(offs, len)); + synchronized (syncObj) { + if (is1st) { + curEditor = iTextEditor.toString(); + stack.push(new SelInfo(initialSelOffs, initialSelLen)); + } + stack.push(new SelInfo(offs, len)); + } + break; + } + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return null; + } + + /** + * Called from RestoreLastSelectionHandler.class + */ + public static void restoreSelection() { + try { + synchronized (syncObj) { + ITextSelection selection = WorkbenchUtils.getActiveTextSelection(); + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + + if ((selection != null) && (editor instanceof ModulaEditor)) + { + // Is it the same editor? + if (editor.toString().equals(curEditor) && !stack.isEmpty()){ + // Is selection preserved since last enclosion selection? + SelInfo si = stack.pop(); + if (selection.getOffset() == si.offs && selection.getLength() == si.len && !stack.isEmpty()) { + si = stack.peek(); + ((ITextEditor)editor).getSelectionProvider().setSelection(new TextSelection(si.offs, si.len)); + if (stack.size() > 1) { + return; + } // else - it was last item, clear all + } + } + } + stack.clear(); + curEditor = ""; + } + } catch (Exception e) { + e.printStackTrace(); + } + + } + + private static class SelInfo { + public int offs; + public int len; + + public SelInfo (int offs, int len) { + this.offs = offs; + this.len = len; + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ToggleMarkOccurrencesHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ToggleMarkOccurrencesHandler.java new file mode 100644 index 0000000..ce0f786 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/ToggleMarkOccurrencesHandler.java @@ -0,0 +1,75 @@ +package com.excelsior.xds.ui.editor.modula.commands; + +import java.util.Map; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.commands.ICommandService; +import org.eclipse.ui.commands.IElementUpdater; +import org.eclipse.ui.menus.UIElement; + +import com.excelsior.xds.core.preferences.PreferenceKeys; + +public class ToggleMarkOccurrencesHandler extends AbstractHandler + implements IPreferenceChangeListener + , IElementUpdater +{ + private static final String COMMAND_ID = "com.excelsior.xds.ui.commands.toggleMarkOccurrences"; //$NON-NLS-1$ + + private volatile boolean isExecuting; + private boolean isTurnedOn; + + public ToggleMarkOccurrencesHandler() { + PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.addChangeListener(this); + isTurnedOn = PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean(); + setToggleState(isTurnedOn); + } + + /** + * {@inheritDoc} + */ + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + try { + isExecuting = true; + boolean on = PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean(); + PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.setStoredBoolean(!on); + } + finally { + isExecuting = false; + } + return null; + } + + + /** + * {@inheritDoc} + */ + @Override + public void updateElement(UIElement element, @SuppressWarnings("rawtypes") Map parameters) { + boolean on = PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean(); + element.setChecked(on); + } + + + private static void setToggleState(boolean toggleState) { + ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); + service.refreshElements(COMMAND_ID, null); + } + + @Override + public void preferenceChange(PreferenceChangeEvent event) { + if (isExecuting) + return; + + if (PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getKey().equals(event.getKey())) { + isTurnedOn = PreferenceKeys.PKEY_HIGHLIGHT_OCCURENCES.getStoredBoolean(); + setToggleState(isTurnedOn); + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/refactoring/RenameRefactoringHandler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/refactoring/RenameRefactoringHandler.java new file mode 100644 index 0000000..f9f86b6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commands/refactoring/RenameRefactoringHandler.java @@ -0,0 +1,93 @@ +package com.excelsior.xds.ui.editor.modula.commands.refactoring; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.commands.IHandler; +import org.eclipse.core.resources.IFile; +import org.eclipse.jface.dialogs.MessageDialog; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation; +import org.eclipse.ui.IEditorPart; +import org.eclipse.ui.handlers.HandlerUtil; + +import com.excelsior.xds.core.refactoring.rename.RenameRefactoring; +import com.excelsior.xds.core.refactoring.rename.RenameRefactoringInfo; +import com.excelsior.xds.core.refactoring.rename.RenameRefactoringProcessor; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.ui.commons.utils.SelectionUtils; +import com.excelsior.xds.ui.commons.utils.WordAndRegion; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; +import com.excelsior.xds.ui.editor.commons.debug.DebugCommons; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; +import com.excelsior.xds.ui.internal.nls.Messages; +import com.excelsior.xds.ui.refactoring.rename.RenameRefactoringWizard; + +public class RenameRefactoringHandler extends AbstractHandler implements + IHandler { + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + RenameRefactoringInfo refactoringInfo = getRenameRefactoringInfo(); + if (refactoringInfo == null) { + MessageDialog.openError(HandlerUtil.getActiveShell(event), Messages.RenameCompilationUnitHandler_InvalidSelection, Messages.RenameCompilationUnitHandler_CannotPerformRefactoringWithCurrentSelection); + return null; + } + + if (DebugCommons.isProjectInDebug(refactoringInfo.getProject())) { + MessageDialog.openError(HandlerUtil.getActiveShell(event), Messages.RenameCompilationUnitHandler_ProjectDebugged, Messages.RenameCompilationUnitHandler_CannotChangeFilesOfDebuggedProject); + return null; + } + + RenameRefactoringProcessor refactoringProcessor = new RenameRefactoringProcessor(refactoringInfo); + RenameRefactoring renameRefactoring = new RenameRefactoring(refactoringProcessor); + RenameRefactoringWizard wizard = new RenameRefactoringWizard(renameRefactoring, refactoringInfo); + + RefactoringWizardOpenOperation op + = new RefactoringWizardOpenOperation( wizard ); + try { + String titleForFailedChecks = ""; //$NON-NLS-1$ + op.run( HandlerUtil.getActiveShell(event), titleForFailedChecks ); + } catch( final InterruptedException irex ) { + } + return null; + } + + private RenameRefactoringInfo getRenameRefactoringInfo() { + ITextSelection textSelection = WorkbenchUtils.getActiveTextSelection(); + if (textSelection == null) { + return null; + } + + IEditorPart editor = WorkbenchUtils.getActiveEditor(false); + if (editor == null) { + return null; + } + ISourceViewer textViewer = (ISourceViewer)editor.getAdapter(ISourceViewer.class); + SourceCodeTextEditor textEditor = null; + if (editor instanceof SourceCodeTextEditor) { + textEditor = (SourceCodeTextEditor) editor; + } + else{ + return null; + } + + PstLeafNode pstLeafNode = ModulaEditorSymbolUtils.getIdentifierPstLeafNode(textEditor, textSelection.getOffset()); + IModulaSymbol symbol = ModulaEditorSymbolUtils.getModulaSymbol( + textViewer.getDocument(), pstLeafNode); + WordAndRegion wordUnderCursor = SelectionUtils.getWordUnderCursor(false); + + if (symbol == null || wordUnderCursor == null) { + return null; + } + + IFile ifileEdited = WorkbenchUtils.getIFileFrom(editor.getEditorInput()); + if (ifileEdited == null) { + return null; + } + + return new RenameRefactoringInfo(ifileEdited, wordUnderCursor.word, symbol); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/InactiveCodeRefresher.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/InactiveCodeRefresher.java new file mode 100644 index 0000000..31f80a1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/InactiveCodeRefresher.java @@ -0,0 +1,83 @@ +package com.excelsior.xds.ui.editor.modula.commons; + +import org.eclipse.jface.text.DocumentEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.swt.widgets.Display; + +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.editor.modula.ModulaFastPartitioner; + +/** + * Refreshes the source viewer representation of the source code using information about the inactive code regions from the AST. + * @author lsa80 + */ +public final class InactiveCodeRefresher { + private final ModulaAst ast; + private final ITextPresentation textPresentation; + private final IDocumentProvider documentProvider; + private final IInactiveCodeRefresherListener listener; + + public InactiveCodeRefresher(ModulaAst ast, ITextPresentation textPresentation, + IDocumentProvider documentProvider) { + this(ast, textPresentation, documentProvider, null); + } + + public InactiveCodeRefresher(ModulaAst ast, ITextPresentation textPresentation, + IDocumentProvider documentProvider, IInactiveCodeRefresherListener listener) { + this.ast = ast; + this.textPresentation = textPresentation; + this.documentProvider = documentProvider; + this.listener = listener; + } + + public void refresh() { + IDocument doc = documentProvider.getDocument(); + if (doc != null) { + final ModulaFastPartitioner partitioner = ModulaEditorCommons.getModulaFastPartitioner(doc); + if (partitioner != null) { + Display.getDefault().asyncExec(new Runnable() { + @Override + public void run() { + if (textPresentation.isDisposed()) { + return; + } + try { + partitioner.setModulaAst(ast); + DocumentEvent documentEvent = new DocumentEvent(doc, 0, doc.getLength(), doc.get()); + partitioner.documentChanged(documentEvent); + textPresentation.invalidateTextPresentation(); + } + finally{ + partitioner.setModulaAst(null); + } + + if (listener != null) { + listener.afterTextPresentationUpdated(); + } + } + }); + } + } + } + + /** + * Interface to source viewer widget + * @author lsa80 + */ + public interface ITextPresentation { + void invalidateTextPresentation(); + boolean isDisposed(); + } + + /** + * Supplier of the {@link IDocument} + * @author lsa80 + */ + public interface IDocumentProvider { + IDocument getDocument(); + } + + public interface IInactiveCodeRefresherListener { + void afterTextPresentationUpdated(); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/ModulaEditorCommons.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/ModulaEditorCommons.java new file mode 100644 index 0000000..35ad6b5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/commons/ModulaEditorCommons.java @@ -0,0 +1,33 @@ +package com.excelsior.xds.ui.editor.modula.commons; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentPartitioner; + +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.ui.editor.commons.PartitionUtils; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.ModulaFastPartitioner; + +public final class ModulaEditorCommons { + public static ModulaFastPartitioner getModulaFastPartitioner(IDocument document) { + IDocumentPartitioner documentPartitioner = PartitionUtils.getPartitioner(document, IModulaPartitions.M2_PARTITIONING); + if (documentPartitioner instanceof ModulaFastPartitioner) { + return (ModulaFastPartitioner) documentPartitioner; + } + return null; + } + + public static void configureModulaFastPartitioner(IDocument document) { + final ModulaFastPartitioner modulaFastPartitioner = ModulaEditorCommons.getModulaFastPartitioner(document); + if (modulaFastPartitioner != null) { + boolean isShowInactiveCode = PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.getStoredBoolean(); + modulaFastPartitioner.setShowInactiveCode(isShowInactiveCode); + } + } + + /** + * Static methods only. + */ + private ModulaEditorCommons(){ + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaContentViewerCreator.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaContentViewerCreator.java new file mode 100644 index 0000000..7085747 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaContentViewerCreator.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.modula.compare; + +import org.eclipse.compare.CompareConfiguration; +import org.eclipse.compare.IViewerCreator; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.swt.widgets.Composite; + +public class ModulaContentViewerCreator implements IViewerCreator { + public ModulaContentViewerCreator() { + } + + @Override + public Viewer createViewer(Composite parent, CompareConfiguration config) { + config.setLeftEditable(false); + config.setRightEditable(false); + return new ModulaMergeViewer(parent, config); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaMergeViewer.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaMergeViewer.java new file mode 100644 index 0000000..378541a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/compare/ModulaMergeViewer.java @@ -0,0 +1,200 @@ +package com.excelsior.xds.ui.editor.modula.compare; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; + +import org.eclipse.compare.CompareConfiguration; +import org.eclipse.compare.IEncodedStreamContentAccessor; +import org.eclipse.compare.IResourceProvider; +import org.eclipse.compare.ITypedElement; +import org.eclipse.compare.contentmergeviewer.TextMergeViewer; +import org.eclipse.compare.internal.IMergeViewerTestAdapter; +import org.eclipse.compare.internal.MergeViewerContentProvider; +import org.eclipse.compare.structuremergeviewer.ICompareInput; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.IPreferenceChangeListener; +import org.eclipse.core.runtime.preferences.IEclipsePreferences.PreferenceChangeEvent; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentPartitioner; +import org.eclipse.jface.text.TextViewer; +import org.eclipse.jface.text.source.SourceViewer; +import org.eclipse.jface.text.source.SourceViewerConfiguration; +import org.eclipse.swt.events.DisposeEvent; +import org.eclipse.swt.events.DisposeListener; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.ui.internal.editors.text.EditorsPlugin; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.exceptions.ExceptionHelper; +import com.excelsior.xds.core.ide.symbol.ParseTask; +import com.excelsior.xds.core.ide.symbol.SymbolModelListenerAdapter; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.preferences.PreferenceKeys; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.commons.symbol.ParsedModuleKey; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.ModulaDocumentSetupParticipant; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.ModulaSourceViewerConfiguration; +import com.excelsior.xds.ui.editor.modula.commons.InactiveCodeRefresher; +import com.excelsior.xds.ui.editor.modula.commons.InactiveCodeRefresher.IInactiveCodeRefresherListener; +import com.excelsior.xds.ui.editor.modula.commons.InactiveCodeRefresher.ITextPresentation; +import com.excelsior.xds.ui.editor.modula.commons.ModulaEditorCommons; +import com.google.common.io.ByteStreams; + +@SuppressWarnings("restriction") +public class ModulaMergeViewer extends TextMergeViewer { + private final TokenManager tokenManager = new TokenManager(); + private IPreferenceChangeListener corePluginPreferenceListener; + + public ModulaMergeViewer(Composite parent, + CompareConfiguration configuration) { + super(parent, configuration); + } + + @Override + protected void createControls(Composite composite) { + super.createControls(composite); + getControl().addDisposeListener(new DisposeListener() { + @Override + public void widgetDisposed(DisposeEvent e) { + tokenManager.dispose(); + } + }); + + corePluginPreferenceListener = new IPreferenceChangeListener() { + @Override + public void preferenceChange(PreferenceChangeEvent e) { + if (PreferenceKeys.PKEY_HIGHLIGHT_INACTIVE_CODE.isChanged(e)) { + refreshViewers(getInput()); + } + } + }; + PreferenceKeys.addChangeListener(corePluginPreferenceListener); + } + + @Override + public void setInput(Object input) { + super.setInput(input); + refreshViewers(input); + } + + private void refreshViewers(Object input) { + if (input instanceof ICompareInput) { + ICompareInput compareInput = (ICompareInput) input; + BuildSettings buildSettings = getBuildSettings( compareInput.getLeft()); + if (buildSettings == null){ + buildSettings = getBuildSettings( compareInput.getRight()); + } + + if (buildSettings != null){ + try { + File leftTempSourceFile = saveAsTempFile(compareInput.getLeft()); + File rightTempSourceFile = saveAsTempFile(compareInput.getRight()); + + scheduleParse(leftTempSourceFile, buildSettings, MergeViewerContentProvider.LEFT_CONTRIBUTOR); + scheduleParse(rightTempSourceFile, buildSettings, MergeViewerContentProvider.RIGHT_CONTRIBUTOR); + } catch (CoreException e) { + LogHelper.logError(e); + } + } + } + } + + private void scheduleParse(File file, BuildSettings buildSettings, + char contributorType) { + ParseTask task = new ParseTask(file); + task.setNeedModulaAst(true); + task.setBuildSettings(buildSettings); + SymbolModelManager.instance().scheduleParse( + task, + new SymbolModelListenerAdapter(new ParsedModuleKey( + buildSettings, ResourceUtils.toFileStore(file))) { + @Override + public void parsed(ParsedModuleKey key, + IModuleSymbol moduleSymbol, ModulaAst ast) { + IMergeViewerTestAdapter adapter = (IMergeViewerTestAdapter) getAdapter(IMergeViewerTestAdapter.class); + IDocument doc = adapter.getDocument(contributorType); + ModulaEditorCommons.configureModulaFastPartitioner(doc); + + InactiveCodeRefresher inactiveCodeRefresher = new InactiveCodeRefresher( + ast, new ITextPresentation() { + @Override + public boolean isDisposed() { + return getControl().isDisposed(); + } + + @Override + public void invalidateTextPresentation() { + ModulaMergeViewer.this + .invalidateTextPresentation(); + } + }, () -> doc, + new IInactiveCodeRefresherListener() { + @Override + public void afterTextPresentationUpdated() { + XdsParserManager.discardModulaAst(ast); + } + }); + inactiveCodeRefresher.refresh(); + } + }); + } + + private File saveAsTempFile(ITypedElement el) throws CoreException { + if ( el instanceof IEncodedStreamContentAccessor) { + IEncodedStreamContentAccessor acc = (IEncodedStreamContentAccessor) el; + File temp; + try { + temp = File.createTempFile("mod", ".mod"); + try(FileOutputStream fos = new FileOutputStream(temp)){ + ByteStreams.copy(acc.getContents(), fos); + } + return temp; + } catch (IOException e) { + ExceptionHelper.rethrowAsCoreException(e); + } + } + return null; + } + + private BuildSettings getBuildSettings(ITypedElement left) { + if (left instanceof IResourceProvider) { + IResourceProvider resourceProvider = (IResourceProvider) left; + IResource resource = resourceProvider.getResource(); + if (resource instanceof IFile) { + return BuildSettingsCache.createBuildSettings((IFile) resource); + } + } + return null; + } + + @Override + protected void configureTextViewer(TextViewer textViewer) { + if (textViewer instanceof SourceViewer) { + ((SourceViewer)textViewer).configure(getSourceViewerConfiguration()); + } + } + + @Override + protected String getDocumentPartitioning() { + return IModulaPartitions.M2_PARTITIONING; + } + private SourceViewerConfiguration getSourceViewerConfiguration() { + return new ModulaSourceViewerConfiguration(tokenManager, null, EditorsPlugin.getDefault().getPreferenceStore(), ModulaEditor.eolCommentPrefix); + } + + @Override + protected IDocumentPartitioner getDocumentPartitioner() { + return ModulaDocumentSetupParticipant.createDocumentPartitioner(); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ActiveCodeContentAssistProcessor.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ActiveCodeContentAssistProcessor.java new file mode 100644 index 0000000..7e1871d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ActiveCodeContentAssistProcessor.java @@ -0,0 +1,763 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.io.File; +import java.io.FilenameFilter; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Comparator; +import java.util.EnumSet; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.StreamSupport; + +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.ContentAssistEvent; +import org.eclipse.jface.text.contentassist.ICompletionListener; +import org.eclipse.jface.text.contentassist.ICompletionListenerExtension; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.IContentAssistProcessor; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.text.contentassist.IContextInformationValidator; +import org.eclipse.jface.viewers.StyledString; +import org.eclipse.swt.graphics.Image; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.ide.symbol.IdeImportResolver; +import com.excelsior.xds.core.project.XdsProjectSettings; +import com.excelsior.xds.core.project.XdsProjectSettingsManager; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.core.sdk.Sdk; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IConstantSymbol; +import com.excelsior.xds.parser.modula.symbol.IEnumElementSymbol; +import com.excelsior.xds.parser.modula.symbol.IFormalParameterSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.IStandardProcedureSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithImports; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithScope; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.symbol.type.IEnumTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IRecordTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.editor.commons.contentassist.ICompletionContextUser; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.ModulaContentAssistant; +import com.excelsior.xds.ui.editor.modula.contentassist2.ModuleImportContextualCompletionProposal.CommaPosition; +import com.excelsior.xds.ui.images.ImageUtils; +import com.excelsior.xds.ui.viewers.ModulaSymbolDescriptions; +import com.excelsior.xds.ui.viewers.ModulaSymbolImages; +import com.google.common.collect.Iterables; + +public class ActiveCodeContentAssistProcessor implements + IContentAssistProcessor, ICompletionContextUser { + private boolean IS_DEBUG_PRINT = false; + private static final char[] PROPOSAL_ACTIVATION_CHARS = new char[] { '.' }; + private static final ICompletionProposalComparator completionProposalComparator = new ICompletionProposalComparator(); + + private CompletionContext context; + private int proposalCategoryIteration; + private boolean isAssistSessionRestarted; + + private final CompletionListener completionListener = new CompletionListener(); + private final ModulaContentAssistant contentAssistant; + + ActiveCodeContentAssistProcessor(ModulaContentAssistant contentAssistant) { + this.contentAssistant = contentAssistant; + contentAssistant.addCompletionListener(completionListener); + } + + @Override + public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, + int offset) { + if (IS_DEBUG_PRINT) { + System.out.println(String.format("proposalCategoryIteration=%s isAssistSessionRestarted=%s contentAssistant.isAssistSessionRestarted()=%s", proposalCategoryIteration, isAssistSessionRestarted,contentAssistant.isAssistSessionRestarted())); + } + contentAssistant.enableAutoInsert(true); + isAssistSessionRestarted = isAssistSessionRestarted || contentAssistant.isAssistSessionRestarted(); + if (isAssistSessionRestarted) { + isAssistSessionRestarted = false; + } + else { + ++proposalCategoryIteration; + } + + List proposals = new ArrayList<>(); + Set proposalsSet = new HashSet<>(); + if (context.getReplacementLength() >= 0) { + if (context.getRegionType() == RegionType.IMPORT_STATEMENT) { + Token prevToken = ContentAssistUtils.prevToken(context.getTokens(), context.offsetInStatement()); + Token nextToken = ContentAssistUtils.nextToken(context.getTokens(), context.offsetInStatement()); + context.setPreviousNonSpaceToken(prevToken); + context.setNextNonSpaceToken(nextToken); + if (isFromImport(context.getLeafNode())) { + fromImportProposals(proposals, proposalsSet); + } + else { + importProposals(proposals, proposalsSet); + } + } + else { + if (context.isDottedExpression()) { + dottedExpressionProposals(context, proposals, proposalsSet); + if (proposals.size() == 1 && isNoChangeProposal(proposals.get(0))) { + contentAssistant.enableAutoInsert(false); + } + } + else { + boolean addMinimum = proposalCategoryIteration % 2 == 1; + scopeProposals(context, proposals, proposalsSet, addMinimum); + if (addMinimum && proposals.size() == 1 && !isOnlyProposalPossible()) { + contentAssistant.enableAutoInsert(false); + } + } + } + } + + return proposals.toArray(new ICompletionProposal[0]); + } + + private boolean isNoChangeProposal(ICompletionProposal p) { + if (p instanceof ModulaContextualCompletionProposal) { + ModulaContextualCompletionProposal mp = (ModulaContextualCompletionProposal) p; + return mp.isNoChangeProposal(context.getViewer().getDocument()); + } + return false; + } + + private boolean isOnlyProposalPossible() { + List proposals = new ArrayList<>(); + Set proposalsSet = new HashSet<>(); + scopeProposals(context, proposals, proposalsSet, false); + return proposals.size() == 1; + } + + private void importProposals(List proposals, Set proposalsSet) { + Set alreadyImportedNames = computeAlreadyImportedQualifiedNames(context.getModuleSymbol()) ; + + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(context.getEditedFile()); + Collection lookupDirs = getLookupDirs(buildSettings); + + Collection modules = computeModuleInfos(context, lookupDirs, alreadyImportedNames); + createCompletionProposals(context, modules, proposals, proposalsSet); + } + + private void fromImportProposals(List proposals, + Set proposalsSet) { + + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(context.getEditedFile()); + + FromImportStatementParser parser = FromImportStatementParser.createParser(buildSettings, context.getModuleSymbol(), context.getCurrentStatement()); + FromImportStatementParser.Statement statement = parser.parse(); + + if (statement.moduleName == null) { + if (ContentAssistUtils.tokenType(context.getPreviousNonSpaceToken()) == ModulaTokenTypes.FROM_KEYWORD) { + importProposals(proposals, proposalsSet); + } + return; + } + + IModuleSymbol moduleSymbol = resolve(statement.moduleName); + List names = new ArrayList(); + if (moduleSymbol != null) { + Predicate symbolFilter = s1 -> !statement.symbolNames.contains(s1.getName()) && JavaUtils.isOneOf(s1, + ITypeSymbol.class, IConstantSymbol.class, + IVariableSymbol.class, IProcedureSymbol.class); + addCompletionProposalsFromScope(moduleSymbol, proposals, proposalsSet, symbolFilter); + for (IModulaSymbol s : moduleSymbol) { + names.add(s.getName()); + } + } + } + + private IModuleSymbol resolve(String moduleName) { + IModuleSymbol hostModule = context.getModuleSymbol(); + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(context.getEditedFile()); + + IModuleSymbol moduleSymbol = null; + if (hostModule != null && buildSettings != null) { + IImportResolver importResolver = new IdeImportResolver(buildSettings, null, null); + moduleSymbol = importResolver.resolveModuleSymbol(hostModule.getLanguage(), moduleName, hostModule.getSourceFile()); + } + return moduleSymbol; + } + + private static boolean isFromImport(PstNode n) { + return fromImportNode(n) != null; + } + + private static PstNode fromImportNode(PstNode n) { + while(n != null) { + if (n.getElementType() == ModulaElementTypes.UNQUALIFIED_IMPORT) { + return n; + } + n = n.getParent(); + } + return null; + } + + private static void createCompletionProposals(CompletionContext context, Collection modules, List proposals, Set proposalsSet) { + IProject iProject = context.getEditedFile().getProject(); + XdsProjectSettings xps = XdsProjectSettingsManager.getXdsProjectSettings(iProject); + Sdk sdk = xps.getProjectSdk(); + String sdkName = sdk != null? sdk.getName() : StringUtils.EMPTY; + + List completionProposals = new ArrayList<>(); + + // Add completion proposals for modules: + for (ModuleInfo mi : modules) { + File modFile = new File(mi.absPath); + String modname = FilenameUtils.getBaseName(modFile.getName()); + + String filterPrefix = context.getBeforeCursorWordPart(); + if (filterPrefix != null && !modname.toLowerCase().startsWith(filterPrefix.toLowerCase())) { + continue; + } + + String decorator = ""; //$NON-NLS-1$ + Image img = ImageUtils.getImage(ImageUtils.OBJ_DEF_MODULE_16x16); + switch (mi.location) { + case EXTDEP: // - /MyPrj/External Dependencies [c:\path\aa.def] + decorator = Messages.format(Messages.ModulaContextualCompletionProcessor_ExternalDeps, + new Object[]{iProject.getName(), mi.absPath}); + img = ImageUtils.getImage(ImageUtils.EXTERNAL_DEPENDENCIES_FOLDER_IMAGE_NAME); + break; + case LIB: // - /MyPrj/SDK Library [XDS Sdk]/sym/x86/CCtlRTL.sym + decorator = Messages.format(Messages.ModulaContextualCompletionProcessor_SdkLibrary, + new Object[]{iProject.getName(), sdkName, FilenameUtils.separatorsToUnix(mi.dispPath)}); + img = ImageUtils.getImage(ImageUtils.SDK_LIBRARY_FOLDER_IMAGE_NAME); + break; + default: // - /MyPrj/src/my.def + decorator = Messages.format(Messages.ModulaContextualCompletionProcessor_inProjectPath, new Object[]{iProject.getName(), FilenameUtils.separatorsToUnix(mi.dispPath)}); + } + + StyledString sstring = new StyledString(); + sstring.append(modname); + sstring.append(decorator, StyledString.DECORATIONS_STYLER); + + + EnumSet commas = EnumSet.of(CommaPosition.NONE); + + if (ContentAssistUtils.tokenType(context.getPreviousNonSpaceToken()) == ModulaTokenTypes.IDENTIFIER) { + commas.add(CommaPosition.BEFORE); + } + + if (ContentAssistUtils.tokenType(context.getNextNonSpaceToken()) == ModulaTokenTypes.IDENTIFIER) { + commas.add(CommaPosition.AFTER); + } + + ICompletionProposal proposal = new ModuleImportContextualCompletionProposal( + context.getReplacementOffset(), + context.getReplacementLength(), + commas, + img, + sstring, + modFile, + mi.location); + + if (!proposalsSet.contains(proposal)) { + proposalsSet.add(proposal); + completionProposals.add(proposal); + } + } + + sort(completionProposals); + proposals.addAll(completionProposals); + } + + private static Collection computeModuleInfos(CompletionContext context, Collection lookupDirs, Set alreadyImportedNames) { + Collection modules = new ArrayList<>(); + String prjRoot = null; + String libRoot = null; + + IProject iProject = context.getEditedFile().getProject(); + if (iProject != null) { + prjRoot = ResourceUtils.getAbsolutePath(iProject); + XdsProjectSettings xps = XdsProjectSettingsManager.getXdsProjectSettings(iProject); + Sdk sdk = xps.getProjectSdk(); + if (sdk != null) { + String sdkh = sdk.getSdkHomePath(); // no getLibraryDefinitionsPath(): .sym files are out form it + if (sdkh != null && !sdkh.isEmpty()) { + libRoot = ResourceUtils.getAbsolutePathAsInFS(sdkh); + } + } + } + for (File fdir : lookupDirs) { + String pathPref = prjRoot; + ModuleLocation loc = ModuleLocation.PROJECT; + String dir = fdir.getAbsolutePath(); + if (libRoot != null && dir.startsWith(libRoot)) { + loc = ModuleLocation.LIB; + pathPref = libRoot; + } else if (prjRoot != null && !dir.startsWith(prjRoot)) { + loc = ModuleLocation.EXTDEP; + pathPref = ""; //$NON-NLS-1$ + } + + File files[] = fdir.listFiles(new FilenameFilter() { + @Override + public boolean accept(File dir, String name) { + return FilenameUtils.isExtension(name.toLowerCase(), new String[]{"def", "ob2", "sym"}); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } + }); + + if (files == null) { + continue; + } + + for (File f : files) { + if (alreadyImportedNames.add(FilenameUtils.getBaseName(f.getName()).toLowerCase())) { + String absPath = new File(dir, f.getName()).getAbsolutePath(); + String dispPath = absPath; + if (pathPref != null && !pathPref.isEmpty() && absPath.startsWith(pathPref)) { + dispPath = absPath.substring(pathPref.length()); + if (dispPath.startsWith("\\") || dispPath.startsWith("/")) { //$NON-NLS-1$ //$NON-NLS-2$ + dispPath = dispPath.substring(1); + } + } + modules.add(new ModuleInfo(absPath, dispPath, loc)); + } + } + } + + return modules; + } + + private static Collection getLookupDirs(BuildSettings bs) { + Collection dirs = new HashSet(); + + for (String name : new String[]{"zz.def", "zz.ob2", "zz.sym"}) { + dirs.addAll(bs.getLookupDirs(name)); + } + return dirs; + } + + private static Set computeAlreadyImportedQualifiedNames(IModuleSymbol moduleSymbol) { + if (moduleSymbol == null) { + return Collections.emptySet(); + } + Set names = new HashSet<>(); + + Iterable symbols = Iterables.concat( + Collections.singletonList(moduleSymbol), + moduleSymbol.getImports()); + + for (IModulaSymbol s : symbols) { + String name = null; + if (s instanceof IModuleAliasSymbol) { + IModuleAliasSymbol aliasSymb = (IModuleAliasSymbol) s; + IModuleSymbol aliased = aliasSymb.getReference(); + if (aliased != null) { + name = aliased.getName(); + } + } + else { + name = s.getName(); + } + if (name == null){ + continue; + } + names.add(StringUtils.lowerCase(name)); + } + + return names; + } + + enum ModuleLocation { + PROJECT, + EXTDEP, + LIB + } + + private static final class ModuleInfo { + public final String absPath; + public final String dispPath; + public final ModuleLocation location; + + public ModuleInfo(String absPath, String dispPath, ModuleLocation location) { + this.absPath = absPath; + this.dispPath = dispPath; + this.location = location; + } + } + + private void scopeProposals(CompletionContext context, + List proposals, Set proposalsSet, boolean addMinimum) { + List ancestorScopes = ModulaSymbolUtils.getAllParentScopes(context.getLeafNode()); + IModulaSymbolScope superModuleScope = null; + if (ancestorScopes.size() > 1) { + superModuleScope = ancestorScopes.remove(ancestorScopes.size() - 1); // drop super-module + } + + final Predicate symbolFilter = createSymbolFilter(context); + + while (true) { + int maxScopes = addMinimum ? 1 : Integer.MAX_VALUE; + maxScopes = Math.min(maxScopes, ancestorScopes.size()); + + for (int idx = 0; idx < maxScopes; ++idx) { + addCompletionProposalsFromScope(ancestorScopes.get(idx), proposals, proposalsSet, symbolFilter); + } + + if (proposals.isEmpty() && addMinimum) { + // turn off addMinimum and try again + addMinimum = false; + continue; + } + break; + } + + sort(proposals); + + if (!addMinimum) { + // separately add names from the super-module + List completionProposalsFromSuperModule = new ArrayList(); + addCompletionProposalsFromScope(superModuleScope, completionProposalsFromSuperModule, proposalsSet, symbolFilter); + sort(completionProposalsFromSuperModule); + proposals.addAll(completionProposalsFromSuperModule); + } + } + + private static void sort(List proposals) { + Collections.sort(proposals, completionProposalComparator); + } + + private static class ICompletionProposalComparator implements Comparator { + @Override + public int compare(ICompletionProposal o1, ICompletionProposal o2) { + int cc = 0; + if (o1 instanceof ModuleImportContextualCompletionProposal && + o2 instanceof ModuleImportContextualCompletionProposal) + { + cc = ((ModuleImportContextualCompletionProposal)o1).getLocation().ordinal() - + ((ModuleImportContextualCompletionProposal)o2).getLocation().ordinal(); + } + if (cc != 0) { + return cc; + } else { + return o1.getDisplayString().toLowerCase().compareTo(o2.getDisplayString().toLowerCase()); + } + } + } + + private static Predicate createSymbolFilter(CompletionContext context) { + return s -> { + boolean test = true; + RegionType regionType = context.getRegionType(); + switch (regionType) { + case PROCEDURE_PARAMETERS: + case DECLARATIONS: + test = s instanceof ITypeSymbol || s instanceof IModuleSymbol || s instanceof IModuleAliasSymbol; + break; + case IMPORT_STATEMENT: + test = s instanceof IModuleSymbol || s instanceof IModuleAliasSymbol; + break; + case MODULE: + // TODO : this is workaround before we have more precise context determination. + if (s instanceof IVariableSymbol) { + IVariableSymbol varSymbol = (IVariableSymbol) s; + test = !varSymbol.isLocal(); + } + else if (s instanceof IFormalParameterSymbol) { + test = false; + } + break; + default: + } + return test; + }; + } + + private void addCompletionProposalsFromScope( IModulaSymbolScope scope + , List completionProposals, Set proposalsSet, Predicate symbolFilter) + { + if (scope != null) { + for (IModulaSymbol s : scope) { + addModulaSymbolToCompletionProposals(completionProposals, proposalsSet, s, symbolFilter); + } + if (scope instanceof IModuleSymbol) { + for (IModulaSymbol s : ((IModuleSymbol)scope).getExportedSymbols()) { + addModulaSymbolToCompletionProposals(completionProposals, proposalsSet, s, symbolFilter); + } + } + if (scope instanceof ISymbolWithImports) { + for (IModulaSymbol s : ((ISymbolWithImports)scope).getImports()) { + addModulaSymbolToCompletionProposals(completionProposals, proposalsSet, s, symbolFilter); + } + } + } + } + + private void addModulaSymbolToCompletionProposals(List completionProposals, Set proposalsSet, + IModulaSymbol s, Predicate symbolFilter) + { + if (s == null || s.getName() == null) { + return; // parser sometimes may produce it + } + + if (symbolFilter != null && !symbolFilter.test(s)) { + return; + } + + String proposalText = s.getName(); + + String filterPrefix = context.getBeforeCursorWordPart(); + if (filterPrefix != null && !StringUtils.startsWithIgnoreCase(proposalText, filterPrefix)) { + return; + } + + addProposal(completionProposals, proposalsSet, s); + } + + private void addProposal(List completionProposals, Set proposalsSet, + IModulaSymbol s) { + String proposalText = s.getName(); + StyledString sstring = new StyledString(proposalText); + sstring.append(ModulaSymbolDescriptions.getSymbolDescription(s), StyledString.DECORATIONS_STYLER); + + String replacementString; + if (s instanceof IProcedureSymbol && context.getRegionType() != RegionType.IMPORT_STATEMENT) { + replacementString = createReplacementStringFromProcedureSymbol((IProcedureSymbol) s); + } else { + StringBuilder sb = new StringBuilder(); + if (context.getRegionType() == RegionType.IMPORT_STATEMENT) { + if (ContentAssistUtils.tokenType(context.getPreviousNonSpaceToken()) == ModulaTokenTypes.IDENTIFIER) { + sb.append(','); + } + } + sb.append(s.getName()); + if (context.getRegionType() == RegionType.IMPORT_STATEMENT) { + if (ContentAssistUtils.tokenType(context.getNextNonSpaceToken()) == ModulaTokenTypes.IDENTIFIER) { + sb.append(','); + } + } + replacementString = sb.toString(); + } + + int cursorPosition = Math.max(context.getReplacementLength(), replacementString.length()); //XXX ?? + + ICompletionProposal proposal = new ModulaContextualCompletionProposal( + replacementString, + context.getReplacementOffset(), + context.getReplacementLength(), + cursorPosition, + ModulaSymbolImages.getImage(s), + sstring, + null, ""); //$NON-NLS-1$ + + if (!proposalsSet.contains(proposal)) { + proposalsSet.add(proposal); + completionProposals.add(proposal); + } + } + + private String createReplacementStringFromProcedureSymbol(IProcedureSymbol ps) { + StringBuilder sb = new StringBuilder(); + sb.append(ps.getName()); + if (context.getRegionType() == RegionType.PROCEDURE_BODY) { + String lineTail = context.getCurrentLineTail(); + boolean isParamsExists = lineTail.startsWith("(") && !lineTail.startsWith("(*"); //$NON-NLS-1$ //$NON-NLS-2$ + if (!isParamsExists) { + // no () exists in the target text => add default + sb.append('('); + Collection parameters = ps.getParameters(); + int i = 0; + for (Iterator iterator = parameters.iterator(); iterator + .hasNext();) { + if (i++ > 0) { + sb.append(", "); //$NON-NLS-1$ + } + IFormalParameterSymbol parameterSymbol = (IFormalParameterSymbol) iterator.next(); + sb.append(parameterSymbol.getName()); + } + sb.append(')'); + } + } + return sb.toString(); + } + + private void dottedExpressionProposals(CompletionContext context, + List proposals, Set proposalsSet) { + Predicate symbolFilter = createSymbolFilter(context); + IModulaSymbol symbol = context.getReferencedSymbol(); + if (symbol == null) { + return; + } + if (symbol instanceof IModuleAliasSymbol) { + symbol = ((IModuleAliasSymbol)symbol).getReference(); + } + ITypeSymbol typeSymbol = JavaUtils.as(ITypeSymbol.class, symbol); + if (typeSymbol != null) { + addCompletionProposalsFromTypeSymbol(proposals, proposalsSet, typeSymbol, symbolFilter); + } + else { + IModuleSymbol moduleSymbol = JavaUtils.as(IModuleSymbol.class, symbol); + if (moduleSymbol != null) { + addCompletionProposalsFromDefinitionModule(proposals, proposalsSet, moduleSymbol, symbolFilter); + } + } + } + + private void addCompletionProposalsFromDefinitionModule( List completionProposals, Set proposalsSet, IModuleSymbol module, Predicate symbolFilter ) + { + List al = new ArrayList(); + for (IModulaSymbol symbol : module.getExportedSymbols()) { + if (symbol.getName() != null) { + al.add(symbol); + } + } + Collections.sort(al, new Comparator() { + @Override + public int compare(IModulaSymbol s1, IModulaSymbol s2) { + int ord1 = getTypeOrder(s1); + int ord2 = getTypeOrder(s2); + if (ord1 != ord2) { + return ord1 - ord2; + } + return s1.getName().compareToIgnoreCase(s2.getName()); + } + + private int getTypeOrder(IModulaSymbol s) { + if (s instanceof IProcedureSymbol || s instanceof IStandardProcedureSymbol) { + return 1; + } + if (s instanceof IVariableSymbol) { + return 2; + } + if (s instanceof ITypeSymbol) { + return 3; + } + if (s instanceof IEnumTypeSymbol) { + return 4; + } + if (s instanceof IEnumElementSymbol) { + return 5; + } + if (s instanceof IConstantSymbol) { + return 6; + } + return 7; + } + }); + + for (IModulaSymbol s : al) { + addModulaSymbolToCompletionProposals(completionProposals, proposalsSet, s, symbolFilter); + } + } + + private void addCompletionProposalsFromTypeSymbol(List completionProposals, Set proposalsSet, ITypeSymbol symbol, Predicate symbolFilter) + { + if (symbol instanceof IPointerTypeSymbol) { + ITypeSymbol its = ((IPointerTypeSymbol)symbol).getBoundTypeSymbol(); + if (its instanceof ISymbolWithScope) { + symbol = its; + } + } + if (symbol instanceof ISymbolWithScope) { + for (IModulaSymbol modulaSymbol : getSymbolsFromSuperType((ISymbolWithScope)symbol)) { + addModulaSymbolToCompletionProposals(completionProposals, proposalsSet, modulaSymbol, symbolFilter); + } + } + } + + private Iterable getSymbolsFromSuperType(ISymbolWithScope scope) { + Iterable iterable = scope; + if (scope instanceof IRecordTypeSymbol) { + Iterable hierarchy = () -> new Iterator() { + IRecordTypeSymbol current = (IRecordTypeSymbol)scope; + @Override + public IRecordTypeSymbol next() { + IRecordTypeSymbol next = current; + current = current.getBaseTypeSymbol(); + return next; + } + + @Override + public boolean hasNext() { + return current != null; + } + }; + iterable = () -> StreamSupport.stream(hierarchy.spliterator(), false).flatMap(r -> StreamSupport.stream(r.spliterator(), false)).iterator(); + } + + return iterable; + } + + @Override + public IContextInformation[] computeContextInformation(ITextViewer viewer, + int offset) { + return null; + } + + @Override + public char[] getCompletionProposalAutoActivationCharacters() { + return PROPOSAL_ACTIVATION_CHARS; + } + + @Override + public char[] getContextInformationAutoActivationCharacters() { + return null; + } + + @Override + public String getErrorMessage() { + return null; + } + + @Override + public IContextInformationValidator getContextInformationValidator() { + return null; + } + + @Override + public void setCompletionContext(CompletionContext context) { + this.context = context; + } + + private final class CompletionListener implements ICompletionListener, ICompletionListenerExtension { + @Override + public void selectionChanged(ICompletionProposal proposal, + boolean smartToggle) { + } + + @Override + public void assistSessionStarted(ContentAssistEvent e) { + proposalCategoryIteration = 0; + if (IS_DEBUG_PRINT) { + System.out.println("assistSessionStarted:::"); + } + } + + @Override + public void assistSessionEnded(ContentAssistEvent e) { + if (IS_DEBUG_PRINT) { + System.out.println("assistSessionEnded:::"); + } + } + + @Override + public void assistSessionRestarted(ContentAssistEvent e) { + isAssistSessionRestarted = true; + if (IS_DEBUG_PRINT) { + System.out.println("assistSessionRestarted:::"); + } + } + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/CompletionContext.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/CompletionContext.java new file mode 100644 index 0000000..9429fa6 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/CompletionContext.java @@ -0,0 +1,180 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextViewer; + +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.ui.editor.commons.contentassist.BaseCompletionContext; + +/** + * @author lsa80 + * + */ +public class CompletionContext extends BaseCompletionContext{ + private IFile editedFile; + private String contentType; + private IModuleSymbol moduleSymbol; + private boolean isDotBeforeCursor; + private boolean isDottedExpression; + private PstLeafNode leafNode; + private IModulaSymbol referencedSymbol; + private String beforeCursorWordPart; + private String currentStatement; + private IRegion statementRegion; + private String currentLineTail; + private int replacementOffset; + private int replacementLength; + private RegionType regionType; + private List tokens; + + private Token previousNonSpaceToken; + private Token nextNonSpaceToken; + + CompletionContext(ITextViewer viewer, int offset) { + super(viewer, offset); + } + + boolean isDotBeforeCursor() { + return isDotBeforeCursor; + } + + void setDotBeforeCursor(boolean isDotBeforeCursor) { + this.isDotBeforeCursor = isDotBeforeCursor; + } + + boolean isDottedExpression() { + return isDottedExpression; + } + + void setDottedExpression(boolean isDottedExpression) { + this.isDottedExpression = isDottedExpression; + } + + void setLeafNode(PstLeafNode leafNode) { + this.leafNode = leafNode; + } + + PstLeafNode getLeafNode() { + return leafNode; + } + + String getBeforeCursorWordPart() { + return beforeCursorWordPart; + } + + void setBeforeCursorWordPart(String beforeCursorWordPart) { + this.beforeCursorWordPart = beforeCursorWordPart; + } + + String getCurrentLineTail() { + return currentLineTail; + } + + void setCurrentLineTail(String currentLineTail) { + this.currentLineTail = currentLineTail; + } + + String getCurrentStatement() { + return currentStatement; + } + + void setCurrentStatement(String currentStatement) { + this.currentStatement = currentStatement; + } + + void setStatementRegion(IRegion statementRegion) { + this.statementRegion = statementRegion; + } + + int getReplacementOffset() { + return replacementOffset; + } + + void setReplacementOffset(int replacementOffset) { + this.replacementOffset = replacementOffset; + } + + int getReplacementLength() { + return replacementLength; + } + + void setReplacementLength(int replacementLength) { + this.replacementLength = replacementLength; + } + + IModulaSymbol getReferencedSymbol() { + return referencedSymbol; + } + + void setReferencedSymbol(IModulaSymbol referencedSymbol) { + this.referencedSymbol = referencedSymbol; + } + + RegionType getRegionType() { + return regionType; + } + + void setRegionType(RegionType regionType) { + this.regionType = regionType; + } + + IFile getEditedFile() { + return editedFile; + } + + void setEditedFile(IFile editedFile) { + this.editedFile = editedFile; + } + + IModuleSymbol getModuleSymbol() { + return moduleSymbol; + } + + void setModuleSymbol(IModuleSymbol moduleSymbol) { + this.moduleSymbol = moduleSymbol; + } + + public String getContentType() { + return contentType; + } + + void setContentType(String contentType) { + this.contentType = contentType; + } + + List getTokens() { + return tokens; + } + + void setTokens(List tokens) { + this.tokens = tokens; + } + + Token getPreviousNonSpaceToken() { + return previousNonSpaceToken; + } + + void setPreviousNonSpaceToken(Token previousNonSpaceToken) { + this.previousNonSpaceToken = previousNonSpaceToken; + } + + Token getNextNonSpaceToken() { + return nextNonSpaceToken; + } + + void setNextNonSpaceToken(Token nextNonSpaceToken) { + this.nextNonSpaceToken = nextNonSpaceToken; + } + + int offsetInStatement() { + if (tokens.isEmpty()) { + return -1; + } + return getOffset() - statementRegion.getOffset(); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ContentAssistUtils.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ContentAssistUtils.java new file mode 100644 index 0000000..7ab5869 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ContentAssistUtils.java @@ -0,0 +1,147 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Predicate; + +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenSets; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.ast.tokens.PragmaTokenType; +import com.excelsior.xds.parser.modula.scanner.jflex._XdsFlexScanner; + +class ContentAssistUtils { + private final static Predicate skipTokensPredicate = t -> isWhitespaceCommentOrPragma(t); + + static List tokenize(String text) { + List tokens = new ArrayList<>(); + + try { + _XdsFlexScanner input = new _XdsFlexScanner(); + input.reset(text); + while (true) { + TokenType t = input.nextToken(); + if (ModulaTokenTypes.EOF == t) { + break; + } + tokens.add(new Token(t, input.getTokenOffset(), input.yylength())); + } + } catch (IOException e) { + // will never happen + } + + return tokens; + } + + static boolean isWhitespaceCommentOrPragma(Token t) { + return isWhitespaceCommentOrPragma(tokenType(t)); + } + + static boolean isWhitespaceCommentOrPragma(TokenType tt) { + return ModulaTokenSets.WHITE_SPACE_AND_COMMENT_SET.contains(tt) || tt instanceof PragmaTokenType; + } + + static TokenType tokenType(Token t) { + return t != null? t.tokenType : null; + } + + static boolean isBetween(List tokens, TokenType expectedBefore, TokenType expectedAfter, int offset) { + return isBetween(tokens, expectedBefore, expectedAfter, offset, skipTokensPredicate); + } + + static boolean isBetween(List tokens, TokenType expectedBefore, TokenType expectedAfter, int offset, Predicate skipTokensPredicate) { + int i = 0; + for (;i < tokens.size(); i++) { + Token t = tokens.get(i); + if (t.contains(offset)) { + break; + } + } + + return false; + } + + static boolean isBefore(List tokens, int offset, TokenType expectedBefore) { + return isBefore(tokens, offset, expectedBefore, skipTokensPredicate); + } + + static boolean isBefore(List tokens, int offset, TokenType expectedBefore, Predicate skipTokensPredicate ) { + return false; + } + + static boolean isAfter(List tokens, int offset, TokenType expectedBefore) { + return isAfter(tokens, offset, expectedBefore, skipTokensPredicate); + } + + static boolean isAfter(List tokens, int offset, TokenType expectedAfter, Predicate skipTokensPredicate ) { + return false; + } + + static Token prevToken(List tokens, int offset) { + return prevToken(tokens, offset, skipTokensPredicate); + } + + static Token prevToken(List tokens, int offset, Predicate skipTokensPredicate) { + if (offset < 0) { + return null; + } + int i = 0; + Token token = null; + for (; i < tokens.size(); i++) { + token = tokens.get(i); + if (token.contains(offset)) { + break; + } + } + if (i != tokens.size()) { + --i; + while(i > -1 && skipTokensPredicate.test(tokens.get(i).tokenType)) { + --i; + } + + if (i > -1) { + return tokens.get(i); + } + } + + return null; + } + + static Token nextToken(List tokens, int offset) { + return nextToken(tokens, offset, skipTokensPredicate); + } + + static Token nextToken(List tokens, int offset, Predicate skipTokensPredicate) { + if (offset < 0) { + return null; + } + int i = 0; + Token token = null; + for (; i < tokens.size(); i++) { + token = tokens.get(i); + if (token.contains(offset)) { + break; + } + } + if (i != tokens.size()) { + ++i; + while(i < tokens.size() && skipTokensPredicate.test(tokens.get(i).tokenType)) { + ++i; + } + + if (i < tokens.size()) { + return tokens.get(i); + } + } + + return null; + } + + static String region(String s, Token t) { + if (t == null) { + return null; + } + return s.substring(t.offset, t.offset + t.length); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/FromImportStatementParser.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/FromImportStatementParser.java new file mode 100644 index 0000000..e60b7ea --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/FromImportStatementParser.java @@ -0,0 +1,80 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.core.filesystem.IFileStore; + +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.parser.commons.IParserEventListener; +import com.excelsior.xds.parser.modula.IXdsParserMonitor; +import com.excelsior.xds.parser.modula.XdsExpressionParser; +import com.excelsior.xds.parser.modula.XdsSettings; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.utils.ModulaFileUtils; + +class FromImportStatementParser extends XdsExpressionParser { + FromImportStatementParser(IFileStore sourceFile, CharSequence chars, + XdsSettings xdsSettings, IImportResolver importResolver, + XdsSourceType sourceType, IParserEventListener reporter, + IXdsParserMonitor monitor) { + super(sourceFile, chars, xdsSettings, importResolver, reporter, + monitor); + } + + static class Statement { + String moduleName; + Set symbolNames = new HashSet<>(); + } + + static FromImportStatementParser createParser(BuildSettings buildSettings, IModuleSymbol moduleSymbol, CharSequence text) { + IFileStore sourceFile = moduleSymbol.getSourceFile(); + XdsSourceType sourceType = ModulaFileUtils.getSourceType(sourceFile.getName()); + + XdsSettings settings = new XdsSettings(buildSettings, sourceType); + settings.setBuildAst(false); + FromImportStatementParser parser = new FromImportStatementParser( + sourceFile, text, settings, null, + sourceType, null, null); + + return parser; + } + + Statement parse() { + Statement statement = new Statement(); + + nextToken(); + nextToken(); + + if (token == IDENTIFIER) { + statement.moduleName = getTokenText(); + nextToken(); + } + + parseToken(IMPORT_KEYWORD); + + while (true) { + if (token == IDENTIFIER) { + statement.symbolNames.add(getTokenText()); + nextToken(); + } + else { + recoverOnUnexpectedToken(IDENTIFIER); + } + + if (COMMA == token) { + nextToken(); + } + else if (IDENTIFIER == token) { + errorExpectedSymbol(COMMA); + } + else { + break; + } + } + + return statement; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaAssistProcessor2.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaAssistProcessor2.java new file mode 100644 index 0000000..0e946f9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaAssistProcessor2.java @@ -0,0 +1,363 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.commons.lang.StringUtils; +import org.eclipse.core.resources.IFile; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.TextUtilities; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; + +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.commons.symbol.ISymbol; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.ISymbolWithType; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.ITypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.editor.commons.contentassist.EmptyCompletionProposal; +import com.excelsior.xds.ui.editor.commons.contentassist.SourceCodeAssistProcessor; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.ModulaContentAssistant; +import com.excelsior.xds.ui.editor.modula.facade.ActiveEditorFacade; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; +import com.excelsior.xds.ui.images.ImageUtils; + +/** + * Content assist processor to suggest Modula-2 source code completions. + */ +public class ModulaAssistProcessor2 extends SourceCodeAssistProcessor +{ + private static final Image LOADING_IMAGE = ImageUtils.getImage(ImageUtils.OBJ_LOADING_16x16); + static private final char[] PROPOSAL_ACTIVATION_CHARS = new char[] { '.' }; + + public ModulaAssistProcessor2(ModulaContentAssistant contentAssistant) { + super(null, new ActiveCodeContentAssistProcessor(contentAssistant), + new ModulaTemplateCompletionProcessor(contentAssistant)); + } + + /** + * {@inheritDoc} + */ + public char[] getCompletionProposalAutoActivationCharacters() { + return PROPOSAL_ACTIVATION_CHARS; + } + + @Override + public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, + int offset) { + CompletionContext context = computeContext(viewer, offset); + List completionProposals = new ArrayList(); + doComputeCompletionProposals(context, completionProposals); + + if (completionProposals.isEmpty() /*&& !isAstUpToDate()*/) { + IModuleSymbol moduleSymbol = context.getModuleSymbol(); + if (moduleSymbol == null) { + EmptyCompletionProposal emptyCompletionProposal = new EmptyCompletionProposal(Messages.XdsOutlinePage_Loading, + LOADING_IMAGE, viewer.getSelectedRange().x); + return new ICompletionProposal[]{emptyCompletionProposal, emptyCompletionProposal}; + } + else { + return null; + } + } + return completionProposals.toArray(new ICompletionProposal[0]); + } + + private static CompletionContext computeContext(ITextViewer viewer, + int offset) { + CompletionContext context = new CompletionContext(viewer, offset); + + IFile editedFile = CoreEditorUtils.getActiveEditorInputAsIFile(); + + context.setEditedFile(editedFile); + IModuleSymbol moduleSymbol = ModulaEditorSymbolUtils.getModuleSymbol(editedFile); + context.setModuleSymbol(moduleSymbol); + try{ + IDocument doc = viewer.getDocument(); + + String contentType = TextUtilities.getContentType(doc, IModulaPartitions.M2_PARTITIONING, offset, true); + context.setContentType(contentType); + + IRegion lineRegion = guessStatement(doc, offset); + String line = doc.get(lineRegion.getOffset(), lineRegion.getLength()); + context.setCurrentStatement(line); + context.setStatementRegion(lineRegion); + + ModulaAst ast = ActiveEditorFacade.getAst(); + PstLeafNode leafNode = ModulaEditorSymbolUtils.getPstLeafNode(ast, offset); + context.setLeafNode(leafNode); + + List tokens = ContentAssistUtils.tokenize(line); + context.setTokens(tokens); + int tokenIdx = containingTokenIdx(doc, tokens, lineRegion, offset); + if (tokenIdx > -1 && tokens.get(tokenIdx).tokenType == ModulaTokenTypes.DOT) { + context.setDotBeforeCursor(true); + } + context.setDottedExpression(isDottedExpression(tokens, tokenIdx)); + + int identifierBeforeCursorOffset = 0; + if (context.isDotBeforeCursor()) { + tokenIdx--; + if (tokenIdx > -1 && tokens.size() > 0) { + Token t = tokens.get(tokenIdx); + String text = ContentAssistUtils.region(line, t); + if (isIdentifier(text)) { + identifierBeforeCursorOffset = lineRegion.getOffset() + t.offset; + } + } + } + else { + if (tokenIdx > -1 && tokens.size() > 0) { + Token t = tokens.get(tokenIdx); + String text = ContentAssistUtils.region(line, t); + if (isIdentifier(text)) { + context.setBeforeCursorWordPart(text); + identifierBeforeCursorOffset = lineRegion.getOffset() + t.offset; + } + } + } + + { + PstLeafNode ln = context.getLeafNode(); + context.setRegionType(determineRegionType(doc, tokens, ast, ln, context.isDotBeforeCursor() ? identifierBeforeCursorOffset : offset)); + IModulaSymbol symbol = ModulaEditorSymbolUtils.getModulaSymbol(doc, ln); + if (symbol == null) { + if (context.isDottedExpression() && !context.isDotBeforeCursor()) { + tokenIdx--; + } + symbol = SymbolResolver.resolve(context, doc, line, ModulaSymbolUtils.getParentScope(ln), tokens, tokenIdx); + } + else { + symbol = SymbolResolver.getTargetSymbol(symbol); + } + context.setReferencedSymbol(symbol); + } + + { + Point selectedRange = viewer.getSelectedRange(); + int replacementOffset = context.getBeforeCursorWordPart() == null ? offset : identifierBeforeCursorOffset; + int replacementLength = selectedRange.x + selectedRange.y - replacementOffset; + context.setReplacementOffset(replacementOffset); + context.setReplacementLength(replacementLength); + context.setCurrentLineTail(currentLineTail(doc, selectedRange)); + } + } + catch(BadLocationException e) { + // ignore it + } + + return context; + } + + private static IRegion guessStatement(IDocument doc, int offset) { + IRegion region; + try { + region = doc.getLineInformationOfOffset(offset); + if (doc.getChar(offset) == ';') { + --offset; + } + + int toOffset = offset; + + while (offset > -1 && doc.getChar(offset) != ';') { + --offset; + } + offset++; + + while (toOffset < doc.getLength() && doc.getChar(toOffset) != ';') { + ++toOffset; + } + + region = new Region(offset, toOffset - offset); + } catch (BadLocationException e) { + region = new Region(offset, 1); + } + + return region; + } + + private static RegionType determineRegionType(IDocument doc, List tokens, ModulaAst ast, PstNode currentNode, int offset) throws BadLocationException { + for (int i = 0; i < tokens.size(); i++) { + Token token = tokens.get(i); + if (token.tokenType == ModulaTokenTypes.IMPORT_KEYWORD || + token.tokenType == ModulaTokenTypes.FROM_KEYWORD) { + return RegionType.IMPORT_STATEMENT; + } + else if (!ContentAssistUtils.isWhitespaceCommentOrPragma(token) && token.tokenType != ModulaTokenTypes.END_KEYWORD) { + break; + } + } + int lineNo = doc.getLineOfOffset(offset); + return determineRegionType(pstAtLine(ast, doc, lineNo - 1)); + } + + private static PstNode pstAtLine(ModulaAst ast, IDocument doc, int lineNo) throws BadLocationException { + if (lineNo < 0 || lineNo > doc.getNumberOfLines()) { + return null; + } + + int len = doc.getLineLength(lineNo); + return ModulaEditorSymbolUtils.getPstLeafNode(ast, doc.getLineOffset(lineNo) + (len / 2)); + } + + private static String currentLineTail(IDocument doc, Point selectedRange) { + String lineTail = StringUtils.EMPTY; + try { + int lastPos = selectedRange.x + selectedRange.y; + int lastLnum = doc.getLineOfOffset(lastPos); + IRegion lastReg = doc.getLineInformation(lastLnum); + String lastLine = doc.get(lastReg.getOffset(), lastReg.getLength()); + lineTail = lastLine.substring(lastPos - lastReg.getOffset()); + } catch (BadLocationException e) { + } + return lineTail.trim(); + } + + private static RegionType determineRegionType(PstNode n) { + RegionType type = RegionType.UNKNOWN; + if (n == null) { + return RegionType.UNKNOWN; + } + + while(n != null) { + if (n.getElementType() == ModulaElementTypes.LOCAL_MODULE || + n.getElementType() == ModulaElementTypes.DEFINITION_MODULE || + n.getElementType() == ModulaElementTypes.PROGRAM_MODULE) { + type = RegionType.MODULE; + break; + } + else if (n.getElementType() == ModulaElementTypes.VARIABLE_DECLARATION_BLOCK || n.getElementType() == ModulaElementTypes.PROCEDURE_DECLARATION) { + type = RegionType.DECLARATIONS; + break; + } + else if (n.getElementType() == ModulaElementTypes.PROCEDURE_BODY) { + type = RegionType.PROCEDURE_BODY; + break; + } + else if (n.getElementType() == ModulaElementTypes.MODULE_BODY) { + type = RegionType.PROCEDURE_BODY; + break; + } + else if (n.getElementType() == ModulaElementTypes.FORMAL_PARAMETER_BLOCK) { + type = RegionType.PROCEDURE_PARAMETERS; + } + else if (n.getElementType() == ModulaElementTypes.SIMPLE_IMPORT || n.getElementType() == ModulaElementTypes.UNQUALIFIED_IMPORT) { + type = RegionType.IMPORT_STATEMENT; + break; + } + n = n.getParent(); + } + + return type; + } + + private static boolean isDottedExpression(List tokens, int tokenIdx) { + int i = tokenIdx; + + boolean isDottedExpression = false; + + while(i > -1) { + Token t = tokens.get(i); + if (t.tokenType != ModulaTokenTypes.DOT && t.tokenType != ModulaTokenTypes.IDENTIFIER) { + break; + } + if (t.tokenType == ModulaTokenTypes.DOT) { + isDottedExpression = true; + break; + } + --i; + } + + return isDottedExpression; + } + + private static int containingTokenIdx(IDocument doc, List tokens, IRegion lineRegion, int offset) throws BadLocationException { + int offsetInLine = offset - lineRegion.getOffset(); + + int i = tokens.size() - 1; + for (; i > -1; --i) { + Token t = tokens.get(i); + if (t.contains(offsetInLine - 1)) { + break; + } + } + + return i; + } + + static IModulaSymbolScope getScope(ISymbol symbol){ + if (symbol instanceof IModuleAliasSymbol) { + symbol = ((IModuleAliasSymbol)symbol).getReference(); + } + if (symbol instanceof IModulaSymbolScope) { + return (IModulaSymbolScope)symbol; + } + + symbol = getTypeSymbol(symbol); + + if (symbol instanceof IModulaSymbolScope) { + return (IModulaSymbolScope)symbol; + } + + return null; + } + + static ITypeSymbol getTypeSymbol(ISymbol symbol) { + ITypeSymbol typeSymbol; + if (symbol instanceof ITypeSymbol) { + typeSymbol = (ITypeSymbol)symbol; + } + else { + ISymbolWithType withTypeSymbol = JavaUtils.as(ISymbolWithType.class, symbol); + typeSymbol = withTypeSymbol != null? withTypeSymbol.getTypeSymbol() : null; + } + + ITypeSymbol result; + + if (typeSymbol instanceof IPointerTypeSymbol) { + IPointerTypeSymbol pointerSymbol = (IPointerTypeSymbol)typeSymbol; + result = pointerSymbol.getBoundTypeSymbol(); + } + else { + result = typeSymbol; + } + return result; + } + + private static boolean isIdentifier(String text) { + boolean first = true; + for (int i = 0; i < text.length(); i++) { + char ch = Character.toUpperCase(text.charAt(i)); + if (first) { + if (!(ch == '_' || (ch >= 'A' && ch <= 'Z'))) { + return false; + } + first = false; + } else { + if (!(ch == '_' || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9'))) { + return false; + } + } + } + return true; + } +} + diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaContextualCompletionProposal.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaContextualCompletionProposal.java new file mode 100644 index 0000000..3bb5253 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaContextualCompletionProposal.java @@ -0,0 +1,181 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.Objects; + +import org.eclipse.core.runtime.Assert; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.contentassist.ICompletionProposalExtension6; +import org.eclipse.jface.text.contentassist.IContextInformation; +import org.eclipse.jface.viewers.StyledString; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.graphics.Point; + + +/** + * The standard implementation of the ICompletionProposal interface. + */ +public class ModulaContextualCompletionProposal implements ICompletionProposal, ICompletionProposalExtension6 { + + /** The string to be displayed in the completion proposal popup. */ + private StyledString fDisplaySString; + /** The replacement string. */ + private String fReplacementString; + /** The replacement offset. */ + protected int fReplacementOffset; + /** The replacement length. */ + protected int fReplacementLength; + /** The cursor position after this proposal has been applied. */ + protected int fCursorPosition; + /** The image to be displayed in the completion proposal popup. */ + private Image fImage; + /** The context information of this proposal. */ + private IContextInformation fContextInformation; + /** The additional info of this proposal. */ + private String fAdditionalProposalInfo; + + /** + * Creates a new completion proposal based on the provided information. The replacement string is + * considered being the display string too. All remaining fields are set to null. + * + * @param replacementString the actual string to be inserted into the document + * @param replacementOffset the offset of the text to be replaced + * @param replacementLength the length of the text to be replaced + * @param cursorPosition the position of the cursor following the insert relative to replacementOffset + */ + public ModulaContextualCompletionProposal(String replacementString, int replacementOffset, int replacementLength, int cursorPosition) { + this(replacementString, replacementOffset, replacementLength, cursorPosition, null, null, null, null); + } + + /** + * Creates a new completion proposal. All fields are initialized based on the provided information. + * + * @param replacementString the actual string to be inserted into the document + * @param replacementOffset the offset of the text to be replaced + * @param replacementLength the length of the text to be replaced + * @param cursorPosition the position of the cursor following the insert relative to replacementOffset + * @param image the image to display for this proposal + * @param displayString the string to be displayed for the proposal + * @param contextInformation the context information associated with this proposal + * @param additionalProposalInfo the additional information associated with this proposal + */ + public ModulaContextualCompletionProposal(String replacementString, int replacementOffset, int replacementLength, + int cursorPosition, Image image, StyledString displaySString, IContextInformation contextInformation, String additionalProposalInfo) { + Assert.isNotNull(replacementString); + Assert.isTrue(replacementOffset >= 0); + Assert.isTrue(replacementLength >= 0); + Assert.isTrue(cursorPosition >= 0); + + fReplacementString= replacementString; + fReplacementOffset= replacementOffset; + fReplacementLength= replacementLength; + fCursorPosition= cursorPosition; + fImage= image; + fDisplaySString= displaySString; + fContextInformation= contextInformation; + fAdditionalProposalInfo= additionalProposalInfo; + } + + /* + * @see ICompletionProposal#apply(IDocument) + */ + public void apply(IDocument document) { + try { + String replaced = document.get(fReplacementOffset, fReplacementLength); + if (!Objects.equals(replaced, fReplacementString)) { + document.replace(fReplacementOffset, fReplacementLength, fReplacementString); + } + } catch (BadLocationException x) { + // ignore + } + } + + public boolean isNoChangeProposal(IDocument document) { + try { + String replaced = document.get(fReplacementOffset, fReplacementLength); + return Objects.equals(replaced, fReplacementString); + } catch (BadLocationException e) { + // ignore + } + return false; + } + + /* + * @see ICompletionProposal#getSelection(IDocument) + */ + public Point getSelection(IDocument document) { + return new Point(fReplacementOffset + fCursorPosition, 0); + } + + /* + * @see ICompletionProposal#getContextInformation() + */ + public IContextInformation getContextInformation() { + return fContextInformation; + } + + /* + * @see ICompletionProposal#getImage() + */ + public Image getImage() { + return fImage; + } + + /* + * @see ICompletionProposal#getDisplayString() + */ + public String getDisplayString() { + if (fDisplaySString != null) + return fDisplaySString.getString(); + return fReplacementString; + } + + /* + * @see ICompletionProposal#getAdditionalProposalInfo() + */ + public String getAdditionalProposalInfo() { + return fAdditionalProposalInfo; + } + + @Override + public StyledString getStyledDisplayString() { + if (fDisplaySString != null) + return fDisplaySString; + return new StyledString(fReplacementString); + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((fImage == null) ? 0 : fImage.hashCode()); + result = prime + * result + + ((fReplacementString == null) ? 0 : fReplacementString + .hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ModulaContextualCompletionProposal other = (ModulaContextualCompletionProposal) obj; + if (fImage == null) { + if (other.fImage != null) + return false; + } else if (!fImage.equals(other.fImage)) + return false; + if (fReplacementString == null) { + if (other.fReplacementString != null) + return false; + } else if (!fReplacementString.equals(other.fReplacementString)) + return false; + return true; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateCompletionProcessor.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateCompletionProcessor.java new file mode 100644 index 0000000..4239c85 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateCompletionProcessor.java @@ -0,0 +1,64 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.templates.ContextTypeRegistry; +import org.eclipse.jface.text.templates.Template; +import org.eclipse.jface.text.templates.TemplateContextType; + +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.contentassist.ICompletionContextUser; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.template.SourceCodeTemplateCompletionProcessor; +import com.excelsior.xds.ui.editor.modula.template.SourceCodeTemplateContextType; + +class ModulaTemplateCompletionProcessor extends SourceCodeTemplateCompletionProcessor implements ICompletionContextUser { + private CompletionContext completionContext; + + private static final Set ignoreRegions = new HashSet(); + static{ + ignoreRegions.addAll(Arrays.asList(RegionType.IMPORT_STATEMENT)); + } + + public ModulaTemplateCompletionProcessor( + ContentAssistant contentAssistant) { + super(contentAssistant); + } + + @Override + protected boolean isApplicable() { + if (completionContext != null) { + if (!IModulaPartitions.M2_CONTENT_TYPE_DEFAULT + .equals(completionContext.getContentType()) + || completionContext.isDotBeforeCursor() + || ignoreRegions.contains(completionContext + .getRegionType())) { + return false; + } + } + return completionContext != null; + } + + @Override + public void setCompletionContext(CompletionContext context) { + this.completionContext = context; + } + + @Override + protected boolean isEnabled(ITextViewer viewer, int offset, + Template template) { + return ModulaTemplateRegistry.isEnabled(template, completionContext.getRegionType()); + } + + @Override + protected TemplateContextType getContextType(ITextViewer viewer, + IRegion region) { + ContextTypeRegistry registry = XdsEditorsPlugin.getDefault().getContextTypeRegistry(); + return registry.getContextType(SourceCodeTemplateContextType.MODULA_CONTEXTTYPE); + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateRegistry.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateRegistry.java new file mode 100644 index 0000000..8db65fb --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModulaTemplateRegistry.java @@ -0,0 +1,105 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import org.eclipse.jface.text.templates.Template; + +/** + * @author lsa80 + * TODO : move here ContributionTemplateStore and ContributionContextTypeRegistry from XdsEditorsPlugin + */ +public class ModulaTemplateRegistry { + public static final String ARRAY_TEMPLATE_ID="ARRAY"; + public static final String BEGIN_TEMPLATE_ID="BEGIN"; + public static final String CASE_ELSE_TEMPLATE_ID="CASE-ELSE"; + public static final String CASE_TEMPLATE_ID="CASE"; + public static final String CONST_TEMPLATE_ID="CONST"; + public static final String ELSIF_TEMPLATE_ID="ELSIF"; + public static final String FOR_BY_TEMPLATE_ID="FOR-BY"; + public static final String FOR_TEMPLATE_ID="FOR"; + public static final String FROM_TEMPLATE_ID="FROM"; + public static final String FUNCTION_TEMPLATE_ID="function"; + public static final String FUNCTIONDEF_TEMPLATE_ID="functiondef"; + public static final String IF_ELSE_TEMPLATE_ID="IF-ELSE"; + public static final String IF_ELSIF_TEMPLATE_ID="IF-ELSIF"; + public static final String IF_TEMPLATE_ID="IF"; + public static final String IMPORT_TEMPLATE_ID="IMPORT"; + public static final String POINTER_TEMPLATE_ID="POINTER"; + public static final String PROCARGS_TEMPLATE_ID="procargs"; + public static final String PROCARGSDEF_TEMPLATE_ID="procargsdef"; + public static final String PROCDEF_TEMPLATE_ID="procdef"; + public static final String PROCEDURE_TEMPLATE_ID="PROCEDURE"; + public static final String RANGE_TEMPLATE_ID="range"; + public static final String RECORD_TEMPLATE_ID="RECORD"; + public static final String REPEAT_TEMPLATE_ID="REPEAT"; + public static final String RETURN_TEMPLATE_ID="RETURN"; + public static final String SET_TEMPLATE_ID="set"; + public static final String TYPE_TEMPLATE_ID="TYPE"; + public static final String VAR_TEMPLATE_ID="VAR"; + public static final String WHILE_TEMPLATE_ID="WHILE"; + public static final String WITH_TEMPLATE_ID="WITH"; + + private static final Map> templateId2RegionTypes = new HashMap<>(); + + static{ + associate(ARRAY_TEMPLATE_ID, RegionType.UNKNOWN); + associate(BEGIN_TEMPLATE_ID, RegionType.UNKNOWN); + + associate(CASE_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(CASE_ELSE_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + + associate(CONST_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(ELSIF_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(FOR_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(FOR_BY_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + + associate(FROM_TEMPLATE_ID, RegionType.IMPORT_STATEMENT, RegionType.MODULE); + + associate(FUNCTION_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(FUNCTIONDEF_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(IF_ELSE_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(IF_ELSIF_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(IF_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + + associate(IMPORT_TEMPLATE_ID, RegionType.IMPORT_STATEMENT, RegionType.MODULE); + + associate(POINTER_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(PROCARGSDEF_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(PROCARGS_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(PROCDEF_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(PROCEDURE_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(RANGE_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(RECORD_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(RETURN_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + + associate(SET_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(TYPE_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + + associate(REPEAT_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + + associate(VAR_TEMPLATE_ID, RegionType.DECLARATIONS, RegionType.MODULE); + associate(WHILE_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + associate(WITH_TEMPLATE_ID, RegionType.PROCEDURE_BODY); + } + + public static boolean isEnabled(Template template, RegionType currentRegionType) { + Set regionTypes = templateId2RegionTypes.get(template.getName()); + if (regionTypes == null) { + return true; + } + return regionTypes.contains(currentRegionType); + } + + private static void associate(String templateId, RegionType... regionTypes) { + templateId2RegionTypes.put(templateId, new HashSet<>(Arrays.asList(regionTypes))); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModuleImportContextualCompletionProposal.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModuleImportContextualCompletionProposal.java new file mode 100644 index 0000000..e521e69 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/ModuleImportContextualCompletionProposal.java @@ -0,0 +1,201 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.util.EnumSet; +import java.util.Objects; + +import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.viewers.StyledString; +import org.eclipse.swt.graphics.Image; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.core.compiler.driver.CompileDriver; +import com.excelsior.xds.core.utils.XdsFileUtils; +import com.excelsior.xds.parser.modula.XdsParserManager; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.parser.modula.utils.ModulaFileUtils; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.contentassist2.ActiveCodeContentAssistProcessor.ModuleLocation; + +class ModuleImportContextualCompletionProposal extends ModulaContextualCompletionProposal { + + private File module; + private ModuleLocation location; + private EnumSet commas; + + public ModuleImportContextualCompletionProposal(int replacementOffset, int replacementLength, + EnumSet commas, Image image, StyledString displaySString, File module, ModuleLocation location) + { + super("", replacementOffset, replacementLength, 0, image, displaySString, null, ""); //$NON-NLS-1$ //$NON-NLS-2$ + this.module = module; + this.location = location; + this.commas = commas; + } + + enum CommaPosition { + BEFORE, + AFTER, + NONE + } + + @Override + public void apply(IDocument document) { + String s = null; + try { + s = getTrueCaseModuleName(module); + } catch (Exception x) {} + + if (s == null) { + s = FilenameUtils.getBaseName(module.getName()); // use as is.. + } + + StringBuilder sb = new StringBuilder(); + + int cursorAdv = s.length(); + + if (commas.contains(CommaPosition.BEFORE)) { + cursorAdv += 2; + sb.append(", "); //$NON-NLS-1$ + } + + sb.append(StringUtils.defaultString(s)); + + if (commas.contains(CommaPosition.AFTER)) { + cursorAdv += 2; + sb.append(", "); //$NON-NLS-1$ + } + + try { + document.replace(fReplacementOffset, fReplacementLength, sb.toString()); + fCursorPosition = Math.max(fReplacementLength, cursorAdv); + } catch (BadLocationException x) { + } + } + + @Override + public int hashCode() { + return Objects.hashCode(module); + } + + @Override + public boolean equals(Object o) { + // not full equals, used to hide duplicated proposals only + if (o instanceof ModuleImportContextualCompletionProposal) { + ModuleImportContextualCompletionProposal p = (ModuleImportContextualCompletionProposal)o; + return module.equals(p.module); + } + return false; + } + + ModuleLocation getLocation() { + // used to sort proposal list + return location; + } + + /** + * Module file name may have wrong upper/lower case characters. + * Here we try to get true name from the module itself. + */ + private String getTrueCaseModuleName(File f) throws IOException { + String res = null; + + String fileContents = null; + if (XdsFileUtils.isSymbolFile(f.getName())) { + res = tryGetModuleNameFromSym(f); + if (res == null) { // oops. can't read it fast + fileContents = CompileDriver.decodeSymFile(f.getAbsolutePath()); // convert to .ODF ... + } + } else { + fileContents = FileUtils.readFileToString(f); + } + + if (res == null && fileContents != null) { + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(WorkbenchUtils.getActiveFile()); + XdsSourceType sourceType = ModulaFileUtils.getSourceType(f.getAbsolutePath()); + res = XdsParserManager.getModuleName(sourceType, fileContents, buildSettings); + } + return res; + } + + + /////// Read module name from SYM file. //////////// + + private String tryGetModuleNameFromSym(File f) { + FileInputStream is = null; + try { + is = new FileInputStream(f); + + if (readInt(is) != sym_magic) { + return null; + } + readInt(is); // current version + readInt(is); // sym_ident + int tag = is.read(); + if (tag != sym_hook) { + return null; // hz + } + readInt(is); // some number + + String fnameLc = FilenameUtils.getBaseName(f.getName()).toLowerCase(); + String modName = readString(is, fnameLc.length()+1); + + // 'modName' must be true-case module name. + // Check that it is case-insensitive same with the file name: + if (fnameLc.equals(modName.toLowerCase())) { + return modName; // Ok + } + } catch (Exception e) { + } finally { + if (is != null) { + IOUtils.closeQuietly(is); + } + } + return null; + } + + private final static int sym_magic = 0x4F4D53; + private final static int sym_hook = 2; + private final static int EOS = 0xA; + + // Reads packed integer + private static int readInt(FileInputStream is) throws IOException { + int x = is.read(); + if (x > 0x80 || x == -1) { + return (x - 192) & 0xff; + } + int shift = 7; + int n = x; + x = is.read(); + while (x < 0x80 && x != -1) { + n |= (x << shift); + shift += 7; + x = is.read(); + } + return n | (((x - 192) & 0xff) << shift); + } + + private static String readString(FileInputStream is, int maxLen) throws IOException { + StringBuilder sb = new StringBuilder(); + while (true) { + int ich = is.read(); + char ch = (char)ich; + if (ch == EOS || ich < 0) { + break; + } + sb.append(ch); + if (sb.length() >= maxLen) { + throw new IOException("Sym file reader: string length > " + maxLen); + } + } + return sb.toString(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/RegionType.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/RegionType.java new file mode 100644 index 0000000..c8d984b --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/RegionType.java @@ -0,0 +1,10 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +public enum RegionType { + IMPORT_STATEMENT, + MODULE, + PROCEDURE_BODY, + PROCEDURE_PARAMETERS, + DECLARATIONS, + UNKNOWN +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/SymbolResolver.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/SymbolResolver.java new file mode 100644 index 0000000..2a8c882 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/SymbolResolver.java @@ -0,0 +1,250 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Deque; +import java.util.Iterator; +import java.util.List; +import java.util.function.Function; + +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.IDocument; + +import com.excelsior.xds.core.utils.JavaUtils; +import com.excelsior.xds.parser.commons.ast.TokenType; +import com.excelsior.xds.parser.commons.symbol.ISymbol; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbolScope; +import com.excelsior.xds.parser.modula.symbol.IModuleAliasSymbol; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IArrayTypeSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IPointerTypeSymbol; + +class SymbolResolver { + static IModulaSymbol resolve(CompletionContext context, IDocument doc, String line, IModulaSymbolScope parentScope, List tokens, int tokenIdx) throws BadLocationException { + if (tokens.isEmpty() || tokenIdx < 0) { + return null; + } + + boolean inIndex = false; + boolean waitForIdentifier = false; + @SuppressWarnings("unused") + boolean wrong = false; + + Deque stack = new ArrayDeque<>(); + + List> opers = new ArrayList<>(); + + ISymbol currentSymbol = new SymbolScopeWrapper(parentScope); + + waitForIdentifier = context.isDotBeforeCursor(); + + do{ + Token t = tokens.get(tokenIdx--); + TokenType token = t.tokenType; + if (ModulaTokenTypes.WHITE_SPACE == token) { + continue; + } + + if (ModulaTokenTypes.RBRACKET == token) { + inIndex = true; + stack.push(ModulaTokenTypes.RBRACKET); + } + else if (ModulaTokenTypes.LBRACKET == token) { + if (inIndex && !stack.isEmpty()) { + if (stack.peek() == ModulaTokenTypes.RBRACKET) { + stack.pop(); + if (stack.isEmpty()) { + inIndex = false; + opers.add(ArrayIndex.INSTANCE); + } + } + else { + wrong = true; + break; + } + } + } + else if (ModulaTokenTypes.RPARENTH == token) { + if (inIndex) { + stack.push(ModulaTokenTypes.RPARENTH); + } + else { + wrong = true; + break; + } + } + else if (ModulaTokenTypes.LPARENTH == token) { + if (inIndex && stack.peek() == ModulaTokenTypes.RPARENTH) { + stack.pop(); + } + else { + wrong = true; + break; + } + + } + else if (ModulaTokenTypes.COMMA == token) { // [xx , yy] + if (inIndex) { + opers.add(ArrayIndex.INSTANCE); + } + else { + wrong = true; + break; + } + } + else if (ModulaTokenTypes.BAR == token) { // '^' + if (!inIndex) { + opers.add(Dereference.INSTANCE); + } + } + else if (ModulaTokenTypes.IDENTIFIER == token) { + if (!inIndex) { + if (waitForIdentifier) { + waitForIdentifier = false; + opers.add(new Resolve(ContentAssistUtils.region(line, t))); + } + else { + wrong = true; + break; + } + } + } + else if (ModulaTokenTypes.DOT == token) { + if (!inIndex) { + if (!waitForIdentifier) { + waitForIdentifier = true; + } + else { + wrong = true; + break; + } + } + } + else if (!inIndex) { + break; + } + } + while(tokenIdx > -1 ); + +// if (wrong) { +// return null; +// } + Collections.reverse(opers); + + for (Function f : opers) { + currentSymbol = f.apply(currentSymbol); + if (currentSymbol == null) { + break; + } + } + + return JavaUtils.as(IModulaSymbol.class, currentSymbol); + } + + static class Resolve implements Function { + private String name; + + public Resolve(String name) { + this.name = name; + } + + @Override + public ISymbol apply(ISymbol s) { + IModulaSymbol result = null; + IModulaSymbolScope scope = ModulaAssistProcessor2.getScope(s); + if (scope != null) { + result = scope.resolveName(name); + } + return getTargetSymbol(result); + } + + @Override + public String toString() { + return "Resolve(\"" + name + "\")"; + } + } + + static class ArrayIndex implements Function { + public static final ArrayIndex INSTANCE = new ArrayIndex(); + private ArrayIndex() { + } + + @Override + public IModulaSymbol apply(ISymbol s) { + s = getTargetSymbol(s); + IModulaSymbol result = null; + if (s instanceof IArrayTypeSymbol) { + result = ((IArrayTypeSymbol)s).getElementTypeSymbol(); + } + return result; + } + } + + static class Dereference implements Function { + public static final ArrayIndex INSTANCE = new ArrayIndex(); + private Dereference() { + } + + @Override + public IModulaSymbol apply(ISymbol s) { + s = getTargetSymbol(s); + IModulaSymbol result = null; + if (s instanceof IPointerTypeSymbol) { + result = ((IPointerTypeSymbol)s).getBoundTypeSymbol(); + } + return result; + } + } + + static IModulaSymbol getTargetSymbol(ISymbol s) { + if (s instanceof IModuleAliasSymbol) { + s = ((IModuleAliasSymbol)s).getReference(); + } + if (s == null || s instanceof IModuleSymbol) { + return (IModuleSymbol)s; + } + return ModulaAssistProcessor2.getTypeSymbol(s); + } + + private static class SymbolScopeWrapper implements ISymbol, IModulaSymbolScope { + private IModulaSymbolScope wrapped; + + public SymbolScopeWrapper(IModulaSymbolScope wrapped) { + this.wrapped = wrapped; + } + + @Override + public IModulaSymbol resolveName(String symbolName) { + return wrapped.resolveName(symbolName); + } + + @Override + public IModulaSymbol findSymbolInScope(String symbolName) { + return wrapped.findSymbolInScope(symbolName); + } + + @Override + public String getName() { + return null; + } + + @Override + public IModulaSymbolScope getParentScope() { + return wrapped.getParentScope(); + } + + @Override + public Iterator iterator() { + return wrapped.iterator(); + } + + @Override + public IModulaSymbol findSymbolInScope(String symbolName, + boolean isPublic) { + return wrapped.findSymbolInScope(symbolName, isPublic); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/Token.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/Token.java new file mode 100644 index 0000000..e181609 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/contentassist2/Token.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.ui.editor.modula.contentassist2; + +import com.excelsior.xds.parser.commons.ast.TokenType; + +class Token { + final TokenType tokenType; + final int offset; + final int length; + + Token(TokenType tokenType, int offset, int length) { + this.tokenType = tokenType; + this.offset = offset; + this.length = length; + } + + boolean contains(int offset) { + return this.offset <= offset && offset < this.offset + length; + } + + @Override + public String toString() { + return "Token [tokenType=" + tokenType + ", offset=" + offset + + ", length=" + length + "]"; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/facade/ActiveEditorFacade.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/facade/ActiveEditorFacade.java new file mode 100644 index 0000000..7ab0ba9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/facade/ActiveEditorFacade.java @@ -0,0 +1,18 @@ +package com.excelsior.xds.ui.editor.modula.facade; + +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +public abstract class ActiveEditorFacade +{ + public static PstLeafNode getPstLeafNode(int offset) { + return ModulaEditorSymbolUtils.getPstLeafNode(WorkbenchUtils.getActiveFile(), offset); + } + + public static ModulaAst getAst() { + return ModulaEditorSymbolUtils.getModulaAst(WorkbenchUtils.getActiveFile()); + } + +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/format/ModulaTextFormatter.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/format/ModulaTextFormatter.java new file mode 100644 index 0000000..ff0c253 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/format/ModulaTextFormatter.java @@ -0,0 +1,1149 @@ +package com.excelsior.xds.ui.editor.modula.format; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; + +import org.eclipse.core.resources.IFile; +import org.eclipse.jface.text.BadLocationException; +import org.eclipse.jface.text.DocumentRewriteSession; +import org.eclipse.jface.text.DocumentRewriteSessionType; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IDocumentExtension4; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.TextSelection; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.text.edits.MultiTextEdit; +import org.eclipse.text.edits.ReplaceEdit; +import org.eclipse.text.edits.TextEdit; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IFileEditorInput; +import org.eclipse.ui.texteditor.IDocumentProvider; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.builder.buildsettings.BuildSettingsCache; +import com.excelsior.xds.core.builders.BuildSettings; +import com.excelsior.xds.parser.commons.ParserCriticalErrorReporter; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.ast.TokenTypes; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.XdsParser; +import com.excelsior.xds.parser.modula.XdsSettings; +import com.excelsior.xds.parser.modula.XdsSourceType; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.binding.DefaultImportResolver; +import com.excelsior.xds.parser.modula.symbol.binding.IImportResolver; +import com.excelsior.xds.parser.modula.utils.ModulaFileUtils; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.NewlineSetting; +import com.excelsior.xds.ui.editor.internal.preferences.formatter.FormatterProfile.WhiteSpaceSetting; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +/** + * Modula-2 formatter to format Modula-2 source code + */ +public class ModulaTextFormatter +{ + private FormatterProfile fp; + private int tabSize = 2; + private int indentSize = 2; + private boolean useTabs = false; + private boolean mixedMode = false; // when useTabs == true + + private int indentDeclInMod; + private int indentDeclInProc; + private int indentDeclInVCT; // in VAR/CONST/TYPE + private int indentLocalProcs; + private int indentLocalMods; + private int indentStatements; + private int indentDeclOfRecFields; + private int indentInCase; + private int indentInCaseAlt; + + + //////////// + // Indents: + private static final HashSet hsVCTblockParents; // VAR/CONST/TYPE declaration block + private static final HashSet hsVCTkeywords; // VAR/CONST/TYPE keywords + // Whitespaces + private static final HashSet hsDiTriGraphs; // .. := <= >= <> << >> ** ::= + // Split lines: + private static final HashMap hmSplitAfter; + private static final HashMap hmSplitBefore; + + + private ArrayList chunks; + private ArrayList removedChunks; + private String crlf; + + private int getIndentSize(FormatterProfile fp, FormatterProfile.IndentSetting fs) { + if (fs.isRange()) { + return fp.getValue(fs); + } else { + return fp.getAsBoolean(fs) ? indentSize : 0; + } + } + + public ModulaTextFormatter() { + this(FormatterProfile.getActiveProfile()); + } + + public ModulaTextFormatter(FormatterProfile fp) { + this.fp = fp; + crlf = System.getProperty("line.separator"); //$NON-NLS-1$ + tabSize = fp.getValue(FormatterProfile.IndentSetting.TabSize); + indentSize = fp.getValue(FormatterProfile.IndentSetting.IndentSize); + + int tabm = fp.getValue(FormatterProfile.IndentSetting.TabMode); + useTabs = tabm != FormatterProfile.TABMODE_SPACES; + mixedMode = tabm == FormatterProfile.TABMODE_MIXED; + + indentDeclInMod = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclInModule); + indentDeclInProc = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclInProc); + indentDeclInVCT = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclInVCT); + indentLocalProcs = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclOfLocalProc); + indentLocalMods = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclOfLocalMods); + indentStatements = getIndentSize(fp, FormatterProfile.IndentSetting.IndentStatements); + indentDeclOfRecFields = getIndentSize(fp, FormatterProfile.IndentSetting.IndentDeclOfRecFields); + indentInCase = getIndentSize(fp, FormatterProfile.IndentSetting.IndentInCaseBody); + indentInCaseAlt = getIndentSize(fp, FormatterProfile.IndentSetting.IndentInCaseAlternative); + } + + /** + * Formats Modula-2 source code in the active editor. + */ + public void doFormat() { + doFormat(null, -1, -1, false); + } + + /** + * Indents Modula-2 source code in the active editor. + */ + public void doIndent() { + doFormat(null, -1, -1, true); + } + + /** + * + * @param editor - editor of NULL to get active editor + * @param begPos begin offset of the formatted area (-1 to examine current selection) + * @param endPos end offset of the formatted area (<=doc.getLength(), not used when begPos == -1) + */ + public void doFormat(ITextEditor editor, int begPos, int endPos, boolean indentOnly) { + try { + IDocument doc = null; + ModulaAst ast = null; + if (editor == null) { + editor = (ITextEditor) WorkbenchUtils.getActiveEditor(false); + } + if (editor != null && editor instanceof ITextEditor) { + IEditorInput input = editor.getEditorInput(); + IDocumentProvider provider = ((ITextEditor) editor).getDocumentProvider(); + doc = provider.getDocument(input); + ast = ModulaEditorSymbolUtils.getModulaAst(input); + } + if (ast == null) { + return; // Nothing to do + } + + if (begPos < 0) { + // Determine text range to format: + ISelection sel = editor.getSelectionProvider().getSelection(); + if (!(sel instanceof TextSelection)) { + return; // Nothing to format + } + TextSelection textSelection = (TextSelection)sel; + int tmp = textSelection.getStartLine(); + begPos = doc.getLineOffset(tmp); + tmp = textSelection.getEndLine(); + endPos = doc.getLineOffset(tmp) + doc.getLineLength(tmp); + } + + if (begPos < 0 || endPos <= begPos) { + return; // hz what to do + } + + doFormat(doc, ast, begPos, endPos, indentOnly); + + } catch (Exception e) { + System.out.println("Format exeption: "); //$NON-NLS-1$ + e.printStackTrace(); + } + } + + /** + * Calculates max() indent level for the given lines + */ + public int calcMaxIndentLevel(ITextEditor editor, List lineNums) { + try { + IDocument doc = null; + ModulaAst ast = null; + IDocumentProvider provider = ((ITextEditor) editor).getDocumentProvider(); + IEditorInput input = editor.getEditorInput(); + if ((provider != null) && (input instanceof IFileEditorInput)) { + IFile ifile = ((IFileEditorInput)input).getFile(); + doc = provider.getDocument(input); + XdsSourceType sourceType = ModulaFileUtils.getSourceType(input.getName()); + BuildSettings buildSettings = BuildSettingsCache.createBuildSettings(ifile); + ParserCriticalErrorReporter errorReporter = ParserCriticalErrorReporter.getInstance(); + IImportResolver defaultImportResolver = new DefaultImportResolver(buildSettings, errorReporter, null); + XdsParser parser = new XdsParser(null, doc.get(), new XdsSettings(buildSettings, sourceType), defaultImportResolver, errorReporter); + ast = parser.parseModule(); + } + if (ast == null) { + return -1; // Nothing to do + } + + buildChunksModel(doc, ast, doc.getLength()); + if (chunks.size() == 0) { + return -1; // Nothing to do + } + + int max = -1; + for (int lnum : lineNums) { + int chunkIdx = chunkIdxAtPos(doc.getLineOffset(lnum)); + int il = calcIndentLevel(chunkIdx); + if (il > max) max = il; + } + return max; + + } catch (Exception e) {} + + return -1; + } + + + /** + * + * @param document + * @param ast + * @param begPos begin offset of the formatted area (0 to format all) + * @param endPos end offset of the formatted area (doc.getLength() to format all) + */ + public void doFormat(IDocument doc, ModulaAst ast, int begPos, int endPos, boolean indentOnly) throws Exception { + buildChunksModel(doc, ast, doc.getLength()); + if (chunks.size() == 0) { + return; // Nothing to do + } + + int firstChunkIdx = chunkIdxAtPos(begPos); + int lastChunkIdx = chunkIdxAtPos(endPos-1); + + { // Fix selection margins to include whole chunks: + begPos = chunks.get(firstChunkIdx).getOffsetInDoc(); + Chunk c = chunks.get(lastChunkIdx); + endPos = c.getOffsetInDoc() + c.getLengthInDoc(); + } + + + if (lastChunkIdx == chunks.size()-1) { + // chunks[lastChunkIdx+1] should always be some chunk with offset, + // it will be required to build format edits from chunk model + chunks.add(Chunk.createNoPlnChunkFromDoc(doc, doc.getLength(), 0)); + } + + // lastChunkIdx may be changed with model so use terminalChunk: + Chunk terminalChunk = chunks.get(lastChunkIdx+1); + + if (!indentOnly) { + processNewLines(doc, firstChunkIdx, terminalChunk); + } + + processWhitespaces(doc, firstChunkIdx, terminalChunk, indentOnly); + + if (!indentOnly) { + processWrapLines(doc, firstChunkIdx, terminalChunk); + } + + ArrayList edits = buildEditsFromModel(doc, firstChunkIdx, terminalChunk); + + DocumentRewriteSession drws = null; + try { + if (doc instanceof IDocumentExtension4) { + drws = ((IDocumentExtension4)doc).startRewriteSession(DocumentRewriteSessionType.UNRESTRICTED); + } + MultiTextEdit edit= new MultiTextEdit(0, doc.getLength()); + edit.addChildren((TextEdit[]) edits.toArray(new TextEdit[edits.size()])); + edit.apply(doc, TextEdit.CREATE_UNDO); + } + finally { + if (doc instanceof IDocumentExtension4 && drws != null) { + ((IDocumentExtension4)doc).stopRewriteSession(drws); + } + } + } + + + public int getTabSize() { + return tabSize; + } + + public int getIndentSize() { + return indentSize; + } + + public int getIndentDeclInVCT() { + return indentDeclInVCT; + } + + public int getIndentInCase() { + return indentInCase; + } + + public int getIndentStatements() { + return indentStatements; + } + + public int getIndentDeclOfRecFields() { + return indentDeclOfRecFields; + } + + private int chunkIdxAtPos(int pos) { + for (int i=0; i(); + removedChunks = new ArrayList(); + collectChunks(doc, ast); + Collections.sort(chunks, new Comparator() { + public int compare(Chunk a, Chunk b) { + return a.getOffsetInDoc() - b.getOffsetInDoc(); + } + }); + + // Fix holes and check for overlaps if any + if (chunks.size() > 0) { + int holesCounter = 0; + int pos = 0; + for (int i=0; i pos) { + ++holesCounter; + chunks.add(i, Chunk.createNoPlnChunkFromDoc(doc, pos, offs-pos)); + pos = offs; + System.out.println("Hole offs=" + pos + " text = '" + chunks.get(i).getText() + "'"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + } else { + pos = offs + c.getLengthInDoc(); + } + } + if (holesCounter > 0) { + System.out.println("Formatter varning: " + holesCounter + " holes inside PstLeafNodes found."); //$NON-NLS-1$ //$NON-NLS-2$ + } + if (pos < docLen) { + chunks.add(Chunk.createNoPlnChunkFromDoc(doc, pos, docLen-pos)); + System.out.println("Formatter varning: no PstLeafNode covers the end of text (length = " + (docLen - pos) + ")"); //$NON-NLS-1$ //$NON-NLS-2$ + } + + Chunk last = chunks.get(chunks.size()-1); + if (last.getOffsetInDoc() + last.getLengthInDoc() != docLen) { + throw new Exception ("Formatter: last Chunk exceeds the document size"); //$NON-NLS-1$ + } + + //Split 'raw' whitespaces to whitespace and newline chunks: + int eolPos = -1; + int eolLen = 0; + for (int i=0; i= c.getOffsetInDoc() + c.getLengthInDoc()) { + continue; // next CRLF is outside this chunk + } + //--- Split it: + Chunk cNewLine = Chunk.createNewlineChunkFromDoc(doc, eolPos, eolLen); + int endC = c.getOffsetInDoc() + c.getLengthInDoc(); + int endEol = eolPos + eolLen; + Chunk cWhiteTail = (endC > endEol) ? Chunk.createWhitespaceChunkFromDoc(doc, endEol, endC-endEol) : null; + if (c.getOffsetInDoc() < eolPos) { + // trim c: + c.trimChunkFromDoc(eolPos - c.getOffsetInDoc()); + // insert Newline chunk after c: + chunks.add(++i, cNewLine); + } else { + // c starts at EOL so replace c with cNewLine: + chunks.set(i, cNewLine); + } + // insert tail of initial whitespace after NewLine if any: + if (cWhiteTail != null) { + chunks.add(i+1, cWhiteTail); // don't ++ i to continue from this chunk + } + } + } + } + } + + private ArrayList buildEditsFromModel(IDocument doc, int firstChunkIdx, Chunk terminalChunk) throws BadLocationException { + ArrayList res = new ArrayList(); + + for (Chunk c : removedChunks) { + if (c.getOffsetInDoc() >= 0) { + res.add(new ReplaceEdit(c.getOffsetInDoc(), c.getLengthInDoc(), "")); //$NON-NLS-1$ + } + } + + StringBuilder sb = new StringBuilder(); + + for (int cidx = firstChunkIdx; true; cidx++) { + Chunk c = chunks.get(cidx); + + int docOffs = c.getOffsetInDoc(); + + if (docOffs >= 0) { // last will be terminaChunk. It allways has document offset so last 'sb' will be purged if any + if (sb.length() > 0) { + res.add(new ReplaceEdit(docOffs, 0, sb.toString())); + sb.setLength(0); + } + + if (c.isTextChanged()) { + String oldTxt = doc.get(c.getOffsetInDoc(), c.getLengthInDoc()); + if (!oldTxt.equals(c.getText())) { // really changed? + res.add(new ReplaceEdit(c.getOffsetInDoc(), c.getLengthInDoc(), c.getText())); + } + } + } else { + sb.append(c.getText()); + } + + if (c == terminalChunk) { + break; + } + } + + + return res; + } + + + + private void processWhitespaces(IDocument doc, int firstChunkIdx, Chunk terminalChunk, boolean indentOnly) throws Exception { + for (int cidx = firstChunkIdx; true; cidx++) { + Chunk c = chunks.get(cidx); + if (c == terminalChunk) { + break; + } + + Chunk cPrev = (cidx > 0) ? chunks.get(cidx-1) : null; + WhiteSpaceSetting wssPrev = null; + if (cPrev != null) { + PstLeafNode pln = cPrev.getPstLeafNode(); + if (pln != null) { + wssPrev = fp.searchWhiteSpaceSetting(pln); + } + } + + Chunk cNext = chunks.get(cidx+1); + WhiteSpaceSetting wssNext = null; + if (cNext != null) { + PstLeafNode pln = cNext.getPstLeafNode(); + if (pln != null) { + wssNext = fp.searchWhiteSpaceSetting(pln); + } + } + + if (c.isNewLine()) { + // nothing for now + } else if (cPrev==null || cPrev.isNewLine()) { // 1st chunk in the line + + int lev = calcIndentLevel(cidx); + if (lev >= 0) { + // Create indent: + String indent = constructIndent(lev, c.isWhitespace() ? c.getText() : null); + + if (c.isWhitespace()) { + if (!indent.equals(c.getText())) { + // replace 'c' with 'indent': insert 'indent' _after_ 'c' and remove 'c' - it + // will not move possible markers at 0 position + c.setNewText(indent); + } + } else if (!indent.isEmpty()) { + // insert 'indent' before 'c' + chunks.add(cidx, Chunk.createWhitespaceChunk(indent)); + } + } + } else if (!indentOnly){ // chunk inside line, not 1st: + + if (c.isWhitespace()) { + boolean preserve = true; + if (wssPrev != null || wssNext != null) { + preserve = !((wssPrev==null || !fp.isInsSpaceAfter(wssPrev)) && + (wssNext==null || !fp.isInsSpaceBefore(wssNext))); + } + if (!preserve) { + removedChunks.add(c); + chunks.remove(cidx); + --cidx; + } else { + // all preserved whitespaces inside line replace with single " " + if (!" ".equals(c.getText())) { //$NON-NLS-1$ + c.setNewText(" "); //$NON-NLS-1$ + } + } + } else { + if (wssPrev != null && fp.isInsSpaceAfter(wssPrev)) { + // insert space after cPrev + chunks.add(cidx, Chunk.createWhitespaceChunk(" ")); //$NON-NLS-1$ + } else { + if (cPrev == null || cPrev.isWhitespace() || cPrev.isNewLine()) { + // chunk after newline or whitespace - never insert space before + } else { + PstLeafNode pln = c.getPstLeafNode(); + if (pln != null) { + WhiteSpaceSetting wssC = fp.searchWhiteSpaceSetting(pln); + if (wssC != null && fp.isInsSpaceBefore(wssC)) + { + // insert space before c + chunks.add(cidx, Chunk.createWhitespaceChunk(" ")); //$NON-NLS-1$ + } + } + } + } + } + } + + } // for + } + + + + private void processNewLines(IDocument doc, int firstChunkIdx, Chunk terminalChunk) throws Exception { + int spaceBeg = firstChunkIdx; // idx of 1st chunk after previous non-whitespace and non-newline chunk (cPrev) + int spaceCRLFs = 0; // number of newline chunks inside [spaceBeg .. cidx[ + + int delayedNewlines = -1; // getInsNewLinesAfter() for [spaceBeg-1] + + for (int cidx = firstChunkIdx; true; cidx++) { + Chunk c = chunks.get(cidx); + if (c == terminalChunk) { + break; + } + + if (c.isWhitespace()) { + continue; + } + + if (c.isNewLine()) { + ++spaceCRLFs; + continue; + } + + int cBeforeNL = -1; + int cAfterNL = -1; + PstLeafNode pln = c.getPstLeafNode(); + if (pln != null) { + NewlineSetting ss = fp.searchStmtSetting(pln); + if (ss != null) { + cBeforeNL = fp.getInsNewLinesBefore(ss); + cAfterNL = fp.getInsNewLinesAfter(ss); + } + } + + // prefNL - preferred number of newlines for 'space' (or -1 when hz) + int prefNL = Math.max(cBeforeNL, delayedNewlines); + //if (prefNL < 0) prefNL = 0; + + if (prefNL >= 0 && spaceBeg > firstChunkIdx) { + // adjust number of newlines inside 'space' + // indents will be formatted on the next 'whitespace' walk + if (prefNL > spaceCRLFs) { + while (spaceCRLFs++ < prefNL) { + chunks.add(cidx, Chunk.createNewlineChunk(crlf)); + ++cidx; + } + } else if (prefNL < spaceCRLFs) { + // Turned off ability to decrease newlines number to preferred. We never removes newlines now. + // while (spaceCRLFs-- > prefNL) { + // Chunk ccc; + // while ((ccc = chunks.get(spaceBeg)).isWhitespace()) { + // removedChunks.add(ccc); + // chunks.remove(spaceBeg); + // --cidx; + // } + // if (!ccc.isNewLine()) { + // System.out.println("Formatter int. error at processNewLines()"); //$NON-NLS-1$ + // throw new Exception("formatter int. error"); //$NON-NLS-1$ + // } + // removedChunks.add(ccc); + // chunks.remove(spaceBeg); + // --cidx; + // } + } + } + + // c is non-whitespace and non-newline: + delayedNewlines = cAfterNL; + spaceBeg = cidx+1; + spaceCRLFs = 0; + } + + } + + private class SplitPos { + SplitPos(Chunk chunk, boolean before, int weight, int posInLine) { + this.chunk = chunk; + this.before = before; + this.weight = weight; + this.posInLine = posInLine; + } + Chunk chunk; + boolean before; + int weight; + int posInLine; + } + + private void processWrapLines(IDocument doc, int firstChunkIdx, Chunk terminalChunk) throws Exception { + int lineLimit = fp.getWrappingWidth(); + int posInLine = 0; + ArrayList splitPosList = new ArrayList(); + int cntInLine = 0; + + for (int cidx = firstChunkIdx; true; ++cidx) { + Chunk c2 = chunks.get(cidx); + if (c2 == terminalChunk) { + break; + } + + ++cntInLine; + + PstLeafNode pln = c2.getPstLeafNode(); + IElementType et = pln == null ? null : pln.getElementType(); + + int cLen = c2.getText().length(); + if (c2.isNewLine()) { + posInLine = 0; + cntInLine = 0; + splitPosList.clear(); + continue; + } + + // + // Want to split the line? + // + if (posInLine + cLen > lineLimit) { + if (pln != null && (ModulaTokenTypes.BLOCK_COMMENT.equals(et) || ModulaTokenTypes.END_OF_LINE_COMMENT.equals(et))) { + //////// ignore comments for now + } else { + // Heuristic search for best split position: + // summary weight is (position in the string) * (split weight) + int sw = -1; + SplitPos splitPos = null; + for (SplitPos sp : splitPosList) { + int x = sp.weight * sp.posInLine; + if (x >= sw ) { + sw = x; + splitPos = sp; + } + } + if (splitPos != null) { + // Do split here: + int splitChunkIdx = chunks.indexOf(splitPos.chunk); + int crlfIdx = splitChunkIdx; + if (!splitPos.before || splitPos.chunk.isWhitespace()) { + ++crlfIdx; + } + + // prepare indent: + String indent = ""; //$NON-NLS-1$ + PstLeafNode plnNext = null; + for (int i = crlfIdx; i < chunks.size() && plnNext == null; ++i) { + plnNext = chunks.get(i).getPstLeafNode(); + } + if (plnNext != null) { + int lev = calcIndentLevel(plnNext); + indent = constructIndent(lev, ""); //$NON-NLS-1$ + } + + // -- Do split: + // cut EOL whitespace if any: + if (crlfIdx > 0 && chunks.get(crlfIdx-1).isWhitespace()) { + chunks.remove(crlfIdx); + --crlfIdx; + --cidx; + } + chunks.add(crlfIdx, Chunk.createNewlineChunk(crlf)); + ++cidx; + if (!indent.isEmpty()) { + chunks.add(crlfIdx+1, Chunk.createWhitespaceChunk(indent)); + ++cidx; + } + + // begin of new line: : + splitPosList.clear(); + // re-calculate posInLine and cntInLine for chunks[cidx]: + posInLine = 0; + cntInLine = 0; + for (int i = crlfIdx + 1; i < cidx; ++i) { + posInLine += chunks.get(i).getText().length(); + ++cntInLine; + } + } + } + } + + // Collect candidates to split positions: + Integer integer; + if (cntInLine > 1 && (integer = hmSplitAfter.get(et)) != null) { + splitPosList.add(new SplitPos(c2, false, integer.intValue(), posInLine + cLen)); + } + + if (cntInLine > 2 && (integer = hmSplitBefore.get(et)) != null) { + splitPosList.add(new SplitPos(c2, true, integer.intValue(), posInLine)); + } + + posInLine += cLen; + + } + } + + +//XXX ìîæåò îñòàâèòü ýòó ïðîâåðÿëêó è ïðèìåíÿòü âñåãäà? íà âñÿêèé ñëó÷àé.... +// +// private boolean isRequiredWhitespace(Chunk cPrev, Chunk cNext, IDocument doc) { +// if (cPrev == null || cNext == null) { +// return false; // out of formatted area, area is whole strings +// } +// try { +// String sP = cPrev.getText(doc); +// String sN = cNext.getText(doc); +// char chP = Character.toUpperCase(sP.charAt(sP.length()-1)); +// boolean b1 = (chP>='A' && chP <='Z') || (chP>='0' && chP<='9') || chP=='_'; +// char chN = Character.toUpperCase(sN.charAt(0)); +// boolean b2 = (chN >= 'A' && chN <= 'Z') || (chN>='0' && chN<='9') || chN == '_'; +// if (b1 && b2 || (chP == '.' && chN == '.')) { +// return true; // whitespace between two identifiers/operators/num.constants/"3. .3" +// } +// +// if (hsDiTriGraphs.contains(sP + sN)) { +// return true; +// } +// +// return false; // No need to preserve space +// } catch (Exception e) {} +// +// return true; +// } + + + + /** + * + * @param lev - indent level (in characters on the screen) + * @param oldIndent - current indent of this line (for mixed mode) or null + * @return string with tabs and spaces + */ + public String constructIndent(int lev, String oldIndent) { + String indent = ""; //$NON-NLS-1$ + // Create indent: + if (lev > 0) { + char seq[] = new char[lev]; + if (!useTabs) { + for (int i = 0; i < lev; ++i) seq[i] = ' '; + } else { + if (!mixedMode || oldIndent == null) { + for (int i = 0; i < lev; ++i) seq[i] = '\t'; + } else { + // preserve tabs/spaces sequence from beffining of the line as far as it is possible + for (int i=0; i lev) { + break; + } + indent += ch; + pos += cx; + if (pos == lev) { + break; + } + } + while(pos++ < lev) { + indent += ' '; + } + } + return indent; + } + + + private int calcIndentLevel(int cidx) { + if (cidx>0 && !chunks.get(cidx-1).isNewLine()) { + return -1; // hz. start of line expected + } + + // cidx - start of some string + // here may be whitespace or smth else with pstnode. skip to 1st normal chunk + PstLeafNode pln = null; + for (; cidx < chunks.size(); ++cidx) { + Chunk c = chunks.get(cidx); + if (c.isNewLine()) { + return -1; + } + pln = c.getPstLeafNode(); + if (pln != null) { + break; + } + } + if (pln == null) return -1; // no normal chunks in this line + + return calcIndentLevel(pln); + } + + private int calcIndentLevel(PstLeafNode pln) { + int lev = 0; + int inModuleDecl = 0; + int inProcDecl = 0; + int localProcLev = -1; + int localModsLev = 0; + int inStmtLst = 0; + int inRec = 0; + int inCase = 0; + boolean isInExpression = false; + boolean isInParams = false; + boolean isCaseAlt = false; + for (PstNode pn = pln.getParent(); pn != null ; pn = pn.getParent()) { + IElementType et = pn.getElementType(); + + // Procedure/module declarations, local procedures: + if (et.equals(ModulaElementTypes.DECLARATIONS)) { + IElementType pt = pn.getParent().getElementType(); + if (pt.equals(ModulaElementTypes.PROGRAM_MODULE) || + pt.equals(ModulaElementTypes.LOCAL_MODULE) || + pt.equals(ModulaElementTypes.DEFINITION_MODULE) ) + { + ++inModuleDecl; + } else if (pt.equals(ModulaElementTypes.PROCEDURE_DECLARATION) || + pt.equals(ModulaElementTypes.OBERON_METHOD_DECLARATION)) + { + ++inProcDecl; + } + } else if (et.equals(ModulaElementTypes.PROCEDURE_DECLARATION)) { + ++localProcLev; + if (localProcLev > 0) --inProcDecl; + } else if (et.equals(ModulaElementTypes.LOCAL_MODULE)) { + ++localModsLev; + // Records: + } else if (et.equals(ModulaElementTypes.RECORD_FIELD_BLOCK_LIST) && ModulaElementTypes.RECORD_TYPE_DEFINITION.equals(pn.getParent().getElementType())) { + ++inRec; + // CASE in variant records: + } else if (et.equals(ModulaElementTypes.RECORD_VARIANT_LIST)) { // whole case body + ++inCase; + if (pln.getElementType().equals(ModulaTokenTypes.SEP)) { // | 1..2: ('|' before 1st alternative) + isCaseAlt = true; + } + } else if (et.equals(ModulaElementTypes.RECORD_VARIANT_LABEL_LIST)) { // 1..2: + isCaseAlt = true; + } else if (et.equals(ModulaElementTypes.RECORD_VARIANT)) { + if (pln.getElementType().equals(ModulaTokenTypes.SEP)) { // | 1..2: + isCaseAlt = true; + } + } else if (et.equals(ModulaElementTypes.RECORD_VARIANT_ELSE_PART)) { + if (pln.getElementType().equals(ModulaTokenTypes.ELSE_KEYWORD)) { // ELSE + isCaseAlt = true; + } + // CASE operator: + } else if (et.equals(ModulaElementTypes.CASE_VARIANT_LIST)) { + ++ inCase; + if (pln.getElementType().equals(ModulaTokenTypes.SEP)) { + isCaseAlt = true; + } + } else if (et.equals(ModulaElementTypes.CASE_LABEL_LIST)) { + isCaseAlt = true; + } else if (et.equals(ModulaElementTypes.CASE_ELSE_PART)) { + if (pln.getElementType().equals(ModulaTokenTypes.ELSE_KEYWORD)) { + isCaseAlt = true; + } + // Statement list (usual and in CASE): + } else if (et.equals(ModulaElementTypes.STATEMENT_LIST)) { + IElementType pet = pn.getParent().getElementType(); + if (pet.equals(ModulaElementTypes.CASE_VARIANT) || pet.equals(ModulaElementTypes.CASE_ELSE_PART)) { + // statement list of CASE variant: + } else { + // usual statement list: + ++ inStmtLst; + } + } else if (et.equals(ModulaElementTypes.EXPRESSION)) { + // expression splited to the next string: + isInExpression = true; + } else if (et.equals(ModulaElementTypes.FORMAL_PARAMETER_LIST)) { + isInParams = true; + } + + // System.out.print(et.toString() + " "); + + if (indentDeclInVCT > 0) { + if (hsVCTblockParents.contains(et)) { + lev += indentSize; + } + } + } // for + + if (indentDeclInVCT > 0 && hsVCTkeywords.contains(pln.getElementType()) && lev > 0) { + lev -= indentSize; + } + + lev += inModuleDecl * indentDeclInMod; + lev += inStmtLst * indentStatements; + lev += inRec * indentDeclOfRecFields; + lev += inCase * (indentInCase + indentInCaseAlt); + if (inProcDecl > 0) lev += inProcDecl * indentDeclInProc; + if (localProcLev > 0) lev += localProcLev * indentLocalProcs; + if (localModsLev > 0) lev += localModsLev * indentLocalMods; + if (isCaseAlt && (inCase > 0)) { + lev -= indentInCaseAlt; + } + + // Need to tune separately? Use indentStatements for now: + if (isInExpression) lev += indentStatements; + if (isInParams) lev += indentStatements; + + // System.out.println(""); + return lev; + } + + + static { + hsVCTblockParents = new HashSet(); + hsVCTblockParents.add(ModulaElementTypes.CONSTANT_DECLARATION_BLOCK); + hsVCTblockParents.add(ModulaElementTypes.TYPE_DECLARATION_BLOCK); + hsVCTblockParents.add(ModulaElementTypes.VARIABLE_DECLARATION_BLOCK); + + hsVCTkeywords = new HashSet(); + hsVCTkeywords.add(ModulaTokenTypes.CONST_KEYWORD); + hsVCTkeywords.add(ModulaTokenTypes.TYPE_KEYWORD); + hsVCTkeywords.add(ModulaTokenTypes.VAR_KEYWORD); + + hsDiTriGraphs = new HashSet(); + for (String s : new String[]{"..", ":=", "<=", ">=", "<>", "<<", ">>", "**", "::="}) { //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$ //$NON-NLS-8$ //$NON-NLS-9$ + hsDiTriGraphs.add(s); + } + + hmSplitAfter = new HashMap(); + hmSplitAfter.put(ModulaTokenTypes.COMMA, 80); // , + hmSplitAfter.put(ModulaTokenTypes.SEMICOLON, 90); // ; + hmSplitAfter.put(ModulaTokenTypes.BECOMES, 20); // := + + hmSplitBefore = new HashMap(); + hmSplitBefore.put(ModulaTokenTypes.NOT, 60); // ~ + hmSplitBefore.put(ModulaTokenTypes.LPARENTH, 50); // ( + hmSplitBefore.put(ModulaTokenTypes.LBRACKET, 50); // [ + hmSplitBefore.put(ModulaTokenTypes.PLUS, 55); // + + hmSplitBefore.put(ModulaTokenTypes.MINUS, 55); // - + hmSplitBefore.put(ModulaTokenTypes.TIMES, 55); // * + hmSplitBefore.put(ModulaTokenTypes.SLASH, 55); // / + hmSplitBefore.put(ModulaTokenTypes.SEP, 60); // | + hmSplitBefore.put(ModulaTokenTypes.AND, 60); // & + hmSplitBefore.put(ModulaTokenTypes.EQU, 70); // = + hmSplitBefore.put(ModulaTokenTypes.NEQ, 70); // # <> + hmSplitBefore.put(ModulaTokenTypes.LSS, 70); // < + hmSplitBefore.put(ModulaTokenTypes.GTR, 70); // > + hmSplitBefore.put(ModulaTokenTypes.LTEQ, 70); // <= + hmSplitBefore.put(ModulaTokenTypes.GTEQ, 70); // >= + hmSplitBefore.put(ModulaTokenTypes.LEFT_SHIFT, 70); // << + hmSplitBefore.put(ModulaTokenTypes.RIGHT_SHIFT, 70); // >> + hmSplitBefore.put(ModulaTokenTypes.EXPONENT, 70); // ** + hmSplitBefore.put(ModulaTokenTypes.WHITE_SPACE, 10); // ' ' - particular case of splitBefore + + } + + ///////////////////////////////////////////////////////////////////////////////// + + /** + * Chunk may be: + * - normal chunk refers to its (not-whitespace) PstLeafNode + * - WhiteSpace chunk - sequence of blanks and tabs (w/o CRLF inside) + * - NewLine chunk - line delimeter + * + * @author fsa + * + */ + private static class Chunk { + private static final int CT_PLN_OR_NULL = 0; + private static final int CT_WHITE_SPACE = 1; + private static final int CT_NEW_LINE = 2; + + private PstLeafNode pln; + protected int offsInDoc; + private int lenInDoc; + private int ctype; + private String text; + private boolean isTextChanged; + + /** + * Creates 'primary' chunk with offsetInDoc/lenInDoc. + * + * @param doc + * @param pln + * @return + * @throws BadLocationException + */ + public static Chunk createPlnChunkFromDoc(IDocument doc, PstLeafNode pln) throws BadLocationException { + Chunk chunk = new Chunk(doc, pln.getOffset(), pln.getLength(), CT_PLN_OR_NULL); + chunk.offsInDoc = pln.getOffset(); + chunk.lenInDoc = pln.getLength(); + if (pln.getToken() == TokenTypes.WHITE_SPACE) { + // Note: Initial 'raw' whitespaces will be splitted to CT_WHITE_SPACE & CT_NEW_LINE + // It not requires leafNode (and splitter don't know what to do with this node) + chunk.ctype = CT_WHITE_SPACE; + } else { + chunk.pln = pln; + } + return chunk; + } + + /** + * Creates 'primary' chunk with offsetInDoc/lenInDoc and without leaf node for 'bad' uncovered ranges in source. + * This chunk may be created when bugging parser was not covered all document with leaf nodes. + * + * @param doc + * @param offsInDoc + * @param lenInDoc + * @return + * @throws BadLocationException + */ + public static Chunk createNoPlnChunkFromDoc(IDocument doc, int offsInDoc, int lenInDoc) throws BadLocationException { + return new Chunk(doc, offsInDoc, lenInDoc, CT_PLN_OR_NULL); + } + + /** + * Creates 'primary' chunk + */ + public static Chunk createWhitespaceChunkFromDoc(IDocument doc, int offsInDoc, int lenInDoc) throws BadLocationException { + return new Chunk(doc, offsInDoc, lenInDoc, CT_WHITE_SPACE); + } + + /** + * Creates primary chunk + */ + public static Chunk createNewlineChunkFromDoc(IDocument doc, int offsInDoc, int lenInDoc) throws BadLocationException { + return new Chunk(doc, offsInDoc, lenInDoc, CT_NEW_LINE); + } + + /** + * Creates 'new' chunk with offsetInDoc/lenInDoc == -1/-1 + */ + public static Chunk createWhitespaceChunk(String text) { + return new Chunk(text, CT_WHITE_SPACE); + } + + /** + * Creates 'new' chunk with offsetInDoc/lenInDoc == -1/-1 + */ + public static Chunk createNewlineChunk(String text) { + return new Chunk(text, CT_NEW_LINE); + } + + + + private Chunk(IDocument doc, int offsInDoc, int lenInDoc, int ctype) throws BadLocationException { + this(doc.get(offsInDoc, lenInDoc), ctype); + this.offsInDoc = offsInDoc; + this.lenInDoc = lenInDoc; + this.pln = null; + } + + + private Chunk(String text, int ctype) { + this.text = text; + this.ctype = ctype; + isTextChanged = false; + offsInDoc = -1; + lenInDoc = -1; + } + + + public void trimChunkFromDoc(int newLenInDoc) { + this.lenInDoc = newLenInDoc; + text = text.substring(0, newLenInDoc); + } + + /** + * @return offset of chunk prototype in document or -1 when it is new chunk + */ + public int getOffsetInDoc() { + return offsInDoc; + } + + /** + * @return length of chunk prototype in document or -1 when it is new chunk + */ + public int getLengthInDoc() { + return lenInDoc; + } + + public String getText() { + return text; + } + + public void setNewText(String s) { + text = s; + isTextChanged = true; + } + + public PstLeafNode getPstLeafNode() { + return pln; + } + + public boolean isWhitespace() { + return ctype == CT_WHITE_SPACE; + } + + public boolean isNewLine() { + return ctype == CT_NEW_LINE; + } + + public boolean isTextChanged() { + return isTextChanged; + } + } + + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlink.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlink.java new file mode 100644 index 0000000..4195460 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlink.java @@ -0,0 +1,118 @@ +package com.excelsior.xds.ui.editor.modula.hyperlink; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.hyperlink.IHyperlink; + +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.core.log.LogHelper; +import com.excelsior.xds.core.resource.ResourceUtils; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +/** + * Modula-2/Oberon-2 symbol declaration hyperlink. + */ +public class ModulaDeclarationHyperlink implements IHyperlink +{ + private final int offset, length; + private final IRegion region; + private final IFile efile; + private final IFileStore fileStore; + + /** + * Creates a new Modula-2/Oberon-2 symbol declaration element hyperlink. + * + * @param symbol the Modula-2/Oberon-2 symbol to open . + * @param region the region of the link + * @param files a file which contains the symbol definition + */ + public ModulaDeclarationHyperlink( IModulaSymbol symbol, IRegion region + , IFile file ) + { + this.offset = symbol.getPosition().getOffset(); + this.length = symbol.getName().length(); + this.region = region; + this.efile = file; + this.fileStore = ResourceUtils.toFileStore(file); + } + + /** + * Creates a new Modula-2/Oberon-2 symbol declaration element hyperlink. + * + * @param symbol the Modula-2/Oberon-2 symbol to open . + * @param region the region of the link + * @param files a file which contains the symbol definition + */ + public ModulaDeclarationHyperlink( IModulaSymbol symbol, IRegion region + , IFileStore fileStore ) + { + this.offset = symbol.getPosition().getOffset(); + this.length = symbol.getName().length(); + this.region = region; + this.efile = null; + this.fileStore = fileStore; + } + + /** + * Creates a new Modula-2/Oberon-2 symbol declaration element hyperlink. + * + * @param node the Ast node to open . + * @param region the region of the link + * @param files a file which contains the symbol definition + */ + public ModulaDeclarationHyperlink( PstNode node, IRegion region + , IFile file ) + { + this.offset = node.getOffset(); + this.length = node.getLength(); + this.region = region; + this.efile = file; + this.fileStore = ResourceUtils.toFileStore(file); + } + + /** + * {@inheritDoc} + */ + @Override + public void open() { + try { + if (efile != null) { + CoreEditorUtils.openInEditor(efile, true, offset, length); + } + else if (fileStore != null) { + CoreEditorUtils.openInEditor(fileStore, true, offset, length); + } + } catch (CoreException e) { + LogHelper.logError(e); + } + } + + /** + * {@inheritDoc} + */ + @Override + public IRegion getHyperlinkRegion() { + return region; + } + + /** + * {@inheritDoc} + */ + @Override + public String getHyperlinkText() { + return null; + } + + /** + * {@inheritDoc} + */ + @Override + public String getTypeLabel() { + return Messages.HyperlinkText_ModulaDeclaration; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlinkDetector.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlinkDetector.java new file mode 100644 index 0000000..6621710 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/hyperlink/ModulaDeclarationHyperlinkDetector.java @@ -0,0 +1,200 @@ +package com.excelsior.xds.ui.editor.modula.hyperlink; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; +import java.util.List; + +import org.eclipse.core.filesystem.IFileStore; +import org.eclipse.core.resources.IFile; +import org.eclipse.core.resources.IProject; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.Region; +import org.eclipse.jface.text.hyperlink.AbstractHyperlinkDetector; +import org.eclipse.jface.text.hyperlink.IHyperlink; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.ide.utils.CoreEditorUtils; +import com.excelsior.xds.parser.commons.ast.IAstFrameNode; +import com.excelsior.xds.parser.commons.ast.IElementType; +import com.excelsior.xds.parser.commons.pst.PstCompositeNode; +import com.excelsior.xds.parser.commons.pst.PstLeafNode; +import com.excelsior.xds.parser.commons.pst.PstNode; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.parser.modula.ast.ModulaElementTypes; +import com.excelsior.xds.parser.modula.ast.tokens.ModulaTokenTypes; +import com.excelsior.xds.parser.modula.symbol.IModulaSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDeclarationSymbol; +import com.excelsior.xds.parser.modula.symbol.IProcedureDefinitionSymbol; +import com.excelsior.xds.parser.modula.symbol.type.IForwardTypeSymbol; +import com.excelsior.xds.parser.modula.utils.ModulaSymbolUtils; +import com.excelsior.xds.ui.editor.modula.ModulaEditor; +import com.excelsior.xds.ui.editor.modula.utils.ModulaAstUtils; +import com.excelsior.xds.ui.editor.modula.utils.ModulaEditorSymbolUtils; + +/** + * Modula-2/Oberon-2 symbol declaration hyperlink detector. + * + * NOTE: this method used by eclipse to show hyperlinks AND from OpenDeclarationsAction to process F3 key + */ +public class ModulaDeclarationHyperlinkDetector extends AbstractHyperlinkDetector +{ + private static final HashSet hsFramedNodesToSkip; + static { // framed elements to don't jump on + hsFramedNodesToSkip = new HashSet(); + hsFramedNodesToSkip.add(ModulaTokenTypes.BY_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.DO_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.OF_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.RETURN_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.THEN_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.TO_KEYWORD); + hsFramedNodesToSkip.add(ModulaTokenTypes.SEP); + } + + /** + * {@inheritDoc} + */ + @Override + public IHyperlink[] detectHyperlinks( ITextViewer textViewer + , IRegion region + , boolean canShowMultipleHyperlinks ) + { + ITextEditor editor = (ITextEditor)getAdapter(ITextEditor.class); + if ((region == null) || !(editor instanceof ModulaEditor)) { + return null; + } + + int offset = region.getOffset(); + + ModulaAst ast = ModulaAstUtils.getAstIfUpToDate((ModulaEditor)editor); + if (ast == null) { + return null; // No up to date ast :( + } + IProject project = CoreEditorUtils.getIProjectFrom(editor.getEditorInput()); + PstLeafNode pstLeafNode = ModulaEditorSymbolUtils.getPstLeafNode(ast, offset); + IModulaSymbol symbol = ModulaEditorSymbolUtils.getModulaSymbol(textViewer.getDocument(), pstLeafNode); + + if (symbol == null && offset > 0) { + // try to find symbol on the left of cursor position: + pstLeafNode = ModulaEditorSymbolUtils.getPstLeafNode(editor, offset-1); + if (pstLeafNode == null) { + return null; // oops. bug in parser? + } + symbol = ModulaEditorSymbolUtils.getModulaSymbol(textViewer.getDocument(), pstLeafNode); + } + + PstNode nodeToGo = null; + PstNode nodeToJumpFrom = null; + + if (symbol != null) { + if (symbol instanceof IForwardTypeSymbol) { + symbol = ((IForwardTypeSymbol) symbol).getActualTypeSymbol(); + } + else if (symbol instanceof IProcedureDefinitionSymbol) { + IModulaSymbol declSymbol = ((IProcedureDefinitionSymbol)symbol).getDeclarationSymbol(); + if (declSymbol != null) { + symbol = declSymbol; + } + } else if (symbol instanceof IProcedureDeclarationSymbol) { + boolean gotoDef = false; + + if (ModulaTokenTypes.IDENTIFIER == pstLeafNode.getToken()) { + // Determine if it is hit in "PROCEDURE ProcId()" line (not in "END ProcId;") - in this case + // link should point to procedure definition in .def file if any + PstNode pnProcId = pstLeafNode.getParent(); + if (pnProcId != null) { + PstNode pnProc = pnProcId.getParent(); + boolean isProcedureDeclarationNode = (pnProc != null) && ( + ModulaElementTypes.PROCEDURE_DECLARATION.equals(pnProc.getElementType()) || + ModulaElementTypes.OBERON_METHOD_DECLARATION.equals(pnProc.getElementType()) + ); + if (isProcedureDeclarationNode) { + List children = ((PstCompositeNode)pnProc).getChildren(); + for (PstNode child : children) { + if (child.getElementType().equals(ModulaElementTypes.PROCEDURE_IDENTIFIER)) { + gotoDef = (child == pnProcId); + break; + } + } + } + } + } + + if (gotoDef) { + IModulaSymbol defSymbol = ((IProcedureDeclarationSymbol)symbol).getDefinitionSymbol(); + if (defSymbol != null) { + symbol = defSymbol; + } + } + } + + } else { // if (symbol != null) .. else + + // Jump on construction frame? + PstLeafNode startNode[] = new PstLeafNode[1]; + IAstFrameNode fr = ModulaAstUtils.findConstructionNear(ast, offset, startNode); + if (fr != null) { + List nodes = new ArrayList(fr.getFrameNodes()); + Collections.sort(nodes, new Comparator() { + @Override + public int compare(PstNode o1, PstNode o2) { + return o1.getOffset() - o2.getOffset(); + } + }); + + int startIdx = nodes.indexOf(startNode[0]); + if (startIdx >= 0) { + for (int i = 1; i < nodes.size(); ++i) { + PstNode n = nodes.get((startIdx + i) % nodes.size()); + if (!hsFramedNodesToSkip.contains(n.getElementType())) { + nodeToGo = n; + nodeToJumpFrom = startNode[0]; + break; + } + } + } + } + } + + if ((symbol != null) && (symbol.getPosition() != null)) { + IRegion tokenRegion = new Region(pstLeafNode.getOffset(), pstLeafNode.getLength()); + + if (nodeToGo != null) { + IFile ifile = (IFile)editor.getEditorInput().getAdapter(IFile.class); + if (ifile != null) { + return new IHyperlink[] { + new ModulaDeclarationHyperlink(nodeToGo, tokenRegion, ifile) + }; + } + } else { + IFile efile = ModulaSymbolUtils.findFirstFileForSymbol(project, symbol); + if (efile != null) { + return new IHyperlink[] { + new ModulaDeclarationHyperlink(symbol, tokenRegion, efile) + }; + } + + IFileStore file = ModulaSymbolUtils.getSourceFileStore(symbol); + if (file != null) { + return new IHyperlink[] { + new ModulaDeclarationHyperlink(symbol, tokenRegion, file) + }; + } + } + } + else if (nodeToJumpFrom != null) { + IRegion tokenRegion = new Region(nodeToJumpFrom.getOffset(), nodeToJumpFrom.getLength()); + IFile ifile = (IFile)editor.getEditorInput().getAdapter(IFile.class); + if (ifile != null) { + return new IHyperlink[] { + new ModulaDeclarationHyperlink(nodeToGo, tokenRegion, ifile) + }; + } + } + + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/IXdsElementFilter.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/IXdsElementFilter.java new file mode 100644 index 0000000..369c14f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/IXdsElementFilter.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import com.excelsior.xds.core.model.IXdsElement; + +public interface IXdsElementFilter +{ + public boolean accept(IXdsElement xdsElement); +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/LoadingContentRoot.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/LoadingContentRoot.java new file mode 100644 index 0000000..ba3baf0 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/LoadingContentRoot.java @@ -0,0 +1,102 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsConstant; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsProject; +import com.excelsior.xds.core.model.IXdsType; +import com.excelsior.xds.core.model.IXdsVariable; +import com.excelsior.xds.core.model.LoadingXdsElement; +import com.excelsior.xds.core.model.SourceBinding; +import com.excelsior.xds.core.text.TextRegion; +import com.excelsior.xds.parser.modula.symbol.IModuleSymbol; + +/** + * Root of outline content being loaded + */ +public class LoadingContentRoot implements IXdsModule +{ + private static final SourceBinding SOURCE_BINDING = new SourceBinding(new TextRegion(0, 0), new TextRegion(0, 0)); + private final String name; + private final List children; + + public LoadingContentRoot(String name) { + this(name, name); + } + + public LoadingContentRoot(String name, String childName) { + this.name = name; + children = new ArrayList(1); + children.add(new LoadingXdsElement(childName, null, this)); + } + + @Override + public String getElementName() { + return name; + } + + @Override + public Collection getChildren() { + return children; + } + + + @Override + public IXdsCompilationUnit getCompilationUnit() { + return null; + } + + @Override + public Collection getModules() { + return Collections.emptyList(); + } + + @Override + public Collection getProcedures() { + return Collections.emptyList(); + } + + @Override + public Collection getVariables() { + return Collections.emptyList(); + } + + @Override + public Collection getConstants() { + return Collections.emptyList(); + } + + @Override + public Collection getTypes() { + return Collections.emptyList(); + } + + @Override + public IXdsProject getXdsProject() { + return null; + } + + @Override + public IXdsContainer getParent() { + return null; + } + + @Override + public SourceBinding getSourceBinding() { + return SOURCE_BINDING; + } + + @Override + public IModuleSymbol getSymbol() { + return null; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFilter.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFilter.java new file mode 100644 index 0000000..66edc6d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFilter.java @@ -0,0 +1,212 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; + +import org.eclipse.jface.preference.IPreferenceStore; + +import com.excelsior.xds.core.model.IXdsConstant; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsFormalParameter; +import com.excelsior.xds.core.model.IXdsImportElement; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsProcedure; +import com.excelsior.xds.core.model.IXdsRecordField; +import com.excelsior.xds.core.model.IXdsType; +import com.excelsior.xds.core.model.IXdsVariable; +import com.excelsior.xds.parser.modula.symbol.IVariableSymbol; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +public class ModulaOutlineFilter implements IXdsElementFilter +{ + private final Set state; + private final Set savedState; // used in XdsOutlineFiltersDialog for 'Cancel' + + private final OutlineElementFilter[] filters; + + public ModulaOutlineFilter() { + state = new HashSet(); + savedState = new HashSet(); + filters = new OutlineElementFilter[] { + + new InstanceofElementFilter(IXdsImportElement.class, + Messages.XdsOutlineFilter_ImportName, + Messages.XdsOutlineFilter_ImportDesc, + ".FILTER_IMPORT"), //$NON-NLS-1$ + + new InstanceofElementFilter(IXdsConstant.class, + Messages.XdsOutlineFilter_ConstantsName, + Messages.XdsOutlineFilter_ConstantsDesc, + ".FILTER_CONSTANTS"), //$NON-NLS-1$ + + new InstanceofElementFilter(IXdsType.class, + Messages.XdsOutlineFilter_TypesName, Messages.XdsOutlineFilter_TypesDesc, + ".FILTER_TYPES"), //$NON-NLS-1$ + + new InstanceofElementFilter(IXdsRecordField.class, + Messages.XdsOutlineFilter_RecordFieldsName, + Messages.XdsOutlineFilter_RecordFieldsDesc, + ".FILTER_RECORD_FIELDS"), //$NON-NLS-1$ + + new VariableElementFitler( false, + Messages.XdsOutlineFilter_GlobalVariablesName, + Messages.XdsOutlineFilter_GlobalVariablesDesc, + ".FILTER_GLOB_VARIABLES" ), //$NON-NLS-1$ + + new VariableElementFitler( true, + Messages.XdsOutlineFilter_LocalVariablesName, + Messages.XdsOutlineFilter_LocalVariablesDesc, + ".FILTER_LOC_VARIABLES" ), //$NON-NLS-1$ + + new InstanceofElementFilter(IXdsProcedure.class, + Messages.XdsOutlineFilter_ProceduresName, + Messages.XdsOutlineFilter_ProceduresDesc, + ".FILTER_PROCEDURES"), //$NON-NLS-1$ + + new InstanceofElementFilter(IXdsFormalParameter.class, + Messages.XdsOutlineFilter_FormalParametersName, + Messages.XdsOutlineFilter_FormalParametersDesc, + ".FILTER_FORAML_PARAMETERS"), //$NON-NLS-1$ + + new InstanceofElementFilter( IXdsModule.class, + Messages.XdsOutlineFilter_LocModulesName, + Messages.XdsOutlineFilter_LocModulesDesc, + ".FILTER_LOCAL_MODULES" ), //$NON-NLS-1$ + }; + for (OutlineElementFilter filter : filters) { + state.add(filter); + } + } + + + public OutlineElementFilter[] getElementFilters() { + return filters; + } + + + public void saveFilters(IPreferenceStore store, String dlgId) { + for (OutlineElementFilter f : filters) { + f.save(store, dlgId); + } + } + + public void readFilters(IPreferenceStore store, String dlgId) { + for (OutlineElementFilter f : filters) { + f.read(store, dlgId); + } + } + + + abstract class OutlineElementFilter + { + private final String name; + private final String description; + private final String id; + + private OutlineElementFilter( String name, String description + , String id ) + { + this.name = name; + this.description = description; + this.id = id; + } + + public String getName() { + return name; + } + + public String getDescription() { + return description; + } + + public void setCheckState(boolean b) { + if (b) { + state.add(this); + } + else { + state.remove(this); + } + } + + public boolean getCheckState() { + return state.contains(this); + } + + public void setSavedCheckState(boolean b) { + if (b) { + savedState.add(this); + } + else { + savedState.remove(this); + } + } + + public boolean getSavedCheckState() { + return savedState.contains(this); + } + + + private void save(IPreferenceStore store, String dlgId) { + store.setValue(dlgId + id, getCheckState()); + } + + private void read(IPreferenceStore store, String dlgId) { + String preferenceName = dlgId + id; +// store.setDefault(preferenceName, true); + setCheckState(store.getBoolean(preferenceName)); + } + + public abstract boolean accept(IXdsElement xdsElement); + } + + + private class InstanceofElementFilter extends OutlineElementFilter + { + private Class classFilter; + + public InstanceofElementFilter(Class classFilter, String name, String description, String id ) { + super(name, description, id); + this.classFilter = classFilter; + } + + @Override + public boolean accept(IXdsElement xdsElement) { + return classFilter.isAssignableFrom(xdsElement.getClass()); + } + } + + private class VariableElementFitler extends OutlineElementFilter + { + private boolean isLocal; + + public VariableElementFitler(boolean isLocal, String name, String description, String id ) { + super(name, description, id); + this.isLocal = isLocal; + } + + @Override + public boolean accept(IXdsElement xdsElement) { + if (xdsElement instanceof IXdsVariable) { + IXdsVariable xdsVariable = (IXdsVariable) xdsElement; + IVariableSymbol symbol = xdsVariable.getSymbol(); + if (symbol != null) { + return isLocal == symbol.isLocal(); + } + } + return false; + } + } + + @Override + public boolean accept(IXdsElement xdsElement) { + // TODO : implement filtering using EnumSet and XdsElementTypes + for (Iterator iterator = state.iterator(); iterator.hasNext();) { + OutlineElementFilter filter = (OutlineElementFilter) iterator.next(); + if (filter.accept(xdsElement)) { + return false; + } + } + return true; + } +} \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFiltersDialog.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFiltersDialog.java new file mode 100644 index 0000000..20e3ff1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlineFiltersDialog.java @@ -0,0 +1,176 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import org.eclipse.jface.dialogs.IDialogConstants; +import org.eclipse.jface.viewers.ArrayContentProvider; +import org.eclipse.jface.viewers.CheckStateChangedEvent; +import org.eclipse.jface.viewers.CheckboxTableViewer; +import org.eclipse.jface.viewers.ICheckStateListener; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.ISelectionChangedListener; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.LabelProvider; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.window.Window; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Image; +import org.eclipse.swt.layout.GridData; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.Text; +import org.eclipse.ui.dialogs.SelectionDialog; + +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.editor.modula.outline.ModulaOutlineFilter.OutlineElementFilter; + +public class ModulaOutlineFiltersDialog extends SelectionDialog { + + /** + * + * @param shell + * @param filters array of filters to show + * @return + * true - Ok, filters checkStates are set to user selection + * false - cancel, filters checkStates are not changed + */ + public static boolean playDialog(Shell shell, OutlineElementFilter filters[]) { + // save for 'Cancel': + for (OutlineElementFilter f : filters) { + f.setSavedCheckState(f.getCheckState()); + } + + ModulaOutlineFiltersDialog dlg = new ModulaOutlineFiltersDialog(shell, filters); + if (dlg.open() == Window.OK) { + return true; + } else { + // 'Cancel' => restore: + for (OutlineElementFilter f : filters) { + f.setCheckState(f.getSavedCheckState()); + } + return false; + } + } + + + private OutlineElementFilter filters[]; + + + protected ModulaOutlineFiltersDialog(Shell parentShell, OutlineElementFilter filters[]) { + super(parentShell); + this.filters = filters; + setTitle(Messages.XdsOutlineFiltersDialog_ViewFilters); + } + + @Override + protected Control createDialogArea(Composite parent) { + initializeDialogUnits(parent); + // create a composite with standard margins and spacing + Composite composite= new Composite(parent, SWT.NONE); + GridLayout layout= new GridLayout(); + layout.marginHeight= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_MARGIN); + layout.marginWidth= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_MARGIN); + layout.verticalSpacing= convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING); + layout.horizontalSpacing= convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING); + composite.setLayout(layout); + composite.setLayoutData(new GridData(GridData.FILL_BOTH)); + composite.setFont(parent.getFont()); + + Label info= new Label(composite, SWT.LEFT); + info.setText(Messages.XdsOutlineFiltersDialog_SelectToExclude); + + final CheckboxTableViewer fCheckBoxList= CheckboxTableViewer.newCheckList(composite, SWT.BORDER); + GridData data= new GridData(GridData.FILL_BOTH); + data.heightHint= fCheckBoxList.getTable().getItemHeight() * 10; + fCheckBoxList.getTable().setLayoutData(data); + + fCheckBoxList.setLabelProvider(new LabelProvider() { + @Override + public Image getImage(Object element) { + return null; + } + @Override + public String getText(Object element) { + if (element instanceof OutlineElementFilter) + return ((OutlineElementFilter)element).getName(); + else + return null; + } + }); + fCheckBoxList.setContentProvider(new ArrayContentProvider()); + fCheckBoxList.setInput(filters); + + // Description + info= new Label(composite, SWT.LEFT); + info.setText(Messages.XdsOutlineFiltersDialog_FilterDescription); + final Text description= new Text(composite, SWT.LEFT | SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.BORDER | SWT.V_SCROLL); + data = new GridData(GridData.FILL_HORIZONTAL); + data.heightHint= convertHeightInCharsToPixels(3); + description.setLayoutData(data); + + fCheckBoxList.addSelectionChangedListener(new ISelectionChangedListener() { + public void selectionChanged(SelectionChangedEvent event) { + ISelection selection= event.getSelection(); + if (selection instanceof IStructuredSelection) { + Object selectedElement= ((IStructuredSelection)selection).getFirstElement(); + if (selectedElement instanceof OutlineElementFilter) + description.setText(((OutlineElementFilter)selectedElement).getDescription()); + } + } + }); + + fCheckBoxList.addCheckStateListener(new ICheckStateListener() { + public void checkStateChanged(CheckStateChangedEvent event) { + Object element= event.getElement(); + if (element instanceof OutlineElementFilter) { + ((OutlineElementFilter)element).setCheckState(event.getChecked()); + } + }}); + + Composite buttonComposite= new Composite(composite, SWT.RIGHT); + layout= new GridLayout(); + layout.numColumns= 2; + buttonComposite.setLayout(layout); + data= new GridData(GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL); + data.grabExcessHorizontalSpace= true; + composite.setData(data); + + // Select All button + Button selectButton = SWTFactory.createPushButton(buttonComposite, Messages.XdsOutlineFiltersDialog_SelectAll, null); + selectButton.addSelectionListener( new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + fCheckBoxList.setAllChecked(true); + for (OutlineElementFilter f : filters) { + f.setCheckState(true); + } + } + }); + + // De-select All button + Button deselectButton = SWTFactory.createPushButton(buttonComposite, Messages.XdsOutlineFiltersDialog_DeselectAll, null); + deselectButton.addSelectionListener( new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + fCheckBoxList.setAllChecked(false); + for (OutlineElementFilter f : filters) { + f.setCheckState(false); + } + } + }); + + // Set initial checkboxes state: + for (OutlineElementFilter f : filters) { + fCheckBoxList.setChecked(f, f.getCheckState()); + } + + applyDialogFont(parent); + return parent; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePage.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePage.java new file mode 100644 index 0000000..a74f5f7 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePage.java @@ -0,0 +1,529 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import java.util.concurrent.atomic.AtomicBoolean; + +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.viewers.IBaseLabelProvider; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.SelectionChangedEvent; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.CaretEvent; +import org.eclipse.swt.custom.CaretListener; +import org.eclipse.swt.custom.StyledText; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Control; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.IPartListener2; +import org.eclipse.ui.IWorkbenchPart; +import org.eclipse.ui.IWorkbenchPartReference; +import org.eclipse.ui.dialogs.FilteredTree; +import org.eclipse.ui.part.IPageSite; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.views.contentoutline.ContentOutline; +import org.eclipse.ui.views.contentoutline.ContentOutlinePage; + +import com.excelsior.xds.core.model.IElementChangedListener; +import com.excelsior.xds.core.model.ISourceBound; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.IXdsSyntheticElement; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.core.model.utils.XdsElementUtils; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.utils.IClosure; +import com.excelsior.xds.parser.commons.symbol.ITextBinding; +import com.excelsior.xds.ui.actions.ToolbarActionButton; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.images.ImageUtils; +import com.excelsior.xds.ui.utils.SingleUiUpdateRunnable; +import com.excelsior.xds.ui.viewers.DecoratedXdsElementLabelProvider.DelegatingDecoratedXdsElementLabelProvider; +import com.excelsior.xds.ui.viewers.XdsElementLabelProvider; +import com.excelsior.xds.ui.viewers.XdsElementPatternFilter; +import com.excelsior.xds.ui.viewers.XdsElementViewerComparator; + +/** + * The content outline page of the Modula-2 editor.
+ *

+ * It implements IElementChangedListener only for one scenario :
+ *
+ * 1) Editor is opened
+ * 2) IDE is restarted
+ * 3) Because core plugin is restarting - compilation set is re-populated.
+ * 4) When it is populated - IElementChangedListener will fire and this we should refresh
+ *

+ * Otherwise, because initially compilation set is empty - view will forever stay in the "Loading..." state.
+ *
+ * Refresh is done via {@link SingleUiUpdateRunnable}, so UI overhead should not be that big.

+ *

+ */ +public class ModulaOutlinePage extends ContentOutlinePage implements IElementChangedListener +{ + private static final String DLG_ID = "com.excelsior.xds.ui.editor.modula.ModulaOutlinePage"; //$NON-NLS-1$ + + private ITextEditor editor; + private StyledText styledText; + private IEditorInput input; + private ModulaOutlinePageContentProvider contentProvider; + private TreeViewer treeViewer; + private Composite mainComposite; + private FilteredTree filteredTree; + private boolean isViewVisible; + private boolean isNotPropagateTreeSelectionChangeToEditor = false; + private boolean isIgnoreSetSelectionInTree = false; + private boolean sortAlph; + private boolean isLinkWithEditor = true; + private ModulaOutlineFilter filter; + + private final AtomicBoolean isUpdateRequestPending = new AtomicBoolean(false); + + public ModulaOutlinePage(ITextEditor editor, StyledText styledText) + { + super(); + this.editor = editor; + this.styledText = styledText; + filter = new ModulaOutlineFilter(); + filter.readFilters(XdsEditorsPlugin.getDefault().getPreferenceStore(), DLG_ID); + } + + + @Override + public void createControl(final Composite parent) { + IDialogSettings settings = getDialogSettings(); + ToolbarActionButton tba = new ToolbarActionButton(Messages.XdsOutlinePage_ExpandAll, DLG_ID + "DIALOG_EXPAND_ALL", false, ImageUtils.EXPAND_ALL, //$NON-NLS-1$ + false, settings, new IClosure() { + @Override + public void execute(Boolean param) { + if (input != null) { + treeViewer.expandAll(); + } + } + }); + this.getSite().getActionBars().getToolBarManager().add(tba); + + tba = new ToolbarActionButton(Messages.XdsOutlinePage_CollapseAll, DLG_ID + "DIALOG_COLLAPSE_ALL", false, ImageUtils.COLLAPSE_ALL, //$NON-NLS-1$ + false, settings, new IClosure() { + @Override + public void execute(Boolean param) { + if (input != null) { + treeViewer.collapseAll(); + } + } + }); + this.getSite().getActionBars().getToolBarManager().add(tba); + + tba = new ToolbarActionButton(Messages.XdsOutlinePage_LinkWithEditor, DLG_ID + "DIALOG_LINK_WITH_EDITOR", true, ImageUtils.SYNC_WITH_EDITOR, //$NON-NLS-1$ + true, settings, new IClosure() { + @Override + public void execute(Boolean isChecked) { + isLinkWithEditor = isChecked; + if (isLinkWithEditor) { + ISelection selection = editor.getSelectionProvider().getSelection(); + synchronizeOutlineWithEditor(selection); + } + } + }); + this.getSite().getActionBars().getToolBarManager().add(tba); + isLinkWithEditor = tba.isChecked(); + + tba = new ToolbarActionButton(Messages.XdsOutlinePage_Sort, DLG_ID + "DIALOG_SORT_ALPHABETICALLY", true, ImageUtils.SORT_ALPHA, //$NON-NLS-1$ + false, settings, new IClosure() { + @Override + public void execute(Boolean isChecked) { + reSort(isChecked); + } + }); + this.getSite().getActionBars().getToolBarManager().add(tba); + sortAlph = tba.isChecked(); + + tba = new ToolbarActionButton(Messages.XdsOutlinePage_Filters, DLG_ID + "DIALOG_FILTERS_DIALOG", false, ImageUtils.FILTERS_ICON, //$NON-NLS-1$ + false, settings, new IClosure() { + @Override + public void execute(Boolean param) { + if (ModulaOutlineFiltersDialog.playDialog(getSite().getShell(), filter.getElementFilters())) { + update(); + filter.saveFilters(XdsEditorsPlugin.getDefault().getPreferenceStore(), DLG_ID); + } + } + }); + this.getSite().getActionBars().getToolBarManager().add(tba); + + isViewVisible = true; + installElementChangedListener(); + + XdsElementPatternFilter patternFilter = new XdsElementPatternFilter(); + filteredTree = new FilteredTree(parent, getTreeStyle() | SWT.SINGLE, patternFilter, true); + treeViewer = filteredTree.getViewer(); + treeViewer.setUseHashlookup(true); + treeViewer.getTree().addMouseListener(new MouseAdapter() { + @Override + public void mouseDoubleClick(MouseEvent e) { + isIgnoreSetSelectionInTree = true; + try{ + selectElementInEditor(treeViewer.getSelection(), true); + } + finally{ + isIgnoreSetSelectionInTree = false; + } + } + }); + treeViewer.addPostSelectionChangedListener(this); + treeViewer.getTree().addListener (SWT.KeyDown, new Listener() { + @Override + public void handleEvent(Event event) { + if (event.type == SWT.KeyDown && event.character == SWT.CR) { + selectElementInEditor(treeViewer.getSelection(), true); + } + } + }); + + contentProvider = new ModulaOutlinePageContentProvider(editor, filter); + treeViewer.setContentProvider(contentProvider); + + XdsElementLabelProvider labelProvider = new XdsElementLabelProvider(); + IBaseLabelProvider decoratedLabelProvider = new DelegatingDecoratedXdsElementLabelProvider(labelProvider); + treeViewer.setLabelProvider(decoratedLabelProvider); + treeViewer.setComparator(new OutlineSorter(labelProvider)); + + //control is created after input is set + update(); + + styledText.addCaretListener(new CaretListener() { + @Override + public void caretMoved(CaretEvent event) { + if (contentProvider != null && isLinkWithEditor) { + selectInTheOutlineTree(event.caretOffset); + } + } + }); + + mainComposite = filteredTree; + } + + private void installElementChangedListener() { + XdsModelManager.getModel().addElementChangedListener(this); + } + + private void unInstallElementChangedListener() { + XdsModelManager.getModel().removeElementChangedListener(this); + } + + @Override + public void elementChanged() { + doRefresh(); + } + + @Override + public void dispose() { + super.dispose(); + + unInstallElementChangedListener(); + } + + + @Override + public void init(IPageSite pageSite) { + super.init(pageSite); + pageSite.getPage().addPartListener(new ViewPartListener()); + } + + public Control getControl() { + if (mainComposite == null) { + return null; + } + return mainComposite; + } + + public ISelection getSelection() { + if (treeViewer == null) { + return StructuredSelection.EMPTY; + } + return treeViewer.getSelection(); + } + + protected TreeViewer getTreeViewer() { + return treeViewer; + } + + public void setFocus() { + treeViewer.getControl().setFocus(); + } + + public void setSelection(ISelection selection) { + if (isIgnoreSetSelectionInTree) return; + + isNotPropagateTreeSelectionChangeToEditor = true; + try + { + if (treeViewer != null) { + treeViewer.setSelection(selection); + } + } + finally{ + isNotPropagateTreeSelectionChangeToEditor = false; + } + } + + /** + * Sets the input of the outline page + */ + public void setInput(Object input) + { + if (this.input != input) { // update only if input changed + this.input = (IEditorInput) input; + update(); + } + } + + /* + * Change in selection + */ + @Override + public void selectionChanged(SelectionChangedEvent event) + { + if (isNotPropagateTreeSelectionChangeToEditor || + getControl().isDisposed() || + !getTreeViewer().getControl().isFocusControl()) + return; + + super.selectionChanged(event); + + ISelection selection = event.getSelection(); + if (isLinkWithEditor) { + try{ + isIgnoreSetSelectionInTree = true; + selectElementInEditor(selection, false); + } + finally{ + isIgnoreSetSelectionInTree = false; + } + } + } + + private void selectElementInEditor(ISelection selection, boolean isSelect) { + if (editor == null) { + return; + } + + if (selection.isEmpty()) + editor.resetHighlightRange(); + else + { + IStructuredSelection structuredSelection = (IStructuredSelection) selection; + Object firstElement = structuredSelection.getFirstElement(); + if (firstElement instanceof ISourceBound) { + ISourceBound sourceBound = (ISourceBound) firstElement; + try + { + if (isSelect) { + Control ctr = (Control) editor.getAdapter(Control.class); + ctr.setFocus(); + } + + ITextBinding sourceBinding = sourceBound.getSourceBinding(); + + if (sourceBinding != null) { + ITextRegion identifierRegion = sourceBinding.getNameTextRegion(); + if (identifierRegion != null) { + editor.selectAndReveal(identifierRegion.getOffset(), identifierRegion.getLength()); + } + ITextRegion elementRegion = sourceBinding.getDeclarationTextRegion(); + if (elementRegion != null) { + editor.setHighlightRange(elementRegion.getOffset(), elementRegion.getLength(), false); + if ((identifierRegion == null) && (firstElement instanceof IXdsSyntheticElement)) { + // syntactic elements like "import list" have not name text region at all. + editor.selectAndReveal(elementRegion.getOffset(), elementRegion.getLength()); + } + } + } + } + catch (IllegalArgumentException x) + { + editor.resetHighlightRange(); + } + } + } + } + + /** + * The editor is saved, so we should refresh representation + * + * @param tableNamePositions + */ + public void update() + { + //set the input so that the outlines parse can be called + //update the tree viewer state + TreeViewer viewer = getTreeViewer(); + + if (viewer != null) + { + Control control = viewer.getControl(); + if (control != null && !control.isDisposed()) + { + try{ + control.setRedraw(false); + viewer.setInput(input); + } + finally{ + control.setRedraw(true); + } + } + } + } + + private final class ViewPartListener implements IPartListener2 { + @Override + public void partVisible(IWorkbenchPartReference partRef) { + IWorkbenchPart part= partRef.getPart(false); + if (part instanceof ContentOutline) { + isViewVisible= true; + } + } + + @Override + public void partOpened(IWorkbenchPartReference partRef) { + } + + @Override + public void partInputChanged(IWorkbenchPartReference partRef) { + } + + @Override + public void partHidden(IWorkbenchPartReference partRef) { + IWorkbenchPart part= partRef.getPart(false); + if (part instanceof ContentOutline) { + isViewVisible= false; + } + } + + @Override + public void partDeactivated(IWorkbenchPartReference partRef) { + } + + @Override + public void partClosed(IWorkbenchPartReference partRef) { + IWorkbenchPart part = partRef.getPart(false); + if (part instanceof ContentOutline) { + isViewVisible = false; + } + if (part instanceof ITextEditor) { + waitForControl(); + } + } + + @Override + public void partBroughtToTop(IWorkbenchPartReference partRef) { + } + + @Override + public void partActivated(IWorkbenchPartReference partRef) { + IWorkbenchPart part = partRef.getPart(false); + if (part instanceof ITextEditor) { + editor = (ITextEditor)part; + waitForControl(); + setInput(editor.getEditorInput()); + } + } + } + + private void waitForControl() { + while(treeViewer.isBusy()) { + try { + Thread.sleep(50); + } catch (InterruptedException e) { + } + } + } + + + private IDialogSettings getDialogSettings() { + String sectionName= DLG_ID; + + IDialogSettings settings = XdsEditorsPlugin.getDefault().getDialogSettings().getSection(sectionName); + if (settings == null) { + settings = XdsEditorsPlugin.getDefault().getDialogSettings().addNewSection(sectionName); + } + return settings; + } + + private void reSort(boolean sortAlph) { + this.sortAlph = sortAlph; + treeViewer.refresh(); + } + + + private class OutlineSorter extends XdsElementViewerComparator { + + public OutlineSorter(ILabelProvider labelProvider) { + super(labelProvider); + } + + @Override + public boolean isSortAlphabetically() { + return sortAlph; + } + } + + public void doRefresh() { + if (isViewVisible && isUpdateRequestPending.compareAndSet(false, true)) { + Display.getDefault().asyncExec(new SingleUiUpdateRunnable(isUpdateRequestPending) { + @Override + protected void doRun() { + if (!treeViewer.getControl().isDisposed()) { + treeViewer.refresh(); + if (isLinkWithEditor) { + synchronizeOutlineWithEditor(); + } + } + } + }); + } + } + + /** + * Selects corresponding element in the Outline tree. + * @param offset offset in the editor + */ + private void selectInTheOutlineTree(int offset) { + IXdsModule root = contentProvider.getRoot(); + if (root != null) { + IXdsElement child = XdsElementUtils.findBottomostChildCoveringPosition(root, offset); + if (child != null) { + setSelection(new StructuredSelection(child)); + } + } + } + + /** + * Synchronizes outline view selection with editor selection + */ + private void synchronizeOutlineWithEditor() { + ISelection selection = editor.getSelectionProvider().getSelection(); + synchronizeOutlineWithEditor(selection); + } + + /** + * Synchronizes outline view selection with editor selection, using the given editor selection + */ + private void synchronizeOutlineWithEditor(ISelection selection) { + if (selection.isEmpty()) { + return; + } + if (selection instanceof ITextSelection) { + ITextSelection textSelection = (ITextSelection) selection; + selectInTheOutlineTree(textSelection.getOffset()); + editor.setFocus(); + } + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePageContentProvider.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePageContentProvider.java new file mode 100644 index 0000000..04a098a --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaOutlinePageContentProvider.java @@ -0,0 +1,158 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import java.util.ArrayList; +import java.util.Collection; + +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.collections.Predicate; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.viewers.ITreeContentProvider; +import org.eclipse.jface.viewers.Viewer; +import org.eclipse.ui.IEditorInput; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.model.IXdsCompilationUnit; +import com.excelsior.xds.core.model.IXdsContainer; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsModule; +import com.excelsior.xds.core.model.XdsModelManager; +import com.excelsior.xds.ui.editor.internal.nls.Messages; + +/** + * The content providers for Modula-2 POutline viewers. + * + * TODO use symbol interfaces instead of concrete implementations + */ +public class ModulaOutlinePageContentProvider implements ITreeContentProvider +{ + private static final LoadingContentRoot LOADING_ROOT = new LoadingContentRoot(Messages.XdsOutlinePage_Loading); + private final Object[] EMPTY_ARRAY = new Object[0]; + + private IEditorInput input; + private IXdsCompilationUnit compilationUnit; + private ITextEditor editor; + private ModulaOutlineFilter filter; + private IDocument document; + + public ModulaOutlinePageContentProvider( ITextEditor editor + , ModulaOutlineFilter filter ) + { + super(); + this.editor = editor; + this.filter = filter; + } + + public IXdsModule getRoot() { + IXdsModule root = null; + + retrieveCompilationUnit(); + if (compilationUnit != null) { + root = compilationUnit.getModuleElement(); + } + + if (root == null) { + root = LOADING_ROOT; + } + + return root; + } + + + @Override // ITreeContentProvider + public Object getParent(Object element) + { + if (element instanceof IXdsElement) + return ((IXdsElement)element).getParent(); + return null; + } + + + @Override // ITreeContentProvider + public Object[] getElements(Object inputElement) { + if (getRoot() != null) { + Collection children = getRoot().getChildren(); + children = filter(children); + if (children != null) { + return children.toArray(); + } + } + return EMPTY_ARRAY; + } + + private Collection filter(Collection elements) { + if (!elements.isEmpty()) { + elements = new ArrayList(elements); + } + CollectionUtils.filter(elements, new Predicate() { + @Override + public boolean evaluate(Object o) { + IXdsElement xdsElement = (IXdsElement)o; + return filter.accept(xdsElement); + } + }); + return elements; + } + + + @Override // ITreeContentProvider + public Object[] getChildren(Object parentElement) { + if (parentElement == input) { + parentElement = getRoot(); + } + if (!(parentElement instanceof IXdsContainer)) { + return EMPTY_ARRAY; + } + + Collection children = ((IXdsContainer)parentElement).getChildren(); + children = filter(children); + return parentElement == null ? EMPTY_ARRAY : children.toArray(); + } + + @Override // ITreeContentProvider + public boolean hasChildren(Object element) + { + if (element == input) { + return true; + } else { + if (!(element instanceof IXdsContainer)) { + return false; + } + + Collection children = ((IXdsContainer)element).getChildren(); + children = filter(children); + return children.size() > 0; + } + } + + + @Override // ITreeContentProvider + public void dispose() { + } + + + @Override // ITreeContentProvider + public void inputChanged(final Viewer viewer, Object oldInput, Object newInput) + { + input = (IEditorInput) newInput; + compilationUnit = null; + } + + /** + * Gets compilation unit from the model. This done because of external + * (non-workspace) elements, which are not in the model from the startup + * (until moment they are opened in the editor). + */ + private void retrieveCompilationUnit() { + if (compilationUnit == null) { + document = editor.getDocumentProvider().getDocument(input); + if (document != null) + { + IXdsElement xdsElement = XdsModelManager.getModel().getXdsElement(input); + if (xdsElement instanceof IXdsCompilationUnit) { + compilationUnit = (IXdsCompilationUnit)xdsElement; + } + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaQuickOutlineDialog.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaQuickOutlineDialog.java new file mode 100644 index 0000000..cdd818f --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/outline/ModulaQuickOutlineDialog.java @@ -0,0 +1,391 @@ +package com.excelsior.xds.ui.editor.modula.outline; + +import org.eclipse.jface.action.Action; +import org.eclipse.jface.action.IAction; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.jface.action.Separator; +import org.eclipse.jface.dialogs.IDialogSettings; +import org.eclipse.jface.dialogs.PopupDialog; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.jface.resource.ImageDescriptor; +import org.eclipse.jface.resource.JFaceResources; +import org.eclipse.jface.text.ITextSelection; +import org.eclipse.jface.viewers.IBaseLabelProvider; +import org.eclipse.jface.viewers.ILabelProvider; +import org.eclipse.jface.viewers.ISelection; +import org.eclipse.jface.viewers.IStructuredSelection; +import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.jface.viewers.TreeViewer; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.MouseAdapter; +import org.eclipse.swt.events.MouseEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.graphics.Rectangle; +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.Event; +import org.eclipse.swt.widgets.Listener; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.Shell; +import org.eclipse.swt.widgets.ToolBar; +import org.eclipse.swt.widgets.ToolItem; +import org.eclipse.ui.dialogs.FilteredTree; +import org.eclipse.ui.dialogs.PatternFilter; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.model.ISourceBound; +import com.excelsior.xds.core.model.IXdsElement; +import com.excelsior.xds.core.model.IXdsSyntheticElement; +import com.excelsior.xds.core.model.utils.XdsElementUtils; +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.parser.commons.symbol.ITextBinding; +import com.excelsior.xds.ui.commons.utils.SWTFactory; +import com.excelsior.xds.ui.commons.utils.SwtUtils; +import com.excelsior.xds.ui.commons.utils.WorkbenchUtils; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.internal.nls.Messages; +import com.excelsior.xds.ui.images.ImageUtils; +import com.excelsior.xds.ui.viewers.DecoratedXdsElementLabelProvider.DelegatingDecoratedXdsElementLabelProvider; +import com.excelsior.xds.ui.viewers.XdsElementLabelProvider; +import com.excelsior.xds.ui.viewers.XdsElementPatternFilter; +import com.excelsior.xds.ui.viewers.XdsElementViewerComparator; + +public class ModulaQuickOutlineDialog extends PopupDialog +{ + private FilteredTree filteredTree; + private TreeViewer treeViewer; + private ITextEditor editor; + private MenuManager menuManager = null; + private ToolBar toolBar; + private ModulaOutlinePageContentProvider contentProvider; + private boolean sortAlph = false; + private final ModulaOutlineFilter filter; + + private static final String DLG_ID = "com.excelsior.xds.ui.editor.modula.ModulaQuickOutlineDialog"; //$NON-NLS-1$ + private static final String DLG_SORT_ALPH = "DLG_SORT_ALPHABETICALLY"; //$NON-NLS-1$ + private static final String DLG_USE_PERSISTED_SIZE = "com.excelsior.xds.ui.editor.modula.ModulaQuickOutlineDialog.DLG_USE_PERSISTED_SIZE"; //$NON-NLS-1$ + private static final String DLG_USE_PERSISTED_LOCATION = "com.excelsior.xds.ui.editor.modula.ModulaQuickOutlineDialog.DLG_USE_PERSISTED_LOCATION"; //$NON-NLS-1$ + + + public ModulaQuickOutlineDialog(Shell parent) { + super( parent, SWT.RESIZE, true + , getStateForSizeOrLocation(true) + , getStateForSizeOrLocation(false) + , false, true, null, null ); + filter = new ModulaOutlineFilter(); + filter.readFilters(XdsEditorsPlugin.getDefault().getPreferenceStore(), DLG_ID); + } + + private static boolean getStateForSizeOrLocation(boolean size) { + IDialogSettings settings = getDialogSettingsStatic(); + return settings.getBoolean(size ? DLG_USE_PERSISTED_SIZE : DLG_USE_PERSISTED_LOCATION); + } + + @Override + protected Control createDialogArea(Composite parent) { + Composite composite = (Composite) super.createDialogArea(parent); + + XdsElementPatternFilter patternFilter = new XdsElementPatternFilter(); + filteredTree = new MyFilteredTree(composite, patternFilter); + treeViewer = filteredTree.getViewer(); + treeViewer.setUseHashlookup(true); + treeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + editor = (ITextEditor) WorkbenchUtils.getActiveEditor(false); + + contentProvider = new ModulaOutlinePageContentProvider(editor, filter); + treeViewer.setContentProvider(contentProvider); + + XdsElementLabelProvider labelProvider = new XdsElementLabelProvider(); + IBaseLabelProvider decoratedLabelProvider = new DelegatingDecoratedXdsElementLabelProvider(labelProvider); + treeViewer.setLabelProvider(decoratedLabelProvider); + treeViewer.setComparator(new OutlineSorter(labelProvider)); + + treeViewer.setAutoExpandLevel(0); + try { + treeViewer.getControl().setRedraw(false); + treeViewer.setInput(editor.getEditorInput()); + } + finally { + treeViewer.getControl().setRedraw(true); + } + + treeViewer.getTree().addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + handleTreeSelection(e); + } + }); + + Listener eventListener = new Listener() { + @Override + public void handleEvent(Event event) { + if (event.type == SWT.KeyDown && event.character == SWT.CR) { + handleTreeSelection(); + } + } + }; + + treeViewer.getTree().addListener (SWT.Collapse, eventListener); + treeViewer.getTree().addListener (SWT.Expand, eventListener); + treeViewer.getTree().addListener (SWT.KeyDown, eventListener); + treeViewer.getTree().addListener (SWT.MouseUp, eventListener); + treeViewer.getTree().addListener (SWT.MouseDoubleClick, eventListener); + + IDialogSettings settings = getDialogSettings(); + if (settings != null) { + sortAlph = settings.getBoolean(getClass().getName() + DLG_SORT_ALPH); + } + + + return composite; + } + + @Override public int open() { + int res = super.open(); + selectElementUnderEditorCursor(); + return res; + } + + @Override + protected void adjustBounds() { + + if (!getPersistSize()) { + Point prefSize; + int gap5W = SwtUtils.getTextWidth(filteredTree, "WWWWW"); //$NON-NLS-1$ + prefSize = filteredTree.computeSize(SWT.DEFAULT, SWT.DEFAULT); + prefSize.x += gap5W; + prefSize.y += SWTFactory.getCharHeight(filteredTree)*3; + + Rectangle recDisplay = filteredTree.getDisplay().getPrimaryMonitor().getClientArea(); + prefSize.x = Math.max(prefSize.x, SwtUtils.getTextWidth(filteredTree, "WWWWWWWWWWWWWWWWWWWWWWWWWWW")); //$NON-NLS-1$ + prefSize.x = Math.min(prefSize.x, (int)((double)recDisplay.width / 1.5)); + prefSize.y = Math.min(prefSize.y, (int)((double)recDisplay.height / 1.2)); + + // prefSize now is calculateg for all whole content. Clip it by decreased editor window size: + Control edCtrl = (Control) editor.getAdapter(Control.class); + Point edSize = edCtrl.getSize(); + prefSize.x = Math.min(prefSize.x, Math.max(edSize.x - gap5W*5, gap5W*5)); + prefSize.y = Math.min(prefSize.y, Math.max(edSize.y - gap5W*2, gap5W*5)); + + getShell().setSize(prefSize); + + if (!this.getPersistLocation()) { + int xx = (edSize.x - prefSize.x) / 2; + int yy = (edSize.y - prefSize.y) / 2; + Point edPos = edCtrl.toDisplay(new Point(0,0)); + getShell().setLocation(edPos.x + xx, edPos.y + yy); + } + } + + } + + @Override + protected IDialogSettings getDialogSettings() { + return getDialogSettingsStatic(); + } + + private static IDialogSettings getDialogSettingsStatic() { + String sectionName= DLG_ID; + + IDialogSettings settings = XdsEditorsPlugin.getDefault().getDialogSettings().getSection(sectionName); + if (settings == null) { + settings = XdsEditorsPlugin.getDefault().getDialogSettings().addNewSection(sectionName); + } + return settings; + } + + private void selectElementUnderEditorCursor() { + try { + ISelection selection = editor.getSelectionProvider().getSelection(); + if (selection instanceof ITextSelection) { + ITextSelection textSelection = (ITextSelection)selection; + IXdsElement child = XdsElementUtils.findBottomostChildCoveringPosition(contentProvider.getRoot(), textSelection.getOffset()); + if (child != null) { + treeViewer.setSelection(new StructuredSelection(child)); + } + } + } catch (Exception e) { + // NPE: not parsed yet? + } + } + + @Override + protected Control getFocusControl() { + return filteredTree.getFilterControl(); + } + + @Override + protected void fillDialogMenu(IMenuManager dialogMenu) { + Action actSortAlph = new Action (Messages.XdsQuickOutlineDialog_SortAlphabetically, IAction.AS_CHECK_BOX) { + public void run() { + reSort(this.isChecked()); + } + }; + + actSortAlph.setImageDescriptor(ImageDescriptor.createFromImage(ImageUtils.getImage(ImageUtils.SORT_ALPHA))); + actSortAlph.setChecked(sortAlph); + dialogMenu.add(actSortAlph); + + Action actFilters = new Action (Messages.XdsQuickOutlineDialog_Filters, IAction.AS_PUSH_BUTTON) { + public void run() { + filtersDialog(); + } + }; + actFilters.setImageDescriptor(ImageDescriptor.createFromImage(ImageUtils.getImage(ImageUtils.FILTERS_ICON))); + dialogMenu.add(actFilters); + + dialogMenu.add(new Separator("XdsMenuEnd")); //$NON-NLS-1$ + super.fillDialogMenu(dialogMenu); + } + + + @Override + protected void showDialogMenu() { // *FSA: hack to show menu w/o title bar. + if (menuManager == null) { + menuManager = new MenuManager(); + fillDialogMenu(menuManager); + } + + // Setting this flag works around a problem that remains on X only, + // whereby activating the menu deactivates our shell. + + // listenToDeactivate = !Util.isGtk(); // *FSA: hz. listenToDeactivate is private. seems that "true := true" here and all works ok... + + Menu menu = menuManager.createContextMenu(getShell()); + Rectangle bounds = toolBar.getBounds(); + Point topLeft = new Point(bounds.x, bounds.y + bounds.height); + topLeft = getShell().toDisplay(topLeft); + menu.setLocation(topLeft.x, topLeft.y); + menu.setVisible(true); + } + + + + @Override + protected void saveDialogBounds(Shell shell) { + super.saveDialogBounds(shell); + IDialogSettings settings = getDialogSettings(); + if (settings != null) { + settings.put(getClass().getName() + DLG_SORT_ALPH, sortAlph); + } + // hacked menu button (w/o title bar) turns OFF restore of this states so save/restore it here: + settings.put(DLG_USE_PERSISTED_SIZE, getPersistSize()); + settings.put(DLG_USE_PERSISTED_LOCATION, getPersistLocation()); + } + + + private void handleTreeSelection() { + ISelection selection = treeViewer.getSelection(); + if (!selection.isEmpty()) { + Object element = ((IStructuredSelection) selection).getFirstElement(); + if (element instanceof ISourceBound) { + ISourceBound sourceBound = (ISourceBound) element; + ITextBinding sourceBinding = sourceBound.getSourceBinding(); + if (sourceBinding != null) { + ITextRegion identifierRegion = sourceBinding.getNameTextRegion(); + if (identifierRegion != null) { + int start = identifierRegion.getOffset(); + int length = identifierRegion.getLength(); + editor.selectAndReveal(start, length); + } + + ITextRegion elementRegion = sourceBinding.getDeclarationTextRegion(); + if (elementRegion != null) { + int start = elementRegion.getOffset(); + int length = elementRegion.getLength(); + editor.setHighlightRange(start, length, identifierRegion == null); + if ((identifierRegion == null) && (element instanceof IXdsSyntheticElement)) { + // syntactic elements like "import list" have not name text region at all. + editor.selectAndReveal(start, length); + } + } + + close(); + } + } + } + } + + private void handleTreeSelection(SelectionEvent e) { + if ((e.stateMask & SWT.BUTTON1) != 0) { + handleTreeSelection(); + } + } + + private void reSort(boolean sortAlph) { + this.sortAlph = sortAlph; + treeViewer.refresh(); + } + + private void filtersDialog(){ + if (ModulaOutlineFiltersDialog.playDialog(getShell(), filter.getElementFilters())) { + try { + treeViewer.getControl().setRedraw(false); + treeViewer.setInput(editor.getEditorInput()); + } + finally { + treeViewer.getControl().setRedraw(true); + } + filter.saveFilters(XdsEditorsPlugin.getDefault().getPreferenceStore(), DLG_ID); + } + } + + + private class OutlineSorter extends XdsElementViewerComparator + { + public OutlineSorter(ILabelProvider labelProvider) { + super(labelProvider); + } + + @Override + public boolean isSortAlphabetically() { + return sortAlph; + } + } + + + private class MyFilteredTree extends FilteredTree + { + public MyFilteredTree(Composite parent, PatternFilter filter) { + super(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.SINGLE, filter, true); + } + + @Override + protected Composite createFilterControls(Composite parent) { + GridLayout gl = (GridLayout)parent.getLayout(); + ++ gl.numColumns; // add menu button + super.createFilterControls(parent); + createDialogMenu(parent); + return parent; + } + + + private void createDialogMenu(Composite parent) { + toolBar = new ToolBar(parent, SWT.FLAT); + ToolItem viewMenuButton = new ToolItem(toolBar, SWT.PUSH, 0); + + GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar); + viewMenuButton.setImage(JFaceResources.getImage(POPUP_IMG_MENU)); + viewMenuButton.setDisabledImage(JFaceResources.getImage(POPUP_IMG_MENU_DISABLED)); + viewMenuButton.setToolTipText("Menu"); //$NON-NLS-1$ + viewMenuButton.addSelectionListener(new SelectionAdapter() { + public void widgetSelected(SelectionEvent e) { + showDialogMenu(); + } + }); + // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=177183 + toolBar.addMouseListener(new MouseAdapter() { + public void mouseDown(MouseEvent e) { + showDialogMenu(); + } + }); + } + + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaCompositeReconcilingStrategy.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaCompositeReconcilingStrategy.java new file mode 100644 index 0000000..182ff0d --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaCompositeReconcilingStrategy.java @@ -0,0 +1,90 @@ +package com.excelsior.xds.ui.editor.modula.reconciler; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.reconciler.DirtyRegion; +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; +import org.eclipse.jface.text.source.ISourceViewer; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.ui.editor.commons.reconciler.CompositeReconcilingStrategy; +import com.excelsior.xds.ui.editor.modula.reconciling.IReconcilingStrategyProvider; + +public class ModulaCompositeReconcilingStrategy extends CompositeReconcilingStrategy +{ + /** Properties file content type */ + + private ModulaReconcilingStrategy modulaStrategy; + + /** + * Creates a new Modula-2 reconciling strategy. + * + * @param viewer the source viewer + * @param editor the editor of the strategy's reconciler + */ + public ModulaCompositeReconcilingStrategy(ISourceViewer viewer, ITextEditor editor) { + modulaStrategy = new ModulaReconcilingStrategy(editor); + List providers = ModulaEditorReconcilingStrategyContributionRegistry.get().contributions(); + List contributions = new ArrayList(); + contributions.add(modulaStrategy); + providers.stream().map(p -> p.createReconcilingStrategy(viewer)) + .forEach(s -> contributions.add(s)); + setReconcilingStrategies(contributions.toArray(new IReconcilingStrategy[0])); + } + + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { + try { + super.reconcile(dirtyRegion, subRegion); + } finally { + reconciled(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(IRegion partition) { + try { + super.reconcile(partition); + } finally { + reconciled(); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void initialReconcile() { + try { + super.initialReconcile(); + } finally { + reconciled(); + } + } + + + /** + * Called before reconciling is started. + */ + public void aboutToBeReconciled() { + modulaStrategy.aboutToBeReconciled(); + + } + + /** + * Called when reconcile has finished. + */ + private void reconciled() { + modulaStrategy.reconciled(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaEditorReconcilingStrategyContributionRegistry.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaEditorReconcilingStrategyContributionRegistry.java new file mode 100644 index 0000000..126e4b7 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaEditorReconcilingStrategyContributionRegistry.java @@ -0,0 +1,25 @@ +package com.excelsior.xds.ui.editor.modula.reconciler; + +import com.excelsior.xds.core.extensionpoint.ExtensionRegistry; +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.modula.reconciling.IReconcilingStrategyProvider; + +public class ModulaEditorReconcilingStrategyContributionRegistry extends + ExtensionRegistry { + + public static ModulaEditorReconcilingStrategyContributionRegistry get() { + return ModulaEditorReconcilingStrategyContributionRegistryHolder.instance; + } + + private static class ModulaEditorReconcilingStrategyContributionRegistryHolder { + static ModulaEditorReconcilingStrategyContributionRegistry instance = new ModulaEditorReconcilingStrategyContributionRegistry(XdsEditorsPlugin.PLUGIN_ID, "modulaEditorReconcilingStrategyContribution", "class"); //$NON-NLS-1$ //$NON-NLS-2$ + static { + instance.contributions(); + } + } + + protected ModulaEditorReconcilingStrategyContributionRegistry(String pluginId, String extensionPointName, + String executableExtensionPropertyName) { + super(pluginId, extensionPointName, executableExtensionPropertyName); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconciler.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconciler.java new file mode 100644 index 0000000..7a8f351 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconciler.java @@ -0,0 +1,114 @@ +package com.excelsior.xds.ui.editor.modula.reconciler; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.reconciler.MonoReconciler; +import org.eclipse.jface.util.IPropertyChangeListener; +import org.eclipse.jface.util.PropertyChangeEvent; +import org.eclipse.ui.editors.text.EditorsUI; +import org.eclipse.ui.texteditor.ITextEditor; +import org.eclipse.ui.texteditor.spelling.SpellingService; + +import com.excelsior.xds.ui.editor.commons.SourceCodeTextEditor; + +public class ModulaReconciler extends MonoReconciler +{ + /** The property change listener. */ + private IPropertyChangeListener propertyChangeListener; + + /** The mutex that keeps us from running multiple reconcilers on one editor. */ + private Object fMutex; + + private boolean ininitalProcessDone = false; + + /** + * Creates a new reconciler. + * + * @param editor the editor + * @param strategy the reconcile strategy + * @param isIncremental true if this is an incremental reconciler + */ + public ModulaReconciler(ITextEditor editor, ModulaCompositeReconcilingStrategy strategy) { + super(strategy, false); + + // https://bugs.eclipse.org/bugs/show_bug.cgi?id=63898 + // when re-using editors, a new reconciler is set up by the source viewer + // and the old one uninstalled. However, the old reconciler may still be + // running. + // To avoid having to reconcilers calling SourceCodeTextEditor.reconciled, + // we synchronized on a lock object provided by the editor. + // The critical section is really the entire run() method of the reconciler + // thread, but synchronizing process() only will keep JavaReconcilingStrategy + // from running concurrently on the same editor. + // TODO remove once we have ensured that there is only one reconciler per editor. + if (editor instanceof SourceCodeTextEditor) + fMutex= ((SourceCodeTextEditor) editor).getReconcilerLock(); + else + fMutex= new Object(); // Null Object + } + + + /** + * {@inheritDoc} + */ + @Override + public void install(ITextViewer textViewer) { + super.install(textViewer); + + propertyChangeListener = new IPropertyChangeListener() { + public void propertyChange(PropertyChangeEvent event) { + boolean isEpeelingEnambed = SpellingService.PREFERENCE_SPELLING_ENABLED.equals(event.getProperty()) + || SpellingService.PREFERENCE_SPELLING_ENGINE.equals(event.getProperty()); + if (isEpeelingEnambed) { + forceReconciling(); + } + } + }; + EditorsUI.getPreferenceStore().addPropertyChangeListener(propertyChangeListener); + } + + /** + * {@inheritDoc} + */ + @Override + public void uninstall() { + EditorsUI.getPreferenceStore().removePropertyChangeListener(propertyChangeListener); + propertyChangeListener = null; + + super.uninstall(); + } + + + /** + * {@inheritDoc} + */ + @Override + protected void initialProcess() { + synchronized (fMutex) { + super.initialProcess(); + } + ininitalProcessDone = true; + } + + + /** + * {@inheritDoc} + */ + @Override + protected void forceReconciling() { + if (ininitalProcessDone) { + super.forceReconciling(); + } + } + + + /** + * {@inheritDoc} + */ + @Override + protected void aboutToBeReconciled() { + ModulaCompositeReconcilingStrategy strategy = (ModulaCompositeReconcilingStrategy) getReconcilingStrategy(IDocument.DEFAULT_CONTENT_TYPE); + strategy.aboutToBeReconciled(); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconcilingStrategy.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconcilingStrategy.java new file mode 100644 index 0000000..d7cc662 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciler/ModulaReconcilingStrategy.java @@ -0,0 +1,89 @@ +package com.excelsior.xds.ui.editor.modula.reconciler; + +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.IRegion; +import org.eclipse.jface.text.reconciler.DirtyRegion; +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; +import org.eclipse.jface.text.reconciler.IReconcilingStrategyExtension; +import org.eclipse.ui.texteditor.ITextEditor; + +import com.excelsior.xds.core.ide.symbol.ParseTask; +import com.excelsior.xds.core.ide.symbol.ParseTaskFactory; +import com.excelsior.xds.core.ide.symbol.SymbolModelManager; + +public class ModulaReconcilingStrategy implements IReconcilingStrategy + , IReconcilingStrategyExtension +{ + /** The text editor to operate on. */ + private final ITextEditor textEditor; + + /** + * Creates a new Modula-2 reconciling strategy. + * + * @param editor the editor of the strategy's reconciler + */ + public ModulaReconcilingStrategy(ITextEditor editor) { + this.textEditor = editor; + } + + + /** + * {@inheritDoc} + */ + @Override + public void setDocument(IDocument document) { + } + + /** + * {@inheritDoc} + */ + @Override + public void setProgressMonitor(IProgressMonitor monitor) { +// progressMonitor = monitor; + } + + + /** + * {@inheritDoc} + */ + @Override + public void initialReconcile() { + reconcileInternal(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(IRegion partition) { + reconcileInternal(); + } + + /** + * {@inheritDoc} + */ + @Override + public void reconcile(DirtyRegion dirtyRegion, IRegion subRegion) { + reconcileInternal(); + } + + /** + * Schedules parse of the modified or recently opened editor. + */ + private void reconcileInternal() { + ParseTask task = ParseTaskFactory.create(textEditor.getEditorInput()); + task.setNeedModulaAst(true); + SymbolModelManager.instance().scheduleParse(task, null); + } + + public void aboutToBeReconciled() { + } + + + /** + * Called when reconcile has finished. + */ + public void reconciled() { + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciling/IReconcilingStrategyProvider.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciling/IReconcilingStrategyProvider.java new file mode 100644 index 0000000..896c593 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/reconciling/IReconcilingStrategyProvider.java @@ -0,0 +1,8 @@ +package com.excelsior.xds.ui.editor.modula.reconciling; + +import org.eclipse.jface.text.reconciler.IReconcilingStrategy; +import org.eclipse.jface.text.source.ISourceViewer; + +public interface IReconcilingStrategyProvider { + IReconcilingStrategy createReconcilingStrategy(ISourceViewer viewer); +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaFlexBasedScanner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaFlexBasedScanner.java new file mode 100644 index 0000000..5fb8e16 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaFlexBasedScanner.java @@ -0,0 +1,29 @@ +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.FlexAdapter; + + +public class ModulaFlexBasedScanner extends FlexAdapter { + + public ModulaFlexBasedScanner(TokenManager tokenManager) { + super(new _ModulaFlexScanner(), tokenManager); + } + +// @Override +// public IToken nextToken() { +// IToken token = super.nextToken(); +// if (token instanceof TextAttributeToken) { +// System.out.println(">>> token="+((TextAttributeToken)token).getName()); +// } else if (token.isWhitespace()) { +// System.out.println(">>> token=Token.WHITESPACE"); +// } else if (token.isEOF()) { +// System.out.println(">>> token=Token.EOF"); +// } else { +// System.out.println(">>> token="+token.getClass().getName()); +// } +// System.out.println(" offset="+getTokenOffset()+", length="+getTokenLength()); +// return token; +// } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaPragmaFlexBasedScanner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaPragmaFlexBasedScanner.java new file mode 100644 index 0000000..4ccd1db --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/ModulaPragmaFlexBasedScanner.java @@ -0,0 +1,12 @@ +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.commons.syntaxcolor.TokenManager; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.FlexAdapter; + +public class ModulaPragmaFlexBasedScanner extends FlexAdapter { + + public ModulaPragmaFlexBasedScanner(TokenManager tokenManager) { + super(new _ModulaPragmaFlexScanner(), tokenManager); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaFlexScanner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaFlexScanner.java new file mode 100644 index 0000000..d731d29 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaFlexScanner.java @@ -0,0 +1,916 @@ +/* The following code was generated by JFlex 1.4.3 on 02.03.16 11:00 */ + +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.editor.modula.ModulaTokens; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.IFlexScanner; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.SpecialTokenDescriptors; + + +/** + * This class is a scanner generated by + * JFlex 1.4.3 + * on 02.03.16 11:00 from the specification file + * modula2.flex + */ +public class _ModulaFlexScanner implements IFlexScanner { + /** initial size of the lookahead buffer */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** lexical states */ + public static final int YYINITIAL = 0; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0 + }; + + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED = + "\11\0\2\1\1\0\2\1\22\0\1\1\5\0\1\44\1\0\1\16"+ + "\1\16\1\0\1\14\1\0\1\14\1\15\1\0\1\5\1\57\1\62"+ + "\1\61\1\63\1\5\1\60\1\5\1\56\1\6\7\0\1\17\1\26"+ + "\1\10\1\23\1\13\1\33\1\27\1\11\1\30\1\3\1\42\1\35"+ + "\1\21\1\22\1\31\1\37\1\43\1\24\1\20\1\32\1\41\1\34"+ + "\1\40\1\36\1\25\1\45\1\16\1\0\1\16\1\0\1\2\1\0"+ + "\3\7\1\55\1\54\1\7\1\53\1\12\1\46\4\3\1\47\1\65"+ + "\3\3\1\52\1\50\1\51\1\64\3\3\1\66\1\16\1\0\1\16"+ + "\1\44\53\0\1\3\12\0\1\3\4\0\1\3\5\0\27\3\1\0"+ + "\37\3\1\0\u01ca\3\4\0\14\3\16\0\5\3\7\0\1\3\1\0"+ + "\1\3\201\0\5\3\1\0\2\3\2\0\4\3\10\0\1\3\1\0"+ + "\3\3\1\0\1\3\1\0\24\3\1\0\123\3\1\0\213\3\10\0"+ + "\236\3\11\0\46\3\2\0\1\3\7\0\47\3\110\0\33\3\5\0"+ + "\3\3\55\0\53\3\25\0\12\4\4\0\2\3\1\0\143\3\1\0"+ + "\1\3\17\0\2\3\7\0\2\3\12\4\3\3\2\0\1\3\20\0"+ + "\1\3\1\0\36\3\35\0\131\3\13\0\1\3\16\0\12\4\41\3"+ + "\11\0\2\3\4\0\1\3\5\0\26\3\4\0\1\3\11\0\1\3"+ + "\3\0\1\3\27\0\31\3\107\0\1\3\1\0\13\3\127\0\66\3"+ + "\3\0\1\3\22\0\1\3\7\0\12\3\4\0\12\4\1\0\7\3"+ + "\1\0\7\3\5\0\10\3\2\0\2\3\2\0\26\3\1\0\7\3"+ + "\1\0\1\3\3\0\4\3\3\0\1\3\20\0\1\3\15\0\2\3"+ + "\1\0\3\3\4\0\12\4\2\3\23\0\6\3\4\0\2\3\2\0"+ + "\26\3\1\0\7\3\1\0\2\3\1\0\2\3\1\0\2\3\37\0"+ + "\4\3\1\0\1\3\7\0\12\4\2\0\3\3\20\0\11\3\1\0"+ + "\3\3\1\0\26\3\1\0\7\3\1\0\2\3\1\0\5\3\3\0"+ + "\1\3\22\0\1\3\17\0\2\3\4\0\12\4\25\0\10\3\2\0"+ + "\2\3\2\0\26\3\1\0\7\3\1\0\2\3\1\0\5\3\3\0"+ + "\1\3\36\0\2\3\1\0\3\3\4\0\12\4\1\0\1\3\21\0"+ + "\1\3\1\0\6\3\3\0\3\3\1\0\4\3\3\0\2\3\1\0"+ + "\1\3\1\0\2\3\3\0\2\3\3\0\3\3\3\0\14\3\26\0"+ + "\1\3\25\0\12\4\25\0\10\3\1\0\3\3\1\0\27\3\1\0"+ + "\12\3\1\0\5\3\3\0\1\3\32\0\2\3\6\0\2\3\4\0"+ + "\12\4\25\0\10\3\1\0\3\3\1\0\27\3\1\0\12\3\1\0"+ + "\5\3\3\0\1\3\40\0\1\3\1\0\2\3\4\0\12\4\1\0"+ + "\2\3\22\0\10\3\1\0\3\3\1\0\51\3\2\0\1\3\20\0"+ + "\1\3\21\0\2\3\4\0\12\4\12\0\6\3\5\0\22\3\3\0"+ + "\30\3\1\0\11\3\1\0\1\3\2\0\7\3\72\0\60\3\1\0"+ + "\2\3\14\0\7\3\11\0\12\4\47\0\2\3\1\0\1\3\2\0"+ + "\2\3\1\0\1\3\2\0\1\3\6\0\4\3\1\0\7\3\1\0"+ + "\3\3\1\0\1\3\1\0\1\3\2\0\2\3\1\0\4\3\1\0"+ + "\2\3\11\0\1\3\2\0\5\3\1\0\1\3\11\0\12\4\2\0"+ + "\4\3\40\0\1\3\37\0\12\4\26\0\10\3\1\0\44\3\33\0"+ + "\5\3\163\0\53\3\24\0\1\3\12\4\6\0\6\3\4\0\4\3"+ + "\3\0\1\3\3\0\2\3\7\0\3\3\4\0\15\3\14\0\1\3"+ + "\1\0\12\4\6\0\46\3\1\0\1\3\5\0\1\3\2\0\53\3"+ + "\1\0\u014d\3\1\0\4\3\2\0\7\3\1\0\1\3\1\0\4\3"+ + "\2\0\51\3\1\0\4\3\2\0\41\3\1\0\4\3\2\0\7\3"+ + "\1\0\1\3\1\0\4\3\2\0\17\3\1\0\71\3\1\0\4\3"+ + "\2\0\103\3\45\0\20\3\20\0\125\3\14\0\u026c\3\2\0\21\3"+ + "\1\0\32\3\5\0\113\3\25\0\15\3\1\0\4\3\16\0\22\3"+ + "\16\0\22\3\16\0\15\3\1\0\3\3\17\0\64\3\43\0\1\3"+ + "\4\0\1\3\3\0\12\4\46\0\12\4\6\0\130\3\10\0\51\3"+ + "\1\0\1\3\5\0\106\3\12\0\35\3\51\0\12\4\36\3\2\0"+ + "\5\3\13\0\54\3\25\0\7\3\10\0\12\4\46\0\27\3\11\0"+ + "\65\3\53\0\12\4\6\0\12\4\15\0\1\3\135\0\57\3\21\0"+ + "\7\3\4\0\12\4\51\0\36\3\15\0\2\3\12\4\54\3\32\0"+ + "\44\3\34\0\12\4\3\0\3\3\12\4\44\3\153\0\4\3\1\0"+ + "\4\3\3\0\2\3\11\0\300\3\100\0\u0116\3\2\0\6\3\2\0"+ + "\46\3\2\0\6\3\2\0\10\3\1\0\1\3\1\0\1\3\1\0"+ + "\1\3\1\0\37\3\2\0\65\3\1\0\7\3\1\0\1\3\3\0"+ + "\3\3\1\0\7\3\3\0\4\3\2\0\6\3\4\0\15\3\5\0"+ + "\3\3\1\0\7\3\164\0\1\3\15\0\1\3\20\0\15\3\145\0"+ + "\1\3\4\0\1\3\2\0\12\3\1\0\1\3\3\0\5\3\6\0"+ + "\1\3\1\0\1\3\1\0\1\3\1\0\4\3\1\0\13\3\2\0"+ + "\4\3\5\0\5\3\4\0\1\3\64\0\2\3\u0a7b\0\57\3\1\0"+ + "\57\3\1\0\205\3\6\0\4\3\3\0\2\3\14\0\46\3\1\0"+ + "\1\3\5\0\1\3\2\0\70\3\7\0\1\3\20\0\27\3\11\0"+ + "\7\3\1\0\7\3\1\0\7\3\1\0\7\3\1\0\7\3\1\0"+ + "\7\3\1\0\7\3\1\0\7\3\120\0\1\3\u01d5\0\2\3\52\0"+ + "\5\3\5\0\2\3\4\0\126\3\6\0\3\3\1\0\132\3\1\0"+ + "\4\3\5\0\51\3\3\0\136\3\21\0\33\3\65\0\20\3\u0200\0"+ + "\u19b6\3\112\0\u51cd\3\63\0\u048d\3\103\0\56\3\2\0\u010d\3\3\0"+ + "\20\3\12\4\2\3\24\0\57\3\20\0\31\3\10\0\106\3\61\0"+ + "\11\3\2\0\147\3\2\0\4\3\1\0\4\3\14\0\13\3\115\0"+ + "\12\3\1\0\3\3\1\0\4\3\1\0\27\3\35\0\64\3\16\0"+ + "\62\3\34\0\12\4\30\0\6\3\3\0\1\3\4\0\12\4\34\3"+ + "\12\0\27\3\31\0\35\3\7\0\57\3\34\0\1\3\12\4\46\0"+ + "\51\3\27\0\3\3\1\0\10\3\4\0\12\4\6\0\27\3\3\0"+ + "\1\3\5\0\60\3\1\0\1\3\3\0\2\3\2\0\5\3\2\0"+ + "\1\3\1\0\1\3\30\0\3\3\2\0\13\3\7\0\3\3\14\0"+ + "\6\3\2\0\6\3\2\0\6\3\11\0\7\3\1\0\7\3\221\0"+ + "\43\3\15\0\12\4\6\0\u2ba4\3\14\0\27\3\4\0\61\3\u2104\0"+ + "\u016e\3\2\0\152\3\46\0\7\3\14\0\5\3\5\0\1\3\1\0"+ + "\12\3\1\0\15\3\1\0\5\3\1\0\1\3\1\0\2\3\1\0"+ + "\2\3\1\0\154\3\41\0\u016b\3\22\0\100\3\2\0\66\3\50\0"+ + "\14\3\164\0\5\3\1\0\207\3\23\0\12\4\7\0\32\3\6\0"+ + "\32\3\13\0\131\3\3\0\6\3\2\0\6\3\2\0\6\3\2\0"+ + "\3\3\43\0"; + + /** + * Translates characters to character classes + */ + private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + + /** + * Translates DFA states to action switch labels. + */ + private static final int [] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 = + "\1\0\1\1\1\2\1\1\2\3\4\1\1\4\22\1"+ + "\1\5\4\1\1\0\3\3\1\6\32\1\2\5\2\1"+ + "\1\5\3\1\3\5\31\1\1\3\1\0\1\7\17\1"+ + "\1\5\4\1\1\5\1\1\1\10\14\1\1\5\1\1"+ + "\1\5\6\1\1\5\2\1\1\6\15\1\1\3\1\0"+ + "\1\6\37\1\1\5\42\1\1\6\37\1"; + + private static int [] zzUnpackAction() { + int [] result = new int[266]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Translates a state to a row index in the transition table + */ + private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = + "\0\0\0\67\0\156\0\245\0\334\0\u0113\0\u014a\0\u0181"+ + "\0\u01b8\0\u01ef\0\67\0\u0226\0\u025d\0\u0294\0\u02cb\0\u0302"+ + "\0\u0339\0\u0370\0\u03a7\0\u03de\0\u0415\0\u044c\0\u0483\0\u04ba"+ + "\0\u04f1\0\u0528\0\u055f\0\u0596\0\u05cd\0\67\0\u0604\0\u063b"+ + "\0\u0672\0\u06a9\0\u06e0\0\u06e0\0\67\0\u0717\0\245\0\u074e"+ + "\0\u0785\0\u07bc\0\u07f3\0\u082a\0\u0861\0\u0898\0\u08cf\0\u0906"+ + "\0\u093d\0\u0974\0\u09ab\0\u09e2\0\u0a19\0\u0a50\0\u0a87\0\u0abe"+ + "\0\u0af5\0\u0b2c\0\u0b63\0\u0b9a\0\u0bd1\0\u0c08\0\u0c3f\0\u0c76"+ + "\0\u0cad\0\245\0\u0ce4\0\u0d1b\0\u0d52\0\u0d89\0\u0dc0\0\u0df7"+ + "\0\u0e2e\0\u0e65\0\u0e9c\0\u0898\0\u0ed3\0\u0f0a\0\u0f41\0\u0f78"+ + "\0\u0faf\0\u0fe6\0\u101d\0\u1054\0\u108b\0\u10c2\0\u10f9\0\u1130"+ + "\0\u1167\0\u119e\0\u11d5\0\u120c\0\u1243\0\u127a\0\u12b1\0\u12e8"+ + "\0\u131f\0\u1356\0\u138d\0\u13c4\0\u13fb\0\u1432\0\u1469\0\67"+ + "\0\u14a0\0\u14d7\0\u150e\0\u1545\0\u157c\0\u15b3\0\u15ea\0\u1621"+ + "\0\u1658\0\u168f\0\u16c6\0\u16fd\0\u1734\0\u176b\0\u17a2\0\u17d9"+ + "\0\u1810\0\u1847\0\u187e\0\u18b5\0\u18ec\0\u1923\0\245\0\u195a"+ + "\0\u1991\0\u19c8\0\u19ff\0\u1a36\0\u1a6d\0\u1aa4\0\u1adb\0\u1b12"+ + "\0\u1b49\0\u1b80\0\u1bb7\0\u1a36\0\u1bee\0\u1c25\0\u1c5c\0\u1c93"+ + "\0\u1cca\0\u1d01\0\u1d38\0\u1d6f\0\u1da6\0\u1ddd\0\u1e14\0\u1e4b"+ + "\0\u1e82\0\u1eb9\0\u1ef0\0\u1f27\0\u1f5e\0\u1f95\0\u1fcc\0\u2003"+ + "\0\u203a\0\u2071\0\u20a8\0\u20df\0\u2116\0\u214d\0\u214d\0\u2184"+ + "\0\u21bb\0\u21f2\0\u2229\0\u2260\0\u2297\0\u22ce\0\u2305\0\u233c"+ + "\0\u2373\0\u23aa\0\u23e1\0\u2418\0\u244f\0\u2486\0\u24bd\0\u24f4"+ + "\0\u252b\0\u2562\0\u0d89\0\u2599\0\u25d0\0\u2607\0\u263e\0\u2675"+ + "\0\u26ac\0\u26e3\0\u271a\0\u2751\0\u2788\0\u27bf\0\u27f6\0\u282d"+ + "\0\u2864\0\u289b\0\u28d2\0\u2909\0\u2940\0\u2977\0\u29ae\0\u29e5"+ + "\0\u2a1c\0\u2a53\0\u2a8a\0\u2ac1\0\u2af8\0\u2b2f\0\u2b66\0\u2b9d"+ + "\0\u2bd4\0\u2c0b\0\u2c42\0\u2c79\0\u2cb0\0\u2ce7\0\u2d1e\0\u2d55"+ + "\0\u2d8c\0\u2dc3\0\u2dfa\0\u2e31\0\u2e68\0\u2e9f\0\u2ed6\0\u2f0d"+ + "\0\u2f44\0\u2f7b\0\u2fb2\0\u2fe9\0\u3020\0\u3057\0\u308e\0\u30c5"+ + "\0\u30fc\0\u3133\0\u316a\0\u31a1\0\u31d8\0\u320f\0\u3246\0\u327d"+ + "\0\u32b4\0\u32eb\0\u3322\0\u3359\0\u3390\0\u33c7\0\u33fe\0\u3435"+ + "\0\u346c\0\u34a3\0\u34da\0\u3511\0\u3548\0\u357f\0\u35b6\0\u35ed"+ + "\0\u3624\0\u365b"; + + private static int [] zzUnpackRowMap() { + int [] result = new int[266]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int [] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 = + "\1\2\1\3\2\4\1\2\1\5\1\6\1\4\1\7"+ + "\1\10\1\4\1\11\1\2\1\12\1\13\1\14\1\15"+ + "\1\16\1\17\1\20\1\21\1\4\1\22\1\23\1\24"+ + "\1\25\1\26\1\27\1\30\1\31\1\4\1\32\1\33"+ + "\1\34\1\4\1\35\1\36\1\4\1\37\2\4\1\40"+ + "\1\41\3\4\1\6\5\5\1\42\2\4\70\0\1\3"+ + "\67\0\12\4\3\0\25\4\1\0\22\4\5\0\1\5"+ + "\1\6\1\43\1\44\2\45\1\43\1\0\1\46\1\0"+ + "\1\43\3\0\1\43\2\0\1\43\4\0\1\43\20\0"+ + "\2\43\1\6\5\5\10\0\2\6\2\43\2\45\1\43"+ + "\1\0\1\46\1\0\1\43\3\0\1\43\2\0\1\43"+ + "\4\0\1\43\20\0\2\43\6\6\5\0\6\4\1\47"+ + "\1\50\2\4\3\0\1\51\1\4\1\52\7\4\1\53"+ + "\12\4\1\0\22\4\2\0\12\4\3\0\1\54\10\4"+ + "\1\55\13\4\1\0\22\4\2\0\12\4\3\0\3\4"+ + "\1\56\12\4\1\57\1\60\5\4\1\0\22\4\15\0"+ + "\1\2\53\0\12\4\3\0\1\4\1\61\1\4\1\56"+ + "\1\62\1\63\1\4\1\64\15\4\1\0\22\4\2\0"+ + "\7\4\1\65\1\4\1\66\3\0\6\4\1\67\2\4"+ + "\1\70\10\4\1\71\2\4\1\0\22\4\2\0\12\4"+ + "\3\0\1\72\10\4\1\73\1\74\12\4\1\0\22\4"+ + "\2\0\11\4\1\75\3\0\11\4\1\76\1\77\12\4"+ + "\1\0\22\4\2\0\11\4\1\100\3\0\11\4\1\101"+ + "\1\102\12\4\1\0\22\4\2\0\11\4\1\103\3\0"+ + "\12\4\1\104\12\4\1\0\22\4\2\0\11\4\1\105"+ + "\3\0\6\4\1\106\2\4\1\107\1\110\12\4\1\0"+ + "\22\4\2\0\11\4\1\111\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\2\4\1\112\1\113\10\4\1\102"+ + "\10\4\1\0\22\4\2\0\12\4\3\0\4\4\1\56"+ + "\1\114\6\4\1\102\10\4\1\0\22\4\2\0\7\4"+ + "\1\115\2\4\3\0\1\4\1\116\3\4\1\117\1\120"+ + "\3\4\1\102\12\4\1\0\22\4\2\0\12\4\3\0"+ + "\1\121\4\4\1\122\3\4\1\123\1\124\3\4\1\125"+ + "\6\4\1\0\22\4\2\0\12\4\3\0\1\126\24\4"+ + "\1\0\22\4\2\0\11\4\1\127\3\0\12\4\1\130"+ + "\1\4\1\131\10\4\1\0\22\4\2\0\12\4\3\0"+ + "\1\132\4\4\1\133\4\4\1\134\7\4\1\111\2\4"+ + "\1\0\22\4\2\0\7\4\1\135\2\4\3\0\11\4"+ + "\1\136\1\137\12\4\1\0\22\4\2\0\12\4\3\0"+ + "\3\4\1\140\21\4\1\0\22\4\2\0\12\4\3\0"+ + "\22\4\1\141\2\4\1\0\22\4\2\0\12\4\3\0"+ + "\25\4\1\0\2\4\1\142\17\4\2\0\12\4\3\0"+ + "\25\4\1\0\2\4\1\143\17\4\2\0\12\4\3\0"+ + "\25\4\1\0\1\4\1\144\20\4\2\0\12\4\3\0"+ + "\25\4\1\0\20\4\1\145\1\4\5\0\4\43\2\45"+ + "\1\43\3\0\1\43\3\0\1\43\2\0\1\43\4\0"+ + "\1\43\20\0\10\43\10\0\2\146\4\0\1\147\1\0"+ + "\1\150\40\0\6\146\5\0\12\4\3\0\1\151\4\4"+ + "\1\102\17\4\1\0\22\4\2\0\12\4\3\0\1\4"+ + "\1\152\3\4\1\153\12\4\1\102\4\4\1\0\22\4"+ + "\2\0\12\4\3\0\20\4\1\154\4\4\1\0\22\4"+ + "\2\0\12\4\3\0\2\4\1\155\1\156\21\4\1\0"+ + "\22\4\2\0\12\4\3\0\16\4\1\77\6\4\1\0"+ + "\22\4\2\0\12\4\3\0\10\4\1\157\14\4\1\0"+ + "\22\4\2\0\12\4\3\0\4\4\1\102\20\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\4\1\160\23\4\1\0"+ + "\22\4\2\0\6\4\1\161\3\4\3\0\11\4\1\77"+ + "\6\4\1\162\4\4\1\0\22\4\2\0\12\4\3\0"+ + "\1\4\1\163\1\102\22\4\1\0\22\4\2\0\12\4"+ + "\3\0\4\4\1\164\1\47\17\4\1\0\22\4\2\0"+ + "\12\4\3\0\5\4\1\165\17\4\1\0\22\4\2\0"+ + "\12\4\3\0\1\4\1\102\23\4\1\0\22\4\2\0"+ + "\12\4\3\0\11\4\1\166\1\167\12\4\1\0\22\4"+ + "\2\0\12\4\3\0\13\4\1\170\10\4\1\102\1\0"+ + "\22\4\2\0\12\4\3\0\1\4\1\171\23\4\1\0"+ + "\22\4\2\0\12\4\3\0\25\4\1\0\1\172\21\4"+ + "\2\0\12\4\3\0\7\4\1\173\15\4\1\0\22\4"+ + "\2\0\12\4\3\0\17\4\1\102\3\4\1\174\1\4"+ + "\1\0\22\4\2\0\12\4\3\0\3\4\1\102\21\4"+ + "\1\0\22\4\2\0\12\4\3\0\4\4\1\175\10\4"+ + "\1\176\7\4\1\0\22\4\2\0\12\4\3\0\21\4"+ + "\1\102\3\4\1\0\22\4\2\0\12\4\3\0\16\4"+ + "\1\177\6\4\1\0\22\4\2\0\12\4\3\0\13\4"+ + "\1\102\11\4\1\0\22\4\2\0\6\4\1\102\3\4"+ + "\3\0\14\4\1\200\10\4\1\0\22\4\2\0\12\4"+ + "\3\0\1\4\1\201\12\4\1\202\1\102\7\4\1\0"+ + "\22\4\2\0\6\4\1\203\3\4\3\0\1\204\1\4"+ + "\1\102\10\4\1\205\1\47\3\4\1\206\4\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\207\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\10\4\1\210\14\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\176\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\211\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\12\4\1\212\12\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\47\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\20\4\1\213\4\4\1\0"+ + "\22\4\2\0\6\4\1\214\3\4\3\0\4\4\1\215"+ + "\6\4\1\216\11\4\1\0\22\4\2\0\11\4\1\73"+ + "\3\0\25\4\1\0\22\4\2\0\12\4\3\0\11\4"+ + "\1\217\13\4\1\0\22\4\2\0\12\4\3\0\22\4"+ + "\1\220\2\4\1\0\22\4\2\0\12\4\3\0\20\4"+ + "\1\172\4\4\1\0\22\4\2\0\12\4\3\0\16\4"+ + "\1\221\6\4\1\0\22\4\2\0\12\4\3\0\12\4"+ + "\1\222\12\4\1\0\22\4\2\0\12\4\3\0\3\4"+ + "\1\223\12\4\1\224\6\4\1\0\22\4\2\0\12\4"+ + "\3\0\5\4\1\225\17\4\1\0\22\4\2\0\12\4"+ + "\3\0\12\4\1\226\12\4\1\0\22\4\2\0\12\4"+ + "\3\0\5\4\1\102\10\4\1\102\6\4\1\0\22\4"+ + "\2\0\12\4\3\0\3\4\1\227\21\4\1\0\22\4"+ + "\2\0\6\4\1\230\3\4\3\0\3\4\1\231\6\4"+ + "\1\232\12\4\1\0\22\4\2\0\12\4\3\0\16\4"+ + "\1\125\6\4\1\0\22\4\2\0\6\4\1\233\3\4"+ + "\3\0\25\4\1\0\22\4\2\0\12\4\3\0\12\4"+ + "\1\234\12\4\1\0\22\4\2\0\12\4\3\0\11\4"+ + "\1\235\13\4\1\0\22\4\2\0\12\4\3\0\11\4"+ + "\1\236\13\4\1\0\22\4\2\0\12\4\3\0\13\4"+ + "\1\157\11\4\1\0\22\4\2\0\12\4\3\0\5\4"+ + "\1\237\17\4\1\0\22\4\2\0\12\4\3\0\11\4"+ + "\1\240\1\4\1\241\11\4\1\0\22\4\2\0\12\4"+ + "\3\0\1\242\24\4\1\0\22\4\2\0\12\4\3\0"+ + "\25\4\1\0\3\4\1\47\16\4\2\0\12\4\3\0"+ + "\25\4\1\0\5\4\1\243\14\4\2\0\12\4\3\0"+ + "\25\4\1\0\21\4\1\244\2\0\12\4\3\0\25\4"+ + "\1\0\1\4\1\245\20\4\5\0\2\146\4\0\1\147"+ + "\42\0\6\146\10\0\2\246\5\0\1\247\41\0\6\246"+ + "\5\0\12\4\3\0\5\4\1\102\17\4\1\0\22\4"+ + "\2\0\11\4\1\102\3\0\13\4\1\47\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\4\4\1\250\20\4\1\0"+ + "\22\4\2\0\12\4\3\0\16\4\1\251\6\4\1\0"+ + "\22\4\2\0\12\4\3\0\20\4\1\252\4\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\4\1\77\23\4\1\0"+ + "\22\4\2\0\7\4\1\102\2\4\3\0\25\4\1\0"+ + "\22\4\2\0\11\4\1\102\3\0\11\4\1\253\13\4"+ + "\1\0\22\4\2\0\11\4\1\254\3\0\16\4\1\102"+ + "\6\4\1\0\22\4\2\0\12\4\3\0\12\4\1\255"+ + "\12\4\1\0\22\4\2\0\11\4\1\255\3\0\25\4"+ + "\1\0\22\4\2\0\12\4\3\0\1\256\4\4\1\257"+ + "\17\4\1\0\22\4\2\0\12\4\3\0\1\260\24\4"+ + "\1\0\22\4\2\0\12\4\3\0\14\4\1\111\10\4"+ + "\1\0\22\4\2\0\12\4\3\0\5\4\1\261\17\4"+ + "\1\0\22\4\2\0\12\4\3\0\25\4\1\0\11\4"+ + "\1\47\1\262\1\263\1\264\5\4\2\0\12\4\3\0"+ + "\13\4\1\265\11\4\1\0\22\4\2\0\11\4\1\102"+ + "\3\0\25\4\1\0\22\4\2\0\12\4\3\0\1\256"+ + "\24\4\1\0\22\4\2\0\11\4\1\173\3\0\25\4"+ + "\1\0\22\4\2\0\12\4\3\0\22\4\1\236\2\4"+ + "\1\0\22\4\2\0\11\4\1\47\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\11\4\1\266\13\4\1\0"+ + "\22\4\2\0\12\4\3\0\20\4\1\267\4\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\270\24\4\1\0\22\4"+ + "\2\0\12\4\3\0\12\4\1\271\12\4\1\0\22\4"+ + "\2\0\12\4\3\0\16\4\1\102\6\4\1\0\22\4"+ + "\2\0\12\4\3\0\5\4\1\260\14\4\1\272\2\4"+ + "\1\0\22\4\2\0\11\4\1\226\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\273\24\4\1\0\22\4"+ + "\2\0\12\4\3\0\11\4\1\73\13\4\1\0\22\4"+ + "\2\0\12\4\3\0\1\4\1\274\23\4\1\0\22\4"+ + "\2\0\12\4\3\0\16\4\1\275\6\4\1\0\22\4"+ + "\2\0\12\4\3\0\12\4\1\255\3\4\1\276\6\4"+ + "\1\0\22\4\2\0\11\4\1\277\3\0\25\4\1\0"+ + "\22\4\2\0\11\4\1\300\3\0\25\4\1\0\11\4"+ + "\1\47\1\262\1\263\1\264\5\4\2\0\12\4\3\0"+ + "\25\4\1\0\1\176\21\4\2\0\11\4\1\177\3\0"+ + "\3\4\1\301\21\4\1\0\22\4\2\0\12\4\3\0"+ + "\1\4\1\302\23\4\1\0\22\4\2\0\12\4\3\0"+ + "\2\4\1\102\22\4\1\0\22\4\2\0\12\4\3\0"+ + "\1\303\24\4\1\0\22\4\2\0\12\4\3\0\16\4"+ + "\1\47\6\4\1\0\22\4\2\0\12\4\3\0\21\4"+ + "\1\304\3\4\1\0\22\4\2\0\12\4\3\0\1\77"+ + "\24\4\1\0\22\4\2\0\12\4\3\0\10\4\1\136"+ + "\14\4\1\0\22\4\2\0\12\4\3\0\1\4\1\305"+ + "\23\4\1\0\22\4\2\0\12\4\3\0\10\4\1\306"+ + "\14\4\1\0\22\4\2\0\12\4\3\0\20\4\1\102"+ + "\4\4\1\0\22\4\2\0\12\4\3\0\23\4\1\307"+ + "\1\4\1\0\22\4\2\0\6\4\1\310\3\4\3\0"+ + "\13\4\1\311\11\4\1\0\22\4\2\0\12\4\3\0"+ + "\3\4\1\312\21\4\1\0\22\4\2\0\12\4\3\0"+ + "\16\4\1\172\6\4\1\0\22\4\2\0\12\4\3\0"+ + "\4\4\1\47\20\4\1\0\22\4\2\0\12\4\3\0"+ + "\3\4\1\313\21\4\1\0\22\4\2\0\12\4\3\0"+ + "\11\4\1\204\13\4\1\0\22\4\2\0\12\4\3\0"+ + "\16\4\1\314\6\4\1\0\22\4\2\0\12\4\3\0"+ + "\25\4\1\0\1\4\1\315\20\4\2\0\12\4\3\0"+ + "\25\4\1\0\7\4\1\316\12\4\2\0\12\4\3\0"+ + "\25\4\1\0\10\4\1\47\11\4\5\0\2\246\47\0"+ + "\6\246\5\0\12\4\3\0\11\4\1\317\13\4\1\0"+ + "\11\4\1\47\1\262\1\263\1\264\5\4\2\0\12\4"+ + "\3\0\17\4\1\102\5\4\1\0\22\4\2\0\12\4"+ + "\3\0\16\4\1\320\6\4\1\0\22\4\2\0\12\4"+ + "\3\0\14\4\1\102\10\4\1\0\22\4\2\0\12\4"+ + "\3\0\20\4\1\77\4\4\1\0\22\4\2\0\12\4"+ + "\3\0\5\4\1\77\17\4\1\0\22\4\2\0\12\4"+ + "\3\0\4\4\1\321\20\4\1\0\22\4\2\0\11\4"+ + "\1\322\3\0\25\4\1\0\22\4\2\0\12\4\3\0"+ + "\6\4\1\102\16\4\1\0\22\4\2\0\12\4\3\0"+ + "\13\4\1\323\11\4\1\0\22\4\2\0\12\4\3\0"+ + "\25\4\1\0\13\4\1\47\6\4\2\0\12\4\3\0"+ + "\25\4\1\0\16\4\1\47\3\4\2\0\12\4\3\0"+ + "\25\4\1\0\15\4\1\47\4\4\2\0\11\4\1\324"+ + "\3\0\25\4\1\0\22\4\2\0\12\4\3\0\3\4"+ + "\1\325\21\4\1\0\22\4\2\0\12\4\3\0\12\4"+ + "\1\326\12\4\1\0\22\4\2\0\12\4\3\0\4\4"+ + "\1\327\20\4\1\0\22\4\2\0\12\4\3\0\5\4"+ + "\1\56\17\4\1\0\22\4\2\0\12\4\3\0\5\4"+ + "\1\73\17\4\1\0\22\4\2\0\11\4\1\77\3\0"+ + "\20\4\1\330\4\4\1\0\22\4\2\0\11\4\1\331"+ + "\3\0\25\4\1\0\11\4\1\47\1\262\1\4\1\264"+ + "\5\4\2\0\11\4\1\332\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\17\4\1\47\5\4\1\0\22\4"+ + "\2\0\12\4\3\0\5\4\1\333\2\4\1\334\14\4"+ + "\1\0\22\4\2\0\6\4\1\102\3\4\3\0\25\4"+ + "\1\0\22\4\2\0\11\4\1\177\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\16\4\1\335\6\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\271\24\4\1\0\22\4"+ + "\2\0\12\4\3\0\20\4\1\336\4\4\1\0\22\4"+ + "\2\0\6\4\1\337\3\4\3\0\5\4\1\340\3\4"+ + "\1\341\13\4\1\0\22\4\2\0\11\4\1\342\3\0"+ + "\25\4\1\0\22\4\2\0\11\4\1\343\3\0\25\4"+ + "\1\0\22\4\2\0\11\4\1\344\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\334\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\13\4\1\345\11\4\1\0"+ + "\22\4\2\0\12\4\3\0\11\4\1\346\13\4\1\0"+ + "\22\4\2\0\12\4\3\0\25\4\1\0\6\4\1\347"+ + "\13\4\2\0\1\142\11\4\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\3\4\1\350\21\4\1\0\22\4"+ + "\2\0\11\4\1\251\3\0\25\4\1\0\22\4\2\0"+ + "\12\4\3\0\5\4\1\47\17\4\1\0\22\4\2\0"+ + "\12\4\3\0\1\4\1\351\23\4\1\0\22\4\2\0"+ + "\6\4\1\304\3\4\3\0\11\4\1\341\13\4\1\0"+ + "\22\4\2\0\12\4\3\0\2\4\1\47\22\4\1\0"+ + "\22\4\2\0\12\4\3\0\11\4\1\352\13\4\1\0"+ + "\22\4\2\0\12\4\3\0\1\4\1\172\23\4\1\0"+ + "\22\4\2\0\12\4\3\0\5\4\1\353\17\4\1\0"+ + "\22\4\2\0\11\4\1\354\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\1\73\24\4\1\0\22\4\2\0"+ + "\12\4\3\0\2\4\1\355\22\4\1\0\22\4\2\0"+ + "\12\4\3\0\5\4\1\356\17\4\1\0\22\4\2\0"+ + "\11\4\1\151\3\0\25\4\1\0\22\4\2\0\12\4"+ + "\3\0\16\4\1\260\6\4\1\0\22\4\2\0\11\4"+ + "\1\357\3\0\25\4\1\0\22\4\2\0\12\4\3\0"+ + "\12\4\1\360\12\4\1\0\22\4\2\0\11\4\1\350"+ + "\3\0\25\4\1\0\22\4\2\0\12\4\3\0\3\4"+ + "\1\77\21\4\1\0\22\4\2\0\12\4\3\0\4\4"+ + "\1\361\20\4\1\0\22\4\2\0\12\4\3\0\4\4"+ + "\1\362\20\4\1\0\22\4\2\0\6\4\1\352\3\4"+ + "\3\0\25\4\1\0\22\4\2\0\11\4\1\363\3\0"+ + "\25\4\1\0\22\4\2\0\12\4\3\0\14\4\1\364"+ + "\10\4\1\0\22\4\2\0\12\4\3\0\25\4\1\0"+ + "\2\4\1\365\17\4\2\0\12\4\3\0\1\204\24\4"+ + "\1\0\22\4\2\0\12\4\3\0\1\4\1\47\23\4"+ + "\1\0\22\4\2\0\12\4\3\0\13\4\1\366\11\4"+ + "\1\0\22\4\2\0\1\367\11\4\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\5\4\1\370\17\4\1\0"+ + "\22\4\2\0\11\4\1\371\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\22\4\1\372\2\4\1\0\22\4"+ + "\2\0\12\4\3\0\5\4\1\373\17\4\1\0\22\4"+ + "\2\0\12\4\3\0\2\4\1\155\22\4\1\0\22\4"+ + "\2\0\12\4\3\0\1\4\1\374\23\4\1\0\22\4"+ + "\2\0\12\4\3\0\22\4\1\375\2\4\1\0\22\4"+ + "\2\0\12\4\3\0\5\4\1\333\17\4\1\0\22\4"+ + "\2\0\12\4\3\0\11\4\1\376\13\4\1\0\22\4"+ + "\2\0\12\4\3\0\25\4\1\0\7\4\1\245\12\4"+ + "\2\0\12\4\3\0\11\4\1\377\13\4\1\0\22\4"+ + "\2\0\12\4\3\0\13\4\1\u0100\11\4\1\0\22\4"+ + "\2\0\12\4\3\0\16\4\1\u0101\6\4\1\0\22\4"+ + "\2\0\12\4\3\0\3\4\1\u0102\21\4\1\0\22\4"+ + "\2\0\12\4\3\0\20\4\1\u0103\4\4\1\0\22\4"+ + "\2\0\12\4\3\0\7\4\1\u0104\11\4\1\u0105\3\4"+ + "\1\0\22\4\2\0\11\4\1\77\3\0\25\4\1\0"+ + "\22\4\2\0\12\4\3\0\5\4\1\172\17\4\1\0"+ + "\22\4\2\0\11\4\1\56\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\12\4\1\73\12\4\1\0\22\4"+ + "\2\0\12\4\3\0\6\4\1\u0106\16\4\1\0\22\4"+ + "\2\0\12\4\3\0\12\4\1\u0107\12\4\1\0\22\4"+ + "\2\0\12\4\3\0\13\4\1\u0108\11\4\1\0\22\4"+ + "\2\0\12\4\3\0\13\4\1\u0109\11\4\1\0\22\4"+ + "\2\0\12\4\3\0\6\4\1\273\16\4\1\0\22\4"+ + "\2\0\12\4\3\0\12\4\1\137\12\4\1\0\22\4"+ + "\2\0\12\4\3\0\20\4\1\176\4\4\1\0\22\4"+ + "\2\0\6\4\1\47\3\4\3\0\25\4\1\0\22\4"+ + "\2\0\12\4\3\0\1\352\24\4\1\0\22\4\2\0"+ + "\12\4\3\0\11\4\1\u010a\13\4\1\0\22\4\2\0"+ + "\12\4\3\0\7\4\1\236\15\4\1\0\22\4"; + + private static int [] zzUnpackTrans() { + int [] result = new int[13970]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + private static final char[] EMPTY_BUFFER = new char[0]; + private static final int YYEOF = -1; + private static java.io.Reader zzReader = null; // Fake + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 = + "\1\0\1\11\10\1\1\11\22\1\1\11\4\1\1\0"+ + "\1\1\1\11\101\1\1\0\1\11\76\1\1\0\143\1"; + + private static int [] zzUnpackAttribute() { + int [] result = new int[266]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the textposition at the last state to be included in yytext */ + private int zzPushbackPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** the number of characters up to the start of the matched text */ + private int yychar; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** nesting level of rule */ + private int nestLevel = 0; + + /** denotes if the user-EOF-code has already been executed */ + private boolean zzEOFDone; + + /* user code: */ + public _ModulaFlexScanner() { + this((java.io.Reader)null); + } + + + public _ModulaFlexScanner(java.io.Reader in) { + this.zzReader = in; + } + + /** + * Creates a new scanner. + * There is also java.io.Reader version of this constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public _ModulaFlexScanner(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char [] zzUnpackCMap(String packed) { + char [] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 1744) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } + + private final void setTokenOffset(int offset){ + zzStartRead = offset; + } + + public final int getTokenOffset(){ + return zzStartRead; + } + + public final int getTokenEnd(){ + return getTokenOffset() + yylength(); + } + + public void reset(CharSequence buffer, int start, int end,int initialState){ + nestLevel = 0; + zzBuffer = buffer; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzPushbackPos = 0; + zzAtEOF = false; + zzAtBOL = true; + zzEndRead = end; + yychar = 0; + yybegin(initialState); + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position pos from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + public void yypushback(int number) { + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void zzDoEOF() { + if (!zzEOFDone) { + zzEOFDone = true; + return; + + } + } + + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + public TokenDescriptor nextToken() throws java.io.IOException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + char [] zzCMapL = ZZ_CMAP; + + int [] zzTransL = ZZ_TRANS; + int [] zzRowMapL = ZZ_ROWMAP; + int [] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + + zzForAction: { + while (true) { + + if (zzCurrentPosL < zzEndReadL) + zzInput = zzBufferL.charAt(zzCurrentPosL++); + else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } + else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } + else { + zzInput = zzBufferL.charAt(zzCurrentPosL++); + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; + if (zzNext == -1) break zzForAction; + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ( (zzAttributes & 1) == 1 ) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ( (zzAttributes & 8) == 8 ) break zzForAction; + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 7: + { yypushback(2); + return ModulaTokens.Number.getToken(); + } + case 9: break; + case 2: + { return SpecialTokenDescriptors.WHITESPACE; + } + case 10: break; + case 4: + { return ModulaTokens.Bracket.getToken(); + } + case 11: break; + case 3: + { return ModulaTokens.Number.getToken(); + } + case 12: break; + case 8: + { return ModulaTokens.BuiltinConstant.getToken(); + } + case 13: break; + case 6: + { return ModulaTokens.SystemModuleKeyword.getToken(); + } + case 14: break; + case 5: + { return ModulaTokens.Keyword.getToken(); + } + case 15: break; + case 1: + { return ModulaTokens.Default.getToken(); + } + case 16: break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + zzDoEOF(); + { + return SpecialTokenDescriptors.EOF; + } + } + else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } + + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaPragmaFlexScanner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaPragmaFlexScanner.java new file mode 100644 index 0000000..98d09e8 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/_ModulaPragmaFlexScanner.java @@ -0,0 +1,578 @@ +/* The following code was generated by JFlex 1.4.3 on 3/5/14 4:52 PM */ + +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.editor.modula.ModulaTokens; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.IFlexScanner; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.SpecialTokenDescriptors; + + +/** + * This class is a scanner generated by + * JFlex 1.4.3 + * on 3/5/14 4:52 PM from the specification file + * C:/Lapukhov/MyProjects/k26/work/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2-pragmas.flex + */ +@SuppressWarnings("unused") +public class _ModulaPragmaFlexScanner implements IFlexScanner { + /** initial size of the lookahead buffer */ + private static final int ZZ_BUFFERSIZE = 16384; + + /** lexical states */ + public static final int YYINITIAL = 0; + + /** + * ZZ_LEXSTATE[l] is the state in the DFA for the lexical state l + * ZZ_LEXSTATE[l+1] is the state in the DFA for the lexical state l + * at the beginning of a line + * l is of the form l = 2*k, k a non negative integer + */ + private static final int ZZ_LEXSTATE[] = { + 0, 0 + }; + + /** + * Translates characters to character classes + */ + private static final String ZZ_CMAP_PACKED = + "\11\0\2\1\1\0\2\1\22\0\1\1\17\0\12\3\7\0\1\21"+ + "\2\2\1\12\1\4\1\10\1\2\1\14\1\7\2\2\1\5\1\2"+ + "\1\11\1\17\1\16\1\2\1\22\1\6\1\13\1\20\1\2\1\15"+ + "\3\2\4\0\1\2\1\0\32\2\3\0\1\23\53\0\1\2\12\0"+ + "\1\2\4\0\1\2\5\0\27\2\1\0\37\2\1\0\u013f\2\31\0"+ + "\162\2\4\0\14\2\16\0\5\2\11\0\1\2\213\0\1\2\13\0"+ + "\1\2\1\0\3\2\1\0\1\2\1\0\24\2\1\0\54\2\1\0"+ + "\46\2\1\0\5\2\4\0\202\2\10\0\105\2\1\0\46\2\2\0"+ + "\2\2\6\0\20\2\41\0\46\2\2\0\1\2\7\0\47\2\110\0"+ + "\33\2\5\0\3\2\56\0\32\2\5\0\13\2\25\0\12\3\4\0"+ + "\2\2\1\0\143\2\1\0\1\2\17\0\2\2\7\0\2\2\12\3"+ + "\3\2\2\0\1\2\20\0\1\2\1\0\36\2\35\0\3\2\60\0"+ + "\46\2\13\0\1\2\u0152\0\66\2\3\0\1\2\22\0\1\2\7\0"+ + "\12\2\4\0\12\3\25\0\10\2\2\0\2\2\2\0\26\2\1\0"+ + "\7\2\1\0\1\2\3\0\4\2\3\0\1\2\36\0\2\2\1\0"+ + "\3\2\4\0\12\3\2\2\23\0\6\2\4\0\2\2\2\0\26\2"+ + "\1\0\7\2\1\0\2\2\1\0\2\2\1\0\2\2\37\0\4\2"+ + "\1\0\1\2\7\0\12\3\2\0\3\2\20\0\11\2\1\0\3\2"+ + "\1\0\26\2\1\0\7\2\1\0\2\2\1\0\5\2\3\0\1\2"+ + "\22\0\1\2\17\0\2\2\4\0\12\3\25\0\10\2\2\0\2\2"+ + "\2\0\26\2\1\0\7\2\1\0\2\2\1\0\5\2\3\0\1\2"+ + "\36\0\2\2\1\0\3\2\4\0\12\3\1\0\1\2\21\0\1\2"+ + "\1\0\6\2\3\0\3\2\1\0\4\2\3\0\2\2\1\0\1\2"+ + "\1\0\2\2\3\0\2\2\3\0\3\2\3\0\10\2\1\0\3\2"+ + "\55\0\11\3\25\0\10\2\1\0\3\2\1\0\27\2\1\0\12\2"+ + "\1\0\5\2\46\0\2\2\4\0\12\3\25\0\10\2\1\0\3\2"+ + "\1\0\27\2\1\0\12\2\1\0\5\2\3\0\1\2\40\0\1\2"+ + "\1\0\2\2\4\0\12\3\25\0\10\2\1\0\3\2\1\0\27\2"+ + "\1\0\20\2\46\0\2\2\4\0\12\3\25\0\22\2\3\0\30\2"+ + "\1\0\11\2\1\0\1\2\2\0\7\2\72\0\60\2\1\0\2\2"+ + "\14\0\7\2\11\0\12\3\47\0\2\2\1\0\1\2\2\0\2\2"+ + "\1\0\1\2\2\0\1\2\6\0\4\2\1\0\7\2\1\0\3\2"+ + "\1\0\1\2\1\0\1\2\2\0\2\2\1\0\4\2\1\0\2\2"+ + "\11\0\1\2\2\0\5\2\1\0\1\2\11\0\12\3\2\0\2\2"+ + "\42\0\1\2\37\0\12\3\26\0\10\2\1\0\42\2\35\0\4\2"+ + "\164\0\42\2\1\0\5\2\1\0\2\2\25\0\12\3\6\0\6\2"+ + "\112\0\46\2\12\0\51\2\7\0\132\2\5\0\104\2\5\0\122\2"+ + "\6\0\7\2\1\0\77\2\1\0\1\2\1\0\4\2\2\0\7\2"+ + "\1\0\1\2\1\0\4\2\2\0\47\2\1\0\1\2\1\0\4\2"+ + "\2\0\37\2\1\0\1\2\1\0\4\2\2\0\7\2\1\0\1\2"+ + "\1\0\4\2\2\0\7\2\1\0\7\2\1\0\27\2\1\0\37\2"+ + "\1\0\1\2\1\0\4\2\2\0\7\2\1\0\47\2\1\0\23\2"+ + "\16\0\11\3\56\0\125\2\14\0\u026c\2\2\0\10\2\12\0\32\2"+ + "\5\0\113\2\25\0\15\2\1\0\4\2\16\0\22\2\16\0\22\2"+ + "\16\0\15\2\1\0\3\2\17\0\64\2\43\0\1\2\4\0\1\2"+ + "\3\0\12\3\46\0\12\3\6\0\130\2\10\0\51\2\127\0\35\2"+ + "\51\0\12\3\36\2\2\0\5\2\u038b\0\154\2\224\0\234\2\4\0"+ + "\132\2\6\0\26\2\2\0\6\2\2\0\46\2\2\0\6\2\2\0"+ + "\10\2\1\0\1\2\1\0\1\2\1\0\1\2\1\0\37\2\2\0"+ + "\65\2\1\0\7\2\1\0\1\2\3\0\3\2\1\0\7\2\3\0"+ + "\4\2\2\0\6\2\4\0\15\2\5\0\3\2\1\0\7\2\164\0"+ + "\1\2\15\0\1\2\202\0\1\2\4\0\1\2\2\0\12\2\1\0"+ + "\1\2\3\0\5\2\6\0\1\2\1\0\1\2\1\0\1\2\1\0"+ + "\4\2\1\0\3\2\1\0\7\2\3\0\3\2\5\0\5\2\u0ebb\0"+ + "\2\2\52\0\5\2\5\0\2\2\4\0\126\2\6\0\3\2\1\0"+ + "\132\2\1\0\4\2\5\0\50\2\4\0\136\2\21\0\30\2\70\0"+ + "\20\2\u0200\0\u19b6\2\112\0\u51a6\2\132\0\u048d\2\u0773\0\u2ba4\2\u215c\0"+ + "\u012e\2\2\0\73\2\225\0\7\2\14\0\5\2\5\0\1\2\1\0"+ + "\12\2\1\0\15\2\1\0\5\2\1\0\1\2\1\0\2\2\1\0"+ + "\2\2\1\0\154\2\41\0\u016b\2\22\0\100\2\2\0\66\2\50\0"+ + "\14\2\164\0\5\2\1\0\207\2\23\0\12\3\7\0\32\2\6\0"+ + "\32\2\13\0\131\2\3\0\6\2\2\0\6\2\2\0\6\2\2\0"+ + "\3\2\43\0"; + + /** + * Translates characters to character classes + */ + private static final char [] ZZ_CMAP = zzUnpackCMap(ZZ_CMAP_PACKED); + + /** + * Translates DFA states to action switch labels. + */ + private static final int [] ZZ_ACTION = zzUnpackAction(); + + private static final String ZZ_ACTION_PACKED_0 = + "\1\0\1\1\1\2\11\1\1\3\2\1\1\3\14\1"; + + private static int [] zzUnpackAction() { + int [] result = new int[28]; + int offset = 0; + offset = zzUnpackAction(ZZ_ACTION_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAction(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /** + * Translates a state to a row index in the transition table + */ + private static final int [] ZZ_ROWMAP = zzUnpackRowMap(); + + private static final String ZZ_ROWMAP_PACKED_0 = + "\0\0\0\24\0\50\0\74\0\120\0\144\0\170\0\214"+ + "\0\240\0\264\0\310\0\334\0\24\0\360\0\u0104\0\74"+ + "\0\u0118\0\u012c\0\u0140\0\u0154\0\u0168\0\u017c\0\u0190\0\u01a4"+ + "\0\u01b8\0\u01cc\0\u01e0\0\u01f4"; + + private static int [] zzUnpackRowMap() { + int [] result = new int[28]; + int offset = 0; + offset = zzUnpackRowMap(ZZ_ROWMAP_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackRowMap(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int high = packed.charAt(i++) << 16; + result[j++] = high | packed.charAt(i++); + } + return j; + } + + /** + * The transition table of the DFA + */ + private static final int [] ZZ_TRANS = zzUnpackTrans(); + + private static final String ZZ_TRANS_PACKED_0 = + "\1\2\1\3\1\4\1\2\1\5\2\4\1\6\1\4"+ + "\1\7\1\10\1\11\2\4\1\12\1\13\1\4\1\14"+ + "\1\4\1\15\25\0\1\3\24\0\21\4\3\0\3\4"+ + "\1\16\3\4\1\17\11\4\3\0\6\4\1\20\12\4"+ + "\3\0\2\4\1\21\12\4\1\22\3\4\3\0\2\4"+ + "\1\23\16\4\3\0\12\4\1\24\6\4\3\0\15\4"+ + "\1\25\1\26\2\4\3\0\20\4\1\20\3\0\7\4"+ + "\1\17\11\4\3\0\4\4\1\27\14\4\3\0\10\4"+ + "\1\20\10\4\3\0\13\4\1\20\5\4\3\0\11\4"+ + "\1\20\7\4\3\0\6\4\1\30\12\4\3\0\2\4"+ + "\1\31\16\4\3\0\14\4\1\20\4\4\3\0\4\4"+ + "\1\32\14\4\3\0\2\4\1\20\2\4\1\6\13\4"+ + "\3\0\5\4\1\33\13\4\3\0\7\4\1\20\11\4"+ + "\3\0\12\4\1\20\6\4\3\0\7\4\1\34\11\4"+ + "\3\0\2\4\1\17\16\4\1\0"; + + private static int [] zzUnpackTrans() { + int [] result = new int[520]; + int offset = 0; + offset = zzUnpackTrans(ZZ_TRANS_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackTrans(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + value--; + do result[j++] = value; while (--count > 0); + } + return j; + } + + + /* error codes */ + private static final int ZZ_UNKNOWN_ERROR = 0; + private static final int ZZ_NO_MATCH = 1; + private static final int ZZ_PUSHBACK_2BIG = 2; + private static final char[] EMPTY_BUFFER = new char[0]; + private static final int YYEOF = -1; + private static java.io.Reader zzReader = null; // Fake + + /* error messages for the codes above */ + private static final String ZZ_ERROR_MSG[] = { + "Unkown internal scanner error", + "Error: could not match input", + "Error: pushback value was too large" + }; + + /** + * ZZ_ATTRIBUTE[aState] contains the attributes of state aState + */ + private static final int [] ZZ_ATTRIBUTE = zzUnpackAttribute(); + + private static final String ZZ_ATTRIBUTE_PACKED_0 = + "\1\0\1\11\12\1\1\11\17\1"; + + private static int [] zzUnpackAttribute() { + int [] result = new int[28]; + int offset = 0; + offset = zzUnpackAttribute(ZZ_ATTRIBUTE_PACKED_0, offset, result); + return result; + } + + private static int zzUnpackAttribute(String packed, int offset, int [] result) { + int i = 0; /* index in packed string */ + int j = offset; /* index in unpacked array */ + int l = packed.length(); + while (i < l) { + int count = packed.charAt(i++); + int value = packed.charAt(i++); + do result[j++] = value; while (--count > 0); + } + return j; + } + + /** the current state of the DFA */ + private int zzState; + + /** the current lexical state */ + private int zzLexicalState = YYINITIAL; + + /** this buffer contains the current text to be matched and is + the source of the yytext() string */ + private CharSequence zzBuffer = ""; + + /** the textposition at the last accepting state */ + private int zzMarkedPos; + + /** the textposition at the last state to be included in yytext */ + private int zzPushbackPos; + + /** the current text position in the buffer */ + private int zzCurrentPos; + + /** startRead marks the beginning of the yytext() string in the buffer */ + private int zzStartRead; + + /** endRead marks the last character in the buffer, that has been read + from input */ + private int zzEndRead; + + /** the number of characters up to the start of the matched text */ + private int yychar; + + /** + * zzAtBOL == true <=> the scanner is currently at the beginning of a line + */ + private boolean zzAtBOL = true; + + /** zzAtEOF == true <=> the scanner is at the EOF */ + private boolean zzAtEOF; + + /** nesting level of rule */ + private int nestLevel = 0; + + /** denotes if the user-EOF-code has already been executed */ + private boolean zzEOFDone; + + /* user code: */ + public _ModulaPragmaFlexScanner() { + this((java.io.Reader)null); + } + + + public _ModulaPragmaFlexScanner(java.io.Reader in) { + zzReader = in; + } + + /** + * Creates a new scanner. + * There is also java.io.Reader version of this constructor. + * + * @param in the java.io.Inputstream to read input from. + */ + public _ModulaPragmaFlexScanner(java.io.InputStream in) { + this(new java.io.InputStreamReader(in)); + } + + /** + * Unpacks the compressed character translation table. + * + * @param packed the packed character translation table + * @return the unpacked character translation table + */ + private static char [] zzUnpackCMap(String packed) { + char [] map = new char[0x10000]; + int i = 0; /* index in packed string */ + int j = 0; /* index in unpacked array */ + while (i < 1244) { + int count = packed.charAt(i++); + char value = packed.charAt(i++); + do map[j++] = value; while (--count > 0); + } + return map; + } + + private final void setTokenOffset(int offset){ + zzStartRead = offset; + } + + public final int getTokenOffset(){ + return zzStartRead; + } + + public final int getTokenEnd(){ + return getTokenOffset() + yylength(); + } + + public void reset(CharSequence buffer, int start, int end,int initialState){ + nestLevel = 0; + zzBuffer = buffer; + zzCurrentPos = zzMarkedPos = zzStartRead = start; + zzPushbackPos = 0; + zzAtEOF = false; + zzAtBOL = true; + zzEndRead = end; + yychar = 0; + yybegin(initialState); + } + + /** + * Refills the input buffer. + * + * @return false, iff there was new input. + * + * @exception java.io.IOException if any I/O-Error occurs + */ + private boolean zzRefill() throws java.io.IOException { + return true; + } + + + /** + * Returns the current lexical state. + */ + public final int yystate() { + return zzLexicalState; + } + + + /** + * Enters a new lexical state + * + * @param newState the new lexical state + */ + public final void yybegin(int newState) { + zzLexicalState = newState; + } + + + /** + * Returns the text matched by the current regular expression. + */ + public final CharSequence yytext() { + return zzBuffer.subSequence(zzStartRead, zzMarkedPos); + } + + + /** + * Returns the character at position pos from the + * matched text. + * + * It is equivalent to yytext().charAt(pos), but faster + * + * @param pos the position of the character to fetch. + * A value from 0 to yylength()-1. + * + * @return the character at position pos + */ + public final char yycharat(int pos) { + return zzBuffer.charAt(zzStartRead+pos); + } + + + /** + * Returns the length of the matched text region. + */ + public final int yylength() { + return zzMarkedPos-zzStartRead; + } + + + /** + * Reports an error that occured while scanning. + * + * In a wellformed scanner (no or only correct usage of + * yypushback(int) and a match-all fallback rule) this method + * will only be called with things that "Can't Possibly Happen". + * If this method is called, something is seriously wrong + * (e.g. a JFlex bug producing a faulty scanner etc.). + * + * Usual syntax/scanner level error handling should be done + * in error fallback rules. + * + * @param errorCode the code of the errormessage to display + */ + private void zzScanError(int errorCode) { + String message; + try { + message = ZZ_ERROR_MSG[errorCode]; + } + catch (ArrayIndexOutOfBoundsException e) { + message = ZZ_ERROR_MSG[ZZ_UNKNOWN_ERROR]; + } + + throw new Error(message); + } + + + /** + * Pushes the specified amount of characters back into the input stream. + * + * They will be read again by then next call of the scanning method + * + * @param number the number of characters to be read again. + * This number must not be greater than yylength()! + */ + public void yypushback(int number) { + if ( number > yylength() ) + zzScanError(ZZ_PUSHBACK_2BIG); + + zzMarkedPos -= number; + } + + + /** + * Contains user EOF-code, which will be executed exactly once, + * when the end of file is reached + */ + private void zzDoEOF() { + if (!zzEOFDone) { + zzEOFDone = true; + return; + + } + } + + + /** + * Resumes scanning until the next regular expression is matched, + * the end of input is encountered or an I/O-Error occurs. + * + * @return the next token + * @exception java.io.IOException if any I/O-Error occurs + */ + public TokenDescriptor nextToken() throws java.io.IOException { + int zzInput; + int zzAction; + + // cached fields: + int zzCurrentPosL; + int zzMarkedPosL; + int zzEndReadL = zzEndRead; + CharSequence zzBufferL = zzBuffer; + char [] zzCMapL = ZZ_CMAP; + + int [] zzTransL = ZZ_TRANS; + int [] zzRowMapL = ZZ_ROWMAP; + int [] zzAttrL = ZZ_ATTRIBUTE; + + while (true) { + zzMarkedPosL = zzMarkedPos; + + zzAction = -1; + + zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; + + zzState = ZZ_LEXSTATE[zzLexicalState]; + + + zzForAction: { + while (true) { + + if (zzCurrentPosL < zzEndReadL) + zzInput = zzBufferL.charAt(zzCurrentPosL++); + else if (zzAtEOF) { + zzInput = YYEOF; + break zzForAction; + } + else { + // store back cached positions + zzCurrentPos = zzCurrentPosL; + zzMarkedPos = zzMarkedPosL; + boolean eof = zzRefill(); + // get translated positions and possibly new buffer + zzCurrentPosL = zzCurrentPos; + zzMarkedPosL = zzMarkedPos; + zzBufferL = zzBuffer; + zzEndReadL = zzEndRead; + if (eof) { + zzInput = YYEOF; + break zzForAction; + } + else { + zzInput = zzBufferL.charAt(zzCurrentPosL++); + } + } + int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; + if (zzNext == -1) break zzForAction; + zzState = zzNext; + + int zzAttributes = zzAttrL[zzState]; + if ( (zzAttributes & 1) == 1 ) { + zzAction = zzState; + zzMarkedPosL = zzCurrentPosL; + if ( (zzAttributes & 8) == 8 ) break zzForAction; + } + + } + } + + // store back cached position + zzMarkedPos = zzMarkedPosL; + + switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { + case 2: + { return SpecialTokenDescriptors.WHITESPACE; + } + case 4: break; + case 1: + { return ModulaTokens.Pragma.getToken(); + } + case 5: break; + case 3: + { return ModulaTokens.PragmaKeyword.getToken(); + } + case 6: break; + default: + if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { + zzAtEOF = true; + zzDoEOF(); + { + return SpecialTokenDescriptors.EOF; + } + } + else { + zzScanError(ZZ_NO_MATCH); + } + } + } + } + + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/build.bat b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/build.bat new file mode 100644 index 0000000..6573c4e --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/build.bat @@ -0,0 +1,10 @@ +@echo off +set JAVA_HOME=%~dp0..\..\..\..\..\..\..\..\..\..\com.excelsior.xds.jre.feature\rootfiles.win32\jre +set PATH=%JAVA_HOME%\bin;%PATH% + +set JFLEX_HOME=%~dp0..\..\..\..\..\..\..\..\..\..\..\tools\jflex +set CLASSPATH=%CLASSPATH%;%JFLEX_HOME%\lib\JFlex.jar + +set JFLEX_SKELETON=..\..\..\..\..\..\..\..\..\..\com.excelsior.xds.ui.editor.commons\src\com\excelsior\xds\ui\editor\commons\scanner\jflex\eclipse-flex.skeleton + +call java JFlex.Main --charat --skel "%JFLEX_SKELETON%" %* \ No newline at end of file diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2-pragmas.flex b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2-pragmas.flex new file mode 100644 index 0000000..90834ad --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2-pragmas.flex @@ -0,0 +1,83 @@ +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.editor.modula.ModulaTokens; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.IFlexScanner; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.SpecialTokenDescriptors; + +%% + +//----------------------------------------------------------------------------- +// Character sets +//----------------------------------------------------------------------------- +%unicode + +//----------------------------------------------------------------------------- +// Class options +//----------------------------------------------------------------------------- + +%public +%class _ModulaPragmaFlexScanner +%implements IFlexScanner + +%function nextToken +%type TokenDescriptor + +//%debug + + +//----------------------------------------------------------------------------- +// User Class Code +//----------------------------------------------------------------------------- + +%eof{ + return; +%eof} + +%{ + public _ModulaPragmaFlexScanner() { + this((java.io.Reader)null); + } +%} + + +//----------------------------------------------------------------------------- +// Macro definitions +//----------------------------------------------------------------------------- + +// NewLines and spaces +WhiteSpace = [ \t\f\r\n] + +IdentifierPart = "_" | [:letter:] | [:digit:] +Identifier = (["_"] | [:letter:])+ {IdentifierPart}* + +Keywords = "ELSE" | "ELSIF" | "END" | "IF" | "THEN" | + "DEFINED" | "NEW" | "POP" | "PUSH" | + "AND" | ""NOT | "OR" | "~" + +//----------------------------------------------------------------------------- +// State declarations +//----------------------------------------------------------------------------- + + +%% +//----------------------------------------------------------------------------- +// Lexical rules +//----------------------------------------------------------------------------- + + +// Keywords + { + {Keywords} { return ModulaTokens.PragmaKeyword.getToken(); } +} + +// Identifier + { + {Identifier} { return ModulaTokens.Pragma.getToken(); } +} + +// White spaces, end of file and un matched symbols +{WhiteSpace}+ { return SpecialTokenDescriptors.WHITESPACE; } +<> { return SpecialTokenDescriptors.EOF; } +[^] { return ModulaTokens.Pragma.getToken(); } + diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2.flex b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2.flex new file mode 100644 index 0000000..12a6eb5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/jflex/modula2.flex @@ -0,0 +1,163 @@ +package com.excelsior.xds.ui.editor.modula.scanner.jflex; + +import com.excelsior.xds.ui.editor.modula.ModulaTokens; +import com.excelsior.xds.ui.editor.commons.scanner.jflex.IFlexScanner; +import com.excelsior.xds.ui.commons.syntaxcolor.TokenDescriptor; +import com.excelsior.xds.ui.commons.syntaxcolor.SpecialTokenDescriptors; + +%% + +//----------------------------------------------------------------------------- +// Character sets +//----------------------------------------------------------------------------- +%unicode + +//----------------------------------------------------------------------------- +// Class options +//----------------------------------------------------------------------------- + +%public +%class _ModulaFlexScanner +%implements IFlexScanner + +%function nextToken +%type TokenDescriptor + +//%debug + + +//----------------------------------------------------------------------------- +// User Class Code +//----------------------------------------------------------------------------- + +%eof{ + return; +%eof} + +%{ + public _ModulaFlexScanner() { + this((java.io.Reader)null); + } +%} + + +//----------------------------------------------------------------------------- +// Macro definitions +//----------------------------------------------------------------------------- + +// NewLines and spaces +WhiteSpace = [ \t\f\r\n] + +IdentifierPart = "_" | [:letter:] | [:digit:] +Identifier = (["_"] | [:letter:])+ {IdentifierPart}* + +// Digits +OctalDigit = [0-7] +Digit = {OctalDigit} | [89] +HexDigit = {Digit} | [A-Fa-f] +Integer = {Digit}+ | {OctalDigit}+ "C" | {Digit} {HexDigit}* ("H"|"h") + +ScaleFactor = "E" ["+""-"]? {Digit}+ +Real = {Digit}+ "." {Digit}* {ScaleFactor}? + +DigitRangeHack = {Digit}+ ".." + +Brackets = "(" | ")" | "[" | "]" | "{" | "}" + +Keywords = "ASM" | + "AND" | "ARRAY" | "BEGIN" | "BY" | + "CASE" | "CONST" | "DEFINITION" | "DIV" | + "DO" | "ELSE" | "ELSIF" | "END" | + "EXIT" | "EXCEPT" | "EXPORT" | "FINALLY" | + "FOR" | "FORWARD" | "FROM" | "IF" | + "IMPLEMENTATION" | "IMPORT" | "IN" | "LOOP" | + "MOD" | "MODULE" | "NOT" | "OF" | + "OR" | "PACKEDSET" | "POINTER" | "PROCEDURE" | + "QUALIFIED" | "RECORD" | "REM" | "RETRY" | + "REPEAT" | "RETURN" | "SEQ" | "SET" | + "THEN" | "TO" | "TYPE" | "UNTIL" | + "VAR" | "WHILE" | "WITH" | + "~" | "&" + +PervasiveIdentifiers = + "ABS" | "ASSERT" | "BITSET" | "BOOLEAN" | + "CARDINAL" | "CAP" | "CHR" | "CHAR" | + "COMPLEX" | "CMPLX" | "DEC" | "DISPOSE" | + "EXCL" | "FALSE" | "FLOAT" | "HALT" | + "HIGH" | "IM" | "INC" | "INCL" | + "INT" | "INTERRUPTIBLE" | "INTEGER" | "LENGTH" | + "LFLOAT" | "LONGCOMPLEX" | "LONGINT" | "LONGREAL" | + "MAX" | "MIN" | "NEW" | "NIL" | + "ODD" | "ORD" | "PROC" | "PROTECTION" | + "RE" | "REAL" | "SHORTCARD" | "SHORTINT" | + "SIZE" | "TRUE" | "TRUNC" | "UNINTERRUPTIBLE" | + "VAL" + +PervasiveConstant = "FALSE" | "NIL" | "TRUE" + +SystemMod = + "SYSTEM" | "BITSPERLOC" | "LOCSPERWORD" | "LOCSPERBYTE" | + "LOC" | "ADDRESS" | "WORD" | "BYTE" | + "INT" | "CARD" | "int" | "unsigned" | + "INT8" | "INT16" | "INT32" | "INT64" | + "SET8" | "SET16" | "SET32" | "SET64" | + "CARD8" | "CARD16" | "CARD32" | "CARD64" | + "BOOL8" | "BOOL16" | "BOOL32" | "INDEX" | + "void" | "size_t" | "TSIZE" | "CC" | + "ADDADR" | "SUBADR" | "DIFADR" | "MAKEADR" | + "ADR" | "REF" | "ROTATE" | "SHIFT" | + "CAST" | "DIFADR_TYPE" | "MOVE" | "FILL" | + "GET" | "PUT" + + + +//----------------------------------------------------------------------------- +// State declarations +//----------------------------------------------------------------------------- + + +%% +//----------------------------------------------------------------------------- +// Lexical rules +//----------------------------------------------------------------------------- + + +// Keywords + { + {Keywords} { return ModulaTokens.Keyword.getToken(); } + {PervasiveConstant} { return ModulaTokens.BuiltinConstant.getToken(); } + {PervasiveIdentifiers} { return ModulaTokens.Keyword.getToken(); } +} + +// Keywords from System.mod + { + {SystemMod} { return ModulaTokens.SystemModuleKeyword.getToken(); } +} + +// Digits + { + {DigitRangeHack} { yypushback(2); + return ModulaTokens.Number.getToken(); + } + {Integer} { return ModulaTokens.Number.getToken(); } + {Real} { return ModulaTokens.Number.getToken(); } +} + +// Identifier + { + {Identifier} { return ModulaTokens.Default.getToken(); } +} + + +// Brackets +{Brackets} { return ModulaTokens.Bracket.getToken(); } + + +// White spaces, end of file and un matched symbols +{WhiteSpace}+ { return SpecialTokenDescriptors.WHITESPACE; } +<> { return SpecialTokenDescriptors.EOF; } + +// Un matched symbols +".." { return ModulaTokens.Default.getToken(); } +[^] { return ModulaTokens.Default.getToken(); } + diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/HexNumberRule.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/HexNumberRule.java new file mode 100644 index 0000000..b575108 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/HexNumberRule.java @@ -0,0 +1,68 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import java.util.TreeSet; + +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.IWordDetector; + +import com.excelsior.xds.ui.editor.commons.scanner.rules.MultiSuffixedWordRule; + +/** +* A rule for detecting Modula-2 hexadecimal numbers. +*/ +public class HexNumberRule extends MultiSuffixedWordRule { + + /** + * Word detector for hex number words. + */ + private static class HexNumberDetector implements IWordDetector { + + private final TreeSet hexChars; + + public HexNumberDetector() { + hexChars = new TreeSet(); + + hexChars.add('0'); + hexChars.add('1'); + hexChars.add('2'); + hexChars.add('3'); + hexChars.add('4'); + hexChars.add('5'); + hexChars.add('6'); + hexChars.add('7'); + hexChars.add('8'); + hexChars.add('9'); + hexChars.add('a'); + hexChars.add('b'); + hexChars.add('c'); + hexChars.add('d'); + hexChars.add('e'); + hexChars.add('f'); + hexChars.add('A'); + hexChars.add('B'); + hexChars.add('C'); + hexChars.add('D'); + hexChars.add('E'); + hexChars.add('F'); + } + + public boolean isWordPart(char c) { + return hexChars.contains(c); + } + + public boolean isWordStart(char c) { + return Character.isDigit(c); + } + + } + + /** + * Default constructor with the token this detector should return in + * the case of success parsing. + * @param token the token for detector. + */ + public HexNumberRule(IToken token) { + super(new HexNumberDetector(), token, 'H', 'h'); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/InactiveCodeRule.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/InactiveCodeRule.java new file mode 100644 index 0000000..2c1dc04 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/InactiveCodeRule.java @@ -0,0 +1,89 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import java.util.Collections; +import java.util.List; + +import org.apache.commons.collections.CollectionUtils; +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IPredicateRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.ITokenScanner; +import org.eclipse.jface.text.rules.Token; + +import com.excelsior.xds.core.text.ITextRegion; +import com.excelsior.xds.core.utils.collections.CollectionsUtils; +import com.excelsior.xds.core.utils.collections.ISearchDirector; +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.editor.modula.ModulaPartitionTokens; + +public class InactiveCodeRule implements IPredicateRule { + private List inactiveCodeRegions = Collections.emptyList(); + + private ModulaAst modulaAst; + + private boolean isShowInactiveCode; + + public InactiveCodeRule() { + } + + private void getInactiveCodeRegions() { + if (modulaAst != null) { + inactiveCodeRegions = modulaAst.getInactiveCodeRegions(); + } + } + + public void setModulaAst(ModulaAst modulaAst) { + this.modulaAst = modulaAst; + getInactiveCodeRegions(); + } + + @Override + public IToken evaluate(ICharacterScanner scanner) { + return evaluate(scanner, false); + } + + private ITextRegion findInactiveCodeRegion(final int offset) { + return CollectionsUtils.binarySearch(inactiveCodeRegions, new ISearchDirector(){ + @Override + public int direct(ITextRegion reg) { + if (offset < reg.getOffset()) { + return -1; + } + else if (offset > reg.getOffset() + reg.getLength() - 1) { + return 1; + } + else { // offset between [key.getOffset(), + // key.getOffset() + key.getLength() - 1] - + // i.e. inside region covered by key + return 0; + } + } + }); + } + + @Override + public IToken getSuccessToken() { + return ModulaPartitionTokens.DISABLED_CODE; + } + + @Override + public IToken evaluate(ICharacterScanner scanner, boolean resume) { + if (scanner instanceof ITokenScanner) { + if (isShowInactiveCode && !CollectionUtils.isEmpty(inactiveCodeRegions)) { + ITokenScanner tokenScanner = (ITokenScanner) scanner; + ITextRegion reg = findInactiveCodeRegion(tokenScanner.getTokenOffset()); + if (reg != null) { + for (int i = tokenScanner.getTokenOffset(); i < reg.getOffset() + reg.getLength(); i++) { + scanner.read(); + } + return ModulaPartitionTokens.DISABLED_CODE; + } + } + } + return Token.UNDEFINED; + } + + public void setShowInactiveCode(boolean isShowInactiveCode) { + this.isShowInactiveCode = isShowInactiveCode; + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaCommentRule.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaCommentRule.java new file mode 100644 index 0000000..ac953f1 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaCommentRule.java @@ -0,0 +1,105 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IPredicateRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +/** +* A rule for detecting nested and multiline comment of Modula-2 language. +*/ +public class ModulaCommentRule implements IPredicateRule { + + /** The token to be returned on success */ + protected final IToken successToken; + + public ModulaCommentRule (IToken token) { + successToken = token; + } + + /* + * @see IPredicateRule#getSuccessToken() + */ + public IToken getSuccessToken() { + return successToken; + } + + /* + * @see IRule#evaluate(ICharacterScanner) + */ + @Override + public IToken evaluate(ICharacterScanner scanner) { + return evaluate(scanner, false); + } + + + /* + * @see IPredicateRule#evaluate(ICharacterScanner, boolean) + */ + @Override + public IToken evaluate(ICharacterScanner scanner, boolean resume) { + return doEvaluate(scanner, resume); + } + + + /** + * Evaluates Modula-2 comment rules. Resumes detection, i.e. look sonly for + * the end comment required by this rule if the resume flag is set. + * + * @param scanner the character scanner to be used + * @param resume true if detection should be resumed, false otherwise + * @return the token resulting from this evaluation + */ + protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) { + if (! resume) { + int c = scanner.read(); + if (c != '(') { + scanner.unread(); + return Token.UNDEFINED; + } + c = scanner.read(); + if (c != '*') { + scanner.unread(); + scanner.unread(); + return Token.UNDEFINED; + } + } + endCommentDetected(scanner); + return successToken; + } + + + /** + * Returns when the end comment was detected or if the EOF character is read. + * + * @param scanner the character scanner to be used + * @return true if the end sequence has been detected + */ + protected void endCommentDetected(ICharacterScanner scanner) { + int nestLevel = 1; + int c = scanner.read(); + while (c != ICharacterScanner.EOF) { + if (c == '*') { + // Check if the comment end sequence has been found. + c = scanner.read(); + if (c == ')') { + nestLevel--; + if (nestLevel == 0) { + return; + } + c = scanner.read(); + } + } else if (c == '(') { + // Check if the comment start sequence has been found. + c = scanner.read(); + if (c == '*') { + nestLevel++; + c = scanner.read(); + } + } else { + c = scanner.read(); + } + } + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaRuleBasedPartitionScanner.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaRuleBasedPartitionScanner.java new file mode 100644 index 0000000..720faf9 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/ModulaRuleBasedPartitionScanner.java @@ -0,0 +1,67 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import org.eclipse.jface.text.IDocument; +import org.eclipse.jface.text.rules.EndOfLineRule; +import org.eclipse.jface.text.rules.IPredicateRule; +import org.eclipse.jface.text.rules.MultiLineRule; +import org.eclipse.jface.text.rules.RuleBasedPartitionScanner; +import org.eclipse.jface.text.rules.SingleLineRule; + +import com.excelsior.xds.parser.modula.ast.ModulaAst; +import com.excelsior.xds.ui.editor.modula.IModulaPartitions; +import com.excelsior.xds.ui.editor.modula.ModulaPartitionTokens; + +/** + * This scanner checks for comment and string partitions. Everything else + * is considered part of the default partition. + */ +public class ModulaRuleBasedPartitionScanner extends RuleBasedPartitionScanner + implements ModulaPartitionTokens +{ + private InactiveCodeRule inactiveCodeRule; + + public ModulaRuleBasedPartitionScanner() { + super(); + + // Create the list of rules that produce tokens + inactiveCodeRule = new InactiveCodeRule(); + IPredicateRule[] rules = new IPredicateRule[] { + inactiveCodeRule, + new EndOfLineRule("--", END_OF_LINE_COMMENT_TOKEN), //$NON-NLS-1$ + new ModulaCommentRule(BLOCK_COMMENT_TOKEN), + + new SingleLineRule("\"", "\"", DOUBLE_QUOTE_STRING_TOKEN), //$NON-NLS-1$ //$NON-NLS-2$ + new SingleLineRule("'", "'", SINGLE_QUOTE_STRING_TOKEN), //$NON-NLS-1$ //$NON-NLS-2$ + + new MultiLineRule("<*", "*>", PRAGMA_TOKEN, (char)0, true) //$NON-NLS-1$ //$NON-NLS-2$ + }; + + setPredicateRules(rules); + setDefaultReturnToken(DEFAULT_TOKEN); + } + + /* + * Region with multi-line comments should be always parsed from its beginning. + * @see RuleBasedPartitionScanner#setPartialRange(IDocument, int, int, String, int) + */ + public void setPartialRange( IDocument document, int offset, int length + , String contentType, int partitionOffset ) + { + if (IModulaPartitions.M2_CONTENT_TYPE_BLOCK_COMMENT.equals(contentType)) { + if (offset > partitionOffset) { + length += offset - partitionOffset; + offset = partitionOffset; + partitionOffset = -1; + } + } + super.setPartialRange(document, offset, length, contentType, partitionOffset); + } + + public void setModulaAst(ModulaAst modulaAst) { + inactiveCodeRule.setModulaAst(modulaAst); + } + + public void setShowInactiveCode(boolean isShowInactiveCode) { + inactiveCodeRule.setShowInactiveCode(isShowInactiveCode); + } +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/OctNumberRule.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/OctNumberRule.java new file mode 100644 index 0000000..a7a75b2 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/OctNumberRule.java @@ -0,0 +1,53 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import java.util.TreeSet; + +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.IWordDetector; + +import com.excelsior.xds.ui.editor.commons.scanner.rules.SuffixedWordRule; + +/** +* A rule for detecting Modula-2 octal numbers. +*/ +public class OctNumberRule extends SuffixedWordRule { + + /** + * Word detector for octal number words. + */ + private static class OctNumberDetector implements IWordDetector { + + private final TreeSet hexChars; + + public OctNumberDetector() { + hexChars = new TreeSet(); + + hexChars.add('0'); + hexChars.add('1'); + hexChars.add('2'); + hexChars.add('3'); + hexChars.add('4'); + hexChars.add('5'); + hexChars.add('6'); + hexChars.add('7'); + } + + public boolean isWordPart(char c) { + return hexChars.contains(c); + } + + public boolean isWordStart(char c) { + return hexChars.contains(c); + } + } + + /** + * Default constructor with the token this detector should return in + * the case of success parsing. + * @param token the token for detector. + */ + public OctNumberRule(IToken token) { + super(new OctNumberDetector(), 'C', token); + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/RealNumberRule.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/RealNumberRule.java new file mode 100644 index 0000000..3460bf5 --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/scanner/rules/RealNumberRule.java @@ -0,0 +1,69 @@ +package com.excelsior.xds.ui.editor.modula.scanner.rules; + +import org.eclipse.jface.text.rules.ICharacterScanner; +import org.eclipse.jface.text.rules.IRule; +import org.eclipse.jface.text.rules.IToken; +import org.eclipse.jface.text.rules.Token; + +/** + * A rule for detecting Modula-2 real numbers. + * + * ScaleFactor = "E" ["+""-"]? {Digit}+ + * Real = {Digit}+ "." {Digit}* {ScaleFactor}? + */ +public class RealNumberRule implements IRule { + + /** The token to be returned on success */ + protected final IToken successToken; + + /** Number of characters we had read. */ + private int readLength; + + /** + * Default constructor with the token this detector should return in + * the case of success parsing. + * @param successToken the token for detector. + */ + public RealNumberRule (IToken successToken) { + this.successToken = successToken; + } + + /* + * @see IRule#evaluate(ICharacterScanner) + */ + public IToken evaluate(ICharacterScanner scanner) { + int c = scanner.read(); + if ((c != ICharacterScanner.EOF) && Character.isDigit((char)c)) { + readLength = 1; + + do { + c = scanner.read(); + readLength++; + } while ((c != ICharacterScanner.EOF) && Character.isDigit((char)c)); + if (c == '.') { + do { + c = scanner.read(); + } while ((c != ICharacterScanner.EOF) && Character.isDigit((char)c)); + if (c == 'E') { + c = scanner.read(); + if ((c == '+') || (c == '-')) { + c = scanner.read(); + } + while ((c != ICharacterScanner.EOF) && Character.isDigit((char)c)) { + c = scanner.read(); + } + } + scanner.unread(); + return successToken; + } + + while (readLength > 1) { + readLength--; + scanner.unread(); + } + } + scanner.unread(); + return Token.UNDEFINED; + } + +} diff --git a/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/template/SourceCodeTemplateCompletionProcessor.java b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/template/SourceCodeTemplateCompletionProcessor.java new file mode 100644 index 0000000..82c76af --- /dev/null +++ b/product/com.excelsior.xds.ui.editor/src/com/excelsior/xds/ui/editor/modula/template/SourceCodeTemplateCompletionProcessor.java @@ -0,0 +1,65 @@ +package com.excelsior.xds.ui.editor.modula.template; + +import java.util.ArrayList; +import java.util.List; + +import org.eclipse.jface.text.ITextViewer; +import org.eclipse.jface.text.contentassist.ContentAssistant; +import org.eclipse.jface.text.contentassist.ICompletionProposal; +import org.eclipse.jface.text.templates.Template; + +import com.excelsior.xds.ui.editor.XdsEditorsPlugin; +import com.excelsior.xds.ui.editor.commons.template.BaseTemplateCompletionProcessor; + +/** + * Completion processor for source code templates. + */ +public abstract class SourceCodeTemplateCompletionProcessor extends BaseTemplateCompletionProcessor +{ + /** + * Create the instance of completion processor that computes template proposals + * for given template context type. + * @param contentAssistant + * + * @param contextTypeId the id of the template context type + */ + public SourceCodeTemplateCompletionProcessor(ContentAssistant contentAssistant) { + super(contentAssistant); + } + + /* (non-Javadoc) + * @see org.eclipse.jface.text.templates.TemplateCompletionProcessor#getTemplates(java.lang.String) + */ + @Override + protected Template[] getTemplates(String contextTypeId) { + List