Exemplo n.º 1
0
 /// <summary>
 /// creates the physical directory for a folder node
 /// Override if your node does not use file system folder
 /// </summary>
 public virtual void CreateDirectory()
 {
     try
     {
         if (Directory.Exists(this.Url) == false)
         {
             Directory.CreateDirectory(this.Url);
         }
     }
     //TODO - this should not digest all exceptions.
     catch (System.Exception e)
     {
         CCITracing.Trace(e);
         throw;
     }
 }
 public /*protected, but public for FSharp.Project.dll*/ override Guid GetBrowseLibraryGuid()
 {
     if (this.Url.EndsWith(".csproj"))
     {
         return(VSProjectConstants.guidCSharpBrowseLibrary);
     }
     else if (this.Url.EndsWith(".vbproj"))
     {
         return(VSProjectConstants.guidVBBrowseLibrary);
     }
     else
     {
         // TODO: Need to determine a generic way of finding browse library guids other than hardcoding
         // those for .csproj and .vbproj
         CCITracing.AddTraceLog("Unknown project type");
         return(Guid.Empty);
     }
 }
Exemplo n.º 3
0
        /// <summary>
        /// Gets properties whose values are GUIDs.
        /// </summary>
        /// <param name="propid">Identifier of the hierarchy property</param>
        /// <param name="guid"> Pointer to a GUID property specified in propid</param>
        /// <returns>If the method succeeds, it returns S_OK. If it fails, it returns an error code.</returns>
        public override int GetGuidProperty(int propid, out Guid guid)
        {
            guid = Guid.Empty;
            switch ((__VSHPROPID)propid)
            {
            case __VSHPROPID.VSHPROPID_ProjectIDGuid:
                guid = this.projectInstanceGuid;
                break;

            default:
                return(base.GetGuidProperty(propid, out guid));
            }

            CCITracing.TraceCall(String.Format(CultureInfo.CurrentCulture, "Guid for {0} property", propid));
            if (guid.CompareTo(Guid.Empty) == 0)
            {
                return(VSConstants.DISP_E_MEMBERNOTFOUND);
            }

            return(VSConstants.S_OK);
        }
Exemplo n.º 4
0
 static public void Trace(System.Exception e)
 {
     CCITracing.InternalTraceCall(2);
     System.Diagnostics.Trace.WriteLine("ExceptionInfo: \t" + e.ToString());
 }
Exemplo n.º 5
0
 static public void TraceCall(string strParameters)
 {
     CCITracing.InternalTraceCall(2);
     System.Diagnostics.Trace.WriteLine("\tParameters: \t" + strParameters);
 }
Exemplo n.º 6
0
 static public void TraceCall()
 {
     // skip this one as well
     CCITracing.InternalTraceCall(2);
 }