Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-ui-dev] close editor warning

jml,

There is currently no notification for when an editor is about to be 
closed.  However, you can use the IPartListener interface of 
IWorkbenchPage to track when an editor has been closed, and then close the 
related views.

Nick





jml <jml@xxxxxxxx>
Sent by: platform-ui-dev-admin@xxxxxxxxxxx
01/11/03 07:58 AM
Please respond to platform-ui-dev

 
        To:     platform-ui-dev@xxxxxxxxxxx
        cc: 
        Subject:        Re: [platform-ui-dev] close editor warning



Hi, me again.
Is there any way workaround this kind of usage?

Thanks
jml

jml wrote:
> What if I also have other non-text data structure associated with the 
> script?
> 
> I think to rephrase my request, it can be: Can we provide a mechanism 
> that allow another view/editor/process to unitlize the data structure 
> created by an open editor?
> 
> To support this, I want to get notification before the editor is closed, 

> so I can properly warn user that the editor is being used by another 
> view/editor/process. If the framework do not allow me to prevent the 
> editor being closed, at least it can give me a chance to stop that other 

> view/editor/process.
> 
> jml
> 
> 
> Nick_Edgar@xxxxxxxxxx wrote:
> 
>> The default text editor, and others using AbstractTextEditor such as 
>> the Java compilation unit editor, have a shared document model.
>> This allows the same file to be open in multiple windows, but they 
>> different EditorParts share the same underlying document.
>> To see how this works, look at IDocument, FileDocumentProvider and 
>> FileEditorInput.
>>
>> If you have other questions about this, the text team can answer them 
>> in the newsgroup.
>>
>> Nick
>>
>>
>>
>>
>>
>> jml <jml@xxxxxxxx>
>> Sent by: platform-ui-dev-admin@xxxxxxxxxxx
>> 01/06/03 09:38 PM
>> Please respond to platform-ui-dev
>>
>> 
>>         To:     platform-ui-dev@xxxxxxxxxxx
>>         cc:         Subject:        Re: [platform-ui-dev] close editor 
>> warning
>>
>>
>>
>> Hi, Nick, thanks for the reply.
>>
>> We have a very small scripting language, user can debug it. During 
>> debugging, we want to enable user to directly modify the script code 
>> inside the editor, and the debugger will always run the newest code. 
>> So our debugger use the memory of the editor not the saved files. To 
>> easy implementation, we want to force user to keep the editor open 
>> during the debug session -- or when user try to close the editor, give 
>> us a chance to also stop the debugger.
>>
>> BTW, we want to utilize the eclipse debug framework, but the framework 
>> allow the debug view to appear in any workbenchwindow, in our case, 
>> means user can open multiple editor of the same script in multiple 
>> workbenchwindow, thus multiple memory copy. How can I solve this? Or 
>> normally is there any other way dealing with this kind of problem?
>>
>> Thanks
>> jml
>>
>>
>>
>> Nick_Edgar@xxxxxxxxxx wrote:
>>
>>> jml,
>>>
>>> There is an existing feature request for this:
>>> http://dev.eclipse.org/bugs/show_bug.cgi?id=27466
>>>
>>> However, we currently have no plans to address this for 2.1.
>>> If you describe your specific use case for this in the PR, that would 
>>
>>
>> help
>>
>>> us consider whether this would be a useful feature.
>>>
>>> Thanks,
>>> Nick
>>>
>>>
>>>
>>>
>>>
>>>
>>> jml <jml@xxxxxxxx>
>>> Sent by: platform-ui-dev-admin@xxxxxxxxxxx
>>> 12/30/02 01:05 AM
>>> Please respond to platform-ui-dev
>>>
>>>
>>>        To:     "platform-ui-dev@xxxxxxxxxxx" 
>>
>>
>> <platform-ui-dev@xxxxxxxxxxx>
>>
>>>        cc:        Subject:        [platform-ui-dev] close editor 
warning
>>>
>>>
>>>
>>> Hi,
>>> Is there any plan in the 2.1 release to include the following feature:
>>>
>>> Give the editor a chance to popup some different warning dialog 
>>> before it is being closed -- or even let the editor to choose not to 
>>> be closed.
>>>
>>> I think this is a very useful feature to many plugins.
>>>
>>> jml
>>>
>>> _______________________________________________
>>> platform-ui-dev mailing list
>>> platform-ui-dev@xxxxxxxxxxx
>>> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
>>>
>>>
>>>
>>> _______________________________________________
>>> platform-ui-dev mailing list
>>> platform-ui-dev@xxxxxxxxxxx
>>> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
>>>
>>
>>
>> _______________________________________________
>> platform-ui-dev mailing list
>> platform-ui-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
>>
>>
>>
>> _______________________________________________
>> platform-ui-dev mailing list
>> platform-ui-dev@xxxxxxxxxxx
>> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
>>
> 
> _______________________________________________
> platform-ui-dev mailing list
> platform-ui-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/platform-ui-dev
> 

_______________________________________________
platform-ui-dev mailing list
platform-ui-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-ui-dev





Back to the top