Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit862f1a8

Browse files
author
jossonsmith
committed
Merge with /trunks for bug-fix of refrenced projects' classpath bugs.
And also fix bugs that some launcher tabs are with border styles.
1 parent817a4b2 commit862f1a8

File tree

8 files changed

+81
-136
lines changed

8 files changed

+81
-136
lines changed

‎src/net/sf/j2s/ui/classpath/CompositeResources.java‎

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,6 @@ public boolean accept(File pathname) {
279279
}
280280
for (Iteratoriter =resources.iterator();iter.hasNext();) {
281281
Resourceres = (Resource)iter.next();
282-
if (!J2SCyclicProjectUtils.visit(res)) {
283-
continue;
284-
}
285282
if (resinstanceofCompositeResources) {
286283
CompositeResourcesc = (CompositeResources)res;
287284
buf.append(c.toJ2XString());
@@ -290,12 +287,12 @@ public boolean accept(File pathname) {
290287
}
291288
for (Iteratoriter =resources.iterator();iter.hasNext();) {
292289
Resourceres = (Resource)iter.next();
293-
if (!J2SCyclicProjectUtils.visit(res)) {
294-
continue;
295-
}
296290
if (resinstanceofContactedClasses) {
291+
if (!J2SCyclicProjectUtils.visit(res)) {
292+
continue;
293+
}
297294
ContactedClassesunit = (ContactedClasses)res;
298-
buf.append(unit.getAbsoluteFile().getAbsolutePath());
295+
buf.append(unit.toJ2XString());
299296
buf.append(',');
300297
}
301298
}
@@ -378,21 +375,21 @@ public String ignoredClassesString() {
378375
}
379376
for (Iteratoriter =resources.iterator();iter.hasNext();) {
380377
Resourceres = (Resource)iter.next();
381-
if (!J2SCyclicProjectUtils.visit(res)) {
382-
continue;
383-
}
384378
if (resinstanceofCompositeResources) {
379+
if (!J2SCyclicProjectUtils.visit(res)) {
380+
continue;
381+
}
385382
CompositeResourcesc = (CompositeResources)res;
386383
buf.append(c.ignoredClassesString());
387384
buf.append(',');
388385
}
389386
}
390387
for (Iteratoriter =abandonedResources.iterator();iter.hasNext();) {
391388
Resourceres = (Resource)iter.next();
392-
if (!J2SCyclicProjectUtils.visit(res)) {
393-
continue;
394-
}
395389
if (resinstanceofUnitClass) {
390+
if (!J2SCyclicProjectUtils.visit(res)) {
391+
continue;
392+
}
396393
UnitClassunit = (UnitClass)res;
397394
buf.append(unit.getClassName());
398395
buf.append(',');

‎src/net/sf/j2s/ui/launching/IJ2SLauchingConfiguration.java‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
publicinterfaceIJ2SLauchingConfiguration {
44

5-
publicstaticfinalStringRUN_IN_BACKGROUND ="run.in.background";
6-
publicstaticfinalStringINNER_CONSOLE ="inner.console";
75
publicstaticfinalStringFAST_VIEW_J2S_CONSOLE ="fast.view.j2s.console";
86
publicstaticfinalStringMAXIMIZE_J2S_CONSOLE ="maximize.j2s.console";
97

‎src/net/sf/j2s/ui/launching/J2SArgumentsTab.java‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2000,2005 IBM Corporation and others.
2+
* Copyright (c) 2000,2006 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -14,9 +14,9 @@
1414
importorg.eclipse.core.runtime.CoreException;
1515
importorg.eclipse.debug.core.ILaunchConfiguration;
1616
importorg.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
17-
importorg.eclipse.debug.ui.AbstractLaunchConfigurationTab;
1817
importorg.eclipse.debug.ui.ILaunchConfigurationDialog;
1918
importorg.eclipse.debug.ui.StringVariableSelectionDialog;
19+
importorg.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchTab;
2020
importorg.eclipse.jdt.internal.debug.ui.IJavaDebugHelpContextIds;
2121
importorg.eclipse.jdt.internal.debug.ui.JDIDebugUIPlugin;
2222
importorg.eclipse.jdt.internal.debug.ui.JavaDebugImages;
@@ -48,7 +48,7 @@
4848
* </p>
4949
* @since 2.0
5050
*/
51-
publicclassJ2SArgumentsTabextendsAbstractLaunchConfigurationTab {
51+
publicclassJ2SArgumentsTabextendsJavaLaunchTab {
5252

5353
// Program arguments widgets
5454
protectedLabelfPrgmArgumentsLabel;
@@ -80,7 +80,7 @@ protected WorkingDirectoryBlock createWorkingDirBlock() {
8080
*/
8181
publicvoidcreateControl(Compositeparent) {
8282
Fontfont =parent.getFont();
83-
Compositecomp =newComposite(parent,parent.getStyle());
83+
Compositecomp =newComposite(parent,SWT.NONE);
8484
GridLayoutlayout =newGridLayout(1,true);
8585
comp.setLayout(layout);
8686
comp.setFont(font);
@@ -96,7 +96,7 @@ public void createControl(Composite parent) {
9696
group.setLayout(layout);
9797
group.setLayoutData(newGridData(GridData.FILL_BOTH));
9898

99-
StringcontrolName = (LauncherMessages.JavaArgumentsTab__Program_arguments__5);//$NON-NLS-1$
99+
StringcontrolName = (LauncherMessages.JavaArgumentsTab__Program_arguments__5);
100100
group.setText(controlName);
101101

102102
fPrgmArgumentsText =newText(group,SWT.MULTI |SWT.WRAP |SWT.BORDER |SWT.V_SCROLL);
@@ -112,7 +112,7 @@ public void modifyText(ModifyEvent evt) {
112112
});
113113
ControlAccessibleListener.addListener(fPrgmArgumentsText,group.getText());
114114

115-
StringbuttonLabel =LauncherMessages.JavaArgumentsTab_5;//$NON-NLS-1$
115+
StringbuttonLabel =LauncherMessages.JavaArgumentsTab_5;
116116
ButtonpgrmArgVariableButton =createPushButton(group,buttonLabel,null);
117117
pgrmArgVariableButton.setLayoutData(newGridData(GridData.HORIZONTAL_ALIGN_END));
118118
pgrmArgVariableButton.addSelectionListener(newSelectionListener() {
@@ -175,7 +175,7 @@ public void initializeFrom(ILaunchConfiguration configuration) {
175175
//fVMArgumentsBlock.initializeFrom(configuration);
176176
fWorkingDirectoryBlock.initializeFrom(configuration);
177177
}catch (CoreExceptione) {
178-
setErrorMessage(LauncherMessages.JavaArgumentsTab_Exception_occurred_reading_configuration___15 +e.getStatus().getMessage());//$NON-NLS-1$
178+
setErrorMessage(LauncherMessages.JavaArgumentsTab_Exception_occurred_reading_configuration___15 +e.getStatus().getMessage());
179179
JDIDebugUIPlugin.log(e);
180180
}
181181
}
@@ -190,7 +190,7 @@ public void performApply(ILaunchConfigurationWorkingCopy configuration) {
190190
}
191191

192192
/**
193-
*Retuns the string in the text widget, or <code>null</code> if empty.
193+
*Returns the string in the text widget, or <code>null</code> if empty.
194194
*
195195
* @return text or <code>null</code>
196196
*/
@@ -206,7 +206,7 @@ protected String getAttributeValueFrom(Text text) {
206206
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
207207
*/
208208
publicStringgetName() {
209-
returnLauncherMessages.JavaArgumentsTab__Arguments_16;//$NON-NLS-1$
209+
returnLauncherMessages.JavaArgumentsTab__Arguments_16;
210210
}
211211

212212
/**
@@ -250,7 +250,7 @@ public Image getImage() {
250250
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
251251
*/
252252
publicvoidactivated(ILaunchConfigurationWorkingCopyworkingCopy) {
253-
// do nothing when activated
253+
fWorkingDirectoryBlock.initializeFrom(workingCopy);
254254
}
255255

256256
/* (non-Javadoc)
@@ -260,4 +260,3 @@ public void deactivated(ILaunchConfigurationWorkingCopy workingCopy) {
260260
// do nothing when deactivated
261261
}
262262
}
263-

‎src/net/sf/j2s/ui/launching/J2SConsoleOptionsTab.java‎

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
importorg.eclipse.debug.core.ILaunchConfiguration;
55
importorg.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
66
importorg.eclipse.debug.ui.AbstractLaunchConfigurationTab;
7+
importorg.eclipse.jdt.debug.ui.launchConfigurations.JavaLaunchTab;
78
importorg.eclipse.jdt.internal.debug.ui.JavaDebugImages;
89
importorg.eclipse.swt.SWT;
910
importorg.eclipse.swt.events.SelectionAdapter;
@@ -18,10 +19,6 @@
1819

1920
publicclassJ2SConsoleOptionsTabextendsAbstractLaunchConfigurationTab {
2021

21-
privateButtonbtnBackground;
22-
23-
privateButtonbtnInnerConsole;
24-
2522
privateButtonbtnFastView;
2623

2724
privateButtonbtnMaximize;
@@ -32,7 +29,7 @@ public J2SConsoleOptionsTab() {
3229

3330
publicvoidcreateControl(Compositeparent) {
3431
Fontfont =parent.getFont();
35-
Compositecomp =newComposite(parent,parent.getStyle());
32+
Compositecomp =newComposite(parent,SWT.NONE);
3633
GridLayoutlayout =newGridLayout(1,true);
3734
comp.setLayout(layout);
3835
comp.setFont(font);
@@ -50,24 +47,6 @@ public void createControl(Composite parent) {
5047
StringcontrolName ="Console UI Options";
5148
group.setText(controlName);
5249

53-
btnBackground =newButton(group,SWT.CHECK);
54-
btnBackground.setText("Run in background");
55-
btnBackground.addSelectionListener(newSelectionAdapter() {
56-
publicvoidwidgetSelected(SelectionEvente) {
57-
updateLaunchConfigurationDialog();
58-
}
59-
});
60-
btnBackground.setEnabled(false);
61-
62-
btnInnerConsole =newButton(group,SWT.CHECK);
63-
btnInnerConsole.setText("Contains inner console");
64-
btnInnerConsole.addSelectionListener(newSelectionAdapter() {
65-
publicvoidwidgetSelected(SelectionEvente) {
66-
updateLaunchConfigurationDialog();
67-
}
68-
});
69-
btnInnerConsole.setEnabled(false);
70-
7150
btnFastView =newButton(group,SWT.CHECK);
7251
btnFastView.setText("Make J2S console as fast view automatically");
7352
btnFastView.addSelectionListener(newSelectionAdapter() {
@@ -86,10 +65,6 @@ public void widgetSelected(SelectionEvent e) {
8665
}
8766

8867
publicvoidsetDefaults(ILaunchConfigurationWorkingCopyconfiguration) {
89-
configuration.setAttribute(IJ2SLauchingConfiguration.RUN_IN_BACKGROUND,
90-
true);
91-
configuration.setAttribute(IJ2SLauchingConfiguration.INNER_CONSOLE,
92-
true);
9368
configuration.setAttribute(IJ2SLauchingConfiguration.FAST_VIEW_J2S_CONSOLE,
9469
false);
9570
configuration.setAttribute(
@@ -98,10 +73,6 @@ public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
9873

9974
publicvoidinitializeFrom(ILaunchConfigurationconfiguration) {
10075
try {
101-
btnBackground.setSelection(configuration.getAttribute(
102-
IJ2SLauchingConfiguration.RUN_IN_BACKGROUND,true));
103-
btnInnerConsole.setSelection(configuration.getAttribute(
104-
IJ2SLauchingConfiguration.INNER_CONSOLE,true));
10576
btnFastView.setSelection(configuration.getAttribute(
10677
IJ2SLauchingConfiguration.FAST_VIEW_J2S_CONSOLE,false));
10778
btnMaximize.setSelection(configuration.getAttribute(
@@ -112,10 +83,6 @@ public void initializeFrom(ILaunchConfiguration configuration) {
11283
}
11384

11485
publicvoidperformApply(ILaunchConfigurationWorkingCopyconfiguration) {
115-
configuration.setAttribute(IJ2SLauchingConfiguration.RUN_IN_BACKGROUND,
116-
btnBackground.getSelection());
117-
configuration.setAttribute(IJ2SLauchingConfiguration.INNER_CONSOLE,
118-
btnInnerConsole.getSelection());
11986
configuration.setAttribute(IJ2SLauchingConfiguration.FAST_VIEW_J2S_CONSOLE,
12087
btnFastView.getSelection());
12188
configuration.setAttribute(
@@ -133,5 +100,16 @@ public Image getImage() {
133100
publicstaticImagegetClasspathImage() {
134101
returnJavaDebugImages.get(JavaDebugImages.IMG_OBJS_MONITOR);
135102
}
103+
104+
/* (non-Javadoc)
105+
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
106+
*/
107+
publicvoidactivated(ILaunchConfigurationWorkingCopyworkingCopy) {}
108+
109+
/* (non-Javadoc)
110+
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
111+
*/
112+
publicvoiddeactivated(ILaunchConfigurationWorkingCopyworkingCopy) {}
113+
136114

137115
}

‎src/net/sf/j2s/ui/launching/J2SGenerateHTMLOptionsTab.java‎

Lines changed: 11 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public J2SGenerateHTMLOptionsTab() {
3838

3939
publicvoidcreateControl(Compositeparent) {
4040
Fontfont =parent.getFont();
41-
Compositecomp =newComposite(parent,parent.getStyle());
41+
Compositecomp =newComposite(parent,SWT.NONE);
4242
GridLayoutlayout =newGridLayout(1,true);
4343
comp.setLayout(layout);
4444
comp.setFont(font);
@@ -74,63 +74,6 @@ public void modifyText(ModifyEvent evt) {
7474
updateLaunchConfigurationDialog();
7575
}
7676
});
77-
Compositec =newComposite(comp,parent.getStyle());
78-
layout =newGridLayout(4,false);
79-
c.setLayout(layout);
80-
gd =newGridData(GridData.FILL_BOTH);
81-
c.setLayoutData(gd);
82-
newLabel(c,SWT.NONE).setText("Generate System.out.*() by");
83-
ButtonbtnAlert =newButton(c,SWT.PUSH);
84-
btnAlert.setText("window.alert");
85-
btnAlert.addSelectionListener(newSelectionAdapter() {
86-
publicvoidwidgetSelected(SelectionEvente) {
87-
Stringstr ="<script type=\"text/javascript\">\r\n" +
88-
"System = {};\r\n" +
89-
"System.out = {};\r\n" +
90-
"System.err = {};\r\n" +
91-
"System.out.println = System.err.println = alert;\r\n" +
92-
"System.out.print = System.err.print = alert;\r\n" +
93-
"</script>";
94-
headHeaderText.setText(str);
95-
}
96-
});
97-
ButtonbtnWrite =newButton(c,SWT.PUSH);
98-
btnWrite.setText("document.write");
99-
btnWrite.addSelectionListener(newSelectionAdapter() {
100-
publicvoidwidgetSelected(SelectionEvente) {
101-
Stringstr ="<script type=\"text/javascript\">\r\n" +
102-
"System = {};\r\n" +
103-
"System.out = {};\r\n" +
104-
"System.err = {};\r\n" +
105-
"System.out.println = System.err.println = function (str) {\r\n" +
106-
"\tdocument.write (str +\"<br/>\");\r\n" +
107-
"};\r\n" +
108-
"System.out.print = System.err.print = function (str) {\r\n" +
109-
"\tdocument.write (str);\r\n" +
110-
"};\r\n" +
111-
"</script>";
112-
headHeaderText.setText(str);
113-
}
114-
});
115-
ButtonbtnInsert =newButton(c,SWT.PUSH);
116-
btnInsert.setText("document.body.appendChild");
117-
btnInsert.addSelectionListener(newSelectionAdapter() {
118-
publicvoidwidgetSelected(SelectionEvente) {
119-
Stringstr ="<script type=\"text/javascript\">\r\n" +
120-
"System = {};\r\n" +
121-
"System.out = {};\r\n" +
122-
"System.err = {};\r\n" +
123-
"System.out.println = System.err.println = function (str) {\r\n" +
124-
"\tdocument.body.appendChild (document.createTextNode (str));\r\n" +
125-
"\tdocument.body.appendChild (document.createElement (\"BR\"));\r\n" +
126-
"};\r\n" +
127-
"System.out.print = System.err.print = function (str) {\r\n" +
128-
"\tdocument.body.appendChild (document.createTextNode (str));\r\n" +
129-
"};\r\n" +
130-
"</script>";
131-
headHeaderText.setText(str);
132-
}
133-
});
13477

13578
newLabel(comp,SWT.NONE).setText("Tail of Header:");
13679
tailHeaderText =newText(comp,SWT.MULTI |SWT.WRAP |SWT.BORDER
@@ -244,5 +187,15 @@ public Image getImage() {
244187
publicstaticImagegetClasspathImage() {
245188
returnPlatformUI.getWorkbench().getSharedImages().getImage(ISharedImages.IMG_OBJ_FILE);
246189
}
190+
191+
/* (non-Javadoc)
192+
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#activated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
193+
*/
194+
publicvoidactivated(ILaunchConfigurationWorkingCopyworkingCopy) {}
195+
196+
/* (non-Javadoc)
197+
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#deactivated(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
198+
*/
199+
publicvoiddeactivated(ILaunchConfigurationWorkingCopyworkingCopy) {}
247200

248201
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp