Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#387] Remove "SwagEdit" references from validation error and warning… #388

Merged
merged 4 commits into from
Sep 28, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion com.reprezen.swagedit.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ Require-Bundle: org.eclipse.ui,
org.slf4j.api;bundle-version="1.7.2"
Bundle-RequiredExecutionEnvironment: JavaSE-1.7
Bundle-ActivationPolicy: lazy
Export-Package: com.reprezen.swagedit.core.assist,
Export-Package: com.reprezen.swagedit.core,
com.reprezen.swagedit.core.assist,
com.reprezen.swagedit.core.assist.contexts,
com.reprezen.swagedit.core.assist.ext,
com.reprezen.swagedit.core.editor,
Expand Down
4 changes: 2 additions & 2 deletions com.reprezen.swagedit.core/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<extension
point="org.eclipse.ui.contexts">
<context
description="Context for SwagEdit"
description="Context for KaiZen Editor"
id="com.reprezen.swagedit.context"
name="SwagEdit"
name="KaiZen Editor"
parentId="org.eclipse.ui.textEditorScope">
</context>
</extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ protected void validate() {
}

protected void runValidate(final boolean onOpen) {
new SafeWorkspaceJob("Update SwagEdit validation markers") {
new SafeWorkspaceJob("Update KaiZen Editor validation markers") {

@Override
public IStatus doRunInWorkspace(IProgressMonitor monitor) throws CoreException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

/*
* Identical implementation of a BufferedRuleBasedScanner than YAMLScanner but makes
* use of SwagEdit PreferenceStore to set SwagEdit colors instead of YEdit colors.
* use of KaiZen Editor PreferenceStore to set KaiZen Editor colors instead of YEdit colors.
*
* This implementation is necessary due to the lack of possibility to override YAMLScanner
* usage of a preference store.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# ModelSolv, Inc. - initial API and implementation and/or initial documentation
###############################################################################

error_missing_reference= Invalid Reference - SwagEdit was unable to resolve the reference. \n\
error_missing_reference= Invalid Reference - Unable to resolve the reference. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
error_invalid_reference= Invalid Reference Syntax - The referenced path or URI may contain invalid characters. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
swagedit_wizard_title = Swagger Spec

# wizard
swagedit_wizard_description = This wizard creates a new Swagger Spec in YAML format, which can be opened in SwagEdit.
swagedit_wizard_description = This wizard creates a new Swagger Spec in YAML format, which can be opened in KaiZen Editor.

# errors
error_nullType = The null value is not allowed for type, did you mean the "null" string (quoted)?
Expand All @@ -22,7 +22,7 @@ error_additional_properties_not_allowed = object has properties %s which are not
error_required_properties = object has missing required properties %s
error_duplicate_keys = Duplicate key: the object has more than one property named %s
error_cannot_read_content = Unable to read content. It may be invalid YAML
error_missing_reference= Invalid Reference - SwagEdit was unable to resolve the reference. \n\
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The same here, it's only used in tests, we can eliminate it.

error_missing_reference= Invalid Reference - Unable to resolve the reference. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
error_invalid_reference= Invalid Reference Syntax - The referenced path or URI may contain invalid characters. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
Expand Down
2 changes: 1 addition & 1 deletion com.reprezen.swagedit.openapi3.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SwagEdit Tests
Bundle-Name: KaiZen Editor Tests
Bundle-SymbolicName: com.reprezen.swagedit.openapi3.tests
Bundle-Version: 0.8.0.qualifier
Fragment-Host: com.reprezen.swagedit.openapi3;bundle-version="0.8.0"
Expand Down
2 changes: 1 addition & 1 deletion com.reprezen.swagedit.openapi3/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
<target
id="com.reprezen.swagedit.openapi3.hyperlink.target"
name="SwagEdit OpenAPI v3">
name="KaiZen Editor OpenAPI v3">
<context type="org.eclipse.ui.texteditor.ITextEditor"/>
</target>
</extension>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public NewOpenApiV3SpecWizardPage(IStructuredSelection selection) {
super("SwagEditNewWizardPage", selection);
setTitle("OpenAPI v3 Spec");
setDescription(
"This wizard creates a new OpenAPI v3 Spec in YAML format, which can be opened in SwagEdit.");
"This wizard creates a new OpenAPI v3 Spec in YAML format, which can be opened in KaiZen Editor.");
setImageDescriptor(Activator.imageDescriptorFromPlugin(Activator.PLUGIN_ID, "icons/openAPI_64.png"));
setFileExtension(extension);
}
Expand Down
2 changes: 1 addition & 1 deletion com.reprezen.swagedit.repository/category.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
<feature url="features/com.reprezen.swagedit.feature_0.8.0.qualifier.jar" id="com.reprezen.swagedit.feature" version="0.8.0.qualifier">
<category name="com.reprezen.swagedit"/>
</feature>
<category-def name="com.reprezen.swagedit" label="SwagEdit"/>
<category-def name="com.reprezen.swagedit" label="KaiZen Editor"/>
</site>
2 changes: 1 addition & 1 deletion com.reprezen.swagedit.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: SwagEdit Tests
Bundle-Name: KaiZen Editor Tests
Bundle-SymbolicName: com.reprezen.swagedit.tests
Bundle-Version: 0.8.0.qualifier
Fragment-Host: com.reprezen.swagedit;bundle-version="0.8.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
package com.reprezen.swagedit.validation

import com.fasterxml.jackson.databind.JsonNode
import com.fasterxml.jackson.databind.ObjectMapper
import com.reprezen.swagedit.Messages
import com.reprezen.swagedit.editor.SwaggerDocument
import com.reprezen.swagedit.core.validation.Messages
import com.reprezen.swagedit.core.json.references.JsonReferenceValidator
import com.reprezen.swagedit.core.validation.SwaggerError
import com.reprezen.swagedit.editor.SwaggerDocument
import com.reprezen.swagedit.mocks.Mocks
import io.swagger.util.Yaml
import java.net.URI
import java.util.Map
import org.eclipse.core.resources.IMarker
import org.junit.Test

import static org.junit.Assert.*
import com.reprezen.swagedit.core.validation.SwaggerError

class ReferenceValidatorTest {

Expand Down Expand Up @@ -338,7 +338,7 @@ class ReferenceValidatorTest {
}

def asJson(String string) {
io.swagger.util.Yaml.mapper().readTree(string)
Yaml.mapper().readTree(string)
}

}
10 changes: 5 additions & 5 deletions com.reprezen.swagedit/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
<extension point="com.github.eclipsecolortheme.mapper">
<mapper
class="com.github.eclipsecolortheme.mapper.GenericMapper"
name="SwagEdit"
name="KaiZen Editor"
pluginId="com.reprezen.swagedit"
xml="resources/com.reprezen.swagedit.xml"/>
</extension>
Expand All @@ -152,7 +152,7 @@
point="org.eclipse.ui.workbench.texteditor.hyperlinkDetectorTargets">
<target
id="com.reprezen.swagedit.hyperlink.target"
name="SwagEdit">
name="KaiZen Editor">
<context type="org.eclipse.ui.texteditor.ITextEditor"/>
</target>
</extension>
Expand Down Expand Up @@ -184,14 +184,14 @@

<extension
point="org.eclipse.ui.themes">
<themeElementCategory label="SwagEdit" id="com.reprezen.swagedit.editor.presentation"/>
<themeElementCategory label="KaiZen Editor" id="com.reprezen.swagedit.editor.presentation"/>
<fontDefinition
categoryId="com.reprezen.swagedit.editor.presentation"
defaultsTo="org.eclipse.jface.textfont"
id="com.reprezen.swagedit.editor.textfont"
label="SwagEdit Text Font">
label="KaiZen Editor Text Font">
<description>
This font is used by Swagger editor.
This font is used by KaiZen Editor.
</description>
</fontDefinition>
</extension>
Expand Down
22 changes: 0 additions & 22 deletions com.reprezen.swagedit/src/com/reprezen/swagedit/Messages.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,28 +19,6 @@ public class Messages extends NLS {
// UI
public static String swagedit_wizard_title;
public static String swagedit_wizard_description;
public static String outline_proposal_local;
public static String outline_proposal_project;
public static String outline_proposal_workspace;

// errors
public static String error_nullType;
public static String error_typeNoMatch;
public static String error_notInEnum;
public static String error_additional_properties_not_allowed;
public static String error_required_properties;
public static String error_duplicate_keys;
public static String error_cannot_read_content;
public static String error_missing_reference;
public static String error_invalid_reference;
public static String error_array_items_should_be_object;

public static String error_array_missing_items;
public static String error_object_type_missing;
public static String error_type_missing;
public static String error_wrong_type;
public static String error_missing_properties;
public static String warning_simple_reference;


static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,4 @@
swagedit_wizard_title = Swagger Spec

# wizard
swagedit_wizard_description = This wizard creates a new Swagger Spec in YAML format, which can be opened in SwagEdit.

# errors
error_nullType = The null value is not allowed for type, did you mean the "null" string (quoted)?
error_typeNoMatch = value of type %s is not allowed, value should be of type %s
error_notInEnum = value %s is not allowed, value should be one of %s
error_additional_properties_not_allowed = object has properties %s which are not allowed
error_required_properties = object has missing required properties %s
error_duplicate_keys = Duplicate key: the object has more than one property named %s
error_cannot_read_content = Unable to read content. It may be invalid YAML
error_missing_reference= Invalid Reference - SwagEdit was unable to resolve the reference. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
error_invalid_reference= Invalid Reference Syntax - The referenced path or URI may contain invalid characters. \n\
The value must be a valid JSON Reference (for external references) or JSON Pointer (for local references), and must resolve to an object of the expected type.
error_array_missing_items=Invalid array definition, items type should be present
error_array_items_should_be_object=Invalid array definition, items should be an object
error_object_type_missing=Invalid definition, object type is missing
error_type_missing=Invalid definition, type is missing
error_wrong_type = Invalid type, should be object
error_missing_properties = Invalid type definition, object has a required field but is missing a properties field
warning_simple_reference = Simplified reference syntax is deprecated. The reference should be a valid JSON pointer.
error_array_missing_items= Invalid array definition, items type should be present
outline_proposal_local = Press '%s' to show elements only the from current file
outline_proposal_project = Press '%s' to show elements from the current project files
outline_proposal_workspace = Press '%s' to show elements from the current workspace files
swagedit_wizard_description = This wizard creates a new Swagger Spec in YAML format, which can be opened in KaiZen Editor.