*/
@Override
public boolean performFinish() {
- final String containerName = page.getContainerName();
+ final String appName = page.getAppName();
final String localtion = page.getFileName();
final IProject project = page.getProject();
final String tempFileName = page.getTemplateFileName();
IRunnableWithProgress op = new IRunnableWithProgress() {
public void run(IProgressMonitor monitor) throws InvocationTargetException {
try {
- doFinish(containerName, localtion, tempFileName, project, monitor);
+ doFinish(appName, localtion, tempFileName, project, monitor);
} catch (CoreException e) {
throw new InvocationTargetException(e);
} finally {
lblProject.setText("Project:");
containerText = new Text(container, SWT.BORDER | SWT.SINGLE);
+ containerText.setEnabled(false);
containerText.setEditable(false);
containerText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
*/
private void dialogChanged() {
IResource container = ResourcesPlugin.getWorkspace().getRoot()
- .findMember(new Path(getContainerName()));
+ .findMember(getProject().getFullPath());
String fileName = getFileName();
- if (getContainerName().length() == 0) {
- updateStatus("File container must be specified");
- return;
- }
-
- if (container == null
- || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
+ if (container == null || (container.getType() & (IResource.PROJECT | IResource.FOLDER)) == 0) {
updateStatus("File container must exist");
return;
}
return;
}
- IFolder folder = container.getProject().getFolder(fileName);
- IFile file = container.getProject().getFile(fileName);
+ IFolder folder = project.getFolder(fileName);
+ IFile file = project.getFile(fileName);
if ((folder != null && folder.exists()) || (file != null && file.exists())) {
updateStatus("Application path (or file) is already exits");
return;
return project;
}
- public String getContainerName() {
- return containerText.getText();
+ public String getAppName() {
+ return appNameText.getText();
}
public String getFileName() {