- 浏览: 54499 次
- 性别:
- 来自: 沈阳
-
最新评论
-
imu2008:
嗯,此方法可用。好文。mark
rcp中新建工程没有图标解决方案 -
553563608:
今天也遇到这个问题了,,,,
这个方法可以解决。。。
rcp中新建工程没有图标解决方案 -
zhaozhongwei:
这个就不清楚了,我们也是两个文件啊。我很久没搞gmf了
关于gmf copy/paste 的解决方案 -
popjxc:
我下了你的代码,发现copy paste后,原来复制的是一个n ...
关于gmf copy/paste 的解决方案 -
赤道螞蟻:
你這不是用附件的方式傳的圖片嗎? 沒有什麽新招?
用java mail发送包含图片的html
I wanted to drop an outlook email to my RCP application and
as always I asked google to help me. You don't find much on this, an older post
was
http://www.eclipse.org/forums/index.php?t=msg&&th=147516&goto=464661
That got me startet. The damn it didn't work, I asked on the forum again and the answer made confusion even greater:
http://www.eclipse.org/forums/index.php?t=rview&goto=519397#msg_519397
gladly my wife gladly does some more windows thingy's with c# and with her help and a c# example i found out that i have to make an os call to get the type of the transfer that may change with every boot.
but i still did not know what the heck to do with these objects. I started to search again and finally found an example in the eclipse OleClient:
now with that I can read Streams from the IStorage. What streams there are is in the STATSTG's
http://www.fileformat.info/format/outlookmsg/
I can now extract the contents of the message and push it to jackrabbit ;) The code in these examples is for x86_64, you may need some ints for the adresses on 32bit windows.
http://www.eclipse.org/forums/index.php?t=msg&&th=147516&goto=464661
That got me startet. The damn it didn't work, I asked on the forum again and the answer made confusion even greater:
http://www.eclipse.org/forums/index.php?t=rview&goto=519397#msg_519397
gladly my wife gladly does some more windows thingy's with c# and with her help and a c# example i found out that i have to make an os call to get the type of the transfer that may change with every boot.
Then at least the stuff from the first post started to do something, i could get an IStorage and enumerate over the STATSTG'spublic static int registerType() {// Look name up in the registry// If name is not in registry, add it and return assigned value.// If name already exists in registry, return its assigned valueTCHAR chFormatName = new TCHAR(0, "FileContents", true);return OS.RegisterClipboardFormat(chFormatName);}
public Object nativeToJava(TransferData transferData) {IDataObject idata = new IDataObject(transferData.pIDataObject);idata.AddRef();FORMATETC formatetc = new FORMATETC();STGMEDIUM stgmedium = new STGMEDIUM();formatetc.cfFormat = type;formatetc.lindex = 0;formatetc.ptd = 0;formatetc.tymed = 4 | 8 | 1;formatetc.dwAspect = COM.DVASPECT_CONTENT;transferData.result = getData(idata, formatetc, stgmedium);idata.Release();if (transferData.result != COM.S_OK) {System.out.println("Fehler" + transferData.result);return null;}if ((stgmedium.tymed & 8) == 8) {// IStorageIStorage storage = new IStorage(stgmedium.unionField);storage.AddRef();long[] x = new long[1];long ret = storage.EnumElements(0, 0, 0, x);IEnumSTATSTG enumSTATSTG = new IEnumSTATSTG(x[0]);enumSTATSTG.AddRef();STATSTG[] data = new STATSTG[0];// Loop over enumeratorlong rgelt = OS.GlobalAlloc(OS.GMEM_FIXED | OS.GMEM_ZEROINIT, STATSTG.sizeof);int[] pceltFetched = new int[1];enumSTATSTG.Reset();while (enumSTATSTG.Next(1, rgelt, pceltFetched) == COM.S_OK && pceltFetched[0] == 1) {STATSTG statstg = new STATSTG();COM.MoveMemory(statstg, rgelt, STATSTG.sizeof);STATSTG[] newData = new STATSTG[data.length + 1];System.arraycopy(data, 0, newData, 0, data.length);newData[data.length] = statstg;data = newData;}OS.GlobalFree(rgelt);enumSTATSTG.Release();// do something with STATSTG[]
but i still did not know what the heck to do with these objects. I started to search again and finally found an example in the eclipse OleClient:
private byte[] readStream(IStorage storage, String stream) {boolean success = false;long[] address = new long[1];// Look for a CONTENTS streamif (storage.OpenStream(stream, 0, COM.STGM_DIRECT | COM.STGM_READ | COM.STGM_SHARE_EXCLUSIVE, 0, address) == COM.S_OK) {IStream tempContents = new IStream(address[0]);tempContents.AddRef();try {ByteArrayOutputStream w = new ByteArrayOutputStream();int increment = 1024 * 4;long pv = COM.CoTaskMemAlloc(increment);int[] pcbWritten = new int[1];while (tempContents.Read(pv, increment, pcbWritten) == COM.S_OK && pcbWritten[0] > 0) {byte[] buffer = new byte[pcbWritten[0]];OS.MoveMemory(buffer, pv, pcbWritten[0]);w.write(buffer);success = true;}COM.CoTaskMemFree(pv);w.close();return w.toByteArray();} catch (IOException err) {} finally {tempContents.Release();}}return null;}
now with that I can read Streams from the IStorage. What streams there are is in the STATSTG's
There we are. The IStorage contains the data in the .msg Format that I return in some strange way via the Map. I don't know how to get the .msg in one piece, but at least with some informations from// do something with STATSTG[]Map result = new HashMap();for (STATSTG s : data) {String stream = getString(s.pwcsName);result.put(stream, readStream(storage, stream));}storage.Release();return result;
http://www.fileformat.info/format/outlookmsg/
I can now extract the contents of the message and push it to jackrabbit ;) The code in these examples is for x86_64, you may need some ints for the adresses on 32bit windows.
发表评论
-
How to Debug and Detect Deadlocks
2010-12-01 15:04 1067Deadlocks in 2 minutes ... -
Run FindBugs from your Eclipse RCP headless build
2010-12-01 14:53 1036Running FindBugs from Eclipse R ... -
Markers and Annotations in Eclipse for Error Feedback(forward)
2010-12-01 14:39 1621Motto: Ninety per cent ... -
Testing declarative Eclipse expressions(forward)
2010-11-19 08:32 1094Our Eclipse-based product plugs ... -
Release engineer vs dependency management: Basing RCP Product and headless build
2010-11-02 23:32 900http://www.bonitasoft.org/blog/ ... -
Unit testing puzzle – How can I verify that System.exit() gets called?
2010-08-14 08:17 0Sounds strange – yes, very ... -
Invoking an Eclipse Wizard programmatically
2010-07-23 09:45 0Sometimes I find the need to ... -
A testing strategy for multiple inheritance in EMF generated code.
2010-07-23 09:12 0I recently became a comittter ... -
Can we build it? Yes we can!(FW)
2010-07-16 11:05 0Thomas Hallgren, Michal Ruzicka ... -
eclipse headless
2010-06-16 17:37 1506java -jar <eclipse-install ... -
Generating p2 meta data from command line
2010-06-11 12:08 815Many times when working with ... -
Opening files in Eclipse from the command line(转发)
2010-06-11 12:08 1245I ran a query to see all the ... -
http://cvalcarcel.wordpress.com/
2010-04-09 03:00 0http://cvalcarcel.wordpress.com ... -
HOWTO: Build Plugin & Feature Projects, Then Run Their Unit Tests w/ Tycho ::GEF
2010-04-03 14:30 01. Check out entire source tree ... -
Tip: How to Debug SWT components in Modal Dialogs(转发)
2010-04-03 14:22 0SWT and JFace components, and e ... -
action
2010-03-24 17:22 0这两天在改一个bug,跟action有关的,以前一直也没好好弄 ... -
终于成为eclipse的committer了
2010-03-16 16:33 3219虽然以前也是committer,但是是个非常小的工程还是卵化期 ... -
Animated GIF in TableViewer
2010-03-02 12:23 0I'm quite attached to TableVie ... -
extend jdt with ot
2010-02-28 11:56 0extend jdt with ot http://blog ... -
RCP Update: No more "jammern" with InstallJammer
2010-01-29 14:44 0Wow, I got a lot of feedback be ...
相关推荐
【标题】"org.eclipse.swt相关所有jar包"涵盖了用于JAVA应用程序与浏览器集成的关键库 【描述】中的"org.eclipse.swt"是指Eclipse Standard/Widgets工具包,这是一个开源的Java库,允许开发人员在多种平台上创建...
The Standard Widget Toolkit (SWT) is a new class library for creating graphical user interfaces (GUIs) in Java. Created as part of the Eclipse project, SWT allows developers to build efficient, ...
org.eclipse.swt.win32.win32.x86_64-4.3.jar org.eclipse.swt.win32.win32.x86_64-4.6.jar org.eclipse.swt.win32.win32.x86-4.3.jar org.eclipse.swt.win32.win32.x86-4.6.jar linux和mac环境不需要,window环境...
### SWT深入内幕之消息机制探秘 #### 一、引言 SWT(Standard Widget Toolkit)作为一种用于构建Java应用程序的用户界面工具包,其在处理Windows操作系统的消息机制方面具有独特的设计和技术实现。本文旨在深入探讨...
SWT用Chrome嵌入跨平台Chromium浏览器的SWT小部件。 它可以在Windows,Mac OS和Linux上运行。 这个新的小部件允许在Java SWT或Eclipse RCP应用程序中开发现代的Web UI。 使用与其他SWT浏览器相同的API,可以轻松地将...
org.eclipse.swt 相关jar包,JAVA调用火狐内核制作浏览器教程中所需,供各位下载,可在我的博客中查看详细用法。
SWT Widget Fundamentals, Keyboard, Mouse, Control Fundamentals, Display, Tool Bars and Menus, Advanced Controls
The Standard Widget Toolkit (SWT) is a new class library for creating graphical user interfaces (GUIs) in Java. Created as part of the Eclipse project, SWT allows developers to build efficient, ...
**Node-SWT: 将 NodeJS 与 SWT 结合** "Node-SWT" 是一个项目,它将 NodeJS 的强大功能与 SWT 的原生 GUI 支持相结合,使得开发者可以使用 JavaScript 来编写桌面应用程序的 UI 部分。通过 Node-SWT,你可以利用 ...
《深入理解Eclipse SWT:64位Windows环境下的应用》 在Java开发中,Eclipse SWT(Standard Widget Toolkit)是一个非常重要的库,它为开发者提供了与操作系统原生GUI控件直接交互的能力,使得Java应用程序可以拥有...
swt是一些用于javaGUI即图形界面设计用的插件,但是当执行打包好的exe文件时,容易出现找不到jar包的错误,这里提供下载资源
创建OpenGL 3.0和3.2核心/兼容性上下文(包括调试/转发兼容) OpenGL ES上下文 没有错误上下文 浮点和sRGB像素格式 多重采样的帧缓冲区(也具有不同数量的颜色样本-仅限Nvidia) 垂直同步/交换控制 上下文刷新...
swt skynet 火焰图 flamegraph + debug, 运行过程中随时启停profiler,方便调试线上问题 使用说明 引入调试命令 SWT_RUN 让服务支持debug脚本执行 配置 preload = "./lualib/swt/debug.lua" 或者在服务启动时 require...
org.eclipse.swt.win32.win32.x86_3.102.0.v20130605-1544.rar org.eclipse.swt.win32.win32.x86_3.102.0.v20130605-1544.rar
#### SWT:Java GUI开发的新纪元 SWT是Eclipse项目组为开发其集成开发环境(IDE)而创建的一组底层图形界面API。不同于AWT和Swing,SWT采取了一种更为高效和接近原生的方式,即利用本地操作系统的图形构件API来构建...
- **SWT.DROP_DOWN**:下拉菜单,通常作为子菜单。 - **SWT.POP_UP**:弹出式菜单,常用于鼠标右键菜单。 **MenuItem式样** - **SWT.CASCADE**:带有子菜单的菜单项。 - **SWT.CHECK**:选中后前显示一个小勾。 - ...
SWT(Standard Widget Toolkit)是Eclipse开源组织提供的一款用于创建图形用户界面(GUI)的Java库,它为Java开发者提供了丰富的控件和组件,与Java的AWT和Swing库相比,SWT更接近于操作系统原生的界面风格,因此在...
org.eclipse.swt.SWT.class org.eclipse.swt.SWTError.class org.eclipse.swt.SWTException.class org.eclipse.swt.accessibility.ACC.class org.eclipse.swt.accessibility.Accessible.class org.eclipse.swt....
标题“swt-64.rar_64位swt_64的SWT_SWT64_swt.jar 64位_swt64位”表明这个压缩包包含了适用于64位Windows操作系统的SWT库。描述中提到的“64位windows操作系统使用的SWT库”进一步确认了这一点。 SWT的设计目标是...
### SWT JFace 按键、事件、监听 #### 概述 SWT(Standard Widget Toolkit)是Eclipse平台下的图形界面开发工具包,而JFace则是基于SWT之上的高级用户界面工具集。SWT提供了低级别的组件,用于创建跨平台的图形...