Bug 3939 - Can't open files from package view. (1GF6ABY)
Summary: Can't open files from package view. (1GF6ABY)
Status: RESOLVED WORKSFORME
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: All Linux
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Tod Creasey CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 4015 12570 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-10-10 23:03 EDT by Erich Gamma CLA
Modified: 2002-05-03 10:42 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 Erich Gamma CLA 2001-10-10 23:03:22 EDT
Create a J Project.
	Add swt.jar as a external jar
	Attach its source.
	
	Select a .class - Double click it -> A text file will open.
	Select a .properties file - > Double click it -> A text file will open.

	Select a .c file -> Nothing happens.

	We should either:
		- open the file editor.
		- should a dialog with a info message.
		- filter those files out of the package view.

NOTES:
EG (6/11/2001 10:27:34 AM)
	To do so register an editor for a .c file.
	Preferences->workbench->file editors->.c->Text editor

EJP (6/11/01 4:53:54 PM)
	That is inconsistent with Navigator, ie, if no editor is associated
	the DefaultTextEditor is opened.
	
EG (6/11/2001 11:00:52 AM)
	ack, reactivating PR. This would require workbench API to open
	the default editor.
Comment 1 Martin Aeschlimann CLA 2001-10-16 11:14:32 EDT
moved to 'active'
Comment 2 DJ Houghton CLA 2001-10-24 07:25:27 EDT
PRODUCT VERSION:
	Build 120 - jdk - linux.

Comment 3 Erich Gamma CLA 2001-11-10 13:32:41 EST
Requesting API from Platform UI for opening the default editor (open an editor 
without having to give an EditorID.
Moving to Platform/UI
Comment 4 Erich Gamma CLA 2001-11-11 11:45:12 EST
*** Bug 4015 has been marked as a duplicate of this bug. ***
Comment 5 Unknown User CLA 2001-11-22 16:05:47 EST
The following method on IWorkbenchPage opens an editor on the given file 
resource. 

public IEditorPart openEditor(IFile input) throws PartInitException;

An appropriate editor for the input is determined using a multistep process.

- The workbench editor registry is consulted to determine if an editor 
  extension has been registered for the file type.  If so, an 
  instance of the editor extension is opened on the file.  
- Next, the native operating system will be consulted to determine if a native
  editor exists for the file type.  If so, a new process is started
  and the native editor is opened on the file.
- If all else fails the file will be opened in a default text editor.

Will this do the job?
Comment 6 Erich Gamma CLA 2002-04-03 09:12:13 EST
*** Bug 12570 has been marked as a duplicate of this bug. ***
Comment 7 Tod Creasey CLA 2002-05-03 10:42:48 EDT
Works in build 20020502.