Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 156330 Details for
Bug 244645
"New Java Class" option should automatically create a Java Project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Default MyAssignment project, no src or bin folders created, fixed
DefaultProjectVersion3-DoesNotCreateSrcBinFolders.txt (text/plain), 3.11 KB, created by
Miles Billsman
on 2010-01-17 12:42:26 EST
(
hide
)
Description:
Default MyAssignment project, no src or bin folders created, fixed
Filename:
MIME Type:
Creator:
Miles Billsman
Created:
2010-01-17 12:42:26 EST
Size:
3.11 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ide4edu.javalite.ui >Index: src/org/eclipse/ide4edu/javalite/ui/view/OpenNewLiteClassWizardAction.java >=================================================================== >RCS file: /cvsroot/technology/org.eclipse.ide4edu/javalite/plugins/org.eclipse.ide4edu.javalite.ui/src/org/eclipse/ide4edu/javalite/ui/view/OpenNewLiteClassWizardAction.java,v >retrieving revision 1.1 >diff -u -r1.1 OpenNewLiteClassWizardAction.java >--- src/org/eclipse/ide4edu/javalite/ui/view/OpenNewLiteClassWizardAction.java 4 Sep 2009 19:57:23 -0000 1.1 >+++ src/org/eclipse/ide4edu/javalite/ui/view/OpenNewLiteClassWizardAction.java 17 Jan 2010 16:46:59 -0000 >@@ -11,13 +11,20 @@ > *******************************************************************************/ > package org.eclipse.ide4edu.javalite.ui.view; > >+import java.net.URI; >+ >+import org.eclipse.core.resources.IProject; > import org.eclipse.core.resources.IWorkspaceRoot; > import org.eclipse.core.resources.ResourcesPlugin; > import org.eclipse.core.runtime.CoreException; >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.NullProgressMonitor; >+import org.eclipse.jdt.core.IJavaProject; >+import org.eclipse.jdt.core.JavaCore; > import org.eclipse.jdt.internal.ui.JavaPluginImages; >-import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; >+import org.eclipse.jdt.ui.PreferenceConstants; > import org.eclipse.jdt.ui.actions.AbstractOpenWizardAction; >-import org.eclipse.jface.dialogs.MessageDialog; >+import org.eclipse.jdt.ui.wizards.JavaCapabilityConfigurationPage; > import org.eclipse.jface.viewers.IStructuredSelection; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.ui.INewWizard; >@@ -73,13 +80,25 @@ > protected boolean doCreateProjectFirstOnEmptyWorkspace(Shell shell) { > IWorkspaceRoot workspaceRoot= ResourcesPlugin.getWorkspace().getRoot(); > if (workspaceRoot.getProjects().length == 0) { >- String title= NewWizardMessages.AbstractOpenWizardAction_noproject_title; >- String message= NewWizardMessages.AbstractOpenWizardAction_noproject_message; >- if (MessageDialog.openQuestion(shell, title, message)) { >- new OpenNewLiteJavaProjectWizardAction().run(); >- return workspaceRoot.getProjects().length != 0; >+ >+ // Set the preferences to not create src and bin folders when we >+ // automatically create a new project. >+ PreferenceConstants.getPreferenceStore().setValue(PreferenceConstants.SRCBIN_FOLDERS_IN_NEWPROJ, false); >+ >+ // Create the default assignment project >+ IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject("MyAssignment"); >+ URI locationURI = null; >+ IProgressMonitor monitor = new NullProgressMonitor(); >+ try { >+ JavaCapabilityConfigurationPage.createProject(project, locationURI, monitor); >+ JavaCapabilityConfigurationPage jcc = new JavaCapabilityConfigurationPage(); >+ IJavaProject jProject = JavaCore.create(project); >+ jcc.init(jProject, null, null, false); >+ jcc.configureJavaProject(null); >+ } catch (Exception e) { >+ return false; > } >- return false; >+ return true; > } > return true; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 244645
:
149235
|
149284
|
156322
| 156330