Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] CodeEdit - "Add to globals directive"

> You are the first person who does not want this kind of errors. Please open a bug in bugzilla. We will possibly end up with an API or settings config where you can modify all the js validation default options.

We are working on support for .eslintrc files (https://bugs.eclipse.org/bugs/show_bug.cgi?id=461228). This will allow devs to set all the rule severities in a JSON file that can be loaded by the JS tools to configure ESLint.

Michael Rennie

Inactive hide details for Libing Wang---08/12/2015 08:51:33 AM---Hi Gowrishankar: Unfortunately the answer is no, for the curreLibing Wang---08/12/2015 08:51:33 AM---Hi Gowrishankar: Unfortunately the answer is no, for the current version.

From: Libing Wang/Ottawa/IBM@IBMCA
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 08/12/2015 08:51 AM
Subject: Re: [orion-dev] CodeEdit - "Add to globals directive"
Sent by: orion-dev-bounces@xxxxxxxxxxx





Hi Gowrishankar:
Unfortunately the answer is no, for the current version.
Similar to https://wiki.eclipse.org/Orion/How_Tos/Code_Edit#How_to_iterate_all_the_errors_and_warnings, but hacky, please refer to the following snippet to achieve your goal.
var markerService = editorViewer.serviceRegistry.getService(editorViewer.problemsServiceID);
if(markerService) {
markerService._setProblems = function(problems) {
var problemsNew = problems.filter(function(problem) {
return (problem.id !== "no-undef-defined");
});
this.problems = problemsNew;
this.dispatchEvent({type:"problemsChanged", problems:problemsNew}); //$NON-NLS-0$
};
}

Please note that the problem.id you want to filter out is "no-undef-defined". You can easily add more filters by recognizing other problem ids by using the example in https://wiki.eclipse.org/Orion/How_Tos/Code_Edit#How_to_iterate_all_the_errors_and_warnings

The above solution is short term. We will figure out a long term solution as below but I do not think it will happen very shortly.


We do have this option and the default value is set to "show as error". In Orion IDE, there is a _javascript_ validation section in the user's settings page where users can set it to "ignore" or "as warning".


However the code edit widget has not yet integrated with the settings.
You are the first person who does not want this kind of errors. Please open a bug in bugzilla. We will possibly end up with an API or settings config where you can modify all the js validation default options.

Thanks,
Libing



From:
Gowrishankar Holalkere <gowrishankar.holalkere@xxxxxxxxxxxxxxxxx>
To:
Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date:
12/07/2015 03:59 PM
Subject:
[orion-dev] CodeEdit - "Add to globals directive"
Sent by:
orion-dev-bounces@xxxxxxxxxxx




Hello,
Is there a way to change the detault behavior of the displaying "Add to globals directive" button when hovering over the annotation for errors like "variable is undefined"? I would like to remove this option so that user is forced to explicitly declare the variable instead of clicking on the button and add to the globals directive.


Thanks

Gowrishankar Holalkere
| Sr. Development Manager, IT
Solutions Development - Variable Data Management
Retail Branding and Information Solutions | Avery Dennison
1700 West Park Drive, Suite 400, Westborough, MA 01581
508-948-3466 (office) | 508-308-7987 (mobile)
Gowrishankar.Holalkere@xxxxxxxxxxxxxxxxx




-------------------------------------------------------------------------------------------------------------
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
-------------------------------------------------------------------------------------------------------------

_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/orion-dev
_______________________________________________
orion-dev mailing list
orion-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/orion-dev


Back to the top