|
Lines 1-10
Link Here
|
| 1 |
/********************************************************************** |
1 |
/********************************************************************** |
| 2 |
* Copyright (c) 2005, 2006 IBM Corporation and others. |
2 |
* Copyright (c) 2005, 2007 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
| 6 |
* http://www.eclipse.org/legal/epl-v10.html |
6 |
* http://www.eclipse.org/legal/epl-v10.html |
| 7 |
* $Id: JavaGenerator.java,v 1.15 2007/02/09 09:57:30 pnedelec Exp $ |
7 |
* $Id: JavaGenerator.java,v 1.14 2007/02/08 17:32:31 pnedelec Exp $ |
| 8 |
* |
8 |
* |
| 9 |
* Contributors: |
9 |
* Contributors: |
| 10 |
* IBM - Initial API and implementation |
10 |
* IBM - Initial API and implementation |
|
Lines 287-303
Link Here
|
| 287 |
|
287 |
|
| 288 |
// Package name |
288 |
// Package name |
| 289 |
String packageName = getPackageName(getTestSuite()); |
289 |
String packageName = getPackageName(getTestSuite()); |
| 290 |
if (packageName == null) { |
290 |
if (packageName == null) { |
| 291 |
status.addFatalError("No package specified by the test suite"); |
291 |
status.addFatalError("No package specified by the test suite"); |
| 292 |
} else { |
292 |
} else if (packageName.length() == 0) { |
| 293 |
IStatus st = JavaConventions.validatePackageName(packageName); |
293 |
//- Default package used: nothing to do |
| 294 |
if (st.getSeverity() != IStatus.OK) { |
294 |
}else { |
| 295 |
if (st.getSeverity() == IStatus.ERROR) { |
295 |
IStatus st = JavaConventions.validatePackageName(packageName); |
| 296 |
// Replace the diagnosis of JDT with something more explicit |
296 |
if (st.getSeverity() != IStatus.OK) { |
| 297 |
status.addFatalError(NLS.bind(CommonPluginMessages.E_CODEGEN_PACK_DIAG, st.getMessage())); |
297 |
if (st.getSeverity() == IStatus.ERROR) { |
| 298 |
} |
298 |
// Replace the diagnosis of JDT with something more explicit |
| 299 |
} |
299 |
status.addFatalError(NLS.bind(CommonPluginMessages.E_CODEGEN_PACK_DIAG, st.getMessage())); |
| 300 |
} |
300 |
} |
|
|
301 |
} |
| 302 |
} |
| 301 |
monitor.worked(1); |
303 |
monitor.worked(1); |
| 302 |
|
304 |
|
| 303 |
// Class name |
305 |
// Class name |