How about live template that actually allows to execute user's
java code ? Then it could be implemented like this:
Live template:
$DATE$
where variable $DATE$ is
execute("com.abc.my.live.Template")

and execute("com.abc.my.live.Template") creates instance of the class
com.abc.my.live.Template and calls its toString():

// Template.java
package com.abc.my.live;
class Template
{
  public String toString()
  {
    final DateFormat format = DateFormat.getDateTimeInstance();
    return format.format(new Date()); // or whatever
  }
}

in this case, anyone could implement this "micro plugin" to create  required
functionality. Or just provide some sort of OpenAPI for this...



-----Original Message-----
From: Oliver Pfeiffer <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Mon, 22 Jul 2002 12:53:29 +0000 (UTC)
Subject: [Eap-features] Re: Live Template to insert formated Date/Time - 2
attachments

> 
> Hi Thomas!
> 
> [EMAIL PROTECTED] (Thomas Singer) wrote in 
> [EMAIL PROTECTED]:">news:[EMAIL PROTECTED]:
> 
> > +1
> > 
> >>I need a live template to insert a user formated date/time string for a 
> >>long time. This is very useful to write fixme comments or something else 
> >>which needs a timestamp ...
> 
> Here is a plugin that inserts a date/time-stamp if the user press 
> CTRL-ALT-D in an opened document.
> 
> <press CTRL-ALT-D> -->
> 2002-07-22<caret>
> 
> 2002-07-22.<press CTRL-ALT-D> -->
> 2002-07-22.14-51-12<caret>
> 
> Hope this will help your request ...
> 
> -- 
> cu
> o.pfeiffer
> 
> ICQ#  84320006
> eMail [EMAIL PROTECTED]
> --------------------------------------------
> TECHNOLOGIE - ZENTRUM INFORMATIK / UNIVERSITAET BREMEN / GERMANY 
> 
> ATTACHMENT: application/octet-stream ("DateTimeInsertion.jar")
> ATTACHMENT: application/x-zip-compressed ("DateTimeInsertion-src.zip")
> 
> _______________________________________________
> Eap-features mailing list
> [EMAIL PROTECTED]
> http://lists.jetbrains.com/mailman/listinfo/eap-features
> 


------------------------------------
Mail.Ru - ������, ��������, �������!
------------------------------------
_______________________________________________
Eap-features mailing list
[EMAIL PROTECTED]
http://lists.jetbrains.com/mailman/listinfo/eap-features

Reply via email to