Lines 44-49
Link Here
|
44 |
import java.io.IOException; |
44 |
import java.io.IOException; |
45 |
import org.netbeans.api.project.Project; |
45 |
import org.netbeans.api.project.Project; |
46 |
import org.netbeans.api.project.SourceGroup; |
46 |
import org.netbeans.api.project.SourceGroup; |
|
|
47 |
import org.netbeans.api.project.ui.OpenProjects; |
47 |
import org.netbeans.modules.project.uiapi.ProjectChooserFactory; |
48 |
import org.netbeans.modules.project.uiapi.ProjectChooserFactory; |
48 |
import org.netbeans.modules.project.uiapi.Utilities; |
49 |
import org.netbeans.modules.project.uiapi.Utilities; |
49 |
import org.netbeans.spi.project.ui.support.CommonProjectActions; |
50 |
import org.netbeans.spi.project.ui.support.CommonProjectActions; |
Lines 61-66
Link Here
|
61 |
public class Templates { |
62 |
public class Templates { |
62 |
|
63 |
|
63 |
private Templates() {} |
64 |
private Templates() {} |
|
|
65 |
|
66 |
private static final String SET_AS_MAIN = "setAsMain"; // NOI18N |
64 |
|
67 |
|
65 |
/** |
68 |
/** |
66 |
* Find the project selected for a custom template wizard iterator. |
69 |
* Find the project selected for a custom template wizard iterator. |
Lines 199-204
Link Here
|
199 |
wizardDescriptor.putProperty( ProjectChooserFactory.WIZARD_KEY_TARGET_NAME, targetName ); |
202 |
wizardDescriptor.putProperty( ProjectChooserFactory.WIZARD_KEY_TARGET_NAME, targetName ); |
200 |
} |
203 |
} |
201 |
} |
204 |
} |
|
|
205 |
|
206 |
/** |
207 |
* Checks whether a project wizard will set the main project. |
208 |
* (The default is false.) |
209 |
* @param wizardDescriptor a New Project wizard |
210 |
* @return true if it will set a main project |
211 |
* @since XXX |
212 |
*/ |
213 |
public static boolean getDefinesMainProject(WizardDescriptor wizardDescriptor) { |
214 |
return Boolean.TRUE.equals(wizardDescriptor.getProperty(SET_AS_MAIN)); |
215 |
} |
216 |
|
217 |
/** |
218 |
* Specify whether a project wizard will set the main project. |
219 |
* If so, and it {@linkplain org.openide.WizardDescriptor.InstantiatingIterator#instantiate returns} |
220 |
* at least one {@linkplain Project#getProjectDirectory project directory} to signal |
221 |
* that a project will be created, the first such project will be |
222 |
* {@linkplain OpenProjects#setMainProject set as the main project}. |
223 |
* @param wizardDescriptor a New Project wizard |
224 |
* @param definesMainProject true if it will set a main project |
225 |
* @since XXX |
226 |
*/ |
227 |
public static void setDefinesMainProject(WizardDescriptor wizardDescriptor, boolean definesMainProject) { |
228 |
wizardDescriptor.putProperty(SET_AS_MAIN, definesMainProject); |
229 |
} |
202 |
|
230 |
|
203 |
/** |
231 |
/** |
204 |
* @deprecated Use {@link #buildSimpleTargetChooser} instead. |
232 |
* @deprecated Use {@link #buildSimpleTargetChooser} instead. |