Can we reuse system dialogs: smartCompletion

In the MiniWiki plugin, I want to provide smartcompletion for anchors names.
=> I need the same dialog, with the same look and behaviour (Ctrl-Q would be nice), but I would load it with external data.

Is it accessible through the openApi (if it is, a code snippet or hint would be nice),

Alain

19 comments

Alain Ravet wrote:

In the MiniWiki plugin, I want to provide smartcompletion for anchors names.
=> I need the same dialog, with the same look and behaviour (Ctrl-Q would be nice), but I would load it with external data.

Is it accessible through the openApi (if it is, a code snippet or hint would be nice),

Alain

Nope for the moment unfortunately.

--
Maxim Shafirov
JetBrains Inc.
http://www.jetbrains.com
"Develop with pleasure!"

0

I have a related question: can the smartcomplete dialog/widget be used
in the typical fashion (e.g. providing completion for Java types from
project classpath)?

I'd like to provide a more convenient editing experience for some
specific XML document type.
A number of element and attribute values of this XML format refer to
Java types (e.g. FQNs).

I'd like to provide smart completion for these FQN values in the XML
editor, based on knowledge of the XML format semantics.
For instance: the FQN value of attribute "class" of element "foo" must
refer to a class implementing the Java iterface "IFooOperation".

Any hints where to look?

Maxim Shafirov (JetBrains) wrote:

Alain Ravet wrote:

>> In the MiniWiki plugin, I want to provide smartcompletion for anchors
>> names.
>> => I need the same dialog, with the same look and behaviour (Ctrl-Q
>> would be nice), but I would load it with external data.
>>
>> Is it accessible through the openApi (if it is, a code snippet or
>> hint would be nice),
>>
>> Alain


Nope for the moment unfortunately.

0

Hi,

We will include this capability for Irida, please, look in following
tracker request
http://www.intellij.net/tracker/idea/viewSCR?publicId=36908

Taras Tielkes wrote:

I have a related question: can the smartcomplete dialog/widget be used
in the typical fashion (e.g. providing completion for Java types from
project classpath)?

I'd like to provide a more convenient editing experience for some
specific XML document type.
A number of element and attribute values of this XML format refer to
Java types (e.g. FQNs).

I'd like to provide smart completion for these FQN values in the XML
editor, based on knowledge of the XML format semantics.
For instance: the FQN value of attribute "class" of element "foo" must
refer to a class implementing the Java iterface "IFooOperation".

Any hints where to look?

Maxim Shafirov (JetBrains) wrote:

>> Alain Ravet wrote:
>>
>>> In the MiniWiki plugin, I want to provide smartcompletion for
>>> anchors names.
>>> => I need the same dialog, with the same look and behaviour (Ctrl-Q
>>> would be nice), but I would load it with external data.
>>>
>>> Is it accessible through the openApi (if it is, a code snippet or
>>> hint would be nice),
>>>
>>> Alain
>>
>>
>> Nope for the moment unfortunately.
>>


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hi Maxim,

Could you confirm the issue ID? I can't find 36908 in the tracker.

Maxim Mossienko wrote:

Hi,

We will include this capability for Irida, please, look in following
tracker request
http://www.intellij.net/tracker/idea/viewSCR?publicId=36908

0

Hi,

Please, try another time.

Taras Tielkes wrote:

Hi Maxim,

Could you confirm the issue ID? I can't find 36908 in the tracker.

Maxim Mossienko wrote:

>> Hi,
>>
>> We will include this capability for Irida, please, look in following
>> tracker request
>> http://www.intellij.net/tracker/idea/viewSCR?publicId=36908


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hi,

Sure, your particular issue on how to support plugin supplied completions.

Dmitry Kashin wrote:

Is it http://www.intellij.net/tracker/idea/viewSCR?publicId=36162 ?



--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

The URL supplied gives me an error message:
-


ITN Error
An error occured processing your request. If this problem persists,
please contact the webmaster or administrator of this site.
-


Error summary:
Jive Forums Error Summary
-


Jive Forums Version: 2.6.1
-


Stack Trace:

javax.servlet.jsp.JspException: Unhandled exception thrown from
/WEB-INF/tracker.jsp/thread.jsp:166 at
jrun.jsp.tags.RequestDispatchTag.doEndTag(RequestDispatchTag.java:51)
at
jrun__WEB2dINF__tracker2ejsp__form22ejsp1e._jspService(jrun__WEB2dINF__tracker2ejsp__form22ejsp1e.java:433)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at
jrun.jsp.JSPServlet.service(JSPServlet.java:106) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:414)
at
jrun.servlet.JRunRequestDispatcher.include(JRunRequestDispatcher.java:348)
at
com.intellij.itn.tracker.http.ItnInternalResourceView.renderMergedOutputModel(ItnInternalResourceView.java:42)
at
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:208)
at
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:516)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:415)
at
com.intellij.itn.tracker.http.ItnDispatcherServlet.doService(ItnDispatcherServlet.java:128)
at
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:313)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:289)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172) at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
-



Maxim Mossienko wrote:

Hi,

Please, try another time.

Taras Tielkes wrote:

>> Hi Maxim,
>>
>> Could you confirm the issue ID? I can't find 36908 in the tracker.
>>
>> Maxim Mossienko wrote:
>>
>>> Hi,
>>>
>>> We will include this capability for Irida, please, look in following
>>> tracker request
>>> http://www.intellij.net/tracker/idea/viewSCR?publicId=36908


0

Hi,

The visibility of the tracker request was changed, I believe there is
some cache problem. Please, try again some time later.

Taras Tielkes wrote:

The URL supplied gives me an error message:
------------------------------
ITN Error
An error occured processing your request. If this problem persists,
please contact the webmaster or administrator of this site.
------------------------------
Error summary:
Jive Forums Error Summary
--------------------------------------------------------------------------------

Jive Forums Version: 2.6.1
--------------------------------------------------------------------------------

Stack Trace:

javax.servlet.jsp.JspException: Unhandled exception thrown from
/WEB-INF/tracker.jsp/thread.jsp:166 at
jrun.jsp.tags.RequestDispatchTag.doEndTag(RequestDispatchTag.java:51) at
jrun__WEB2dINF__tracker2ejsp__form22ejsp1e._jspService(jrun__WEB2dINF__tracker2ejsp__form22ejsp1e.java:433)
at jrun.jsp.runtime.HttpJSPServlet.service(HttpJSPServlet.java:43) at
jrun.jsp.JSPServlet.service(JSPServlet.java:106) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invokeNext(JRunRequestDispatcher.java:414)
at
jrun.servlet.JRunRequestDispatcher.include(JRunRequestDispatcher.java:348)
at
com.intellij.itn.tracker.http.ItnInternalResourceView.renderMergedOutputModel(ItnInternalResourceView.java:42)
at
org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:208)
at
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:516)
at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:415)
at
com.intellij.itn.tracker.http.ItnDispatcherServlet.doService(ItnDispatcherServlet.java:128)
at
org.springframework.web.servlet.FrameworkServlet.serviceWrapper(FrameworkServlet.java:313)
at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:289)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at
jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:106) at
jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at
jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:241)
at
jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:527)
at jrun.servlet.http.WebService.invokeRunnable(WebService.java:172)
at
jrunx.scheduler.ThreadPool$DownstreamMetrics.invokeRunnable(ThreadPool.java:348)
at
jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:451)
at
jrunx.scheduler.ThreadPool$UpstreamMetrics.invokeRunnable(ThreadPool.java:294)
at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
--------------------------------------------------------------------------------


Maxim Mossienko wrote:

>> Hi,
>>
>> Please, try another time.
>>
>> Taras Tielkes wrote:
>>
>>> Hi Maxim,
>>>
>>> Could you confirm the issue ID? I can't find 36908 in the tracker.
>>>
>>> Maxim Mossienko wrote:
>>>
>>>> Hi,
>>>>
>>>> We will include this capability for Irida, please, look in following
>>>> tracker request
>>>> http://www.intellij.net/tracker/idea/viewSCR?publicId=36908
>>
>>
>>
>>


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hi Maxim,

The issue is still inaccessible for me.

Maxim Mossienko wrote:

Hi,

The visibility of the tracker request was changed, I believe there is
some cache problem. Please, try again some time later.

0

Maxim,

The issue is still inaccessible as of 21-12 - visiting the URL still
triggers an error.

Will this API functionality be openen up for the Irida release?

Taras Tielkes wrote:

Hi Maxim,

The issue is still inaccessible for me.

Maxim Mossienko wrote:

>> Hi,
>>
>> The visibility of the tracker request was changed, I believe there is
>> some cache problem. Please, try again some time later.

0

Hi,

-


Till resolve of technical problems----



Tracker Request # 36908 Submitted on Jul 24, 2004 20:54 MSD
by: Maxim Shafirov
(3)Edit (6)Fixed Need to Verify (8)Duplicate Vote for
this request ( my votes 0 , total votes 0 )
Title: Ability to specify java-like references in XML
Developer: Maxim Mossienko Priority: Normal
Type: Feature Planned for Version: Irida
Subsystem: XML Support State: Open
Build:
OS: ]]>
Estimated Time (hours): 0.0
Visibility: Public Spent Time (hours): 0.0
Description:
Possibly by adding meta-annotations do DTDs and schemas. Could be some
hardcoded variants like classpath-relative filepath, absolute filepath,
webroot relative filepath, java class name, EJB name etc.

Taras Tielkes wrote:

Maxim,

The issue is still inaccessible as of 21-12 - visiting the URL still
triggers an error.

Will this API functionality be openen up for the Irida release?

Taras Tielkes wrote:

>> Hi Maxim,
>>
>> The issue is still inaccessible for me.
>>
>> Maxim Mossienko wrote:
>>
>>> Hi,
>>>
>>> The visibility of the tracker request was changed, I believe there is
>>> some cache problem. Please, try again some time later.


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Hi,

This could be a really useful enhancement for the typical J2EE developer.

1) Will this be linked to the inspection tool, providing meta-validation?

2) I assume the metadata will be used to provide more
"SmartCompletion"-like functionality inside the XML editor. Is this correct?

3) If (2) is true, will the be a OpenAPI service-provider interface to
augment or replace the metadata provider?

4) Any idea at what point implementation of this functionality will be
visible in EAP?


Maxim Mossienko wrote:

Hi,

--------Till resolve of technical problems---------------

Tracker Request # 36908 Submitted on Jul 24, 2004 20:54 MSD
by: Maxim Shafirov
(3)Edit (6)Fixed Need to Verify (8)Duplicate Vote for
this request ( my votes 0 , total votes 0 )
Title: Ability to specify java-like references in XML
Developer: Maxim Mossienko Priority: Normal
Type: Feature Planned for Version: Irida
Subsystem: XML Support State: Open
Build:
OS: <any>
Estimated Time (hours): 0.0
Visibility: Public Spent Time (hours): 0.0
Description:
Possibly by adding meta-annotations do DTDs and schemas. Could be some
hardcoded variants like classpath-relative filepath, absolute filepath,
webroot relative filepath, java class name, EJB name etc.

0

Hi,

- If some provider will provide references to files,classes,methods, etc
then validation, navigation, completion and, probably, documentation
support becomes available.
- Each reference provider has its own range of elements that it is aware
of. By this reason we do not expect much intersection for different
providers yet.
- We have the reference provider machinery hardcoded some years ago
(e.g. in web.xml / ejb-jar.xml), initial support for annotations will be
for HTML (, ]]></span>, etc) late in January<br/><br/>Taras Tielkes wrote:</p><blockquote level="1"><p>Hi,<br/><br/>This could be a really useful enhancement for the typical J2EE developer.<br/><br/>1) Will this be linked to the inspection tool, providing meta-validation?<br/><br/>2) I assume the metadata will be used to provide more <br/>"SmartCompletion"-like functionality inside the XML editor. Is this <br/>correct?<br/><br/>3) If (2) is true, will the be a OpenAPI service-provider interface to <br/>augment or replace the metadata provider?<br/><br/>4) Any idea at what point implementation of this functionality will be <br/>visible in EAP?<br/><br/><br/>Maxim Mossienko wrote:<br/></p></blockquote><p>&gt;&gt; Hi,<br/>&gt;&gt;<br/>&gt;&gt; -</p><hr originalText="---------"/><p>Till resolve of technical problems----</p><hr originalText="------------"/><p>&gt;&gt;<br/>&gt;&gt; Tracker Request # 36908 Submitted on Jul 24, 2004 20:54 MSD<br/>&gt;&gt; by: Maxim Shafirov<br/>&gt;&gt; (3)Edit (6)Fixed Need to Verify (8)Duplicate Vote for <br/>&gt;&gt; this request ( my votes 0 , total votes 0 )<br/>&gt;&gt; Title: Ability to specify java-like references in XML<br/>&gt;&gt; Developer: Maxim Mossienko Priority: Normal<br/>&gt;&gt; Type: Feature Planned for Version: Irida<br/>&gt;&gt; Subsystem: XML Support State: Open<br/>&gt;&gt; Build: OS: <span ><![CDATA[<any> Estimated Time >> (hours): 0.0 >> Visibility: Public Spent Time (hours): 0.0 >> Description: >> Possibly by adding meta-annotations do DTDs and schemas. Could be some >> hardcoded variants like classpath-relative filepath, absolute >>]]></span> filepath, webroot relative filepath, java class name, EJB name etc.<br/><br/><br/>-- <br/>Best regards,<br/> Maxim Mossienko<br/>IntelliJ Labs / JetBrains Inc.<br/><a href="http://www.intellij.com" rel="nofollow">http://www.intellij.com</a><br/>"Develop with pleasure!"<br/></p>

0

Hello Maxim,

I presume the metadata completion provided by Irida will be configured through
XML. Is that correct?

Do you plan on providing OpenAPI for custom metadata providers in the Irida
release?

What I have in mind is '3-layer' completion assistance for some XML/Java
configuration format:
1) Basic element and attribute completion from DTD/Schema (provided by IntelliJ)
2) Further FQN attribute completion from user-configured metadata (provided
by IntelliJ)
3) Specific attribute completion provided by my plugin.

My plugin would walk the XML PSI tree from the current caret location and
collect data.
In addition it would gather other required data from the Java classes in
the project classpath and some configuration files.

Do you think such a scenario will be supported in Irida?

Thanks

Hi,

- If some provider will provide references to files,classes,methods,
etc
then validation, navigation, completion and, probably, documentation
support becomes available.
- Each reference provider has its own range of elements that it is
aware
of. By this reason we do not expect much intersection for different
providers yet.
- We have the reference provider machinery hardcoded some years ago
(e.g. in web.xml / ejb-jar.xml), initial support for annotations will
be
for HTML (<A|LINK href="">, <SCRIPT | IMAGE src="">, etc) late in
January



0

Hi,

Yes, there is a plan to support metadata providers in Irida.
Actually the schema is two level: some built-in one and metadata
provider based. The latter includes: a) provider that build it from user
specified annotations b) plugin based ones

Taras Tielkes wrote:

Hello Maxim,

I presume the metadata completion provided by Irida will be configured
through XML. Is that correct?

Do you plan on providing OpenAPI for custom metadata providers in the
Irida release?

What I have in mind is '3-layer' completion assistance for some XML/Java
configuration format:
1) Basic element and attribute completion from DTD/Schema (provided by
IntelliJ)
2) Further FQN attribute completion from user-configured metadata
(provided by IntelliJ)
3) Specific attribute completion provided by my plugin.

My plugin would walk the XML PSI tree from the current caret location
and collect data.
In addition it would gather other required data from the Java classes in
the project classpath and some configuration files.

Do you think such a scenario will be supported in Irida?

Thanks

>> Hi,
>>
>> - If some provider will provide references to files,classes,methods,
>> etc
>> then validation, navigation, completion and, probably, documentation
>> support becomes available.
>> - Each reference provider has its own range of elements that it is
>> aware
>> of. By this reason we do not expect much intersection for different
>> providers yet.
>> - We have the reference provider machinery hardcoded some years ago
>> (e.g. in web.xml / ejb-jar.xml), initial support for annotations will
>> be
>> for HTML (, , etc) late in >>]]></span> January</p><blockquote level="1"><p><br/></p></blockquote><p><br/><br/>-- <br/>Maxim Mossienko<br/>JetBrains, Inc<br/><a href="http://www.jetbrains.com" rel="nofollow">http://www.jetbrains.com</a><br/>"Develop with pleasure!"<br/></p>

0

Hello Maxim,

Are you planning to support the concept of javabean properties in the metadata?

For example, consider some imaginary XML configuration format:

...
.... ]]>
...
class MyBean
{
public String getExample()
{
...
}
}
...

The semantics of the example above don't really matter. You could also take
an Hibernate or Struts configuration file.

My question is: will the planned metadata annotation be able to define (for
above example) the following?
-the attribute 'name' of element 'field' refers to the name of a javabean
property
-the Java class to check for properties is defined by attribute 'class' of
grandparent element 'definition'
-the attribute should be getter with a protection level of at least
private (configurable in schema metadata)

Most of the content of 'popular' XML configuration for Java frameworks consists
of repeating fragments concerning property definition or initialization.
For instance, look at: hibernate, spring, struts.

In most of these formats, the relation between an element referring to a
class FQN and elements referring the javabean properties of the referenced
class are pretty straightforward (the latter usually being child of grandchild
elements of the first).

Having such semantics in the metadata annotation would enable:
-attribute autocomplete for JavaBean property names on specific elements
-a better "find references"
-a robust "refactor->rename" when dealing with property names (for instance
Hibernate beans)

Any plans for the Irida functionality to support this?

Thanks,

Taras


Yes, there is a plan to support metadata providers in Irida.
Actually the schema is two level: some built-in one and metadata
provider based. The latter includes: a) provider that build it from
user
specified annotations b) plugin based ones






0

Hello Maxim,

Is seems this isssue was not migrated to JIRA from the old tracker.

Hi,

Yes, there is a plan to support metadata providers in Irida.
Actually the schema is two level: some built-in one and metadata
provider based. The latter includes: a) provider that build it from
user
specified annotations b) plugin based ones
Taras Tielkes wrote:




0

Hi,

The main focus is to create the framework able to describe references in
existing xml formats, given that IDEA knows about particular reference
type the functionality you described will work. Property reference type
does not exist right now, but it will certainly appear as consequence of
supporting EL in JSP.

Taras Tielkes wrote:

Hello Maxim,

Are you planning to support the concept of javabean properties in the
metadata?

For example, consider some imaginary XML configuration format:

...
<definition >
<fields>
<field name="example">
<!-- some other configuration tags/attributes go here -->
....
</field>
</fields>
</definition>
...
class MyBean
{
public String getExample()
{
...
}
}
...

The semantics of the example above don't really matter. You could also
take an Hibernate or Struts configuration file.

My question is: will the planned metadata annotation be able to define
(for above example) the following? -the attribute 'name' of element
'field' refers to the name of a javabean property
-the Java class to check for properties is defined by attribute 'class'
of grandparent element 'definition'
-the attribute should be getter with a protection level of at
least private (configurable in schema metadata)

Most of the content of 'popular' XML configuration for Java frameworks
consists of repeating fragments concerning property definition or
initialization. For instance, look at: hibernate, spring, struts.

In most of these formats, the relation between an element referring to a
class FQN and elements referring the javabean properties of the
referenced class are pretty straightforward (the latter usually being
child of grandchild elements of the first).

Having such semantics in the metadata annotation would enable:
-attribute autocomplete for JavaBean property names on specific elements
-a better "find references"
-a robust "refactor->rename" when dealing with property names (for
instance Hibernate beans)

Any plans for the Irida functionality to support this?

Thanks,

Taras

>>
>> Yes, there is a plan to support metadata providers in Irida.
>> Actually the schema is two level: some built-in one and metadata
>> provider based. The latter includes: a) provider that build it from
>> user
>> specified annotations b) plugin based ones






--
Maxim Mossienko
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.