This was required by the Eclipse team as one precondition for the next release. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>tags/V1_9_7
@@ -1,199 +1,279 @@ | |||
Per: https://www.eclipse.org/legal/epl-v10.html | |||
Per: https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
Eclipse Public License - v 1.0 | |||
Eclipse Public License - v 2.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. | |||
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. | |||
a) in the case of the initial Contributor, the initial content | |||
Distributed under this Agreement, and | |||
"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. | |||
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 changes or additions to the Program that | |||
are not Modified Works. | |||
"Program" means the Contributions distributed in accordance with this Agreement. | |||
"Contributor" means any person or entity that Distributes the Program. | |||
"Recipient" means anyone who receives the Program under this Agreement, including all Contributors. | |||
"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 | |||
or any Secondary License (as applicable), including Contributors. | |||
"Derivative Works" shall mean any work, whether in Source Code or other | |||
form, that is based on (or derived from) the Program and for which the | |||
editorial revisions, annotations, elaborations, or other modifications | |||
represent, as a whole, an original work of authorship. | |||
"Modified Works" shall mean any work in Source Code or other form that | |||
results from an addition to, deletion from, or modification of the | |||
contents of the Program, including, for purposes of clarity any new file | |||
in Source Code form that contains any contents of the Program. Modified | |||
Works shall not include works that contain only declarations, | |||
interfaces, types, classes, structures, or files of the Program solely | |||
in each case in order to link to, bind by name, or subclass the Program | |||
or Modified Works thereof. | |||
"Distribute" means the acts of a) distributing or b) making available | |||
in any manner that enables the transfer of a copy. | |||
"Source Code" means the form of a Program preferred for making | |||
modifications, including but not limited to software source code, | |||
documentation source, and configuration files. | |||
"Secondary License" means either the GNU General Public License, | |||
Version 2.0, or any later versions of that license, including any | |||
exceptions or additional permissions as identified by the initial | |||
Contributor. | |||
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. | |||
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. | |||
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 or other 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. | |||
e) Notwithstanding the terms of any Secondary License, no | |||
Contributor makes additional grants to any Recipient (other than | |||
those set forth in this Agreement) as a result of such Recipient's | |||
receipt of the Program under the terms of a Secondary License | |||
(if permitted under the terms of Section 3). | |||
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. | |||
3.1 If a Contributor Distributes the Program in any form, then: | |||
a) the Program must also be made available as Source Code, in | |||
accordance with section 3.2, and the Contributor must accompany | |||
the Program with a statement that the Source Code for the Program | |||
is available under this Agreement, and informs Recipients how to | |||
obtain it in a reasonable manner on or through a medium customarily | |||
used for software exchange; and | |||
b) the Contributor may Distribute the Program under a license | |||
different than this Agreement, provided that such license: | |||
i) effectively disclaims on behalf of all other 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 other Contributors all | |||
liability for damages, including direct, indirect, special, | |||
incidental and consequential damages, such as lost profits; | |||
iii) does not attempt to limit or alter the recipients' rights | |||
in the Source Code under section 3.2; and | |||
iv) requires any subsequent distribution of the Program by any | |||
party to be under a license that satisfies the requirements | |||
of this section 3. | |||
3.2 When the Program is Distributed as Source Code: | |||
a) it must be made available under this Agreement, or if the | |||
Program (i) is combined with other material in a separate file or | |||
files made available under a Secondary License, and (ii) the initial | |||
Contributor attached to the Source Code the notice described in | |||
Exhibit A of this Agreement, then the Program may be made available | |||
under the terms of such Secondary Licenses, and | |||
b) a copy of this Agreement must be included with each copy of | |||
the Program. | |||
3.3 Contributors may not remove or alter any copyright, patent, | |||
trademark, attribution notices, disclaimers of warranty, or limitations | |||
of liability ("notices") contained within the Program from any copy of | |||
the Program which they Distribute, provided that Contributors may add | |||
their own appropriate notices. | |||
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 | |||
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. | |||
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. | |||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT | |||
PERMITTED BY APPLICABLE LAW, 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 | |||
EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT | |||
PERMITTED BY APPLICABLE LAW, 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. | |||
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. Nothing in this Agreement is intended | |||
to be enforceable by any entity that is not a Contributor or Recipient. | |||
No third-party beneficiary rights are created under this Agreement. | |||
Exhibit A - Form of Secondary Licenses Notice | |||
"This Source Code may also be made available under the following | |||
Secondary Licenses when the conditions for such availability set forth | |||
in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), | |||
version(s), and exceptions or additional permissions here}." | |||
Simply including a copy of this Agreement, including this Exhibit A | |||
is not sufficient to license the Source Code under Secondary Licenses. | |||
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. |
@@ -1,13 +1,13 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -49,7 +49,7 @@ import org.aspectj.util.FileUtil; | |||
/** | |||
* IDE manager for standalone AJDE application. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class BrowserManager { | |||
@@ -107,7 +107,7 @@ public class BrowserManager { | |||
/** | |||
* Find and create the set of build configuration files | |||
* | |||
* | |||
* @param configFilesArgs | |||
*/ | |||
private void setUpConfigFiles(String[] configFilesArgs) { |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.tools.ajbrowser; | |||
@@ -23,7 +23,7 @@ public class Main { | |||
/** | |||
* Run ajbrowser if args contains only .lst files and ajc otherwise. | |||
* | |||
* | |||
* @param args the String[] of args to interpret | |||
*/ | |||
public static void main(String[] args) { | |||
@@ -34,7 +34,7 @@ public class Main { | |||
/** | |||
* Invoke the compiler if there are arguments and some are not .lst files. | |||
* | |||
* | |||
* @return false if compiler was not invoked and the browser main should be | |||
*/ | |||
static boolean compilerMain(String[] args) { |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.core; | |||
@@ -27,13 +27,13 @@ import org.aspectj.tools.ajbrowser.ui.swing.TopFrame; | |||
public class BrowserBuildProgressMonitor extends Thread implements IBuildProgressMonitor { | |||
public static final String PROGRESS_HEADING = "AspectJ Build"; | |||
private BuildProgressPanel progressDialog = null; | |||
private JDialog dialog = null; | |||
private TopFrame topFrame; | |||
private BrowserMessageHandler handler; | |||
public BrowserBuildProgressMonitor(BrowserMessageHandler handler) { | |||
this.handler = handler; | |||
topFrame = (TopFrame) BrowserManager.getDefault().getRootFrame(); | |||
@@ -42,16 +42,16 @@ public class BrowserBuildProgressMonitor extends Thread implements IBuildProgres | |||
dialog.setContentPane(progressDialog); | |||
dialog.setSize(550, 120); | |||
try { | |||
dialog.setLocationRelativeTo(topFrame); | |||
dialog.setLocationRelativeTo(topFrame); | |||
} catch (NoSuchMethodError nsme) { | |||
// running on 1.3 | |||
} | |||
} | |||
public void finish(boolean wasFullBuild) { | |||
Ajde.getDefault().getIdeUIAdapter().displayStatusInformation("build finished..."); | |||
progressDialog.finish(); | |||
dialog.dispose(); | |||
dialog.dispose(); | |||
if (handler.getMessages().isEmpty()) { | |||
topFrame.hideMessagesPanel(handler); | |||
} else { |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.core; |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.core; | |||
@@ -47,7 +47,7 @@ public class BrowserErrorHandler { | |||
if (t != null) { | |||
t.printStackTrace(new PrintWriter(stringWriter)); | |||
return stringWriter.getBuffer().toString(); | |||
} | |||
} | |||
return "<no stack trace available>"; | |||
} | |||
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.core; |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.core; | |||
@@ -20,5 +20,5 @@ public class PreferenceStoreConstants { | |||
public static final String BUILD_OUTPUTPATH = "build.outputpath"; | |||
public static final String JAVA_CLASSPATH = "java.class.path"; | |||
public static final String NONSTANDARD_OPTIONS = "ajc.nonStandardOptions"; | |||
} |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -80,7 +80,7 @@ public class BasicEditor implements EditorAdapter { | |||
Ajde.getDefault().getIdeUIAdapter().displayStatusInformation(" no corresponding source line to seek to"); | |||
} | |||
} | |||
public void showSourceLine(int lineNumber, boolean highlight) { | |||
showSourceLine(filePath, lineNumber, highlight); | |||
} | |||
@@ -95,7 +95,7 @@ public class BasicEditor implements EditorAdapter { | |||
public void showSourceLine(String filePath, int lineNumber, boolean highlight) { | |||
//AjdeUIManager.getDefault().getIdeUIAdapter().resetEditor(); | |||
this.filePath = filePath; | |||
// if (oldPath != filePath && !Ajde.INSTANCE.BROWSER_MANAGER.isGlobalMode()) { | |||
// Ajde.INSTANCE.BROWSER_MANAGER.updateView(); | |||
@@ -121,7 +121,7 @@ public class BasicEditor implements EditorAdapter { | |||
public void showSourcelineAnnotation(String filePath, int lineNumber, java.util.List items) { } | |||
public void addEditorViewForSourceLine(String filePath, int lineNumber) { | |||
} | |||
public void saveContents() throws IOException { |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.ui; |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.ui; | |||
@@ -21,11 +21,11 @@ import org.aspectj.tools.ajbrowser.core.PreferenceStoreConstants; | |||
public class BrowserRuntimeProperties implements IRuntimeProperties { | |||
private UserPreferencesAdapter preferencesAdapter; | |||
public BrowserRuntimeProperties(UserPreferencesAdapter preferencesAdapter) { | |||
this.preferencesAdapter = preferencesAdapter; | |||
} | |||
public String getClassToExecute() { | |||
return preferencesAdapter.getProjectPreference(PreferenceStoreConstants.RUNTIME_MAINCLASS); | |||
} |
@@ -1,17 +1,17 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.ui; | |||
import org.aspectj.ajde.IdeUIAdapter; | |||
@@ -22,7 +22,7 @@ import org.aspectj.tools.ajbrowser.BrowserManager; | |||
* information in the status bar at the bottom of the AjBrowser GUI. | |||
*/ | |||
public class BrowserUIAdapter implements IdeUIAdapter { | |||
public void displayStatusInformation(String message) { | |||
BrowserManager.getDefault().setStatusInformation(message); | |||
} |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.ui; | |||
@@ -31,7 +31,7 @@ import org.aspectj.tools.ajbrowser.core.BrowserErrorHandler; | |||
/** | |||
* Responsible for controlling the editor. | |||
* | |||
* | |||
* <p><b>TODO:</b> remove coupling to <CODE>BasicEditor</CODE></p> | |||
* @author Mik Kersten | |||
*/ |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -25,11 +25,11 @@ import org.aspectj.tools.ajbrowser.core.PreferenceStoreConstants; | |||
/** | |||
* Panel the displays both ajc and runtime options | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class BrowserOptionsPanel extends OptionsPanel { | |||
private static final long serialVersionUID = 4491319302490183151L; | |||
private JPanel runOptions_panel = new JPanel(); | |||
private JPanel build_panel = new JPanel(); | |||
@@ -81,8 +81,8 @@ public class BrowserOptionsPanel extends OptionsPanel { | |||
getProjectPreference(PreferenceStoreConstants.RUNTIME_MAINCLASS) | |||
); | |||
} | |||
public void saveOptions() throws IOException { | |||
public void saveOptions() throws IOException { | |||
BrowserManager.getDefault().getPreferencesAdapter().setProjectPreference( | |||
PreferenceStoreConstants.BUILD_OUTPUTPATH, outputPath_field.getText()); | |||
BrowserManager.getDefault().getPreferencesAdapter().setProjectPreference( | |||
@@ -91,7 +91,7 @@ public class BrowserOptionsPanel extends OptionsPanel { | |||
PreferenceStoreConstants.BUILD_CLASSPATH, classpath_field.getText()); | |||
BrowserManager.getDefault().getPreferencesAdapter().setProjectPreference( | |||
PreferenceStoreConstants.RUNTIME_MAINCLASS, classToRun_field.getText()); | |||
} | |||
} | |||
private void jbInit() throws Exception { | |||
border1 = |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.tools.ajbrowser.ui.swing; | |||
@@ -51,7 +51,7 @@ import org.aspectj.tools.ajbrowser.ui.EditorManager; | |||
/** | |||
* UI for standalone operation. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class TopFrame extends JFrame { |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -26,17 +26,17 @@ package org.aspectj.tools.ajbrowser; | |||
// */ | |||
//public class JemmyDriver implements Scenario { | |||
// | |||
// public static final String CUT | |||
// public static final String CUT | |||
// = "org.aspectj.tools.ajbrowser.Main"; | |||
// public static final String DRIVER | |||
// public static final String DRIVER | |||
// = "org.aspectj.tools.ajbrowser.JemmyDriver"; | |||
// | |||
// | |||
// // XXX need to fix literal path locations | |||
// public static final String USERDIR | |||
// public static final String USERDIR | |||
// = "j:/home/wes/dev/tools/aj/examples"; | |||
// public static final String FILENAME_RELATIVE | |||
// public static final String FILENAME_RELATIVE | |||
// = USERDIR + "spacewar/debug.lst"; | |||
// public static final String FILENAME | |||
// public static final String FILENAME | |||
// = USERDIR + "/" + FILENAME_RELATIVE; | |||
// | |||
// public static void main(String[] argv) { | |||
@@ -53,7 +53,7 @@ package org.aspectj.tools.ajbrowser; | |||
// // grab parameter - pass in .lst file | |||
// if (null != param) { | |||
// Class c = param.getClass(); | |||
// if (c.isArray() && | |||
// if (c.isArray() && | |||
// (String.class == c.getComponentType())) { | |||
// args = (String[]) param; | |||
// if (0 < args.length) { |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; | |||
@@ -24,7 +24,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; | |||
* The class to be used by tools to drive a build. An AjCompiler is created with a unique id (for example the absolute pathname of a | |||
* project or .lst file) along with implementations of ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. Tools | |||
* then call build() or buildFresh() on this AjCompiler. | |||
* | |||
* | |||
* <p> | |||
* An AjCompiler is associated with one id, therefore a new one needs to be created for a new id (project, .lst file etc.). It is | |||
* the responsibility of the tools to manage the lifecycle of the AjCompiler's. | |||
@@ -40,7 +40,7 @@ public class AjCompiler { | |||
/** | |||
* Creates a new AjCompiler for the given id, ICompilerConfiguration, IBuildProgressMonitor and IBuildMessageHandler. None of | |||
* the arguments can be null. | |||
* | |||
* | |||
* @param compilerId - Unique String used to identify this AjCompiler | |||
* @param compilerConfig - ICompilerConfiguration implementation | |||
* @param buildProgressMonitor - IBuildProgressMonitor implementation | |||
@@ -138,10 +138,10 @@ public class AjCompiler { | |||
/** | |||
* Set a CustomMungerFactory to the compiler's weaver | |||
* | |||
* | |||
* The type of factory should be org.aspectj.weaver.CustomMungerFactory but due to dependency problem of project ajde.core, it | |||
* is Object for now. | |||
* | |||
* | |||
* @param factory | |||
*/ | |||
public void setCustomMungerFactory(Object factory) { | |||
@@ -150,7 +150,7 @@ public class AjCompiler { | |||
/** | |||
* @return the CustomMungerFactory from the compiler's weaver | |||
* | |||
* | |||
* The return type should be org.aspectj.weaver.CustomMungerFactory but due to dependency problem of project ajde.core, | |||
* it is Object for now. | |||
*/ |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; | |||
@@ -16,13 +16,13 @@ import org.aspectj.bridge.IMessage; | |||
/** | |||
* Interface that handles messages sent from the compiler. | |||
* Implementations define which messages are logged and whether | |||
* the handler aborts the process. | |||
* the handler aborts the process. | |||
*/ | |||
public interface IBuildMessageHandler { | |||
/** | |||
/** | |||
* Handle message by reporting and/or throwing an AbortException. | |||
* | |||
* | |||
* @param message the IMessage to handle - never null | |||
* @return true if this message was handled by this handler | |||
* @throws IllegalArgumentException if message is null | |||
@@ -32,25 +32,25 @@ public interface IBuildMessageHandler { | |||
/** | |||
* Signal whether this will ignore messages of a given type. | |||
* Clients may use this to avoid constructing or sending | |||
* Clients may use this to avoid constructing or sending | |||
* certain messages. | |||
* | |||
* | |||
* @return true if this handler is ignoring all messages of this type | |||
*/ | |||
boolean isIgnoring(IMessage.Kind kind); | |||
/** | |||
* Allow fine grained configuration after initialization. | |||
* | |||
* Allow fine grained configuration after initialization. | |||
* | |||
* @param kind | |||
*/ | |||
void dontIgnore(IMessage.Kind kind); | |||
/** | |||
* Allow fine grained configuration after initialization. | |||
* | |||
* Allow fine grained configuration after initialization. | |||
* | |||
* @param kind | |||
*/ | |||
void ignore(IMessage.Kind kind); | |||
} |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2006 Contributors.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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: | |||
* Copyright (c) 2006 Contributors.All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Adrian Colyer Initial implementation | |||
* Helen Hawkins bug 166580 and 148190 | |||
* ******************************************************************/ | |||
@@ -25,7 +25,7 @@ public interface IOutputLocationManager { | |||
* Return the directory root under which the results of compiling the given source file. For example, if the source file | |||
* contains the type a.b.C, and this method returns "target/classes" the resulting class file will be written to | |||
* "target/classes/a/b/C.class" | |||
* | |||
* | |||
* @param compilationUnit the compilation unit that has been compiled | |||
* @return a File object representing the root directory under which compilation results for this unit should be written | |||
*/ | |||
@@ -34,7 +34,7 @@ public interface IOutputLocationManager { | |||
/** | |||
* For environments where multiple source folders are supported, they need to be included in the model. This method allows | |||
* AspectJ to determine which source folder a source file came from. Example return values would be "src" or "main/java" | |||
* | |||
* | |||
* @param sourceFile the File object for the source file | |||
* @return the source folder where this file came from, or null if in project root or source folders not supported. | |||
*/ | |||
@@ -43,7 +43,7 @@ public interface IOutputLocationManager { | |||
/** | |||
* When copying resources from source folders to output location, return the root directory under which the resource should be | |||
* copied. | |||
* | |||
* | |||
* @param resource the resource to be copied | |||
* @return a File object representing the root directory under which this resource should be copied | |||
*/ | |||
@@ -63,7 +63,7 @@ public interface IOutputLocationManager { | |||
/** | |||
* Callback from the compiler to indicate that a file has been written to disk, the type of the file (if known) is also | |||
* supplied. | |||
* | |||
* | |||
* @param outputfile the file that has been written | |||
* @param fileType the kind of file from the FILETYPE_XXX constants defined in this type | |||
*/ | |||
@@ -77,7 +77,7 @@ public interface IOutputLocationManager { | |||
/** | |||
* Callback from the compiler to indicate that a file has been removed from disk, the type of the file (if known) is also | |||
* supplied. | |||
* | |||
* | |||
* @param file the file that has been written | |||
* @param fileType the kind of file from the FILETYPE_XXX constants defined in this type | |||
*/ |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; | |||
@@ -19,7 +19,7 @@ import org.aspectj.org.eclipse.jdt.internal.compiler.impl.CompilerOptions; | |||
* Class containing the current custom java options | |||
*/ | |||
public final class JavaOptions { | |||
public static final String COMPLIANCE_LEVEL = CompilerOptions.OPTION_Compliance; | |||
public static final String SOURCE_COMPATIBILITY_LEVEL = CompilerOptions.OPTION_Source; | |||
public static final String TARGET_COMPATIBILITY_LEVEL = CompilerOptions.OPTION_TargetPlatform; | |||
@@ -28,46 +28,46 @@ public final class JavaOptions { | |||
public static final String VERSION_14 = CompilerOptions.VERSION_1_4; | |||
public static final String VERSION_15 = CompilerOptions.VERSION_1_5; | |||
public static final String VERSION_16 = CompilerOptions.VERSION_1_6; | |||
// by default will use the platform default encoding | |||
// by default will use the platform default encoding | |||
public static final String CHARACTER_ENCODING = CompilerOptions.OPTION_Encoding; | |||
// indicates if unused/optimizable local variables need to be preserved (debugging purpose) | |||
public static final String PRESERVE_ALL_LOCALS = CompilerOptions.OPTION_PreserveUnusedLocal; | |||
public static final String PRESERVE = CompilerOptions.PRESERVE; | |||
public static final String OPTIMIZE = CompilerOptions.OPTIMIZE_OUT; | |||
// Warning constants | |||
public static final String WARN_METHOD_WITH_CONSTRUCTOR_NAME = CompilerOptions.OPTION_ReportMethodWithConstructorName; | |||
public static final String WARN_OVERRIDING_PACKAGE_DEFAULT_METHOD = CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod; | |||
public static final String WARN_DEPRECATION = CompilerOptions.OPTION_ReportDeprecation; | |||
public static final String WARN_HIDDEN_CATCH_BLOCKS = CompilerOptions.OPTION_ReportHiddenCatchBlock; | |||
public static final String WARN_UNUSED_LOCALS = CompilerOptions.OPTION_ReportUnusedLocal; | |||
public static final String WARN_UNUSED_PARAMETER = CompilerOptions.OPTION_ReportUnusedParameter; | |||
public static final String WARN_UNUSED_IMPORTS = CompilerOptions.OPTION_ReportUnusedImport; | |||
public static final String WARN_SYNTHETIC_ACCESS = CompilerOptions.OPTION_ReportSyntheticAccessEmulation; | |||
public static final String WARN_ASSERT_IDENITIFIER = CompilerOptions.OPTION_ReportAssertIdentifier; | |||
public static final String WARN_OVERRIDING_PACKAGE_DEFAULT_METHOD = CompilerOptions.OPTION_ReportOverridingPackageDefaultMethod; | |||
public static final String WARN_DEPRECATION = CompilerOptions.OPTION_ReportDeprecation; | |||
public static final String WARN_HIDDEN_CATCH_BLOCKS = CompilerOptions.OPTION_ReportHiddenCatchBlock; | |||
public static final String WARN_UNUSED_LOCALS = CompilerOptions.OPTION_ReportUnusedLocal; | |||
public static final String WARN_UNUSED_PARAMETER = CompilerOptions.OPTION_ReportUnusedParameter; | |||
public static final String WARN_UNUSED_IMPORTS = CompilerOptions.OPTION_ReportUnusedImport; | |||
public static final String WARN_SYNTHETIC_ACCESS = CompilerOptions.OPTION_ReportSyntheticAccessEmulation; | |||
public static final String WARN_ASSERT_IDENITIFIER = CompilerOptions.OPTION_ReportAssertIdentifier; | |||
public static final String WARN_NON_NLS = CompilerOptions.OPTION_ReportNonExternalizedStringLiteral; | |||
// warning option constants | |||
public static final String IGNORE = CompilerOptions.IGNORE; | |||
public static final String WARNING = CompilerOptions.WARNING; | |||
// Debug constants | |||
// Debug constants | |||
public static final String DEBUG_SOURCE = CompilerOptions.OPTION_SourceFileAttribute; | |||
public static final String DEBUG_LINES = CompilerOptions.OPTION_LocalVariableAttribute; | |||
public static final String DEBUG_VARS = CompilerOptions.OPTION_LineNumberAttribute; | |||
// Debug option constants | |||
public static final String GENERATE = CompilerOptions.GENERATE; | |||
public static final String DO_NOT_GENERATE = CompilerOptions.DO_NOT_GENERATE; | |||
private static Map<String,String> defaultOptionsMap; | |||
/** | |||
* @return the java options map with the default settings | |||
*/ | |||
public static Map<String,String> getDefaultJavaOptions() { | |||
if (defaultOptionsMap != null) return defaultOptionsMap; | |||
defaultOptionsMap = new HashMap<>(); | |||
defaultOptionsMap.put(COMPLIANCE_LEVEL, VERSION_14); | |||
defaultOptionsMap.put(SOURCE_COMPATIBILITY_LEVEL, VERSION_13); | |||
@@ -85,10 +85,10 @@ public final class JavaOptions { | |||
defaultOptionsMap.put(DEBUG_SOURCE, GENERATE); | |||
defaultOptionsMap.put(DEBUG_LINES, GENERATE); | |||
defaultOptionsMap.put(DEBUG_VARS, DO_NOT_GENERATE); | |||
return defaultOptionsMap; | |||
} | |||
/** | |||
* @return true if the given value is a valid JVM version | |||
* (JavaOptions.VERSION_13, JavaOptions.VERSION_134, JavaOptions.VERSION_15, | |||
@@ -100,23 +100,23 @@ public final class JavaOptions { | |||
} | |||
/** | |||
* @return true if the given option is JavaOptions.PRESERVE or | |||
* @return true if the given option is JavaOptions.PRESERVE or | |||
* JavaOptions.OPTIMIZE and false otherwise | |||
*/ | |||
public static boolean isValidPreserveAllLocalsOption(String option) { | |||
return PRESERVE.equals(option) || OPTIMIZE.equals(option); | |||
} | |||
/** | |||
* @return true if the given option is JavaOptions.IGNORE or | |||
* @return true if the given option is JavaOptions.IGNORE or | |||
* JavaOptions.WARNING and false otherwise | |||
*/ | |||
public static boolean isIgnoreOrWarning(String option) { | |||
return IGNORE.equals(option) || WARNING.equals(option); | |||
} | |||
/** | |||
* @return true if the given option is JavaOptions.GENERATE or | |||
* @return true if the given option is JavaOptions.GENERATE or | |||
* JavaOptions.DO_NOT_GENERATE and false otherwise | |||
*/ | |||
public static boolean isGenerateOrNot(String option) { |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins converted to new interface (pr148190) | |||
* Helen Hawkins converted to new interface (pr148190) | |||
* ******************************************************************/ | |||
@@ -18,8 +18,8 @@ import org.aspectj.ajde.core.IBuildProgressMonitor; | |||
import org.aspectj.bridge.IProgressListener; | |||
/** | |||
* Enables the compiler/weaver progres to be related to the user via the | |||
* IBuildProgressMonitor as well as relating whether or not the user has | |||
* Enables the compiler/weaver progres to be related to the user via the | |||
* IBuildProgressMonitor as well as relating whether or not the user has | |||
* cancelled the build progress back to the compiler/weaver. | |||
*/ | |||
public class AjdeCoreBuildNotifierAdapter implements IProgressListener { |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core.internal; | |||
@@ -23,11 +23,11 @@ import org.aspectj.bridge.IMessage.Kind; | |||
public class AjdeCoreMessageHandlerAdapter implements IMessageHandler { | |||
private IBuildMessageHandler handler; | |||
public AjdeCoreMessageHandlerAdapter(IBuildMessageHandler messageHandler) { | |||
this.handler = messageHandler; | |||
} | |||
public void dontIgnore(Kind kind) { | |||
handler.dontIgnore(kind); | |||
} |
@@ -1,14 +1,14 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2006 Contributors.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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: | |||
* Copyright (c) 2006 Contributors.All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Adrian Colyer Initial implementation | |||
* Helen Hawkins converted to new interface (bug 148190) | |||
* | |||
* | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core.internal; | |||
@@ -64,7 +64,7 @@ public class OutputLocationAdapter implements CompilationResultDestinationManage | |||
/** | |||
* Return a map from fully qualified jar/dir entries to handle components. | |||
* | |||
* | |||
* @return a map from inpath entries (jars/dirs) to handle components. | |||
*/ | |||
public Map<File,String> getInpathMap() { |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core; |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core.tests; |
@@ -1,12 +1,12 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2004 Contributors. | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Andy Clement Initial version | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -21,21 +21,21 @@ import org.aspectj.ajde.core.TestCompilerConfiguration; | |||
* weaving phases - this testcase verifies a few cases, making sure the process | |||
* stops when expected. It can check the disk contents, but it doesn't right | |||
* now. | |||
* | |||
* | |||
* Two different .lst files are used during these tests: LoadsaCode.lst and | |||
* EvenMoreCode.lst which contain mixes of aspects and classes | |||
* | |||
* | |||
* Here are some things to think about that will help you understand what is on | |||
* the disk when we cancel the compiler. | |||
* | |||
* | |||
* There are 3 important phases worth remembering : - Compile all the types - | |||
* Weave all the aspects - Weave all the classes | |||
* | |||
* | |||
* Each of those steps goes through all the types. This means during the 'weave | |||
* all the aspects' step we are jumping over classes and during the 'weave all | |||
* the classes ' step we are jumping over aspects. Why is this important? | |||
* | |||
* | |||
* | |||
* | |||
* We only write bytes out during the 'weave all the classes ' phase and it is | |||
* even during that phase that we write out the bytes for aspects. This means if | |||
* you cancel during compilation or during the weaving of aspects - there will | |||
@@ -204,10 +204,10 @@ public class BuildCancellingTest extends AjdeCoreTestCase { | |||
* After first weave class message, get it to cancel, there should be one | |||
* more warning message about cancelling the weave and their should be | |||
* nothing on the disk. | |||
* | |||
* | |||
* EvenMoreCode.lst contains: A1.aj Cl1.java A2.aj Cl2.java HW.java A3.aj | |||
* Cl3.java A4.aj | |||
* | |||
* | |||
*/ | |||
public void testCancelFirstClassWeave() { | |||
if (debugTests) | |||
@@ -238,10 +238,10 @@ public class BuildCancellingTest extends AjdeCoreTestCase { | |||
* After first weave aspect message, get it to cancel, there should be one | |||
* more warning message about cancelling the weave and their should be | |||
* nothing on the disk. | |||
* | |||
* | |||
* EvenMoreCode.lst contains: A1.aj Cl1.java A2.aj Cl2.java HW.java A3.aj | |||
* Cl3.java A4.aj | |||
* | |||
* | |||
*/ | |||
public void testCancelSecondClassWeave() { | |||
if (debugTests) |
@@ -1,12 +1,12 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2003 Contributors. | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* AMC 2003 initial version | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -28,7 +28,7 @@ public class CompilerMessagesTest extends AjdeCoreTestCase { | |||
private TestCompilerConfiguration compilerConfig; | |||
private String[] files = { "apackage" + File.separator + "InitCatcher.java", | |||
"apackage" + File.separator + "SomeClass.java" }; | |||
protected void setUp() throws Exception { | |||
super.setUp(); | |||
initialiseProject("declare-warning"); | |||
@@ -43,7 +43,7 @@ public class CompilerMessagesTest extends AjdeCoreTestCase { | |||
handler = null; | |||
compilerConfig = null; | |||
} | |||
public void testMessages() { | |||
// bug 33474 | |||
// The build has happened, what messages did the compiler give, and do they | |||
@@ -53,7 +53,7 @@ public class CompilerMessagesTest extends AjdeCoreTestCase { | |||
assertTrue("not two messages: " + msgs, false); | |||
} | |||
assertEquals("Two warning messages should be produced",2,msgs.size()); | |||
TestMessageHandler.TestMessage msg = | |||
TestMessageHandler.TestMessage msg = | |||
(TestMessageHandler.TestMessage) msgs.get(0); | |||
assertEquals( 8, msg.getContainedMessage().getSourceLocation().getLine()); | |||
assertEquals( "Please don't call init methods", msg.getContainedMessage().getMessage()); | |||
@@ -62,13 +62,13 @@ public class CompilerMessagesTest extends AjdeCoreTestCase { | |||
// this name has a tester specific prefix, followed by the location of the file. | |||
// we can validate the ending. | |||
fullyQualifiedFile = fullyQualifiedFile.replace('\\','/'); // ignore platform differences in slashes | |||
assertTrue( "Fully-qualified source file location returned", | |||
assertTrue( "Fully-qualified source file location returned", | |||
fullyQualifiedFile.endsWith("/declare-warning/apackage/SomeClass.java")); | |||
} catch (IOException ex) { | |||
assertTrue( "Unable to convert source file location: " + msg.getContainedMessage().getSourceLocation().getSourceFile(), false); | |||
} | |||
} | |||
public void testDeclareMessageContents() { | |||
List<TestMessage> msgs = handler.getMessages(); | |||
IMessage msg = ((TestMessageHandler.TestMessage)msgs.get(1)).getContainedMessage(); |
@@ -1,10 +1,10 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2004 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 | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Matthew Webster - initial implementation | |||
* Helen Hawkins - Converted to new interface (bug 148190) |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2003 Contributors. | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Mik Kersten initial implementation | |||
* Andy Clement Copied/changed for -inpath testing | |||
* Andy Clement Copied/changed for -inpath testing | |||
* Helen Hawkins Changed to use new ajde interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.core.tests; | |||
@@ -67,7 +67,7 @@ public class InpathTest extends AjdeCoreTestCase { | |||
/** | |||
* Inputs to the compiler: inpath = 'indir1/' source = 'src' output = a jar file | |||
* | |||
* | |||
* Expected result = output jar file contains contents of indir1 and class file for source that was in src | |||
*/ | |||
public void testInpathToOutjar() { | |||
@@ -97,7 +97,7 @@ public class InpathTest extends AjdeCoreTestCase { | |||
/** | |||
* Similar to the first test but outputs to a directory rather than a jar. | |||
* | |||
* | |||
*/ | |||
public void testInpathToBin() { | |||
Set<File> inpath = new HashSet<>(); | |||
@@ -126,10 +126,10 @@ public class InpathTest extends AjdeCoreTestCase { | |||
/** | |||
* Inputs to the compiler: inpath is 'indir2' that contains a helloworld source file and class file. source is 'src2' which | |||
* contains Aspect.java which weaves before advice into the HelloWorld code from 'indir2' | |||
* | |||
* | |||
* Expected result: HelloWorld copied through to output jar and 'weaved'. Compiled version of Aspect.java put into the output | |||
* jar. The HelloWorld.java source file is also copied through to the output jar. | |||
* | |||
* | |||
* An extra check is done at the end of this test to verify that HelloWorld has changed size (due to the weaving). | |||
*/ | |||
public void testInpathToOutjar2() { | |||
@@ -174,11 +174,11 @@ public class InpathTest extends AjdeCoreTestCase { | |||
/** | |||
* More complex inpath - a jar and a directory | |||
* | |||
* | |||
* Inputs: -inpath injar.jar;indir2 source is 'src2' which contains Aspect.java | |||
* | |||
* | |||
* Expected result: Result should be a directory containing the contents of injar.jar and indir2 and the Aspect.class file. | |||
* | |||
* | |||
*/ | |||
public void testInpathAndInjarToBin() { | |||
Set<File> inpath = new HashSet<>(); |
@@ -1,10 +1,10 @@ | |||
/******************************************************************************* | |||
* Copyright (c) 2004 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 | |||
* All rights reserved. This program and the accompanying materials | |||
* are made available under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution, and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* IBM Corporation - initial API and implementation | |||
* Helen Hawkins - Converted to new interface (bug 148190) | |||
@@ -27,7 +27,7 @@ public class JarManifestTest extends AjdeCoreTestCase { | |||
private String[] weave = { "src" + File.separator + "Main.java", | |||
"src" + File.separator + "Logging.aj" }; | |||
private TestMessageHandler handler; | |||
private TestCompilerConfiguration compilerConfig; | |||
@@ -44,7 +44,7 @@ public class JarManifestTest extends AjdeCoreTestCase { | |||
handler = null; | |||
compilerConfig = null; | |||
} | |||
public void testWeave () { | |||
File outjar = openFile(outjarName); | |||
compilerConfig.setOutjar(outjar.getAbsolutePath()); | |||
@@ -54,7 +54,7 @@ public class JarManifestTest extends AjdeCoreTestCase { | |||
+ handler.getMessages(), handler.getMessages().isEmpty()); | |||
checkManifest(outjar); | |||
} | |||
public void testNoWeave () { | |||
File outjar = openFile(outjarName); | |||
compilerConfig.setOutjar(outjar.getAbsolutePath()); | |||
@@ -65,7 +65,7 @@ public class JarManifestTest extends AjdeCoreTestCase { | |||
+ handler.getMessages(), handler.getMessages().isEmpty()); | |||
checkManifest(outjar); | |||
} | |||
private void checkManifest (File outjarFile) { | |||
Manifest manifest = null; | |||
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2003 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Matthew Webster initial implementation |
@@ -1,12 +1,12 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2003 Contributors. 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: | |||
* Mik Kersten initial implementation | |||
* Copyright (c) 2003 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Mik Kersten initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.core.tests; | |||
@@ -283,7 +283,7 @@ public class ResourceCopyTest extends AjdeCoreTestCase { | |||
/** | |||
* Look in the specified jar file for resources (anything not .class) and add it the resources Set. | |||
* | |||
* | |||
* @param injarFile jar file to open up | |||
* @param resources the set where resources should be accumulated | |||
* @param wantDirectories should any directories found in the jar be included |
@@ -1,12 +1,12 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2004 Contributors. | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Andy Clement Initial version | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -55,9 +55,9 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
/** | |||
* Aim: Check we haven't damaged 'normal compilation' when not supplying -Xreweavable. Also determines baseline sizes for the | |||
* compiled class files for later comparison. | |||
* | |||
* | |||
* Inputs to the compiler: NonReweavable1.lst -> CalculatePI.java -> Logger.aj -> -verbose -> -noExit | |||
* | |||
* | |||
* Expected result = Compile successful, the types will not be reweavable and the weaver should not report it is running in | |||
* reweavable mode. | |||
*/ | |||
@@ -90,9 +90,9 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
/** | |||
* Aim: Basic call to -Xreweavable. Weaver should report it is in reweavable mode and the classes produced should be much larger | |||
* than normal classes (those produced in the first test). | |||
* | |||
* | |||
* Inputs to the compiler: Reweavable1.lst -> CalculatePI.java -> Logger.aj -> -Xreweavable -> -verbose -> -noExit | |||
* | |||
* | |||
* Expected result = Compile successful, the types will be reweavable and the weaver should report it is running in reweavable | |||
* mode. The files produced should be larger than those created during the last test. | |||
*/ | |||
@@ -137,10 +137,10 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
* Aim: Use the optional ':compress' modifier on -Xreweavable. This causes some of the meta-data for use in reweaving to be | |||
* compressed. It should succeed and produce class files smaller than straight -Xreweavable but larger than without specifying | |||
* -Xreweavable. | |||
* | |||
* | |||
* Inputs to the compiler: ReweavableCompress1.lst -> CalculatePI.java -> Logger.aj -> -Xreweavable:compress -> -verbose -> | |||
* -noExit | |||
* | |||
* | |||
* Expected result = Compile successful, the types will be reweavable and the weaver should report it is running in reweavable | |||
* mode. The files created should have a size between the non-reweavable versions and the reweavable (without compression) | |||
* versions. | |||
@@ -200,11 +200,11 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
* Aim: The tests above have determined that reweaving appears to be behaving in terms of the .class files it is creating. Now | |||
* lets actually attempt a reweave. For this, we build two files as reweavable and then build a single file whilst specifying an | |||
* inpath that contains the .class files from the first compile. This should succeed. | |||
* | |||
* | |||
* Inputs to the first compile: Reweavable1.lst -> CalculatePI.java -> Logger.aj -> -Xreweavable -> -verbose -> -noExit | |||
* | |||
* | |||
* Input to the second compile: Reweavable2.lst -> SecondAspect.aj -> -Xreweavable -> -verbose -> -noExit -inpath bin\. | |||
* | |||
* | |||
* Expected result = Both compiles will succeed. | |||
*/ | |||
public void testReweavableSimpleCompile() { | |||
@@ -247,11 +247,11 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
/** | |||
* Aim: Based on the test above, if we delete Logger.class between the first and second compiles the second compile should fail | |||
* because there is not enough information to reweave CalculatePI | |||
* | |||
* | |||
* Inputs to the first compile: Reweavable1.lst -> CalculatePI.java -> Logger.aj -> -Xreweavable -> -verbose -> -noExit | |||
* | |||
* | |||
* Input to the second compile: Reweavable2.lst -> SecondAspect.aj -> -Xreweavable -> -verbose -> -noExit -inpath bin\. | |||
* | |||
* | |||
* Expected result = Second compile will fail - reporting that Logger is missing (it 'touched' in the first compile CalculatePI) | |||
*/ | |||
public void testForReweavableSimpleErrorCompile() { | |||
@@ -296,11 +296,11 @@ public class ReweavableTest extends AjdeCoreTestCase { | |||
/** | |||
* Aim: Based on the test above, if we delete Logger.class between the first and second compiles the second compile should fail | |||
* because there is not enough information to reweave CalculatePI | |||
* | |||
* | |||
* Inputs to the first compile: TJP1.lst -> tjp/Demo.java -> tjp/GetInfo.java -> -Xreweavable -> -verbose -> -noExit | |||
* | |||
* | |||
* Now, delete bin\tjp\GetInfo.class and do a compile with: TJP2.lst -> -Xreweavable -> -verbose -> -noExit -inpath bin\. | |||
* | |||
* | |||
* Expected result = Second compile will fail - reporting that tjp.GetInfo is missing (it 'touched' in the first compile | |||
* tjp.Demo) | |||
*/ |
@@ -2,9 +2,9 @@ | |||
* Copyright (c) 2004 Contributors. | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Andy Clement Initial version |
@@ -2,9 +2,9 @@ | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.core.tests.model; |
@@ -2,9 +2,9 @@ | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* ******************************************************************/ | |||
@@ -1,13 +1,13 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Mik Kersten initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Mik Kersten initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.core.tests.model; |
@@ -2,9 +2,9 @@ | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,24 +1,23 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC), | |||
* 2003 Contributors. | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* AMC 01.20.2003 extended to support new AspectJ 1.1 options, | |||
* bugzilla #29769 | |||
* ******************************************************************/ | |||
public aspect AjdeApiRules { | |||
declare warning: | |||
call(* javax.swing..*(..)) && !within(org.aspectj.ajde.ui.swing..*): | |||
"do not use Swing outside of org.aspectj.ajde.swing"; | |||
} | |||
/* ******************************************************************* | |||
* Copyright (c) 2002 Palo Alto Research Center, Incorporated (PARC), | |||
* 2003 Contributors. | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* AMC 01.20.2003 extended to support new AspectJ 1.1 options, | |||
* bugzilla #29769 | |||
* ******************************************************************/ | |||
public aspect AjdeApiRules { | |||
declare warning: | |||
call(* javax.swing..*(..)) && !within(org.aspectj.ajde.ui.swing..*): | |||
"do not use Swing outside of org.aspectj.ajde.swing"; | |||
} |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde; | |||
@@ -46,9 +46,9 @@ import org.aspectj.util.Reflection; | |||
* Singleton class used to initialize the Ajde ui as well as the properties required to run the compiler. Users must call | |||
* "Ajde.init(...)" before doing anything else. There are getter methods for the various properties that are set in the | |||
* initialization. | |||
* | |||
* | |||
* This also defines the factory for getting new AjCompiler instances. | |||
* | |||
* | |||
* @author Mik Kersten | |||
* @author Andy Clement | |||
*/ | |||
@@ -159,7 +159,7 @@ public class Ajde { | |||
/** | |||
* Utility to run the project main class from the project properties in the same VM using a class loader populated with the | |||
* classpath and output path or jar. Errors are logged to the ErrorHandler. | |||
* | |||
* | |||
* @return Thread running with process, or null if unable to start | |||
*/ | |||
public Thread runInSameVM() { | |||
@@ -184,7 +184,7 @@ public class Ajde { | |||
/** | |||
* Utility to run the project main class from the project properties in a new VM. Errors are logged to the ErrorHandler. | |||
* | |||
* | |||
* @return LangUtil.ProcessController running with process, or null if unable to start | |||
*/ | |||
public LangUtil.ProcessController runInNewVM() { | |||
@@ -286,7 +286,7 @@ public class Ajde { | |||
/** | |||
* Set the build off in the same thread | |||
* | |||
* | |||
* @param configFile | |||
* @param buildFresh - true if want to do a full build, false otherwise | |||
*/ | |||
@@ -304,7 +304,7 @@ public class Ajde { | |||
/** | |||
* Set the build off in a different thread. Would need to set the build off in a different thread if using a swing application | |||
* to display the build progress. | |||
* | |||
* | |||
* @param configFile | |||
* @param buildFresh - true if want to do a full build, false otherwise | |||
*/ | |||
@@ -447,7 +447,7 @@ public class Ajde { | |||
/** | |||
* If the provided configFile is the same as the id for the last compiler then returns that, otherwise clears the state for the | |||
* saved compiler and creates a new one for the provided configFile | |||
* | |||
* | |||
* @param configFile | |||
* @return the AjCompiler with the id of the given configFile | |||
*/ |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -33,7 +33,7 @@ public class IconRegistry extends AbstractIconRegistry { | |||
//public static IconRegistry INSTANCE = null; | |||
protected String RESOURCE_PATH = "org/aspectj/ajde/resources/"; | |||
private final Icon START_AJDE = makeIcon("actions/startAjde.gif"); | |||
private final Icon STOP_AJDE = makeIcon("actions/stopAjde.gif"); | |||
private final Icon BUILD = makeIcon("actions/build.gif"); | |||
@@ -41,28 +41,28 @@ public class IconRegistry extends AbstractIconRegistry { | |||
private final Icon EXECUTE = makeIcon("actions/execute.gif"); | |||
private final Icon AJBROWSER = makeIcon("structure/advice.gif"); | |||
private final Icon AJBROWSER_ENABLED = makeIcon("actions/browserEnabled.gif"); | |||
private final Icon AJBROWSER_DISABLED = makeIcon("actions/browserDisabled.gif"); | |||
private final Icon STRUCTURE_VIEW = makeIcon("actions/structureView.gif"); | |||
private final Icon AJBROWSER_DISABLED = makeIcon("actions/browserDisabled.gif"); | |||
private final Icon STRUCTURE_VIEW = makeIcon("actions/structureView.gif"); | |||
private final Icon HIDE_ASSOCIATIONS = makeIcon("actions/hideAssociations.gif"); | |||
private final Icon HIDE_NON_AJ = makeIcon("actions/hideNonAJ.gif"); | |||
private final Icon GRANULARITY = makeIcon("actions/granularity.gif"); | |||
private final Icon AJDE_SMALL = makeIcon("actions/ajdeSmall.gif"); | |||
private final Icon HIDE_ASSOCIATIONS = makeIcon("actions/hideAssociations.gif"); | |||
private final Icon HIDE_NON_AJ = makeIcon("actions/hideNonAJ.gif"); | |||
private final Icon GRANULARITY = makeIcon("actions/granularity.gif"); | |||
private final Icon AJDE_SMALL = makeIcon("actions/ajdeSmall.gif"); | |||
private final Icon ERROR = makeIcon("structure/error.gif"); | |||
private final Icon WARNING = makeIcon("structure/warning.gif"); | |||
private final Icon INFO = makeIcon("structure/info.gif"); | |||
private final Icon INFO = makeIcon("structure/info.gif"); | |||
private final Icon POPUP = makeIcon("actions/popup.gif"); | |||
private final Icon FILTER = makeIcon("actions/filter.gif"); | |||
private final Icon RELATIONS = makeIcon("actions/relations.gif"); | |||
private final Icon ORDER = makeIcon("actions/order.gif"); | |||
private final Icon ZOOM_STRUCTURE_TO_FILE_MODE = makeIcon("actions/zoomStructureToFileMode.gif"); | |||
private final Icon ZOOM_STRUCTURE_TO_GLOBAL_MODE = makeIcon("actions/zoomStructureToGlobalMode.gif"); | |||
private final Icon SPLIT_STRUCTURE_VIEW = makeIcon("actions/splitStructureView.gif"); | |||
private final Icon MERGE_STRUCTURE_VIEW = makeIcon("actions/mergeStructureView.gif"); | |||
private final Icon BACK = makeIcon("actions/back.gif"); | |||
private final Icon FORWARD = makeIcon("actions/forward.gif"); | |||
private final Icon SEARCH = makeIcon("actions/search.gif"); | |||
@@ -71,7 +71,7 @@ public class IconRegistry extends AbstractIconRegistry { | |||
private final Icon SAVE = makeIcon("actions/save.gif"); | |||
private final Icon SAVE_ALL = makeIcon("actions/saveAll.gif"); | |||
private final Icon BROWSER_OPTIONS = makeIcon("actions/browseroptions.gif"); | |||
private final Icon ACCESSIBILITY_PUBLIC = makeIcon("structure/accessibility-public.gif"); | |||
private final Icon ACCESSIBILITY_PACKAGE = makeIcon("structure/accessibility-package.gif"); | |||
private final Icon ACCESSIBILITY_PROTECTED = makeIcon("structure/accessibility-protected.gif"); | |||
@@ -113,17 +113,17 @@ public class IconRegistry extends AbstractIconRegistry { | |||
public Icon getStructureViewIcon() { return STRUCTURE_VIEW; } | |||
public Icon getAssociationSwingIcon(IRelationship.Kind relation) { | |||
return convertToSwingIcon(getIcon(relation)); | |||
return convertToSwingIcon(getIcon(relation)); | |||
} | |||
public AbstractIcon getStructureIcon(IProgramElement.Kind kind, IProgramElement.Accessibility accessibility) { | |||
return getIcon(kind); | |||
return getIcon(kind); | |||
} | |||
public Icon getStructureSwingIcon(IProgramElement.Kind kind, IProgramElement.Accessibility accessibility) { | |||
return convertToSwingIcon(getStructureIcon(kind, accessibility)); | |||
public Icon getStructureSwingIcon(IProgramElement.Kind kind, IProgramElement.Accessibility accessibility) { | |||
return convertToSwingIcon(getStructureIcon(kind, accessibility)); | |||
} | |||
public Icon getStructureSwingIcon(IProgramElement.Kind kind) { | |||
return convertToSwingIcon(getIcon(kind)); | |||
} | |||
@@ -149,7 +149,7 @@ public class IconRegistry extends AbstractIconRegistry { | |||
return (Icon)iconAdapter.getIconResource(); | |||
} else { | |||
return null; | |||
} | |||
} | |||
} | |||
protected AbstractIcon createIcon(String path) { | |||
@@ -157,8 +157,8 @@ public class IconRegistry extends AbstractIconRegistry { | |||
if (resource == null) { | |||
throw new IllegalStateException("Unable to find icon resource: "+path); | |||
} | |||
return new AbstractIcon(new ImageIcon(resource)); | |||
// return new AbstractIcon(new ImageIcon(ClassLoader.getSystemResource(path))); | |||
return new AbstractIcon(new ImageIcon(resource)); | |||
// return new AbstractIcon(new ImageIcon(ClassLoader.getSystemResource(path))); | |||
} | |||
protected Icon makeIcon(String iconPath) { |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.internal; |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,17 +1,17 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.internal; | |||
//import org.aspectj.ajde.compiler.AjdeCompiler; | |||
@@ -56,7 +56,7 @@ public class StructureUtilities { | |||
*/ | |||
// public static void dumpStructure(StructureNode node, String indent) { | |||
// if (node == null) return; | |||
// Syste.println(indent + node); | |||
// Syste.println(indent + node); | |||
// if (node.getChildren() != null) { | |||
// for (Iterator it = node.getChildren().iterator(); it.hasNext(); ) { | |||
// dumpStructure((StructureNode)it.next(), indent + " "); |
@@ -1,31 +1,31 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui; | |||
/** | |||
* @author Mik Kersten | |||
*/ | |||
public class AbstractIcon { | |||
private Object iconResource; | |||
public AbstractIcon(Object iconResource) { | |||
this.iconResource = iconResource; | |||
} | |||
this.iconResource = iconResource; | |||
} | |||
public Object getIconResource() { | |||
return iconResource; | |||
return iconResource; | |||
} | |||
} |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -19,11 +19,11 @@ import org.aspectj.asm.IRelationship; | |||
/** | |||
* Uses the factory pattern. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public abstract class AbstractIconRegistry { | |||
protected final String RESOURCE_PATH = "org/aspectj/ajde/resources/"; | |||
protected final String STRUCTURE_PATH = RESOURCE_PATH + "structure/"; | |||
@@ -41,12 +41,12 @@ public abstract class AbstractIconRegistry { | |||
protected final AbstractIcon DECLARE_SOFT = createIcon(STRUCTURE_PATH + "declareSoft.gif"); | |||
protected final AbstractIcon CODE = createIcon(STRUCTURE_PATH + "code.gif"); | |||
protected final AbstractIcon ERROR = createIcon(STRUCTURE_PATH + "error.gif"); | |||
protected final AbstractIcon FILE = createIcon(STRUCTURE_PATH + "file.gif"); | |||
protected final AbstractIcon FILE_JAVA = createIcon(STRUCTURE_PATH + "file-java.gif"); | |||
protected final AbstractIcon FILE_ASPECTJ = createIcon(STRUCTURE_PATH + "file-aspectj.gif"); | |||
protected final AbstractIcon FILE_LST = createIcon(STRUCTURE_PATH + "file-lst.gif"); | |||
protected final AbstractIcon METHOD = createIcon(STRUCTURE_PATH + "method.gif"); | |||
protected final AbstractIcon FIELD = createIcon(STRUCTURE_PATH + "field.gif"); | |||
protected final AbstractIcon ENUM_VALUE = createIcon(STRUCTURE_PATH + "field.gif"); // ??? should be enum value icon | |||
@@ -78,13 +78,13 @@ public abstract class AbstractIconRegistry { | |||
* @return null if the kind could not be resolved | |||
*/ | |||
protected abstract AbstractIcon getStructureIcon(IProgramElement.Kind kind, IProgramElement.Accessibility accessibility); | |||
/** | |||
* Assumes "public" visibility for the icon. | |||
* | |||
* | |||
* @return null if the kind could not be resolved | |||
*/ | |||
public AbstractIcon getIcon(IProgramElement.Kind kind) { | |||
public AbstractIcon getIcon(IProgramElement.Kind kind) { | |||
if (kind == IProgramElement.Kind.PROJECT) { | |||
return PROJECT; | |||
} else if (kind == IProgramElement.Kind.PACKAGE) { | |||
@@ -148,10 +148,10 @@ public abstract class AbstractIconRegistry { | |||
return null; | |||
} | |||
} | |||
/** | |||
* Implement to create platform-specific icons. | |||
*/ | |||
*/ | |||
protected abstract AbstractIcon createIcon(String path); | |||
} | |||
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui; | |||
@@ -24,7 +24,7 @@ import org.aspectj.util.FileUtil; | |||
/** | |||
* @author Mik Kersten | |||
* | |||
* | |||
* TODO: clean-up after merging of org.aspectj.asm.StructureNode | |||
*/ | |||
public class BuildConfigNode { |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -18,16 +18,16 @@ package org.aspectj.ajde.ui; | |||
/** | |||
* Should only be created by the {@link StructureViewManager} or an | |||
* equivalent factory. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class FileStructureView extends StructureView { | |||
private String sourceFilePath = null; | |||
public FileStructureView(StructureViewProperties viewProperties) { | |||
super.viewProperties = viewProperties; | |||
} | |||
super.viewProperties = viewProperties; | |||
} | |||
public String getSourceFile() { | |||
return sourceFilePath; | |||
} | |||
@@ -40,9 +40,9 @@ public class FileStructureView extends StructureView { | |||
super.setRootNode(rootNode); | |||
notifyViewUpdated(); | |||
} | |||
public String getName() { | |||
return "File view for: " + sourceFilePath; | |||
return "File view for: " + sourceFilePath; | |||
} | |||
} | |||
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -18,7 +18,7 @@ package org.aspectj.ajde.ui; | |||
/** | |||
* Should only be created by the {@link StructureViewManager} or an | |||
* equivalent factory. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class GlobalStructureView extends FileStructureView { | |||
@@ -27,26 +27,26 @@ public class GlobalStructureView extends FileStructureView { | |||
public GlobalStructureView(GlobalViewProperties viewProperties) { | |||
super(viewProperties); | |||
this.viewProperties = viewProperties; | |||
} | |||
this.viewProperties = viewProperties; | |||
} | |||
public GlobalViewProperties getGlobalViewProperties() { | |||
return viewProperties; | |||
return viewProperties; | |||
} | |||
// public void setActiveNode(StructureViewNode activeNode) { | |||
// StructureNode node = activeNode.getStructureNode(); | |||
// | |||
// | |||
// activeNode = activeNode; | |||
// if (renderer != null) renderer.setActiveNode(activeNode); | |||
// } | |||
// | |||
// | |||
// public void setActiveNode(StructureViewNode activeNode, int sourceLine) { | |||
// activeNode = activeNode; | |||
// if (renderer != null) renderer.setActiveNode(activeNode, sourceLine); | |||
// } | |||
public String toString() { | |||
return viewProperties.getHierarchy().toString(); | |||
return viewProperties.getHierarchy().toString(); | |||
} | |||
} |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -20,12 +20,12 @@ package org.aspectj.ajde.ui; | |||
public class GlobalViewProperties extends StructureViewProperties { | |||
private StructureViewProperties.Granularity granularity = StructureViewProperties.Granularity.DECLARED_ELEMENTS; | |||
private StructureViewProperties.Hierarchy hierarchy = StructureViewProperties.Hierarchy.DECLARATION; | |||
private StructureViewProperties.Hierarchy hierarchy = StructureViewProperties.Hierarchy.DECLARATION; | |||
public GlobalViewProperties(StructureViewProperties.Hierarchy hierarchy) { | |||
this.hierarchy = hierarchy; | |||
} | |||
public void setGranularity(StructureViewProperties.Granularity granularity) { | |||
this.granularity = granularity; | |||
} | |||
@@ -33,15 +33,15 @@ public class GlobalViewProperties extends StructureViewProperties { | |||
public StructureViewProperties.Granularity getGranularity() { | |||
return granularity; | |||
} | |||
public void setHierarchy(StructureViewProperties.Hierarchy hierarchy) { | |||
this.hierarchy = hierarchy; | |||
this.hierarchy = hierarchy; | |||
} | |||
public StructureViewProperties.Hierarchy getHierarchy() { | |||
return hierarchy; | |||
} | |||
public String getName() { | |||
return hierarchy.toString(); | |||
} |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -21,17 +21,17 @@ import org.aspectj.asm.IProgramElement; | |||
*/ | |||
public abstract class StructureView { | |||
private IStructureViewNode rootNode = null; | |||
private IStructureViewNode activeNode = null; | |||
private IStructureViewNode rootNode = null; | |||
private IStructureViewNode activeNode = null; | |||
protected StructureViewProperties viewProperties = null; | |||
protected StructureViewRenderer renderer = null; | |||
public StructureViewProperties getViewProperties() { | |||
return viewProperties; | |||
} | |||
return viewProperties; | |||
} | |||
public IStructureViewNode getRootNode() { | |||
return rootNode; | |||
return rootNode; | |||
} | |||
public void setRootNode(IStructureViewNode rootNode) { | |||
@@ -54,7 +54,7 @@ public abstract class StructureView { | |||
* @return the view node corresponding to the active ProgramElementNode or null | |||
*/ | |||
public IStructureViewNode getActiveNode() { | |||
if (activeNode != null | |||
if (activeNode != null | |||
&& activeNode.getStructureNode()!=null) { | |||
return activeNode; | |||
} else { | |||
@@ -64,40 +64,40 @@ public abstract class StructureView { | |||
/** | |||
* Searches from the root node of the view down in order to find matches. | |||
* | |||
* | |||
* @return the first match | |||
*/ | |||
public IStructureViewNode findCorrespondingViewNode(IProgramElement node) { | |||
return findCorrespondingViewNodeHelper(rootNode, node); | |||
} | |||
private IStructureViewNode findCorrespondingViewNodeHelper(IStructureViewNode node, IProgramElement pNode) { | |||
private IStructureViewNode findCorrespondingViewNodeHelper(IStructureViewNode node, IProgramElement pNode) { | |||
if (node != null | |||
&& node.getStructureNode() != null | |||
&& node.getStructureNode() != null | |||
&& node.getStructureNode().equals(pNode) | |||
&& node.getKind() == IStructureViewNode.Kind.DECLARATION) { | |||
return node; | |||
} | |||
&& node.getKind() == IStructureViewNode.Kind.DECLARATION) { | |||
return node; | |||
} | |||
if (node != null && node.getChildren() != null) { | |||
for (Object o : node.getChildren()) { | |||
IStructureViewNode foundNode = findCorrespondingViewNodeHelper((IStructureViewNode) o, pNode); | |||
if (foundNode != null) return foundNode; | |||
} | |||
} | |||
return null; | |||
} | |||
} | |||
public void setActiveNode(IStructureViewNode activeNode) { | |||
this.activeNode = activeNode; | |||
if (renderer != null) renderer.setActiveNode(activeNode); | |||
} | |||
public void setActiveNode(IStructureViewNode activeNode, int sourceLine) { | |||
this.activeNode = activeNode; | |||
if (renderer != null) renderer.setActiveNode(activeNode, sourceLine); | |||
} | |||
} | |||
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui; | |||
@@ -82,7 +82,7 @@ public class StructureViewManager { | |||
/** | |||
* Only navigations of the default view are registered with the history. | |||
* | |||
* | |||
* @param newFilePath the canonicalized path to the new file | |||
*/ | |||
public void fireNavigationAction(String newFilePath, int lineNumber) { |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui; | |||
@@ -77,7 +77,7 @@ public abstract class StructureViewNodeFactory { | |||
/** | |||
* Implementors must override this method in order to create new relationship nodes. | |||
* | |||
* | |||
* If returned node is null it will not be added to the tree. | |||
*/ | |||
protected abstract IStructureViewNode createRelationship(IRelationship relationship, AbstractIcon icon); |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -22,17 +22,17 @@ import org.aspectj.asm.IProgramElement; | |||
* @author Mik Kersten | |||
*/ | |||
public class NavigationHistoryModel { | |||
private IProgramElement currNode = null; | |||
private Stack backHistory = new Stack(); | |||
private Stack forwardHistory = new Stack(); | |||
/** | |||
* @return null if the history is empty | |||
*/ | |||
public IProgramElement navigateBack() { | |||
if (backHistory.isEmpty() || currNode == null) return null; | |||
forwardHistory.push(currNode); | |||
currNode = (IProgramElement)backHistory.pop(); | |||
return currNode; | |||
@@ -40,18 +40,18 @@ public class NavigationHistoryModel { | |||
/** | |||
* @return null if the history is empty | |||
*/ | |||
*/ | |||
public IProgramElement navigateForward() { | |||
if (forwardHistory.isEmpty() || currNode == null) return null; | |||
backHistory.push(currNode); | |||
currNode = (IProgramElement)forwardHistory.pop(); | |||
return currNode; | |||
} | |||
public void navigateToNode(IProgramElement toNode) { | |||
if (currNode != null) backHistory.push(currNode); | |||
currNode = toNode; | |||
currNode = toNode; | |||
} | |||
} |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.ui.javaoptions; |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.ui.javaoptions; | |||
@@ -35,21 +35,21 @@ import org.aspectj.ajde.ui.swing.OptionsPanel; | |||
*/ | |||
public class JavaCompilerWarningsOptionsPanel extends OptionsPanel { | |||
private final String[] ignoreOrWarning = new String[] {JavaOptions.IGNORE,JavaOptions.WARNING}; | |||
private final String[] ignoreOrWarning = new String[] {JavaOptions.IGNORE,JavaOptions.WARNING}; | |||
private static final long serialVersionUID = 4491319302490183151L; | |||
private JPanel parentPanel; | |||
private Border warningsEtchedBorder; | |||
private TitledBorder warningsTitleBorder; | |||
private Border warningsCompoundBorder; | |||
private JPanel warningsPanel; | |||
private Box warningsBox = Box.createVerticalBox(); | |||
private JavaBuildOptions javaBuildOptions; | |||
private Map/*String --> JComboBox*/ warningComboBoxes = new HashMap(); | |||
public JavaCompilerWarningsOptionsPanel(JavaBuildOptions javaBuildOptions) { | |||
this.javaBuildOptions = javaBuildOptions; | |||
try { | |||
@@ -63,8 +63,8 @@ public class JavaCompilerWarningsOptionsPanel extends OptionsPanel { | |||
public void loadOptions() throws IOException { | |||
createWarningContents(); | |||
} | |||
public void saveOptions() throws IOException { | |||
public void saveOptions() throws IOException { | |||
Set s = warningComboBoxes.entrySet(); | |||
for (Object o : s) { | |||
Entry entry = (Entry) o; | |||
@@ -73,7 +73,7 @@ public class JavaCompilerWarningsOptionsPanel extends OptionsPanel { | |||
String value = (String) combo.getSelectedItem(); | |||
javaBuildOptions.setOption(javaOption, value); | |||
} | |||
} | |||
} | |||
private void jbInit() throws Exception { | |||
this.setLayout(new BorderLayout()); | |||
@@ -96,40 +96,40 @@ public class JavaCompilerWarningsOptionsPanel extends OptionsPanel { | |||
createWarningsEntry("Non-externalized strings",JavaOptions.WARN_NON_NLS); | |||
warningsPanel.add(warningsBox,null); | |||
} | |||
private void createWarningsEntry(String labelText, String javaOptionToSet) { | |||
JPanel panel = new JPanel(); | |||
panel.setLayout(new BorderLayout()); | |||
JLabel label = new JLabel(); | |||
label.setFont(new java.awt.Font("Dialog", 0, 11)); | |||
label.setText(labelText); | |||
panel.add(label,BorderLayout.WEST); | |||
JComboBox warnings = new JComboBox(ignoreOrWarning); | |||
String value = (String) javaBuildOptions.getJavaBuildOptionsMap().get(javaOptionToSet); | |||
if (value.equals(JavaOptions.IGNORE)) { | |||
warnings.setSelectedIndex(0); | |||
} else { | |||
warnings.setSelectedIndex(1); | |||
warnings.setSelectedIndex(1); | |||
} | |||
panel.add(warnings,BorderLayout.EAST); | |||
warningsBox.add(panel,null); | |||
warningComboBoxes.put(javaOptionToSet,warnings); | |||
} | |||
private void createBorders() { | |||
private void createBorders() { | |||
warningsEtchedBorder = BorderFactory.createEtchedBorder(Color.white, new Color(156, 156, 158)); | |||
warningsTitleBorder = new TitledBorder(warningsEtchedBorder, "Warning Options"); | |||
warningsCompoundBorder = BorderFactory.createCompoundBorder(warningsTitleBorder, | |||
BorderFactory.createEmptyBorder(5, 5, 5, 5)); | |||
warningsTitleBorder.setTitleFont(new java.awt.Font("Dialog", 0, 11)); | |||
} | |||
private void addBordersToPanel() { | |||
parentPanel = new JPanel(); | |||
parentPanel.setLayout(new BorderLayout()); | |||
warningsPanel = new JPanel(); | |||
warningsPanel.setBorder(warningsCompoundBorder); | |||
parentPanel.add(warningsPanel,BorderLayout.CENTER); |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,9 +1,9 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) |
@@ -1,11 +1,11 @@ | |||
/******************************************************************** | |||
* Copyright (c) 2007 Contributors. 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://eclipse.org/legal/epl-v10.html | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Copyright (c) 2007 Contributors. All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: IBM Corporation - initial API and implementation | |||
* Helen Hawkins - initial version (bug 148190) | |||
*******************************************************************/ | |||
package org.aspectj.ajde.ui.javaoptions; | |||
@@ -33,7 +33,7 @@ import org.aspectj.ajde.ui.swing.OptionsPanel; | |||
public class JavaOtherOptionsPanel extends OptionsPanel { | |||
private static final long serialVersionUID = 4491319302490183151L; | |||
private JPanel parentPanel; | |||
private Border otherEtchedBorder; | |||
@@ -41,11 +41,11 @@ public class JavaOtherOptionsPanel extends OptionsPanel { | |||
private Border otherCompoundBorder; | |||
private JPanel otherPanel; | |||
private Box otherBox = Box.createVerticalBox(); | |||
private JavaBuildOptions javaBuildOptions; | |||
private JTextField characterEncoding; | |||
public JavaOtherOptionsPanel(JavaBuildOptions javaBuildOptions) { | |||
this.javaBuildOptions = javaBuildOptions; | |||
try { | |||
@@ -59,14 +59,14 @@ public class JavaOtherOptionsPanel extends OptionsPanel { | |||
public void loadOptions() throws IOException { | |||
createOtherContents(); | |||
} | |||
public void saveOptions() throws IOException { | |||
public void saveOptions() throws IOException { | |||
String text = characterEncoding.getText(); | |||
if (text != null ) { | |||
javaBuildOptions.setCharacterEncoding(text); | |||
} | |||
} | |||
} | |||
} | |||
private void jbInit() throws Exception { | |||
this.setLayout(new BorderLayout()); | |||
createBorders(); | |||
@@ -82,35 +82,35 @@ public class JavaOtherOptionsPanel extends OptionsPanel { | |||
label.setFont(new java.awt.Font("Dialog", 0, 11)); | |||
label.setText("Character encoding (will default to platform encoding)"); | |||
panel.add(label,BorderLayout.WEST); | |||
characterEncoding = new JTextField(); | |||
characterEncoding = new JTextField(); | |||
characterEncoding.setFont(new java.awt.Font("SansSerif", 0, 11)); | |||
characterEncoding.setMinimumSize(new Dimension(100, 21)); | |||
characterEncoding.setPreferredSize(new Dimension(150, 21)); | |||
panel.add(characterEncoding,BorderLayout.EAST); | |||
String option = (String) javaBuildOptions.getJavaBuildOptionsMap().get( | |||
JavaOptions.CHARACTER_ENCODING); | |||
if (option != null) { | |||
characterEncoding.setText(option); | |||
} | |||
otherBox.add(panel,null); | |||
otherPanel.add(otherBox); | |||
} | |||
private void createBorders() { | |||
otherEtchedBorder = BorderFactory.createEtchedBorder(Color.white, new Color(156, 156, 158)); | |||
otherTitleBorder = new TitledBorder(otherEtchedBorder, "Other Options"); | |||
otherCompoundBorder = BorderFactory.createCompoundBorder(otherTitleBorder, | |||
BorderFactory.createEmptyBorder(5, 5, 5, 5)); | |||
BorderFactory.createEmptyBorder(5, 5, 5, 5)); | |||
otherTitleBorder.setTitleFont(new java.awt.Font("Dialog", 0, 11)); | |||
} | |||
private void addBordersToPanel() { | |||
parentPanel = new JPanel(); | |||
parentPanel.setLayout(new BorderLayout()); | |||
otherPanel = new JPanel(); | |||
otherPanel.setBorder(otherCompoundBorder); | |||
parentPanel.add(otherPanel,BorderLayout.CENTER); |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -31,7 +31,7 @@ import javax.swing.JPopupMenu; | |||
import org.aspectj.ajde.Ajde; | |||
public class AJButtonMenuCombo extends JPanel { | |||
private static final long serialVersionUID = -4866207530403336160L; | |||
private JButton mainButton; | |||
@@ -39,13 +39,13 @@ public class AJButtonMenuCombo extends JPanel { | |||
private JPopupMenu menu; | |||
// private boolean depressable = false; | |||
private boolean isPressed = false; | |||
public AJButtonMenuCombo(String name, | |||
String toolTipText, | |||
Icon icon, | |||
public AJButtonMenuCombo(String name, | |||
String toolTipText, | |||
Icon icon, | |||
JPopupMenu menu, | |||
boolean depressable) { | |||
this.menu = menu; | |||
// this.depressable = depressable; | |||
mainButton = new JButton(); | |||
@@ -54,24 +54,24 @@ public class AJButtonMenuCombo extends JPanel { | |||
mainButton.setToolTipText(toolTipText); | |||
mainButton.setPreferredSize(new Dimension(22, 20)); | |||
mainButton.setMinimumSize(new Dimension(22, 20)); | |||
mainButton.setMaximumSize(new Dimension(22, 20)); | |||
mainButton.setMaximumSize(new Dimension(22, 20)); | |||
popupButton = new JButton(); | |||
popupButton.setIcon(Ajde.getDefault().getIconRegistry().getPopupIcon()); | |||
popupButton.setBorder(BorderFactory.createEmptyBorder()); | |||
popupButton.setToolTipText(toolTipText); | |||
popupButton.setPreferredSize(new Dimension(13, 20)); | |||
popupButton.setMinimumSize(new Dimension(13, 20)); | |||
popupButton.setMaximumSize(new Dimension(13, 20)); | |||
popupButton.setMaximumSize(new Dimension(13, 20)); | |||
PopupListener popupListener = new PopupListener(mainButton); | |||
if (depressable) { | |||
mainButton.addActionListener(new ButtonActionListener()); | |||
} else { | |||
mainButton.addMouseListener(popupListener); | |||
mainButton.addMouseListener(popupListener); | |||
} | |||
popupButton.addActionListener(new java.awt.event.ActionListener() { | |||
public void actionPerformed(ActionEvent e) { | |||
popupButton.setBorder(null); | |||
@@ -81,15 +81,15 @@ public class AJButtonMenuCombo extends JPanel { | |||
BorderUpdateListener borderUpdateListner = new BorderUpdateListener(); | |||
mainButton.addMouseListener(borderUpdateListner); | |||
popupButton.addMouseListener(borderUpdateListner); | |||
popupButton.addMouseListener(popupListener); | |||
this.setLayout(new BorderLayout()); | |||
this.add(mainButton, BorderLayout.CENTER); | |||
this.add(popupButton, BorderLayout.EAST); | |||
this.setMinimumSize(new Dimension(35, 20)); | |||
this.setMaximumSize(new Dimension(35, 20)); | |||
this.setMaximumSize(new Dimension(35, 20)); | |||
} | |||
class ButtonActionListener implements ActionListener { | |||
@@ -103,14 +103,14 @@ public class AJButtonMenuCombo extends JPanel { | |||
} | |||
} | |||
} | |||
class BorderUpdateListener extends MouseAdapter { | |||
public void mouseEntered(MouseEvent e) { | |||
popupButton.setBorder(AjdeWidgetStyles.RAISED_BEVEL_BORDER); | |||
mainButton.setBorder(AjdeWidgetStyles.RAISED_BEVEL_BORDER); | |||
} | |||
public void mouseExited(MouseEvent e) { | |||
popupButton.setBorder(AjdeWidgetStyles.DEFAULT_BORDER); | |||
if (isPressed) { | |||
@@ -140,7 +140,7 @@ public class AJButtonMenuCombo extends JPanel { | |||
menu.show(e.getComponent(), button.getX(), button.getY() + popupButton.getHeight()); | |||
} | |||
} | |||
public void setEnabled(boolean enabled) { | |||
mainButton.setEnabled(enabled); | |||
popupButton.setEnabled(enabled); |
@@ -3,9 +3,9 @@ | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v1.0 | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* http://www.eclipse.org/legal/epl-v10.html | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -80,14 +80,14 @@ class BrowserView extends JPanel { | |||
configs_comboBox.setRenderer(new ConfigsCellRenderer()); | |||
// configs_comboBox.addItemListener(new ItemListener() { | |||
// public void itemStateChanged(ItemEvent e) { | |||
// Ajde.getDefault().getConfigurationManager().setCurrConfigFile(lastSelectedConfig); | |||
// Ajde.getDefault().getConfigurationManager().setCurrConfigFile(lastSelectedConfig); | |||
// } | |||
// }); | |||
if (Ajde.getDefault().getBuildConfigManager().getAllBuildConfigFiles().size() > 0) { | |||
Ajde.getDefault().getBuildConfigManager().setActiveConfigFile((String)Ajde.getDefault().getBuildConfigManager().getAllBuildConfigFiles().get(0)); | |||
Ajde.getDefault().getBuildConfigManager().setActiveConfigFile((String)Ajde.getDefault().getBuildConfigManager().getAllBuildConfigFiles().get(0)); | |||
} | |||
jbInit(); | |||
fixButtonBorders(); | |||
views_splitPane.add(masterView, JSplitPane.TOP); |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -34,7 +34,7 @@ public class BrowserViewManager { | |||
// private boolean globalMode = true; | |||
// private boolean splitViewMode = false; | |||
// private IconRegistry icons; | |||
// | |||
// | |||
// private Stack backHistory = new Stack(); | |||
// private Stack forwardHistory = new Stack(); | |||
// private IProgramElement currNode = null; | |||
@@ -64,12 +64,12 @@ public class BrowserViewManager { | |||
pointcutWizard.setVisible(true); | |||
pointcutWizard.setLocation(Ajde.getDefault().getRootFrame().getX()+100, Ajde.getDefault().getRootFrame().getY()+100); | |||
} | |||
{ | |||
{ | |||
DECLARATION_VIEW_PROPERTIES = new GlobalViewProperties(StructureViewProperties.Hierarchy.DECLARATION); | |||
CROSSCUTTING_VIEW_PROPERTIES = new GlobalViewProperties(StructureViewProperties.Hierarchy.CROSSCUTTING); | |||
INHERITANCE_VIEW_PROPERTIES = new GlobalViewProperties(StructureViewProperties.Hierarchy.INHERITANCE); | |||
INHERITANCE_VIEW_PROPERTIES = new GlobalViewProperties(StructureViewProperties.Hierarchy.INHERITANCE); | |||
// CROSSCUTTING_VIEW_PROPERTIES.addRelation(IRelationship.Kind.ADVICE); | |||
// CROSSCUTTING_VIEW_PROPERTIES.addRelation(IRelationship.Kind.ADVICE); | |||
// CROSSCUTTING_VIEW_PROPERTIES.addRelation(IRelationship.Kind.ADVICE); | |||
@@ -83,7 +83,7 @@ public class BrowserViewManager { | |||
// INHERITANCE_VIEW_PROPERTIES.addRelation(InheritanceAssociation.IMPLEMENTS_RELATION); | |||
// INHERITANCE_VIEW_PROPERTIES.addRelation(InheritanceAssociation.INHERITS_MEMBERS_RELATION); | |||
// INHERITANCE_VIEW_PROPERTIES.addRelation(InheritanceAssociation.INHERITS_RELATION); | |||
DECLARATION_VIEW_PROPERTIES.setRelations(Ajde.getDefault().getStructureViewManager().getAvailableRelations()); | |||
CROSSCUTTING_VIEW = Ajde.getDefault().getStructureViewManager().createGlobalView(CROSSCUTTING_VIEW_PROPERTIES); |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -1,18 +1,18 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui.swing; | |||
import java.awt.event.ActionEvent; | |||
@@ -67,7 +67,7 @@ class BrowserViewTreeListener implements TreeSelectionListener, MouseListener { | |||
//if (AjdeUIManager.getDefault().getViewManager().isSplitViewMode()) { | |||
// AjdeUIManager.getDefault().getViewManager().showNodeInSlaveView((ProgramElementNode)currNode); | |||
//} | |||
} | |||
} | |||
// else if (currNode instanceof LinkNode) { | |||
//if (!AjdeUIManager.getDefault().getViewManager().isSplitViewMode()) { | |||
// AjdeUIManager.getDefault().getViewManager().showNodeInMasterView((LinkNode)currNode); | |||
@@ -87,7 +87,7 @@ class BrowserViewTreeListener implements TreeSelectionListener, MouseListener { | |||
&& e.getModifiers() != 4) { | |||
//AjdeUIManager.getDefault().getViewManager().showNodeInMasterView(((LinkNode)currNode).getProgramElementNode()); | |||
//AjdeUIManager.getDefault().getViewManager().showNodeInSlaveView(((LinkNode)currNode).getProgramElementNode()); | |||
} | |||
} | |||
// else if (currNode instanceof LinkNode) { | |||
// if (clickCount == 1) { | |||
// //AjdeUIManager.getDefault().getViewManager().showLink((LinkNode)currNode); | |||
@@ -118,7 +118,7 @@ class BrowserViewTreeListener implements TreeSelectionListener, MouseListener { | |||
JMenuItem showSourcesItem = new JMenuItem("Display sources", Ajde.getDefault().getIconRegistry().getStructureSwingIcon(IProgramElement.Kind.CODE)); | |||
showSourcesItem.setFont(new java.awt.Font("Dialog", 0, 11)); | |||
showSourcesItem.addActionListener(new AbstractAction() { | |||
private static final long serialVersionUID = 1L; | |||
public void actionPerformed(ActionEvent e) { | |||
@@ -150,7 +150,7 @@ class BrowserViewTreeListener implements TreeSelectionListener, MouseListener { | |||
JMenuItem generatePCD = new JMenuItem("Pointcut Wizard (alpha)...", Ajde.getDefault().getIconRegistry().getStructureSwingIcon(IProgramElement.Kind.POINTCUT)); | |||
generatePCD.setFont(new java.awt.Font("Dialog", 0, 11)); | |||
generatePCD.addActionListener(new AbstractAction() { | |||
private static final long serialVersionUID = 1L; | |||
public void actionPerformed(ActionEvent e) { |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -30,7 +30,7 @@ import org.aspectj.asm.IProgramElement; | |||
/** | |||
* Creates a popup menu that displays all the available .lst files. When one | |||
* is selected it runs a full build of files within the selected .lst file | |||
* in a separate thread. | |||
* in a separate thread. | |||
*/ | |||
public class BuildConfigPopupMenu extends JPopupMenu { | |||
@@ -1,20 +1,20 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui.swing; | |||
import java.awt.BorderLayout; | |||
import java.awt.Dimension; | |||
import java.awt.event.ActionEvent; | |||
@@ -44,7 +44,7 @@ public class BuildProgressPanel extends JPanel { | |||
JProgressBar compile_progressBar = new JProgressBar(); | |||
private boolean buildIsCancelled = false; | |||
public BuildProgressPanel() { | |||
try { | |||
jbInit(); | |||
@@ -134,7 +134,7 @@ public class BuildProgressPanel extends JPanel { | |||
void cancel_button_actionPerformed(ActionEvent e) { | |||
buildIsCancelled = true; | |||
} | |||
public boolean isCancelRequested() { | |||
return buildIsCancelled; | |||
} |
@@ -1,20 +1,20 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui.swing; | |||
import java.awt.Component; | |||
import javax.swing.JLabel; |
@@ -1,15 +1,15 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
@@ -21,7 +21,7 @@ import javax.swing.JDialog; | |||
import org.aspectj.ajde.Ajde; | |||
import org.aspectj.ajde.core.IBuildProgressMonitor; | |||
/** | |||
* This dialog box is open while ajc is compiling the system and displays | |||
* a corresponding progress bar. | |||
@@ -31,7 +31,7 @@ import org.aspectj.ajde.core.IBuildProgressMonitor; | |||
public class DefaultBuildProgressMonitor extends Thread implements IBuildProgressMonitor { | |||
public static final String PROGRESS_HEADING = "AspectJ Build"; | |||
private BuildProgressPanel progressDialog = null; | |||
private JDialog dialog = null; | |||
@@ -41,7 +41,7 @@ public class DefaultBuildProgressMonitor extends Thread implements IBuildProgres | |||
dialog.setContentPane(progressDialog); | |||
dialog.setSize(550, 120); | |||
try { | |||
dialog.setLocationRelativeTo(parent); | |||
dialog.setLocationRelativeTo(parent); | |||
} catch (NoSuchMethodError nsme) { | |||
// running on 1.3 | |||
} | |||
@@ -69,7 +69,7 @@ public class DefaultBuildProgressMonitor extends Thread implements IBuildProgres | |||
*/ | |||
public void finish(boolean wasFullBuild) { | |||
progressDialog.finish(); | |||
dialog.dispose(); | |||
dialog.dispose(); | |||
} | |||
public boolean isCancelRequested() { | |||
@@ -77,6 +77,6 @@ public class DefaultBuildProgressMonitor extends Thread implements IBuildProgres | |||
} | |||
public void setProgress(double percentDone) { | |||
progressDialog.setProgressBarVal((int) (percentDone*progressDialog.getProgressBarMax())); | |||
progressDialog.setProgressBarVal((int) (percentDone*progressDialog.getProgressBarMax())); | |||
} | |||
} |
@@ -1,14 +1,14 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* Xerox/PARC initial implementation | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* ******************************************************************/ | |||
@@ -1,18 +1,18 @@ | |||
/* ******************************************************************* | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* Copyright (c) 1999-2001 Xerox Corporation, | |||
* 2002 Palo Alto Research Center, Incorporated (PARC). | |||
* 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: | |||
* All rights reserved. | |||
* This program and the accompanying materials are made available | |||
* under the terms of the Eclipse Public License v 2.0 | |||
* which accompanies this distribution and is available at | |||
* https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt | |||
* | |||
* Contributors: | |||
* Xerox/PARC initial implementation | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* Helen Hawkins Converted to new interface (bug 148190) | |||
* ******************************************************************/ | |||
package org.aspectj.ajde.ui.swing; | |||
@@ -26,12 +26,12 @@ import org.aspectj.bridge.Message; | |||
/** | |||
* Used to ensure that a source line has been seeked to. Will repeatedly attempt | |||
* to seek to the line until this has succeeded. | |||
* | |||
* | |||
* @author Mik Kersten | |||
*/ | |||
public class GoToLineThread extends Thread { | |||
private EditorAdapter editorAdapter = null; | |||
private int lineNumber = 0; | |||
private String fileToSeekTo = ""; | |||
private boolean finished = false; | |||
@@ -62,7 +62,7 @@ public class GoToLineThread extends Thread { | |||
editorAdapter.showSourceLine(lineNumber, true); | |||
} | |||
}); | |||
} catch (Exception e) { | |||
} catch (Exception e) { | |||
Message msg = new Message("Could not seek to line.",IMessage.ERROR,e,null); | |||
Ajde.getDefault().getMessageHandler().handleMessage(msg); | |||
} |