Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNitin Dahyabhai2016-02-27 02:17:47 +0000
committerNitin Dahyabhai2016-02-27 02:17:47 +0000
commit116810bbf2ad893cddb1990480cf3a55f15f3708 (patch)
treeabe4cb179989f5f578348f9f804d68e083a575cb
parenta229fdacb6ac069771e9907d6c41f6cf6b0d06f8 (diff)
downloadwebtools.common.snippets-116810bbf2ad893cddb1990480cf3a55f15f3708.tar.gz
webtools.common.snippets-116810bbf2ad893cddb1990480cf3a55f15f3708.tar.xz
webtools.common.snippets-116810bbf2ad893cddb1990480cf3a55f15f3708.zip
[183700] An empty category name and the template name can be madeHEADR3_8_2R3_8_1R3_8_0master
-rw-r--r--org.eclipse.wst.common.snippets/META-INF/MANIFEST.MF18
-rw-r--r--org.eclipse.wst.common.snippets/build.properties5
-rw-r--r--org.eclipse.wst.common.snippets/pom.xml90
-rw-r--r--org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsMessages.java4
-rw-r--r--org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsPluginResources.properties3
-rw-r--r--org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetDrawerEntryPage.java12
-rw-r--r--org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetTemplateEntryPage.java13
7 files changed, 84 insertions, 61 deletions
diff --git a/org.eclipse.wst.common.snippets/META-INF/MANIFEST.MF b/org.eclipse.wst.common.snippets/META-INF/MANIFEST.MF
index 9af51a4..4e54eaf 100644
--- a/org.eclipse.wst.common.snippets/META-INF/MANIFEST.MF
+++ b/org.eclipse.wst.common.snippets/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %Snippets_View.name
Bundle-SymbolicName: org.eclipse.wst.common.snippets; singleton:=true
-Bundle-Version: 1.2.200.qualifier
+Bundle-Version: 1.2.300.qualifier
Bundle-Activator: org.eclipse.wst.common.snippets.internal.SnippetsPlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -19,13 +19,13 @@ Export-Package: org.eclipse.wst.common.snippets.core,
org.eclipse.wst.common.snippets.ui
Import-Package: com.ibm.icu.util; version="3.8",
com.ibm.icu.text; version="3.8"
-Require-Bundle: org.eclipse.gef;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.ide;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui.workbench.texteditor;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.ui;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.jface.text;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.resources;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.runtime;bundle-version="[3.4.0,4.0.0)",
- org.eclipse.core.expressions;bundle-version="[3.4.0,4.0.0)"
+Require-Bundle: org.eclipse.gef;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.ui.ide;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.ui.workbench.texteditor;bundle-version="[3.10.0,4.0.0)",
+ org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
+ org.eclipse.jface.text;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.core.resources;bundle-version="[3.11.0,4.0.0)",
+ org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
+ org.eclipse.core.expressions;bundle-version="[3.5.0,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: J2SE-1.4
diff --git a/org.eclipse.wst.common.snippets/build.properties b/org.eclipse.wst.common.snippets/build.properties
index abebd47..1462fd2 100644
--- a/org.eclipse.wst.common.snippets/build.properties
+++ b/org.eclipse.wst.common.snippets/build.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
+# Copyright (c) 2004, 2016 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -20,6 +20,5 @@ bin.excludes = bin/**,\
temp.folder/**
src.includes = schema/,\
doc/,\
- javadoc.xml,\
- component.xml
+ javadoc.xml
source.. = src/
diff --git a/org.eclipse.wst.common.snippets/pom.xml b/org.eclipse.wst.common.snippets/pom.xml
index b5c42a8..4858690 100644
--- a/org.eclipse.wst.common.snippets/pom.xml
+++ b/org.eclipse.wst.common.snippets/pom.xml
@@ -1,46 +1,46 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- Copyright (c) 2012, 2013 Eclipse Foundation and others.
- All rights reserved. This program and the accompanying materials
- are made available under the terms of the Eclipse Distribution License v1.0
- which accompanies this distribution, and is available at
- http://www.eclipse.org/org/documents/edl-v10.php
-
- Contributors:
- Thanh Ha (Eclipse Foundation) - initial implementation
--->
-
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>org.eclipse.webtools.common</groupId>
- <artifactId>org.eclipse.webtools.common.snippets</artifactId>
- <version>3.6.0-SNAPSHOT</version>
- </parent>
-
- <groupId>org.eclipse.webtools.common</groupId>
- <artifactId>org.eclipse.wst.common.snippets</artifactId>
- <version>1.2.200-SNAPSHOT</version>
- <packaging>eclipse-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <configuration>
- <dependency-resolution>
- <extraRequirements>
- <requirement>
- <type>eclipse-plugin</type>
- <id>com.ibm.icu</id>
- <versionRange>0.0.0</versionRange>
- </requirement>
- </extraRequirements>
- </dependency-resolution>
- </configuration>
- </plugin>
- </plugins>
- </build>
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2012, 2016 Eclipse Foundation and others.
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Distribution License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/org/documents/edl-v10.php
+
+ Contributors:
+ Thanh Ha (Eclipse Foundation) - initial implementation
+-->
+
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.webtools.common</groupId>
+ <artifactId>org.eclipse.webtools.common.snippets</artifactId>
+ <version>3.6.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.eclipse.webtools.common</groupId>
+ <artifactId>org.eclipse.wst.common.snippets</artifactId>
+ <version>1.2.300-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <configuration>
+ <dependency-resolution>
+ <extraRequirements>
+ <requirement>
+ <type>eclipse-plugin</type>
+ <id>com.ibm.icu</id>
+ <versionRange>0.0.0</versionRange>
+ </requirement>
+ </extraRequirements>
+ </dependency-resolution>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project> \ No newline at end of file
diff --git a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsMessages.java b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsMessages.java
index 5c4bded..e2a3456 100644
--- a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsMessages.java
+++ b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsMessages.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2005 IBM Corporation and others. All rights reserved. This
+ * Copyright (c) 2005, 2016 IBM Corporation and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Eclipse Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/epl-v10.html
@@ -36,6 +36,8 @@ public class SnippetsMessages extends NLS {
public static String Variable_Name_3;
public static String Value_4;
public static String Name_5;
+
+ public static String NameCannotBeEmpty;
public static String Description_6;
public static String Default_Value_7;
public static String Remove_15;
diff --git a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsPluginResources.properties b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsPluginResources.properties
index fbabc17..978f7eb 100644
--- a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsPluginResources.properties
+++ b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/SnippetsPluginResources.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2004, 2009 IBM Corporation and others.
+# Copyright (c) 2004, 2016 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -26,6 +26,7 @@ Variable_Name_3=Variable Name
Value_4=Value
##
Name_5=Name
+NameCannotBeEmpty=The name cannot be empty
Description_6=Description
Default_Value_7=Default Value
Remove_15=Remove
diff --git a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetDrawerEntryPage.java b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetDrawerEntryPage.java
index e3d69ea..6a69b4f 100644
--- a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetDrawerEntryPage.java
+++ b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetDrawerEntryPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2011 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -402,4 +402,14 @@ public class SnippetDrawerEntryPage extends DrawerEntryPage {
refreshContentTypeText();
}
}
+
+ protected void handleNameChanged(String text) {
+ super.handleNameChanged(text);
+ if (text.length() < 1) {
+ getPageContainer().showProblem(SnippetsMessages.NameCannotBeEmpty);
+ }
+ else {
+ getPageContainer().clearProblem();
+ }
+ }
}
diff --git a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetTemplateEntryPage.java b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetTemplateEntryPage.java
index 1c4de6d..00bf96d 100644
--- a/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetTemplateEntryPage.java
+++ b/org.eclipse.wst.common.snippets/src/org/eclipse/wst/common/snippets/internal/ui/SnippetTemplateEntryPage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2009 IBM Corporation and others.
+ * Copyright (c) 2004, 2016 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -16,6 +16,7 @@ import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.common.snippets.core.ISnippetsEntry;
+import org.eclipse.wst.common.snippets.internal.SnippetsMessages;
import org.eclipse.wst.common.snippets.internal.editors.ISnippetEditor;
import org.eclipse.wst.common.snippets.internal.editors.VariableItemEditor;
import org.eclipse.wst.common.snippets.internal.palette.SnippetPaletteItem;
@@ -66,4 +67,14 @@ public class SnippetTemplateEntryPage extends DefaultEntryPage implements Modify
getPageContainer().clearProblem();
}
}
+
+ protected void handleNameChanged(String text) {
+ super.handleNameChanged(text);
+ if (text.length() < 1) {
+ getPageContainer().showProblem(SnippetsMessages.NameCannotBeEmpty);
+ }
+ else {
+ getPageContainer().clearProblem();
+ }
+ }
}

Back to the top