Bug 416075 - [Projects] Create project.json editor
Summary: [Projects] Create project.json editor
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: Editor (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 4.0 M2   Edit
Assignee: Malgorzata Janczarska CLA
QA Contact:
URL:
Whiteboard:
Keywords: noteworthy
Depends on: 416336
Blocks: 415338
  Show dependency tree
 
Reported: 2013-08-28 13:04 EDT by Malgorzata Janczarska CLA
Modified: 2013-09-24 11:29 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malgorzata Janczarska CLA 2013-08-28 13:04:35 EDT
project.json file needs to be opened in a graphical editor that would allow to edit the project properties.
Comment 1 Malgorzata Janczarska CLA 2013-08-28 13:25:30 EDT
Silenio, could you look at this proposition:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=Bug416075_Project_editor&id=a1e49ac9f44d8673871905fc2595fd5af2f01975

it creates a different TextView for project.json file. The projectView.js itself is not yet finished, but I would like to know your opinion about all other changes that add this extra view.
Comment 2 Malgorzata Janczarska CLA 2013-08-29 10:00:12 EDT
(In reply to comment #1)
> Silenio, could you look at this proposition:
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?h=Bug416075_Project_editor&id=a1e49ac9f44d8673871905fc2595fd5af2f01975

I guess I should move projectView.js from orion.client.editor to orion.client.ui.
Comment 3 Silenio Quarti CLA 2013-08-29 11:00:43 EDT
Hi Gosia, I do not think all editors should have the same API of TextView. Most functions in TextView only make sense for text editors.  We would be forcing every editor to have blank functions. I think we need to extract out the common functionality of Editor in a "superclass" and both the current Editor and the ProjectEditor would be subclasses.   I can see the inputManager, the text buffer and the dirty state as common portions. There might be more. There is a lot of refactoring necessary to get this done.

We should take a look how eclipse handles this.
Comment 4 Malgorzata Janczarska CLA 2013-08-29 11:49:47 EDT
(In reply to comment #3)
> Hi Gosia, I do not think all editors should have the same API of TextView.
I absolutely agree. Half of the functions in this view are empty, because there is no rulers etc although under the hood we still edit text (project.json file contents).
Another reason why we might use a different editor for project.json is that there are some actions that don't apply to the viewer I created, like "Go to Line".

Note that the ProjectEditor will be a part of the core Orion, so it will not need to be contributed by plugin. It will however apart from the contents of project.json need also its metadata.
Comment 5 Malgorzata Janczarska CLA 2013-08-29 11:51:53 EDT
Another example when we will probably need to to replace the editor is Bug 415897.
Comment 6 Malgorzata Janczarska CLA 2013-09-23 07:30:33 EDT
Editor created and running.
Comment 7 John Arthorne CLA 2013-09-24 11:26:08 EDT
This is marked fixed for M2, but as a user if I click on a project.json I still get a raw text editor. Do I need to do something special to turn this on?
Comment 8 Malgorzata Janczarska CLA 2013-09-24 11:29:27 EDT
Yes, this is a little twisty, because you get the project editor by clicking the folder that contains a project. Unfortunately to add the project editor for project.json file I need bug 416336 fixed first.