Skip to content

Instantly share code, notes, and snippets.

#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
/* Let INFINITY be an integer value not likely to be
confused with a real weight, even a negative one. */
#define INFINITY ((1 << 14)-1)
typedef struct {
int source;
public int ExecCommand(uint itemid, ref Guid pguidCmdGroup, uint nCmdID,
uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
{
if (pguidCmdGroup == VsMenus.guidVsUIHierarchyWindowCmds)
{
ActiveNode = NodeFromId(itemid);
switch (nCmdID)
{
case (uint)VSConstants.VsUIHierarchyWindowCmdIds.UIHWCMDID_RightClick:
if (activeNode.MenuId != 0)
public virtual void showContext(IServiceProvider svcProvider, IntPtr pvaIn)
{
object vData = Marshal.GetObjectForNativeVariant(pvaIn);
UInt32 point = (UInt32)vData;
short x = (short)(point & 0x0000ffff);
short y = (short)((point & 0xffff0000) >> 16);
this.ContextMenuStrip.Show(x, y);
}
package com.sap.polestar.eclipse.ui.wizards;
import org.eclipse.jface.viewers.IStructuredSelection;
import com.adobe.flexbuilder.editors.common.ui.wizards.AbstractNewFlexFileWizardPage;
import com.adobe.flexbuilder.editors.mxml.ui.wizards.NewMXMLComponentWizard;
public class PolestarFileWizard extends NewMXMLComponentWizard
{
protected class PolestarFileWizardPage extends NewMXMLComponentWizard.NewMXMLComponentWizardPage
public class CustomFlexProjectWizard extends FlexProjectWizard
{
//override to add custom stuff.
@Override
public boolean performFinish()
{
boolean retSuper = super.performFinish();
addSomeStuff();
return retSuper;
}
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.newWizards">
<wizard
icon="icons/C_FlexProject_md_trans.png"
class="com.sap.polestar.eclipse.ui.wizards.PolestarFlexProjectWizard"
category="com.adobe.flexbuilder.editors.common.ui.project.wizards.newWizards"