Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 262415 Details for
Bug 496024
Warn users when a .eslintrc file is defined for the project
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
496024.patch (text/plain), 7.74 KB, created by
Olivier Thomann
on 2016-06-13 12:34:02 EDT
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2016-06-13 12:34:02 EDT
Size:
7.74 KB
patch
obsolete
>diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js b/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >index 6b66579..fcaa361 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/settings/nls/root/messages.js >@@ -282,6 +282,6 @@ define({//Default message bundle > "editorTheme tag attribute": "Tag attribute", > "editorTheme selection background": "Selection background", > 'customizeTheme': 'Custom Style...', >- 'moreEditorSettings': 'Editor Settings...' >- >+ 'moreEditorSettings': 'Editor Settings...', >+ 'JavascriptSettingWarning' : '${0} Project settings are available: ${1}' > }); >diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.js >index 51569c8..af26e47 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.js >+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/pageLinksPlugin.js >@@ -70,16 +70,20 @@ define([ > order: 1000, // low priority > uriTemplate: "{+OrionHome}/edit/edit.html" > }); >- >- provider.registerService("orion.page.link", null, { >+ >+ provider.registerService("orion.page.link.related", null, { > name: widgetMessages["Settings"], > id: "orion.settings", > nls: "orion/widgets/nls/messages", > category: "settings", > order: 1000, // low priority >- uriTemplate: "{+OrionHome}/settings/settings.html" >+ validationProperties: [{ >+ source: "Parents[-1]:Location|Location", >+ variableName: "SettingsLocation" >+ }], >+ uriTemplate: "{+OrionHome}/settings/settings.html#{,SettingsLocation}" > }); >- >+ > // Links to an Editor view of current folder. This is only useful from non-Editor pages (eg Shell) > provider.registerService("orion.page.link.related", null, { > id: "orion.editFromMetadata", >diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/settings.css b/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >index 56f4731..0a52285 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >+++ b/bundles/org.eclipse.orion.client.ui/web/settings/settings.css >@@ -243,6 +243,10 @@ html[dir="rtl"] .setting-row { /* ACGC */ > padding: 10px; > } > >+.setting-info .core-sprite-warning { >+ color: #F0AD4E; >+} >+ > .setting-local-indicator { > cursor: pointer; > display: inline-block; >diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/settings.js b/bundles/org.eclipse.orion.client.ui/web/settings/settings.js >index ff4e77a..be0b702 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/settings/settings.js >+++ b/bundles/org.eclipse.orion.client.ui/web/settings/settings.js >@@ -67,7 +67,8 @@ define(['i18n!orion/settings/nls/messages', 'orion/bootstrap', 'orion/status', ' > settingsCore: core, > pageActions: "pageActions", //$NON-NLS-0$ > userClient: usersClient, >- settingsRegistry: settingsRegistry >+ settingsRegistry: settingsRegistry, >+ fileClient: fileClient > }; > > lib.node("categoriesTitle").textContent = messages["Categories"]; //$NON-NLS-1$ //$NON-NLS-0$ >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SettingsContainer.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SettingsContainer.js >index 3379903..2990b07 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SettingsContainer.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/settings/SettingsContainer.js >@@ -422,7 +422,8 @@ define([ > serviceRegistry: this.registry, > commandRegistry: this.commandService, > settings: settingsInCategory, >- title: title >+ title: title, >+ fileClient: this.fileClient > }); > }, > >@@ -459,8 +460,10 @@ define([ > var params = PageUtil.matchResourceParameters(); > if (params.category !== id) { > params.category = id; >+ var resource = params.resource; > delete params.resource; >- window.location = new URITemplate("#,{params*}").expand({ //$NON-NLS-0$ >+ window.location = new URITemplate("#{,resource,params*}").expand({ //$NON-NLS-0$ >+ resource: resource, > params: params > }); > } >diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js b/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js >index 0b4c8c8..e9fa3ec 100644 >--- a/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js >+++ b/bundles/org.eclipse.orion.client.ui/web/orion/settings/ui/PluginSettings.js >@@ -20,9 +20,12 @@ define([ > 'orion/widgets/input/SettingsSelect', > 'i18n!orion/settings/nls/messages', > 'orion/i18nUtil', >- 'orion/commands' >+ 'orion/commands', >+ 'orion/PageUtil', >+ 'orion/webui/littlelib', >+ 'orion/URITemplate' > ], function(mExplorer, mSection, Deferred, objects, mConfirmDialog, SettingsCheckbox, SettingsTextfield, >- SettingsSelect, messages, i18nUtil, Commands) { >+ SettingsSelect, messages, i18nUtil, Commands, PageUtil, lib, URITemplate) { > var Explorer = mExplorer.Explorer, > SelectionRenderer = mExplorer.SelectionRenderer, > Section = mSection.Section, >@@ -30,6 +33,7 @@ define([ > ConfirmDialog = mConfirmDialog.ConfirmDialog; > > var SECTION_HIDE = '/settings/sectionExpand'; //$NON-NLS-1$ >+ var editTemplate = new URITemplate("/edit/edit.html#{,resource,params*}"); //$NON-NLS-0$ > > /** > * @name orion.settings.ui.PropertyWidget >@@ -380,6 +384,7 @@ define([ > var commandRegistry = this.commandRegistry = options.commandRegistry; > this.settings = options.settings; > this.title = options.title; >+ this.fileClient = options.fileClient; > if (!options.parent || !options.serviceRegistry || !options.settings || !options.title) { > throw new Error('Missing required option'); //$NON-NLS-0$ > } >@@ -427,6 +432,7 @@ define([ > }, > destroy: function() { > this.explorer.destroy(); >+ this.destroyed = true; > }, > restore: function(pid) { > var deferreds = []; >@@ -453,6 +459,43 @@ define([ > } > }, > render: function(parent, serviceRegistry, settings, categoryTitle) { >+ if (settings && settings.length > 2 && "javascript" === settings[0].category) { >+ var pageParams = PageUtil.matchResourceParameters(); >+ this.fileClient.fetchChildren(pageParams.resource + "?depth=1").then(function(children) { >+ console.log("Render :" + this.destroyed); >+ if (!this.destroyed) { >+ children.some(function (child) { >+ if (child.Name === ".eslintrc") { >+ console.log("Creation: " + this.destroyed); >+ var infoText = document.createElement("div"); //$NON-NLS-0$ >+ infoText.classList.add("setting-info"); //$NON-NLS-0$ >+ infoText.textContent = messages.JavascriptSettingWarning; >+ var icon = document.createElement("span"); //$NON-NLS-0$ >+ icon.classList.add("core-sprite-warning"); //$NON-NLS-0$ >+ icon.classList.add("icon-inline"); //$NON-NLS-0$ >+ icon.classList.add("imageSprite"); //$NON-NLS-0$ >+ var link = document.createElement("a"); //$NON-NLS-0$ >+ link.href = editTemplate.expand({resource: child.Location}); >+ link.appendChild(document.createTextNode(child.Name)); >+ lib.processDOMNodes(infoText, [icon, link]); >+ try { >+ if (parent.firstChild) { >+ console.log("insert: " + this.destroyed); >+ parent.insertBefore(infoText, parent.firstChild); >+ } else { >+ console.log("append: " + this.destroyed); >+ parent.appendChild(infoText); >+ } >+ } catch(e) { >+ console.log(e); >+ } >+ return true; >+ } >+ }.bind(this)); >+ } >+ }.bind(this)); >+ >+ } > for (var i=0; i<settings.length; i++) { > var setting = settings[i]; > var sectionId = 'settings.section.'; //$NON-NLS-1$
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 496024
: 262415 |
262416