forked from apache/netbeans
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NETBEANS-3587] Allows creating stand alone java file in favorites wi…
…ndow
- Loading branch information
1 parent
21691f5
commit 802736a
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
...ava.api.common/src/org/netbeans/modules/java/api/common/singlesourcefile/Description.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!DOCTYPE html> | ||
<!-- | ||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
<html> | ||
<head> | ||
<title>New Java File</title> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"> | ||
</head> | ||
<body> | ||
Creates a new Java file. | ||
</body> | ||
</html> |
42 changes: 42 additions & 0 deletions
42
...a.api.common/src/org/netbeans/modules/java/api/common/singlesourcefile/File.java.template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<#-- | ||
|
||
Licensed to the Apache Software Foundation (ASF) under one | ||
or more contributor license agreements. See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership. The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
|
||
--> | ||
<#assign licenseFirst = "/*"> | ||
<#assign licensePrefix = " * "> | ||
<#assign licenseLast = " */"> | ||
<#include "${project.licensePath}"> | ||
|
||
<#if package?? && package != ""> | ||
package ${package}; | ||
|
||
</#if> | ||
/** | ||
* | ||
* @author ${user} | ||
*/ | ||
public class ${name} { | ||
|
||
/** | ||
* @param args the command line arguments | ||
*/ | ||
public static void main(String args[]){ | ||
// TODO code application logic here | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
...va.api.common/src/org/netbeans/modules/java/api/common/singlesourcefile/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
@TemplateRegistration(folder = "Other", iconBase = JavaTemplates.JAVA_ICON, displayName = "#JAVAtemplate_displayName", content = "File.java.template", requireProject = false, targetName = "newJavaFile", description = "Description.html", scriptEngine = "freemarker", category = {"java-main-class"}) | ||
|
||
@Messages(value = "JAVAtemplate_displayName=Java File") | ||
package org.netbeans.modules.java.api.common.singlesourcefile; | ||
|
||
import org.netbeans.api.templates.TemplateRegistration; | ||
import org.netbeans.spi.java.project.support.ui.templates.JavaTemplates; | ||
import org.openide.util.NbBundle.Messages; |